@font-face {
  font-family: "Pretendard";
  src: url("assets/PretendardVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --page: #f7f1e8;
  --page-deep: #f1e9dd;
  --card: #fffdf9;
  --card-soft: #fbf5ed;
  --ink: #2f382d;
  --ink-soft: #596052;
  --muted: #62695d;
  --line: #e5ded3;
  --line-strong: #d7cfc1;
  --moss: #3f583d;
  --moss-deep: #304631;
  --moss-pale: #e4ebdd;
  --clay: #a75f43;
  --clay-soft: #f2d7c5;
  --peach: #edc098;
  --sun: #f5dfb6;
  --cream: #fff8ea;
  --white: #ffffff;
  --shadow-card: 0 24px 60px rgba(83, 64, 44, .08), 0 3px 9px rgba(83, 64, 44, .04);
  --shadow-float: 0 22px 45px rgba(69, 55, 39, .18);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 11px;
  --ease: cubic-bezier(.2, .72, .2, 1);
  --focus: #9a4e2d;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% -5%, rgba(241, 203, 158, .22), transparent 29rem),
    radial-gradient(circle at 90% 18%, rgba(215, 227, 202, .28), transparent 26rem),
    var(--page);
  color: var(--ink);
  font: 400 16px/1.55 "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
  letter-spacing: -.015em;
  word-break: keep-all;
}

button,
a,
input,
textarea {
  font: inherit;
  touch-action: manipulation;
}

button {
  border: 0;
  color: inherit;
  cursor: pointer;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

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

svg {
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

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

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  width: min(100% - 64px, 1008px);
  min-height: 82px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  gap: 10px;
  flex: 0 1 auto;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 12px;
  background: var(--moss);
  color: var(--cream);
  box-shadow: 0 8px 18px rgba(62, 88, 61, .2);
}

.brand-mark svg {
  width: 21px;
  height: 21px;
}

.brand-name {
  color: var(--moss-deep);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.07em;
}

.motion-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 113px;
  min-height: 44px;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(255, 253, 249, .72);
  color: var(--moss-deep);
  font-size: 12px;
  font-weight: 750;
  transition: background-color .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}

.motion-toggle svg {
  width: 17px;
  height: 17px;
}

.motion-toggle[aria-pressed="false"] {
  color: var(--muted);
  background: transparent;
}

.motion-toggle:hover {
  border-color: var(--moss);
  transform: translateY(-1px);
}

.app-main {
  width: min(100% - 64px, 1008px);
  margin: 0 auto;
  padding: 26px 0 38px;
}

.experience-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
  align-items: start;
  gap: 28px;
}

.stage-card,
.control-panel {
  min-width: 0;
  border: 1px solid rgba(215, 207, 193, .84);
  background: rgba(255, 253, 249, .78);
  box-shadow: var(--shadow-card);
}

.stage-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
}

.world {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  overflow: hidden;
  isolation: isolate;
  border-radius: 25px;
  background-color: #edc89f;
  background-image:
    linear-gradient(180deg, rgba(254, 245, 225, .14), rgba(128, 86, 55, .08)),
    url("assets/room.webp");
  background-position: center;
  background-size: cover;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .34), 0 13px 31px rgba(93, 68, 44, .14);
}

.world::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 248, 234, .03) 35%, rgba(100, 69, 46, .16) 100%),
    radial-gradient(circle at 50% 43%, transparent 32%, rgba(73, 48, 32, .12) 100%);
}

.world::after {
  position: absolute;
  z-index: 4;
  inset: 0;
  content: "";
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, .23);
  border-radius: inherit;
}

.world-light,
.world-specks,
.world-floor {
  position: absolute;
  pointer-events: none;
}

.world-light {
  z-index: 1;
  top: -18%;
  right: -11%;
  width: 69%;
  height: 75%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 247, 218, .34), transparent 68%);
  filter: blur(1px);
}

.world-specks {
  z-index: 4;
  inset: 10% 8% auto auto;
  width: 24%;
  height: 28%;
  opacity: .42;
  background-image: radial-gradient(circle, rgba(255, 249, 221, .85) 0 1px, transparent 1.8px);
  background-size: 17px 17px;
  mask-image: linear-gradient(135deg, #000, transparent 80%);
}

.world-floor {
  z-index: 2;
  right: -10%;
  bottom: -21%;
  left: -10%;
  height: 48%;
  border-radius: 50% 50% 0 0;
  background: radial-gradient(ellipse at center, rgba(106, 67, 45, .12), transparent 68%);
  filter: blur(2px);
}

#puppy-canvas {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  pointer-events: auto;
}

#puppy-canvas[role="button"]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 5px;
  border-radius: 14px;
}

.asset-status {
  position: absolute;
  z-index: 8;
  right: 16px;
  bottom: 16px;
  min-height: 31px;
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, .48);
  border-radius: 999px;
  background: rgba(50, 42, 32, .42);
  color: var(--white);
  font-size: 11px;
  font-weight: 650;
  backdrop-filter: blur(7px);
}

.retry-assets {
  position: absolute;
  z-index: 8;
  right: 16px;
  bottom: 56px;
  min-height: 44px;
  padding: 8px 13px;
  border-radius: 12px;
  background: var(--cream);
  color: var(--moss-deep);
  font-size: 12px;
  font-weight: 750;
}

.control-panel {
  width: 100%;
  max-width: 340px;
  justify-self: end;
  padding: 21px 20px 20px;
  border-radius: var(--radius-xl);
}

.timer-card-heading,
.walk-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  margin-top: 17px;
  padding: 4px;
  border-radius: 14px;
  background: #f1ede5;
}

.mode-tab {
  min-width: 0;
  min-height: 44px;
  padding: 8px 5px;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  transition: background-color .18s var(--ease), color .18s var(--ease), transform .18s var(--ease);
}

.mode-tab:hover {
  color: var(--moss-deep);
}

.mode-tab.is-active,
.mode-tab[aria-selected="true"] {
  background: var(--card);
  color: var(--moss-deep);
  box-shadow: 0 4px 12px rgba(80, 61, 38, .09);
}

.mode-tab:active {
  transform: scale(.98);
}

.timer-card {
  margin-top: 16px;
  padding: 18px 17px 16px;
  border: 1px solid #ece3d7;
  border-radius: 18px;
  background: linear-gradient(145deg, #fffdf9, #fcf5eb);
}

.timer-card-heading > span:first-child {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.time-display {
  margin-top: 4px;
  color: var(--moss-deep);
  font-size: clamp(3.75rem, 6.6vw, 5rem);
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  letter-spacing: -.085em;
  line-height: 1.02;
  white-space: nowrap;
}

.time-display[data-long="true"] {
  font-size: clamp(3rem, 5.2vw, 4.2rem);
  letter-spacing: -.1em;
}

.timer-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 17px;
}

.timer-field {
  display: grid;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 750;
}

.timer-field-control {
  position: relative;
  display: flex;
  align-items: center;
}

.timer-field-control input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px 29px 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--white);
  color: var(--ink);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  line-height: 1;
}

.timer-field-control input:disabled {
  cursor: not-allowed;
  border-color: var(--line);
  background: #f1ede5;
  color: var(--muted);
  opacity: .62;
}

.timer-field-control > span {
  position: absolute;
  right: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  pointer-events: none;
}

.settings-error {
  margin-top: 8px;
  color: var(--clay);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}

.action-stack {
  margin-top: 16px;
}

.primary-action,
.secondary-action,
.gift-use,
.step-action,
.back-action,
.skip-action {
  min-height: 44px;
  border-radius: 13px;
  font-size: 12px;
  font-weight: 750;
  transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease);
}

.primary-action {
  position: relative;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
  padding: 10px 16px;
  background: var(--moss);
  color: var(--cream);
  box-shadow: 0 10px 20px rgba(62, 88, 61, .2);
}

.primary-action::after {
  position: absolute;
  top: -80%;
  left: -32%;
  width: 28%;
  height: 260%;
  background: rgba(255, 255, 255, .17);
  content: "";
  transform: rotate(25deg);
  transition: left .65s var(--ease);
}

.primary-action:hover {
  background: var(--moss-deep);
  box-shadow: 0 13px 25px rgba(62, 88, 61, .25);
  transform: translateY(-1px);
}

.primary-action:hover::after {
  left: 118%;
}

.primary-action:active,
.secondary-action:active,
.gift-use:active,
.step-action:active {
  transform: translateY(1px) scale(.99);
}

.primary-action svg {
  width: 17px;
  height: 17px;
}

.action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.secondary-action {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 7px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 253, 249, .82);
  color: var(--ink-soft);
}

.secondary-action:hover {
  border-color: var(--moss);
  color: var(--moss-deep);
  background: var(--moss-pale);
}

.secondary-action svg {
  width: 15px;
  height: 15px;
}

.skip-action {
  width: 100%;
  margin-top: 8px;
  padding: 7px 12px;
  background: transparent;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 11px;
}

.gift-panel,
.walk-progress {
  margin-top: 14px;
  padding: 15px;
  border: 1px solid rgba(198, 137, 99, .35);
  border-radius: 17px;
  background: linear-gradient(145deg, #fff6e8, #f8e2cc);
}

.gift-panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gift-icon {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 11px;
  background: rgba(167, 95, 67, .14);
  color: var(--clay);
}

.gift-icon svg {
  width: 19px;
  height: 19px;
}

.gift-panel h3 {
  margin-top: 3px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 760;
  letter-spacing: -.045em;
}

.gift-use {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  margin-top: 11px;
  padding: 8px 11px;
  background: var(--clay);
  color: var(--cream);
}

.gift-use:hover {
  background: #925139;
  box-shadow: 0 7px 15px rgba(167, 95, 67, .18);
}

.gift-use svg {
  width: 16px;
  height: 16px;
}

.gift-use .button-arrow {
  width: 15px;
  height: 15px;
  margin-left: auto;
}

.walk-progress {
  border-color: rgba(62, 88, 61, .22);
  background: linear-gradient(145deg, #f3f6e9, #e7eddd);
}

.walk-progress-head {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.walk-progress-head strong {
  color: var(--moss);
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.walk-track {
  height: 8px;
  margin-top: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(63, 88, 61, .14);
}

.walk-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--moss);
  transition: width .32s var(--ease);
}

.step-action {
  width: 100%;
  min-height: 80px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
  padding: 16px 20px;
  background: var(--moss);
  color: var(--cream);
  font-size: 20px;
}

.step-action svg {
  width: 24px;
  height: 24px;
}

.back-action {
  width: 100%;
  margin-top: 8px;
  padding: 7px 12px;
  background: transparent;
  color: var(--moss);
  font-size: 11px;
}

.mobile-options {
  display: none;
}

.mobile-nav,
.mobile-ad,
.pet-prompt {
  display: none;
}

@media (max-width: 980px) {
  .topbar,
  .app-main {
    width: min(100% - 48px, 760px);
  }

  .topbar {
    gap: 16px;
  }

  .app-main {
    padding-top: 20px;
  }

  .experience-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .stage-card {
    width: 100%;
  }

  .control-panel {
    width: 100%;
    max-width: none;
    justify-self: stretch;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    column-gap: 16px;
    align-items: start;
  }

  .control-panel > .mode-tabs,
  .control-panel > .action-stack,
  .control-panel > .gift-panel,
  .control-panel > .walk-progress,
  .control-panel > .back-action {
    grid-column: 1 / -1;
  }

  .timer-card {
    margin-top: 12px;
  }

  .timer-card {
    grid-column: 1 / -1;
  }

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

@media (max-width: 620px) {
  .topbar {
    display: none;
  }

  .app-main {
    width: 100%;
    padding: 0;
  }

  .experience-grid {
    display: block;
  }

  .stage-card {
    position: relative;
    width: 100%;
    height: 66.667vh;
    height: 66.667svh;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .world {
    position: absolute;
    top: 0;
    left: 50%;
    width: max(100vw, 66.667vh);
    width: max(100vw, 66.667svh);
    height: max(100vw, 66.667vh);
    height: max(100vw, 66.667svh);
    margin: 0;
    overflow: hidden;
    border-radius: 0;
    box-shadow: none;
    transform: translateX(-50%);
  }

  .world::after {
    border: 0;
  }

  .control-panel {
    width: 100%;
    max-width: none;
    height: 33.333vh;
    height: 33.333svh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-self: stretch;
    padding: 10px 16px 12px;
    border: 0;
    border-radius: 0;
    background: var(--page);
    box-shadow: none;
  }

  .control-panel > .timer-card {
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0;
    padding: 0 0 6px;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .control-panel > .timer-card .timer-settings,
  .control-panel > .timer-card .settings-error,
  .control-panel > .mode-tabs,
  .control-panel > .gift-panel,
  .control-panel > .walk-progress,
  .control-panel > .action-stack > .action-row {
    display: none;
  }

  .timer-card-heading > span:first-child {
    font-size: 12px;
  }

  .time-display {
    margin-top: 2px;
    font-size: clamp(64px, 12vh, 108px);
    font-size: clamp(64px, 12svh, 108px);
    letter-spacing: -.09em;
    line-height: .94;
  }

  .time-display[data-long="true"] {
    font-size: clamp(48px, 10vh, 84px);
    font-size: clamp(48px, 10svh, 84px);
    letter-spacing: -.1em;
  }

  .action-stack {
    width: 100%;
    min-height: 48px;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
  }

  .action-stack > .primary-action,
  .action-stack > #break-action {
    width: auto;
    min-width: 0;
    min-height: 48px;
    flex: 1 1 0;
  }

  .action-stack > .mobile-options {
    width: 48px;
    min-width: 48px;
    min-height: 48px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 48px;
    padding: 8px;
    border: 1px solid var(--line-strong);
    border-radius: 13px;
    background: var(--card);
    color: var(--moss-deep);
  }

  .mobile-options svg {
    width: 20px;
    height: 20px;
  }

  .action-stack > .skip-action {
    width: 100%;
    min-height: 44px;
    flex: 0 0 100%;
    margin-top: 0;
  }

  .action-stack > .step-action,
  .action-stack > .back-action {
    width: auto;
    min-width: 0;
    min-height: 48px;
    flex: 1 1 0;
    margin-top: 0;
  }

  .control-panel[data-has-primary="true"] #back-action {
    display: none !important;
  }

  .mobile-sheet {
    position: fixed;
    width: 100%;
    max-width: none;
    max-height: 85vh;
    max-height: 85svh;
    margin: 0;
    padding: 0;
    inset: auto 0 0;
    overflow: hidden;
    border: 0;
    border-radius: 24px 24px 0 0;
    background: var(--card);
    color: var(--ink);
    box-shadow: 0 -20px 50px rgba(61, 47, 34, .2);
  }

  .mobile-sheet::backdrop {
    background: rgba(31, 28, 24, .2);
  }

  .mobile-sheet-heading {
    position: sticky;
    z-index: 2;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 68px;
    padding: 12px 16px 10px;
    border-bottom: 1px solid var(--line);
    background: var(--card);
  }

  .mobile-sheet-heading h2 {
    color: var(--moss-deep);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.06em;
  }

  .mobile-sheet-close {
    width: 44px;
    min-width: 44px;
    height: 44px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: var(--card-soft);
    color: var(--ink-soft);
  }

  .mobile-sheet-close svg {
    width: 18px;
    height: 18px;
  }

  .mobile-sheet-content {
    max-height: calc(85vh - 68px);
    max-height: calc(85svh - 68px);
    display: grid;
    gap: 12px;
    padding: 14px 16px 22px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .mobile-sheet-content > .timer-settings {
    margin-top: 0;
  }

  .mobile-sheet-content .timer-field {
    font-size: 16px;
  }

  .mobile-sheet-content .timer-field-control input {
    font-size: 16px;
  }

  .mobile-sheet-content > .settings-error {
    margin-top: -4px;
  }

  .mobile-sheet-content > .gift-panel,
  .mobile-sheet-content > .walk-progress,
  .mobile-sheet-content > .action-row {
    margin-top: 0;
  }

  .mobile-sheet-content > .action-row {
    display: grid;
  }

  .mobile-sheet-content > .motion-toggle {
    width: 100%;
    min-width: 0;
    justify-content: space-between;
  }

  .mobile-sheet-content > .motion-toggle span {
    display: inline;
  }
}

@media (max-width: 620px) {
  .app-shell {
    --mobile-safe-top: env(safe-area-inset-top, 0px);
    --mobile-safe-bottom: env(safe-area-inset-bottom, 0px);
    --mobile-ad-space: 0px;
  }

  .app-shell[data-view="pet"],
  .app-shell[data-view="walk"] {
    --mobile-ad-space: calc(44px + var(--mobile-safe-bottom));
  }

  .mobile-nav {
    position: fixed;
    z-index: 30;
    top: 0;
    right: 0;
    left: 0;
    height: calc(56px + var(--mobile-safe-top));
    display: block;
    padding: var(--mobile-safe-top) 12px 0;
    border-bottom: 1px solid var(--line);
    background: rgba(247, 241, 232, .96);
    backdrop-filter: blur(12px);
  }

  .mobile-nav .mode-tabs {
    width: 100%;
    height: 56px;
    margin: 0;
    padding: 4px;
    border-radius: 13px;
    background: #f1ede5;
  }

  .mobile-nav .mode-tab {
    min-height: 48px;
    font-size: 13px;
  }

  .mobile-ad {
    position: fixed;
    z-index: 30;
    right: 0;
    bottom: 0;
    left: 0;
    height: calc(44px + var(--mobile-safe-bottom));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px var(--mobile-safe-bottom);
    border-top: 1px solid var(--line);
    background: rgba(247, 241, 232, .97);
    color: var(--muted);
    pointer-events: none;
  }

  .app-shell[data-view="focus"] .mobile-ad,
  .mobile-ad[hidden] {
    display: none;
  }

  .mobile-ad span {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .02em;
  }

  .app-main {
    --mobile-usable-height: calc(100vh - 56px - var(--mobile-safe-top) - var(--mobile-ad-space));
    --mobile-usable-height: calc(100svh - 56px - var(--mobile-safe-top) - var(--mobile-ad-space));
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    padding: calc(56px + var(--mobile-safe-top)) 0 var(--mobile-ad-space);
  }

  .experience-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 2fr) minmax(0, 1fr);
    width: 100%;
    height: var(--mobile-usable-height);
    min-height: var(--mobile-usable-height);
    gap: 0;
  }

  .stage-card {
    grid-row: 1;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .world {
    top: 50%;
    left: 50%;
    --scene-size: max(100vw, calc(var(--mobile-usable-height) * 2 / 3));
    width: var(--scene-size);
    height: var(--scene-size);
    transform: translate(-50%, -50%);
  }

  .control-panel {
    grid-row: 2;
    align-items: stretch;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 6px 12px 8px;
  }

  .control-panel > .timer-card {
    flex: 1 1 auto;
    min-height: 0;
    align-items: center;
    text-align: center;
  }

  .asset-status,
  .retry-assets {
    right: max(16px, calc((100% - 100vw) / 2 + 16px));
  }

  .stage-card:has(#puppy-canvas:focus-visible) {
    outline: 3px solid var(--focus);
    outline-offset: -3px;
  }

  .control-panel[data-view="pet"] > .timer-card,
  .control-panel[data-view="walk"] > .timer-card {
    display: none;
  }

  .pet-prompt {
    display: none;
  }

  .control-panel[data-view="pet"] > .pet-prompt {
    min-height: 0;
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    color: var(--ink-soft);
    font-size: 15px;
    font-weight: 750;
    text-align: center;
  }

  .control-panel[data-view="pet"] .action-stack {
    display: none;
  }

  .control-panel[data-view="walk"] {
    justify-content: center;
  }

  .control-panel[data-view="walk"] .mobile-options {
    display: none;
  }

  .control-panel[data-view="focus"] .action-stack > .step-action,
  .control-panel[data-view="focus"] .action-stack > .back-action,
  .control-panel[data-view="pet"] .action-stack > .primary-action,
  .control-panel[data-view="pet"] .action-stack > #break-action,
  .control-panel[data-view="pet"] .action-stack > .skip-action,
  .control-panel[data-view="pet"] .action-stack > .step-action,
  .control-panel[data-view="pet"] .action-stack > .back-action,
  .control-panel[data-view="walk"] .action-stack > .primary-action,
  .control-panel[data-view="walk"] .action-stack > #break-action,
  .control-panel[data-view="walk"] .action-stack > .skip-action,
  .control-panel[data-view="walk"] .action-stack > .back-action {
    display: none;
  }

  .control-panel[data-view="pet"] #back-action,
  .control-panel[data-view="walk"] #back-action {
    display: none !important;
  }

  .control-panel[data-view="walk"] .action-stack > .step-action {
    min-height: 80px;
    flex: 1 1 auto;
    margin-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Reward controls share the existing moss, cream, and restrained type scale. */
.settings-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}
.reset-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 44px;
  padding: 8px;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}
.reset-action svg { width: 15px; height: 15px; }
.settings-tools + .timer-settings { margin-top: 4px; }
.pet-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px 0;
  text-align: center;
}
.pet-panel .pet-prompt { display: block; font-size: 17px; font-weight: 750; }
.coupon-count, .pet-hint { color: var(--muted); font-size: 12px; }
.pet-panel .primary-action { width: min(100%, 260px); margin-top: 4px; }
.pet-remaining { color: var(--moss-deep); font-size: 36px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.reward-note { margin-top: 8px; color: var(--clay); font-size: 12px; font-weight: 700; text-align: center; }
.storage-notice { margin: 8px 0; color: var(--clay); font-size: 12px; }
.storage-notice button { min-height: 44px; background: transparent; text-decoration: underline; }
.control-panel[data-view="pet"] > .timer-card,
.control-panel[data-view="walk"] > .timer-card { display: none; }
.walk-progress-head { flex-direction: column; justify-content: center; gap: 8px; }
.walk-progress-head strong { font-size: 18px; }
@media (max-width: 980px) {
  .pet-panel, .reward-note, .storage-notice { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .control-panel > .timer-card .settings-tools { display: none; }
  .mobile-sheet-heading { justify-content: flex-start; gap: 4px; }
  .mobile-sheet-heading .reset-action { margin-left: 4px; }
  .mobile-sheet-heading .mobile-sheet-close { margin-left: auto; }
  .pet-panel { flex: 1 1 auto; min-height: 0; padding: 4px 8px; gap: 4px; }
  .pet-panel .pet-prompt { font-size: 16px; }
  .pet-panel .primary-action { min-height: 44px; }
  .pet-hint { font-size: 11px; }
  .control-panel[data-view="walk"] > .walk-progress {
    display: flex; flex-direction: column; justify-content: center;
    flex: 1 1 auto; margin: 0; padding: 0; border: 0; background: transparent;
  }
  .control-panel[data-view="walk"] .action-stack { order: 1; margin-top: auto; }
  .control-panel > .reward-note { order: -1; margin: 0; }
  .storage-notice { flex: 0 0 auto; }
}
