/* Pocket Pet · Softwood design system. Art → pet → feedback → HUD → sheets. */
.painted-eggs { grid-template-columns:repeat(2,minmax(0,1fr))!important; gap:10px!important; }
.painted-eggs .egg-choice { padding:8px 6px 12px; display:flex; flex-direction:column; align-items:center; min-width:0; }
.painted-eggs img { width:100%; max-width:120px; aspect-ratio:1; object-fit:contain; }
.painted-eggs small { font-size:10px; color:var(--muted); margin-top:4px; }
.egg-nest { text-align:center; height:145px; background:radial-gradient(ellipse at 50% 85%,#d8c6a760,transparent 65%); }
.egg-nest img { height:145px; width:145px; object-fit:contain; }
.egg-message { text-align:center; font-size:15px; line-height:1.6; }
.egg-care-actions { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.egg-care-actions button { min-height:48px; border-radius:18px; background:linear-gradient(#fdf5e4,#eadac1); color:var(--ink); border:1px solid #cdb99c; box-shadow:0 3px 0 #cbb799; font:inherit; }
.atlas-family { font-size:14px; margin:24px 0 8px; color:var(--leaf-dark); }
.album-entry { padding:12px; border-radius:14px; background:#e8eddf; font-size:12px; }
.room-options {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0;}
.room-options button {min-height:54px;border-radius:18px;background:#e6ddcb;color:#586450;font:inherit;border:1px solid #bfb498;}
.room-options button[aria-pressed=true] {background:#bed0af;}
.painted-item {width:72px;height:72px;object-fit:contain;flex-shrink:0;}
.egg-care-actions {gap:10px;}
.sheet-content progress {width:100%;height:12px;accent-color:#8f9e72;}
:root {
  color-scheme: light;
  --ink: #59624f;
  --muted: #8d927f;
  --leaf: #91a780;
  --leaf-dark: #6f8864;
  --cream: #fff9ee;
  --paper: #f5eddf;
  --line: #d8cdb854;
  --radius-sm: 14px;
  --radius: 24px;
  --radius-lg: 32px;
  --shadow: 0 10px 28px #8c725522, inset 0 1px 0 #fffaf0;
  --ease: cubic-bezier(0.22, 0.8, 0.28, 1);
  --speed: 240ms;
  font-family:
    ui-rounded,
    "SF Pro Rounded",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  -webkit-text-size-adjust: 100%;
}
* {
  box-sizing: border-box;
}
html {
  background: #e5decd;
  min-height: 100%;
  overscroll-behavior: none;
}
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 15% 0, #fff6e7, transparent 60%), #e5decd;
  min-height: 100vh;
  overscroll-behavior: none;
}
button,
input {
  font: inherit;
}
button {
  border: 0;
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 180ms var(--ease),
    box-shadow 180ms,
    background 180ms;
}
button:disabled {
  opacity: 0.4;
  cursor: default;
}
button:active:not(:disabled) {
  transform: scale(0.94);
}
button:focus-visible,
input:focus-visible {
  outline: 3px solid #92ad84;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.art-icon {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  filter: drop-shadow(0 2px 1px #92785b14);
}
[data-art] {
  display: inline-block;
  width: 25px;
  height: 25px;
  pointer-events: none;
}
.game-shell {
  width: min(100%, 460px);
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  min-height: 580px;
  margin: auto;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px
    calc(10px + env(safe-area-inset-bottom, 0px));
  display: grid;
  grid-template-rows: auto auto minmax(225px, 1fr) auto auto auto;
  gap: 10px;
  background:
    radial-gradient(ellipse at 80% 0, #fffbef, transparent 50%),
    linear-gradient(180deg, #f7f0e1, #f2e8d7);
  position: relative;
  isolation: isolate;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 61px;
  padding: 0 3px;
}
.brand-mark {
  width: 52px;
  height: 55px;
  flex: none;
  border: 1px solid #fff7e1;
  border-radius: 20px;
  background: linear-gradient(135deg, #ecedd4, #d6dfc4);
  box-shadow:
    0 4px 0 #bdc7aa66,
    0 8px 15px #a2997918;
  transform: rotate(-4deg);
  padding: 4px;
}
.pet-heading {
  min-width: 0;
  flex: 1;
}
.eyebrow {
  font-size: 8px;
  letter-spacing: 2px;
  color: #9b9b84;
  font-weight: 800;
}
.pet-heading h1 {
  font-size: 21px;
  font-weight: 800;
  margin: 3px 0 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.3px;
}
.level-line {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  color: #888e79;
  white-space: nowrap;
}
#stage-badge {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 7px;
  color: #7f9371;
  background: #e2e8d3;
}
.header-actions {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 4px;
  flex: none;
}
.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: linear-gradient(145deg, #fff9ee, #efe8d8);
  box-shadow:
    inset 0 1px 0 #fff,
    0 3px 0 #d9d0ba50;
  font-size: 24px;
  flex: none;
}
.header-actions .icon-button {
  width: 38px;
  height: 32px;
  border-radius: 12px;
  position: relative;
}
.header-actions .icon-button:before {
  content: "";
  position: absolute;
  inset: -6px 0;
}
.header-actions [data-art] {
  width: 23px;
  height: 23px;
}
.coin-pill {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px 2px 4px;
  background: linear-gradient(145deg, #fff3ce, #f4e4b9);
  border: 1px solid #fff5d7;
  border-radius: 12px;
  box-shadow: 0 2px 0 #d4bb8338;
  font-size: 12px;
  color: #b58a53;
}
.coin-pill [data-art] {
  width: 19px;
  height: 19px;
}
.coin-pill b {
  font-variant-numeric: tabular-nums;
  min-width: 23px;
}
.vitals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 2px 6px 6px;
  min-height: 45px;
}
.vital {
  min-width: 0;
}
.vital:nth-child(n + 5) {
  display: none;
} /* Full six stats remain live in Status. */
.vital-top {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
  color: #8c917c;
  margin-bottom: 5px;
  white-space: nowrap;
}
.vital-top .art-icon {
  width: 19px;
  height: 19px;
  flex: none;
}
.vital-top b {
  margin-left: auto;
  font-size: 9px;
  color: #777e69;
  font-variant-numeric: tabular-nums;
}
.vital-track {
  height: 7px;
  padding: 1px;
  background: #d7cfbb66;
  border-radius: 7px;
  box-shadow: inset 0 1px 2px #8f80652b;
  overflow: hidden;
}
.vital-track i {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(180deg, #fff7da88, transparent), var(--tone);
  box-shadow: inset 0 1px 0 #fff6;
  transition: width 700ms var(--ease);
}
.room-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid #fff7e9;
  border-radius: var(--radius-lg);
  background: #fff8e9;
  box-shadow:
    0 6px 0 #d4c6ac66,
    0 15px 35px #9e805d24;
  overflow: hidden;
}
.room-toolbar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px 4px 17px;
  min-height: 38px;
  background: linear-gradient(180deg, #fffaed, #f6eddb);
  font-size: 9px;
  color: #a0937a;
}
.room-label {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-right: auto;
  font-size: 11px;
  font-weight: 700;
  color: #7a8b6b;
}
.tiny-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #b1bd91;
  box-shadow: 0 0 0 3px #b1bd911f;
}
.small-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 30px;
  background: #e9e9d7;
  border-radius: 11px;
  position: relative;
  flex: none;
}
.small-icon:before {
  content: "";
  position: absolute;
  inset: -7px 0;
}
.small-icon [data-art] {
  width: 23px;
  height: 23px;
}
.scene-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #e4ccb0;
  overflow: hidden;
  margin: 0 5px;
  border-radius: 22px 22px 17px 17px;
}
canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  touch-action: manipulation;
}
.scene-wrap {
  transition: transform 280ms var(--ease);
  background: linear-gradient(180deg, #f0e4ce 45%, #e4ccb0 65%);
}
.peek-room .scene-wrap {
  transform: scale(0.78);
  transform-origin: 50% 0;
}
.pet-touch {
  position: absolute;
  background: transparent;
  z-index: 2;
  border-radius: 45%;
  left: 36%;
  top: 40%;
  width: 24%;
  height: 33%;
  box-shadow: none !important;
}
.pet-touch:active {
  background: #fffbe917;
}
.scene-caption {
  position: absolute;
  left: 7%;
  right: 7%;
  bottom: 12px;
  padding: 7px 9px;
  border-radius: 13px;
  background: #fff9e3ba;
  box-shadow:
    inset 0 1px 0 #fff8,
    0 2px 8px #7e634716;
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
  color: #8d7d60;
  pointer-events: none;
  z-index: 3;
}
.room-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 44px;
  padding: 4px 12px 5px 18px;
  font-size: 10px;
  color: #90937b;
}
#mood-label:before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #abc093;
  margin-right: 6px;
}
.sleep-button {
  min-height: 35px;
  min-width: 74px;
  padding: 6px 13px;
  font-size: 10px;
  border-radius: 12px;
  background: linear-gradient(145deg, #e9ecd9, #dce3ce);
  color: #778b67;
  box-shadow:
    inset 0 1px 0 #ffff,
    0 2px 0 #b5c3a350;
  position: relative;
}
.sleep-button:before {
  content: "";
  position: absolute;
  inset: -5px 0;
}
.journey-card {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  min-height: 35px;
  padding: 2px 6px 8px;
  background: none;
}
.journey-card > div:first-child {
  flex: 1;
  min-width: 0;
}
.journey-card .eyebrow {
  display: none;
}
.journey-card p {
  font-size: 9px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  margin: 0;
  color: #92937e;
}
.text-button {
  display: flex;
  align-items: center;
  gap: 3px;
  background: none;
  min-height: 30px;
  padding: 0 3px;
  font-size: 10px;
  color: #8b9a77;
  flex: none;
}
.text-button [data-art] {
  width: 18px;
  height: 18px;
}
.xp-track {
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 1px;
  height: 3px;
  background: #dbd6bd;
  border-radius: 3px;
  overflow: hidden;
}
.xp-track i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #b6c59b, #8da877);
  border-radius: 3px;
  transition: width 600ms var(--ease);
}
.quick-row {
  display: flex;
  justify-content: center;
  gap: 18px;
  min-height: 34px;
}
.quick-row button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 34px;
  font-size: 10px;
  background: none;
  color: #9c937a;
  padding: 0 10px;
}
.quick-row .art-icon,
.quick-row [data-art] {
  width: 22px;
  height: 22px;
}
.bottom-nav {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 2px;
  z-index: 10;
  border-radius: 25px;
  padding: 8px 5px 7px;
  background: linear-gradient(180deg, #fff9ed, #f8efd9);
  border: 1px solid #fffbee;
  box-shadow:
    0 4px 0 #d6c7aa66,
    0 8px 24px #92795720,
    inset 0 1px 0 #fff;
}
.bottom-nav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 1px 0 3px;
  background: none;
  min-height: 59px;
  min-width: 0;
  border-radius: 17px;
  font-size: 10px;
  font-weight: 700;
  color: #918e72;
}
.dock-art {
  display: grid;
  place-items: center;
  pointer-events: none;
  width: 38px;
  height: 38px;
  padding: 3px;
  border-radius: 14px;
  background: linear-gradient(145deg, #faf0d9, #eee1ca);
  box-shadow:
    inset 0 1px 0 #fff9,
    0 3px 0 #c8bda140;
  transition:
    transform 180ms var(--ease),
    box-shadow 180ms;
}
.bottom-nav button:nth-child(2) .dock-art {
  background: linear-gradient(145deg, #edf0dc, #d8e2c8);
}
.bottom-nav button:nth-child(3) .dock-art {
  background: linear-gradient(145deg, #edf3e8, #d7e7e5);
}
.bottom-nav button:nth-child(4) .dock-art {
  background: linear-gradient(145deg, #f8ebd9, #ead5bf);
}
.bottom-nav button:nth-child(5) .dock-art {
  background: linear-gradient(145deg, #f7e7d3, #efd8bd);
}
.bottom-nav button:nth-child(6) .dock-art {
  background: linear-gradient(145deg, #ecedd9, #d9dfc3);
}
.bottom-nav button:active .dock-art {
  box-shadow: inset 0 1px 2px #99826322;
  transform: translateY(2px);
}
.bottom-nav button.selected {
  background: #e5e9d1;
  color: #6e865e;
}
.asleep .room-toolbar,
.asleep .room-footer {
  background: #e5e6dd;
}
.asleep .scene-caption {
  background: #dde5ddaf;
  color: #737e81;
}
.toast {
  position: fixed;
  bottom: calc(112px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translate(-50%, 8px);
  max-width: calc(100% - 36px);
  width: max-content;
  padding: 11px 18px;
  border-radius: 18px;
  background: #607259ed;
  color: #fff7e3;
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
  box-shadow: 0 6px 20px #394a3328;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 180ms,
    transform 180ms var(--ease);
}
.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: #5d66534a;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: fade-in 220ms;
}
.sheet {
  position: relative;
  width: min(100%, 460px);
  max-height: calc(66vh - env(safe-area-inset-top, 0px));
  max-height: calc(66svh - env(safe-area-inset-top, 0px));
  padding: 8px 22px calc(22px + env(safe-area-inset-bottom, 0px));
  border-radius: 32px 32px 0 0;
  background:
    radial-gradient(ellipse at 90% 0, #f3e7ca, transparent 45%), #fff8e9;
  border: 1px solid #fff9eb;
  box-shadow:
    0 -6px 0 #d9c6a92b,
    0 -15px 50px #63523b20;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  animation: sheet-in 320ms var(--ease);
}
.sheet-grip {
  width: 32px;
  height: 4px;
  border-radius: 5px;
  background: #d9d1b8;
  margin: 4px auto 13px;
}
.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 16px;
}
.sheet-header h2 {
  font-size: 20px;
  letter-spacing: 0.1px;
  margin: 5px 0 0;
  font-weight: 800;
  color: #68735a;
}
.sheet-header .eyebrow {
  font-size: 8px;
  letter-spacing: 1.7px;
}
.sheet-header .icon-button {
  width: 36px;
  height: 36px;
  color: #a79c82;
  background: #efe8d5;
  box-shadow: none;
  font-weight: 300;
}
.sheet-content {
  font-size: 12px;
}
.sheet-note {
  font-size: 11px;
  line-height: 1.8;
  color: #99987f;
  margin: 3px 0 17px;
}
.centered {
  align-items: center;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 18px
    calc(12px + env(safe-area-inset-bottom, 0px));
}
.centered .sheet {
  width: min(100%, 408px);
  border-radius: 30px;
  max-height: 85vh;
  max-height: 85dvh;
  padding: 20px 22px 24px;
  animation: modal-in 300ms var(--ease);
}
.centered .sheet-grip {
  display: none;
}
.centered .sheet-header h2 {
  font-size: 19px;
  line-height: 1.5;
}
.centered .sheet-header {
  margin-bottom: 12px;
}
.closing .sheet {
  animation: sheet-out 180ms var(--ease) forwards;
  pointer-events: none;
}
.centered.closing .sheet {
  animation: modal-out 180ms forwards;
}
.closing .modal-backdrop {
  animation: fade-out 180ms forwards;
}
.hatch-view {
  pointer-events: none;
}
.hatch-view .modal-backdrop {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.hatch-view .sheet {
  pointer-events: none;
  margin-bottom: calc(112px + env(safe-area-inset-bottom, 0px));
  max-width: 300px;
  border-radius: 22px;
  padding: 12px 16px;
  box-shadow: var(--shadow);
}
.hatch-view .sheet-grip,
.hatch-view .eyebrow {
  display: none;
}
.hatch-view .sheet-header {
  margin: 0;
}
.hatch-view .sheet-header h2 {
  font-size: 15px;
  margin: 0;
}
.hatch-view .sheet-note {
  font-size: 10px;
  margin: 5px 0 0;
}
.item-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.item-row {
  display: flex;
  gap: 13px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.item-icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 61px;
  min-width: 62px;
  padding: 7px;
  border-radius: 19px;
  background: radial-gradient(ellipse at 40% 30%, #fffbea, #f3e8d0);
  box-shadow: inset 0 -3px 5px #ba9e7521;
}
.item-main {
  flex: 1;
  min-width: 0;
}
.item-main strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #788364;
}
.item-main small {
  display: block;
  font-size: 10px;
  color: #a1997f;
  line-height: 1.8;
  margin-top: 3px;
}
.item-row button {
  flex: none;
  min-width: 58px;
  min-height: 44px;
  padding: 8px 11px;
  border-radius: 13px;
  color: #fff8e7;
  font-size: 11px;
  font-weight: 700;
  background: linear-gradient(180deg, #a1b48c, #8ba177);
  box-shadow:
    inset 0 1px 0 #ffffff63,
    0 3px 0 #697f5c66;
}
.item-row button:active {
  box-shadow: inset 0 2px 2px #6e835833;
}
/* Food & shop are swipeable illustrated shelves, never a wall of choices. */
.modal[data-panel="food"] .item-list,
.modal[data-panel="shop"] .item-list {
  flex-direction: row;
  overflow-x: auto;
  gap: 13px;
  padding: 7px 1px 17px;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.modal[data-panel="food"] .item-row,
.modal[data-panel="shop"] .item-row {
  flex-direction: column;
  flex: 0 0 147px;
  align-items: stretch;
  text-align: center;
  border: 1px solid #e8ddc4;
  border-radius: 23px;
  padding: 13px 12px 15px;
  background: linear-gradient(160deg, #fffdf0, #f7efd9);
  scroll-snap-align: start;
}
.modal[data-panel="food"] .item-icon,
.modal[data-panel="shop"] .item-icon {
  width: 100%;
  height: 94px;
  background: radial-gradient(ellipse at 50% 50%, #f2ebd0, #fff5e100 70%);
  border-radius: 20px;
  box-shadow: none;
  padding: 9px 23px;
}
.modal[data-panel="food"] .item-main,
.modal[data-panel="shop"] .item-main {
  min-height: 67px;
}
.modal[data-panel="food"] .item-row button,
.modal[data-panel="shop"] .item-row button {
  width: 100%;
}
.primary-button,
.secondary-button {
  width: 100%;
  min-height: 46px;
  padding: 12px 15px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 700;
  margin-top: 12px;
}
.primary-button {
  background: linear-gradient(180deg, #a2b58c, #879f74);
  color: #fff8e6;
  box-shadow:
    inset 0 1px 0 #fff7,
    0 4px 0 #687e586b,
    0 8px 18px #83956e20;
}
.secondary-button {
  background: linear-gradient(180deg, #f4eddc, #ece6d2);
  color: #95967b;
  border: 1px solid #e2dcc4;
  box-shadow: inset 0 1px 0 #fff8;
}
.danger-button {
  background: linear-gradient(180deg, #f3ddcf, #ebc7b6);
  color: #ad796b;
  box-shadow: 0 3px 0 #d2a38b55;
}
.primary-button.danger-button {
  color: #976556;
}
.egg-grid {
  display: flex;
  gap: 9px;
  justify-content: center;
  margin: 18px 0 16px;
}
.egg-choice {
  flex: 1;
  min-width: 0;
  padding: 12px 0 10px;
  border: 2px solid transparent;
  border-radius: 22px;
  background: radial-gradient(ellipse at 50% 0, #fff9e8, #f0ead6);
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 11px;
  font-size: 10px;
  color: #99977d;
}
.egg-choice[aria-pressed="true"] {
  border-color: #a1b58b;
  background: radial-gradient(ellipse at 50% 0, #f8f7df, #e8eed6);
  box-shadow: 0 4px 0 #cad5b54d;
}
.egg-art {
  display: block;
  width: 44px;
  height: 57px;
  position: relative;
  background:
    radial-gradient(ellipse at 30% 25%, #fffbe37a, transparent 65%), var(--egg);
  border: 1px solid #fff3dc75;
  border-radius: 52% 52% 46% 46%;
  box-shadow:
    inset -6px -6px 9px #807b5533,
    0 6px 3px #9f916324;
  transform: rotate(-5deg);
}
.egg-art:after {
  content: "";
  position: absolute;
  width: 6px;
  height: 11px;
  border-radius: 50%;
  background: #fffbe3a8;
  left: 9px;
  top: 11px;
  box-shadow:
    18px 18px 0 -1px #fff8dc7a,
    -1px 29px 0 -1px #fff8dc5a;
  transform: rotate(16deg);
}
.welcome-illustration {
  width: 90px;
  height: 92px;
  margin: 6px auto 10px;
  padding: 7px;
  background: radial-gradient(ellipse, #e7edcf, #f8f1db00 72%);
  animation: welcome-breathe 4s ease-in-out infinite;
}
.welcome-tag {
  text-align: center;
  font-size: 10px;
  color: #9aa17f;
  letter-spacing: 1px;
  margin: 9px 0 16px;
}
.name-input {
  border: 1px solid #d8dec3;
  background: #fffdf1;
  border-radius: 15px;
  padding: 13px;
  width: 100%;
  font-size: 16px;
  color: #69745b;
  margin: 10px 0 2px;
  box-shadow: inset 0 2px 3px #93836b10;
}
.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 0 0 8px;
  margin-bottom: 8px;
  scrollbar-width: thin;
}
.tabs button {
  flex: none;
  min-height: 40px;
  padding: 9px 13px;
  border-radius: 13px;
  white-space: nowrap;
  background: #f0ead6;
  color: #9a957c;
  font-size: 10px;
}
.tabs button.active {
  background: #a3b58e;
  color: #fff8e3;
  box-shadow: 0 3px 0 #7c956966;
}
.sheet-vitals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin: 5px 0 20px;
}
.sheet-vitals > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  border-bottom: 1px solid var(--line);
  padding: 7px 0;
  font-size: 10px;
}
.sheet-vitals span {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #929879;
}
.sheet-vitals .art-icon {
  width: 23px;
  height: 23px;
}
.sheet-vitals b {
  font-size: 10px;
  color: #8b9477;
  font-variant-numeric: tabular-nums;
}
.status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px 15px;
}
.status-tile {
  border-bottom: 1px solid var(--line);
  padding: 3px 0 11px;
  min-width: 0;
}
.status-tile small {
  font-size: 9px;
  color: #a59c83;
}
.status-tile b {
  display: block;
  font-size: 14px;
  margin-top: 5px;
  color: #829072;
  overflow-wrap: anywhere;
}
.journal-list {
  border-left: 1px dashed #d8ccb0;
  margin: 18px 4px;
  padding-left: 19px;
}
.journal-entry {
  padding-bottom: 17px;
  position: relative;
}
.journal-entry:before {
  content: "";
  position: absolute;
  left: -23px;
  top: 5px;
  width: 7px;
  height: 7px;
  background: #c1cdab;
  border: 1px solid #fff5dc;
  border-radius: 50%;
}
.journal-entry small {
  font-size: 9px;
  color: #b0a58a;
}
.journal-entry p {
  font-size: 11px;
  line-height: 1.8;
  margin: 5px 0 0;
  color: #92967d;
}
.offline-card {
  border-radius: 19px;
  background: linear-gradient(145deg, #ecedd7, #e4e7cd);
  padding: 15px 17px;
  margin: 12px 0;
  font-size: 11px;
  line-height: 1.9;
  color: #8b9578;
  box-shadow: inset 0 1px 0 #fff7;
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.setting-row strong {
  font-size: 12px;
  color: #869171;
}
.setting-row small {
  display: block;
  font-size: 10px;
  color: #a29d82;
  margin-top: 5px;
}
.toggle {
  min-height: 40px;
  min-width: 66px;
  font-size: 10px;
  border-radius: 21px;
  background: #e4dfca;
  color: #b0a58e;
  padding: 8px 11px;
  box-shadow: inset 0 2px 3px #a08e7526;
}
.toggle.on {
  background: linear-gradient(180deg, #b2c199, #92ac80);
  color: #fff8e7;
  box-shadow:
    inset 0 1px 0 #e8edd69e,
    0 3px 0 #7d946766;
}
.empty-state {
  text-align: center;
  padding: 25px 0;
  color: #a49c84;
  font-size: 12px;
}
.version-note {
  text-align: center;
  font-size: 9px;
  color: #b4ab92;
  line-height: 1.7;
  margin: 17px 0 0;
}
.locked .bottom-nav button,
.locked .sleep-button,
.locked .quick-row button {
  opacity: 0.35;
}
.file-input {
  display: none;
}
body.modal-open {
  overflow: hidden;
}
@keyframes sheet-in {
  from {
    transform: translateY(100%);
    opacity: 0.5;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes sheet-out {
  to {
    transform: translateY(100%);
    opacity: 0;
  }
}
@keyframes modal-in {
  from {
    transform: translateY(12px) scale(0.94);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
@keyframes modal-out {
  to {
    transform: translateY(8px) scale(0.97);
    opacity: 0;
  }
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes fade-out {
  to {
    opacity: 0;
  }
}
@keyframes welcome-breathe {
  50% {
    transform: translateY(-3px) rotate(2deg);
  }
}
@media (hover: hover) {
  .bottom-nav button:hover .dock-art {
    transform: translateY(-2px);
  }
  .item-row button:hover,
  .primary-button:hover {
    filter: brightness(1.03);
  }
}
@media (min-width: 600px) {
  body {
    padding: 20px 0;
  }
  .game-shell {
    height: min(900px, calc(100dvh - 40px));
    min-height: 710px;
    border-radius: 36px;
    box-shadow: 0 30px 80px #6c675b33;
  }
  .modal:not(.centered) .sheet {
    margin-bottom: 20px;
    border-radius: 32px;
  }
  .bottom-nav {
    margin-bottom: 2px;
  }
}
@media (max-height: 740px) and (max-width: 599px) {
  .game-shell {
    gap: 7px;
    padding-top: calc(7px + env(safe-area-inset-top, 0px));
  }
  .topbar {
    min-height: 53px;
  }
  .brand-mark {
    width: 46px;
    height: 48px;
  }
  .pet-heading h1 {
    font-size: 19px;
  }
  .vitals {
    min-height: 37px;
    padding-bottom: 3px;
  }
  .room-toolbar {
    min-height: 32px;
  }
  .room-footer {
    min-height: 39px;
  }
  .quick-row {
    min-height: 29px;
  }
  .quick-row button {
    min-height: 29px;
  }
  .bottom-nav {
    padding-top: 5px;
    padding-bottom: 4px;
  }
  .bottom-nav button {
    min-height: 54px;
  }
  .dock-art {
    width: 34px;
    height: 34px;
  }
  .journey-card {
    min-height: 27px;
  }
  .sheet {
    max-height: 72svh;
  }
}
@media (max-width: 350px) {
  .game-shell {
    padding-left: 10px;
    padding-right: 10px;
  }
  .pet-heading .eyebrow {
    font-size: 7px;
  }
  .vitals {
    gap: 7px;
  }
  .vital-top span {
    font-size: 8px;
  }
  .sheet {
    padding-left: 16px;
    padding-right: 16px;
  }
  .sheet-header h2 {
    font-size: 18px;
  }
  .item-icon {
    width: 52px;
    min-width: 52px;
    height: 54px;
  }
  .item-row {
    gap: 9px;
  }
  .level-line {
    font-size: 9px;
    gap: 4px;
  }
}
@media (max-height: 600px) {
  .game-shell {
    min-height: 580px;
  }
  .scene-caption {
    bottom: 6px;
    padding: 5px 7px;
    font-size: 9px;
  }
  .centered .sheet {
    max-height: 90dvh;
    padding-top: 15px;
  }
  .centered .welcome-illustration {
    width: 60px;
    height: 60px;
  }
}
/* Landscape keeps the room beside the controls, with safe areas on both sides. */
@media (orientation: landscape) and (max-height: 600px) {
  body {
    padding: 0;
  }
  .game-shell {
    width: min(100%, 860px);
    height: 100dvh;
    min-height: 340px;
    padding: 10px max(12px, env(safe-area-inset-right, 0px))
      max(10px, env(safe-area-inset-bottom, 0px))
      max(12px, env(safe-area-inset-left, 0px));
    border-radius: 0;
    grid-template-columns: minmax(0, 1fr) 236px;
    grid-template-rows: auto auto 1fr auto auto;
    gap: 6px 16px;
  }
  .room-card {
    grid-column: 1;
    grid-row: 1 / 6;
    width: min(100%, calc((100dvh - 110px) * 1.067));
    justify-self: center;
  }
  .topbar {
    grid-column: 2;
    grid-row: 1;
    min-height: 55px;
    gap: 7px;
  }
  .brand-mark {
    width: 42px;
    height: 44px;
  }
  .pet-heading h1 {
    font-size: 17px;
  }
  .pet-heading .eyebrow {
    font-size: 7px;
  }
  .level-line {
    font-size: 8px;
    gap: 3px;
  }
  .vitals {
    grid-column: 2;
    grid-row: 2;
    gap: 7px;
    padding: 0;
  }
  .vital-top {
    gap: 2px;
  }
  .vital-top span {
    display: none;
  }
  .vital-top .art-icon {
    width: 19px;
    height: 19px;
  }
  .journey-card {
    grid-column: 2;
    grid-row: 3;
    align-self: end;
  }
  .quick-row {
    grid-column: 2;
    grid-row: 4;
    gap: 2px;
  }
  .quick-row button {
    padding: 0 5px;
    min-height: 32px;
  }
  .bottom-nav {
    grid-column: 2;
    grid-row: 5;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    padding: 7px;
  }
  .bottom-nav button {
    min-height: 47px;
    gap: 2px;
  }
  .dock-art {
    width: 29px;
    height: 29px;
    padding: 2px;
  }
  .modal:not(.centered) .sheet {
    max-height: 92dvh;
    margin-bottom: 0;
    border-radius: 25px 25px 0 0;
  }
  .toast {
    bottom: 22px;
  }
  .hatch-view .sheet {
    margin-bottom: 20px !important;
  }
}
@media (orientation: portrait) {
  .modal:not(.centered):not(.hatch-view) .sheet {
    max-height: 50vh;
    max-height: 50svh;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
/* Life edition: controls share the existing softwood design tokens. */
.volume-row { display:flex; align-items:center; gap:16px; min-height:48px; color:#637256; font-weight:700; }
.volume-row input { flex:1; min-width:0; accent-color:#88a776; height:36px; }
.atlas-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.atlas-form { padding:12px 5px; border-radius:20px; background:#f3eddf; text-align:center; display:grid; gap:6px; }
.atlas-form strong { font-size:12px; }.atlas-form small { font-size:10px; color:#9b927e; }
.atlas-art svg { width:58px; height:58px; }.undiscovered .atlas-art { filter:brightness(0) opacity(.65); }
.atlas-art img { width:72px; height:72px; object-fit:contain; }
