/* Study Buddy – giao diện kiểu Padlet (cột), trẻ trung, nhiều màu */
:root {
  --bg: #FFF8F0;
  --ink: #1F2340;
  --muted: #6B7094;
  --line: #EFE4D6;
  --card: #fff;
  --c1: #FF8A3D; --c1s: #FFF0E3; --c1d: #C2570F;
  --c2: #3B82F6; --c2s: #E8F1FF; --c2d: #1D4FB8;
  --c3: #8B5CF6; --c3s: #F0EAFF; --c3d: #5B32C4;
  --c4: #F43F8E; --c4s: #FFE9F3; --c4d: #B01660;
  --ok: #16A34A; --warn: #D97706; --err: #DC2626;
  --r: 18px;
  --shadow: 0 2px 0 rgba(31,35,64,.04), 0 8px 24px -12px rgba(31,35,64,.22);
  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-h: 'Baloo 2', 'Nunito', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; color: var(--ink); font: 400 15px/1.5 var(--font);
  background:
    radial-gradient(900px 400px at 8% -10%, #FFE2C7 0%, transparent 60%),
    radial-gradient(800px 380px at 95% -5%, #E3D6FF 0%, transparent 55%),
    radial-gradient(700px 360px at 60% 110%, #FFD9EA 0%, transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-text-size-adjust: 100%;
}
body.noscroll { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
a { color: var(--c2d); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--c2) 55%, white); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.btn {
  border: 2px solid var(--ink); background: #fff; color: var(--ink); border-radius: 999px;
  padding: 8px 16px; font-weight: 800; line-height: 1.2; display: inline-flex; align-items: center; gap: 6px;
  box-shadow: 0 3px 0 var(--ink); transition: transform .08s, box-shadow .08s; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 0 var(--ink); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--c1); }
.btn.blue { background: var(--c2); color: #fff; }
.btn.purple { background: var(--c3); color: #fff; }
.btn.pink { background: var(--c4); color: #fff; }
.btn.ghost { border-color: transparent; background: rgba(255,255,255,.7); box-shadow: none; padding: 8px 12px; }
.btn.ghost:hover { background: #fff; box-shadow: none; }
.btn.danger { background: #fff; color: var(--err); border-color: var(--err); box-shadow: 0 3px 0 var(--err); }
.btn.small { padding: 5px 11px; font-size: 13px; box-shadow: 0 2px 0 var(--ink); }
.linkbtn { background: none; border: 0; padding: 0; color: var(--c2d); font-weight: 700; text-decoration: underline; }

/* ---------- Splash / Login ---------- */
.splash { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--muted); }
.spin { width: 38px; height: 38px; border-radius: 50%; border: 5px solid #fff; border-top-color: var(--c1); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.landing { max-width: 1040px; margin: 0 auto; padding: 28px 18px 60px; }
.hero { text-align: center; padding: 28px 0 8px; }
.hero .badge-logo { font-size: 64px; filter: drop-shadow(0 6px 0 rgba(31,35,64,.12)); }
.hero h1 { font: 800 clamp(34px, 7vw, 58px)/1.05 var(--font-h); letter-spacing: -.5px; }
.hero h1 span { background: linear-gradient(90deg, var(--c1), var(--c4), var(--c3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .tag { font: 700 clamp(17px, 3vw, 22px)/1.3 var(--font-h); color: var(--c3d); margin-top: 6px; }
.hero .lead { max-width: 640px; margin: 14px auto 0; color: var(--muted); font-size: 16px; }
.login-box { margin: 26px auto 0; max-width: 460px; background: #fff; border: 2px solid var(--ink); border-radius: 22px; padding: 20px; box-shadow: 6px 6px 0 var(--ink); text-align: left; }
.login-box h3 { font: 800 20px var(--font-h); margin-bottom: 10px; }
.gbtn { width: 100%; justify-content: center; padding: 12px 16px; font-size: 16px; }
.gbtn svg { width: 20px; height: 20px; }
.demo-note { background: #FFF6D6; border: 2px dashed #E0B400; border-radius: 14px; padding: 10px 12px; font-size: 13.5px; margin-bottom: 12px; }
.demo-users { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin-top: 10px; }
.demo-users button { border: 2px solid var(--line); border-radius: 14px; background: #fff; padding: 8px; font-weight: 800; display: flex; gap: 8px; align-items: center; text-align: left; }
.demo-users button:hover { border-color: var(--ink); }
.demo-users small { display: block; color: var(--muted); font-weight: 600; font-size: 11.5px; }
.goals { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 36px; }
.goal { background: #fff; border-radius: var(--r); padding: 16px; border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.goal b { display: block; font: 800 18px var(--font-h); margin-bottom: 4px; }
.goal:nth-child(1) { background: var(--c1s); } .goal:nth-child(2) { background: var(--c2s); } .goal:nth-child(3) { background: var(--c4s); }
.lcols { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-top: 30px; }
.lcol { border-radius: var(--r); padding: 14px; color: #fff; font-weight: 700; }
.lcol h4 { font: 800 17px/1.2 var(--font-h); margin-bottom: 6px; }
.lcol p { font-size: 13.5px; font-weight: 600; opacity: .95; }
.lcol:nth-child(1) { background: var(--c1); } .lcol:nth-child(2) { background: var(--c2); }
.lcol:nth-child(3) { background: var(--c3); } .lcol:nth-child(4) { background: var(--c4); }

/* ---------- Group chooser ---------- */
.chooser { max-width: 880px; margin: 0 auto; padding: 24px 18px 60px; }
.chooser h2 { font: 800 28px var(--font-h); }
.glist { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin: 18px 0; }
.gcard { background: #fff; border: 2px solid var(--ink); border-radius: var(--r); padding: 16px; text-align: left; box-shadow: 4px 4px 0 var(--ink); display: grid; gap: 6px; }
.gcard:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--ink); }
.gcard b { font: 800 19px/1.2 var(--font-h); }
.gcard small { color: var(--muted); font-weight: 700; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.topline { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }

/* ---------- App shell ---------- */
.shell { height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px; flex-wrap: wrap;
  background: rgba(255,255,255,.82); backdrop-filter: blur(8px); border-bottom: 2px solid var(--ink);
}
.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; min-width: 0; }
.brand .logo { font-size: 30px; }
.brand b { display: block; font: 800 20px/1 var(--font-h); }
.brand small { display: block; color: var(--muted); font-weight: 700; font-size: 12px; }
.grp-pill { display: flex; align-items: center; gap: 8px; background: var(--c3s); border: 2px solid var(--ink); border-radius: 999px; padding: 4px 6px 4px 14px; min-width: 0; }
.grp-pill .g-name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 34vw; }
.grp-pill .code { border: 0; background: #fff; border-radius: 999px; padding: 3px 10px; font-weight: 800; letter-spacing: 1.5px; font-size: 13px; white-space: nowrap; flex: none; }
.top-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.me-chip { display: flex; align-items: center; gap: 8px; padding-left: 6px; font-weight: 800; }

.strip { display: flex; gap: 14px; align-items: center; padding: 8px 16px; overflow-x: auto; scrollbar-width: thin; }
.today { display: flex; align-items: center; gap: 10px; background: #fff; border: 2px solid var(--ink); border-radius: 16px; padding: 6px 12px; flex: none; }
.today .cd { font-weight: 800; }
.today .cd.late { color: var(--err); }
.chips { display: flex; gap: 6px; align-items: center; }
.pchip { position: relative; display: inline-flex; }
.pchip i { position: absolute; right: -3px; bottom: -3px; font-style: normal; font-size: 12px; background: #fff; border-radius: 50%; width: 17px; height: 17px; display: grid; place-items: center; box-shadow: 0 0 0 1.5px var(--ink); }
.pchip.none .av { filter: grayscale(.9); opacity: .55; }
.mystreak { font-weight: 800; background: #FFF1D6; border: 2px solid var(--ink); border-radius: 16px; padding: 6px 12px; flex: none; }
.filters { display: flex; gap: 8px; align-items: center; margin-left: auto; flex: none; }
.filters select { border: 2px solid var(--ink); border-radius: 999px; padding: 6px 12px; background: #fff; font-weight: 700; max-width: 170px; }
.filters label.chk { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13.5px; white-space: nowrap; }

/* ---------- Board ---------- */
.board {
  flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(4, minmax(280px, 1fr));
  gap: 14px; padding: 6px 16px 16px; overflow-x: auto; scroll-snap-type: x proximity;
}
.col { display: flex; flex-direction: column; min-height: 0; border-radius: 22px; border: 2px solid var(--ink); background: var(--tint); box-shadow: 5px 5px 0 var(--ink); scroll-snap-align: start; overflow: hidden; }
.col-orange { --tint: var(--c1s); --main: var(--c1); --dark: var(--c1d); }
.col-blue   { --tint: var(--c2s); --main: var(--c2); --dark: var(--c2d); }
.col-purple { --tint: var(--c3s); --main: var(--c3); --dark: var(--c3d); }
.col-pink   { --tint: var(--c4s); --main: var(--c4); --dark: var(--c4d); }
.col-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 10px 14px; background: var(--main); color: #fff; border-bottom: 2px solid var(--ink); }
.col-ico { font-size: 26px; background: rgba(255,255,255,.25); border-radius: 14px; width: 46px; height: 46px; display: grid; place-items: center; flex: none; }
.col-tt { flex: 1; min-width: 0; }
.col-tt h2 { font: 800 17px/1.15 var(--font-h); }
.col-tt p { font-size: 12.5px; font-weight: 700; opacity: .95; }
.col-head .add { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--ink); background: #fff; color: var(--ink); font-size: 24px; font-weight: 800; line-height: 1; display: grid; place-items: center; box-shadow: 0 3px 0 var(--ink); }
.col-head .add:hover { transform: translateY(-1px); }
.col-sub { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 2px dashed color-mix(in srgb, var(--main) 45%, white); font-weight: 800; font-size: 13px; flex-wrap: wrap; color: var(--dark); }
.col-sub .grow { flex: 1; }
.weeknav { display: flex; align-items: center; gap: 4px; }
.weeknav button { border: 2px solid var(--ink); background: #fff; border-radius: 50%; width: 26px; height: 26px; font-weight: 800; line-height: 1; }
.pbar { height: 10px; border-radius: 99px; background: #fff; border: 2px solid var(--ink); overflow: hidden; min-width: 80px; flex: 1; }
.pbar span { display: block; height: 100%; background: var(--main); }
.col-body { flex: 1; min-height: 120px; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: thin; }
.empty { text-align: center; color: var(--muted); font-weight: 700; padding: 18px 10px; border: 2px dashed color-mix(in srgb, var(--main) 45%, white); border-radius: 16px; font-size: 14px; }
.sec-head { display: flex; align-items: center; gap: 8px; padding: 4px 2px; font-weight: 800; cursor: pointer; user-select: none; background: none; border: 0; width: 100%; text-align: left; }
.sec-head .n { margin-left: auto; font-size: 12px; background: #fff; border: 2px solid var(--ink); border-radius: 99px; padding: 0 8px; }
.sec-head .caret { transition: transform .15s; display: inline-block; }
.sec-head.closed .caret { transform: rotate(-90deg); }
.sec { display: flex; flex-direction: column; gap: 10px; }
.sec-note { font-size: 12.5px; color: var(--muted); font-weight: 700; padding-left: 4px; }
.more { align-self: center; }

/* ---------- Avatar ---------- */
.av { --s: 34px; width: var(--s); height: var(--s); border-radius: 50%; display: inline-grid; place-items: center; flex: none; color: #fff; font-weight: 800; font-size: calc(var(--s) * .38); border: 2px solid var(--ink); overflow: hidden; background: hsl(var(--h) 70% 55%); }
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Card ---------- */
.card { background: var(--card); border: 2px solid var(--ink); border-radius: 16px; padding: 12px; box-shadow: 0 3px 0 var(--ink); position: relative; display: flex; flex-direction: column; gap: 8px; }
.card.ghost { opacity: .4; }
.card.goal { background: #FFFBEA; border-style: solid; }
.card.is-best-wrap { }
.chead { display: flex; align-items: center; gap: 8px; min-width: 0; }
.chead .who { min-width: 0; flex: 1; line-height: 1.2; }
.chead .who b { display: block; font-weight: 800; overflow-wrap: anywhere; }
.chead .icon { width: 26px; height: 26px; font-size: 14px; flex: none; }
.chead .who small { color: var(--muted); font-weight: 700; font-size: 12px; }
.icon { border: 0; background: transparent; border-radius: 8px; width: 28px; height: 28px; display: grid; place-items: center; color: var(--muted); font-size: 15px; }
.icon:hover { background: #F2EDE6; color: var(--ink); }
.drag { cursor: grab; touch-action: none; letter-spacing: -2px; font-weight: 800; }
.ctitle { font: 800 16px/1.3 var(--font-h); overflow-wrap: anywhere; }
.cbody { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { display: inline-flex; align-items: center; gap: 4px; border-radius: 99px; padding: 1px 9px; font-size: 12.5px; font-weight: 800; border: 2px solid var(--ink); background: #fff; }
.tag.subj { background: hsl(var(--h) 85% 88%); }
.tag.t-h { background: #E8F1FF; } .tag.t-ex { background: #E3F8EA; } .tag.t-sc { background: #FFF1D6; } .tag.t-tg { background: #FFF1D6; }
.tag.late { background: #FFE0E0; color: var(--err); }
.tag.q { background: var(--c3s); } .tag.tip { background: #FFF6BF; } .tag.k { background: var(--c4s); } .tag.pin { background: #FFE9A8; }
.tag.solved { background: #D8F6E2; color: #0E7A36; }
.cimg { display: block; width: 100%; max-height: 240px; object-fit: cover; border-radius: 12px; border: 2px solid var(--ink); cursor: zoom-in; background: #eee; }
.clink { font-weight: 800; font-size: 13.5px; overflow-wrap: anywhere; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--ok); }
.card.is-done .ctitle { text-decoration: line-through; color: var(--muted); }
.to { background: var(--c4s); border-radius: 12px; padding: 6px 10px; font-weight: 800; font-size: 13.5px; }
.kbody { font-size: 16px; }

.reacts { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.rbtn { border: 2px solid var(--line); background: #fff; border-radius: 99px; padding: 1px 8px; font-weight: 800; font-size: 13.5px; display: inline-flex; gap: 3px; align-items: center; }
.rbtn:hover { border-color: var(--ink); }
.rbtn.on { background: #FFE9F3; border-color: var(--c4); }
.rbtn .c { min-width: 8px; }
.cmt-toggle { margin-left: auto; border: 0; background: none; font-weight: 800; color: var(--muted); }
.comments { border-top: 2px dashed var(--line); padding-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.cm { display: flex; gap: 8px; align-items: flex-start; }
.cm .bub { background: #F6F2EC; border-radius: 4px 14px 14px 14px; padding: 6px 10px; font-size: 14px; flex: 1; min-width: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.cm .bub b { font-size: 13px; display: block; }
.cm.best .bub { background: #E4F8EA; border: 2px solid var(--ok); }
.cm .acts { display: flex; flex-direction: column; gap: 2px; }
.cm-form { display: flex; gap: 6px; }
.cm-form input { flex: 1; min-width: 0; border: 2px solid var(--ink); border-radius: 99px; padding: 6px 12px; background: #fff; }

/* ---------- Vote panel ---------- */
.panel { background: #fff; border: 2px solid var(--ink); border-radius: 16px; padding: 12px; box-shadow: 0 3px 0 var(--ink); display: flex; flex-direction: column; gap: 8px; }
.panel h3 { font: 800 16px var(--font-h); }
.panel p { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.cands { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
.cand { display: flex; align-items: center; gap: 6px; border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 5px 8px; font-weight: 800; text-align: left; font-size: 13.5px; }
.cand:hover { border-color: var(--ink); }
.cand.on { border-color: var(--c4); background: var(--c4s); }
.winner { display: flex; align-items: center; gap: 10px; background: linear-gradient(90deg, #FFF3C4, #FFE0EE); border: 2px solid var(--ink); border-radius: 14px; padding: 8px 12px; }
.winner .trophy { font-size: 30px; }
.hist { display: flex; gap: 6px; flex-wrap: wrap; font-size: 12.5px; font-weight: 800; }
.hist span { background: #F6F2EC; border-radius: 99px; padding: 1px 9px; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.quick button { border: 2px solid var(--line); background: #fff; border-radius: 99px; padding: 2px 10px; font-weight: 700; font-size: 13px; }
.quick button:hover { border-color: var(--ink); }

/* ---------- Modal ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(31,35,64,.55); display: grid; place-items: center; padding: 14px; overflow-y: auto; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: #fff; border: 2px solid var(--ink); border-radius: 22px; box-shadow: 8px 8px 0 var(--ink); width: min(560px, 100%); max-height: calc(100dvh - 28px); display: flex; flex-direction: column; }
.modal.wide { width: min(880px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 2px solid var(--ink); background: var(--c1s); border-radius: 20px 20px 0 0; }
.modal-head h3 { font: 800 20px var(--font-h); }
.x { border: 2px solid var(--ink); background: #fff; border-radius: 50%; width: 32px; height: 32px; font-weight: 800; }
.modal-body { padding: 16px; overflow-y: auto; }
.mform { display: grid; gap: 12px; }
.fld { display: grid; gap: 4px; }
.fld > label, .fld > .lbl { font-weight: 800; font-size: 13.5px; }
.fld input[type=text], .fld input[type=number], .fld input[type=url], .fld select, .fld textarea {
  border: 2px solid var(--ink); border-radius: 12px; padding: 8px 12px; background: #fff; width: 100%; }
.fld textarea { min-height: 84px; resize: vertical; }
.fld .hint { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.radios { display: flex; gap: 8px; flex-wrap: wrap; }
.radios label { border: 2px solid var(--ink); border-radius: 99px; padding: 5px 14px; font-weight: 800; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; background: #fff; }
.radios input { accent-color: var(--c3); }
.preview { max-width: 160px; border-radius: 12px; border: 2px solid var(--ink); }
.actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.codebox { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--c3s); border: 2px solid var(--ink); border-radius: 16px; padding: 10px 14px; }
.codebox .big { font: 800 28px var(--font-h); letter-spacing: 4px; }
.mtable { width: 100%; border-collapse: collapse; font-size: 14px; }
.mtable th, .mtable td { padding: 7px 8px; border-bottom: 2px solid var(--line); text-align: left; vertical-align: middle; }
.mtable th { font-size: 12.5px; color: var(--muted); font-weight: 800; white-space: nowrap; }
.mtable td.num, .mtable th.num { text-align: right; white-space: nowrap; }
.mtable tfoot td { font-weight: 800; border-top: 2px solid var(--ink); border-bottom: 0; }
.tscroll { overflow-x: auto; }
.nm { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.bars { display: grid; gap: 6px; margin: 6px 0 14px; }
.hbar { display: grid; grid-template-columns: 110px 1fr 54px; gap: 8px; align-items: center; font-size: 13px; font-weight: 800; }
.hbar .tr { background: #F6F2EC; border: 2px solid var(--ink); border-radius: 99px; height: 14px; overflow: hidden; }
.hbar .tr span { display: block; height: 100%; background: linear-gradient(90deg, var(--c2), var(--c3)); }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 130px; margin: 6px 0 14px; }
.dcol { display: flex; flex-direction: column; justify-content: end; align-items: center; height: 100%; font-size: 12.5px; font-weight: 800; gap: 3px; }
.dcol .b { width: 100%; max-width: 44px; background: linear-gradient(0deg, var(--c1), var(--c4)); border: 2px solid var(--ink); border-radius: 10px 10px 4px 4px; min-height: 4px; }
.sumcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 12px; }
.sum { border: 2px solid var(--ink); border-radius: 14px; padding: 8px 12px; background: var(--c1s); }
.sum:nth-child(2) { background: var(--c2s); } .sum:nth-child(3) { background: var(--c3s); } .sum:nth-child(4) { background: var(--c4s); }
.sum b { display: block; font: 800 24px/1.1 var(--font-h); }
.sum small { font-weight: 800; color: var(--muted); }
.how h4 { font: 800 17px var(--font-h); margin: 14px 0 6px; }
.how ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.how .role { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 14px; background: var(--c2s); margin-bottom: 6px; }
.how .role:nth-of-type(2) { background: var(--c3s); } .how .role:nth-of-type(3) { background: var(--c1s); }
.lightbox { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.85); display: grid; place-items: center; padding: 16px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; }

/* ---------- Toast ---------- */
#toast-root { position: fixed; z-index: 90; left: 50%; bottom: 20px; transform: translateX(-50%); display: grid; gap: 8px; width: min(440px, calc(100% - 24px)); pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 14px; font-weight: 700; box-shadow: 0 8px 24px rgba(0,0,0,.25); animation: pop .2s; }
.toast.err { background: var(--err); }
.toast.ok { background: #0E7A36; }
@keyframes pop { from { transform: translateY(10px); opacity: 0; } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .board { grid-template-columns: repeat(4, 84vw); padding: 6px 12px 12px; scroll-snap-type: x mandatory; }
  .col { box-shadow: 4px 4px 0 var(--ink); }
  .brand small { display: none; }
  .top-actions .btn span { display: none; }
  .top-actions .btn { padding: 8px 10px; }
  .me-chip .nm-txt { display: none; }
  .grp-pill .g-name { max-width: 30vw; }
  .filters { margin-left: 0; }
  .strip { padding: 6px 12px; }
}
@media (max-width: 520px) {
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .modal-body { padding: 12px; }
  .hbar { grid-template-columns: 84px 1fr 48px; }
  .topbar { padding: 8px 12px; gap: 6px; flex-wrap: nowrap; }
  .brand b, .me-chip { display: none; }
  .grp-pill { flex: 1; min-width: 0; }
  .grp-pill .g-name { max-width: none; flex: 1; min-width: 0; }
  .top-actions { flex-wrap: nowrap; margin-left: 0; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media print { .topbar, .strip, .col-head .add, #toast-root { display: none !important; } }
