:root {
  --bg: #fdfcf9;
  --paper: rgba(255, 255, 252, 0.94);
  --paper-strong: #ffffff;
  --wash-blue: #dfe6ff;
  --wash-violet: #e7e0ff;
  --wash-green: #edf7ee;
  --blueberry: #536ebc;
  --blueberry-deep: #14213d;
  --ink: #18233b;
  --muted: #768195;
  --leaf: #7aa66f;
  --leaf-deep: #4c7a58;
  --line: rgba(92, 111, 163, 0.16);
  --warning: #a16207;
  --shadow: 0 22px 56px rgba(54, 66, 112, 0.12);
  --shadow-soft: 0 14px 32px rgba(54, 66, 112, 0.08);
  --radius: 28px;
  --radius-sm: 18px;
  --font: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  overflow-x: hidden;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
}

body {
  min-height: 100%;
  width: 100%;
  overflow-x: hidden;
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(circle at 50% -6%, rgba(212, 221, 255, 0.44), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #fcfbf7 54%, #ffffff 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.34;
  background-image:
    radial-gradient(circle at 20% 18%, rgba(83, 110, 188, 0.1) 0 1px, transparent 1px),
    radial-gradient(circle at 80% 32%, rgba(122, 166, 111, 0.12) 0 1px, transparent 1px);
  background-size: 34px 34px, 46px 46px;
}

body[data-active-tab="projects"] .hero {
  display: none;
}

body[data-active-tab="projects"] .app-shell {
  padding-top: 28px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 28px 16px 112px;
}

.hero {
  display: grid;
  gap: 24px;
  justify-items: center;
  margin-bottom: 22px;
}

.brand-lockup {
  display: grid;
  justify-items: center;
  padding-top: 8px;
  text-align: center;
}

.berry-logo {
  position: relative;
  width: 132px;
  height: 108px;
  margin-bottom: 6px;
}

.berry-mark {
  position: absolute;
  left: 35px;
  top: 28px;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 45% 44%, transparent 0 8px, rgba(20, 33, 61, 0.28) 9px 12px, transparent 13px),
    radial-gradient(circle at 38% 30%, rgba(255, 255, 255, 0.78), transparent 20%),
    radial-gradient(circle at 68% 70%, rgba(20, 33, 61, 0.24), transparent 34%),
    linear-gradient(145deg, #8297df, #354f9a 58%, #233a7d);
  box-shadow: inset 8px 8px 18px rgba(255, 255, 255, 0.38), inset -10px -12px 20px rgba(15, 28, 82, 0.25);
}

.berry-mark::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 3px solid rgba(255, 255, 255, 0.48);
  border-right-color: rgba(20, 33, 61, 0.34);
  border-radius: 50%;
  transform: rotate(-24deg);
}

.berry-leaf {
  position: absolute;
  width: 52px;
  height: 28px;
  border-radius: 100% 0 100% 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.44), transparent 38%),
    linear-gradient(145deg, #b8d1a7, #68975d);
  box-shadow: inset -6px -5px 12px rgba(64, 107, 73, 0.16);
}

.berry-leaf::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 8px;
  top: 14px;
  height: 1px;
  background: rgba(76, 122, 88, 0.54);
  transform: rotate(-18deg);
}

.berry-leaf-left {
  left: 4px;
  top: 60px;
  transform: rotate(-20deg);
}

.berry-leaf-right {
  right: 2px;
  top: 22px;
  transform: rotate(16deg) scaleX(-1);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin: 0 0 6px;
  color: #5360a0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 8vw, 70px);
  font-style: italic;
  font-weight: 600;
  line-height: 0.95;
}

h2 {
  margin-bottom: 10px;
  font-size: 24px;
  line-height: 1.18;
}

h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.hero-text,
.muted {
  color: var(--muted);
}

.hero-text {
  margin-bottom: 10px;
  font-size: 21px;
  letter-spacing: 0;
}

.hero-metrics {
  display: grid;
  gap: 20px;
  width: min(100%, 720px);
}

.hero-metric,
.panel,
.welcome-card,
.project-card,
.summary-card,
.service-item,
.schedule-row,
.factor-group,
.factor-setting {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.hero-metric {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 190px;
  min-height: 172px;
  align-items: center;
  gap: 22px;
  overflow: hidden;
  padding: 28px 32px;
  border-radius: 36px;
}

.hero-metric::before,
.panel::before,
.welcome-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    radial-gradient(circle at 15% 18%, rgba(255, 255, 255, 0.72), transparent 28%),
    radial-gradient(circle at 72% 86%, rgba(83, 110, 188, 0.13), transparent 36%);
}

.hero-metric-time {
  background:
    linear-gradient(135deg, rgba(247, 248, 255, 0.98), rgba(222, 229, 255, 0.9)),
    var(--paper);
}

.hero-metric-money {
  background:
    linear-gradient(135deg, rgba(252, 255, 250, 0.98), rgba(231, 244, 232, 0.88)),
    var(--paper);
}

.metric-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 22px rgba(78, 91, 144, 0.12);
}

.metric-icon svg,
.tabbar-button svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.metric-icon svg {
  color: var(--blueberry);
}

.hero-metric span:not(.metric-icon):not(.metric-art),
.status-pill,
.metric-card span,
.summary-card span {
  display: block;
  color: var(--muted);
  font-size: 15px;
}

.hero-metric strong,
.metric-card strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 16px;
  color: var(--blueberry-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(54px, 12vw, 82px);
  line-height: 0.9;
}

.metric-art {
  position: relative;
  z-index: 1;
  justify-self: end;
}

.metric-art-clock {
  width: 150px;
  height: 150px;
  border: 7px solid rgba(53, 79, 154, 0.72);
  border-radius: 50%;
  background:
    radial-gradient(circle at 42% 34%, rgba(255, 255, 255, 0.9), transparent 24%),
    radial-gradient(circle at center, rgba(255, 255, 255, 0.78), rgba(226, 231, 255, 0.62));
  box-shadow: inset -10px -10px 22px rgba(61, 79, 150, 0.14);
}

.metric-art-clock::before,
.metric-art-clock::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  border-radius: 999px;
  background: var(--blueberry-deep);
  transform-origin: 50% 4px;
}

.metric-art-clock::before {
  height: 50px;
  transform: translate(-50%, -4px) rotate(42deg);
}

.metric-art-clock::after {
  height: 42px;
  transform: translate(-50%, -4px) rotate(176deg);
}

.metric-art-wallet {
  width: 170px;
  height: 116px;
  border-radius: 28px 22px 26px 30px;
  background:
    radial-gradient(circle at 20% 25%, rgba(255, 255, 255, 0.72), transparent 28%),
    linear-gradient(135deg, #a7ca92, #a8c7f0 62%, #6f8fce);
  box-shadow: inset -10px -10px 22px rgba(50, 76, 130, 0.14);
}

.metric-art-wallet::before {
  content: "";
  position: absolute;
  right: -10px;
  top: 38px;
  width: 62px;
  height: 44px;
  border-radius: 18px;
  border: 3px solid rgba(54, 82, 133, 0.28);
  background: linear-gradient(135deg, #9fcf93, #93b8e6);
}

.metric-art-wallet::after {
  content: "";
  position: absolute;
  right: 26px;
  top: 55px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 0 0 3px rgba(54, 82, 133, 0.18);
}

.hero-new-project {
  min-height: 78px;
  justify-content: center;
  border-radius: 34px;
  font-size: 24px;
  color: white;
  background:
    radial-gradient(circle at 12% 24%, rgba(255, 255, 255, 0.28), transparent 22%),
    linear-gradient(135deg, #7191df, #b9a7ef 78%);
  box-shadow: 0 18px 36px rgba(83, 110, 188, 0.22);
}

.button-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 3px solid currentColor;
  border-radius: 50%;
  font-size: 34px;
  line-height: 1;
}

.tabbar {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: min(100%, 760px);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(92, 111, 163, 0.12);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  transform: translateX(-50%);
}

.tabbar-button,
.primary-button,
.ghost-button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, color 160ms ease;
}

.tabbar-button {
  flex-direction: column;
  justify-content: center;
  min-height: 74px;
  padding: 10px 8px;
  border-radius: 22px;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
}

.tabbar-button svg {
  width: 30px;
  height: 30px;
}

.tabbar-button.active {
  color: #6083df;
  background:
    linear-gradient(135deg, rgba(232, 238, 255, 0.95), rgba(247, 251, 255, 0.92));
  box-shadow: 0 12px 24px rgba(83, 110, 188, 0.12);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 220ms ease;
}

.panel,
.welcome-card {
  overflow: hidden;
  padding: 22px;
  border-radius: var(--radius);
}

.panel {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 255, 0.9));
}

.grid-two {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.8fr);
  gap: 18px;
}

.stack {
  display: grid;
  gap: 18px;
}

.panel-head {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.welcome-card {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  background:
    linear-gradient(135deg, rgba(237, 247, 238, 0.95), rgba(232, 236, 255, 0.9));
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blueberry);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.welcome-actions,
.summary-actions,
.project-actions,
.pdf-links,
.service-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-button {
  padding: 13px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, #5f7ed2, #8a79d6);
  color: white;
  box-shadow: 0 12px 24px rgba(83, 110, 188, 0.18);
}

.ghost-button {
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(231, 236, 255, 0.9);
  color: #465b9d;
}

.primary-button:hover,
.ghost-button:hover,
.tabbar-button:hover {
  transform: translateY(-1px);
}

.form-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-grid label,
.panel > label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.full-width {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 12px 14px;
  border: 1px solid rgba(92, 111, 163, 0.18);
  border-radius: 16px;
  outline: none;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

input[type="date"],
input[type="time"],
input[type="number"] {
  min-width: 0;
  -webkit-appearance: none;
  appearance: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(83, 110, 188, 0.48);
  box-shadow: 0 0 0 4px rgba(83, 110, 188, 0.1);
}

.native-select-hidden {
  display: none !important;
}

.custom-select {
  position: relative;
  width: 100%;
  min-width: 0;
}

.custom-select-button {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(92, 111, 163, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.custom-select-button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-button b {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
}

.custom-select-open .custom-select-button {
  border-color: rgba(83, 110, 188, 0.48);
  box-shadow: 0 0 0 4px rgba(83, 110, 188, 0.1);
}

.custom-select-options {
  position: absolute;
  z-index: 40;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: none;
  max-height: min(320px, 52vh);
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(92, 111, 163, 0.18);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 42px rgba(54, 66, 112, 0.18);
}

.custom-select-open .custom-select-options {
  display: grid;
  gap: 4px;
}

.custom-select-option {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  padding: 10px 12px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.custom-select-option-active {
  color: #465b9d;
  background: rgba(232, 238, 255, 0.95);
}

.panel:has(.custom-select-open),
.service-item:has(.custom-select-open),
.factor-setting:has(.custom-select-open) {
  z-index: 35;
  overflow: visible;
}

.status-pill,
.metric-card,
.factor-chip,
.chip {
  border-radius: 18px;
}

.status-pill {
  position: relative;
  z-index: 1;
  padding: 9px 12px;
  background: rgba(237, 247, 238, 0.95);
  color: var(--leaf-deep);
}

.metric-card {
  position: relative;
  z-index: 1;
  padding: 16px;
  background: linear-gradient(135deg, rgba(232, 238, 255, 0.9), rgba(255, 255, 255, 0.78));
  border: 1px solid rgba(92, 111, 163, 0.12);
}

.factor-groups,
.factor-settings-list,
.service-list,
.projects-grid,
.summary-cards,
.pdf-links,
.schedule-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
}

.factor-group,
.project-card,
.summary-card,
.service-item,
.schedule-row,
.factor-setting {
  padding: 15px;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 255, 0.9));
}

.factor-options,
.chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.factor-chip,
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(232, 238, 255, 0.84);
  color: #465b9d;
  cursor: pointer;
}

.factor-chip:has(input:checked),
.chip:has(input:checked) {
  color: white;
  background: linear-gradient(135deg, #6785d7, #8f80dc);
}

.factor-chip input,
.chip input,
.inline-checkbox input,
.checkbox-group input,
input[type="checkbox"] {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  min-height: 22px;
  margin: 0;
  border: 2px solid rgba(83, 110, 188, 0.28);
  border-radius: 50%;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.factor-chip input:checked,
.chip input:checked,
.inline-checkbox input:checked,
.checkbox-group input:checked,
input[type="checkbox"]:checked {
  border-color: rgba(255, 255, 255, 0.9);
  background:
    radial-gradient(circle at center, #ffffff 0 32%, transparent 36%),
    linear-gradient(135deg, #6685d8, #8b79d8);
}

.keyboard-done-button {
  position: fixed;
  z-index: 60;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  display: none;
  min-height: 42px;
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #6685d8, #8b79d8);
  color: white;
  box-shadow: 0 14px 28px rgba(83, 110, 188, 0.24);
}

.keyboard-done-button-visible {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.keyboard-open .tabbar {
  display: none;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.summary-card strong,
.project-card strong {
  display: block;
  margin-top: 6px;
  color: var(--blueberry-deep);
  font-size: 22px;
}

.summary-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.project-card .project-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
  color: var(--muted);
  font-size: 14px;
}

.service-item,
.schedule-row,
.factor-setting {
  display: grid;
  gap: 10px;
}

.collapsible-panel {
  display: block;
}

.collapsible-summary {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: -4px 0 18px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.collapsible-summary::-webkit-details-marker {
  display: none;
}

.collapsible-summary span {
  font-size: 24px;
  font-weight: 700;
}

.collapsible-summary small {
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
}

.collapsible-summary::after {
  content: "";
  width: 12px;
  height: 12px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.collapsible-panel[open] > .collapsible-summary::after {
  transform: rotate(225deg);
}

.service-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.service-row h3 {
  margin-bottom: 4px;
}

.service-row p {
  margin-bottom: 0;
}

.service-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  color: var(--ink);
  cursor: pointer;
}

.service-toggle input {
  width: 22px;
  min-height: 22px;
  accent-color: var(--blueberry);
}

.retouch-toggle {
  position: relative;
  z-index: 1;
  margin-bottom: 16px;
}

.proposal-toggle {
  position: relative;
  z-index: 1;
  margin-bottom: 16px;
}

.schedule-toggle {
  position: relative;
  z-index: 1;
  margin-bottom: 16px;
}

.retouch-details {
  display: none;
}

.proposal-details {
  display: none;
}

.schedule-details {
  display: none;
}

.retouch-panel-enabled .retouch-details {
  display: grid;
}

.proposal-panel-enabled .proposal-details {
  display: grid;
}

.schedule-panel-enabled .schedule-details {
  display: grid;
  gap: 14px;
}

.pdf-action-row {
  display: grid;
  gap: 8px;
}

.pdf-links {
  align-items: stretch;
}

.service-details {
  display: none;
  padding-top: 12px;
  border-top: 1px solid rgba(92, 111, 163, 0.12);
}

.service-item-open .service-details {
  display: grid;
  gap: 12px;
}

.service-grid,
.schedule-grid,
.factor-setting-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.inline-checkbox {
  margin-top: 12px;
}

.sticky-panel {
  position: sticky;
  top: 16px;
}

.file-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 16px;
  background: rgba(237, 247, 238, 0.92);
  color: var(--leaf-deep);
  text-decoration: none;
  cursor: pointer;
}

.pdf-share-button {
  min-height: 46px;
}

.empty-state {
  position: relative;
  z-index: 1;
  padding: 24px;
  border: 1px dashed rgba(92, 111, 163, 0.28);
  border-radius: 22px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.58);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .grid-two {
    grid-template-columns: 1fr;
  }

  .form-grid,
  .service-grid,
  .schedule-grid,
  .factor-setting-grid,
  .project-card .project-meta {
    grid-template-columns: 1fr;
  }

  .sticky-panel {
    position: static;
  }

  .welcome-card {
    flex-direction: column;
  }

  .service-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .service-toggle {
    min-width: 0;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 18px 14px 112px;
  }

  .hero {
    gap: 18px;
  }

  .brand-lockup {
    padding-top: 2px;
  }

  .berry-logo {
    transform: scale(0.82);
    margin-bottom: -6px;
  }

  .hero-text {
    font-size: 18px;
  }

  .hero-metrics {
    gap: 18px;
  }

  .hero-metric {
    grid-template-columns: 72px minmax(0, 1fr) 108px;
    min-height: 150px;
    padding: 22px 20px;
    border-radius: 34px;
  }

  .hero-metric strong {
    font-size: 56px;
  }

  .metric-art-clock {
    width: 104px;
    height: 104px;
    border-width: 5px;
  }

  .metric-art-clock::before {
    height: 36px;
  }

  .metric-art-clock::after {
    height: 31px;
  }

  .metric-art-wallet {
    width: 112px;
    height: 82px;
    border-radius: 22px;
  }

  .metric-art-wallet::before {
    right: -8px;
    top: 28px;
    width: 42px;
    height: 32px;
  }

  .metric-art-wallet::after {
    right: 17px;
    top: 40px;
  }

  .hero-new-project {
    min-height: 74px;
    font-size: 22px;
  }

  .panel,
  .welcome-card {
    padding: 18px;
  }
}

@media (max-width: 460px) {
  .hero-metric {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .metric-icon {
    width: 58px;
    height: 58px;
  }

  .metric-icon svg {
    width: 28px;
    height: 28px;
  }

  .metric-art {
    display: none;
  }

  .tabbar {
    padding-left: 10px;
    padding-right: 10px;
  }

  .tabbar-button {
    min-height: 70px;
    font-size: 14px;
  }
}

/* Telegram Mini App production shell: keep the app phone-sized even in desktop browsers. */
body {
  background:
    radial-gradient(circle at 50% 0%, rgba(231, 237, 255, 0.72), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #fbfaf6 100%);
}

body::before {
  opacity: 0.18;
}

.app-shell {
  width: min(100%, 480px);
  max-width: 480px;
  padding: 18px 14px 108px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

.brand-lockup {
  padding-top: 0;
}

.berry-logo {
  width: 96px;
  height: 78px;
  margin-bottom: 0;
  transform: none;
}

.berry-mark {
  left: 27px;
  top: 20px;
  width: 48px;
  height: 48px;
}

.berry-mark::after {
  inset: 13px;
  border-width: 2px;
}

.berry-leaf {
  width: 38px;
  height: 20px;
}

.berry-leaf-left {
  left: 4px;
  top: 45px;
}

.berry-leaf-right {
  right: 4px;
  top: 16px;
}

h1 {
  font-size: 44px;
}

h2 {
  font-size: 21px;
}

.hero-text {
  margin-bottom: 4px;
  font-size: 17px;
}

.hero-metrics {
  width: 100%;
  gap: 14px;
}

.hero-metric {
  grid-template-columns: 58px minmax(0, 1fr);
  min-height: 118px;
  gap: 16px;
  padding: 18px;
  border-radius: 28px;
}

.metric-icon {
  width: 56px;
  height: 56px;
}

.metric-icon svg,
.tabbar-button svg {
  fill: none !important;
  stroke: currentColor !important;
}

.metric-icon svg {
  width: 28px;
  height: 28px;
}

.metric-art {
  display: none !important;
}

.hero-metric strong {
  margin-top: 8px;
  font-size: 48px;
}

.hero-new-project {
  min-height: 68px;
  border-radius: 28px;
  font-size: 21px;
}

.button-icon {
  width: 34px;
  height: 34px;
  font-size: 28px;
}

.tabbar {
  width: min(100%, 480px);
  padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
}

.tabbar-button {
  min-height: 66px;
  border-radius: 20px;
  font-size: 13px;
}

.tabbar-button svg {
  width: 27px;
  height: 27px;
}

.grid-two,
.form-grid,
.service-grid,
.schedule-grid,
.factor-setting-grid,
.project-card .project-meta {
  grid-template-columns: 1fr;
}

.stack {
  gap: 14px;
}

.panel,
.welcome-card {
  padding: 17px;
  border-radius: 24px;
}

.panel-head {
  align-items: stretch;
  flex-direction: column;
}

.welcome-card {
  flex-direction: column;
}

.primary-button,
.ghost-button {
  justify-content: center;
}

.summary-actions,
.welcome-actions,
.project-actions,
.pdf-links,
.service-actions {
  display: grid;
  grid-template-columns: 1fr;
}

.service-row {
  align-items: flex-start;
  flex-direction: column;
}

.service-toggle {
  min-width: 0;
}

/* Real watercolor assets: use them as restrained icons, not giant decorative blocks. */
.brand-lockup {
  gap: 2px;
}

.berry-logo {
  display: block;
  width: min(330px, 76vw);
  height: 220px;
  object-fit: contain;
  margin: -18px auto -36px;
}

.brand-name {
  display: block;
  width: min(330px, 80vw);
  height: 112px;
  object-fit: contain;
  margin: -4px auto -16px;
}

.hero-metric {
  grid-template-columns: 92px minmax(0, 1fr);
  min-height: 132px;
  overflow: hidden;
}

.hero-metric-time {
  background:
    linear-gradient(rgba(247, 248, 255, 0.84), rgba(247, 248, 255, 0.84)),
    url("/static/assets/card-wash-blue.png") center / cover no-repeat;
}

.hero-metric-money {
  background:
    linear-gradient(rgba(252, 255, 250, 0.84), rgba(252, 255, 250, 0.84)),
    url("/static/assets/card-wash-green.png") center / cover no-repeat;
}

.metric-art,
.metric-art-clock,
.metric-art-wallet {
  display: none !important;
  width: 78px;
  height: 78px;
  max-width: 78px;
  max-height: 78px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  object-fit: contain;
  justify-self: end;
}

.metric-art-clock::before,
.metric-art-clock::after,
.metric-art-wallet::before,
.metric-art-wallet::after {
  display: none;
}

.metric-icon {
  width: 82px;
  height: 82px;
  overflow: hidden;
}

.metric-icon img {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.tabbar-icon {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.tabbar-button {
  gap: 4px;
}

.tabbar-button.active .tabbar-icon {
  transform: scale(1.06);
}

.hero-new-project {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(84, 121, 210, 0.82), rgba(139, 121, 216, 0.78)),
    url("/static/assets/card-wash-blue.png") center / cover no-repeat;
  box-shadow:
    0 18px 34px rgba(91, 112, 203, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.44);
}

.hero-new-project::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.3), transparent 24%),
    radial-gradient(circle at 86% 72%, rgba(255, 255, 255, 0.16), transparent 30%);
}

.hero-new-project > span {
  position: relative;
  z-index: 1;
}

.hero-new-project .button-icon {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
}

@media (max-width: 380px) {
  .hero-metric {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .metric-art,
  .metric-art-clock,
  .metric-art-wallet {
    display: none !important;
  }

  .brand-name {
    width: min(290px, 80vw);
    height: 98px;
  }

  .berry-logo {
    width: min(300px, 78vw);
    height: 198px;
  }

  .metric-icon {
    width: 72px;
    height: 72px;
  }

  .metric-icon img {
    width: 62px;
    height: 62px;
  }

  .tabbar-icon {
    width: 36px;
    height: 36px;
  }
}
