/* MineCrib — baby's first server panel. Bright, round, big. */

@font-face { font-family: "Fredoka"; src: url(fonts/fredoka-latin.woff2) format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Patrick Hand"; src: url(fonts/patrickhand-latin.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Comic Mono"; src: url(fonts/comicmono.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Comic Mono"; src: url(fonts/comicmono-bold.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --pink: #ff8fc8;   --pink-d: #e0609f;   --pink-l: #ffe3f1;
  --blue: #7ccaff;   --blue-d: #4b9fe0;   --blue-l: #e0f3ff;
  --yellow: #ffd84d; --yellow-d: #e2ad16; --yellow-l: #fff7cc;
  --mint: #63dea0;   --mint-d: #2fb373;   --mint-l: #dafbe9;
  --lilac: #b9a1ff;  --lilac-d: #8b6de8;  --lilac-l: #efe9ff;
  --peach: #ffb085;  --peach-d: #ec8455;  --peach-l: #ffece0;
  --ink: #4b2f6b;
  --ink-2: #7b6196;
  --ink-3: #a894bd;
  --card: #ffffff;
  --cream: #fffdf6;
  --r-xl: 40px; --r-lg: 30px; --r-md: 22px; --r-sm: 14px;
  --shadow: 0 8px 0 rgba(75, 47, 107, .07), 0 20px 44px rgba(75, 47, 107, .13);
  --font: "Fredoka", "Baloo 2", "Nunito", "Varela Round", "Arial Rounded MT Bold", "Comic Sans MS", system-ui, sans-serif;
  --hand: "Patrick Hand", "Comic Sans MS", "Chalkboard SE", var(--font);
  --mono: "Comic Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--ink);
  font: 400 21px/1.45 var(--font);
  background:
    radial-gradient(circle at 12% 18%, rgba(255,255,255,.9) 0 2px, transparent 3px) 0 0 / 90px 90px,
    radial-gradient(circle at 70% 60%, rgba(255,216,77,.55) 0 3px, transparent 4px) 0 0 / 130px 130px,
    radial-gradient(circle at 40% 85%, rgba(255,143,200,.35) 0 3px, transparent 4px) 0 0 / 160px 160px,
    linear-gradient(180deg, #bfe6ff 0%, #e4f4ff 38%, #fff4fa 75%, #fff9e8 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue-d); }
::selection { background: var(--yellow); }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- floating clouds ---------- */
.sky { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.cloud {
  position: absolute; width: 220px; height: 70px; background: #fff; border-radius: 70px; opacity: .85;
  filter: drop-shadow(0 10px 12px rgba(124,202,255,.25)); animation: drift linear infinite;
}
.cloud::before, .cloud::after { content: ""; position: absolute; background: #fff; border-radius: 50%; }
.cloud::before { width: 100px; height: 100px; top: -50px; left: 30px; }
.cloud::after { width: 70px; height: 70px; top: -32px; left: 110px; }
.cloud.c1 { top: 9%;  transform: scale(.9); animation-duration: 95s; animation-delay: -20s; }
.cloud.c2 { top: 34%; transform: scale(.6); animation-duration: 130s; animation-delay: -70s; opacity: .7; }
.cloud.c3 { top: 64%; transform: scale(1.1); animation-duration: 160s; animation-delay: -110s; opacity: .6; }
.cloud.c4 { top: 82%; transform: scale(.7); animation-duration: 115s; animation-delay: -5s; opacity: .55; }
@keyframes drift { from { left: -260px; } to { left: 110%; } }
@media (prefers-reduced-motion: reduce) { .cloud { animation: none; left: 10%; } * { animation-duration: .01ms !important; } }

/* ---------- layout ---------- */
#app { position: relative; z-index: 1; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px 140px; }
header.top {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  max-width: 1120px; margin: 0 auto; padding: 18px 20px 8px;
}
.logo { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.logo-mascot { width: 64px; height: 64px; flex: none; }
.blocks { display: flex; gap: 4px; flex-wrap: wrap; }
.blocks span {
  display: inline-grid; place-items: center; width: 40px; height: 44px; border-radius: 12px;
  font: 700 28px/1 var(--font); color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.18);
  box-shadow: inset 0 -6px 0 rgba(0,0,0,.12), 0 4px 0 rgba(75,47,107,.12);
}
.blocks span:nth-child(6n+1) { background: var(--pink);   transform: rotate(-6deg); }
.blocks span:nth-child(6n+2) { background: var(--blue);   transform: rotate(4deg) translateY(3px); }
.blocks span:nth-child(6n+3) { background: var(--yellow); color: var(--ink); text-shadow: none; transform: rotate(-3deg); }
.blocks span:nth-child(6n+4) { background: var(--mint);   transform: rotate(5deg) translateY(-2px); }
.blocks span:nth-child(6n+5) { background: var(--lilac);  transform: rotate(-4deg) translateY(2px); }
.blocks span:nth-child(6n+6) { background: var(--peach);  transform: rotate(3deg); }
.blocks.big span { width: 64px; height: 70px; font-size: 46px; border-radius: 18px; }
.logo-sub { font: 600 15px/1.1 var(--font); color: var(--ink-2); margin-top: 6px; letter-spacing: .02em; }
.spacer { flex: 1; }
.who { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; background: #fff; border-radius: 999px;
  padding: 8px 16px; font-weight: 600; font-size: 18px; box-shadow: 0 4px 0 rgba(75,47,107,.08);
}
.chip .av { font-size: 26px; line-height: 1; }

nav.tabs {
  display: flex; gap: 12px; flex-wrap: wrap; max-width: 1120px; margin: 6px auto 24px; padding: 0 20px;
}
nav.tabs a {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink);
  font: 600 21px/1 var(--font); padding: 16px 22px; border-radius: 999px; background: rgba(255,255,255,.75);
  box-shadow: 0 5px 0 rgba(75,47,107,.08); transition: transform .12s, background .12s;
}
nav.tabs a .e { font-size: 28px; }
nav.tabs a:hover { transform: translateY(-3px) rotate(-1deg); background: #fff; }
nav.tabs a.on { background: var(--ink); color: #fff; box-shadow: 0 5px 0 #2f1b45; }
nav.tabs a .count {
  background: var(--pink); color: #fff; border-radius: 999px; padding: 3px 10px; font-size: 16px;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 50% { transform: scale(1.15); } }

/* ---------- cards ---------- */
.card {
  background: var(--card); border-radius: var(--r-xl); padding: 30px; box-shadow: var(--shadow);
  border: 5px solid var(--blue-l); margin-bottom: 26px; position: relative;
}
.card.pink { border-color: var(--pink-l); }
.card.yellow { border-color: var(--yellow-l); }
.card.mint { border-color: var(--mint-l); }
.card.lilac { border-color: var(--lilac-l); }
.card.peach { border-color: var(--peach-l); }
h1, h2, h3 { margin: 0 0 14px; line-height: 1.15; }
h1 { font: 700 46px/1.1 var(--font); }
h2 { font: 700 34px/1.15 var(--font); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
h3 { font: 600 25px/1.2 var(--font); }
.lead { font-size: 23px; color: var(--ink-2); margin: -4px 0 20px; }
.muted { color: var(--ink-2); }
.small { font-size: 17px; }
.tiny { font-size: 15px; color: var(--ink-3); }
.row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 22px; }
.stack > * + * { margin-top: 14px; }

/* ---------- buttons ---------- */
.btn {
  --c: var(--blue); --cd: var(--blue-d); --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  border: 0; border-radius: 999px; cursor: pointer; text-decoration: none; white-space: nowrap;
  background: var(--c); color: var(--fg); font: 600 24px/1 var(--font);
  padding: 20px 32px; min-height: 72px;
  box-shadow: 0 8px 0 var(--cd), 0 16px 26px rgba(75,47,107,.16);
  text-shadow: 0 2px 0 rgba(0,0,0,.14);
  transition: transform .08s ease, box-shadow .08s ease, filter .15s;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn .e { font-size: 32px; text-shadow: none; }
.btn:hover:not([disabled]) { filter: brightness(1.05) saturate(1.1); animation: wiggle .45s ease; }
.btn:active:not([disabled]) { transform: translateY(6px); box-shadow: 0 2px 0 var(--cd), 0 6px 12px rgba(75,47,107,.15); animation: none; }
.btn:focus-visible { outline: 5px solid var(--yellow); outline-offset: 4px; }
.btn[disabled] { filter: grayscale(.85); opacity: .5; cursor: not-allowed; }
.btn.huge { font-size: 30px; padding: 26px 40px; min-height: 92px; }
.btn.huge .e { font-size: 44px; }
.btn.sm { font-size: 19px; padding: 12px 20px; min-height: 52px; box-shadow: 0 5px 0 var(--cd), 0 10px 16px rgba(75,47,107,.12); }
.btn.sm .e { font-size: 24px; }
.btn.sm:active:not([disabled]) { transform: translateY(4px); box-shadow: 0 1px 0 var(--cd); }
.btn.icon { padding: 0; width: 58px; min-height: 58px; height: 58px; font-size: 26px; }
.btn.sun   { --c: var(--yellow); --cd: var(--yellow-d); --fg: var(--ink); text-shadow: none; }
.btn.moon  { --c: var(--lilac);  --cd: var(--lilac-d); }
.btn.mint  { --c: var(--mint);   --cd: var(--mint-d); }
.btn.pink  { --c: var(--pink);   --cd: var(--pink-d); }
.btn.peach { --c: var(--peach);  --cd: var(--peach-d); }
.btn.ghost { --c: #fff; --cd: #e6dcef; --fg: var(--ink); text-shadow: none; }
.btn.danger { --c: #ff7a8a; --cd: #d94a5d; }
@keyframes wiggle { 25% { transform: rotate(-2deg) scale(1.03); } 50% { transform: rotate(2deg) scale(1.03); } 75% { transform: rotate(-1deg); } }

/* ---------- forms ---------- */
.field { display: grid; gap: 8px; margin-bottom: 16px; align-content: start; }
.field > span { font-weight: 600; font-size: 19px; }
.input, select.input, textarea.input {
  width: 100%; border: 4px solid var(--blue-l); border-radius: var(--r-md); background: var(--cream);
  padding: 16px 20px; font-size: 22px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 6px rgba(124,202,255,.25); }
textarea.input { min-height: 120px; resize: vertical; line-height: 1.4; }
.input.big { font-size: 28px; padding: 20px 26px; border-radius: var(--r-lg); }
.switch { display: flex; align-items: center; gap: 14px; cursor: pointer; padding: 8px 0; font-size: 19px; }
.switch input { appearance: none; width: 64px; height: 38px; border-radius: 999px; background: #e7dff0; position: relative; cursor: pointer; flex: none; transition: background .15s; }
.switch input::after { content: ""; position: absolute; top: 5px; left: 5px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: left .15s; }
.switch input:checked { background: var(--mint); }
.switch input:checked::after { left: 31px; }
.switch input:focus-visible { outline: 4px solid var(--yellow); outline-offset: 2px; }
.seg { display: inline-flex; background: #f3eef8; border-radius: 999px; padding: 5px; gap: 4px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; border-radius: 999px; padding: 10px 16px; cursor: pointer; font-weight: 600; font-size: 17px; }
.seg button.on { background: #fff; box-shadow: 0 3px 0 rgba(75,47,107,.12); }
.seg button.on.deny { background: var(--pink-l); }
.seg button.on.ask { background: var(--yellow-l); }
.seg button.on.allow { background: var(--mint-l); }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 30px 18px 60px; }
.login-box { width: min(920px, 100%); text-align: center; }
.login-box .card { padding: 40px 28px; }
.bubbles { display: flex; justify-content: center; gap: 28px; flex-wrap: wrap; margin: 26px 0 10px; }
.bubble {
  border: 0; background: var(--pink-l); width: 190px; padding: 22px 12px 18px; border-radius: 48px; cursor: pointer;
  display: grid; justify-items: center; gap: 10px; box-shadow: 0 8px 0 rgba(75,47,107,.08);
  transition: transform .15s; font-weight: 600; font-size: 24px;
}
.bubble:nth-child(2n) { background: var(--blue-l); }
.bubble.admin { background: var(--lilac-l); }
.bubble .face { font-size: 76px; line-height: 1; width: 120px; height: 120px; display: grid; place-items: center; background: #fff; border-radius: 50%; box-shadow: inset 0 -6px 0 rgba(75,47,107,.06); }
.bubble .tag { font-size: 15px; color: var(--ink-2); font-weight: 500; }
.bubble:hover { transform: translateY(-6px) rotate(-2deg); }
.bubble.on { outline: 6px solid var(--yellow); transform: scale(1.06); animation: bounce .5s; }
@keyframes bounce { 30% { transform: scale(1.12); } 60% { transform: scale(.98); } }
.pw-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.pw-row .input { max-width: 420px; text-align: center; }
.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-12px); } 40%, 80% { transform: translateX(12px); } }

/* ---------- mascot & speech ---------- */
.mascot { width: 170px; height: 170px; flex: none; animation: bob 3.2s ease-in-out infinite; }
.mascot.sm { width: 110px; height: 110px; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-2deg); } }
.mascot .zzz { font: 700 22px var(--font); fill: var(--lilac-d); animation: zzz 2.6s ease-in-out infinite; }
.mascot .zzz.z2 { animation-delay: .8s; }
.mascot .zzz.z3 { animation-delay: 1.6s; }
@keyframes zzz { 0% { opacity: 0; transform: translate(0, 0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(12px, -26px); } }
.mascot .wave-hand { transform-box: view-box; transform-origin: 162px 120px; animation: wave 1.1s ease-in-out infinite; }
@keyframes wave { 50% { transform: rotate(-28deg); } }
.speech {
  position: relative; background: #fff; border: 4px solid var(--yellow-l); border-radius: 30px; padding: 18px 24px;
  font: 400 26px/1.3 var(--hand); color: var(--ink); max-width: 640px;
}
.speech::before {
  content: ""; position: absolute; left: -22px; top: 32px; border: 12px solid transparent; border-right: 14px solid var(--yellow-l);
}
.speech.from-parent { border-color: var(--lilac-l); background: #fbf9ff; }
.speech.from-parent::before { border-right-color: var(--lilac-l); }

/* ---------- home ---------- */
.status-card { display: flex; gap: 30px; align-items: center; flex-wrap: wrap; }
.status-card .mascot { width: 200px; height: 200px; }
.status-text { flex: 1; min-width: 280px; }
.state-big { font: 700 44px/1.1 var(--font); margin: 0 0 8px; }
.state-sub { font: 400 27px/1.3 var(--hand); color: var(--ink-2); margin: 0 0 16px; }
.facts { display: flex; gap: 12px; flex-wrap: wrap; }
.fact { background: var(--blue-l); border-radius: 18px; padding: 10px 16px; font-size: 18px; font-weight: 500; }
.fact.y { background: var(--yellow-l); } .fact.p { background: var(--pink-l); } .fact.m { background: var(--mint-l); } .fact.l { background: var(--lilac-l); }
.power { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 26px; }
.state-dot { width: 22px; height: 22px; border-radius: 50%; display: inline-block; background: var(--ink-3); box-shadow: 0 0 0 6px rgba(168,148,189,.25); }
.state-dot.running { background: var(--mint); box-shadow: 0 0 0 6px rgba(99,222,160,.3); animation: pulse 2s infinite; }
.state-dot.starting, .state-dot.stopping { background: var(--yellow); box-shadow: 0 0 0 6px rgba(255,216,77,.35); animation: pulse 1s infinite; }
.state-dot.crashed, .state-dot.error, .state-dot.bad_path { background: #ff7a8a; box-shadow: 0 0 0 6px rgba(255,122,138,.3); }
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.quick a { text-decoration: none; color: inherit; }
.tile {
  border-radius: var(--r-lg); padding: 24px; background: #fff; box-shadow: var(--shadow); display: grid; gap: 6px;
  transition: transform .15s; border: 4px solid transparent; height: 100%;
}
.tile:hover { transform: translateY(-5px) rotate(-1deg); border-color: var(--yellow-l); }
.tile .e { font-size: 50px; line-height: 1; }
.tile b { font-size: 25px; }

/* ---------- console ---------- */
.console {
  background: var(--cream); border: 5px solid var(--lilac-l); border-radius: var(--r-lg);
  height: 56vh; min-height: 300px; overflow: auto; padding: 16px 18px; font: 400 15px/1.55 var(--mono);
  white-space: pre-wrap; word-break: break-word; overscroll-behavior: contain;
}
.console .ln { padding: 1px 6px; border-radius: 8px; }
.console .ln.warn { background: #fff3d6; color: #8a5a00; }
.console .ln.err { background: #ffe3e8; color: #a3243b; }
.console .ln.chat { background: #e9f6ff; color: #1d5f93; }
.console .ln.join { color: #187a4b; }
.console .ln.panel { background: var(--lilac-l); color: #5a3fb0; font-weight: 700; margin: 4px 0; padding: 4px 10px; }
.console .empty { font: 400 24px var(--hand); color: var(--ink-3); text-align: center; padding: 40px 10px; }
.cmd-row { display: flex; gap: 14px; margin-top: 18px; }
.cmd-row .input { flex: 1; font-family: var(--mono); font-size: 21px; }
.presets { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 16px; }
.presets button { border: 0; background: var(--yellow-l); border-radius: 999px; padding: 10px 18px; font-weight: 600; font-size: 18px; cursor: pointer; box-shadow: 0 4px 0 rgba(226,173,22,.35); }
.presets button:hover { transform: translateY(-2px); }
.presets button:active { transform: translateY(3px); box-shadow: none; }

/* ---------- files ---------- */
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; font-size: 20px; }
.crumbs a { text-decoration: none; background: #fff; padding: 9px 16px; border-radius: 999px; color: var(--ink); font-weight: 600; box-shadow: 0 4px 0 rgba(75,47,107,.08); }
.crumbs a:hover { background: var(--yellow-l); }
.crumbs .sep { color: var(--ink-3); font-weight: 700; }
.banner { border-radius: var(--r-md); padding: 16px 22px; font: 400 25px/1.3 var(--hand); margin-bottom: 18px; display: flex; gap: 14px; align-items: center; }
.banner .e { font-size: 38px; }
.banner.allow { background: var(--mint-l); }
.banner.ask { background: var(--yellow-l); }
.banner.deny { background: var(--pink-l); }
.banner.gone { background: #ffe3e8; }
.files { display: grid; gap: 12px; }
.file {
  display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-radius: var(--r-md); background: #fbf9fd;
  border: 3px solid transparent; transition: background .12s, border-color .12s;
}
.file:hover { background: #fff; border-color: var(--blue-l); }
.file .ico { font-size: 40px; width: 52px; text-align: center; flex: none; cursor: default; }
.file .nm { flex: 1; min-width: 0; }
.file .nm a, .file .nm b { font-weight: 600; font-size: 22px; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.file .nm a:hover { text-decoration: underline wavy var(--pink); }
.file .meta { font-size: 16px; color: var(--ink-2); }
.file .acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.file.added { background: var(--mint-l); }
.file.modified { background: var(--yellow-l); }
.file.deleted { background: #fff0f3; }
.file.deleted .nm a, .file.deleted .nm b { text-decoration: line-through; text-decoration-color: #ff7a8a; text-decoration-thickness: 3px; color: var(--ink-2); }
.file.locked { opacity: .65; }
.badge { display: inline-block; border-radius: 999px; padding: 3px 12px; font-size: 15px; font-weight: 600; margin-left: 8px; vertical-align: 3px; }
.badge.added { background: var(--mint); color: #fff; }
.badge.modified { background: var(--yellow); }
.badge.deleted { background: #ff7a8a; color: #fff; }
.badge.inside { background: var(--lilac-l); color: var(--lilac-d); }
.badge.deny { background: var(--pink-l); }
.badge.ask { background: var(--yellow-l); }
.badge.allow { background: var(--mint-l); }
.badge.link { background: #eee; }
.empty-box { text-align: center; font: 400 28px var(--hand); color: var(--ink-3); padding: 40px 0; }
.empty-box .e { font-size: 70px; display: block; }
.dropzone {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(124,202,255,.55);
  backdrop-filter: blur(4px); font: 700 56px var(--font); color: #fff; text-shadow: 0 4px 0 rgba(0,0,0,.15);
  border: 14px dashed #fff; pointer-events: none;
}
.uploads { display: grid; gap: 10px; margin-bottom: 18px; }
.up { background: #fff; border-radius: 18px; padding: 12px 16px; font-size: 18px; box-shadow: 0 4px 0 rgba(75,47,107,.06); }
.bar { height: 16px; background: #f1ebf7; border-radius: 99px; overflow: hidden; margin-top: 8px; }
.bar i {
  display: block; height: 100%; width: 0; border-radius: 99px; transition: width .2s;
  background: repeating-linear-gradient(-45deg, var(--pink) 0 14px, var(--yellow) 14px 28px, var(--mint) 28px 42px, var(--blue) 42px 56px);
  background-size: 200% 100%; animation: candy 1.2s linear infinite;
}
@keyframes candy { to { background-position: -79px 0; } }
.wishbar {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 40; width: min(860px, calc(100% - 24px));
  background: var(--ink); color: #fff; border-radius: 999px; padding: 12px 12px 12px 28px; display: flex; align-items: center; gap: 16px;
  box-shadow: 0 14px 40px rgba(75,47,107,.35); animation: rise .35s ease-out;
}
.wishbar .txt { flex: 1; font-size: 21px; font-weight: 600; }
@keyframes rise { from { transform: translate(-50%, 120%); } }

/* ---------- wishes ---------- */
.wish { display: flex; gap: 16px; align-items: center; padding: 14px 18px; border-radius: var(--r-md); background: #fbf9fd; flex-wrap: wrap; }
.wish + .wish { margin-top: 10px; }
.wish .e { font-size: 34px; }
.wish .body { flex: 1; min-width: 220px; }
.req { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.req + .req { margin-top: 16px; padding-top: 16px; border-top: 3px dashed #efe7f6; }
.req .stamp { font-size: 52px; line-height: 1; }
.req .body { flex: 1; min-width: 240px; }
.status-pill { display: inline-block; border-radius: 999px; padding: 6px 16px; font-weight: 700; font-size: 18px; }
.status-pill.pending { background: var(--yellow-l); }
.status-pill.approved { background: var(--mint-l); color: #187a4b; }
.status-pill.partial { background: var(--blue-l); color: #1d5f93; }
.status-pill.denied, .status-pill.failed { background: var(--pink-l); color: #a3243b; }
.status-pill.draft { background: var(--lilac-l); }

/* ---------- guide (story book) ---------- */
.book { display: grid; grid-template-columns: auto 1fr; gap: 30px; align-items: center; }
.book .page-art { font-size: 120px; line-height: 1; text-align: center; width: 200px; }
.book .page-text { font: 400 30px/1.35 var(--hand); }
.book .page-text b { font-family: var(--font); font-weight: 600; }
.book .page-no { font-size: 17px; color: var(--ink-3); margin-top: 10px; }
.dots { display: flex; gap: 10px; justify-content: center; margin-top: 22px; }
.dots i { width: 16px; height: 16px; border-radius: 50%; background: #e8dff2; }
.dots i.on { background: var(--pink); transform: scale(1.3); }

/* ---------- modal & toast ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 100; background: rgba(75,47,107,.35); display: grid; place-items: center; padding: 18px; backdrop-filter: blur(3px); animation: fade .15s; }
.modal { background: #fff; border-radius: var(--r-xl); padding: 34px; width: min(720px, 100%); max-height: 92vh; overflow: auto; box-shadow: 0 30px 80px rgba(75,47,107,.35); border: 6px solid var(--yellow-l); animation: pop .25s cubic-bezier(.2,1.6,.4,1); }
.modal.wide { width: min(1080px, 100%); }
.modal .acts { display: flex; gap: 14px; flex-wrap: wrap; justify-content: flex-end; margin-top: 22px; }
.modal .q { font: 400 30px/1.3 var(--hand); margin: 0 0 8px; }
@keyframes pop { from { transform: scale(.7); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.toasts { position: fixed; right: 18px; top: 18px; z-index: 200; display: grid; gap: 10px; width: min(460px, calc(100% - 24px)); pointer-events: none; }
.toast { background: #fff; border-radius: 26px; padding: 16px 22px; font: 400 24px/1.25 var(--hand); box-shadow: 0 16px 40px rgba(75,47,107,.25); border: 4px solid var(--mint-l); display: flex; gap: 14px; align-items: center; animation: pop .3s cubic-bezier(.2,1.6,.4,1); pointer-events: auto; }
.toast .e { font-size: 36px; }
.toast.err { border-color: var(--pink-l); }
.confetti { position: fixed; top: -60px; z-index: 300; pointer-events: none; font-size: 34px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(115vh) rotate(720deg); } }

/* ---------- editor ---------- */
.editor { width: 100%; min-height: 55vh; font: 400 16px/1.5 var(--mono); border: 4px solid var(--blue-l); border-radius: var(--r-md); padding: 16px; background: var(--cream); tab-size: 4; white-space: pre; overflow: auto; }

/* ---------- grown-up settings ---------- */
.subtabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.subtabs a { text-decoration: none; color: var(--ink); background: rgba(255,255,255,.8); padding: 11px 18px; border-radius: 999px; font-weight: 600; font-size: 19px; box-shadow: 0 4px 0 rgba(75,47,107,.07); }
.subtabs a.on { background: var(--lilac); color: #fff; box-shadow: 0 4px 0 var(--lilac-d); }
.grownup { font-size: 19px; }
.grownup .input { font-size: 19px; padding: 12px 16px; border-width: 3px; }
.grownup h2 { font-size: 30px; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 4px 20px; }
.rule-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.rule-row .input { flex: 1; min-width: 160px; font-family: var(--mono); }
table.audit { width: 100%; border-collapse: collapse; font-size: 16px; }
table.audit td, table.audit th { text-align: left; padding: 8px 10px; border-bottom: 2px solid #f3eef8; vertical-align: top; }
table.audit td.d { font-family: var(--mono); font-size: 14px; overflow-wrap: anywhere; }
table.audit tr.bad td { color: #a3243b; }
pre.peek { background: #1f1630; color: #e9e1f5; border-radius: var(--r-md); padding: 16px; font: 13px/1.45 var(--mono); max-height: 60vh; overflow: auto; white-space: pre-wrap; }
code.k { font-family: var(--mono); background: #f3eef8; padding: 2px 8px; border-radius: 8px; font-size: .9em; }
.okmark { color: var(--mint-d); font-weight: 700; } .nomark { color: #d94a5d; font-weight: 700; }

/* ---------- diff (shared look with the monitor app) ---------- */
.dv-sum { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.dv-file { border: 4px solid #efe7f6; border-radius: var(--r-md); overflow: hidden; margin-bottom: 16px; background: #fff; }
.dv-file.conflict { border-color: #ffb3c0; }
.dv-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #faf7fd; cursor: pointer; flex-wrap: wrap; }
.dv-head .ic { font-size: 28px; }
.dv-path { flex: 1; min-width: 160px; font-weight: 600; overflow-wrap: anywhere; font-size: 19px; }
.dv-path .dir { color: var(--ink-3); font-weight: 500; }
.dv-st { font-family: var(--mono); font-size: 15px; font-weight: 700; }
.dv-st .a { color: #187a4b; } .dv-st .d { color: #c0354d; }
.dv-pick { display: flex; align-items: center; gap: 6px; font-size: 16px; cursor: pointer; }
.dv-pick input { width: 26px; height: 26px; accent-color: var(--mint-d); }
.dv-body { border-top: 3px solid #efe7f6; }
.dv-body.closed { display: none; }
.dv-warn { background: #fff0f3; color: #a3243b; padding: 10px 16px; font-size: 17px; font-weight: 600; }
.dv-info { padding: 14px 16px; display: grid; gap: 8px; font-size: 17px; }
.dv-info .mod { background: var(--blue-l); border-radius: 14px; padding: 10px 14px; }
.dv-info .mod.old { background: #fff0f3; }
.dv-info .mod b { font-size: 19px; }
.dv-code { font: 400 13.5px/1.5 var(--mono); overflow-x: auto; background: #fff; }
.dv-code.wrap .ln code { white-space: pre-wrap; word-break: break-word; }
.dv-code .ln { display: grid; grid-template-columns: 3.4em 3.4em 1.4em 1fr; min-width: max-content; }
.dv-code.wrap .ln { min-width: 0; }
.dv-code .ln span { color: #b2a3c4; text-align: right; padding-right: 6px; user-select: none; }
.dv-code .ln span.t { text-align: center; padding: 0; }
.dv-code .ln code { white-space: pre; padding-right: 14px; font: inherit; }
.dv-code .ln.add { background: #e3fbea; } .dv-code .ln.add span.t { color: #187a4b; }
.dv-code .ln.del { background: #ffe9ee; } .dv-code .ln.del span.t { color: #c0354d; }
.dv-code .hunk { background: var(--lilac-l); color: var(--lilac-d); padding: 4px 12px; font-weight: 700; }
.dv-code .gap { background: #f8f5fb; color: var(--ink-3); text-align: center; padding: 3px; font-family: var(--font); font-size: 14px; }
.dv-res { padding: 8px 16px; font-weight: 600; font-size: 16px; }
.dv-res.ok { background: var(--mint-l); color: #187a4b; } .dv-res.skip { background: #f3eef8; } .dv-res.bad { background: #ffe9ee; color: #a3243b; }

@media (max-width: 720px) {
  body { font-size: 19px; }
  h1 { font-size: 36px; } h2 { font-size: 28px; }
  .blocks span { width: 30px; height: 34px; font-size: 22px; border-radius: 9px; }
  .logo-mascot { width: 48px; height: 48px; }
  nav.tabs { gap: 8px; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 8px; }
  nav.tabs a { font-size: 17px; padding: 12px 16px; flex: none; }
  nav.tabs a .e { font-size: 22px; }
  .card { padding: 20px; border-radius: 30px; }
  .btn { font-size: 21px; padding: 16px 24px; min-height: 64px; }
  .btn.huge { font-size: 24px; min-height: 78px; padding: 20px 28px; }
  .status-card { gap: 10px; }
  .status-card > div:first-child { width: 100%; display: flex; justify-content: center; }
  .status-card .mascot { width: 130px; height: 130px; }
  header.top { gap: 10px; padding-top: 12px; }
  .logo-sub { font-size: 12px; }
  .who { width: 100%; justify-content: space-between; }
  .who .chip { font-size: 16px; padding: 6px 12px; }
  .who .btn.sm { font-size: 16px; min-height: 44px; padding: 8px 14px; }
  .toasts { left: 12px; right: 12px; top: 12px; width: auto; }
  .power .btn.huge { flex: 1 1 100%; }
  .state-big { font-size: 34px; }
  .book { grid-template-columns: 1fr; text-align: center; }
  .book .page-art { width: auto; font-size: 90px; }
  .book .page-text { font-size: 25px; }
  .file { flex-wrap: wrap; }
  .file .acts { width: 100%; justify-content: flex-start; }
  .cmd-row { flex-direction: column; }
  .wishbar { border-radius: 30px; flex-direction: column; padding: 16px; text-align: center; }
  .speech::before { display: none; }
}
