/* ============================================================
   EEPSTER — cozy pixel design system
   themes: [data-theme="pink" | "grape"]  ·  time: [data-time="day" | "night"]
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Pixelify+Sans:wght@400;500;600;700&family=Silkscreen:wght@400;700&display=swap');

/* ---------- reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
img { display: block; }
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; }
input, textarea { font: inherit; color: inherit; }

:root {
  --pixel: 'Pixelify Sans', 'Trebuchet MS', sans-serif;
  --label: 'Silkscreen', monospace;
  --r: 12px;
}

/* ===================== THEMES ===================== */
[data-theme="pink"] {
  --wall:        #ffd2e2;
  --wall-2:      #ffbdd4;
  --wall-deep:   #ffaecb;
  --floor:       #ffc3da;
  --gingham:     #ff9ec6;
  --panel:       #fff6ec;
  --panel-2:     #ffeede;
  --line:        #f0a8c6;
  --line-soft:   #f7c7da;
  --ink:         #9b4f72;
  --ink-soft:    #c07e9c;
  --accent:      #ff5e9c;
  --accent-2:    #ff92be;
  --accent-deep: #e23e7e;
  --title-1:     #ff7eb3;
  --title-2:     #ff5e9c;
  --sky-1:       #ffd9ee;
  --sky-2:       #ffeaf5;
  --cloud:       #fff4fb;
  --shelf:       #e89cbf;
  --shelf-2:     #d77ba6;
}
[data-theme="grape"] {
  --wall:        #d9c9f7;
  --wall-2:      #cab4f2;
  --wall-deep:   #bda4ee;
  --floor:       #cdb9f3;
  --gingham:     #b196ec;
  --panel:       #f5efff;
  --panel-2:     #ece1ff;
  --line:        #bda0ee;
  --line-soft:   #d6c5f5;
  --ink:         #5e4191;
  --ink-soft:    #8a6dc0;
  --accent:      #9b6cff;
  --accent-2:    #b89bff;
  --accent-deep: #7a4fd0;
  --title-1:     #b48cff;
  --title-2:     #9b6cff;
  --sky-1:       #d7c6f7;
  --sky-2:       #ece2ff;
  --cloud:       #f6f0ff;
  --shelf:       #a98fd9;
  --shelf-2:     #8e72c4;
}

/* night overrides the sky + adds a dim wash */
[data-time="night"] {
  --sky-1: #2b2557;
  --sky-2: #443a78;
  --cloud: #5a4f8f;
}
[data-time="night"][data-theme="pink"] { --wall: #e7a9c8; --wall-2: #d690b4; --wall-deep: #c97da4; --floor: #d18fb2; --gingham: #b86d96; }
[data-time="night"][data-theme="grape"] { --wall: #b49ce6; --wall-2: #a085d9; --wall-deep: #9376cf; --floor: #9d83d6; --gingham: #7d62b8; }

/* ===================== PAGE ===================== */
html, body { height: 100%; }
body {
  font-family: var(--pixel);
  background:
    radial-gradient(120% 120% at 50% 0%, #ffe3f1 0%, #f6d6ef 45%, #e9c4ef 100%);
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 22px;
  color: var(--ink);
  overflow-x: hidden;
}
[data-theme="grape"] body, body[data-bg="grape"] {}

/* crisp pixel rendering for all sprites */
.sprite, .sprite svg, .pixelated { image-rendering: pixelated; image-rendering: crisp-edges; }

/* ===================== DESKTOP WINDOW ===================== */
#app { width: 100%; max-width: 1180px; }

.win {
  border-radius: 14px;
  background: var(--panel);
  box-shadow:
    0 0 0 3px var(--ink),
    0 14px 0 -2px rgba(120, 60, 90, .18),
    0 26px 60px rgba(120, 50, 90, .35);
  overflow: hidden;
  position: relative;
}

.titlebar {
  height: 44px;
  background: linear-gradient(var(--title-1), var(--title-2));
  border-bottom: 3px solid var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  color: #fff;
}
.titlebar .tb-logo { width: 26px; height: 26px; }
.titlebar .tb-name {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .04em;
  text-shadow: 0 2px 0 rgba(150,40,90,.45);
  flex: 1;
}
.titlebar .tb-name small { font-family: var(--label); font-size: 9px; opacity: .85; margin-left: 6px; letter-spacing: 0; }

.tb-controls { display: flex; gap: 6px; }
.tb-dot {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: rgba(255,255,255,.85);
  box-shadow: 0 0 0 2px rgba(150,40,90,.5), 0 3px 0 rgba(150,40,90,.35);
  color: var(--accent-deep);
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700;
  transition: transform .08s;
}
.tb-dot:active { transform: translateY(2px); box-shadow: 0 0 0 2px rgba(150,40,90,.5); }

/* ===================== BODY LAYOUT ===================== */
.win-body { display: grid; grid-template-columns: 116px 1fr; min-height: 640px; }

/* ---------- sidebar ---------- */
.sidebar {
  background: linear-gradient(var(--panel-2), var(--panel));
  border-right: 3px solid var(--line);
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}
.nav-item {
  width: 92px;
  padding: 9px 4px 7px;
  border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--ink-soft);
  transition: transform .1s, background .15s;
  position: relative;
}
.nav-item .ni-label { font-family: var(--label); font-size: 8.5px; letter-spacing: .02em; }
.nav-item:hover { transform: translateY(-2px); color: var(--ink); }
.nav-item.active {
  background: var(--panel);
  color: var(--accent-deep);
  box-shadow: 0 0 0 3px var(--accent-2), 0 4px 0 rgba(150,40,90,.18);
}
.nav-spacer { flex: 1; }

/* ---------- stage / scene ---------- */
.stage {
  position: relative;
  overflow: hidden;
  background: var(--wall);
}

/* the room back wall + light */
.room-wall {
  position: absolute; inset: 0; z-index: 0;
  background:
    linear-gradient(var(--wall) 0%, var(--wall-2) 62%, var(--wall-deep) 100%);
}
[data-time="night"] .room-dim {
  position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background: radial-gradient(90% 70% at 70% 40%, rgba(40,30,80,0) 0%, rgba(30,20,70,.42) 100%);
  mix-blend-mode: multiply;
}

/* gingham floor — slim baseboard the pets stand on */
:root { --floor-h: 96px; }
.room-floor {
  position: absolute; left: 0; right: 0; bottom: 0; height: var(--floor-h);
  z-index: 7;
  background-color: var(--floor);
  background-image:
    linear-gradient(45deg, var(--gingham) 25%, transparent 25%, transparent 75%, var(--gingham) 75%),
    linear-gradient(45deg, var(--gingham) 25%, transparent 25%, transparent 75%, var(--gingham) 75%);
  background-size: 22px 22px;
  background-position: 0 0, 11px 11px;
  border-top: 3px solid color-mix(in srgb, var(--gingham) 70%, var(--ink));
}
.room-floor .floor-plant { position: absolute; right: 16px; bottom: 40px; }

/* scene content scroll area for section views */
.scene-scroll { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; padding: 22px; padding-bottom: calc(var(--floor-h) + 46px); z-index: 5;
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 72px), transparent calc(100% - 14px));
          mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 72px), transparent calc(100% - 14px));
}
.scene-scroll::-webkit-scrollbar { width: 12px; }
.scene-scroll::-webkit-scrollbar-thumb { background: var(--accent-2); border-radius: 10px; border: 3px solid var(--panel); }
.scene-scroll::-webkit-scrollbar-track { background: transparent; }

/* ===================== PIXEL PANELS ===================== */
.panel {
  background: var(--panel);
  border-radius: var(--r);
  box-shadow: 0 0 0 3px var(--line), 0 5px 0 rgba(150,40,90,.16), 0 10px 22px rgba(150,50,90,.16);
  padding: 18px;
  position: relative;
}
.panel-head {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 17px; color: var(--accent-deep);
  margin-bottom: 12px;
}
.panel-head .ph-ico { width: 22px; height: 22px; }
.muted { color: var(--ink-soft); }
.label { font-family: var(--label); font-size: 9px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); }

/* ===================== BUTTONS / INPUTS ===================== */
.pix-btn {
  background: linear-gradient(var(--accent-2), var(--accent));
  color: #fff;
  font-weight: 600; font-size: 14px;
  padding: 8px 14px;
  border-radius: 10px;
  box-shadow: 0 0 0 3px var(--accent-deep), 0 4px 0 var(--accent-deep);
  transition: transform .08s, box-shadow .08s;
  text-shadow: 0 1px 0 rgba(150,40,90,.4);
}
.pix-btn:hover { filter: brightness(1.04); }
.pix-btn:active { transform: translateY(4px); box-shadow: 0 0 0 3px var(--accent-deep); }
.pix-btn.ghost {
  background: var(--panel);
  color: var(--accent-deep);
  box-shadow: 0 0 0 3px var(--accent-2), 0 4px 0 var(--accent-2);
  text-shadow: none;
}
.pix-btn.sm { font-size: 12px; padding: 5px 10px; box-shadow: 0 0 0 2px var(--accent-deep), 0 3px 0 var(--accent-deep); }
.pix-btn.sm:active { transform: translateY(3px); box-shadow: 0 0 0 2px var(--accent-deep); }

.pix-input, .pix-area {
  width: 100%;
  background: #fff;
  border-radius: 8px;
  box-shadow: inset 0 0 0 2px var(--line);
  padding: 9px 11px;
  font-size: 14px;
  color: var(--ink);
  outline: none;
}
.pix-input::placeholder, .pix-area::placeholder { color: var(--line); }
.pix-input:focus, .pix-area:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.pix-area { resize: vertical; min-height: 88px; line-height: 1.5; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--label); font-size: 9px; text-transform: uppercase;
  background: var(--panel-2); color: var(--ink-soft);
  padding: 4px 8px; border-radius: 20px;
  box-shadow: inset 0 0 0 2px var(--line-soft);
}

/* heart pop animation */
@keyframes floatHeart {
  0% { transform: translateY(0) scale(.6); opacity: 0; }
  18% { opacity: 1; }
  100% { transform: translateY(-90px) scale(1.1); opacity: 0; }
}
.heart-pop { position: fixed; z-index: 9999; pointer-events: none; animation: floatHeart 1.1s var(--ease, cubic-bezier(.2,.8,.3,1)) forwards; }

/* sparkle twinkle */
@keyframes twinkle { 0%,100% { opacity: .25; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.15); } }
.sparkle { position: absolute; animation: twinkle 2.6s ease-in-out infinite; }

/* floating bob */
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes bob-slow { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* cloud drift */
@keyframes drift { from { transform: translateX(-30px); } to { transform: translateX(40px); } }

/* entrance — motion only, never traps content invisible */
@keyframes popIn { from { transform: translateY(14px) scale(.985); } to { transform: none; } }
.pop-in { animation: popIn .5s cubic-bezier(.2,.9,.3,1) both; }
@media (prefers-reduced-motion: reduce) { .pop-in { animation: none; } }

/* scene window (looking outside) */
.scene-window {
  position: absolute;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 0 6px var(--shelf), 0 0 0 9px var(--shelf-2), 0 6px 14px rgba(120,40,80,.25);
}
.scene-window .sky { position: absolute; inset: 0; background: linear-gradient(var(--sky-1), var(--sky-2)); transition: background .6s; }
.win-mullion-v { position: absolute; top: 0; bottom: 0; left: 50%; width: 5px; margin-left: -2.5px; background: var(--shelf-2); }
.win-mullion-h { position: absolute; left: 0; right: 0; top: 50%; height: 5px; margin-top: -2.5px; background: var(--shelf-2); }

/* small grid helpers */
.row { display: flex; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; }
.center { display: grid; place-items: center; }

/* photo frame */
.photo-frame {
  background: #fff;
  padding: 8px 8px 26px;
  border-radius: 6px;
  box-shadow: 0 0 0 3px var(--line), 0 6px 0 rgba(150,40,90,.14), 0 8px 18px rgba(150,50,90,.2);
  transform: rotate(var(--rot, -2deg));
  transition: transform .2s;
}
.photo-frame:hover { transform: rotate(0) translateY(-4px) scale(1.02); }
.photo-frame .cap { font-family: var(--label); font-size: 8.5px; text-align: center; margin-top: 7px; color: var(--ink-soft); }
.photo-frame .ph-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 3px; background: var(--panel-2); }

/* star rating */
.stars { display: inline-flex; gap: 2px; }

/* ===================== ROOM DECOR ===================== */
.decor { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.bob { animation: bob 3.4s ease-in-out infinite; }
.bob-slow { animation: bob-slow 4.6s ease-in-out infinite; }

/* window */
.win-frame {
  left: 26px; top: 26px; width: 196px; height: 232px;
}
.scene-window .sill {
  position: absolute; left: -8px; right: -8px; bottom: -14px; height: 16px;
  background: var(--shelf-2); border-radius: 4px;
  box-shadow: 0 4px 0 rgba(120,40,80,.25);
}
.cloud-wrap { position: absolute; animation: drift linear infinite alternate; }
.tinystar {
  position: absolute; width: 4px; height: 4px; background: #fff;
  box-shadow: 0 0 4px #fff; border-radius: 1px;
  animation: twinkle 2.4s ease-in-out infinite;
}

/* skyline */
.skyline {
  position: absolute; left: 0; right: 0; bottom: 0; height: 48%;
  display: flex; align-items: flex-end; justify-content: center; gap: 2px;
  padding: 0 4px;
}
.bldg {
  position: relative;
  background: color-mix(in srgb, var(--wall-deep) 62%, #6a3a72);
  border-top: 2px solid color-mix(in srgb, var(--wall-deep) 40%, #5a2a62);
  border-radius: 2px 2px 0 0;
}
[data-time="night"] .bldg { background: #2a2150; border-top-color: #1c1640; }
.bldg.spire::before {
  content: ''; position: absolute; left: 50%; top: -8px; width: 3px; height: 8px;
  transform: translateX(-50%); background: inherit;
}
.bwins { position: absolute; inset: 6px 4px 4px; display: grid; gap: 2px 3px; align-content: start; }
.bwin { width: 100%; aspect-ratio: 1; background: rgba(255,255,255,.12); border-radius: 1px; }
[data-time="night"] .bwin { background: rgba(255,235,150,.10); }
[data-time="night"] .bwin.lit { background: #ffe07a; box-shadow: 0 0 3px rgba(255,220,120,.8); }

/* bookshelf */
.bookshelf { position: absolute; right: 20px; top: 40px; width: 178px; }
.shelf-row {
  display: flex; align-items: flex-end; justify-content: flex-start; gap: 2px;
  height: 58px; padding: 0 8px;
}
.book {
  width: 9px; border-radius: 2px 2px 0 0;
  box-shadow: inset -2px 0 0 rgba(0,0,0,.14), inset 2px 0 0 rgba(255,255,255,.25);
  align-self: flex-end;
}
.book.lean { transform: rotate(-9deg); transform-origin: bottom; }
.shelf-prop { align-self: flex-end; margin: 0 1px; }
.float-prop { position: relative; }
.float-prop .prop-spark { position: absolute; pointer-events: none; animation: twinkle 2.4s ease-in-out infinite; }
.float-prop .prop-spark.a { top: -7px; right: -5px; animation-delay: 0s; }
.float-prop .prop-spark.b { bottom: 4px; left: -7px; animation-delay: .8s; }
.float-prop .prop-spark.c { top: 6px; right: -2px; animation-delay: 1.6s; }
.shelf-plank {
  height: 8px; background: var(--shelf); border-radius: 3px;
  box-shadow: 0 4px 0 var(--shelf-2), 0 6px 8px rgba(120,40,80,.2);
  margin-bottom: 14px;
}

.floor-plant { position: absolute; left: 18px; bottom: 6px; }

/* bunting / pennant string */
/* hanging plant */
.hang-plant { position: absolute; top: 0; left: 296px; display: flex; flex-direction: column; align-items: center; }
.hang-line { width: 2px; height: 30px; background: var(--shelf-2); }

/* framed photo */
.frame-pic {
  position: absolute; right: 50px; top: 300px;
  background: #fff; padding: 6px 6px 18px; border-radius: 4px;
  box-shadow: 0 0 0 3px var(--shelf), 0 5px 0 var(--shelf-2);
  transform: rotate(3deg);
}
.frame-inner { width: 46px; height: 40px; background: var(--panel-2); border-radius: 2px; display: grid; place-items: center; }
.frame-cap { position: absolute; bottom: 4px; left: 0; right: 0; text-align: center; font-family: var(--label); font-size: 7px; color: var(--ink-soft); }

/* ===================== PETS ===================== */
.pets {
  position: absolute; left: 0; right: 0; bottom: 0; height: 190px;
  z-index: 8; pointer-events: none;
}
.pet {
  position: absolute; bottom: 34px; pointer-events: auto; cursor: pointer;
  transition: transform .12s;
  filter: drop-shadow(0 6px 0 rgba(120,40,80,.16));
}
.pet:hover { transform: translateY(-2px) scale(1.03); }
.pet:active { transform: translateY(2px) scale(.98); }
.pet.cat { right: 21%; bottom: 30px; }
.pet.dog { right: 9%; }
.pet-shadow {
  position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  width: 64px; height: 12px; background: rgba(120,40,80,.18);
  border-radius: 50%; filter: blur(1px);
}
.pet-name {
  position: absolute; bottom: -2px; left: 50%; transform: translateX(-50%);
  font-family: var(--label); font-size: 8px; color: var(--ink-soft);
  background: var(--panel); padding: 2px 6px; border-radius: 8px;
  box-shadow: 0 0 0 2px var(--line-soft); white-space: nowrap; opacity: 0;
  transition: opacity .15s;
}
.pet-wrap:hover .pet-name { opacity: 1; }
.speech {
  position: absolute; top: -10px; left: 60%;
  background: #fff; color: var(--accent-deep);
  font-family: var(--label); font-size: 8px;
  padding: 4px 7px; border-radius: 8px;
  box-shadow: 0 0 0 2px var(--line); white-space: nowrap;
  animation: popIn .2s ease both;
}
.speech::after {
  content: ''; position: absolute; left: 12px; bottom: -5px;
  border: 4px solid transparent; border-top-color: #fff;
}

/* ---- kitchen nook (cooking hamster) ---- */
.kitchen {
  position: absolute; left: 4%; bottom: 16px;
  pointer-events: auto; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; width: 104px;
}
.stovetop-scene { display: flex; align-items: flex-end; justify-content: center; gap: 1px; position: relative; z-index: 2; margin-bottom: -3px; }
.ham-cook {
  animation: cookbob 1.5s ease-in-out infinite; transform-origin: bottom center;
  filter: drop-shadow(0 3px 0 rgba(120,40,80,.14));
}
@keyframes cookbob { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-2px) rotate(3deg); } }

/* pot */
.pot { position: relative; width: 36px; height: 20px; margin-bottom: 2px; }
.pot-rim { position: absolute; left: -3px; right: -3px; top: 0; height: 5px; background: var(--ink); border-radius: 3px; }
.pot-soup {
  position: absolute; left: 1px; right: 1px; top: 3px; bottom: 0;
  background: linear-gradient(var(--shelf), var(--shelf-2));
  border-radius: 2px 2px 7px 7px; box-shadow: inset 0 3px 0 var(--accent-2);
}
.pot-handle { position: absolute; top: 4px; width: 5px; height: 7px; border: 2px solid var(--ink); border-radius: 4px; }
.pot-handle.l { left: -7px; border-right: none; }
.pot-handle.r { right: -7px; border-left: none; }

/* stove */
.stove-top {
  width: 70px; height: 6px; background: var(--shelf-2); border-radius: 4px;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.2); position: relative; z-index: 1;
}
.stove-body {
  width: 64px; height: 26px; background: var(--panel);
  border-radius: 4px 4px 5px 5px;
  box-shadow: 0 0 0 3px var(--accent-2), 0 5px 0 rgba(150,40,90,.16);
  display: flex; gap: 12px; align-items: center; justify-content: center;
}
.stove-body .knob { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-deep); box-shadow: inset 0 -1px 0 rgba(0,0,0,.25); }

/* steam */
.steam { position: absolute; left: 50%; top: -22px; transform: translateX(-50%); width: 26px; height: 24px; z-index: 3; }
.steam i {
  position: absolute; bottom: 0; width: 6px; height: 6px; border-radius: 50%;
  background: var(--panel); opacity: 0; animation: steam 2.4s ease-in infinite;
}
.steam i:nth-child(1) { left: 2px; animation-delay: 0s; }
.steam i:nth-child(2) { left: 10px; animation-delay: .8s; }
.steam i:nth-child(3) { left: 18px; animation-delay: 1.6s; }
@keyframes steam {
  0% { opacity: 0; transform: translateY(0) scale(.6); }
  30% { opacity: .85; }
  100% { opacity: 0; transform: translateY(-22px) scale(1.3); }
}
.kitchen .kitchen-speech { left: 50%; top: -26px; transform: translateX(-50%); }
.kitchen .kitchen-speech::after { left: 50%; margin-left: -4px; }
.kitchen:hover .pet-name { opacity: 1; }
.kitchen .pet-name { bottom: -6px; }

/* ===================== content area sits above floor ===================== */
.decor { transition: opacity .4s; }
.stage:not(.view-home) .decor { opacity: .5; }

/* welcome / home composition */
.welcome {
  max-width: 540px; margin: 6px auto 0;
}
.home-grid { display: grid; grid-template-columns: 1fr; gap: 14px; max-width: 560px; margin: 0 auto; }
.mini-card {
  background: var(--panel-2); border-radius: 10px; padding: 12px 14px;
  box-shadow: inset 0 0 0 2px var(--line-soft);
}

/* editable text affordance */
.editable { outline: none; border-radius: 6px; }
.editing .editable { box-shadow: 0 0 0 2px var(--accent-2); background: #fff; padding: 2px 6px; }

/* list item card */
.item {
  background: var(--panel-2); border-radius: 10px; padding: 12px;
  box-shadow: inset 0 0 0 2px var(--line-soft);
  display: flex; gap: 12px; align-items: flex-start;
}
.icon-btn {
  width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center;
  background: var(--panel); box-shadow: 0 0 0 2px var(--line); color: var(--ink-soft);
  font-size: 13px; transition: transform .08s;
}
.icon-btn:hover { color: var(--accent-deep); box-shadow: 0 0 0 2px var(--accent-2); }
.icon-btn:active { transform: translateY(2px); }

/* food / beli */
.stat-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--panel-2); color: var(--ink-soft);
  font-size: 13px; padding: 6px 12px; border-radius: 20px;
  box-shadow: inset 0 0 0 2px var(--line-soft);
}
.stat-chip b { color: var(--accent-deep); font-size: 15px; }
.rank-pill {
  width: 22px; height: 22px; flex: 0 0 auto; border-radius: 7px;
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
  color: #fff; background: linear-gradient(var(--accent-2), var(--accent));
  box-shadow: 0 0 0 2px var(--accent-deep);
}
.score-badge {
  width: 46px; height: 46px; flex: 0 0 auto; border-radius: 11px;
  display: grid; place-items: center; background: #fff;
}
.score-badge b { font-size: 16px; }
.want-dot { color: var(--accent); font-size: 16px; flex: 0 0 auto; width: 20px; text-align: center; }

/* equalizer bars */
.eq { display: flex; gap: 3px; align-items: flex-end; height: 22px; }
.eq i { width: 4px; background: var(--accent); border-radius: 2px; animation: eqp .9s ease-in-out infinite; }
.eq i:nth-child(1){ animation-delay: 0s; } .eq i:nth-child(2){ animation-delay: .2s; }
.eq i:nth-child(3){ animation-delay: .4s; } .eq i:nth-child(4){ animation-delay: .15s; }
@keyframes eqp { 0%,100% { height: 6px; } 50% { height: 20px; } }
.music-player {
  align-items: center; margin-bottom: 14px; background: var(--panel);
  box-shadow: 0 0 0 3px var(--accent-2);
}
.music-cover { flex: 0 0 auto; }
.music-now b { display: block; color: var(--accent-deep); font-size: 22px; line-height: 1.1; margin-top: 2px; }
.music-focus-note {
  display: inline-flex; margin-top: 6px; padding: 3px 8px; border-radius: 20px;
  background: var(--panel-2); color: var(--accent-deep);
  box-shadow: inset 0 0 0 2px var(--line-soft);
  font-family: var(--label); font-size: 8px; text-transform: uppercase;
}
.music-list { gap: 8px; }
.music-track { align-items: center; padding: 10px; }
.music-track.active {
  background: var(--panel);
  box-shadow: inset 0 0 0 2px var(--accent-2), 0 3px 0 rgba(150,40,90,.12);
}

/* grape garden */

/* ===================== FLAPPY GAME ===================== */
.fly-wrap {
  position: relative; max-width: 380px; margin: 4px auto 0;
  border-radius: 12px; overflow: hidden; cursor: pointer;
  box-shadow: 0 0 0 3px var(--line), 0 5px 0 rgba(150,40,90,.16);
  user-select: none; touch-action: none;
}
.fly-canvas { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.fly-score {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  font-family: var(--pixel); font-weight: 700; font-size: 34px; color: #fff;
  text-shadow: 0 2px 0 var(--accent-deep), 0 0 6px rgba(150,40,90,.4); pointer-events: none;
}
.fly-overlay {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center;
  text-align: center; gap: 2px; color: var(--ink);
  background: rgba(255,250,245,.72); backdrop-filter: blur(2px);
}
.fly-egg {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  background: #fff; color: var(--accent-deep); font-size: 13px; font-weight: 600;
  padding: 6px 12px; border-radius: 20px; box-shadow: 0 0 0 3px var(--accent-2);
  white-space: nowrap; animation: popIn .25s ease both; pointer-events: none;
}
.grape-btn { transition: transform .1s; }
.grape-btn:hover { transform: scale(1.06); }
.grape-btn:active { transform: scale(.92); }
.trellis {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(30px,1fr));
  gap: 4px; padding: 12px; background: var(--panel-2); border-radius: 10px;
  box-shadow: inset 0 0 0 2px var(--line-soft); justify-items: center;
}

/* editable placeholder */
.editable:empty::before { content: attr(data-ph); color: var(--line); }

/* love-note modal */
.modal-bg {
  position: absolute; inset: 0; z-index: 50; background: rgba(60,30,55,.4);
  display: grid; place-items: center; animation: popIn .2s ease both; backdrop-filter: blur(2px);
}
.note-card {
  max-width: 420px; background: var(--panel); border-radius: 14px; padding: 26px;
  box-shadow: 0 0 0 3px var(--accent), 0 14px 40px rgba(120,40,80,.4);
  text-align: center; animation: popIn .35s cubic-bezier(.2,.9,.3,1) both;
}

/* responsive: collapse sidebar labels on small */
@media (max-width: 720px) {
  .win-body { grid-template-columns: 78px 1fr; }
  .nav-item { width: 64px; }
  .nav-item .ni-label { display: none; }
}
