:root {
  --ink: #7b441d;
  --ink-deep: #5c3219;
  --muted: #a57045;
  --paper: #fff7df;
  --paper-soft: #fff2cd;
  --paper-warm: #ffe7b5;
  --line: rgba(180, 121, 60, 0.22);
  --line-strong: rgba(155, 95, 43, 0.32);
  --sky: #9ed8ff;
  --sky-deep: #6fb7ea;
  --grass: #9ccb52;
  --grass-deep: #6fa934;
  --coral: #f47d66;
  --coral-deep: #d95745;
  --orange: #f4a64d;
  --sun: #ffc64a;
  --blue: #7798d8;
  --blue-deep: #5c79bf;
  --rose: #eda0a7;
  --shadow: 0 18px 38px rgba(96, 60, 28, 0.16);
  --soft-shadow: 0 9px 20px rgba(104, 67, 33, 0.12);
  --inner-line: inset 0 0 0 2px rgba(255, 255, 255, 0.58);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    radial-gradient(circle at 8% 14%, rgba(255, 226, 213, 0.72), transparent 19rem),
    radial-gradient(circle at 84% 16%, rgba(255, 247, 222, 0.7), transparent 20rem),
    linear-gradient(180deg, #bde4ff 0%, #e7f7ff 42%, #fff3d5 100%);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  overflow-x: hidden;
  background:
    radial-gradient(ellipse at 18% 8%, rgba(255, 255, 255, 0.88) 0 11%, transparent 27%),
    radial-gradient(ellipse at 79% 12%, rgba(255, 255, 255, 0.82) 0 13%, transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 42%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto 0 0;
  z-index: -2;
  pointer-events: none;
}

body::before {
  height: 78vh;
  background:
    linear-gradient(180deg, transparent 0 24%, rgba(255, 255, 255, 0.34) 25% 27%, transparent 28%),
    linear-gradient(135deg, transparent 0 29%, rgba(78, 111, 161, 0.12) 30% 36%, transparent 37%) 0 0 / 160px 100%,
    linear-gradient(225deg, transparent 0 28%, rgba(78, 111, 161, 0.11) 29% 36%, transparent 37%) 74px 0 / 190px 100%;
  opacity: 0.9;
}

body::after {
  height: 190px;
  z-index: -1;
  background:
    radial-gradient(ellipse at 8% 110%, rgba(110, 147, 68, 0.5), transparent 17rem),
    radial-gradient(ellipse at 92% 110%, rgba(117, 155, 68, 0.46), transparent 18rem),
    linear-gradient(180deg, transparent, rgba(124, 87, 45, 0.12));
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1.08em;
  height: 1.08em;
  flex: 0 0 auto;
  fill: currentColor;
}

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

button {
  border: 0;
  cursor: pointer;
}

button:active {
  transform: translateY(1px) scale(0.99);
}

img,
video {
  display: block;
  max-width: 100%;
}

video::-webkit-media-controls,
video::-webkit-media-controls-panel,
video::-webkit-media-controls-play-button {
  display: none !important;
  opacity: 0 !important;
}

.storybook-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(210px, 0.78fr) minmax(375px, 520px) minmax(210px, 0.78fr);
  gap: 34px;
  align-items: center;
  width: min(1320px, calc(100% - 34px));
  min-height: 100dvh;
  margin: 0 auto;
  padding: 18px 0 20px;
}

.storybook-stage::before,
.storybook-stage::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 104px;
  height: 310px;
  bottom: 72px;
  border-radius: 52px 52px 12px 12px;
  opacity: 0.5;
  background:
    linear-gradient(135deg, transparent 0 31%, rgba(88, 117, 171, 0.2) 32% 48%, transparent 49%) top / 100% 112px no-repeat,
    linear-gradient(180deg, rgba(255, 249, 235, 0.86), rgba(232, 193, 151, 0.55));
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.34);
}

.storybook-stage::before {
  left: 0;
}

.storybook-stage::after {
  right: 0;
}

.rail {
  display: grid;
  gap: 22px;
  align-content: center;
}

.rail-left {
  transform: translateY(-4px);
}

.rail-right {
  transform: translateY(10px);
}

.companion-card,
.rail-card,
.panel,
.restore-box,
.add-form,
.bottom-tabs {
  border: 3px solid rgba(255, 255, 255, 0.82);
  background:
    radial-gradient(circle at 16% 10%, rgba(255, 255, 255, 0.86), transparent 36%),
    linear-gradient(180deg, rgba(255, 249, 231, 0.96), rgba(255, 238, 196, 0.94));
  box-shadow: var(--soft-shadow), var(--inner-line);
}

.companion-card {
  position: relative;
  display: grid;
  justify-items: center;
  padding: 18px 18px 16px;
  border-radius: 34px;
  text-align: center;
}

.companion-card img,
.companion-video {
  width: 118px;
  height: 118px;
  object-fit: contain;
  margin-bottom: -4px;
  overflow: hidden;
  border: 5px solid rgba(255, 255, 255, 0.86);
  border-radius: 50%;
  background: #fff7e6;
  filter: drop-shadow(0 10px 12px rgba(98, 62, 30, 0.14));
}

.companion-video {
  object-fit: cover;
  transform: scale(1.08);
  pointer-events: none;
}

.companion-card p,
.rail-card p {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.52;
  font-weight: 700;
}

.ribbon-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 18px;
  border-radius: 12px 12px 18px 18px;
  color: #fffdf4;
  background:
    linear-gradient(180deg, #ffab98 0%, var(--coral) 68%, var(--coral-deep) 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.5),
    0 4px 0 rgba(173, 86, 61, 0.18),
    0 8px 16px rgba(118, 69, 37, 0.12);
  text-shadow: 0 2px 0 rgba(131, 70, 34, 0.2);
  font-size: 1.08rem;
  font-weight: 900;
}

.ribbon-label.blue {
  background:
    linear-gradient(180deg, #9bb7ed 0%, var(--blue) 70%, var(--blue-deep) 100%);
}

.ribbon-label.orange {
  background:
    linear-gradient(180deg, #ffc277 0%, var(--orange) 70%, #df7d32 100%);
}

.rail-card {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 18px;
  border-radius: 26px;
}

.progress-rail-card {
  grid-template-columns: 70px 1fr;
  align-items: center;
}

.rail-card-icon {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border: 3px solid rgba(255, 255, 255, 0.82);
  border-radius: 20px;
  color: #fff7d0;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.62), transparent 28%),
    linear-gradient(180deg, #ffd36a, #ffab3b);
  box-shadow: inset 0 -4px 0 rgba(188, 104, 34, 0.12), 0 8px 16px rgba(117, 74, 34, 0.14);
  font-size: 2.3rem;
}

.rail-card span {
  color: var(--ink);
  font-weight: 900;
}

.rail-card strong {
  color: #d8613c;
  font-size: 2.35rem;
  line-height: 1;
  text-shadow: 0 3px 0 rgba(255, 255, 255, 0.82);
}

.rail-card small {
  margin-left: 5px;
  color: var(--ink);
  font-size: 1rem;
}

.streak-display {
  justify-self: center;
  text-align: center;
}

.phone-shell {
  align-self: center;
  filter: drop-shadow(0 24px 38px rgba(65, 75, 113, 0.2));
}

.phone-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  height: min(900px, calc(100dvh - 34px));
  min-height: 0;
  padding: 18px 18px 14px;
  overflow: hidden;
  border: 12px solid rgba(255, 255, 255, 0.94);
  border-radius: 52px;
  background:
    radial-gradient(circle at 74% 3%, rgba(255, 255, 255, 0.86), transparent 7rem),
    radial-gradient(circle at 22% 22%, rgba(255, 245, 187, 0.42), transparent 14rem),
    linear-gradient(180deg, #9bd7ff 0 26%, #eef9ff 38%, #f2d99c 100%);
  box-shadow:
    inset 0 0 0 3px rgba(214, 232, 255, 0.7),
    0 0 0 2px rgba(176, 204, 235, 0.55),
    var(--shadow);
}

.phone-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 26px;
  padding: 0 20px;
  color: #12304b;
  font-weight: 900;
  letter-spacing: 0;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 4px;
}

.status-icons i {
  display: block;
  width: 18px;
  height: 10px;
  border: 2px solid #132f48;
  border-radius: 4px;
}

.status-icons i:first-child,
.status-icons i:nth-child(2) {
  width: 4px;
  height: 14px;
  border: 0;
  border-radius: 3px;
  background: #132f48;
}

.status-icons i:first-child {
  height: 9px;
}

.park-hero {
  position: relative;
  min-height: 210px;
  margin: 8px 2px 10px;
  padding: 14px 130px 14px 18px;
  overflow: visible;
  border-radius: 34px 34px 22px 22px;
  background:
    radial-gradient(circle at 60% 10%, rgba(255, 255, 255, 0.86), transparent 5rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 45%),
    linear-gradient(180deg, rgba(111, 180, 230, 0.35), rgba(130, 194, 103, 0.3));
}

.park-hero::before {
  content: "";
  position: absolute;
  inset: 5px 9px auto 9px;
  height: 112px;
  z-index: 0;
  border-radius: 28px 28px 18px 18px;
  background:
    linear-gradient(135deg, transparent 0 31%, rgba(85, 120, 184, 0.34) 32% 44%, transparent 45%) 20px 6px / 72px 92px no-repeat,
    linear-gradient(135deg, transparent 0 30%, rgba(85, 120, 184, 0.28) 31% 45%, transparent 46%) 96px 0 / 86px 108px no-repeat,
    linear-gradient(135deg, transparent 0 31%, rgba(85, 120, 184, 0.28) 32% 44%, transparent 45%) 202px 8px / 66px 88px no-repeat,
    radial-gradient(ellipse at 18% 28%, rgba(255, 255, 255, 0.86), transparent 4rem),
    radial-gradient(ellipse at 70% 18%, rgba(255, 255, 255, 0.78), transparent 4.2rem);
  opacity: 0.84;
}

.wood-sign,
.park-hero h1,
.hero-video-frame,
.hero-speech {
  position: relative;
  z-index: 1;
}

.wood-sign {
  width: max-content;
  max-width: 100%;
  margin: 4px 0 8px;
  padding: 9px 24px 11px;
  border: 4px solid #d99554;
  border-radius: 20px 20px 18px 18px;
  color: #7a3d16;
  background:
    linear-gradient(90deg, rgba(142, 87, 39, 0.16), transparent 14% 84%, rgba(142, 87, 39, 0.16)),
    linear-gradient(180deg, #ffe4ae 0%, #d79855 100%);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.68), 0 7px 0 rgba(116, 72, 36, 0.16);
  font-size: 1.35rem;
  font-weight: 1000;
  line-height: 1;
  letter-spacing: 0;
  transform: rotate(-2deg);
}

.park-hero h1 {
  display: inline-flex;
  min-width: 218px;
  min-height: 62px;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 8px 30px 12px;
  border-radius: 18px 18px 24px 24px;
  color: #fffaf0;
  background:
    linear-gradient(180deg, #ffa895, var(--coral) 68%, var(--coral-deep));
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.48),
    0 5px 0 rgba(171, 78, 55, 0.18),
    0 12px 20px rgba(121, 68, 31, 0.12);
  font-size: 2.25rem;
  font-weight: 1000;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 3px 0 rgba(134, 70, 34, 0.22);
}

.hero-video-frame {
  position: absolute;
  right: 8px;
  bottom: -3px;
  width: 142px;
  height: 158px;
  overflow: hidden;
  border: 5px solid rgba(255, 255, 255, 0.95);
  border-radius: 50% 50% 34px 34px;
  background: radial-gradient(circle at 50% 34%, #fff9ed, #f2d69f 72%);
  box-shadow: 0 12px 20px rgba(92, 62, 31, 0.18);
  pointer-events: none;
}

.hedgehog-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.12);
  pointer-events: none;
}

.hero-speech {
  display: inline-flex;
  max-width: 245px;
  margin-top: 14px;
  padding: 10px 16px;
  border: 2px dashed rgba(186, 119, 55, 0.26);
  border-radius: 18px 18px 18px 6px;
  color: var(--ink);
  background: rgba(255, 248, 226, 0.84);
  box-shadow: 0 7px 16px rgba(106, 67, 31, 0.1);
  font-size: 0.9rem;
  font-weight: 900;
}

.app-view {
  display: none;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 2px 6px 8px;
  scrollbar-width: none;
}

.app-view::-webkit-scrollbar {
  display: none;
}

.app-view.is-active {
  display: block;
  animation: viewIn 0.28s ease both;
}

.panel,
.restore-box,
.add-form {
  position: relative;
  border-radius: var(--radius-lg);
}

.panel {
  padding: 16px;
}

.panel + .panel,
.panel + .add-form,
.restore-box + .panel,
.add-form + .panel {
  margin-top: 12px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-head h2,
.level-block h2 {
  margin: 0;
  color: var(--ink-deep);
  font-size: 1.25rem;
  line-height: 1.1;
  letter-spacing: 0;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.75);
}

.section-kicker {
  display: inline-flex;
  margin-bottom: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  color: #fffdf3;
  background: linear-gradient(180deg, #8faeeb, var(--blue-deep));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
  font-size: 0.68rem;
  font-weight: 900;
}

.daily-summary {
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: center;
  min-height: 130px;
  margin-bottom: 12px;
  padding: 18px;
}

.summary-star,
.wallet-badge {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border: 4px solid rgba(255, 255, 255, 0.78);
  border-radius: 26px;
  color: #fff5c8;
  background:
    radial-gradient(circle at 35% 24%, rgba(255, 255, 255, 0.62), transparent 26%),
    linear-gradient(180deg, #ffd85f, #ffaf32);
  box-shadow: inset 0 -5px 0 rgba(178, 99, 28, 0.13), 0 12px 18px rgba(114, 72, 34, 0.12);
  font-size: 3.25rem;
}

.summary-copy > span,
.wallet-card span,
.level-block > span,
.profile-metrics span {
  color: var(--ink);
  font-weight: 900;
}

.summary-copy strong {
  display: flex;
  align-items: baseline;
  gap: 5px;
  color: #e7663e;
  font-size: 3.35rem;
  line-height: 1;
  text-shadow: 0 4px 0 rgba(255, 255, 255, 0.85);
}

.summary-copy small {
  color: var(--ink);
  font-size: 2.2rem;
}

.progress-shell {
  height: 12px;
  margin-top: 13px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  background: rgba(168, 132, 75, 0.16);
  box-shadow: inset 0 2px 4px rgba(116, 72, 34, 0.1);
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #87c63d, #b8d850);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35);
  transition: width 0.32s ease;
}

.mini-progress {
  grid-column: 1 / -1;
  width: 100%;
  height: 10px;
  margin-top: 0;
}

.mood-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.mood-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 3px solid rgba(255, 255, 255, 0.76);
  border-radius: 20px;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(255, 251, 237, 0.96), rgba(255, 231, 186, 0.86));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68), 0 6px 12px rgba(108, 69, 33, 0.1);
  font-weight: 1000;
}

.mood-button.is-selected {
  color: #fffdf0;
  background: linear-gradient(180deg, #ffad72, #ff883d);
  text-shadow: 0 2px 0 rgba(125, 68, 28, 0.22);
}

.task-panel {
  padding-bottom: 4px;
}

.task-list,
.achievement-list,
.pending-list,
.reward-list,
.history-list {
  display: grid;
  gap: 9px;
}

.task-card,
.achievement-card,
.pending-card,
.reward-card,
.hidden-task-card,
.history-item,
.category-card {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 70px;
  border: 2px solid rgba(214, 166, 100, 0.36);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 253, 244, 0.96), rgba(255, 238, 202, 0.88));
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.76),
    0 6px 14px rgba(114, 72, 34, 0.08);
}

.task-card {
  grid-template-columns: 64px minmax(0, 1fr) 40px;
  gap: 10px;
  padding: 8px 10px 8px 8px;
}

.task-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(196, 139, 70, 0.18);
  border-radius: 17px;
  pointer-events: none;
}

.task-check {
  position: relative;
  z-index: 1;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 4px solid rgba(255, 255, 255, 0.82);
  border-radius: 18px;
  color: transparent;
  background:
    radial-gradient(circle at 35% 24%, rgba(255, 255, 255, 0.72), transparent 28%),
    linear-gradient(180deg, #f6fbff, #d9edff);
  box-shadow: 0 7px 12px rgba(93, 122, 165, 0.16);
  font-size: 1.7rem;
}

.task-card.is-done .task-check {
  color: #fff;
  background: linear-gradient(180deg, #a9cc4f, #74ad35);
  box-shadow: inset 0 -4px 0 rgba(64, 115, 37, 0.14), 0 7px 12px rgba(73, 117, 42, 0.16);
}

.task-card > div,
.achievement-card > div,
.pending-card > div,
.reward-card > div,
.history-item > div,
.hidden-task-card > div {
  position: relative;
  z-index: 1;
}

.task-title,
.achievement-title,
.reward-title {
  display: block;
  color: var(--ink-deep);
  font-size: 1.08rem;
  font-weight: 1000;
  line-height: 1.2;
}

.task-meta,
.achievement-meta,
.reward-meta,
.history-meta {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
}

.tiny-delete,
.achievement-add,
.reward-button,
.witness-button,
.restore-button,
.permanent-delete-button,
.icon-button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  font-weight: 1000;
}

.tiny-delete,
.icon-button,
.achievement-add {
  width: 38px;
  height: 38px;
  color: #b77a4a;
  background: rgba(255, 241, 222, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 5px 10px rgba(111, 73, 34, 0.08);
}

.achievement-card,
.pending-card,
.reward-card,
.hidden-task-card,
.history-item {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
}

.category-badge {
  display: inline-flex;
  margin-bottom: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #fffdf4;
  background: linear-gradient(180deg, #91b0ea, #617fc6);
  font-size: 0.68rem;
  font-weight: 900;
}

.achievement-add,
.witness-button {
  color: #fff;
  background: linear-gradient(180deg, #a6cd57, #72aa33);
  box-shadow: inset 0 -3px 0 rgba(56, 101, 29, 0.18), 0 7px 12px rgba(73, 117, 42, 0.12);
}

.witness-button,
.restore-button,
.permanent-delete-button,
.reward-button {
  min-height: 38px;
  padding: 0 13px;
}

.reward-button,
.primary-action {
  color: #fffdf4;
  background:
    linear-gradient(180deg, #ffae96, var(--coral) 65%, var(--coral-deep));
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.5),
    inset 0 -4px 0 rgba(154, 65, 45, 0.14),
    0 7px 14px rgba(118, 68, 34, 0.14);
  text-shadow: 0 2px 0 rgba(122, 67, 31, 0.2);
}

.reward-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.primary-action {
  display: inline-flex;
  width: min(88%, 340px);
  min-height: 62px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 14px auto 0;
  border: 4px solid rgba(255, 255, 255, 0.78);
  border-radius: 28px;
  font-size: 1.48rem;
  font-weight: 1000;
}

.restore-box {
  padding: 10px 14px;
  margin-bottom: 12px;
}

.restore-box summary {
  color: var(--ink);
  cursor: pointer;
  font-weight: 1000;
}

.hidden-task-list {
  display: grid;
  gap: 9px;
  margin-top: 10px;
}

.hidden-task-actions,
.pending-actions,
.reward-actions {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.restore-button {
  color: #fff;
  background: linear-gradient(180deg, #94b3ef, #607fc7);
}

.permanent-delete-button {
  color: #fff;
  background: linear-gradient(180deg, #f0a0a8, #d56e78);
}

.add-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px 74px 46px;
  gap: 8px;
  padding: 12px;
  margin-top: 12px;
}

.reward-form {
  grid-template-columns: minmax(0, 1fr) 90px 48px;
}

.add-form label,
.profile-name,
.witness-box label {
  display: grid;
  gap: 5px;
}

.add-form label span,
.profile-name span,
.witness-box label span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  border: 2px solid rgba(199, 145, 78, 0.28);
  border-radius: 15px;
  color: var(--ink-deep);
  background: rgba(255, 253, 244, 0.9);
  outline: 0;
  box-shadow: inset 0 2px 4px rgba(128, 83, 38, 0.06);
  font-weight: 800;
}

input,
select {
  height: 43px;
  padding: 0 10px;
}

textarea {
  min-height: 96px;
  resize: vertical;
  padding: 12px;
  line-height: 1.5;
}

.add-form button[type="submit"] {
  align-self: end;
  display: grid;
  height: 43px;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(180deg, #ffb176, #ff8648);
  box-shadow: inset 0 -3px 0 rgba(150, 76, 30, 0.16), 0 6px 12px rgba(111, 72, 33, 0.1);
}

.wallet-card {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.wallet-card strong {
  display: block;
  color: #d8613c;
  font-size: 2.8rem;
  line-height: 1;
  text-shadow: 0 3px 0 rgba(255, 255, 255, 0.78);
}

.wallet-convert {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.wallet-convert span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 247, 225, 0.74);
  font-weight: 900;
}

.wallet-progress {
  grid-column: 1 / -1;
  margin-top: 0;
}

.wallet-card p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.profile-card {
  display: grid;
  gap: 12px;
}

.profile-name input {
  font-size: 1rem;
}

.level-block {
  padding: 12px;
  border: 2px dashed rgba(191, 129, 64, 0.24);
  border-radius: 20px;
  background: rgba(255, 251, 239, 0.68);
}

.level-block p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 900;
}

.profile-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.profile-metrics div {
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 248, 229, 0.8);
}

.profile-metrics strong {
  display: block;
  margin-top: 4px;
  color: #d8613c;
  font-size: 1.08rem;
}

.calendar-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}

.day-chip {
  display: grid;
  min-height: 48px;
  place-items: center;
  border: 2px solid rgba(210, 164, 101, 0.26);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255, 250, 235, 0.68);
  font-weight: 900;
}

.day-chip small {
  font-size: 0.68rem;
}

.day-chip span {
  color: rgba(126, 87, 48, 0.48);
}

.day-chip.is-active {
  color: #fff;
  background: linear-gradient(180deg, #ffad96, #f06d57);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.36);
}

.day-chip.is-active span {
  color: #fff5c8;
}

.history-item {
  min-height: 60px;
}

.history-points {
  color: #76a936;
  font-size: 1.2rem;
}

.history-points.is-spent {
  color: var(--coral);
}

.category-guide {
  display: grid;
  gap: 8px;
}

.category-card {
  padding: 11px;
}

.category-card span {
  color: var(--ink-deep);
  font-weight: 1000;
}

.category-card strong {
  display: block;
  margin-top: 4px;
  color: #d8613c;
}

.category-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
  font-weight: 800;
}

.data-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.data-actions button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(255, 249, 230, 0.94), rgba(255, 230, 188, 0.88));
  box-shadow: 0 5px 10px rgba(108, 69, 33, 0.08);
  font-size: 0.82rem;
  font-weight: 1000;
}

.file-input {
  display: none;
}

.bottom-tabs {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  min-height: 78px;
  margin: 8px 0 0;
  padding: 8px;
  border-radius: 30px;
  z-index: 6;
}

.tab-button {
  display: grid;
  place-items: center;
  gap: 3px;
  min-width: 0;
  border-radius: 22px;
  color: var(--ink);
  background: transparent;
  font-size: 0.82rem;
  font-weight: 1000;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.tab-button .icon {
  width: 1.7rem;
  height: 1.7rem;
  color: #e88945;
}

.tab-button.is-active {
  background:
    radial-gradient(circle at 34% 20%, rgba(255, 255, 255, 0.85), transparent 34%),
    linear-gradient(180deg, #fffdf2, #ffe9c4);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.76), 0 7px 14px rgba(114, 72, 34, 0.1);
  transform: translateY(-8px);
}

.empty-state {
  display: grid;
  min-height: 78px;
  place-items: center;
  border: 2px dashed rgba(188, 132, 68, 0.24);
  border-radius: 20px;
  color: var(--muted);
  background: rgba(255, 249, 232, 0.66);
  font-weight: 900;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 20;
  max-width: min(420px, calc(100% - 32px));
  padding: 13px 18px;
  border: 3px solid rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  color: #fffdf3;
  background: linear-gradient(180deg, #8dafee, #637fc7);
  box-shadow: var(--shadow);
  font-weight: 1000;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.sparkle-burst,
.celebration-burst {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 10;
}

.sparkle-burst span,
.celebration-burst i {
  position: absolute;
  left: 0;
  top: 0;
  color: var(--sun);
  font-style: normal;
  font-weight: 1000;
  animation: sparkleOut 0.82s ease-out var(--delay) both;
}

.celebration-burst i {
  width: 8px;
  height: 14px;
  border-radius: 4px;
  background: var(--tone);
}

.is-ringing {
  animation: ring 0.62s ease both;
}

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

@keyframes sparkleOut {
  0% {
    opacity: 0;
    transform: rotate(var(--angle)) translate(0) scale(0.6);
  }
  12% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: rotate(var(--angle)) translate(var(--distance)) scale(1.1);
  }
}

@keyframes ring {
  0%,
  100% {
    transform: rotate(0);
  }
  25% {
    transform: rotate(-8deg) scale(1.03);
  }
  55% {
    transform: rotate(7deg) scale(1.03);
  }
}

@media (max-width: 1120px) {
  .storybook-stage {
    grid-template-columns: minmax(0, 1fr);
    width: min(560px, calc(100% - 24px));
    padding: 12px 0;
  }

  .storybook-stage::before,
  .storybook-stage::after {
    display: none;
  }

  .rail {
    display: none;
  }

  .phone-frame {
    height: auto;
    min-height: 100dvh;
  }
}

@media (max-width: 560px) {
  .storybook-stage {
    width: 100%;
    padding: 0;
  }

  .phone-shell {
    filter: none;
  }

  .phone-frame {
    min-height: 100dvh;
    padding: 12px 10px 10px;
    border-width: 0;
    border-radius: 0;
  }

  .phone-status {
    padding: 0 14px;
  }

  .park-hero {
    min-height: 188px;
    padding: 12px 110px 12px 14px;
    border-radius: 28px 28px 20px 20px;
  }

  .wood-sign {
    font-size: 1.08rem;
    padding: 8px 16px 10px;
  }

  .park-hero h1 {
    min-width: 176px;
    min-height: 54px;
    font-size: 1.76rem;
    padding: 8px 18px 10px;
  }

  .hero-video-frame {
    width: 118px;
    height: 138px;
  }

  .hero-speech {
    max-width: 210px;
    font-size: 0.78rem;
  }

  .app-view {
    padding: 0 2px 8px;
  }

  .daily-summary {
    grid-template-columns: 78px 1fr;
    min-height: 114px;
    padding: 14px;
  }

  .summary-star,
  .wallet-badge {
    width: 66px;
    height: 66px;
    font-size: 2.75rem;
  }

  .summary-copy strong {
    font-size: 2.75rem;
  }

  .summary-copy small {
    font-size: 1.78rem;
  }

  .task-card {
    grid-template-columns: 58px minmax(0, 1fr) 36px;
    min-height: 66px;
  }

  .task-check {
    width: 50px;
    height: 50px;
  }

  .add-form,
  .achievement-form {
    grid-template-columns: minmax(0, 1fr) 96px 66px 44px;
    gap: 7px;
  }

  .reward-form {
    grid-template-columns: minmax(0, 1fr) 82px 44px;
  }

  .panel {
    padding: 14px;
  }

  .bottom-tabs {
    min-height: 74px;
    margin-top: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
