/* Offline Boards - style.css
   System fonts only. No external resources. Single light scheme. */

:root {
  color-scheme: light;

  --canvas: #F6F7F9;
  --paper: #FFFFFF;
  --paper-2: #FBFBFC;
  --ink: #1B2430;
  --ink-soft: #364152;
  --muted: #586374;
  --line: #D9DEE6;
  --line-strong: #B6BFCC;
  --field-line: #7A8496;
  --dot: #C5CCD7;

  --indigo: #4338CA;
  --indigo-dark: #352BA8;
  --indigo-tint: #ECEBFC;

  --yellow: #FFE680;
  --pink: #FFC4D6;
  --mint: #BFEBD3;
  --sky: #BFE0FF;

  --danger: #B42318;
  --danger-dark: #8A1C14;
  --danger-tint: #FDECEA;
  --ok-tint: #E7F6EE;

  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-note: "Marker Felt", "Segoe Print", "Bradley Hand", ui-rounded, system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --s1: 0.25rem;
  --s2: 0.5rem;
  --s3: 0.75rem;
  --s4: 1rem;
  --s5: 1.5rem;
  --s6: 2rem;
  --s7: 3rem;
  --s8: 4.5rem;

  --radius: 14px;
  --radius-lg: 22px;

  --shadow-1: 0 1px 1px rgba(27, 36, 48, 0.08), 0 2px 4px rgba(27, 36, 48, 0.06);
  --shadow-2: 0 1px 2px rgba(27, 36, 48, 0.10), 0 4px 8px rgba(27, 36, 48, 0.08), 0 12px 24px -8px rgba(27, 36, 48, 0.14);
  --shadow-3: 0 2px 3px rgba(27, 36, 48, 0.10), 0 10px 18px rgba(27, 36, 48, 0.10), 0 30px 50px -18px rgba(27, 36, 48, 0.28);
  --shadow-note: 0 1px 1px rgba(27, 36, 48, 0.14), 0 3px 5px rgba(27, 36, 48, 0.10), 0 9px 16px -6px rgba(27, 36, 48, 0.20);
  --shadow-lift: 0 2px 2px rgba(27, 36, 48, 0.14), 0 9px 14px rgba(27, 36, 48, 0.14), 0 24px 30px -8px rgba(27, 36, 48, 0.30);

  --header-h: 64px;
}

/* ------------------------------------------------------------------ */
/* Base                                                                */
/* ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--canvas);
  background-image: radial-gradient(circle at center, var(--dot) 1.3px, transparent 1.7px);
  background-size: 24px 24px;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; display: block; }
img, svg { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.12; margin: 0 0 0.6em; letter-spacing: -0.02em; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 1.3rem + 4.4vw, 4.6rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1.02; }
h2 { font-size: clamp(1.7rem, 1.2rem + 1.9vw, 2.6rem); font-weight: 780; }
h3 { font-size: 1.2rem; font-weight: 740; line-height: 1.25; }
p { margin: 0 0 1em; }
a { color: var(--indigo-dark); text-underline-offset: 0.18em; text-decoration-thickness: 0.09em; }
a:hover { color: var(--ink); }
code { font-family: var(--font-mono); font-size: 0.9em; background: var(--indigo-tint); color: var(--ink); padding: 0.1em 0.4em; border-radius: 6px; }
em { font-style: italic; }
ul, ol { padding-left: 1.25rem; margin: 0 0 1em; }

:focus-visible {
  outline: 3px solid var(--indigo);
  outline-offset: 3px;
  border-radius: 6px;
}
.on-dark :focus-visible,
.site-footer :focus-visible { outline-color: var(--yellow); }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap;
}
.sr-only-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.ob-filebtn:focus-within { outline: 3px solid var(--indigo); outline-offset: 3px; }

.skip-link {
  position: absolute; left: 0.75rem; top: -4rem; z-index: 3000;
  background: var(--ink); color: #fff; padding: 0.7rem 1rem; border-radius: 10px; font-weight: 650;
}
.skip-link:focus { top: 0.75rem; color: #fff; }

.wrap { width: min(100% - 2rem, 70rem); margin-inline: auto; }
.wrap--wide { width: min(100% - 2rem, 80rem); }
.wrap--narrow { width: min(100% - 2rem, 46rem); }

.kicker {
  font-size: 0.8125rem; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--indigo-dark); margin: 0 0 0.75rem;
}
.lede { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem); line-height: 1.55; color: var(--ink-soft); max-width: 40rem; }

/* ------------------------------------------------------------------ */
/* Buttons                                                             */
/* ------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 46px; padding: 0.55rem 1.15rem;
  font: inherit; font-size: 1rem; font-weight: 650; line-height: 1.2; text-decoration: none;
  color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--ink); border-radius: 12px;
  box-shadow: 0 2px 0 var(--ink);
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease;
}
.btn:hover { background: var(--yellow); color: var(--ink); transform: translateY(-1px); box-shadow: 0 3px 0 var(--ink); }
.btn:active { transform: translateY(1px); box-shadow: 0 0 0 var(--ink); }
.btn--primary { background: var(--indigo); color: #fff; }
.btn--primary:hover { background: var(--indigo-dark); color: #fff; }
.btn--light { background: #fff; color: var(--indigo-dark); border-color: #fff; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35); }
.btn--light:hover { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.btn--light-on-white { background: var(--paper); }
.btn--quiet { box-shadow: none; border-color: var(--line-strong); background: transparent; }
.btn--quiet:hover { box-shadow: none; transform: none; background: var(--indigo-tint); }
.btn--danger { color: var(--danger-dark); border-color: var(--danger); box-shadow: 0 2px 0 var(--danger); }
.btn--danger:hover { background: var(--danger-tint); color: var(--danger-dark); box-shadow: 0 3px 0 var(--danger); }
.btn--danger[data-armed] { background: var(--danger); color: #fff; }
.btn--sm { min-height: 42px; padding: 0.4rem 0.9rem; font-size: 0.9375rem; }
.btn svg { flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.25rem 0 0; }
.btn[data-armed] { background: var(--danger); color: #fff; border-color: var(--danger); box-shadow: 0 2px 0 var(--danger-dark); }

/* ------------------------------------------------------------------ */
/* Site header / nav                                                   */
/* ------------------------------------------------------------------ */
.site-header {
  position: relative; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8), 0 6px 18px -12px rgba(27, 36, 48, 0.25);
}
.site-header-inner {
  width: min(100% - 2rem, 80rem); margin-inline: auto;
  min-height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.65rem;
  min-height: 44px; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none;
}
.brand:hover { color: var(--indigo-dark); }
.brand svg { filter: drop-shadow(0 2px 3px rgba(27, 36, 48, 0.25)); flex: none; }
.site-nav ul { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0.4rem 0.85rem;
  color: var(--ink-soft); font-weight: 620; font-size: 1rem; text-decoration: none; border-radius: 10px;
}
.site-nav a:hover { background: var(--indigo-tint); color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 760; box-shadow: inset 0 -4px 0 var(--yellow); border-radius: 10px 10px 4px 4px; }
.site-nav a.nav-cta { background: var(--indigo); color: #fff; margin-left: 0.5rem; box-shadow: 0 2px 0 var(--ink); }
.site-nav a.nav-cta:hover { background: var(--indigo-dark); color: #fff; }
.site-nav a.nav-cta[aria-current="page"] { box-shadow: 0 2px 0 var(--ink), inset 0 -4px 0 var(--yellow); }
.nav-toggle {
  display: none; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0.4rem 0.9rem;
  font: inherit; font-weight: 650; color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--ink); border-radius: 12px; cursor: pointer;
}
.nav-toggle[aria-expanded="true"] { background: var(--yellow); }

@media (max-width: 819px) {
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--line-strong);
    padding: 0.5rem 1rem 1rem; box-shadow: var(--shadow-2);
  }
  .js .site-nav.is-open { display: block; }
  .js .site-nav ul { flex-direction: column; align-items: stretch; }
  .js .site-nav a { padding: 0.6rem 0.9rem; }
  .js .site-nav a.nav-cta { margin: 0.5rem 0 0; justify-content: center; }
  .site-header-inner { padding-block: 0.25rem; }
}

/* ------------------------------------------------------------------ */
/* Footer                                                              */
/* ------------------------------------------------------------------ */
.site-footer { background: var(--ink); color: #E8ECF2; margin-top: var(--s8); flex: none; }
.footer-inner {
  width: min(100% - 2rem, 80rem); margin-inline: auto; padding: 2.25rem 0;
  display: grid; grid-template-columns: minmax(0, 1.4fr) auto auto; gap: 1.5rem 2.5rem; align-items: start;
}
.footer-name { font-weight: 800; font-size: 1.2rem; margin: 0 0 0.35rem; color: #fff; letter-spacing: -0.01em; }
.footer-honest { margin: 0; color: #CBD3DF; font-size: 0.9375rem; max-width: 34rem; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; }
.footer-nav a, .footer-mail a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.6rem; color: #fff; font-weight: 600;
  text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.4); text-underline-offset: 0.2em; border-radius: 8px;
}
.footer-nav a:hover, .footer-mail a:hover { color: var(--yellow); text-decoration-color: var(--yellow); }
.footer-mail { margin: 0; }
@media (max-width: 899px) { .footer-inner { grid-template-columns: 1fr; } }

.site-footer--compact { margin-top: 0; }
.site-footer--compact .footer-inner { padding: 0.55rem 0; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 0.25rem 1.25rem; align-items: center; }
.site-footer--compact .footer-honest { font-size: 0.8125rem; line-height: 1.35; }
.site-footer--compact .footer-name { margin: 0; font-size: 1rem; }
@media (max-width: 1099px) { .site-footer--compact .footer-inner { grid-template-columns: 1fr; } .site-footer--compact .footer-name { display: none; } }

/* ------------------------------------------------------------------ */
/* Home: hero                                                          */
/* ------------------------------------------------------------------ */
.hero { padding: clamp(1.75rem, 4vw, 4rem) 0 0; }
.hero-top { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); gap: 2rem; align-items: center; }
.hero-copy { max-width: 52rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem; margin: 0 0 1.1rem; padding: 0.35rem 0.9rem 0.35rem 0.7rem;
  font-size: 0.875rem; font-weight: 650; color: var(--ink-soft);
  background: var(--paper); border: 1.5px solid var(--line-strong); border-radius: 999px; box-shadow: var(--shadow-1);
}
.eyebrow-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--indigo); box-shadow: 0 0 0 3px var(--indigo-tint); flex: none; }
.hl { background-image: linear-gradient(transparent 62%, var(--yellow) 62%, var(--yellow) 92%, transparent 92%); padding: 0 0.1em; margin: 0 -0.1em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hero-stickers { list-style: none; margin: 0; padding: 0; position: relative; min-height: 18rem; }
.sticker {
  position: absolute; width: 11rem; min-height: 8rem; padding: 1.4rem 1rem 1rem;
  font-family: var(--font-note); font-size: 1.3rem; line-height: 1.2; color: var(--ink);
  border-radius: 3px 3px 14px 3px; box-shadow: var(--shadow-note);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0) 45%);
}
.sticker::before { content: ""; position: absolute; top: -9px; left: 50%; width: 58px; height: 18px; margin-left: -29px; background: rgba(255, 255, 255, 0.65); box-shadow: 0 1px 2px rgba(27, 36, 48, 0.15); transform: rotate(-2deg); }
.sticker--yellow { background-color: var(--yellow); left: 2%; top: 0; transform: rotate(-4deg); }
.sticker--pink { background-color: var(--pink); left: 44%; top: 3.2rem; transform: rotate(3deg); }
.sticker--mint { background-color: var(--mint); left: 14%; top: 10.5rem; transform: rotate(-1.5deg); }
@media (max-width: 899px) {
  .hero-top { grid-template-columns: 1fr; gap: 1.25rem; }
  .hero-stickers { display: flex; flex-wrap: wrap; gap: 0.9rem; min-height: 0; }
  .sticker { position: relative; left: auto; top: auto; width: auto; min-height: 0; flex: 1 1 9rem; padding: 1.1rem 0.9rem 0.8rem; font-size: 1.1rem; transform: rotate(-1deg); }
  .sticker--pink { transform: rotate(1deg); }
}

.hero-board { margin-top: clamp(1.5rem, 3.5vw, 2.75rem); }
.board-cap { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin: 0 0 0.9rem; font-size: 0.9375rem; color: var(--ink-soft); }
.board-cap-tag { display: inline-block; padding: 0.15rem 0.7rem; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #fff; background: var(--ink); border-radius: 999px; }
.board-note { margin: 1rem 0 0; font-size: 0.9375rem; color: var(--muted); max-width: 52rem; }

/* ------------------------------------------------------------------ */
/* Sections / bands                                                    */
/* ------------------------------------------------------------------ */
.section { padding: clamp(2.75rem, 6vw, 5rem) 0; }
.section-head { max-width: 46rem; margin-bottom: 2rem; }
.section-head p { color: var(--ink-soft); font-size: 1.125rem; }
.band { border-block: 1px solid var(--line); }
.band--paper { background: var(--paper); }
.band--tint { background: var(--indigo-tint); border-color: #D3D0F5; }
.more-link { margin: 1.75rem 0 0; font-weight: 650; font-size: 1.0625rem; }
.more-link a { display: inline-flex; align-items: center; min-height: 44px; }
.more-link a::after { content: "\2192"; margin-left: 0.5rem; }

/* legend (toolbar explained) */
.legend { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 3rem; align-items: start; }
.legend-intro { position: sticky; top: 1.5rem; }
.legend-intro p { color: var(--ink-soft); }
.legend-list { list-style: none; margin: 0; padding: 0; counter-reset: legend; }
.legend-list li {
  display: grid; grid-template-columns: 3.75rem minmax(0, 1fr); gap: 1.1rem; padding: 1.4rem 0;
  border-top: 1.5px solid var(--ink);
}
.legend-list li:last-child { border-bottom: 1.5px solid var(--ink); }
.legend-list h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 0.4rem; }
.legend-list p { margin: 0; color: var(--ink-soft); }
.legend-icon {
  display: grid; place-items: center; width: 3.5rem; height: 3.5rem; color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--ink); border-radius: 14px; box-shadow: 0 3px 0 var(--ink);
}
.legend-list li:nth-child(4n + 1) .legend-icon { background: var(--yellow); }
.legend-list li:nth-child(4n + 2) .legend-icon { background: var(--pink); }
.legend-list li:nth-child(4n + 3) .legend-icon { background: var(--mint); }
.legend-list li:nth-child(4n) .legend-icon { background: var(--sky); }
@media (max-width: 899px) {
  .legend { grid-template-columns: 1fr; gap: 1.5rem; }
  .legend-intro { position: static; }
}

kbd {
  display: inline-block; min-width: 1.7em; padding: 0.05em 0.5em 0.1em; text-align: center;
  font-family: var(--font-ui); font-size: 0.8125rem; font-weight: 700; line-height: 1.4; color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--line-strong); border-bottom-width: 3px; border-radius: 7px; white-space: nowrap;
}

/* sticky note cards */
.note-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.75rem; padding-top: 0.75rem; }
.note-card {
  position: relative; padding: 1.9rem 1.4rem 1.4rem; border-radius: 3px 3px 18px 3px; color: var(--ink);
  box-shadow: var(--shadow-note);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0) 40%);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.note-card::before { content: ""; position: absolute; top: -10px; left: 50%; width: 64px; height: 20px; margin-left: -32px; background: rgba(255, 255, 255, 0.7); box-shadow: 0 1px 2px rgba(27, 36, 48, 0.15); transform: rotate(-2deg); }
.note-card--yellow { background-color: var(--yellow); }
.note-card--pink { background-color: var(--pink); }
.note-card--mint { background-color: var(--mint); }
.note-card--sky { background-color: var(--sky); }
.note-card h3 { font-family: var(--font-note); font-size: 1.45rem; font-weight: 700; line-height: 1.2; letter-spacing: 0; }
.note-card p { margin: 0; }
.note-card ul { margin: 0; padding-left: 1.1rem; }
.note-card--small { margin-top: 1.5rem; padding: 1.7rem 1.2rem 1.1rem; }
.note-card--small h3 { font-size: 1.25rem; }
.note-card--small li { margin-bottom: 0.25rem; }
@media (hover: hover) {
  .note-card:hover { transform: translateY(-3px) rotate(0.4deg); box-shadow: var(--shadow-lift); }
}
@media (min-width: 900px) {
  .note-trio .note-card:nth-child(1) { transform: rotate(-1.2deg); }
  .note-trio .note-card:nth-child(2) { transform: rotate(0.8deg) translateY(0.6rem); }
  .note-trio .note-card:nth-child(3) { transform: rotate(-0.6deg); }
}
@media (max-width: 899px) { .note-trio { grid-template-columns: 1fr; gap: 1.75rem; } }

/* keyboard grid */
.kbd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 0.9rem; margin: 0; }
.kbd-grid > div { background: var(--paper); border: 1.5px solid var(--line-strong); border-radius: 14px; padding: 0.9rem 1.1rem; box-shadow: var(--shadow-1); }
.kbd-grid dt { margin: 0 0 0.4rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; }
.kbd-grid dd { margin: 0; color: var(--ink-soft); font-size: 0.9875rem; }

/* template teasers */
.tpl-teasers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.tpl-card { background: var(--paper); border: 1.5px solid var(--ink); border-radius: 18px; padding: 1rem 1rem 1.25rem; box-shadow: 0 4px 0 var(--ink); }
.tpl-card h3 { margin: 0.9rem 0 0.35rem; }
.tpl-card p { margin: 0; color: var(--ink-soft); font-size: 0.9875rem; }
.tpl-card-preview, .tpl-preview {
  aspect-ratio: 4 / 3; display: grid; place-items: center; padding: 0.6rem; border-radius: 12px;
  background-color: var(--canvas); background-image: radial-gradient(circle at center, var(--dot) 1.3px, transparent 1.7px); background-size: 16px 16px;
  border: 1px solid var(--line);
}
.tpl-card-preview svg, .tpl-preview svg { width: 100%; height: 100%; display: block; }
@media (max-width: 899px) { .tpl-teasers { grid-template-columns: 1fr; } .tpl-card-preview { aspect-ratio: 16 / 10; } }

/* CTA */
.cta-band {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 2.5rem;
  padding: clamp(1.75rem, 4vw, 3.25rem); border-radius: 28px; color: #fff; overflow: hidden;
  background-color: var(--indigo);
  background-image: radial-gradient(circle at center, rgba(255, 255, 255, 0.22) 1.3px, transparent 1.7px);
  background-size: 22px 22px;
  box-shadow: var(--shadow-3);
}
.cta-band > div { max-width: 40rem; }
.cta-band h2 { color: #fff; margin-bottom: 0.5rem; }
.cta-band p { margin: 0; color: #fff; font-size: 1.125rem; }

/* ------------------------------------------------------------------ */
/* Inner page heroes                                                   */
/* ------------------------------------------------------------------ */
.page-hero { padding: clamp(2rem, 5vw, 4rem) 0 clamp(1.5rem, 3vw, 2.5rem); }
.page-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); gap: 2.5rem; align-items: center; }
.page-hero--simple h1 { max-width: 20ch; }
.page-hero--simple .lede { max-width: 44rem; }
.diagram { margin: 0; padding: 1rem; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 20px; box-shadow: 0 5px 0 var(--ink); }
.diagram svg { display: block; width: 100%; height: auto; }
.diagram figcaption { margin-top: 0.5rem; font-size: 0.875rem; color: var(--muted); text-align: center; }
@media (max-width: 899px) { .page-hero-grid { grid-template-columns: 1fr; gap: 1.75rem; } }
.tip-row { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.tip-row li { background: var(--paper); border: 1.5px solid var(--line-strong); border-radius: 14px; padding: 0.9rem 1.1rem; font-size: 0.9875rem; color: var(--ink-soft); box-shadow: var(--shadow-1); }
@media (max-width: 899px) { .tip-row { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ */
/* How it works                                                        */
/* ------------------------------------------------------------------ */
.doc-layout { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: 3rem; align-items: start; padding-bottom: 1rem; }
.toc { position: sticky; top: 1.25rem; font-size: 0.9375rem; }
.toc-title { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.5rem; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line-strong); }
.toc a { display: flex; align-items: center; min-height: 42px; padding: 0.25rem 0.85rem; color: var(--ink-soft); text-decoration: none; font-weight: 600; border-left: 4px solid transparent; margin-left: -2px; }
.toc a:hover { color: var(--ink); background: var(--indigo-tint); border-left-color: var(--indigo); }
.doc { display: grid; gap: 1.5rem; min-width: 0; }
.sheet {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 2.25rem); box-shadow: var(--shadow-2); scroll-margin-top: 1rem; min-width: 0;
}
.sheet h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); }
.sheet > :last-child { margin-bottom: 0; }
.steps { list-style: none; counter-reset: step; margin: 0 0 1.25rem; padding: 0; display: grid; gap: 0.9rem; }
.steps li { counter-increment: step; position: relative; padding-left: 3.4rem; min-height: 2.6rem; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -0.1rem; display: grid; place-items: center; width: 2.4rem; height: 2.4rem;
  font-weight: 800; color: var(--ink); background: var(--yellow); border: 1.5px solid var(--ink); border-radius: 50% 50% 50% 8px; box-shadow: 0 2px 0 var(--ink);
}
.plain-list { margin: 0 0 1em; padding-left: 1.25rem; display: grid; gap: 0.6rem; }
.plain-list--warn li::marker { content: "\26A0\FE0E  "; color: var(--danger-dark); }
.limits-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin-top: 1rem; }
.limits-col { border-radius: 16px; padding: 1.25rem; border: 1.5px solid var(--ink); }
.limits-col h3 { margin-bottom: 0.75rem; }
.limits-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.limits-col li { position: relative; padding-left: 1.7rem; font-size: 0.9875rem; }
.limits-col li::before { position: absolute; left: 0; top: 0; font-weight: 800; }
.limits-col--yes { background: var(--ok-tint); }
.limits-col--yes li::before { content: "\2713"; color: #0F6B3B; }
.limits-col--no { background: var(--danger-tint); }
.limits-col--no li::before { content: "\2715"; color: var(--danger-dark); }
@media (max-width: 719px) { .limits-grid { grid-template-columns: 1fr; } }

details { border-top: 1px solid var(--line); }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; display: flex; align-items: center; min-height: 52px; padding: 0.5rem 0; font-weight: 700; list-style: none; gap: 0.75rem; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "+"; display: grid; place-items: center; flex: none; width: 1.7rem; height: 1.7rem; font-weight: 800; background: var(--yellow); border: 1.5px solid var(--ink); border-radius: 8px; }
details[open] > summary::before { content: "\2212"; background: var(--ink); color: #fff; }
details p { padding: 0 0 1rem 2.45rem; margin: 0; color: var(--ink-soft); }

.panel .stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 0.75rem; margin: 1.25rem 0; }
.stat-grid > div { background: var(--canvas); border: 1.5px solid var(--line-strong); border-radius: 14px; padding: 0.7rem 0.9rem; }
.stat-grid dt { font-size: 0.75rem; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.stat-grid dd { margin: 0.15rem 0 0; font-size: 1.3rem; font-weight: 780; letter-spacing: -0.01em; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.stat-grid .stat-wide { grid-column: 1 / -1; }
.stat-grid .stat-wide dd { font-size: 1.05rem; }
.meter { height: 16px; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 999px; overflow: hidden; }
.meter-fill { height: 100%; width: 0; background: repeating-linear-gradient(135deg, var(--indigo) 0 8px, #5B50E0 8px 16px); transition: width 0.5s ease; }
.meter-label { margin: 0.5rem 0 1rem; font-size: 0.875rem; color: var(--muted); }
.panel-empty { padding: 0.75rem 1rem; background: var(--indigo-tint); border-radius: 12px; font-size: 0.9875rem; }
.panel-msg, .tpl-msg, .c-status, .c-copied { min-height: 0; margin: 0.9rem 0 0; font-size: 0.9875rem; color: var(--ink-soft); }
.panel-msg:empty, .tpl-msg:empty, .c-copied:empty { display: none; }
.panel-msg.is-bad, .tpl-msg.is-bad { color: var(--danger-dark); font-weight: 650; }

/* ------------------------------------------------------------------ */
/* Templates page                                                      */
/* ------------------------------------------------------------------ */
.tpl-rows { display: grid; gap: clamp(2.5rem, 6vw, 4.5rem); padding-block: 1rem 2rem; }
.tpl-row { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.tpl-row:nth-child(even) .tpl-preview { order: 2; }
.tpl-preview { aspect-ratio: 16 / 11; padding: 0.9rem; border: 1.5px solid var(--ink); border-radius: 22px; box-shadow: 0 6px 0 var(--ink), var(--shadow-3); background-size: 22px 22px; }
.tpl-body h2 { margin-bottom: 0.5rem; }
.inside-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 0.4rem; }
.inside-list li { position: relative; padding-left: 1.6rem; color: var(--ink-soft); }
.inside-list li::before { content: ""; position: absolute; left: 0.1rem; top: 0.45rem; width: 0.8rem; height: 0.8rem; background: var(--yellow); border: 1.5px solid var(--ink); border-radius: 2px 2px 6px 2px; }
.tpl-tip { padding: 0.8rem 1rem; background: var(--paper); border-left: 5px solid var(--indigo); border-radius: 0 12px 12px 0; font-size: 0.9875rem; color: var(--ink-soft); box-shadow: var(--shadow-1); }
.tpl-open { margin-top: 0.9rem; }
@media (max-width: 899px) {
  .tpl-row { grid-template-columns: 1fr; }
  .tpl-row:nth-child(even) .tpl-preview { order: 0; }
}

/* ------------------------------------------------------------------ */
/* Contact                                                             */
/* ------------------------------------------------------------------ */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; padding-bottom: 1rem; }
.contact-side p { color: var(--ink-soft); }
.contact-side h2 { font-size: 1.6rem; }
.aside-fine { margin-top: 1.5rem; font-size: 0.9375rem; color: var(--muted); }
.field { display: grid; gap: 0.4rem; margin-bottom: 1.25rem; }
.field label { font-weight: 680; }
.optional { font-weight: 500; color: var(--muted); }
input[type="text"], select, textarea {
  width: 100%; min-height: 48px; padding: 0.6rem 0.8rem; font: inherit; color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--field-line); border-radius: 12px;
}
select {
  -webkit-appearance: none; appearance: none; padding-right: 2.5rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231B2430' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.8rem center; background-size: 18px;
}
textarea { resize: vertical; min-height: 9rem; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input[type="text"]:hover, select:hover, textarea:hover { border-color: var(--ink); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-tint); }
.field-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; }
.count { font-size: 0.875rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.count.is-bad { color: var(--danger-dark); font-weight: 700; }
.field-error { margin: 0; min-height: 0; color: var(--danger-dark); font-weight: 650; font-size: 0.9875rem; }
.field-error:empty { display: none; }
.field-error::before { content: "\26A0\FE0E  "; }
.result { margin-top: 1.5rem; padding: 1rem 1.25rem; border-radius: 14px; background: var(--ok-tint); border: 1.5px solid #0F6B3B; }
.result p { margin: 0 0 0.5rem; }
.result p:last-child { margin-bottom: 0; }
.result a { font-weight: 650; }
@media (max-width: 899px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 899px) {
  .doc-layout { grid-template-columns: 1fr; gap: 1.5rem; }
  .toc { position: static; }
  .toc ol { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); border-left: 0; gap: 0 1rem; }
  .toc a { margin-left: 0; border-left-width: 0; border-bottom: 1px solid var(--line); }
}

/* ------------------------------------------------------------------ */
/* The board component                                                 */
/* ------------------------------------------------------------------ */
.ob-host { min-width: 0; }
.ob-noscript { padding: 1.25rem; margin: 0; background: var(--paper); border: 1.5px dashed var(--ink); border-radius: 14px; }

.ob-app {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  height: clamp(540px, 80vh, 740px);
  background: var(--paper); color: var(--ink);
  border: 1.5px solid var(--ink); border-radius: 22px; overflow: hidden;
  box-shadow: 0 6px 0 var(--ink), var(--shadow-3);
  font-family: var(--font-ui); line-height: 1.35;
}
.ob-app--full { height: 100%; border-radius: 0; border-width: 0 0 1.5px; box-shadow: none; }
.ob-app button { font-family: inherit; }

.ob-bar { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; flex-wrap: wrap; padding: 0.4rem 0.65rem; min-height: 54px; background: var(--paper); border-bottom: 1.5px solid var(--ink); }
.ob-bar-left { display: flex; align-items: center; gap: 0.5rem 0.9rem; min-width: 0; flex: 1 1 14rem; }
.ob-name-input {
  flex: 0 1 17rem; min-width: 0; min-height: 42px; padding: 0.4rem 0.7rem; font: inherit; font-size: 1.05rem; font-weight: 720; letter-spacing: -0.01em; color: var(--ink);
  background: transparent; border: 1.5px solid transparent; border-radius: 10px; text-overflow: ellipsis;
}
.ob-name-input:hover { border-color: var(--line-strong); background: var(--paper-2); }
.ob-name-input:focus-visible { background: #fff; border-color: var(--indigo); outline-offset: 2px; }
.ob-chip { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0; padding: 0.2rem 0.7rem 0.2rem 0.45rem; font-size: 0.8125rem; font-weight: 600; line-height: 1.3; color: #0B5A31; background: var(--ok-tint); border: 1.5px solid #0F6B3B; border-radius: 999px; min-width: 0; }
.ob-chip.is-warn { color: var(--danger-dark); background: var(--danger-tint); border-color: var(--danger); }
.ob-chip-icon { display: inline-flex; flex: none; }
.ob-chip-text { overflow-wrap: anywhere; }
.ob-bar-actions { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.ob-bar-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; min-height: 42px; min-width: 42px; padding: 0.3rem 0.75rem;
  font-size: 0.875rem; font-weight: 650; color: var(--ink); background: var(--paper); border: 1.5px solid var(--line-strong); border-radius: 11px; cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease;
}
.ob-bar-btn:hover { background: var(--indigo-tint); border-color: var(--indigo); }
@media (max-width: 899px) {
  .ob-bar-label { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ob-bar-btn { padding: 0.3rem; }
}
@media (max-width: 639px) {
  .ob-chip-text { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ob-chip { padding: 0.2rem; }
  .ob-chip.is-warn .ob-chip-text { position: static; width: auto; height: auto; margin: 0; clip: auto; white-space: normal; font-size: 0.75rem; }
  .ob-chip.is-warn { padding: 0.2rem 0.6rem 0.2rem 0.35rem; }
  .ob-bar-left { flex-basis: 100%; }
  .ob-name-input { flex: 1 1 8rem; }
  .ob-bar { gap: 0.15rem 0.5rem; }
}

.ob-stage { position: relative; flex: 1 1 auto; display: flex; min-height: 0; }
.ob-toolbar {
  flex: none; width: 62px; display: flex; flex-direction: column; align-items: center; gap: 0.3rem; padding: 0.55rem 0.35rem;
  background: var(--paper-2); border-right: 1.5px solid var(--ink); overflow-y: auto; overflow-x: hidden; z-index: 30;
}
.ob-btn {
  flex: none; display: grid; place-items: center; width: 46px; height: 46px; padding: 0; color: var(--ink);
  background: transparent; border: 1.5px solid transparent; border-radius: 13px; cursor: pointer;
  transition: background-color 0.14s ease, box-shadow 0.14s ease;
}
.ob-btn:hover { background: var(--indigo-tint); border-color: var(--indigo); }
.ob-btn[aria-pressed="true"] { background: var(--indigo); color: #fff; border-color: var(--ink); box-shadow: 0 2px 0 var(--ink); }
.ob-btn.is-off, .ob-btn:disabled { color: #657080; background: transparent; border: 1.5px dashed var(--line-strong); cursor: default; }
.ob-btn.is-off:hover, .ob-btn:disabled:hover { background: transparent; border-color: var(--line-strong); }
.ob-tsep { flex: none; width: 30px; height: 2px; margin: 0.2rem 0; background: var(--line-strong); border-radius: 2px; }

.ob-canvas-wrap { position: relative; flex: 1 1 auto; min-width: 0; min-height: 0; }
.ob-viewport {
  position: absolute; inset: 0; overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: none; cursor: default;
  background-color: var(--canvas);
  background-image: radial-gradient(circle at center, var(--dot) 1.4px, transparent 1.9px);
  background-size: var(--gstep, 24px) var(--gstep, 24px);
  background-position: var(--gx, 0) var(--gy, 0);
}
.ob-viewport:focus-visible { outline: 3px solid var(--indigo); outline-offset: -5px; border-radius: 0; }
.ob-app[data-touch="page"] .ob-viewport[data-tool="select"] { touch-action: pan-y; }
.ob-viewport[data-tool="hand"], .ob-viewport.is-space { cursor: grab; }
.ob-viewport.is-panning { cursor: grabbing; }
.ob-viewport[data-tool="pen"] { cursor: crosshair; }
.ob-world { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-origin: 0 0; }
.ob-notes { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.ob-ink { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; z-index: 100000; }

.ob-note {
  position: absolute; box-sizing: border-box; padding: 26px 16px 14px;
  background-color: var(--nc, var(--yellow));
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0) 38%), linear-gradient(135deg, transparent 88%, rgba(27, 36, 48, 0.10) 100%);
  color: var(--ink); border-radius: 3px 3px 16px 3px;
  box-shadow: var(--shadow-note);
  transform: rotate(var(--rot, 0deg));
  transition: box-shadow 0.18s ease, transform 0.18s ease;
  touch-action: none; cursor: grab;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.ob-note[data-color="yellow"] { --nc: var(--yellow); }
.ob-note[data-color="pink"] { --nc: var(--pink); }
.ob-note[data-color="mint"] { --nc: var(--mint); }
.ob-note[data-color="sky"] { --nc: var(--sky); }
.ob-note::before {
  content: ""; position: absolute; top: -9px; left: 50%; width: 54px; height: 17px; margin-left: -27px;
  background: rgba(255, 255, 255, 0.62); box-shadow: 0 1px 2px rgba(27, 36, 48, 0.16); transform: rotate(-2deg); pointer-events: none;
}
.ob-note:hover { box-shadow: var(--shadow-lift); transform: rotate(var(--rot, 0deg)) translateY(-3px); }
.ob-note.is-dragging { box-shadow: 0 4px 4px rgba(27, 36, 48, 0.16), 0 16px 24px rgba(27, 36, 48, 0.2), 0 40px 50px -12px rgba(27, 36, 48, 0.36); transform: rotate(0deg) translateY(-6px) scale(1.02); cursor: grabbing; }
.ob-note:focus-visible, .ob-note.is-selected { outline: 3px solid var(--indigo); outline-offset: 4px; border-radius: 3px 3px 16px 3px; }
.ob-note.is-selected::after {
  content: ""; position: absolute; right: -10px; top: -10px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--indigo) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat;
  box-shadow: 0 0 0 2px #fff;
}
.ob-note-text {
  display: block; width: 100%; height: 100%; margin: 0; padding: 0; resize: none; overflow: hidden;
  font-family: var(--font-note); font-size: 19px; line-height: 1.28; color: var(--ink);
  background: transparent; border: 0; border-radius: 0; outline: 0; pointer-events: none; cursor: inherit;
  user-select: none; -webkit-user-select: none; min-height: 0;
}
.ob-note-text::placeholder { color: #3F4955; opacity: 1; font-style: italic; }
.ob-note.is-editing { cursor: text; }
.ob-note.is-editing .ob-note-text { pointer-events: auto; overflow: auto; user-select: text; -webkit-user-select: text; cursor: text; }
.ob-note.is-editing { box-shadow: var(--shadow-lift); outline: 3px solid var(--ink); outline-offset: 4px; }

.ob-kc.is-down circle:first-child { stroke: var(--indigo); }

/* options bar */
.ob-options {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 20; max-width: calc(100% - 20px);
  background: var(--paper); border: 1.5px solid var(--ink); border-radius: 16px; padding: 0.2rem 0.6rem; box-shadow: 0 3px 0 var(--ink), var(--shadow-2);
}
.ob-opt { display: flex; flex-wrap: wrap; align-items: center; gap: 0.1rem 0.5rem; min-height: 46px; }
.ob-opt-label { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.ob-swatches { display: flex; align-items: center; }
.ob-swatch { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; background: transparent; border: 0; border-radius: 12px; cursor: pointer; }
.ob-swatch:hover { background: var(--indigo-tint); }
.ob-swatch-dot { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid rgba(27, 36, 48, 0.7); color: var(--ink); }
.ob-swatch-dot svg { opacity: 0; }
.ob-swatch[data-pen] .ob-swatch-dot { color: #fff; }
.ob-swatch[aria-pressed="true"] .ob-swatch-dot { box-shadow: 0 0 0 2px #fff, 0 0 0 4.5px var(--ink); }
.ob-swatch[aria-pressed="true"] .ob-swatch-dot svg { opacity: 1; }
.ob-hint { font-size: 0.8125rem; color: var(--muted); line-height: 1.3; }
.ob-opt-sel { display: inline-flex; flex-wrap: wrap; gap: 0.3rem; }
.ob-widths { display: inline-flex; gap: 0.3rem; }
.ob-chipbtn {
  display: inline-flex; align-items: center; gap: 0.35rem; min-height: 42px; padding: 0.2rem 0.75rem; font-size: 0.8125rem; font-weight: 680;
  color: var(--ink); background: var(--paper); border: 1.5px solid var(--line-strong); border-radius: 999px; cursor: pointer;
}
.ob-chipbtn:hover { background: var(--indigo-tint); border-color: var(--indigo); }
.ob-chipbtn[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
@media (max-width: 719px) {
  .ob-hint { display: none; }
  .ob-opt[data-opt="hand"] .ob-hint { display: inline; }
  .ob-chipbtn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ob-chipbtn[data-width] span { position: static; width: auto; height: auto; clip: auto; }
  .ob-chipbtn[data-act] { padding: 0.2rem 0.55rem; min-width: 42px; justify-content: center; }
  .ob-opt-label { display: none; }
}

/* empty state */
.ob-empty {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 6; width: min(21rem, calc(100% - 2rem));
  text-align: center; padding: 1.1rem 1.2rem 1.25rem; background: rgba(255, 255, 255, 0.94); border: 1.5px dashed var(--ink); border-radius: 18px; pointer-events: none;
}
.ob-empty button { pointer-events: auto; }
.ob-empty svg { display: block; margin: 0 auto 0.25rem; }
.ob-empty-title { margin: 0; font-size: 1.15rem; font-weight: 780; }
.ob-empty-text { margin: 0.2rem 0 0.9rem; color: var(--ink-soft); font-size: 0.9375rem; }
.ob-empty-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }

/* corner: minimap + zoom */
.ob-corner { position: absolute; right: 10px; bottom: 10px; z-index: 20; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.ob-minimap { width: 168px; height: 112px; background: rgba(255, 255, 255, 0.94); border: 1.5px solid var(--ink); border-radius: 12px; overflow: hidden; box-shadow: 0 2px 0 var(--ink), var(--shadow-2); cursor: pointer; touch-action: none; }
.ob-minimap canvas { display: block; width: 100%; height: 100%; }
.ob-minimap:focus-visible { outline-offset: 3px; }
.ob-zoom { display: flex; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 13px; overflow: hidden; box-shadow: 0 2px 0 var(--ink), var(--shadow-2); }
.ob-zbtn, .ob-zlevel { min-width: 42px; height: 42px; display: grid; place-items: center; padding: 0 0.3rem; color: var(--ink); background: transparent; border: 0; cursor: pointer; }
.ob-zbtn:hover, .ob-zlevel:hover { background: var(--indigo-tint); }
.ob-zbtn + .ob-zbtn, .ob-zlevel, .ob-zbtn + .ob-zlevel { border-left: 1px solid var(--line-strong); }
.ob-zlevel { min-width: 58px; font-size: 0.8125rem; font-weight: 720; font-variant-numeric: tabular-nums; border-right: 1px solid var(--line-strong); }
.ob-zoom :focus-visible { outline-offset: -4px; }
@media (max-width: 559px) {
  .ob-minimap { width: 112px; height: 76px; }
  .ob-zbtn, .ob-zlevel { min-width: 40px; height: 40px; }
  .ob-zlevel { min-width: 50px; }
}
@media (max-height: 520px) { .ob-minimap { display: none; } }
.ob-wheelhint { position: absolute; left: 10px; bottom: 10px; z-index: 10; margin: 0; padding: 0.25rem 0.7rem; font-size: 0.75rem; font-weight: 600; color: var(--ink-soft); background: rgba(255, 255, 255, 0.92); border: 1px solid var(--line-strong); border-radius: 999px; pointer-events: none; }
@media (max-width: 559px) { .ob-wheelhint { display: none; } }

/* toast + tip */
.ob-toast {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 0.75rem;
  max-width: calc(100% - 20px); padding: 0.45rem 0.55rem 0.45rem 1rem; font-size: 0.9375rem; font-weight: 600; color: #fff; background: var(--ink); border-radius: 14px; box-shadow: var(--shadow-3);
}
.ob-toast.is-in { animation: ob-toast-in 0.22s ease-out both; }
.ob-toast-btn { min-height: 40px; padding: 0.2rem 0.9rem; font-size: 0.875rem; font-weight: 750; color: var(--ink); background: var(--yellow); border: 0; border-radius: 10px; cursor: pointer; }
.ob-toast-btn:hover { background: #fff; }
.ob-toast :focus-visible { outline-color: var(--yellow); }
.ob-toast-btn:focus-visible { outline-color: #fff; }
@keyframes ob-toast-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
.ob-tip { position: absolute; z-index: 60; padding: 0.3rem 0.6rem; font-size: 0.75rem; font-weight: 650; line-height: 1.3; color: #fff; background: var(--ink); border-radius: 8px; white-space: nowrap; pointer-events: none; box-shadow: var(--shadow-2); }

/* dialogs */
.ob-dialog {
  width: min(40rem, calc(100vw - 1.5rem)); max-height: calc(100vh - 2rem); max-height: calc(100dvh - 2rem); padding: 0; overflow: auto;
  color: var(--ink); background: var(--paper); border: 1.5px solid var(--ink); border-radius: 20px; box-shadow: 0 6px 0 var(--ink), 0 40px 90px rgba(27, 36, 48, 0.4);
  font-family: var(--font-ui); line-height: 1.5; font-size: 1rem;
}
.ob-dialog::backdrop { background: rgba(27, 36, 48, 0.55); }
.ob-dialog.is-fallback { position: fixed; inset: 1rem; margin: auto; height: fit-content; z-index: 2000; }
.ob-dialog-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem 1.1rem 0.8rem 1.4rem; background: var(--yellow); border-bottom: 1.5px solid var(--ink); }
.ob-dialog-head h2 { margin: 0; font-size: 1.35rem; }
.ob-dialog-x { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; color: var(--ink); background: var(--paper); border: 1.5px solid var(--ink); border-radius: 12px; cursor: pointer; }
.ob-dialog-x:hover { background: var(--ink); color: #fff; }
.ob-dialog-body { padding: 1.1rem 1.4rem 1.5rem; }
.ob-dialog-body p { margin: 0 0 0.9rem; }
.ob-dlg-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.9rem 0; }
.ob-dlg-label { display: block; margin: 1rem 0 0.35rem; font-weight: 680; font-size: 0.9375rem; }
.ob-json { display: block; width: 100%; min-height: 8rem; padding: 0.6rem 0.75rem; font-family: var(--font-mono); font-size: 0.75rem; line-height: 1.45; color: var(--ink); background: var(--paper-2); border: 1.5px solid var(--field-line); border-radius: 12px; resize: vertical; }
.ob-fieldset { margin: 1rem 0 0; padding: 0.4rem 0.9rem 0.6rem; border: 1.5px solid var(--line-strong); border-radius: 14px; }
.ob-fieldset legend { padding: 0 0.4rem; font-weight: 700; font-size: 0.9375rem; }
.ob-radio { display: flex; align-items: flex-start; gap: 0.6rem; min-height: 44px; padding: 0.4rem 0; cursor: pointer; }
.ob-radio input { flex: none; width: 22px; height: 22px; margin: 0.15rem 0 0; accent-color: var(--indigo); }
.ob-dlg-msg { min-height: 1.4em; margin: 0.9rem 0 0; font-weight: 650; color: #0B5A31; }
.ob-dlg-msg:empty { display: none; }
.ob-dlg-msg.is-bad { color: var(--danger-dark); }
.ob-danger { margin-top: 1.4rem; padding: 1rem 1.1rem; background: var(--danger-tint); border: 1.5px solid var(--danger); border-radius: 14px; }
.ob-danger p { margin-bottom: 0.75rem; }
.ob-dlg-note { margin-top: 1rem; font-size: 0.9375rem; color: var(--ink-soft); }
.ob-tpllist { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.6rem; }
.ob-tplitem { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem 0.9rem; border: 1.5px solid var(--line-strong); border-radius: 14px; background: var(--paper-2); }
.ob-tplitem div { display: grid; gap: 0.15rem; min-width: 0; }
.ob-tplitem span { font-size: 0.875rem; color: var(--ink-soft); }
.ob-kbdlist { margin: 0 0 1rem; display: grid; gap: 0.4rem; }
.ob-kbdrow { display: grid; grid-template-columns: minmax(8.5rem, 0.8fr) minmax(0, 1.4fr); gap: 0.75rem; align-items: center; padding: 0.3rem 0; border-bottom: 1px solid var(--line); }
.ob-kbdrow dt, .ob-kbdrow dd { margin: 0; }
.ob-kbdrow dd { font-size: 0.9375rem; color: var(--ink-soft); }
.ob-radio--pref { padding-top: 0.6rem; }
@media (max-width: 559px) {
  .ob-kbdrow { grid-template-columns: 1fr; gap: 0.15rem; }
  .ob-tplitem { flex-direction: column; align-items: stretch; }
}

/* board page shell */
.page-board { height: 100vh; height: 100dvh; overflow-y: auto; }
.app-main { flex: none; height: calc(100vh - var(--header-h) - 3.1rem); height: calc(100dvh - var(--header-h) - 3.1rem); min-height: 32rem; }
.app-main .ob-host { height: 100%; }
.site-header--app .site-header-inner { width: min(100% - 1.5rem, 120rem); }
@media (max-width: 819px) { .app-main { height: calc(100dvh - var(--header-h) - 2.6rem); min-height: 26rem; } }

/* ------------------------------------------------------------------ */
/* Print                                                               */
/* ------------------------------------------------------------------ */
@media print {
  body { background: #fff; display: block; }
  .site-header, .site-footer, .skip-link, .ob-toolbar, .ob-options, .ob-corner, .ob-bar-actions, .ob-wheelhint, .ob-chip, .ob-toast, .ob-tip, .nav-toggle, .toc, .btn-row { display: none !important; }
  .sheet, .tpl-card, .note-card { box-shadow: none; break-inside: avoid; }
  .ob-app, .ob-app--full { box-shadow: none; border: 1px solid #000; height: 90vh; }
  .page-board, .app-main { height: auto; overflow: visible; }
  .ob-viewport { background-image: none; }
  a { color: #000; }
}

/* ------------------------------------------------------------------ */
/* Reduced motion: everything lands in its final, static state         */
/* ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    animation-duration: 0.001ms !important;
    transition: none !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
