/* Friday Mk3 — white, bright, pastel, playful. Tokens first, then shell, device, home, sidebar, village. */
:root {
  --bg: #ffffff; --dot: #e4e4ec; --ink: #23243a; --muted: #6c6d84; --line: #ecebf3; --card: #ffffff;
  --sky: #e2ecfc; --sky-ink: #2f58a6; --sky-fill: #7ea6ec;
  --lav: #ece6fb; --lav-ink: #5a45a6; --lav-fill: #a993f0;
  --mint: #ddf1e6; --mint-ink: #2b6f4e; --mint-fill: #62c08c;
  --peach: #fce8db; --peach-ink: #9c5229; --peach-fill: #f0a274;
  --butter: #faf1cf; --butter-ink: #6a5212; --pink: #fbe5ed; --pink-ink: #a03f69;
  --display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --body: "Nunito Sans", "Avenir Next", system-ui, -apple-system, sans-serif;
  --lcd: "Silkscreen", ui-monospace, monospace;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px); --sar: env(safe-area-inset-right, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background-color: var(--bg); background-image: radial-gradient(var(--dot) 1.3px, transparent 1.4px); background-size: 22px 22px;
  color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.35; overflow: hidden;
  overscroll-behavior: none; -webkit-user-select: none; user-select: none;
}
button { font: inherit; color: inherit; }
input { font: inherit; }
#app { position: fixed; inset: 0; }
.view { position: absolute; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: calc(var(--sat) + 14px) calc(var(--sar) + 18px) calc(var(--sab) + 18px) calc(var(--sal) + 18px); }
.view[hidden] { display: none; }

/* header */
.dhead { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.dhead b { font-family: var(--display); font-weight: 700; font-size: 28px; letter-spacing: -0.015em; }
.dhead span { color: var(--muted); font-size: 14px; }

/* ---------- pet device ---------- */
.egg { --w: 200px; position: relative; width: var(--w); height: calc(var(--w) * 1.2); border-radius: 50% 50% 47% 47% / 58% 58% 42% 42%;
  background: radial-gradient(circle at 32% 22%, #edf2ff 0, #bccdf6 28%, #8fa8e6 64%, #7590d6 100%);
  box-shadow: inset -10px -14px 0 rgba(40,60,140,.14), inset 8px 10px 0 rgba(255,255,255,.4), 0 12px 24px rgba(70,90,160,.18);
  display: grid; justify-items: center; align-content: center; gap: calc(var(--w) * .06); flex: 0 0 auto; }
.egg::before { content: ""; position: absolute; left: 20%; top: 9%; width: 18%; height: 10%; border-radius: 50%; background: rgba(255,255,255,.55); transform: rotate(-24deg); }
.egg-ring { position: absolute; top: calc(var(--w) * -0.07); left: 50%; width: calc(var(--w) * .16); height: calc(var(--w) * .12); margin-left: calc(var(--w) * -0.08); border: calc(var(--w) * .025) solid #f2b8cc; border-bottom: 0; border-radius: 50% 50% 0 0; }
.egg-face { margin-top: calc(var(--w) * .1); background: #f3f5fc; border-radius: calc(var(--w) * .1); padding: calc(var(--w) * .05); box-shadow: inset 0 3px 0 rgba(40,60,140,.1), 0 2px 0 rgba(255,255,255,.6); }
.lcd { position: relative; width: calc(var(--w) * .56); height: calc(var(--w) * .5); border-radius: calc(var(--w) * .035);
  background-color: #c8d5a2; background-image: radial-gradient(rgba(40,56,20,.10) 0.9px, transparent 1.1px), linear-gradient(180deg, rgba(255,214,140,.35), rgba(200,213,162,0) 38%);
  background-size: calc(var(--w) * .0175) calc(var(--w) * .0175), 100% 100%;
  box-shadow: inset 0 3px 6px rgba(40,56,20,.32), inset 0 -2px 0 rgba(255,255,255,.25); font-family: var(--lcd); color: #26321a; overflow: hidden; }
.lcd-top, .lcd-bot { position: absolute; left: 7%; right: 7%; display: flex; justify-content: space-between; align-items: center; font-size: calc(var(--w) * .038); line-height: 1; }
.lcd-top { top: 7%; } .lcd-bot { bottom: 7%; }
.lcd .hearts { color: #e2577f; letter-spacing: .08em; }
.lcd .hearts .off { color: rgba(38,50,26,.35); }
.lcd .ok { color: #2f8a4f; } .lcd .warn { color: #d06a2a; }
.lcd-sun { position: absolute; right: 9%; top: 22%; width: calc(var(--w) * .05); height: calc(var(--w) * .05); background: #f4b73c; box-shadow: 0 0 0 calc(var(--w) * .008) #f8d77d; image-rendering: pixelated; }
.lcd-pet { position: absolute; left: 50%; top: 54%; width: 34%; aspect-ratio: 18 / 22; transform: translate(-50%, -50%); animation: hop 1.6s steps(2) infinite; cursor: pointer; }
.lcd-pet svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.lcd-pet .f2 { animation: blink 3.4s steps(1) infinite; opacity: 0; }
.lcd-pet .w1, .lcd-pet .w2 { opacity: 0; }
.lcd-pet.r-cheer { animation: cheer .5s steps(2) 3; }
.lcd-pet.r-love { animation: cheer .7s steps(2) 3; }
.lcd-pet.r-dance { animation: dance .55s steps(2) infinite; }
.lcd-pet.r-dance .f1, .lcd-pet.r-dance .f2 { opacity: 0; animation: none; }
.lcd-pet.r-dance .w1 { animation: walkA .28s steps(1) infinite; }
.lcd-pet.r-dance .w2 { animation: walkB .28s steps(1) infinite; }
.lcd-pet.r-wave { animation: wave .5s steps(2) 4; }
.lcd-pet.r-sparkle { animation: spin 1s steps(4) 2; }
.lcd-pet.r-sleep { animation: snooze 2s steps(2) infinite; }
.lcd-pet.r-sleep .f1 { opacity: 0; } .lcd-pet.r-sleep .f2 { opacity: 1; animation: none; }
.lcd-spark { position: absolute; font-size: calc(var(--w) * .05); color: #e2577f; animation: float 1.4s ease-out both; pointer-events: none; line-height: 1; }
.lcd-spark.sleep { font-size: calc(var(--w) * .045); animation-duration: 2.2s; }
.lcd-cloud { position: absolute; left: 12%; top: 24%; width: calc(var(--w) * .09); height: calc(var(--w) * .025); background: #f4f8e2; box-shadow: calc(var(--w) * .02) calc(var(--w) * -.018) 0 0 #f4f8e2; opacity: .8; animation: drift 14s steps(14) infinite alternate; }
.lcd-bubble { position: absolute; left: 50%; top: 18%; transform: translateX(-50%); max-width: 86%; background: #f4f8e2; color: #26321a; border: calc(var(--w) * .008) solid #26321a; font-size: calc(var(--w) * .036); line-height: 1.15; padding: calc(var(--w) * .01) calc(var(--w) * .02); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; z-index: 2; animation: pop .2s steps(2); }
@keyframes dance { 50% { transform: translate(-56%, -52%) rotate(-6deg); } 100% { transform: translate(-44%, -52%) rotate(6deg); } }
@keyframes walkA { 0% { opacity: 1; } 50% { opacity: 0; } }
@keyframes walkB { 0% { opacity: 0; } 50% { opacity: 1; } }
@keyframes wave { 50% { transform: translate(-50%, -50%) rotate(-8deg); } }
@keyframes spin { 25% { transform: translate(-50%, -56%) scaleX(.4); } 50% { transform: translate(-50%, -60%) scaleX(-1); } 75% { transform: translate(-50%, -56%) scaleX(-.4); } }
@keyframes snooze { 50% { transform: translate(-50%, -46%) scaleY(.94); } }
@keyframes drift { to { transform: translateX(calc(var(--w) * .12)); } }
@keyframes pop { from { transform: translateX(-50%) scale(.6); } }
.lcd-page { position: absolute; inset: 22% 8% 20%; display: grid; place-items: center; text-align: center; font-size: calc(var(--w) * .042); line-height: 1.35; }
.lcd-page big { display: block; font-size: calc(var(--w) * .1); }
.egg-btns { display: flex; gap: calc(var(--w) * .07); }
.egg-btns button { width: calc(var(--w) * .095); height: calc(var(--w) * .095); border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #fff, var(--c1) 55%, var(--c2)); box-shadow: 0 3px 0 rgba(60,40,80,.22); }
.egg-btns button:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(60,40,80,.22); }
.egg-btns button:nth-child(1) { --c1: #f7b3c9; --c2: #e98aa9; }
.egg-btns button:nth-child(2) { --c1: #f3d27a; --c2: #ddb14a; margin-top: calc(var(--w) * .03); }
.egg-btns button:nth-child(3) { --c1: #9fd6a8; --c2: #6fbf80; }
@keyframes blink { 0%, 92% { opacity: 0; } 93%, 100% { opacity: 1; } }
@keyframes hop { 50% { transform: translate(-50%, -54%); } }
@keyframes cheer { 50% { transform: translate(-50%, -64%); } }
@keyframes float { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-160%); opacity: 0; } }

.say { background: #fff; border: 1.5px solid #e2dbf6; border-radius: 14px; padding: 7px 13px; font-family: var(--display); font-weight: 500; font-size: 15px; color: #4a3a8c; position: relative; box-shadow: 0 2px 0 #f0ecfb; text-align: center; max-width: 100%; }
.say::after { content: ""; position: absolute; left: 50%; bottom: -8px; margin-left: -7px; width: 12px; height: 12px; background: #fff; border-right: 1.5px solid #e2dbf6; border-bottom: 1.5px solid #e2dbf6; transform: rotate(45deg); }
.moodline { font-family: var(--display); font-weight: 600; font-size: 16px; text-align: center; }
.moodline small { display: block; font-family: var(--body); font-weight: 400; font-size: 13px; color: var(--muted); }

/* ---------- home layout ---------- */
.home { display: grid; gap: 14px; align-content: start; max-width: 1200px; margin: 0 auto; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: center; }
.pet { display: grid; justify-items: center; gap: 12px; min-width: 0; }
.pet .egg-slot { width: 100%; display: grid; justify-items: center; }
.right { display: grid; gap: 14px; align-content: start; min-width: 0; }

/* wide: Duo inner screen, iPad, laptop */
@media (min-width: 700px) and (min-aspect-ratio: 5/4) {
  .view.home-view { overflow: hidden; }
  .home { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); height: 100%; gap: 28px; }
  .home > .dhead { display: none; }
  .hero { display: contents; }
  .pet { align-content: center; height: 100%; gap: 16px; }
  .right { overflow-y: auto; height: 100%; padding: 6px 30px 6px 6px; }
  .right .dhead { display: flex !important; }
  .needs.col { grid-template-columns: 1fr 1fr; }
}
.right .dhead { display: none; }

/* needs: daily rings */
.needs { display: grid; gap: 8px; }
.needs.col { grid-template-columns: 1fr; }
.need { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 9px; align-items: center; border-radius: 16px; padding: 8px 10px; border: 0; text-align: left; cursor: default; background: var(--tone); color: var(--tone-ink); }
.need[data-toggle] { cursor: pointer; }
.need[data-toggle]:active { transform: scale(.98); }
.need svg { width: 38px; height: 38px; display: block; }
.need b { font-family: var(--display); font-weight: 600; font-size: 15px; display: block; }
.need em { font-style: normal; font-size: 12px; font-weight: 600; opacity: .85; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.need.peach { --tone: var(--peach); --tone-ink: var(--peach-ink); --fill: var(--peach-fill); }
.need.sky { --tone: var(--sky); --tone-ink: var(--sky-ink); --fill: var(--sky-fill); }
.need.lav { --tone: var(--lav); --tone-ink: var(--lav-ink); --fill: var(--lav-fill); }
.need.mint { --tone: var(--mint); --tone-ink: var(--mint-ink); --fill: var(--mint-fill); }
.need .ring-bg { stroke: rgba(255,255,255,.85); }
.need .ring-fg { stroke: var(--fill); transition: stroke-dashoffset .5s ease; }

/* to-dos */
.list { background: #fff; border-radius: 20px; padding: 10px 14px 12px; box-shadow: 0 0 0 1px var(--line), 0 2px 0 #f1f0f6; display: grid; }
.list-head { display: flex; justify-content: space-between; align-items: baseline; padding: 2px 0 2px; }
.list-head b { font-family: var(--display); font-weight: 600; font-size: 18px; }
.list-head span { font-size: 12px; color: var(--lav-ink); font-weight: 700; }
.slot { font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 10px 0 2px; display: flex; gap: 8px; align-items: center; }
.slot i { flex: 1; height: 1px; background: var(--line); }
.slot.later-toggle { cursor: pointer; background: none; border: 0; width: 100%; text-align: left; }
.di { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 7px 0; border-top: 1px solid #f3f2f7; font-size: 15px; }
.slot + .di { border-top: 0; }
.bub { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #d4d2e0; background: #fff; padding: 0; cursor: pointer; display: block; transition: background .2s, border-color .2s; }
.di.done .bub { background: var(--mint-fill); border-color: var(--mint-fill); box-shadow: inset 0 0 0 3px #fff; }
.di .tx { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.di .tx a { color: inherit; text-decoration: none; }
.di.done .tx { color: #a7a6b8; text-decoration: line-through; }
.mv { border: 0; background: #f4f3f9; color: var(--muted); border-radius: 999px; width: 28px; height: 24px; cursor: pointer; font-size: 13px; padding: 0; }
.pill { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.pill.lav { background: var(--lav); color: var(--lav-ink); } .pill.butter { background: var(--butter); color: var(--butter-ink); }
.pill.pink { background: var(--pink); color: var(--pink-ink); } .pill.mint { background: var(--mint); color: var(--mint-ink); }
.pill.peach { background: var(--peach); color: var(--peach-ink); } .pill.sky { background: var(--sky); color: var(--sky-ink); }
.add { display: flex; gap: 8px; margin-top: 8px; }
.add input { flex: 1; min-width: 0; border: 1.5px solid var(--line); border-radius: 12px; padding: 7px 11px; font-size: 16px; background: #fbfbfe; color: var(--ink); -webkit-user-select: text; user-select: text; }
.add input:focus { outline: none; border-color: #c9bff2; background: #fff; }
.add button { border: 0; border-radius: 12px; background: var(--lav); color: var(--lav-ink); font-weight: 800; padding: 0 14px; cursor: pointer; }
.carry { margin-top: 10px; background: var(--butter); border-radius: 14px; padding: 9px 12px; display: grid; gap: 6px; color: #5d4810; font-size: 14.5px; }
.carry .why { font-size: 12.5px; opacity: .85; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { font-size: 12.5px; font-weight: 700; padding: 3px 12px; border-radius: 999px; background: #fff; color: var(--butter-ink); border: 0; cursor: pointer; }
.chips button.pick { background: var(--butter-ink); color: #fff8dc; }
.foot { color: #a3a2b6; font-size: 11.5px; text-align: center; padding: 6px 0 2px; }
.foot button { border: 0; background: none; color: inherit; text-decoration: underline; cursor: pointer; font-size: inherit; }

/* ---------- sidebar ---------- */
.tab { position: fixed; right: 0; top: 50%; width: 26px; height: 104px; margin-top: -52px; border-radius: 14px 0 0 14px; background: var(--lav); display: grid; place-items: center; z-index: 40; border: 0; padding: 0; cursor: pointer; box-shadow: -2px 2px 0 rgba(90,69,166,.12); }
.tab span { writing-mode: vertical-rl; font-family: var(--display); font-weight: 600; font-size: 13px; color: var(--lav-ink); }
.scrim { position: fixed; inset: 0; background: rgba(20,22,40,.28); z-index: 49; opacity: 0; pointer-events: none; transition: opacity .25s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(340px, 84vw); background: #fff; z-index: 50; border-radius: 28px 0 0 28px;
  padding: calc(var(--sat) + 22px) calc(var(--sar) + 18px) calc(var(--sab) + 22px) 18px; display: grid; gap: 14px; align-content: start; overflow-y: auto;
  transform: translateX(104%); transition: transform .3s ease; box-shadow: -10px 0 28px rgba(20,22,40,.12); }
body.open .scrim { opacity: 1; pointer-events: auto; }
body.open .drawer { transform: none; }
.drawer .lbl { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.navhome { display: flex; gap: 10px; align-items: center; border: 0; background: #f6f4fd; border-radius: 14px; padding: 10px 12px; cursor: pointer; font-family: var(--display); font-weight: 600; font-size: 16px; text-align: left; }
.vcard { border-radius: 18px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1.5px #c9bff2, 0 4px 0 #ece6fb; border: 0; padding: 0; cursor: pointer; text-align: left; display: block; width: 100%; }
.vpreview { position: relative; height: 120px; background-color: #a7d98a; background-image: radial-gradient(#93cb74 1.5px, transparent 2px), radial-gradient(#b9e39e 1.3px, transparent 1.8px); background-size: 16px 16px, 21px 21px; background-position: 0 0, 8px 10px; }
.vpreview span { position: absolute; image-rendering: pixelated; }
.vpreview svg { display: block; width: 100%; height: auto; }
.vtext { padding: 10px 14px 12px; display: flex; justify-content: space-between; align-items: baseline; }
.vtext b { font-family: var(--display); font-weight: 700; font-size: 22px; }
.vtext span { font-size: 13px; color: var(--muted); }
.mrow { display: flex; justify-content: space-between; align-items: center; padding: 11px 2px; border: 0; border-top: 1px solid #f0eff5; font-size: 15px; background: none; width: 100%; text-align: left; cursor: pointer; }
.mrow:first-child { border-top: 0; }
.conn { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.conn div { display: flex; gap: 8px; align-items: center; }
.conn i { width: 8px; height: 8px; border-radius: 50%; background: var(--mint-fill); display: inline-block; }
.conn i.off { background: #d4d2e0; }

/* ---------- module placeholder ---------- */
.soon { max-width: 520px; margin: 10vh auto 0; display: grid; gap: 14px; justify-items: center; text-align: center; }
.soon h2 { font-family: var(--display); font-size: 28px; margin: 0; }
.soon p { margin: 0; color: var(--muted); }
.back { border: 0; background: var(--lav); color: var(--lav-ink); font-weight: 800; border-radius: 999px; padding: 7px 16px; cursor: pointer; }

/* ---------- village ---------- */
.view.village-view { padding: 0; overflow: hidden; background: #a7d98a; }
#phaser { position: absolute; inset: 0; }
#phaser canvas { display: block; touch-action: none; }
.vbar { position: absolute; top: 0; left: 0; right: 0; padding: calc(var(--sat) + 10px) calc(var(--sar) + 16px) 10px calc(var(--sal) + 16px); display: flex; gap: 10px; justify-content: space-between; align-items: center; z-index: 30;
  background: linear-gradient(rgba(255,255,255,.95), rgba(255,255,255,.8)); box-shadow: 0 1px 0 rgba(0,0,0,.04); }
.vbar b { font-family: var(--display); font-weight: 700; font-size: 24px; flex: 1; }
.vbar button { border: 0; background: var(--lav); color: var(--lav-ink); border-radius: 999px; padding: 6px 14px; font-weight: 800; font-size: 13px; cursor: pointer; }
.vbar .home-btn { background: #fff; box-shadow: 0 0 0 1.5px var(--line); color: var(--ink); }
.dir { position: absolute; top: calc(var(--sat) + 64px); right: calc(var(--sar) + 12px); bottom: calc(var(--sab) + 14px); width: 200px; background: rgba(255,255,255,.96); border-radius: 18px; padding: 10px; z-index: 29;
  display: grid; grid-template-rows: auto 1fr; gap: 8px; transition: transform .25s ease, opacity .25s; box-shadow: 0 6px 20px rgba(20,22,40,.12); }
.dir.hide { transform: translateX(130%); opacity: 0; pointer-events: none; }
.dir input { width: 100%; font-size: 16px; border: 1px solid #e1e0ea; border-radius: 10px; padding: 6px 10px; background: #fff; color: var(--ink); -webkit-user-select: text; user-select: text; }
.dir ul { list-style: none; margin: 0; padding: 0; overflow-y: auto; display: grid; gap: 1px; align-content: start; }
.dir li button { width: 100%; text-align: left; font-size: 14.5px; background: none; border: 0; border-radius: 9px; padding: 6px 8px; display: flex; gap: 8px; align-items: center; cursor: pointer; }
.dir li button.on { background: var(--lav); }
.dir li i { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.dir li em { font-style: normal; font-size: 11px; color: #9a99ac; margin-left: auto; }
.card-person { position: absolute; left: calc(var(--sal) + 14px); bottom: calc(var(--sab) + 14px); z-index: 28; background: rgba(255,255,255,.96); border-radius: 16px; padding: 10px 14px; display: grid; gap: 2px; box-shadow: 0 6px 20px rgba(20,22,40,.12); max-width: 260px; }
.card-person[hidden] { display: none; }
.card-person b { font-family: var(--display); font-size: 18px; }
.card-person span { font-size: 13px; color: var(--muted); }
@media (min-width: 700px) { .dir { width: 240px; } }

@media (prefers-reduced-motion: reduce) {
  .drawer, .scrim, .dir { transition: none; }
  .lcd-pet, .lcd-pet .f2, .lcd-pet[class*="r-"], .lcd-cloud { animation: none; }
}
.toast { position: fixed; left: 50%; bottom: calc(var(--sab) + 20px); transform: translate(-50%, 20px); background: #23243a; color: #fff; padding: 8px 14px; border-radius: 12px; font-size: 14px; opacity: 0; transition: .25s; z-index: 100; pointer-events: none; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.tab[hidden] { display: none; }

/* ---------- little you: character editor ---------- */
.view.editor-view { padding: 0; overflow: hidden; }
.ed { position: absolute; inset: 0; display: grid; grid-template-rows: auto 1fr; }
.ed-bar { padding: calc(var(--sat) + 10px) calc(var(--sar) + 16px) 10px calc(var(--sal) + 16px); display: flex; gap: 10px; align-items: center; background: rgba(255,255,255,.92); box-shadow: 0 1px 0 rgba(0,0,0,.04); z-index: 2; }
.ed-bar b { font-family: var(--display); font-weight: 700; font-size: 24px; flex: 1; }
.ed-bar button { border: 0; background: var(--lav); color: var(--lav-ink); border-radius: 999px; padding: 6px 14px; font-weight: 800; font-size: 13px; cursor: pointer; }
.ed-bar .home-btn { background: #fff; box-shadow: 0 0 0 1.5px var(--line); color: var(--ink); }
.ed-main { min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); }
.ed-stage { display: grid; grid-template-columns: auto auto; justify-content: center; align-items: end; gap: 6px 18px; padding: 14px 16px 10px; }
.ed-card { position: relative; width: 132px; height: 150px; border-radius: 26px; background: linear-gradient(#f3f8ff, #eaf6e4); box-shadow: 0 0 0 1.5px var(--line), 0 4px 0 #eef0f6; display: grid; place-items: center; }
.ed-card.pop { animation: edpop .28s ease; }
.ed-big { width: 84px; image-rendering: pixelated; position: relative; z-index: 1; }
.ed-big svg { width: 100%; height: auto; display: block; }
.ed-shadow { position: absolute; bottom: 18px; width: 60px; height: 9px; border-radius: 50%; background: rgba(60,80,40,.14); }
.ed-lcd { display: grid; justify-items: center; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 700; }
.ed-lcd-in { width: 74px; height: 66px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(#cfe0a0, #b9cd86); box-shadow: inset 0 3px 6px rgba(40,56,20,.3), 0 0 0 5px #f3f5fc, 0 0 0 7px #bccdf6; }
.ed-lcd-in svg { width: 34px; height: auto; display: block; }
.ed-reset { grid-column: 1 / -1; justify-self: center; border: 0; background: none; color: var(--muted); font-size: 12.5px; text-decoration: underline; cursor: pointer; }
.ed-opts { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px calc(var(--sar) + 16px) calc(var(--sab) + 24px) calc(var(--sal) + 16px); display: grid; gap: 12px; align-content: start; }
.ed-sec { background: #fff; border-radius: 20px; padding: 12px 14px 14px; box-shadow: 0 0 0 1px var(--line), 0 2px 0 #f1f0f6; display: grid; gap: 10px; }
.ed-sec h3 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 17px; }
.ed-sub { display: block; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.chips-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: none; }
.chips-row::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; width: 66px; border: 0; border-radius: 16px; background: #f7f6fc; padding: 8px 4px 6px; display: grid; justify-items: center; gap: 4px; cursor: pointer; box-shadow: 0 0 0 1.5px transparent; transition: transform .12s; }
.chip:active { transform: scale(.95); }
.chip.on { background: var(--lav); box-shadow: 0 0 0 2px var(--lav-fill); }
.chip svg.mini { width: 34px; height: auto; display: block; }
.chip span { font-size: 11.5px; font-weight: 700; color: var(--ink); }
.sw-row { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { width: 30px; height: 30px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: var(--c); box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.08); position: relative; display: grid; place-items: center; }
.sw.on { box-shadow: 0 0 0 2.5px #fff, 0 0 0 4.5px var(--lav-fill); }
.sw.custom { background: conic-gradient(#f6a7c1, #f3d27a, #9fd6a8, #a9d4f5, #c4b2f5, #f6a7c1); }
.sw.custom.on { background: var(--c); }
.sw.custom span { width: 18px; height: 18px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: var(--lav-ink); line-height: 1; }
.sw.custom input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; padding: 0; }
@keyframes edpop { 40% { transform: scale(1.06) rotate(-2deg); } }
@media (min-width: 700px) and (min-aspect-ratio: 5/4) {
  .ed-main { grid-template-rows: none; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
  .ed-stage { align-content: center; align-items: center; grid-template-columns: auto; gap: 18px; }
  .ed-card { width: 220px; height: 250px; border-radius: 40px; }
  .ed-big { width: 140px; }
  .ed-shadow { width: 96px; height: 13px; bottom: 30px; }
  .ed-opts { padding: 14px calc(var(--sar) + 22px) 24px 6px; }
}
@media (max-height: 700px) and (max-width: 699px) { .ed-card { width: 104px; height: 118px; } .ed-big { width: 64px; } .ed-shadow { bottom: 12px; } }

/* home extras: notes on to-dos, delete, dress-up link, slot picker */
.di .tx small { display: block; font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 1px; }
.di .del { border: 0; background: none; color: #b9b7c9; font-size: 18px; line-height: 1; padding: 0 2px; cursor: pointer; }
.dress { border: 0; background: #fff; box-shadow: 0 0 0 1.5px var(--line); border-radius: 999px; padding: 5px 13px; font-weight: 800; font-size: 12.5px; color: var(--lav-ink); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.dress svg { width: 14px; height: auto; }
.add .slotpick { background: #fff; box-shadow: 0 0 0 1.5px var(--line); color: var(--muted); padding: 0 10px; min-width: 54px; }
.di.just { animation: justdone .5s ease; }
@keyframes justdone { 30% { background: var(--mint); } }
.say.fresh { animation: edpop .4s ease; }

/* sidebar: little you card */
.mecard { display: flex; gap: 12px; align-items: center; border: 0; background: #f6f4fd; border-radius: 16px; padding: 10px 12px; cursor: pointer; text-align: left; width: 100%; }
.mecard .mepic { width: 34px; }
.mecard .mepic svg { width: 100%; height: auto; display: block; }
.mecard b { font-family: var(--display); font-weight: 600; font-size: 16px; display: block; }
.mecard span { font-size: 12.5px; color: var(--muted); }

/* settings */
.settings { max-width: 560px; margin: 4vh auto 0; display: grid; gap: 14px; }
.settings h2 { font-family: var(--display); font-size: 28px; margin: 0; }
.settings .box { background: #fff; border-radius: 20px; padding: 14px 16px; box-shadow: 0 0 0 1px var(--line), 0 2px 0 #f1f0f6; display: grid; gap: 8px; }
.settings .box b { font-family: var(--display); font-weight: 600; font-size: 16px; }
.settings code { font: 13px ui-monospace, Menlo, monospace; background: #f2eefa; border-radius: 8px; padding: 6px 9px; display: block; word-break: break-all; -webkit-user-select: text; user-select: text; }
.settings p { margin: 0; color: var(--muted); font-size: 14px; }
.settings a { color: var(--lav-ink); font-weight: 700; }
