:root {
  --bg: #15171b;
  --panel: #1e2127;
  --panel2: #262a31;
  --line: #343943;
  --text: #eef0f3;
  --muted: #a3a9b4;
  --lime: #c6ff1a;
  --lime-dim: #8fb816;
  --purple: #8b6cf0;
  --purple-dim: #3a2f63;
  --amber: #f2b33d;
  --red: #ff7a6b;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.45; -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
a { color: var(--lime); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* header */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: rgba(21,23,27,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { font-weight: 900; font-style: italic; letter-spacing: .02em; text-transform: uppercase; font-size: 18px; flex: 1; display: flex; align-items: center; gap: 8px; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.brand b { color: var(--lime); }
.iconbtn { position: relative; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; font-size: 19px; }
.badge { position: absolute; top: -4px; right: -4px; background: var(--lime); color: #111; font-size: 11px; font-weight: 800; border-radius: 10px; padding: 1px 6px; }

main { max-width: 760px; margin: 0 auto; padding: 16px; }
h1, h2, h3 { font-style: italic; text-transform: uppercase; letter-spacing: .02em; line-height: 1.15; margin: 0 0 10px; }
h1 { font-size: 26px; font-weight: 900; }
h2 { font-size: 19px; font-weight: 850; margin-top: 22px; }
h3 { font-size: 15px; font-weight: 800; }
.sub { color: var(--muted); margin: -4px 0 14px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* bottom nav */
nav.tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; display: flex; background: #101215; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
nav.tabs a { flex: 1; text-align: center; padding: 9px 2px 8px; color: var(--muted); text-decoration: none; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; min-height: 56px; }
nav.tabs a span { display: block; font-size: 20px; line-height: 1.2; }
nav.tabs a.on { color: var(--lime); }
nav.tabs a .badge { position: static; display: inline-block; margin-left: 2px; }

/* cards */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 0 0 12px; }
.card.lime { border-color: var(--lime-dim); }
.card.purple { border-color: var(--purple); background: linear-gradient(0deg, var(--panel), #232036); }
.card.amber { border-color: var(--amber); }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 900px) { main { max-width: 1100px; } .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; } }

.pill { display: inline-block; border-radius: 999px; padding: 3px 10px; font-size: 12.5px; font-weight: 800; background: var(--panel2); border: 1px solid var(--line); white-space: nowrap; }
.pill.lime { background: var(--lime); color: #111; border-color: var(--lime); }
.pill.purple { background: var(--purple-dim); border-color: var(--purple); color: #e3dcff; }
.pill.amber { background: #3d2f12; border-color: var(--amber); color: #ffd98a; }
.pill.ok { background: #1f3a12; border-color: var(--lime-dim); color: var(--lime); }
.pill.grey { color: var(--muted); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel2); font-weight: 800; cursor: pointer; text-decoration: none; text-transform: uppercase; font-style: italic; letter-spacing: .02em; font-size: 14.5px; }
.btn.primary { background: var(--lime); color: #111; border-color: var(--lime); }
.btn.purple { background: var(--purple); border-color: var(--purple); color: #fff; }
.btn.danger { color: var(--red); }
.btn.block { width: 100%; }
.btn.small { min-height: 38px; padding: 6px 12px; font-size: 13px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; }
.btnrow .btn { flex: 1; }

/* forms */
label.f { display: block; font-weight: 700; font-size: 14px; margin: 12px 0 6px; }
.hint { color: var(--muted); font-size: 13px; font-weight: 400; margin-top: 4px; }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=time], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: #121418; font-size: 16px;
}
textarea { min-height: 120px; resize: vertical; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 42px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel2); font-weight: 800; cursor: pointer; }
.chip[aria-pressed=true] { background: var(--lime); color: #111; border-color: var(--lime); }
.seg { display: flex; background: #121418; border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { flex: 1; min-height: 40px; border: 0; border-radius: 9px; background: transparent; font-weight: 800; cursor: pointer; font-size: 14px; }
.seg button[aria-pressed=true] { background: var(--purple); color: #fff; }

/* task card */
.task h3 { margin: 0; text-transform: none; font-style: normal; font-size: 17px; }
.task .meta { color: var(--muted); font-size: 13px; }
.check { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: #121418; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-height: 48px; cursor: pointer; margin-top: 8px; font-size: 15.5px; }
.check .box { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 7px; border: 2px solid var(--muted); display: grid; place-items: center; font-weight: 900; color: #111; }
.check[aria-checked=true] { border-color: var(--lime-dim); }
.check[aria-checked=true] .box { background: var(--lime); border-color: var(--lime); }
.check[aria-checked=true] .lbl { color: var(--muted); text-decoration: line-through; }
.check[disabled] { cursor: default; }
.fixnote { background: #3d2f12; border: 1px solid var(--amber); border-radius: 10px; padding: 8px 12px; margin-top: 8px; color: #ffe2a6; }

/* progress */
.bar { height: 10px; background: #0f1114; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); }
.bar > i { display: block; height: 100%; background: var(--lime); }
.bar.purple > i { background: var(--purple); }
.big { font-size: 40px; font-weight: 900; font-style: italic; line-height: 1; }
.timer { font-size: 54px; font-weight: 900; font-variant-numeric: tabular-nums; font-style: italic; color: var(--lime); text-align: center; letter-spacing: .02em; }

/* lists */
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.day h3 { margin-top: 16px; color: var(--muted); }
.day.today h3 { color: var(--lime); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th, table.t td { border-bottom: 1px solid var(--line); padding: 7px 6px; text-align: left; }
table.t th { color: var(--muted); font-weight: 700; }

/* preview calendar */
.cal { display: grid; gap: 8px; }
.calday { background: var(--panel2); border-radius: 10px; padding: 8px 10px; }
.calday .d { font-weight: 800; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.slotbtn { border: 1px solid var(--line); background: #121418; border-radius: 8px; padding: 6px 8px; margin: 3px 4px 3px 0; min-height: 36px; cursor: pointer; font-size: 13px; font-weight: 700; }
.slotbtn.c0 { border-color: var(--lime-dim); }
.slotbtn.c1 { border-color: var(--purple); }
.slotbtn.adult { color: var(--muted); }
.slotbtn.cover { border-color: var(--red); color: var(--red); }
.slotbtn.manual::after { content: " ✎"; }

/* toast & sheet */
#toast { position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--text); color: #111; padding: 10px 16px; border-radius: 12px; font-weight: 700; z-index: 50; max-width: 92vw; box-shadow: 0 6px 24px rgba(0,0,0,.4); }
#toast.err { background: var(--red); color: #111; }
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--panel); width: 100%; max-width: 640px; max-height: 92vh; overflow: auto; border-radius: 18px 18px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); border: 1px solid var(--line); }
@media (min-width: 700px) { .sheet-bg { align-items: center; } .sheet { border-radius: 18px; } }

.hero { text-align: center; padding: 26px 8px 8px; }
.hero img { width: 96px; height: 96px; border-radius: 22px; }
.hero h1 { font-size: 30px; margin-top: 12px; }
.hero h1 b { color: var(--lime); }
.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 22px; font-weight: 800; letter-spacing: .08em; background: #121418; border: 1px dashed var(--lime-dim); border-radius: 10px; padding: 10px 14px; display: inline-block; user-select: all; }
.notice { background: var(--purple-dim); border: 1px solid var(--purple); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; }
.warn { background: #3d2f12; border: 1px solid var(--amber); border-radius: 12px; padding: 10px 12px; margin: 8px 0; color: #ffe2a6; }
.err { color: var(--red); }

/* login card for printing */
.logincard { background: #fff; color: #111; border-radius: 14px; padding: 18px; border: 2px solid #111; }
.logincard h2 { color: #111; margin-top: 0; }
.logincard .code { color: #111; background: #f4f4f4; border-color: #111; }
@media print {
  body { background: #fff; padding: 0; }
  .top, nav.tabs, .noprint, #toast { display: none !important; }
  .sheet-bg { position: static; background: none; }
  .sheet { max-height: none; border: 0; background: #fff; }
  main { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.pop { animation: pop .35s ease-out; }
@keyframes pop { from { transform: scale(.96); opacity: .4; } to { transform: none; opacity: 1; } }

/* r1.1.0: brand hero, sound button, first-login guide, Arena */
.hero { position: relative; }
.hero .hero-ninja { width: min(300px, 78vw); height: auto; border-radius: 0; display: block; margin: 0 auto 4px; filter: drop-shadow(0 8px 24px rgba(198,255,26,.12)); }
.hero-sound { position: absolute; top: 0; right: 0; }
.iconbtn[aria-pressed="false"] { opacity: .75; }
.notice.practice { border-color: #f2b33d; background: rgba(242,179,61,.12); }
#tour { position: fixed; inset: 0; z-index: 950; }
#tour .tour-shade { position: fixed; inset: 0; background: rgba(8,9,11,.72); }
#tour .tour-shade.clear { background: transparent; }
#tour .tour-spot { position: fixed; border-radius: 12px; box-shadow: 0 0 0 3px var(--lime), 0 0 0 9999px rgba(8,9,11,.72); transition: all .2s ease; pointer-events: none; }
#tour .tour-bubble { position: fixed; width: min(360px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow: auto; background: var(--panel); border: 1px solid var(--lime); border-radius: var(--radius); padding: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.5); }
#tour .tour-bubble h2 { font-size: 18px; }
#tour .tour-practice { margin-top: 10px; background: var(--panel2); }
@media (prefers-reduced-motion: reduce) { #tour .tour-spot { transition: none; } }
.arena-row { padding: 10px 0; border-top: 1px solid var(--line); }
.arena-row:first-of-type { border-top: 0; }
.arena-row.me b { color: var(--lime); }
#toast { z-index: 1100; }
/* r1.1.0: long button labels wrap inside the button instead of widening the page on phones (all screens) */
.btn { max-width: 100%; white-space: normal; text-align: center; overflow-wrap: break-word; }
.btnrow .btn { min-width: 0; }
.row > input { min-width: 0; }
#tour .btnrow .btn { flex: 0 0 auto; white-space: nowrap; }
/* r1.3.0: family profiles (F8) – avatars, signed-in chip, profile cards and editor */
.av { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; border-radius: 50%; object-fit: cover; background: var(--purple-dim); color: var(--text); font-weight: 900; font-style: normal; border: 2px solid var(--line); box-sizing: border-box; line-height: 1; }
.av.me { border: 3px solid var(--lime); }
.brand { min-width: 0; }
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mechip { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; min-width: 0; max-width: 150px; padding: 3px 12px 3px 3px; border-radius: 24px; border: 1px solid var(--purple); background: var(--panel2); color: var(--text); text-decoration: none; flex-shrink: 1; }
.mechip .mename { font-weight: 800; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.mechip:hover { border-color: var(--lime); }
/* narrow phones: the parent header already holds three buttons, so the chip shows the photo or initials only */
/* …and the header is tightened so the full app name still fits next to it */
@media (max-width: 460px) {
  .top.parent { gap: 6px; padding-left: 10px; padding-right: 10px; }
  .top.parent .mechip { padding: 3px; max-width: none; }
  .top.parent .mechip .mename { display: none; }
  .top.parent .iconbtn { width: 40px; height: 40px; }
  .top.parent .brand span { font-size: clamp(12px, 3.5vw, 18px); }
}
@media (max-width: 380px) { .top.parent .brand img { display: none; } }
.profhead { display: flex; align-items: center; gap: 12px; min-height: 56px; color: inherit; text-decoration: none; border-radius: 10px; }
.profhead:hover .pname { color: var(--lime); }
.profhead .pname { font-weight: 850; font-size: 17px; }
.profhead .chev { color: var(--muted); font-size: 22px; padding-left: 2px; }
.card.mecard { border: 2px solid var(--lime-dim); }
.pf-avatar { display: flex; justify-content: center; margin: 4px 0 6px; }
.filebtn { position: relative; }
.filebtn:focus-within { outline: 3px solid var(--lime); outline-offset: 2px; }
#pf-remove:disabled { opacity: .45; cursor: not-allowed; }
.pf-preview { margin-top: 12px; background: var(--panel2); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.pf-shown { font-size: 21px; font-weight: 900; font-style: italic; text-transform: uppercase; color: var(--lime); overflow-wrap: anywhere; }
/* r1.4.0: Kids' Earnings (F9) */
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px; margin: 0 0 12px; }
.seg a, .seg button { min-height: 44px; border-radius: 10px; border: 0; background: transparent; color: var(--text); font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: .02em; font-size: 13.5px; display: flex; align-items: center; justify-content: center; text-decoration: none; cursor: pointer; text-align: center; }
.seg a.on, .seg button.on { background: var(--lime); color: #111; }
.seg.kind { grid-template-columns: repeat(2, minmax(0, 1fr)); border-color: var(--purple); }
.seg.kind button { font-style: normal; text-transform: none; font-size: 14.5px; color: #cdb4f5; }
.seg.kind button.on { background: var(--purple); color: #fff; }
.elabel { font-size: 11.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.ebig { font-size: 32px; font-weight: 900; color: var(--lime); line-height: 1.1; }
.emid { font-size: 20px; font-weight: 900; }
.lime-t { color: var(--lime); } .amber-t { color: var(--amber); } .purple-t { color: #cdb4f5; }
.ebar { position: relative; display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--panel2); border: 1px solid var(--line); margin: 12px 0 6px; }
.ebar i { display: block; height: 100%; }
.ebar .e, .elegend .e { background: var(--lime); } .ebar .w, .elegend .w { background: var(--amber); } .ebar .s, .elegend .s { background: #5a6070; }
.ebar .ecap { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; }
.elegend { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 4px; }
.elegend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.ewait summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; list-style: none; min-height: 32px; color: #f2d48a; }
.ewait summary::-webkit-details-marker { display: none; }
.ewait summary::after { content: '▾'; color: var(--muted); }
.ewait[open] summary::after { content: '▴'; }
.ewait .list { background: var(--panel2); border-radius: 10px; padding: 0 10px; margin: 6px 0; }
.eowed { background: var(--panel2); border-radius: 12px; padding: 10px 12px; margin-top: 10px; }
.escreen { border: 1px dashed var(--purple); border-radius: 12px; padding: 10px 12px; margin-top: 10px; font-size: 14px; }
.escreen-tot { border: 1px dashed var(--purple); }
.etot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.eperiod { margin: 10px 0 12px; }
.eperiod .iconbtn:disabled { opacity: .35; cursor: not-allowed; }
.eplabel { font-style: italic; text-transform: uppercase; font-weight: 900; font-size: 17px; }
.echart { display: flex; align-items: flex-end; gap: 4px; height: 120px; border-bottom: 1px solid var(--line); margin-top: 8px; }
.echart .ecol { flex: 1; min-width: 0; height: 100%; display: flex; align-items: flex-end; }
.echart .ecol i { display: block; width: 100%; background: var(--lime); border-radius: 4px 4px 0 0; }
.echart.screen .ecol i { background: var(--purple); }
.elabels { display: flex; gap: 4px; margin-top: 4px; }
.elabels span { flex: 1; min-width: 0; text-align: center; font-size: 10.5px; color: var(--muted); overflow: hidden; white-space: nowrap; }
/* r1.5.0: approvals, messages, profile picture, weekly limits (F10/F11) */
.seg:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.greet { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 4px; }
.greet h1 { overflow-wrap: anywhere; margin-bottom: 2px; }
.greet .sub { margin: 0 0 12px; }
.homeav { position: relative; flex-shrink: 0; display: block; width: 56px; height: 56px; border-radius: 50%; text-decoration: none; color: var(--text); }
.homeav .av { width: 56px !important; height: 56px !important; font-size: 20px !important; }
.homeav .pen { position: absolute; right: -4px; bottom: -4px; width: 22px; height: 22px; border-radius: 50%; background: var(--panel2); border: 1px solid var(--line); font-size: 12px; display: grid; place-items: center; }
.homeav:hover .av { border-color: #e2ff8a; }
@media (max-width: 359px) {
  .homeav, .homeav .av { width: 48px !important; height: 48px !important; }
  .greet h1 { font-size: 23px; }
}
.kicker { font-size: 12px; font-weight: 800; color: var(--lime); text-transform: uppercase; letter-spacing: .04em; }
.kicker.purple { color: #cdb4f5; }
.lime { color: var(--lime); }
.list.needs > li { padding: 12px 0; }
.list.needs > li:first-child { padding-top: 0; }
.appr .rewardline { margin-top: 10px; background: var(--panel2); border-radius: 10px; padding: 8px 10px; font-size: 14.5px; }
.appr .note, .card .note { margin-top: 8px; font-size: 14.5px; background: #232036; border: 1px solid var(--purple-dim); border-radius: 10px; padding: 8px 10px; overflow-wrap: anywhere; }
.apprbtns { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.btn.quiet { color: var(--muted); }
.ticks { list-style: none; padding: 0; margin: 8px 0; }
.ticks li { padding: 2px 0; }
.effects { list-style: none; padding: 0; margin: 0; }
.effects li { display: flex; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.effects li:first-child { border-top: 0; }
.effects li > span:first-child { width: 22px; flex-shrink: 0; text-align: center; }
.ellip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.back { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; text-decoration: none; }
.seg.inboxseg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.convs { padding: 0; overflow: hidden; }
.conv { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); text-decoration: none; color: var(--text); min-height: 64px; }
.conv:first-child { border-top: 0; }
.conv .to { display: inline-block; font-size: 11.5px; font-weight: 800; color: #e3dcff; background: var(--purple-dim); border-radius: 12px; padding: 1px 8px; }
.conv .last { display: block; font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv .last.unread { color: var(--text); font-weight: 700; }
a.chip { display: inline-flex; align-items: center; text-decoration: none; color: var(--text); }
a.chip[aria-pressed=true] { color: #111; }
.thread { display: flex; flex-direction: column; gap: 10px; padding: 14px 0; }
.bubble { max-width: 85%; border-radius: 14px; padding: 8px 11px; font-size: 15px; overflow-wrap: anywhere; }
.bubble .body { white-space: pre-wrap; }
.bubble.me { align-self: flex-end; background: #2f3a12; border: 1px solid #5d7a0d; border-bottom-right-radius: 4px; }
.bubble.them { align-self: flex-start; background: var(--panel2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble .who { font-size: 13px; color: #cdb4f5; display: block; }
.bubble .about, .composer .about { font-size: 12px; font-weight: 800; color: var(--lime); }
.bubble .meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.composer { position: sticky; bottom: calc(64px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); padding: 10px 0 6px; }
.composer textarea { flex: 1; min-width: 0; min-height: 48px; }
.notebox { margin-top: 10px; }
.notebox textarea { width: 100%; }
.qlink { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
[data-limits] .grid2 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
[data-limits] table.t td:last-child, [data-limits] table.t th:last-child { text-align: right; white-space: nowrap; }
[data-limits] .bar { margin: 6px 0; }
details.caps > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
nav.tabs a { line-height: 1.15; }
/* r1.6.0: printable weekly plan (F12). On screen: white "paper" preview. Printed: A4, black on white, no app chrome. */
a.printbtn { margin: 4px 0 14px; }
.plegend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11px; border-top: 1px dotted #777; padding-top: 3px; }
.pdoc { display: flex; flex-direction: column; gap: 18px; margin: 6px 0 20px; }
.ppage { background: #fff; color: #111; border-radius: 6px; padding: 18px 16px 14px; box-shadow: 0 2px 14px rgba(0,0,0,.45); font-size: 13px; line-height: 1.3; max-width: 794px; width: 100%; margin: 0 auto; box-sizing: border-box; }
.ppage * { color: #111; }
.phead { border-bottom: 2.5px solid #111; padding-bottom: 8px; margin-bottom: 10px; }
.ptop { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.pprinted { font-size: 10.5px; font-weight: 700; }
.pbrand { font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.pbrand b { font-weight: 900; text-decoration: underline; }
.phead h2 { margin: 2px 0 0; font-size: 26px; font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: .01em; overflow-wrap: anywhere; color: #111; }
.prange { font-size: 15px; font-weight: 700; }
.pcount { font-size: 12px; margin-top: 2px; }
.psum { border: 1.5px solid #111; border-radius: 6px; padding: 7px 10px; margin-bottom: 8px; font-size: 12px; display: flex; flex-direction: column; gap: 3px; }
.pnote { font-size: 11px; font-style: italic; }
.pmission { border: 1.5px dashed #111; border-radius: 6px; padding: 7px 10px; margin-bottom: 8px; font-size: 12px; }
.pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.pday { border: 1.5px solid #111; border-radius: 6px; padding: 6px 8px 4px; break-inside: avoid; page-break-inside: avoid; }
.pday h3 { margin: 0 0 4px; font-size: 13px; font-weight: 900; font-style: normal; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid #111; padding-bottom: 3px; color: #111; }
.pday h3 span { font-weight: 600; text-transform: none; letter-spacing: 0; }
.pday.ptoday { border-width: 2.5px; }
.pday ul { list-style: none; margin: 0; padding: 0; }
.prow { display: grid; grid-template-columns: 18px 64px minmax(0, 1fr) auto; align-items: start; gap: 6px; min-height: 26px; padding: 4px 0; border-bottom: 1px dotted #777; }
.prow:last-child { border-bottom: 0; }
.pbox { width: 15px; height: 15px; border: 1.6px solid #111; border-radius: 3px; display: grid; place-items: center; font-size: 12px; font-weight: 900; line-height: 1; margin-top: 1px; }
.ptime { font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.pname { font-size: 13px; font-weight: 700; overflow-wrap: anywhere; min-width: 0; }
.prow.done .pname { font-weight: 600; }
.pstat { display: inline-block; margin-left: 6px; font-size: 10.5px; font-weight: 700; border: 1px solid #111; border-radius: 8px; padding: 0 5px; white-space: nowrap; }
.psteps { display: block; font-size: 10.5px; font-weight: 400; margin-top: 2px; }
.ptag { font-size: 11px; font-weight: 800; border: 1.3px solid #111; border-radius: 10px; padding: 1px 6px; white-space: nowrap; text-align: right; justify-self: end; max-width: 100%; white-space: normal; }
.ptag.resp { font-weight: 600; font-style: italic; border-style: dashed; }
.pfree { margin: 6px 0; font-style: italic; font-size: 12px; }
.pfocus .pline { border-bottom: 1px solid #555; height: 24px; }
.pfoot { margin-top: 8px; padding-top: 4px; border-top: 1.5px solid #111; font-size: 10.5px; break-inside: avoid; }
@media (max-width: 520px) {
  .pgrid { grid-template-columns: minmax(0, 1fr); }
  .prow { grid-template-columns: 18px minmax(0, 1fr); row-gap: 2px; }
  .prow .pbox { grid-row: 1 / span 3; }
  .prow .ptime, .prow .pname { grid-column: 2; }
  .prow .ptag { grid-column: 2; justify-self: start; }
}
@media print {
  @page { size: A4 portrait; margin: 11mm 11mm 12mm; }
  body.print-view { background: #fff !important; color: #000; padding: 0 !important; }
  body.print-view main { display: block !important; max-width: none; margin: 0; padding: 0; }
  body.print-view .top, body.print-view nav.tabs, body.print-view .noprint, body.print-view #toast, body.print-view #tour { display: none !important; }
  body.print-view .pdoc { display: block; margin: 0; }
  body.print-view .ppage { box-shadow: none; border-radius: 0; padding: 0; max-width: none; font-size: 10.5pt; break-after: page; page-break-after: always; }
  body.print-view .ppage:last-child { break-after: auto; page-break-after: auto; }
  body.print-view .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.print-view .prow { grid-template-columns: 4.6mm 20.5mm minmax(0, 1fr) auto; column-gap: 1.6mm; min-height: 7mm; padding: 1.1mm 0; }
  body.print-view .prow .ptag { grid-column: auto; justify-self: end; }
  body.print-view .prow .pbox { grid-row: auto; }
  body.print-view .prow .ptime, body.print-view .prow .pname { grid-column: auto; }
  body.print-view .pbox { width: 4.2mm; height: 4.2mm; }
  body.print-view .pname { font-size: 10pt; }
  body.print-view .ptime { font-size: 8.3pt; padding-top: .3mm; }
  body.print-view .ptag { font-size: 8.3pt; padding: 0 1.4mm; }
  body.print-view .ptag.resp { font-size: 7.6pt; }
  body.print-view .plegend { font-size: 8pt; }
  body.print-view .pday { padding: 1.4mm 2mm 0.6mm; }
  body.print-view .pday h3 { font-size: 10pt; margin-bottom: 0.6mm; }
  body.print-view .pgrid { gap: 2.4mm 3.4mm; }
  body.print-view .phead h2 { font-size: 20pt; }
  body.print-view .prange { font-size: 12pt; }
  body.print-view .psum, body.print-view .pmission { font-size: 9.5pt; }
  body.print-view .pnote, body.print-view .pfoot, body.print-view .psteps { font-size: 8.5pt; }
  body.print-view .pfocus .pline { height: 7mm; }
  body.print-view .pprinted { font-size: 8.5pt; }
  body.print-view .phead { padding-bottom: 1.6mm; margin-bottom: 2.4mm; }
  body.print-view .psum, body.print-view .pmission { margin-bottom: 2mm; padding: 1.4mm 2.6mm; }
  body.print-view .pfoot { margin-top: 2mm; padding-top: 1mm; }
}
