:root {
  --cream: oklch(0.97 0.035 91);
  --paper: oklch(0.99 0.016 91);
  --ink: oklch(0.36 0.09 275);
  --ink-soft: oklch(0.52 0.07 275);
  --coral: oklch(0.7 0.19 31);
  --coral-deep: oklch(0.53 0.17 31);
  --yellow: oklch(0.87 0.15 91);
  --mint: oklch(0.78 0.11 164);
  --mint-deep: oklch(0.52 0.11 164);
  --sky: oklch(0.79 0.11 232);
  --lavender: oklch(0.76 0.11 301);
  --line: oklch(0.83 0.035 91);
  --shadow: oklch(0.32 0.07 275 / 0.17);
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  color: var(--ink);
  background: var(--cream);
  font-family: "Avenir Next Rounded", "Trebuchet MS", sans-serif;
  font-synthesis: none;
  -webkit-tap-highlight-color: transparent;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 320px;
  min-height: 100%;
  overscroll-behavior: none;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 12%, oklch(0.9 0.08 91) 0 5%, transparent 5.2%),
    radial-gradient(circle at 93% 80%, oklch(0.89 0.07 164) 0 7%, transparent 7.2%),
    var(--cream);
  user-select: none;
  -webkit-user-select: none;
}

button {
  font: inherit;
  touch-action: manipulation;
}

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

.parent-playland-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.75rem;
  padding: 0.65rem 0.9rem;
  color: var(--ink);
  background: color-mix(in oklch, var(--paper) 92%, transparent);
  border: 2px solid var(--line);
  border-radius: 999px;
  font-weight: 900;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.parent-playland-link:focus-visible {
  outline: 4px solid var(--yellow);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

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

.device-shell {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.device-bar {
  z-index: 4;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: 72px;
  padding:
    max(var(--space-sm), env(safe-area-inset-top))
    max(var(--space-lg), env(safe-area-inset-right))
    var(--space-sm)
    max(var(--space-2xl), env(safe-area-inset-left));
  background: color-mix(in oklch, var(--paper) 94%, transparent);
  box-shadow: 0 1px 0 var(--line);
}

.brand-mark {
  display: grid;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 15px 18px 13px 17px;
  color: var(--paper);
  background: var(--coral);
  transform: rotate(-2deg);
}

.brand-mark svg {
  width: 34px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.brand-copy {
  display: grid;
  gap: 0;
  line-height: 0.95;
}

.brand-copy span {
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brand-copy strong {
  font-family: "Chalkboard SE", "Comic Sans MS", "Marker Felt", cursive;
  font-size: 1.24rem;
}

.connection-pill {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: 38px;
  margin-left: auto;
  padding: var(--space-xs) var(--space-sm);
  border: 2px solid color-mix(in oklch, var(--mint-deep) 30%, var(--paper));
  border-radius: 999px;
  color: var(--mint-deep);
  background: color-mix(in oklch, var(--mint) 20%, var(--paper));
  font-size: 0.76rem;
  font-weight: 900;
}

.connection-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px color-mix(in oklch, currentColor 15%, transparent);
}

.connection-pill.is-waiting {
  color: var(--coral-deep);
  border-color: color-mix(in oklch, var(--coral) 25%, var(--paper));
  background: color-mix(in oklch, var(--yellow) 22%, var(--paper));
}

.device-layout {
  display: grid;
  min-height: 0;
}

.app-dock {
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-row: 2;
  gap: var(--space-2xs);
  padding:
    var(--space-xs)
    max(var(--space-sm), env(safe-area-inset-right))
    max(var(--space-xs), env(safe-area-inset-bottom))
    max(var(--space-sm), env(safe-area-inset-left));
  background: var(--paper);
  box-shadow: 0 -4px 20px var(--shadow);
}

.dock-button {
  display: grid;
  min-width: 0;
  min-height: 68px;
  place-items: center;
  align-content: center;
  gap: var(--space-2xs);
  padding: var(--space-2xs);
  border: 0;
  border-radius: 18px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 0.72rem;
  font-weight: 900;
  transition: color 180ms ease-out, transform 180ms ease-out, background-color 180ms ease-out;
}

.dock-button:active {
  transform: scale(0.92);
}

.dock-button.is-active {
  color: var(--ink);
  background: color-mix(in oklch, var(--yellow) 31%, var(--paper));
}

.dock-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 13px 15px 12px 14px;
  color: var(--paper);
}

.dock-icon svg {
  width: 27px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3.2;
}

.dock-icon--mail {
  background: var(--coral);
  transform: rotate(-2deg);
}

.dock-icon--browser {
  background: var(--sky);
  transform: rotate(2deg);
}

.dock-icon--camera {
  background: var(--mint-deep);
  transform: rotate(-1deg);
}

.dock-icon--photos {
  background: var(--lavender);
  transform: rotate(2deg);
}

.screens {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.app-screen {
  height: 100%;
  padding: var(--space-lg);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.screen-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-md);
  max-width: 1180px;
  margin: 0 auto var(--space-lg);
}

.screen-heading--compact {
  margin-bottom: var(--space-md);
}

.eyebrow {
  margin: 0 0 var(--space-2xs);
  color: var(--coral-deep);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.screen-heading h1 {
  margin: 0;
  color: var(--ink);
  font-family: "Chalkboard SE", "Comic Sans MS", "Marker Felt", cursive;
  font-size: clamp(1.65rem, 5.8vw, 2.5rem);
  line-height: 1.05;
}

.mail-stamp,
.photo-count,
.privacy-chip {
  flex: 0 0 auto;
  border-radius: 999px;
  font-weight: 900;
}

.mail-stamp {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 3px dotted var(--coral-deep);
  color: var(--coral-deep);
  background: color-mix(in oklch, var(--coral) 14%, var(--paper));
  font-size: 1.25rem;
  transform: rotate(5deg);
}

.photo-count,
.privacy-chip {
  padding: var(--space-xs) var(--space-sm);
  color: var(--ink);
  background: color-mix(in oklch, var(--yellow) 45%, var(--paper));
  font-size: 0.76rem;
}

.mail-layout {
  display: grid;
  gap: var(--space-lg);
  max-width: 1180px;
  margin: 0 auto;
}

.mail-list {
  display: grid;
  gap: var(--space-sm);
}

.mail-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-sm);
  min-height: 80px;
  padding: var(--space-sm);
  border: 2px solid var(--line);
  border-radius: 22px 18px 24px 17px;
  color: var(--ink);
  background: var(--paper);
  text-align: left;
  box-shadow: 0 5px 0 color-mix(in oklch, var(--line) 70%, transparent);
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1), border-color 180ms ease-out;
}

.mail-card:nth-child(even) {
  border-radius: 18px 24px 17px 22px;
}

.mail-card:active {
  transform: translateY(3px) scale(0.985);
}

.mail-card.is-selected {
  border-color: var(--coral);
  box-shadow: 0 5px 0 color-mix(in oklch, var(--coral) 35%, transparent);
}

.sender-picture {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 18px 21px 16px 20px;
  color: var(--ink);
  font-family: "Chalkboard SE", "Comic Sans MS", cursive;
  font-size: 1.7rem;
  font-weight: 900;
}

.sender-picture--moon {
  background: var(--yellow);
}

.sender-picture--bubble {
  background: var(--sky);
}

.sender-picture--dino {
  background: var(--mint);
}

.sender-picture--garden {
  background: var(--lavender);
}

.mail-copy {
  display: grid;
  min-width: 0;
  gap: var(--space-2xs);
}

.mail-copy strong,
.mail-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-copy strong {
  font-size: 1rem;
}

.mail-copy span {
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.new-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--coral);
}

.mail-card.was-opened .new-dot {
  background: var(--line);
}

.message-paper {
  position: relative;
  min-height: 360px;
  padding: var(--space-lg);
  overflow: hidden;
  border: 2px solid color-mix(in oklch, var(--yellow) 55%, var(--line));
  border-radius: 28px 24px 32px 22px;
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0 31px,
      color-mix(in oklch, var(--sky) 13%, transparent) 31px 32px
    ),
    var(--paper);
  box-shadow: 0 10px 0 color-mix(in oklch, var(--yellow) 25%, transparent);
}

.message-paper::after {
  position: absolute;
  right: -20px;
  bottom: -22px;
  width: 90px;
  height: 90px;
  border-radius: 48% 52% 43% 57%;
  background: color-mix(in oklch, var(--yellow) 34%, transparent);
  content: "";
  transform: rotate(12deg);
}

.letter-art {
  position: relative;
  height: 122px;
  margin-bottom: var(--space-lg);
  overflow: hidden;
  border-radius: 22px 18px 25px 19px;
}

.letter-art--moon {
  background: var(--ink);
}

.letter-art--bubble {
  background: var(--sky);
}

.letter-art--dino {
  background: color-mix(in oklch, var(--mint) 65%, var(--paper));
}

.letter-art--garden {
  background: color-mix(in oklch, var(--lavender) 65%, var(--paper));
}

.art-moon {
  position: absolute;
  top: 20px;
  left: 24px;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 18px -8px 0 var(--ink);
}

.art-cloud {
  position: absolute;
  right: 36px;
  bottom: 21px;
  width: 106px;
  height: 34px;
  border-radius: 999px;
  background: var(--paper);
}

.art-cloud::before,
.art-cloud::after {
  position: absolute;
  bottom: 8px;
  border-radius: 50%;
  background: inherit;
  content: "";
}

.art-cloud::before {
  left: 18px;
  width: 46px;
  height: 46px;
}

.art-cloud::after {
  right: 13px;
  width: 34px;
  height: 34px;
}

.art-star {
  position: absolute;
  top: 14px;
  right: 32px;
  color: var(--yellow);
  font-size: 1.4rem;
  animation: star-turn 4s linear infinite;
}

.letter-shape {
  position: absolute;
  display: block;
}

.letter-from {
  margin: 0 0 var(--space-xs);
  color: var(--coral-deep);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.message-paper h2 {
  margin: 0 0 var(--space-sm);
  font-family: "Chalkboard SE", "Comic Sans MS", "Marker Felt", cursive;
  font-size: clamp(1.45rem, 5vw, 2rem);
}

.message-paper > p:not(.letter-from) {
  max-width: 48ch;
  margin: 0 0 var(--space-lg);
  font-size: 1.02rem;
  line-height: 1.55;
}

.surprise-button {
  position: relative;
  z-index: 1;
  min-height: 56px;
  padding: var(--space-sm) var(--space-lg);
  border: 0;
  border-radius: 18px 22px 17px 20px;
  color: var(--paper);
  background: var(--coral-deep);
  font-weight: 900;
  box-shadow: 0 5px 0 color-mix(in oklch, var(--coral-deep) 70%, var(--ink));
  transition: transform 150ms ease-out;
}

.surprise-button:active {
  transform: translateY(4px);
}

.surprise-place {
  position: relative;
  z-index: 1;
  min-height: 46px;
  margin-top: var(--space-md);
  color: var(--coral-deep);
  font-family: "Chalkboard SE", "Comic Sans MS", cursive;
  font-size: 1.16rem;
  font-weight: 900;
}

.toy-browser {
  display: grid;
  grid-template-rows: auto auto minmax(320px, 1fr);
  max-width: 1180px;
  min-height: calc(100% - 80px);
  margin: 0 auto;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 26px 21px 30px 24px;
  background: var(--paper);
  box-shadow: 8px 9px 0 color-mix(in oklch, var(--ink) 20%, transparent);
}

.browser-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: 58px;
  padding: var(--space-sm);
  color: var(--paper);
  background: var(--ink);
}

.window-dots {
  display: flex;
  gap: 6px;
}

.window-dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.window-dots i:nth-child(1) {
  background: var(--coral);
}

.window-dots i:nth-child(2) {
  background: var(--yellow);
}

.window-dots i:nth-child(3) {
  background: var(--mint);
}

.pretend-address {
  flex: 1;
  min-width: 0;
  padding: var(--space-xs) var(--space-sm);
  overflow: hidden;
  border-radius: 999px;
  color: var(--ink);
  background: var(--paper);
  font-size: 0.78rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-tabs {
  display: flex;
  gap: var(--space-xs);
  padding: var(--space-sm);
  overflow-x: auto;
  background: color-mix(in oklch, var(--sky) 16%, var(--paper));
  scrollbar-width: none;
}

.page-tabs::-webkit-scrollbar {
  display: none;
}

.page-tab,
.scene-button {
  min-height: 50px;
  padding: var(--space-xs) var(--space-md);
  border: 2px solid color-mix(in oklch, var(--ink) 15%, transparent);
  border-radius: 999px;
  color: var(--ink);
  background: var(--paper);
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.page-tab.is-active,
.scene-button.is-active {
  color: var(--paper);
  border-color: var(--coral-deep);
  background: var(--coral-deep);
}

.browser-page {
  position: relative;
  min-height: 320px;
  overflow: hidden;
}

.place-page {
  position: relative;
  display: grid;
  min-height: 100%;
  padding: clamp(24px, 6vw, 64px);
  overflow: hidden;
}

.place-page h2 {
  position: relative;
  z-index: 2;
  max-width: 10ch;
  margin: 0;
  font-family: "Chalkboard SE", "Comic Sans MS", "Marker Felt", cursive;
  font-size: clamp(2rem, 8vw, 4.6rem);
  line-height: 0.95;
}

.place-page p {
  position: relative;
  z-index: 2;
  align-self: end;
  max-width: 28ch;
  margin: var(--space-2xl) 0 0;
  font-size: clamp(1rem, 3vw, 1.35rem);
  font-weight: 800;
  line-height: 1.45;
}

.bubble-page {
  color: var(--ink);
  background: var(--sky);
}

.bubble {
  position: absolute;
  border: 5px solid color-mix(in oklch, var(--paper) 80%, transparent);
  border-radius: 50%;
  background: color-mix(in oklch, var(--paper) 22%, transparent);
  animation: bubble-float 5s ease-in-out infinite alternate;
}

.bubble--one {
  top: 16%;
  right: 12%;
  width: 120px;
  height: 120px;
}

.bubble--two {
  right: 34%;
  bottom: 8%;
  width: 70px;
  height: 70px;
  animation-delay: -1s;
}

.bubble--three {
  top: 8%;
  left: 52%;
  width: 42px;
  height: 42px;
  animation-delay: -2s;
}

.dino-page {
  color: var(--ink);
  background: var(--yellow);
}

.dino-sun {
  position: absolute;
  top: 18%;
  right: 10%;
  width: clamp(100px, 22vw, 200px);
  height: clamp(100px, 22vw, 200px);
  border: 12px dotted var(--coral);
  border-radius: 50%;
  background: color-mix(in oklch, var(--coral) 22%, var(--yellow));
  animation: star-turn 18s linear infinite;
}

.dino-hill {
  position: absolute;
  right: -5%;
  bottom: -42%;
  width: 70%;
  height: 74%;
  border-radius: 50% 50% 0 0;
  background: var(--mint);
}

.moon-page {
  color: var(--paper);
  background: var(--ink);
}

.moon-orb {
  position: absolute;
  top: 10%;
  right: 12%;
  width: clamp(120px, 26vw, 230px);
  height: clamp(120px, 26vw, 230px);
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 20px color-mix(in oklch, var(--yellow) 12%, transparent);
}

.moon-flower {
  position: absolute;
  right: 17%;
  bottom: 9%;
  color: var(--lavender);
  font-family: "Chalkboard SE", "Comic Sans MS", cursive;
  font-size: clamp(5rem, 19vw, 11rem);
  transform: rotate(8deg);
}

.camera-screen {
  overflow: hidden;
}

.camera-body {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: var(--space-md);
  max-width: 1180px;
  height: calc(100% - 82px);
  margin: 0 auto;
}

.camera-viewfinder {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border: 5px solid var(--ink);
  border-radius: 28px 22px 30px 24px;
  background: var(--sky);
  box-shadow: 7px 8px 0 color-mix(in oklch, var(--ink) 18%, transparent);
}

#camera-canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--paper);
  opacity: 0;
}

.camera-flash.is-flashing {
  animation: camera-flash 420ms ease-out;
}

.viewfinder-corner {
  position: absolute;
  width: 42px;
  height: 42px;
  border-top: 5px solid var(--paper);
  border-bottom: 5px solid var(--paper);
}

.viewfinder-corner--one {
  top: 18px;
  left: 18px;
  border-bottom: 0;
  border-radius: 10px 0 0;
}

.viewfinder-corner--two {
  right: 18px;
  bottom: 18px;
  border-top: 0;
  border-radius: 0 0 10px;
}

.camera-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-md);
}

.scene-picker {
  display: flex;
  gap: var(--space-xs);
  overflow-x: auto;
  scrollbar-width: none;
}

.scene-picker::-webkit-scrollbar {
  display: none;
}

.shutter-button {
  display: grid;
  width: 78px;
  height: 78px;
  padding: 8px;
  place-items: center;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  transition: transform 140ms ease-out;
}

.shutter-button span {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--coral);
}

.shutter-button:active {
  transform: scale(0.88);
}

.camera-note {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 900;
  text-align: right;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
  max-width: 1180px;
  margin: 0 auto;
  padding-bottom: var(--space-lg);
}

.photo-card {
  position: relative;
  padding: var(--space-xs) var(--space-xs) var(--space-xl);
  border: 0;
  border-radius: 12px 12px 20px 14px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 4px 6px 0 color-mix(in oklch, var(--ink) 13%, transparent);
  transform: rotate(-1deg);
}

.photo-card:nth-child(even) {
  transform: rotate(1.5deg);
}

.photo-card img {
  display: block;
  width: 100%;
  aspect-ratio: 8 / 5;
  border-radius: 8px;
  object-fit: cover;
}

.photo-card span {
  position: absolute;
  right: var(--space-sm);
  bottom: var(--space-xs);
  left: var(--space-sm);
  overflow: hidden;
  font-family: "Chalkboard SE", "Comic Sans MS", cursive;
  font-size: 0.82rem;
  font-weight: 900;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-gallery {
  display: grid;
  grid-column: 1 / -1;
  min-height: 320px;
  place-items: center;
  align-content: center;
  gap: var(--space-sm);
  color: var(--ink-soft);
  text-align: center;
}

.empty-gallery-art {
  display: grid;
  width: 120px;
  height: 102px;
  place-items: center;
  border: 6px solid var(--ink);
  border-radius: 24px 19px 27px 21px;
  color: var(--coral);
  background: var(--yellow);
  font-size: 3rem;
  transform: rotate(-3deg);
}

.empty-gallery h2 {
  margin: var(--space-xs) 0 0;
  color: var(--ink);
  font-family: "Chalkboard SE", "Comic Sans MS", cursive;
  font-size: 1.6rem;
}

.empty-gallery p {
  max-width: 28ch;
  margin: 0;
  line-height: 1.45;
}

.empty-gallery button {
  min-height: 54px;
  padding: var(--space-sm) var(--space-lg);
  border: 0;
  border-radius: 18px;
  color: var(--paper);
  background: var(--mint-deep);
  font-weight: 900;
}

.parent-dot {
  position: fixed;
  z-index: 20;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  opacity: 0.16;
  touch-action: none;
  transition: opacity 180ms ease-out, transform 180ms ease-out;
}

.parent-dot--one {
  top: max(8px, env(safe-area-inset-top));
  left: max(8px, env(safe-area-inset-left));
}

.parent-dot--two {
  right: max(8px, env(safe-area-inset-right));
  bottom: max(8px, env(safe-area-inset-bottom));
}

.parent-dot.is-held {
  opacity: 0.65;
  transform: scale(0.76);
}

.parent-panel {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: end center;
  padding: var(--space-md);
  background: color-mix(in oklch, var(--ink) 52%, transparent);
  animation: veil-in 180ms ease-out;
}

.parent-sheet {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-lg);
  width: min(100%, 680px);
  max-height: calc(100dvh - 32px);
  padding: var(--space-xl);
  overflow: auto;
  border: 3px solid var(--ink);
  border-radius: 32px 32px 16px 16px;
  background: var(--paper);
  box-shadow: 0 18px 60px var(--shadow);
  animation: sheet-in 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.parent-kicker {
  margin: 0;
  color: var(--coral-deep);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.parent-sheet h2 {
  margin: var(--space-2xs) 0 0;
  font-family: "Chalkboard SE", "Comic Sans MS", "Marker Felt", cursive;
  font-size: 2rem;
}

.round-close {
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  background: color-mix(in oklch, var(--ink) 9%, var(--paper));
  font-size: 2rem;
  line-height: 1;
}

.parent-note,
.offline-card,
.parent-actions,
.install-note,
.reset-note {
  grid-column: 1 / -1;
}

.parent-note {
  max-width: 58ch;
  margin: 0;
  line-height: 1.55;
}

.offline-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  border: 2px solid color-mix(in oklch, var(--mint-deep) 24%, var(--line));
  border-radius: 22px;
  background: color-mix(in oklch, var(--mint) 16%, var(--paper));
}

.offline-symbol {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: var(--paper);
  background: var(--mint-deep);
  font-weight: 900;
}

.offline-card p {
  margin: var(--space-2xs) 0 0;
  color: var(--ink-soft);
  font-size: 0.84rem;
  line-height: 1.4;
}

.parent-actions {
  display: grid;
  gap: var(--space-sm);
}

.setting-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  padding: var(--space-sm) var(--space-md);
  border: 2px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  background: var(--paper);
  font-weight: 900;
}

.setting-button--reset {
  justify-content: center;
  color: var(--coral-deep);
}

.switch-mark {
  width: 50px;
  height: 30px;
  border-radius: 999px;
  background: var(--line);
}

.switch-mark::after {
  display: block;
  width: 22px;
  height: 22px;
  margin: 4px;
  border-radius: 50%;
  background: var(--paper);
  content: "";
  transition: transform 180ms ease-out;
}

[role="switch"][aria-checked="true"] .switch-mark {
  background: var(--mint-deep);
}

[role="switch"][aria-checked="true"] .switch-mark::after {
  transform: translateX(20px);
}

.install-note {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.5;
}

.reset-note {
  min-height: 1.4em;
  margin: calc(-1 * var(--space-sm)) 0 0;
  color: var(--mint-deep);
  font-weight: 900;
  text-align: center;
}

.play-feedback {
  position: fixed;
  z-index: 25;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.feedback-shape {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 7px 9px 6px 8px;
  background: var(--feedback-color, var(--coral));
  animation: feedback-pop 650ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.calm-mode .art-star,
.calm-mode .bubble,
.calm-mode .dino-sun {
  animation: none;
}

@keyframes star-turn {
  to { transform: rotate(360deg); }
}

@keyframes bubble-float {
  to { transform: translateY(-20px) rotate(8deg); }
}

@keyframes camera-flash {
  0% { opacity: 0; }
  18% { opacity: 0.92; }
  100% { opacity: 0; }
}

@keyframes feedback-pop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3) rotate(0); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--drift-x), var(--drift-y)) scale(1.3) rotate(var(--turn)); }
}

@keyframes veil-in {
  from { opacity: 0; }
}

@keyframes sheet-in {
  from { opacity: 0; transform: translateY(40px); }
}

@media (min-width: 700px) {
  .device-layout {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .app-dock {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, min-content);
    grid-column: 1;
    grid-row: 1;
    align-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-sm);
    box-shadow: 4px 0 20px var(--shadow);
  }

  .dock-button {
    min-height: 82px;
  }

  .dock-icon {
    width: 44px;
    height: 44px;
  }

  .screens {
    grid-column: 2;
  }

  .app-screen {
    padding: var(--space-xl);
  }

  .mail-layout {
    grid-template-columns: minmax(280px, 0.82fr) minmax(360px, 1.18fr);
    align-items: start;
  }

  .message-paper {
    position: sticky;
    top: 0;
    min-height: 500px;
    padding: var(--space-xl);
  }

  .letter-art {
    height: 170px;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-lg);
  }

  .parent-panel {
    place-items: center;
  }

  .parent-sheet {
    border-radius: 32px 27px 34px 29px;
  }
}

@media (min-width: 1060px) {
  .gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (orientation: landscape) and (max-height: 560px) {
  .device-bar {
    min-height: 58px;
    padding-top: max(var(--space-xs), env(safe-area-inset-top));
    padding-bottom: var(--space-xs);
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .device-layout {
    grid-template-columns: 94px minmax(0, 1fr);
  }

  .app-dock {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, 1fr);
    grid-column: 1;
    grid-row: 1;
    padding: var(--space-xs);
    box-shadow: 4px 0 20px var(--shadow);
  }

  .dock-button {
    min-height: 0;
    grid-template-columns: auto 1fr;
    justify-items: start;
    gap: var(--space-xs);
    padding: var(--space-2xs);
    font-size: 0.66rem;
  }

  .dock-icon {
    width: 34px;
    height: 34px;
  }

  .dock-icon svg {
    width: 23px;
  }

  .screens {
    grid-column: 2;
  }

  .app-screen {
    padding: var(--space-md);
  }

  .screen-heading {
    margin-bottom: var(--space-sm);
  }

  .screen-heading h1 {
    font-size: 1.55rem;
  }

  .mail-layout {
    grid-template-columns: minmax(260px, 0.9fr) minmax(340px, 1.1fr);
  }

  .mail-card {
    min-height: 60px;
    padding: var(--space-xs);
  }

  .sender-picture {
    width: 42px;
    height: 42px;
  }

  .message-paper {
    min-height: 250px;
    padding: var(--space-md);
  }

  .letter-art {
    float: right;
    width: 42%;
    height: 110px;
    margin: 0 0 var(--space-md) var(--space-md);
  }

  .toy-browser {
    grid-template-rows: auto auto minmax(200px, 1fr);
    min-height: calc(100% - 55px);
  }

  .camera-body {
    grid-template-columns: minmax(0, 1fr) 200px;
    grid-template-rows: 1fr;
    height: calc(100% - 55px);
  }

  .camera-controls {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .scene-picker {
    flex-direction: column;
  }

  .camera-note {
    text-align: center;
  }
}

@media (max-width: 430px) {
  .device-bar {
    padding-right: var(--space-sm);
  }

  .brand-copy {
    display: none;
  }

  .connection-pill {
    max-width: 190px;
  }

  .app-screen {
    padding: var(--space-md);
  }

  .mail-card {
    min-height: 72px;
  }

  .mail-copy span {
    font-size: 0.78rem;
  }

  .message-paper {
    min-height: 330px;
  }

  .camera-controls {
    grid-template-columns: 1fr auto;
  }

  .camera-note {
    grid-column: 1 / -1;
    text-align: center;
  }

  .scene-button {
    min-height: 46px;
    padding: var(--space-xs) var(--space-sm);
  }

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

  .parent-sheet {
    padding: var(--space-lg);
  }
}

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