:root {
  --pine: #143d34;
  --pine-deep: #0b281f;
  --sage: #6f8f73;
  --moss: #8cab6d;
  --sand: #f5efe3;
  --paper: rgba(255, 250, 241, 0.78);
  --clay: #b66d44;
  --gold: #d5b16d;
  --ink: #1b241f;
  --muted: #64756e;
  --line: rgba(20, 61, 52, 0.12);
  --shadow: 0 24px 60px rgba(8, 28, 24, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 10%, rgba(213, 177, 109, 0.18), transparent 32%),
    radial-gradient(circle at 85% 20%, rgba(111, 143, 115, 0.16), transparent 35%),
    linear-gradient(160deg, #f8f3e8 0%, #eef2e5 100%);
}

body {
  position: relative;
  overflow-x: hidden;
  min-height: 100dvh;
}

.ambient {
  position: fixed;
  z-index: 0;
  width: 28rem;
  height: 28rem;
  border-radius: 50%;
  filter: blur(30px);
  opacity: 0.45;
}

.ambient-left {
  top: -8rem;
  left: -10rem;
  background: rgba(140, 171, 109, 0.4);
}

.ambient-right {
  right: -9rem;
  bottom: -8rem;
  background: rgba(182, 109, 68, 0.22);
}

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(320px, 460px) minmax(320px, 420px);
  gap: 2rem;
  align-items: center;
  width: min(1180px, calc(100% - 2rem));
  margin: 2rem auto;
}

.brief-panel {
  padding: 2rem;
}

.panel-badge {
  display: inline-flex;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(20, 61, 52, 0.08);
  color: var(--pine);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

.brief-panel h1 {
  margin: 1rem 0 0.5rem;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 0.98;
  color: var(--pine-deep);
}

.panel-subtitle {
  max-width: 32rem;
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--muted);
}

.panel-card,
.mini-card {
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(14px);
  box-shadow: 0 16px 38px rgba(34, 62, 51, 0.08);
}

.panel-card {
  padding: 1.25rem;
  border-radius: 1.4rem;
}

.panel-card h2,
.suggestion-card h2 {
  margin: 0 0 0.9rem;
  font-size: 1rem;
}

.panel-list {
  margin: 0;
  padding-left: 1rem;
  color: var(--muted);
  line-height: 1.8;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin: 1rem 0;
}

.mini-card {
  min-height: 150px;
  padding: 1rem;
  border-radius: 1.2rem;
}

.mini-card span,
.bundle-card span,
.scene-tag {
  display: inline-flex;
  margin-bottom: 0.55rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(20, 61, 52, 0.08);
  font-size: 0.76rem;
  color: var(--pine);
}

.mini-card strong,
.bundle-card strong {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 1rem;
}

.mini-card p,
.suggestion-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.phone-stage {
  display: flex;
  justify-content: center;
}

.phone-frame {
  position: relative;
  width: min(100%, 390px);
  height: 820px;
  padding: 0.7rem;
  border-radius: 2.4rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(245, 239, 227, 0.7)),
    rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.phone-notch {
  position: absolute;
  top: 0.75rem;
  left: 50%;
  width: 8.8rem;
  height: 1.7rem;
  margin-left: -4.4rem;
  border-radius: 999px;
  background: rgba(11, 40, 31, 0.9);
}

.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 1rem 0.8rem;
  color: var(--pine-deep);
  font-weight: 600;
  font-size: 0.85rem;
}

.status-icons {
  display: inline-flex;
  gap: 0.5rem;
}

.screen-stack {
  position: relative;
  height: calc(100% - 4.8rem);
  border-radius: 2rem 2rem 1.6rem 1.6rem;
  background:
    linear-gradient(180deg, rgba(255, 252, 247, 0.94), rgba(244, 238, 228, 0.82)),
    linear-gradient(160deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.3));
  overflow: hidden;
}

.screen {
  position: absolute;
  inset: 0;
  padding: 1.15rem 1rem 6.1rem;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity 240ms ease, transform 240ms ease;
}

.screen.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.screen-header {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.hero-header {
  align-items: flex-start;
  justify-content: space-between;
}

.eyebrow {
  margin: 0 0 0.25rem;
  color: var(--sage);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
}

.screen-header h2,
.hero-copy h3,
.section-title h3,
.profile-card h3,
.order-card h3 {
  margin: 0;
}

.ghost-button,
.back-button,
.text-button,
.tab-button,
.counter-button,
.choice-chip,
.primary-button {
  border: none;
  cursor: pointer;
  font: inherit;
}

.ghost-button,
.back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.5rem;
  padding: 0.65rem 0.85rem;
  border-radius: 999px;
  background: rgba(20, 61, 52, 0.08);
  color: var(--pine);
}

.hero-card,
.estimate-card,
.match-hero,
.order-card,
.route-card,
.profile-card,
.empty-state,
.service-logic-card,
.briefing-card {
  border-radius: 1.55rem;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.76);
  box-shadow: 0 16px 34px rgba(18, 43, 35, 0.08);
}

.hero-card {
  padding: 1.2rem;
  background:
    radial-gradient(circle at top right, rgba(213, 177, 109, 0.18), transparent 34%),
    linear-gradient(160deg, rgba(20, 61, 52, 0.92), rgba(29, 76, 62, 0.85));
  color: #f8f3e8;
}

.hero-copy span {
  display: inline-flex;
  margin-bottom: 0.55rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: rgba(248, 243, 232, 0.14);
  font-size: 0.74rem;
}

.hero-copy p {
  margin: 0.7rem 0 1rem;
  color: rgba(248, 243, 232, 0.78);
  line-height: 1.65;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, var(--pine) 0%, #2f6c56 100%);
  color: #fffaf1;
  box-shadow: 0 12px 28px rgba(20, 61, 52, 0.28);
}

.primary-button:disabled {
  background: linear-gradient(135deg, #95a39b 0%, #bbc5bf 100%);
  box-shadow: none;
  cursor: not-allowed;
}

.wide-button {
  width: 100%;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.metrics article {
  padding: 0.9rem 0.75rem;
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.68);
  text-align: center;
}

.metrics strong {
  display: block;
  font-size: 1.05rem;
  color: var(--pine);
}

.metrics span,
.section-hint,
.order-meta span,
.estimate-meta span,
.history-card p,
.check-item p,
.service-card p,
.tech-card p,
.scene-card p,
.input-card span,
.counter-label,
.profile-card p {
  color: var(--muted);
}

.section {
  margin-top: 1.1rem;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.text-button {
  padding: 0;
  background: none;
  color: var(--pine);
}

.service-grid,
.scene-list,
.history-list,
.bundle-list,
.tech-list,
.dynamic-form,
.tree-group-list,
.photo-grid,
.pricing-breakdown,
.pricing-rules,
#service-schedule-fields {
  display: grid;
  gap: 0.8rem;
}

.service-card,
.scene-card,
.history-card,
.bundle-card,
.tech-card,
.counter-card,
.input-card,
.dynamic-field {
  border-radius: 1.3rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.82);
}

.service-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.service-card {
  padding: 1rem;
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.service-card:hover,
.service-card.active,
.tech-card.selected,
.choice-chip.active {
  transform: translateY(-2px);
  border-color: rgba(20, 61, 52, 0.24);
  box-shadow: 0 14px 24px rgba(20, 61, 52, 0.12);
}

.service-card strong,
.history-card strong,
.tech-card strong,
.scene-card strong {
  display: block;
  margin-bottom: 0.35rem;
}

.service-card span {
  display: inline-flex;
  margin-bottom: 0.55rem;
  color: var(--pine);
  font-size: 0.75rem;
}

.scene-card,
.history-card,
.bundle-card,
.tech-card,
.dynamic-field {
  padding: 1rem;
}

.service-logic-card {
  display: grid;
  gap: 0.55rem;
  padding: 1rem;
  margin-top: 1rem;
  background:
    radial-gradient(circle at top right, rgba(213, 177, 109, 0.18), transparent 42%),
    rgba(255, 255, 255, 0.84);
}

.service-logic-card span,
.summary-tags span,
.tech-reason {
  display: inline-flex;
  width: fit-content;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: rgba(20, 61, 52, 0.08);
  color: var(--pine);
  font-size: 0.75rem;
}

.service-logic-card strong {
  font-size: 1rem;
}

.service-logic-card p,
.briefing-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.briefing-card {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  background:
    linear-gradient(160deg, rgba(20, 61, 52, 0.06), rgba(255, 255, 255, 0.82));
}

.summary-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.photo-uploader {
  display: grid;
  gap: 0.75rem;
}

.upload-hint,
.pricing-footnote,
.pricing-rule p,
.pricing-row p,
.photo-empty p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.photo-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.photo-card,
.photo-empty,
.tree-group-card,
.modal-card,
.pricing-row,
.pricing-rule,
.schedule-note {
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.82);
}

.photo-card {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-remove {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  width: 1.8rem;
  height: 1.8rem;
  border: none;
  border-radius: 999px;
  background: rgba(11, 40, 31, 0.72);
  color: #fffaf1;
  cursor: pointer;
}

.photo-empty {
  grid-column: span 3;
  display: grid;
  gap: 0.4rem;
  padding: 1rem;
  text-align: left;
}

.photo-empty strong {
  font-size: 0.95rem;
}

.dynamic-field {
  display: grid;
  gap: 0.85rem;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.84), rgba(247, 244, 236, 0.82));
}

.field-head {
  display: grid;
  gap: 0.28rem;
  align-items: flex-start;
  margin-bottom: 0;
}

.field-head strong {
  font-size: 0.98rem;
}

.field-head span {
  max-width: none;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
  text-align: left;
}

.inline-counter {
  margin-top: 0;
  padding: 0;
  background: transparent;
  border: none;
}

.inline-counter strong {
  font-size: 1rem;
  color: var(--pine);
}

.tree-group-card {
  display: grid;
  gap: 0.85rem;
  padding: 0.95rem;
  background:
    linear-gradient(160deg, rgba(20, 61, 52, 0.04), rgba(255, 255, 255, 0.86));
}

.tree-group-header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.tree-group-title {
  display: grid;
  gap: 0.22rem;
}

.tree-group-title strong {
  font-size: 0.95rem;
}

.tree-group-title span {
  color: var(--muted);
  font-size: 0.76rem;
}

.tree-group-remove,
.add-tree-button {
  border: none;
  cursor: pointer;
  font: inherit;
}

.tree-group-remove {
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  background: rgba(182, 109, 68, 0.12);
  color: var(--clay);
}

.add-tree-button {
  display: inline-flex;
  justify-content: center;
  width: 100%;
  padding: 0.86rem 1rem;
  border-radius: 1rem;
  background: rgba(20, 61, 52, 0.08);
  color: var(--pine);
}

.tree-group-list + .add-tree-button {
  margin-top: 0.2rem;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.dynamic-field > .chip-group,
.tree-group-card .chip-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.schedule-field > .chip-group {
  grid-template-columns: repeat(auto-fit, minmax(8.6rem, 1fr));
}

.schedule-field.schedule-field-days > .chip-group {
  grid-template-columns: repeat(auto-fit, minmax(5.4rem, 1fr));
}

.dynamic-field > .chip-group .choice-chip,
.tree-group-card .chip-group .choice-chip {
  display: inline-flex;
  justify-content: center;
  width: 100%;
}

.schedule-field .choice-chip {
  min-height: 3.1rem;
  align-items: center;
  line-height: 1.35;
}

.schedule-date-card {
  display: grid;
  gap: 0.45rem;
  padding: 0.9rem 0.95rem;
  border-radius: 1rem;
  background: rgba(20, 61, 52, 0.04);
}

.schedule-date-card span {
  color: var(--muted);
  font-size: 0.78rem;
}

.schedule-date-card input {
  width: 100%;
  border: none;
  background: rgba(255, 255, 255, 0.86);
  border-radius: 0.95rem;
  padding: 0.85rem 0.95rem;
  font: inherit;
  color: var(--ink);
}

.schedule-note {
  display: grid;
  gap: 0.35rem;
  padding: 0.95rem 1rem;
  background:
    linear-gradient(160deg, rgba(20, 61, 52, 0.06), rgba(255, 255, 255, 0.82));
}

.schedule-note strong {
  font-size: 0.95rem;
}

.schedule-note p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.choice-chip {
  padding: 0.72rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--pine);
  transition: all 180ms ease;
}

.choice-chip.active {
  background: rgba(20, 61, 52, 0.11);
}

.counter-card,
.input-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.95rem 1rem;
  margin-top: 0.8rem;
}

.counter-controls {
  display: inline-flex;
  gap: 0.55rem;
}

.counter-button {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  background: rgba(20, 61, 52, 0.08);
  color: var(--pine);
}

.input-card {
  flex-direction: column;
  align-items: stretch;
}

.input-card input,
.input-card textarea {
  width: 100%;
  border: none;
  background: rgba(20, 61, 52, 0.03);
  border-radius: 1rem;
  padding: 0.9rem 1rem;
  font: inherit;
  color: var(--ink);
  resize: vertical;
}

.estimate-card {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1rem;
  margin: 1.15rem 0 0.95rem;
}

.estimate-card p,
.route-card p,
.match-summary p,
.match-summary span,
.order-topline span {
  margin: 0;
}

.estimate-card h3 {
  margin: 0.3rem 0 0;
  color: var(--pine);
}

.estimate-meta {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-items: flex-end;
  justify-content: center;
  font-size: 0.86rem;
}

.match-hero {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1rem;
  overflow: hidden;
}

.pulse-ring {
  width: 4.4rem;
  height: 4.4rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20, 61, 52, 0.28) 0%, rgba(20, 61, 52, 0.08) 45%, transparent 70%);
  animation: pulse 2.1s infinite ease-out;
}

.match-summary span {
  display: inline-flex;
  margin-bottom: 0.25rem;
  color: var(--sage);
  font-size: 0.82rem;
}

.match-summary strong {
  display: block;
  margin-bottom: 0.35rem;
}

.tech-card {
  cursor: pointer;
}

.tech-topline,
.order-topline,
.order-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.tech-tags span,
#order-status-pill {
  display: inline-flex;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgba(20, 61, 52, 0.08);
  color: var(--pine);
  font-size: 0.74rem;
}

.tech-reason {
  margin-top: 0.7rem;
  background: rgba(213, 177, 109, 0.18);
  color: var(--pine-deep);
}

.order-card,
.route-card,
.profile-card,
.empty-state {
  padding: 1rem;
  margin-bottom: 0.95rem;
}

.route-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.route-map {
  position: relative;
  width: 4rem;
  height: 4rem;
  border-radius: 1.1rem;
  background: linear-gradient(160deg, rgba(20, 61, 52, 0.12), rgba(140, 171, 109, 0.1));
}

.route-point {
  position: absolute;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
}

.route-point-start {
  top: 0.75rem;
  left: 0.8rem;
  background: var(--clay);
}

.route-point-end {
  right: 0.85rem;
  bottom: 0.7rem;
  background: var(--pine);
}

.route-line {
  position: absolute;
  inset: 1.3rem 1.25rem;
  border-left: 2px dashed rgba(20, 61, 52, 0.3);
  transform: rotate(-40deg);
}

.timeline,
.checklist {
  display: grid;
  gap: 0.75rem;
}

.timeline-item,
.check-item {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  padding: 0.8rem 0.9rem;
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.68);
}

.timeline-dot {
  width: 0.95rem;
  height: 0.95rem;
  margin-top: 0.2rem;
  border-radius: 50%;
  background: rgba(20, 61, 52, 0.18);
}

.timeline-item.active .timeline-dot {
  background: var(--pine);
  box-shadow: 0 0 0 8px rgba(20, 61, 52, 0.1);
}

.timeline-copy strong,
.check-item strong {
  display: block;
  margin-bottom: 0.25rem;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, var(--pine) 0%, #2d6b56 100%);
  color: #fffaf1;
  font-size: 1.15rem;
  font-weight: 700;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.empty-state {
  display: grid;
  gap: 0.7rem;
  text-align: left;
}

.empty-state span {
  color: var(--sage);
  font-size: 0.82rem;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.hidden {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 40, 31, 0.42);
  backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(100%, 460px);
  max-height: calc(100vh - 2rem);
  padding: 1rem;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(8, 28, 24, 0.22);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.modal-section + .modal-section {
  margin-top: 1rem;
}

.pricing-row,
.pricing-rule {
  padding: 0.9rem 1rem;
}

.pricing-row {
  display: flex;
  justify-content: space-between;
  gap: 0.9rem;
  align-items: flex-start;
}

.pricing-row strong {
  display: block;
  margin-bottom: 0.22rem;
}

.pricing-row span {
  color: var(--pine);
  white-space: nowrap;
}

.pricing-rule strong {
  display: block;
  margin-bottom: 0.28rem;
}

.pricing-footnote {
  margin-top: 1rem;
}

.tab-bar {
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  bottom: 0.8rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  padding: 0.45rem;
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.82);
}

.tab-button {
  padding: 0.82rem 0.2rem;
  border-radius: 0.9rem;
  background: transparent;
  color: var(--muted);
}

.tab-button.active {
  background: rgba(20, 61, 52, 0.1);
  color: var(--pine);
  font-weight: 600;
}

.reveal {
  animation: riseIn 520ms ease both;
}

@keyframes pulse {
  0% {
    transform: scale(0.8);
    opacity: 0.6;
  }
  70% {
    transform: scale(1.05);
    opacity: 1;
  }
  100% {
    transform: scale(1.2);
    opacity: 0.2;
  }
}

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

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .brief-panel {
    padding: 1rem 0.2rem 0;
  }

  .panel-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .ambient,
  .brief-panel,
  .phone-notch,
  .status-bar {
    display: none;
  }

  body {
    background:
      radial-gradient(circle at top right, rgba(213, 177, 109, 0.12), transparent 34%),
      linear-gradient(180deg, #f8f3e8 0%, #eef2e5 100%);
  }

  .app-shell {
    display: block;
    width: 100%;
    margin: 0;
  }

  .phone-stage {
    display: block;
  }

  .phone-frame {
    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .screen-stack {
    height: 100dvh;
    border-radius: 0;
    background:
      linear-gradient(180deg, rgba(255, 252, 247, 0.98), rgba(244, 238, 228, 0.94)),
      linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.5));
  }

  .screen {
    padding-top: max(1rem, calc(env(safe-area-inset-top) + 0.6rem));
    padding-left: 0.95rem;
    padding-right: 0.95rem;
    padding-bottom: calc(6.4rem + env(safe-area-inset-bottom));
  }

  .tab-bar {
    left: 0;
    right: 0;
    bottom: 0;
    gap: 0.3rem;
    padding: 0.55rem 0.55rem calc(0.55rem + env(safe-area-inset-bottom));
    border-radius: 1.35rem 1.35rem 0 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    background: rgba(255, 250, 241, 0.96);
  }

  .tab-button {
    padding: 0.78rem 0.15rem;
    font-size: 0.9rem;
  }

  .modal {
    align-items: flex-end;
    padding: 0;
  }

  .modal-card {
    width: 100%;
    max-height: min(86dvh, 760px);
    padding: 1rem 0.95rem calc(1rem + env(safe-area-inset-bottom));
    border-radius: 1.4rem 1.4rem 0 0;
  }
}

@media (max-width: 520px) {
  .app-shell {
    width: 100%;
    margin: 0;
  }

  .brief-panel {
    padding: 0;
  }

  .phone-frame {
    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    border-radius: 0;
  }

  .screen {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  .service-grid,
  .metrics {
    grid-template-columns: 1fr 1fr;
  }

  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .photo-empty {
    grid-column: span 2;
  }

  .metrics article:last-child {
    grid-column: span 2;
  }
}
