:root {
  color-scheme: light;
  --paper: #f6ead6;
  --paper-deep: #ead8b9;
  --paper-soft: #fffaf0;
  --paper-card: rgba(255, 252, 244, 0.86);
  --ink: #251f1a;
  --muted: #746653;
  --muted-soft: #948370;
  --bronze: #b88435;
  --bronze-dark: #785323;
  --gold: #d8a34a;
  --jade: #24635a;
  --jade-soft: #d9e8e1;
  --cinnabar: #8f2f2d;
  --line: rgba(83, 61, 36, 0.18);
  --line-strong: rgba(83, 61, 36, 0.28);
  --shadow: 0 18px 50px rgba(68, 47, 24, 0.16);
  --shadow-soft: 0 10px 26px rgba(68, 47, 24, 0.12);
  --radius: 12px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  overflow-x: hidden;
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
  line-height: 1.55;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background:
    linear-gradient(90deg, rgba(36, 99, 90, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(120, 83, 35, 0.04) 1px, transparent 1px),
    radial-gradient(circle at 18% 8%, rgba(143, 47, 45, 0.08), transparent 26%),
    radial-gradient(circle at 88% 0%, rgba(36, 99, 90, 0.12), transparent 28%),
    linear-gradient(145deg, #fbf3e5 0%, #ead6b8 52%, #dce7de 100%);
  background-size: 28px 28px, 28px 28px, auto, auto;
}

button,
textarea {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

#app {
  min-height: 100svh;
}

.app-shell {
  width: 100%;
  min-height: 100svh;
  display: flex;
  justify-content: center;
  padding: 12px 12px calc(12px + var(--safe-bottom));
}

.phone-frame,
.onboarding-panel {
  width: min(100%, 430px);
}

.phone-frame {
  position: relative;
  min-height: calc(100svh - 24px);
  padding: 18px 14px calc(126px + var(--safe-bottom));
  overflow: hidden;
}

.paper-panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0.1)),
    var(--paper-soft);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.paper-panel::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  border-radius: inherit;
  background-image:
    linear-gradient(90deg, rgba(60, 45, 28, 0.028) 1px, transparent 1px),
    linear-gradient(0deg, rgba(60, 45, 28, 0.025) 1px, transparent 1px);
  background-size: 12px 12px;
  mix-blend-mode: multiply;
}

.onboarding-shell {
  align-items: stretch;
}

.onboarding-panel {
  min-height: calc(100svh - 28px);
  padding: 24px 18px 18px;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 82% 8%, rgba(184, 132, 53, 0.18), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 249, 235, 0.92)),
    var(--paper-soft);
}

.topline,
.panel-head,
.progress-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.topline {
  min-height: 28px;
}

.topline span:first-child,
.panel-head span {
  color: var(--ink);
  font-weight: 800;
}

.dots {
  display: flex;
  gap: 7px;
  margin: 18px 0 18px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: rgba(37, 31, 26, 0.18);
}

.dot.active,
.dot.passed {
  background: var(--bronze);
}

.onboarding-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0 22px;
}

.onboarding-badges span {
  border: 1px solid rgba(36, 99, 90, 0.18);
  border-radius: 99px;
  padding: 7px 10px;
  color: var(--jade);
  background: rgba(217, 232, 225, 0.54);
  font-size: 12px;
  font-weight: 800;
}

.onboarding-copy {
  margin: auto 0;
}

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

h1 {
  margin-bottom: 16px;
  font-size: 31px;
  line-height: 1.22;
  font-weight: 700;
}

h2 {
  margin-bottom: 10px;
  font-size: 20px;
  line-height: 1.35;
}

h3 {
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 1.4;
}

p {
  color: var(--muted);
  font-size: 15px;
}

.section-kicker {
  margin-bottom: 8px;
  color: var(--cinnabar);
  font-size: 13px;
  font-weight: 700;
}

.quiet-line {
  color: var(--muted);
}

.identity-line {
  margin-bottom: 8px;
  color: var(--jade);
  font-size: 13px;
  font-weight: 700;
}

.action-row {
  margin-top: auto;
  padding-top: 22px;
}

.btn {
  width: 100%;
  min-height: 52px;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 12px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 800;
  line-height: 1.25;
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.btn:active,
.choice-card:active,
.nav-item:active,
.link-btn:active {
  transform: translateY(1px);
}

.btn-primary {
  color: #fffaf0;
  background: linear-gradient(180deg, #d3a158 0%, #9a6728 100%);
  border-color: rgba(81, 54, 18, 0.22);
  box-shadow: 0 12px 24px rgba(120, 83, 35, 0.3);
}

.btn-secondary {
  color: #fffaf0;
  background: var(--jade);
  border-color: rgba(15, 57, 51, 0.2);
}

.btn-ghost {
  color: var(--bronze-dark);
  background: rgba(255, 255, 255, 0.5);
  border-color: var(--line);
  box-shadow: none;
}

.partner-shell {
  position: relative;
  width: 148px;
  height: 148px;
  margin: 22px auto 28px;
  display: grid;
  place-items: center;
}

.partner-mark {
  position: relative;
  z-index: 2;
  width: 120px;
  height: 120px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(184, 132, 53, 0.48);
  border-radius: 50%;
  color: #fff7df;
  background:
    radial-gradient(circle at 35% 26%, rgba(247, 211, 122, 0.95), rgba(184, 132, 53, 0.86) 46%, rgba(36, 99, 90, 0.9) 100%);
  box-shadow: 0 12px 20px rgba(97, 58, 24, 0.18);
  font-size: 48px;
  font-weight: 700;
}

.partner-glow {
  position: absolute;
  inset: 24px;
  border-radius: 50%;
  background: rgba(184, 132, 53, 0.18);
  filter: blur(16px);
}

.partner-shell.dim .partner-mark {
  filter: grayscale(0.55) contrast(0.9) opacity(0.68);
}

.partner-shell.light .partner-glow,
.partner-shell.witness .partner-glow {
  background: rgba(143, 47, 45, 0.22);
}

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

.seal-onboarding {
  width: min(78%, 260px);
  margin: 12px auto 22px;
}

.seal-onboarding-img {
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(72, 42, 14, 0.28);
}

.seal-witness-img {
  width: 116px;
  min-width: 116px;
  border-radius: 8px;
  box-shadow: 0 14px 28px rgba(72, 42, 14, 0.24);
}

.growth-grid {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.growth-card {
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 14px 13px;
  background: var(--paper-card);
  box-shadow: var(--shadow-soft);
}

.card-index {
  color: var(--bronze);
  font-size: 12px;
  font-weight: 700;
}

.card-label {
  margin-bottom: 8px;
  color: var(--jade);
  font-size: 13px;
  font-weight: 700;
}

.witness-card {
  margin: auto 0;
  border: 1px solid rgba(184, 132, 53, 0.28);
  border-radius: 8px;
  padding: 18px;
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 14px;
  align-items: center;
  background: linear-gradient(180deg, rgba(255, 250, 237, 0.82), rgba(217, 232, 225, 0.42));
}

.screen-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.screen-header h1 {
  margin-bottom: 0;
  font-size: 25px;
}

.beast-chip {
  flex: 0 0 auto;
  min-width: 62px;
  border: 1px solid rgba(36, 99, 90, 0.22);
  border-radius: 99px;
  padding: 8px 11px;
  color: var(--jade);
  background: rgba(217, 232, 225, 0.7);
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.daily-panel,
.practice-panel,
.cards-panel,
.power-panel,
.why-panel,
.status-panel,
.evening-panel,
.response-panel,
.evidence-panel,
.seal-feedback,
.progress-hero {
  margin-bottom: 14px;
  padding: 17px;
}

.daily-panel {
  border-color: rgba(36, 99, 90, 0.22);
  background:
    radial-gradient(circle at 92% 12%, rgba(36, 99, 90, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(217, 232, 225, 0.32)),
    var(--paper-soft);
}

.practice-panel {
  border-color: rgba(184, 132, 53, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 250, 237, 0.9)),
    var(--paper-soft);
}

.why-panel {
  background: rgba(255, 252, 244, 0.72);
}

.seal-mini {
  margin-bottom: 14px;
  border: 1px solid rgba(184, 132, 53, 0.22);
  border-radius: 13px;
  padding: 10px 11px;
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 10px;
  align-items: center;
  background: rgba(255, 252, 244, 0.78);
  box-shadow: var(--shadow-soft);
}

.seal-mini-img {
  width: 58px;
  height: 58px;
  border-radius: 6px;
}

.seal-mini span,
.seal-mini small,
.seal-mini em {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.seal-mini strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
}

.seal-mini em {
  margin-top: 4px;
  color: var(--bronze-dark);
  font-weight: 800;
}

.large-copy {
  margin-bottom: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.55;
  font-weight: 650;
}

.link-btn {
  min-height: 34px;
  border: 1px solid rgba(184, 132, 53, 0.22);
  border-radius: 99px;
  padding: 5px 10px;
  color: var(--bronze-dark);
  background: rgba(255, 252, 244, 0.72);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.completion-line {
  display: grid;
  gap: 6px;
  border-left: 3px solid var(--bronze);
  border-radius: 0 10px 10px 0;
  padding: 10px 10px 10px 12px;
  background: rgba(184, 132, 53, 0.08);
}

.completion-line span {
  color: var(--muted);
  font-size: 12px;
}

.completion-line strong {
  font-size: 15px;
}

.status-panel strong {
  display: block;
  margin-bottom: 4px;
  color: var(--jade);
  font-size: 16px;
}

.status-panel p,
.why-panel p {
  margin-bottom: 0;
}

.status-panel.pending {
  border-color: rgba(184, 132, 53, 0.32);
  background: rgba(184, 132, 53, 0.12);
}

.status-panel.complete {
  border-color: rgba(36, 99, 90, 0.24);
  background: rgba(36, 99, 90, 0.12);
}

.status-panel.status-rest {
  border-color: rgba(116, 102, 83, 0.24);
  background: rgba(255, 252, 244, 0.72);
}

.mini-card-row,
.direction-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-card-row span,
.direction-list span {
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 8px 10px;
  color: var(--jade);
  background: rgba(217, 232, 225, 0.46);
  font-size: 13px;
  font-weight: 700;
}

.power-row {
  display: grid;
  grid-template-columns: 54px 1fr 28px;
  gap: 9px;
  align-items: center;
  margin-top: 10px;
  font-size: 13px;
}

.power-track,
.spark-track {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(37, 31, 26, 0.12);
}

.power-track i,
.spark-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--jade), var(--bronze));
}

.sticky-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 10px 0 2px;
  position: sticky;
  bottom: calc(82px + var(--safe-bottom));
  z-index: 8;
  background: linear-gradient(180deg, rgba(246, 234, 214, 0), rgba(246, 234, 214, 0.92) 22%, rgba(246, 234, 214, 0.98));
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: calc(10px + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 12;
  width: min(calc(100% - 24px), 410px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  border: 1px solid rgba(83, 61, 36, 0.16);
  border-radius: 14px;
  padding: 6px;
  background: rgba(251, 246, 235, 0.92);
  box-shadow: 0 12px 32px rgba(68, 47, 24, 0.18);
  backdrop-filter: blur(14px);
}

.nav-item {
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.nav-item.active {
  color: #fffaf0;
  background: var(--jade);
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px 12px calc(12px + var(--safe-bottom));
  background: rgba(37, 31, 26, 0.28);
}

.sheet {
  width: min(100%, 406px);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px 16px 16px;
  background: var(--paper-soft);
  box-shadow: var(--shadow);
}

.sheet .btn {
  margin-top: 10px;
}

.sheet-handle {
  width: 42px;
  height: 4px;
  margin: 0 auto 14px;
  border-radius: 99px;
  background: rgba(37, 31, 26, 0.2);
}

.choice-grid {
  display: grid;
  gap: 10px;
}

.choice-card {
  width: 100%;
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 14px;
  color: var(--ink);
  background: var(--paper-card);
  cursor: pointer;
  text-align: left;
  box-shadow: var(--shadow-soft);
}

.choice-card span {
  display: block;
  font-size: 17px;
  font-weight: 700;
}

.choice-card small {
  color: var(--muted);
}

.choice-card.selected {
  border-color: rgba(184, 132, 53, 0.65);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(184, 132, 53, 0.16)),
    rgba(184, 132, 53, 0.14);
  box-shadow: 0 12px 28px rgba(120, 83, 35, 0.18);
}

.record-hint {
  margin: -2px 2px 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.evidence-options {
  display: grid;
  gap: 9px;
}

.evidence-options button {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
  background: rgba(255, 252, 244, 0.76);
  cursor: pointer;
  text-align: left;
}

.custom-label {
  display: block;
  margin: 14px 0 8px;
  color: var(--muted);
  font-size: 13px;
}

textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: rgba(255, 252, 244, 0.82);
}

.saved-line {
  margin: 12px 0 0;
  color: var(--jade);
  font-weight: 700;
}

.seal-feedback {
  border-color: rgba(36, 99, 90, 0.24);
  background: rgba(36, 99, 90, 0.1);
}

.seal-feedback strong {
  display: block;
  margin-bottom: 4px;
  color: var(--jade);
}

.seal-feedback p {
  margin-bottom: 0;
}

.seal-shrine {
  margin-bottom: 14px;
  border: 1px solid rgba(237, 195, 104, 0.28);
  border-radius: 16px;
  padding: 18px 16px;
  color: #fff4d6;
  background:
    radial-gradient(circle at 50% 5%, rgba(205, 142, 39, 0.52), transparent 38%),
    radial-gradient(circle at 82% 2%, rgba(36, 99, 90, 0.22), transparent 28%),
    linear-gradient(180deg, #25150e 0%, #130d0a 100%);
  box-shadow: 0 22px 56px rgba(37, 20, 8, 0.32);
}

.seal-shrine-copy {
  text-align: center;
}

.seal-shrine-copy span {
  color: rgba(255, 244, 214, 0.72);
  font-size: 13px;
}

.seal-shrine-copy h2 {
  margin: 6px 0;
  color: #ffe4a4;
  font-size: 24px;
}

.seal-shrine-copy p {
  color: rgba(255, 244, 214, 0.84);
}

.seal-hero-img {
  width: min(86%, 300px);
  margin: 12px auto;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.achievement-strip {
  margin: 6px 0 14px;
  border: 1px solid rgba(255, 228, 164, 0.22);
  border-radius: 13px;
  padding: 11px 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 10px;
  align-items: center;
  background: rgba(255, 244, 214, 0.08);
}

.achievement-strip span,
.achievement-strip small {
  color: rgba(255, 244, 214, 0.74);
  font-size: 12px;
}

.achievement-strip strong {
  grid-row: span 2;
  color: #ffe4a4;
  font-size: 24px;
  line-height: 1;
}

.achievement-strip small {
  grid-column: 1 / 2;
}

.seal-progress-line {
  display: grid;
  gap: 8px;
}

.seal-progress-line span {
  color: rgba(255, 244, 214, 0.78);
  font-size: 13px;
  text-align: center;
}

.seal-shrine .spark-track {
  background: rgba(255, 244, 214, 0.18);
}

.seal-shrine .progress-stats span {
  color: rgba(255, 244, 214, 0.78);
}

.seal-thumbs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.seal-thumb {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 6px 5px;
  background: rgba(255, 252, 244, 0.64);
  text-align: center;
}

.seal-thumb.active {
  border-color: rgba(184, 132, 53, 0.72);
  box-shadow: 0 8px 18px rgba(120, 83, 35, 0.18);
}

.seal-thumb.passed {
  background: rgba(217, 232, 225, 0.52);
}

.seal-thumb-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
}

.seal-thumb strong,
.seal-thumb span {
  display: block;
  overflow-wrap: anywhere;
}

.seal-thumb strong {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.seal-thumb span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.gold-witness {
  margin-bottom: 12px;
  padding: 16px;
}

.day-wall-panel,
.records-panel {
  margin-bottom: 14px;
  padding: 16px;
}

.day-wall {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 5px;
  margin-top: 12px;
}

.day-cell {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(255, 252, 244, 0.62);
  font-size: 11px;
  font-weight: 700;
}

.day-cell.current {
  border-color: rgba(184, 132, 53, 0.7);
  color: var(--bronze-dark);
  background: rgba(184, 132, 53, 0.12);
}

.day-cell.done,
.day-cell.partial {
  border-color: rgba(36, 99, 90, 0.36);
  color: #fffaf0;
  background: var(--jade);
}

.day-cell.rest {
  border-color: rgba(184, 132, 53, 0.42);
  color: var(--bronze-dark);
  background: rgba(184, 132, 53, 0.22);
}

.wall-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.record-item {
  border-left: 3px solid rgba(36, 99, 90, 0.38);
  border-radius: 0 10px 10px 0;
  padding: 9px 10px 9px 12px;
  background: rgba(217, 232, 225, 0.2);
}

.record-item + .record-item {
  margin-top: 10px;
}

.record-item span {
  display: block;
  color: var(--bronze-dark);
  font-size: 12px;
  font-weight: 700;
}

.record-item strong {
  display: block;
  margin: 3px 0;
  color: var(--ink);
}

.record-item p {
  margin-bottom: 0;
}

.witness-preview {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
}

.seal-preview-img {
  width: 72px;
  height: 72px;
  border-radius: 7px;
}

.witness-preview p {
  margin-bottom: 4px;
}

.stage-modal {
  width: min(100%, 406px);
  border: 1px solid rgba(237, 195, 104, 0.32);
  border-radius: 16px;
  padding: 18px;
  color: #fff4d6;
  background:
    radial-gradient(circle at 50% 0%, rgba(205, 142, 39, 0.42), transparent 35%),
    linear-gradient(180deg, #2b180f 0%, #120d0a 100%);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
  text-align: center;
}

.stage-modal h2 {
  color: #ffe4a4;
}

.stage-modal p {
  color: rgba(255, 244, 214, 0.82);
}

.stage-modal-img {
  width: min(76%, 260px);
  margin: 10px auto 14px;
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
}

.progress-visual {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  align-items: center;
}

.progress-visual .partner-shell {
  width: 92px;
  height: 92px;
  margin: 0;
}

.progress-visual .partner-mark {
  width: 80px;
  height: 80px;
  font-size: 34px;
}

.progress-visual h2 {
  margin-bottom: 0;
}

.spark-track {
  margin: 16px 0 10px;
}

.milestones {
  display: grid;
  gap: 10px;
}

.milestones article,
.evidence-item {
  border-left: 3px solid rgba(36, 99, 90, 0.38);
  padding: 8px 0 8px 12px;
  background: rgba(217, 232, 225, 0.2);
}

.milestones p,
.evidence-item p,
.empty-line {
  margin-bottom: 0;
}

.evidence-item span {
  color: var(--bronze-dark);
  font-size: 12px;
  font-weight: 700;
}

.error-panel {
  width: min(100%, 430px);
  margin: auto;
  padding: 18px;
}

@media (max-width: 374px) {
  .app-shell {
    padding-left: 8px;
    padding-right: 8px;
  }

  .phone-frame,
  .onboarding-panel {
    padding-left: 12px;
    padding-right: 12px;
  }

  h1 {
    font-size: 27px;
  }

  .screen-header h1 {
    font-size: 23px;
  }

  .daily-panel,
  .practice-panel,
  .cards-panel,
  .power-panel,
  .why-panel,
  .status-panel,
  .evening-panel,
  .response-panel,
  .seal-feedback,
  .gold-witness,
  .day-wall-panel,
  .records-panel {
    padding: 14px;
  }

  .day-wall {
    gap: 4px;
  }

  .day-cell {
    font-size: 10px;
  }

  .seal-thumb strong {
    font-size: 10px;
  }

  .seal-thumb span {
    font-size: 13px;
  }
}

@media (min-width: 431px) {
  .app-shell {
    align-items: center;
  }

  .phone-frame,
  .onboarding-panel {
    min-height: min(820px, calc(100svh - 28px));
  }
}

/* Miniapp visual parity layer. */
:root {
  --mp-bg: #f3ead8;
  --mp-bg-soft: #fbf6eb;
  --mp-card: #fffaf1;
  --mp-card-soft: #f7efdE;
  --mp-ink: #3d352a;
  --mp-sub: #8e7d66;
  --mp-faint: #c9b58e;
  --mp-line: rgba(177, 135, 63, 0.24);
  --mp-line-strong: rgba(177, 135, 63, 0.48);
  --mp-gold: #ae7622;
  --mp-gold-dark: #7c551f;
  --mp-gold-soft: #c69a4b;
  --mp-shadow: 0 10px 26px rgba(109, 78, 36, 0.13);
}

body {
  background: #262626;
}

body,
button,
textarea {
  font-family: "Songti SC", "STSong", "Noto Serif SC", "PingFang SC", "Microsoft YaHei", serif;
}

.app-shell {
  min-height: 100svh;
  padding: 0;
  align-items: stretch;
  background: transparent;
}

.phone-frame,
.onboarding-panel {
  width: min(100%, 430px);
  margin: 0 auto;
  border-radius: 0;
  background: var(--mp-bg);
  box-shadow: none;
}

.phone-frame {
  min-height: 100svh;
  padding: 0 0 calc(22px + var(--safe-bottom));
  overflow-x: hidden;
}

.body {
  padding: 22px 22px calc(26px + var(--safe-bottom));
}

.bar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 46px;
  display: grid;
  place-items: center;
  border-bottom: 1px solid rgba(112, 86, 46, 0.12);
  color: #181510;
  background: rgba(253, 249, 239, 0.92);
  font-size: 14px;
  font-weight: 500;
  backdrop-filter: blur(8px);
}

.bar-back {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 34px;
  height: 34px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  color: #16120c;
  background: transparent;
  font-size: 32px;
  line-height: 1;
}

.dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 16px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 1px;
  background: rgba(174, 118, 34, 0.28);
}

.dot.active,
.dot.passed {
  width: 18px;
  background: var(--mp-gold);
}

.onboarding-panel {
  position: relative;
  min-height: 100svh;
  padding: 0 24px calc(18px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  background: var(--mp-bg);
  overflow: hidden;
}

.onboarding-panel .bar {
  margin: 0 -24px;
}

.onboarding-panel::after,
.phone-frame::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 50% 26%, rgba(255, 255, 255, 0.48), transparent 34%),
    linear-gradient(90deg, rgba(112, 86, 46, 0.018) 1px, transparent 1px),
    linear-gradient(0deg, rgba(112, 86, 46, 0.014) 1px, transparent 1px);
  background-size: auto, 18px 18px, 18px 18px;
  mix-blend-mode: multiply;
}

.stage,
.foot,
.body > * {
  position: relative;
  z-index: 1;
}

.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stage-welcome {
  align-items: center;
  text-align: center;
}

.big {
  color: #5b5044;
  font-size: 31px;
  line-height: 1.45;
  font-weight: 700;
  letter-spacing: 0;
}

.big .hl,
.hl {
  color: var(--mp-gold);
  font-weight: 800;
}

.sub {
  margin-top: 24px;
  color: #8c7d69;
  font-size: 16px;
}

.stage-simple {
  justify-content: center;
}

.quote {
  border: 1px solid rgba(196, 157, 91, 0.46);
  outline: 4px solid rgba(196, 157, 91, 0.12);
  padding: 18px 12px;
  background: rgba(255, 250, 240, 0.38);
  text-align: center;
}

.qs {
  color: #b19b7b;
  font-size: 13px;
  font-weight: 700;
}

.qb {
  margin-top: 6px;
  color: var(--mp-gold);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.2;
}

.simple-big {
  margin-top: 26px;
  color: #5c5142;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.55;
}

.stage-growth-cards {
  justify-content: flex-start;
  padding: 28px 0 92px;
}

.h {
  margin: 0 0 20px;
  color: #866338;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.5;
}

.h-name {
  display: block;
}

.h-deco {
  display: block;
  margin-top: 8px;
  color: var(--mp-gold-soft);
  font-size: 16px;
  letter-spacing: 8px;
}

.growth-grid {
  display: grid;
  gap: 18px;
}

.pcard {
  position: relative;
  padding: 24px 18px 22px;
  border: 1px solid rgba(196, 157, 91, 0.54);
  background: rgba(255, 251, 242, 0.55);
  overflow: hidden;
}

.pcard::before,
.pcard::after {
  position: absolute;
  width: 20px;
  height: 20px;
  content: "";
  pointer-events: none;
}

.pcard::before {
  left: 8px;
  top: 8px;
  border-top: 2px solid var(--mp-gold-soft);
  border-left: 2px solid var(--mp-gold-soft);
}

.pcard::after {
  right: 8px;
  bottom: 8px;
  border-right: 2px solid var(--mp-gold-soft);
  border-bottom: 2px solid var(--mp-gold-soft);
}

.pcard-wm {
  position: absolute;
  right: 12px;
  top: -12px;
  color: rgba(174, 118, 34, 0.08);
  font-size: 72px;
  line-height: 1;
  font-weight: 800;
}

.no {
  color: var(--mp-gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 5px;
}

.pcard-title-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
}

.pt {
  color: #5e5141;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.55;
}

.tag {
  border: 1px solid rgba(174, 118, 34, 0.45);
  padding: 1px 8px;
  color: var(--mp-gold);
  background: rgba(174, 118, 34, 0.06);
  font-size: 12px;
  font-weight: 700;
}

.pd,
.pdetail,
.ppractice {
  color: #7f705e;
  font-size: 14px;
  line-height: 1.9;
}

.pd {
  margin-top: 12px;
  font-weight: 700;
}

.pdetail {
  margin-top: 13px;
}

.pdivider {
  margin: 20px auto 12px;
  color: var(--mp-gold);
  font-size: 13px;
  text-align: center;
}

.ppractice {
  border-left: 4px solid var(--mp-gold-soft);
  padding: 10px 0 10px 14px;
  background: rgba(255, 250, 240, 0.55);
}

.foot {
  position: sticky;
  bottom: 0;
  z-index: 3;
  padding: 10px 0 calc(8px + var(--safe-bottom));
  background: linear-gradient(180deg, rgba(243, 234, 216, 0), var(--mp-bg) 30%);
}

.foot .btn,
.btn,
.cta,
.today-link {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 0;
  color: #fffdf6;
  background: var(--mp-gold);
  box-shadow: none;
  font-size: 16px;
  font-weight: 800;
  text-align: center;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.logo {
  border: 1px solid rgba(174, 118, 34, 0.36);
  border-radius: 4px;
  padding: 4px 9px;
  color: var(--mp-gold);
  background: rgba(255, 251, 242, 0.44);
  font-size: 12px;
  font-weight: 700;
}

.day {
  color: #9d8b70;
  font-size: 13px;
  font-weight: 700;
}

.day-strong {
  color: var(--mp-gold);
}

.hello {
  margin: 4px 0 24px;
}

.greet {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #5a4d3d;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.35;
}

.sun-mark {
  width: 16px;
  height: 16px;
  border: 3px solid #ecc868;
  border-radius: 50%;
  display: inline-block;
}

.hello-sub {
  margin-top: 8px;
  color: #9a8970;
  font-size: 15px;
  font-weight: 700;
}

.jinnang {
  position: relative;
  margin-bottom: 20px;
  padding: 26px 20px 24px;
  border: 1px solid rgba(196, 157, 91, 0.38);
  background: rgba(255, 251, 242, 0.6);
}

.corner {
  position: absolute;
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.c-tl {
  left: 8px;
  top: 8px;
  border-top: 2px solid rgba(196, 157, 91, 0.55);
  border-left: 2px solid rgba(196, 157, 91, 0.55);
}

.c-tr {
  right: 8px;
  top: 8px;
  border-top: 2px solid rgba(196, 157, 91, 0.55);
  border-right: 2px solid rgba(196, 157, 91, 0.55);
}

.c-bl {
  left: 8px;
  bottom: 8px;
  border-left: 2px solid rgba(196, 157, 91, 0.55);
  border-bottom: 2px solid rgba(196, 157, 91, 0.55);
}

.c-br {
  right: 8px;
  bottom: 8px;
  border-right: 2px solid rgba(196, 157, 91, 0.55);
  border-bottom: 2px solid rgba(196, 157, 91, 0.55);
}

.jn-title {
  color: #8d795d;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 7px;
  text-align: center;
}

.jbody {
  margin: 18px 0 0;
  color: #5c5143;
  font-size: 19px;
  font-weight: 700;
  line-height: 2;
}

.practice {
  margin-bottom: 18px;
  border-left: 4px solid var(--mp-gold);
  padding: 18px 18px 18px 20px;
  background: rgba(235, 222, 193, 0.68);
}

.practice .pl {
  display: inline-block;
  margin-bottom: 14px;
  padding: 3px 12px;
  color: #fffdf6;
  background: #6a5841;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
}

.practice .pt {
  margin: 0;
  color: #675845;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.9;
}

.why-task {
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px dashed rgba(174, 118, 34, 0.24);
  color: #9a8970;
  font-size: 14px;
  line-height: 1.8;
}

.why-label {
  display: block;
  margin-bottom: 4px;
  color: #a98a57;
  font-weight: 800;
}

.why-text {
  display: block;
}

.navrow,
.progentry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: 1px solid rgba(196, 157, 91, 0.26);
  border-radius: 8px;
  padding: 12px 14px;
  background: rgba(255, 250, 240, 0.82);
  box-shadow: var(--mp-shadow);
}

.navrow {
  margin-bottom: 16px;
}

.nav-left,
.pe-t {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.nav-ic {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(174, 118, 34, 0.36);
  color: var(--mp-gold);
  font-size: 12px;
  font-weight: 800;
}

.nav-title,
.pe-t .a {
  color: #6a5841;
  font-size: 15px;
  font-weight: 800;
}

.nav-sub,
.pe-t .b {
  color: #a08c70;
  font-size: 12px;
  line-height: 1.4;
}

.chev,
.arr {
  color: #c2a46e;
  font-size: 22px;
}

.cta {
  margin: 14px 0 10px;
}

.swap,
.prog-link,
.ack-action {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(196, 157, 91, 0.34);
  border-radius: 0;
  color: #6d5c43;
  background: rgba(255, 250, 240, 0.76);
  font-size: 15px;
  font-weight: 800;
}

.progentry {
  margin-top: 16px;
}

.seal-mini-img {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 4px;
  object-fit: cover;
}

.today-ack-card,
.today-complete-card {
  margin: 0 0 18px;
  border: 1px solid rgba(196, 157, 91, 0.38);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 250, 240, 0.78);
  box-shadow: var(--mp-shadow);
}

.ack-title {
  color: #6a5841;
  font-size: 17px;
  font-weight: 800;
}

.ack-copy {
  margin-top: 7px;
  color: #98866e;
  font-size: 14px;
}

.ack-action {
  margin-top: 14px;
}

.ack-action.solid {
  border-color: var(--mp-gold);
  color: #fffdf6;
  background: var(--mp-gold);
}

.claim-card {
  margin-bottom: 34px;
  border: 1px solid rgba(196, 157, 91, 0.25);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 250, 240, 0.86);
  box-shadow: var(--mp-shadow);
}

.claim-title {
  color: #8a6732;
  font-size: 17px;
  font-weight: 800;
}

.claim-copy {
  margin: 8px 0 0;
  color: #97866c;
  font-size: 15px;
  line-height: 1.75;
}

.task-card {
  border: 1px solid rgba(196, 157, 91, 0.46);
  border-radius: 8px;
  padding: 22px 20px;
  background: rgba(255, 250, 240, 0.7);
}

.task-caption {
  color: #b3894c;
  font-size: 13px;
  font-weight: 800;
}

.task-line {
  margin: 14px 0 0;
  color: #7d5b32;
  font-size: 23px;
  font-weight: 800;
  line-height: 1.7;
}

.result-prompt {
  margin: 30px 0 18px;
  color: #5e5141;
  font-size: 20px;
  font-weight: 800;
}

.opts {
  display: grid;
  gap: 12px;
}

.opt {
  min-height: 44px;
  border: 1px solid rgba(196, 157, 91, 0.34);
  border-radius: 7px;
  color: #665747;
  background: rgba(255, 250, 240, 0.72);
  box-shadow: var(--mp-shadow);
  font-size: 15px;
  font-weight: 800;
}

.opt.active,
.opt.done.active {
  border-color: var(--mp-gold);
  color: #fffdf6;
  background: var(--mp-gold);
}

.reply,
.seal-feedback {
  margin-top: 18px;
  border-left: 4px solid var(--mp-gold);
  padding: 16px 18px;
  background: rgba(235, 222, 193, 0.68);
}

.reply-title,
.seal-feedback strong {
  display: block;
  color: #76572e;
  font-size: 17px;
  font-weight: 800;
}

.rt,
.seal-feedback p {
  margin: 8px 0 0;
  color: #786a57;
  font-size: 15px;
  line-height: 1.75;
}

.today-link,
.prog-link {
  display: block;
  margin-top: 14px;
}

.ov,
.stats,
.wall-panel,
.grp.open {
  border: 1px solid rgba(196, 157, 91, 0.28);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.78);
  box-shadow: var(--mp-shadow);
}

.ov {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  align-items: center;
  padding: 16px;
}

.ov-seal {
  width: 96px;
  height: 96px;
  border-radius: 6px;
  object-fit: cover;
}

.seal-kicker {
  color: #a98a57;
  font-size: 13px;
  font-weight: 800;
}

.tier {
  margin-top: 3px;
  color: #5c5143;
  font-size: 22px;
  font-weight: 800;
}

.info .day,
.next {
  margin-top: 6px;
  color: #95846b;
  font-size: 13px;
  line-height: 1.5;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 14px;
  overflow: hidden;
}

.stat {
  padding: 15px 8px;
  text-align: center;
}

.stat + .stat {
  border-left: 1px solid rgba(196, 157, 91, 0.22);
}

.stat .v {
  color: var(--mp-gold);
  font-size: 28px;
  font-weight: 800;
}

.stat .l {
  color: #94816a;
  font-size: 13px;
  font-weight: 700;
}

.wall-panel,
.grp.open {
  margin-top: 14px;
  padding: 16px;
}

.wall-h,
.tl-h,
.summary {
  color: #6a5841;
  font-size: 16px;
  font-weight: 800;
}

.wall {
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  gap: 5px;
  margin-top: 14px;
}

.cell {
  aspect-ratio: 1 / 1;
  border-radius: 2px;
  background: rgba(174, 118, 34, 0.14);
}

.cell.done,
.cell.partial {
  background: var(--mp-gold);
}

.cell.rest {
  background: rgba(106, 88, 65, 0.34);
}

.cell.future {
  background: rgba(174, 118, 34, 0.08);
}

.cell.next-lvl {
  outline: 2px solid var(--mp-gold);
  outline-offset: 1px;
  background: rgba(174, 118, 34, 0.22);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  color: #94816a;
  font-size: 12px;
}

.li {
  width: 8px;
  height: 8px;
  display: inline-block;
  margin-right: 5px;
  border-radius: 1px;
  background: var(--mp-gold);
}

.li.m {
  background: rgba(106, 88, 65, 0.34);
}

.li.l {
  outline: 2px solid var(--mp-gold);
  background: rgba(174, 118, 34, 0.22);
}

.li.f {
  background: rgba(174, 118, 34, 0.08);
}

.summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.summary .r {
  color: #a98a57;
  font-size: 13px;
}

.inner {
  margin-top: 12px;
}

.witness-preview {
  grid-template-columns: 70px 1fr;
}

.seal-preview-img {
  width: 70px;
  height: 70px;
  border-radius: 5px;
  object-fit: cover;
}

.witness-preview p,
.quiet-line {
  margin: 0 0 5px;
  color: #7d6c56;
  font-size: 14px;
}

.tl-h {
  margin: 18px 0 8px;
}

.day-row {
  border-left: 4px solid var(--mp-gold);
  padding: 10px 0 10px 12px;
  background: rgba(235, 222, 193, 0.48);
}

.day-row + .day-row {
  margin-top: 10px;
}

.dhead,
.dev,
.locktip {
  color: #a48d6f;
  font-size: 12px;
  font-weight: 800;
}

.dtask {
  margin: 5px 0;
  color: #645642;
  font-size: 14px;
  line-height: 1.65;
}

.sheet-mask,
.cards-mask,
.stage-mask {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 18px;
  background: rgba(36, 28, 18, 0.42);
}

.cards-mask {
  align-items: center;
}

.sheet,
.cards-modal {
  width: min(100%, 390px);
  max-height: calc(100svh - 44px);
  overflow: auto;
  border: 1px solid rgba(196, 157, 91, 0.42);
  border-radius: 10px;
  padding: 20px;
  color: var(--mp-ink);
  background: var(--mp-bg);
  box-shadow: 0 20px 60px rgba(35, 25, 13, 0.28);
}

.sheet-title,
.cards-modal-title {
  color: #5c5143;
  font-size: 20px;
  font-weight: 800;
}

.sheet-sub,
.cards-modal-sub {
  margin-top: 7px;
  color: #8f7c62;
  font-size: 14px;
  line-height: 1.65;
}

.sheet-option,
.sheet-close,
.cards-collapse {
  width: 100%;
  min-height: 42px;
  margin-top: 12px;
  border: 1px solid rgba(196, 157, 91, 0.34);
  border-radius: 0;
  color: #665747;
  background: rgba(255, 250, 240, 0.78);
  font-size: 15px;
  font-weight: 800;
}

.cards-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.cards-collapse {
  color: #fffdf6;
  background: var(--mp-gold);
}

.stage-modal {
  border-radius: 10px;
}

@media (min-width: 431px) {
  .app-shell {
    padding: 8px 0;
  }

  .phone-frame,
  .onboarding-panel {
    min-height: min(100svh - 16px, 820px);
    border-radius: 24px;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.38);
  }

  .bar {
    border-radius: 24px 24px 0 0;
  }
}

@media (max-width: 374px) {
  .body {
    padding-left: 18px;
    padding-right: 18px;
  }

  .onboarding-panel {
    padding-left: 18px;
    padding-right: 18px;
  }

  .onboarding-panel .bar {
    margin-left: -18px;
    margin-right: -18px;
  }

  .big {
    font-size: 28px;
  }

  .greet {
    font-size: 24px;
  }

  .jbody,
  .pt {
    font-size: 17px;
  }

  .task-line {
    font-size: 21px;
  }
}

/* Full miniapp parity overrides for current H5 DOM. */
.hello {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.hello-text {
  flex: 1;
  min-width: 0;
}

.sun-mark {
  position: relative;
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  border: 0;
}

.sun-mark::before {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9px;
  height: 9px;
  border: 2px solid #c79a3a;
  border-radius: 50%;
  content: "";
  transform: translate(-50%, -50%);
}

.sun-mark::after {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  content: "";
  background:
    linear-gradient(#c79a3a, #c79a3a) 50% 0 / 2px 7px no-repeat,
    linear-gradient(#c79a3a, #c79a3a) 50% 100% / 2px 7px no-repeat,
    linear-gradient(90deg, #c79a3a, #c79a3a) 0 50% / 7px 2px no-repeat,
    linear-gradient(90deg, #c79a3a, #c79a3a) 100% 50% / 7px 2px no-repeat;
  transform: rotate(45deg);
}

.cards-stack-entry {
  position: relative;
  flex: 0 0 86px;
  width: 86px;
  min-height: 72px;
  margin: -4px 10px 0 0;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  text-align: center;
}

.stack-art {
  position: relative;
  width: 43px;
  height: 31px;
  display: block;
  margin: 0 auto 5px;
}

.stack-card {
  position: absolute;
  width: 21px;
  height: 29px;
  border: 1px solid #d6c4a0;
  border-radius: 4px;
  background: #fbf3df;
  box-sizing: border-box;
}

.stack-card.back {
  left: 4px;
  top: 3px;
  opacity: 0.7;
  transform: rotate(-6deg);
}

.stack-card.mid {
  left: 13px;
  top: 1px;
  opacity: 0.88;
  transform: rotate(1deg);
}

.stack-card.front {
  left: 22px;
  top: 3px;
  border-color: #c4a96f;
  background: #fff8e8;
  box-shadow: 0 4px 9px rgba(111, 83, 36, 0.08);
  transform: rotate(7deg);
}

.stack-dot {
  position: absolute;
  right: 5px;
  top: 11px;
  width: 4px;
  height: 4px;
  border: 1px solid #c4a96f;
  border-radius: 50%;
}

.stack-copy,
.stack-title,
.stack-sub {
  display: block;
}

.stack-title {
  color: #7c561d;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
}

.stack-sub {
  margin-top: 4px;
  color: #9b8a6e;
  font-size: 10px;
  line-height: 1.3;
  white-space: nowrap;
}

.pturn,
.presult {
  margin: 0 0 10px;
  color: #7f705e;
  font-size: 14px;
  line-height: 1.85;
}

.presult {
  margin-top: 10px;
  color: #76572e;
  font-weight: 700;
}

.cards-closing {
  margin-top: 18px;
  border-left: 4px solid var(--mp-gold-soft);
  padding: 12px 0 12px 14px;
  color: #6a5841;
  background: rgba(255, 250, 240, 0.55);
  font-size: 14px;
  line-height: 1.85;
}

.ack-task {
  margin-top: 8px;
  color: #2a2317;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.75;
}

.rt {
  white-space: pre-line;
}

.page-progress .ov {
  position: relative;
  display: flex;
  gap: 14px;
  align-items: center;
  overflow: hidden;
  border-color: #6e4d18;
  padding: 18px 16px;
  color: #f3e7c9;
  background: radial-gradient(120% 80% at 50% 25%, #3a2c18, #1c1610 75%);
}

.page-progress .ov::before {
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(195, 154, 69, 0.3);
  content: "";
  pointer-events: none;
}

.page-progress .ov-seal {
  position: relative;
  z-index: 1;
  flex: 0 0 54px;
  width: 54px;
  height: 67px;
  border-radius: 6px;
  object-fit: contain;
}

.page-progress .info {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
}

.page-progress .tier {
  color: #e8c266;
  font-size: 20px;
}

.page-progress .info .day,
.page-progress .next {
  color: rgba(243, 231, 201, 0.72);
}

.page-progress .wall-h,
.page-progress .tl-h {
  margin: 22px 0 10px;
  color: #a9762b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
}

.page-progress .wall {
  margin-top: 0;
  gap: 4px;
}

.page-progress .cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5d7ba;
  box-sizing: border-box;
}

.page-progress .cell.rest {
  border-color: #c9b58e;
  border-style: dashed;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(169, 118, 43, 0.16) 0,
      rgba(169, 118, 43, 0.16) 2px,
      rgba(248, 241, 228, 0.25) 2px,
      rgba(248, 241, 228, 0.25) 5px
    );
}

.page-progress .cell.claimed {
  border-color: #d4b56f;
  background: rgba(246, 215, 128, 0.22);
  box-shadow: inset 0 0 0 1px rgba(212, 181, 111, 0.18);
}

.page-progress .cell.future {
  border-color: rgba(229, 215, 186, 0.42);
  background: rgba(245, 236, 218, 0.32);
  opacity: 1;
}

.page-progress .cell.lvl {
  border: 2px solid #8a5a17;
  background: linear-gradient(145deg, #f6d780, #c58a25);
  box-shadow:
    0 0 0 2px rgba(232, 194, 102, 0.28),
    0 4px 9px rgba(137, 82, 18, 0.22);
  z-index: 1;
}

.page-progress .cell.next-lvl {
  border: 2px solid #b98425;
  background: #fff6d9;
  box-shadow:
    0 0 0 2px rgba(232, 194, 102, 0.22),
    inset 0 0 0 2px rgba(232, 194, 102, 0.26);
  z-index: 1;
}

.cell-up {
  color: #fff8dc;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
}

.cell.next-lvl .cell-up {
  color: #9a6518;
}

.page-progress .li.l {
  border-color: #8a5a17;
  background: linear-gradient(145deg, #f6d780, #c58a25);
  box-shadow: 0 0 0 2px rgba(232, 194, 102, 0.28);
}

.page-progress .grp {
  margin-top: 0;
  margin-bottom: 10px;
  border: 1px solid #d6c4a0;
  border-radius: 0;
  padding: 0;
  background: #f8f1e4;
  box-shadow: none;
  overflow: hidden;
}

.page-progress .summary {
  width: 100%;
  border: 0;
  border-radius: 0;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #2a2317;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.page-progress .summary .r {
  flex: 0 0 auto;
  max-width: 54%;
  color: #9c8c72;
  font-size: 12px;
  text-align: right;
}

.page-progress .grp.open .summary {
  border-bottom: 1px solid #e5d7ba;
  color: #7c561d;
}

.page-progress .grp.locked .summary {
  color: #9c8c72;
}

.page-progress .inner {
  margin-top: 0;
  padding: 4px 14px 8px;
}

.page-progress .day-row {
  border: 0;
  border-bottom: 1px solid #e5d7ba;
  padding: 11px 0;
  background: transparent;
}

.page-progress .day-row + .day-row {
  margin-top: 0;
}

.page-progress .day-row:last-child {
  border-bottom: 0;
}

.page-progress .day-row.claimed {
  background: rgba(246, 215, 128, 0.08);
}

.page-progress .dhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  color: #7c561d;
  font-size: 14px;
}

.page-progress .rest {
  margin: 5px 0 0;
  color: #9c8c72;
  font-size: 13px;
  line-height: 1.55;
}

.upgrade-badge {
  flex: none;
  border: 1px solid #b98425;
  padding: 2px 7px;
  color: #6e4310;
  background: #f3d06f;
  font-size: 11px;
  font-weight: 800;
}

body.design-review-mode {
  background:
    radial-gradient(circle at 50% 0%, rgba(174, 118, 34, 0.16), transparent 34%),
    #242424;
}

body.design-review-mode .app-shell {
  min-height: 100svh;
  align-items: flex-start;
  padding: 20px 0 calc(130px + var(--safe-bottom));
}

body.design-review-mode .phone-frame,
body.design-review-mode .onboarding-panel {
  width: min(var(--review-width, 390px), calc(100vw - 24px));
  min-height: min(100svh - 40px, 860px);
  border-radius: 24px;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.04);
}

body.design-review-mode .bar {
  border-radius: 24px 24px 0 0;
}

.design-review-panel {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 120;
  width: min(320px, calc(100vw - 24px));
  max-height: calc(100svh - 32px);
  overflow: auto;
  border: 1px solid rgba(76, 97, 129, 0.38);
  border-radius: 12px;
  padding: 10px;
  color: #eef4ff;
  background: rgba(18, 24, 34, 0.92);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.42);
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  backdrop-filter: blur(10px);
}

.design-review-panel summary {
  cursor: pointer;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  list-style-position: inside;
}

.dev-section {
  margin-top: 10px;
  border-top: 1px solid rgba(238, 244, 255, 0.12);
  padding-top: 10px;
}

.dev-title {
  margin-bottom: 7px;
  color: #9ec5ff;
  font-size: 12px;
  font-weight: 800;
}

.dev-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 8px;
  min-height: 22px;
  align-items: center;
  color: rgba(238, 244, 255, 0.78);
  font-size: 11px;
}

.dev-row b {
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dev-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.dev-grid.three {
  grid-template-columns: repeat(3, 1fr);
}

.dev-btn {
  min-height: 32px;
  border: 1px solid rgba(158, 197, 255, 0.24);
  border-radius: 7px;
  padding: 5px 6px;
  color: #edf4ff;
  background: rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}

.dev-btn.active,
.dev-btn:active {
  border-color: rgba(215, 172, 86, 0.9);
  color: #17120a;
  background: #d7ac56;
}

@media (max-width: 760px) {
  .design-review-panel {
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
    max-height: 45svh;
  }
}
