/* Math tools hub — navy and teal, matching SAT Math 800 and Math Path */
:root {
  --bg: #f3f6f9; --card: #fff; --ink: #10243a; --ink-2: #51637a; --line: #dbe3ec;
  --navy: #0f2a44; --navy-2: #173d63; --teal: #297b7e; --teal-l: #e3f2f2; --sky: #83b7e6; --gold: #f2b705;
  --danger: #c8402f; --focus: #1f6fd1;
  --shadow: 0 1px 2px rgba(16, 36, 58, .06), 0 8px 24px rgba(16, 36, 58, .08);
  --shadow-up: 0 2px 4px rgba(16, 36, 58, .08), 0 16px 36px rgba(16, 36, 58, .14);
  --r: 22px;
  --font: "Lexend", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1622; --card: #13212f; --ink: #e8f0f7; --ink-2: #a3b5c7; --line: #26384a;
    --teal-l: #173436; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.3); --shadow-up: 0 16px 36px rgba(0,0,0,.45);
    --focus: #8ab4f8; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1622; --card: #13212f; --ink: #e8f0f7; --ink-2: #a3b5c7; --line: #26384a;
  --teal-l: #173436; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.3); --shadow-up: 0 16px 36px rgba(0,0,0,.45);
  --focus: #8ab4f8; color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink); font: 400 1rem/1.6 var(--font); -webkit-tap-highlight-color: transparent; }
html.modal-open, html.modal-open body { overflow: hidden; }
img { max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -.015em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 10px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--card); padding: 10px 16px; border-radius: 10px; }
.ic { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--ink-2); }

/* loading */
.boot { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--ink-2); }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--teal); animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 20px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font-weight: 600; text-decoration: none; line-height: 1.2; transition: transform .12s, background .15s, border-color .15s, box-shadow .15s; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:hover:not(:disabled) { border-color: var(--teal); }
.btn.primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.primary:hover:not(:disabled) { background: #22686b; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost { background: transparent; }
.btn.big { min-height: 54px; padding: 12px 22px; font-size: 1.02rem; border-radius: 16px; }
.btn.small { min-height: 42px; padding: 8px 14px; font-size: .9rem; border-radius: 12px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .45; cursor: default; }
.link { background: none; border: 0; padding: 8px 4px; color: var(--teal); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.ibtn { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); flex: none; }
.ibtn:hover:not(:disabled) { border-color: var(--teal); color: var(--teal); }
.ibtn:disabled { opacity: .35; cursor: default; }
.ibtn.danger:hover:not(:disabled) { border-color: var(--danger); color: var(--danger); }

/* top bar */
.bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px max(16px, env(safe-area-inset-left)) 10px max(16px, env(safe-area-inset-right)); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.bar-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.bar-brand img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #fff; }
.bar-brand span { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.bar-brand b { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-brand small { color: var(--ink-2); font-size: .78rem; }
.bar-actions { display: flex; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); font-weight: 600; font-size: .92rem; }
.pill.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.pill.on { background: var(--gold); border-color: var(--gold); color: #2b2100; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill.primary { background: var(--teal); border-color: var(--teal); } }

main { max-width: 1120px; margin: 0 auto; padding: 16px 16px 120px; }

/* hero */
.hero { position: relative; overflow: hidden; border-radius: 28px; color: #fff; padding: 36px 28px; margin-top: 6px;
  background: radial-gradient(120% 140% at 100% 0%, #2a8c8f 0%, transparent 52%), radial-gradient(90% 120% at 0% 100%, #1f4f80 0%, transparent 60%), linear-gradient(150deg, #0f2a44, #10304e 60%, #0d2238);
  box-shadow: var(--shadow-up); }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px); background-size: 28px 28px;
  mask-image: linear-gradient(120deg, #000, transparent 70%); -webkit-mask-image: linear-gradient(120deg, #000, transparent 70%); }
.hero-in { position: relative; z-index: 1; display: grid; gap: 28px; align-items: center; }
@media (min-width: 820px) { .hero { padding: 56px 56px; } .hero-in { grid-template-columns: auto minmax(0, 1fr); gap: 52px; } }
.photo { justify-self: center; width: 176px; height: 176px; border-radius: 50%; padding: 5px; background: conic-gradient(from 210deg, #f2b705, #83b7e6, #3fb5b8, #f2b705); box-shadow: 0 18px 40px rgba(0,0,0,.35); animation: float 6s ease-in-out infinite; }
.photo img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #fff; border: 4px solid #0f2a44; display: block; }
@media (min-width: 820px) { .photo { width: 220px; height: 220px; } }
@keyframes float { 50% { transform: translateY(-6px); } }
.hero-text { text-align: center; }
@media (min-width: 820px) { .hero-text { text-align: left; } }
.hello { margin: 0 0 4px; color: #a9d6d8; font-weight: 500; letter-spacing: .02em; }
.hero h1 { font-size: clamp(2.2rem, 7vw, 3.6rem); font-weight: 700; }
.role { margin: 8px 0 0; color: #d6e4f2; font-weight: 500; display: flex; flex-wrap: wrap; gap: 4px 8px; justify-content: center; }
@media (min-width: 820px) { .role { justify-content: flex-start; } }
.role .dot { opacity: .6; }
.bio { margin: 16px auto 0; max-width: 60ch; color: #e8f0f7; font-size: 1.05rem; font-weight: 300; }
@media (min-width: 820px) { .bio { margin-left: 0; } }
.chips { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
@media (min-width: 820px) { .chips { justify-content: flex-start; } }
.chips li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 10px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); font-size: .88rem; }
.chips .ic { width: 16px; height: 16px; color: #7fe0c4; stroke-width: 2.6; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; justify-content: center; }
@media (min-width: 820px) { .hero-cta { justify-content: flex-start; } }
.hero .btn.primary { background: var(--gold); border-color: var(--gold); color: #2b2100; }
.hero .btn.primary:hover { background: #ffc61f; }
.hero .btn.ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.hero .btn.ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; }
@media (max-width: 520px) { .hero { padding: 30px 18px; border-radius: 24px; } .hero-cta .btn { width: 100%; } }

/* tools */
.tools { margin-top: 40px; outline: none; }
.sec-head { margin: 0 4px 18px; }
.sec-head h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
.sec-head p { margin: 6px 0 0; color: var(--ink-2); }
.tool-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.tool { position: relative; display: flex; flex-direction: column; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s; overflow: hidden; }
.tool::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px; background: var(--tc); }
.tool:has(a.t-main:hover) { transform: translateY(-3px); box-shadow: var(--shadow-up); }
.tool:has(a.t-main:active) { transform: scale(.985); }
.t-main { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px 16px; padding: 26px 20px 20px; text-decoration: none; color: inherit; flex: 1; align-content: start; }
.t-icon { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; color: #fff; overflow: hidden;
  background: linear-gradient(145deg, color-mix(in srgb, var(--tc) 78%, #fff), var(--tc)); box-shadow: 0 8px 18px color-mix(in srgb, var(--tc) 40%, transparent); }
.t-icon .ic { width: 30px; height: 30px; stroke-width: 1.8; }
.t-icon img { width: 100%; height: 100%; object-fit: cover; }
.t-title { font-size: 1.25rem; font-weight: 650; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding-right: 40px; }
.badge { font-style: normal; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--tc) 14%, var(--card)); color: color-mix(in srgb, var(--tc) 80%, var(--ink)); }
.t-desc { grid-column: 1 / -1; color: var(--ink-2); font-size: .97rem; }
.t-tags { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: -4px; }
.t-tags span { font-size: .78rem; padding: 3px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--ink-2); }
.t-go { grid-column: 1 / -1; display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-top: 2px; font-weight: 650; color: color-mix(in srgb, var(--tc) 85%, var(--ink)); }
.t-go:empty { display: none; }
.t-go .ic { transition: transform .18s; }
.tool:has(a.t-main:hover) .t-go .ic { transform: translateX(4px); }
.t-share { position: absolute; top: 24px; right: 14px; width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; background: transparent; color: var(--ink-2); }
.t-share:hover { background: var(--bg); color: var(--teal); }
.empty { padding: 30px; text-align: center; color: var(--ink-2); border: 2px dashed var(--line); border-radius: var(--r); }

/* share section */
.share { margin-top: 44px; display: grid; gap: 18px; padding: 28px 22px; border-radius: 28px; background: linear-gradient(140deg, var(--teal-l), color-mix(in srgb, var(--sky) 18%, var(--card))); border: 1px solid var(--line); }
@media (min-width: 820px) { .share { grid-template-columns: auto minmax(0, 1fr); padding: 34px 40px; column-gap: 26px; } .share .share-row { grid-column: 1 / -1; } }
.share-art { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: #fff; color: #e2466b; box-shadow: var(--shadow); }
.share-art .ic { width: 32px; height: 32px; fill: #ffd5df; animation: beat 2.4s ease-in-out infinite; }
@keyframes beat { 0%, 60%, 100% { transform: scale(1); } 30% { transform: scale(1.15); } }
.share h2 { font-size: clamp(1.35rem, 4vw, 1.75rem); }
.share p { margin: 6px 0 0; color: var(--ink-2); max-width: 62ch; }
.share-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.sbtn { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); font-weight: 600; font-size: .94rem; text-align: left; transition: transform .12s, border-color .15s; }
.sbtn:active { transform: scale(.97); }
.sbtn:hover { border-color: currentColor; }
.sbtn .ic { width: 24px; height: 24px; }
.sbtn.wa .ic { color: #25d366; } .sbtn.tg .ic { color: #2aa3df; } .sbtn.fb .ic { color: #1877f2; } .sbtn.in .ic { color: #0a66c2; }
.sbtn.ml .ic, .sbtn.qr .ic, .sbtn.cp .ic { color: var(--teal); }
.sbtn.wa { border-color: color-mix(in srgb, #25d366 45%, var(--line)); }

/* footer */
.foot { max-width: 1120px; margin: 0 auto; padding: 24px 16px calc(110px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; color: var(--ink-2); font-size: .88rem; }
.foot p { margin: 0; }
.foot .ats { height: 56px; width: auto; background: #fff; border-radius: 12px; padding: 6px 10px; }
.admin-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 0; background: none; color: var(--ink-2); font-size: .85rem; opacity: .75; }
.admin-link .ic { width: 16px; height: 16px; }
.admin-link:hover { opacity: 1; color: var(--teal); }

/* floating share button */
.fab { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 40; display: inline-flex; align-items: center; gap: 8px; min-height: 56px; padding: 0 22px 0 18px; border-radius: 999px; border: 0; background: var(--navy); color: #fff; font-weight: 650; box-shadow: 0 10px 28px rgba(15, 42, 68, .4); animation: fab-in .5s 1.2s both cubic-bezier(.2, .8, .2, 1.2); }
.fab::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 0 rgba(41, 123, 126, .6); animation: ping 2.6s 2.2s 3; }
.fab:active { transform: scale(.96); }
@keyframes fab-in { from { opacity: 0; transform: translateY(30px) scale(.8); } }
@keyframes ping { 70% { box-shadow: 0 0 0 16px rgba(41, 123, 126, 0); } 100% { box-shadow: 0 0 0 0 rgba(41, 123, 126, 0); } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fab { background: var(--teal); } }

/* modal, sheet and toast */
.overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(8, 20, 32, .55); backdrop-filter: blur(3px); animation: fade .18s ease-out; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 480px; max-height: calc(100dvh - 32px); overflow: auto; overscroll-behavior: contain; background: var(--card); border-radius: 24px; padding: 22px; box-shadow: 0 24px 60px rgba(0,0,0,.3); animation: rise .25s cubic-bezier(.2, .8, .2, 1); }
.modal.wide { max-width: 640px; }
.modal.narrow { max-width: 400px; }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(.98); } }
.modal h2 { font-size: 1.35rem; }
.modal > p { margin: 10px 0 0; }
.mhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.mfoot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
@media (max-width: 600px) {
  .overlay { place-items: end center; padding: 0; }
  .modal { max-width: none !important; border-radius: 24px 24px 0 0; max-height: 92dvh; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); animation: up .28s cubic-bezier(.2, .8, .2, 1); }
  .modal::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: -8px auto 12px; }
  .mfoot .btn { flex: 1; }
  @keyframes up { from { transform: translateY(100%); } }
}
.sheet .share-row { margin-top: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sheet .btn.wide { margin-top: 10px; }
.linkbox { display: flex; gap: 8px; margin-top: 16px; padding: 6px 6px 6px 14px; border: 1.5px solid var(--line); border-radius: 14px; align-items: center; }
.linkbox input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--ink-2); font-size: .92rem; }
.qrbox { display: grid; justify-items: center; gap: 12px; margin-top: 16px; min-height: 200px; place-content: center; }
.qrbox img { width: 260px; height: 260px; border-radius: 12px; border: 1px solid var(--line); image-rendering: pixelated; }
.qr-url { margin: 0; font-size: .85rem; color: var(--ink-2); word-break: break-all; text-align: center; }
.toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 200; max-width: calc(100% - 32px); padding: 12px 20px; border-radius: 999px; background: var(--navy); color: #fff; font-weight: 600; box-shadow: 0 10px 28px rgba(0,0,0,.25); text-align: center; animation: rise .25s; transition: opacity .5s; }
.toast.go { opacity: 0; }

/* forms */
.lbl { display: block; margin: 14px 0 6px; font-weight: 600; font-size: .94rem; }
.lbl small { font-weight: 400; color: var(--ink-2); }
.inp { width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); font-size: 16px; }
textarea.inp { resize: vertical; line-height: 1.5; }
.inp:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px color-mix(in srgb, var(--teal) 22%, transparent); }
.hint { margin: 6px 0 0; font-size: .84rem; color: var(--ink-2); }
.err { margin: 12px 0 0; padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--danger) 12%, var(--card)); color: var(--danger); font-weight: 600; }
#signin .btn { margin-top: 18px; }
.two { display: grid; gap: 0 12px; }
@media (min-width: 560px) { .two { grid-template-columns: 1fr 1fr; } }
.sub { margin: 24px 0 0; font-size: 1.05rem; padding-top: 18px; border-top: 1px solid var(--line); }
.photo-edit { display: flex; align-items: center; gap: 16px; margin-top: 12px; }
.photo-edit img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 3px solid var(--line); background: #fff; }
.photo-edit > div { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.file { position: relative; overflow: hidden; }
.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.pick { border: 0; padding: 0; margin: 0; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }
.icon-grid label, .color-grid label { position: relative; }
.icon-grid input, .color-grid input[type=radio] { position: absolute; opacity: 0; inset: 0; }
.icon-grid span { display: grid; place-items: center; height: 52px; border-radius: 14px; border: 1.5px solid var(--line); cursor: pointer; }
.icon-grid input:checked + span { border-color: var(--teal); background: var(--teal-l); color: var(--teal); box-shadow: inset 0 0 0 1.5px var(--teal); }
.icon-grid input:focus-visible + span, .color-grid input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.own-img { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.t-icon.preview { width: 52px; height: 52px; border-radius: 16px; }
.color-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.color-grid span { display: block; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; box-shadow: inset 0 0 0 2px rgba(255,255,255,.4); }
.color-grid input:checked + span { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--ink); }
.color-grid .custom input { width: 44px; height: 44px; border: 0; border-radius: 50%; padding: 0; background: none; cursor: pointer; }
.check { display: flex; align-items: center; gap: 12px; min-height: 48px; margin-top: 8px; font-weight: 500; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--teal); }

/* admin editing */
.editing .hero { outline: 3px dashed rgba(242, 183, 5, .7); outline-offset: 4px; }
.edit-fab { position: absolute; top: 16px; right: 16px; z-index: 2; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--gold); color: #2b2100; font-weight: 650; box-shadow: 0 6px 16px rgba(0,0,0,.25); }
.tool.is-hidden { opacity: .55; }
.t-admin { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 12px 16px 16px; border-top: 1px dashed var(--line); background: color-mix(in srgb, var(--gold) 6%, var(--card)); }
.hidden-note { margin-right: auto; font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.add-tool { width: 100%; margin-top: 16px; min-height: 84px; display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: var(--r); border: 2.5px dashed color-mix(in srgb, var(--teal) 50%, var(--line)); background: color-mix(in srgb, var(--teal) 5%, transparent); color: var(--teal); font-weight: 650; font-size: 1.05rem; }
.add-tool:hover { background: var(--teal-l); }
.adminbar { position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 45; width: min(960px, calc(100% - 20px)); display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; padding: 12px 14px 12px 18px; border-radius: 20px; background: var(--navy); color: #fff; box-shadow: 0 14px 40px rgba(0,0,0,.35); }
.ab-text { display: flex; flex-direction: column; line-height: 1.3; }
.ab-text span { font-size: .82rem; color: #b9cbe0; }
.ab-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.adminbar .btn.ghost { color: #fff; border-color: rgba(255,255,255,.3); }
.adminbar .btn.primary { background: var(--gold); border-color: var(--gold); color: #2b2100; }
@media (max-width: 600px) { .adminbar { border-radius: 18px; } .ab-actions { width: 100%; } .ab-actions .btn { flex: 1; padding: 8px 10px; } .ab-actions .btn span { display: none; } .ab-actions .btn:has(span) { flex: 0 0 auto; } }
.editing ~ .foot { padding-bottom: 180px; }

@media (max-width: 420px) { .bar-brand small { display: none; } .pill { padding: 0 14px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }

/* one share button at a time: the floating one on phones (easy to reach), the top one on big screens */
@media (max-width: 899px) { .bar .pill.primary { display: none; } }
@media (min-width: 900px) { .fab { display: none; } }

html:has(.adminbar) .toast { bottom: auto; top: calc(76px + env(safe-area-inset-top)); }

/* site admin box (admin only) */
.adminbox { margin-top: 20px; padding: 16px 20px; border: 2px dashed color-mix(in srgb, var(--gold) 70%, var(--line)); border-radius: var(--r); background: var(--card); }
.adminbox h2 { display: flex; align-items: center; gap: 8px; font-size: 1.1rem; }
.adminbox p { margin: 4px 0 12px; }
.ab-links { display: flex; flex-wrap: wrap; gap: 8px; }

/* "Are you a teacher?" section (same look as the share section) */
.teach { margin-top: 22px; background: linear-gradient(140deg, color-mix(in srgb, var(--gold) 16%, var(--card)), var(--card)); }
.teach-art { color: var(--teal); }
.teach-art .ic { fill: none; animation: none; }
.teach-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
@media (min-width: 820px) { .teach .teach-actions { grid-column: 1 / -1; } }
.row2 { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; }
