:root {
  color-scheme: light;
  --bg: #fafafa; --paper: #ffffff; --ink: #171717; --muted: #666666;
  --line: #eaeaea; --accent: #000000; --accent-soft: #f5f5f5;
  --shadow-border: 0 0 0 1px oklch(0 0 0 / .08), 0 1px 2px oklch(0 0 0 / .02);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none; -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; color: inherit; transition: background-color 120ms ease, color 120ms ease; }
button:disabled { cursor: default; opacity: .4; }
button:active:not(:disabled) { transform: scale(.96); }
[hidden] { display: none !important; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid #000; outline-offset: 4px; }
a { color: inherit; }
svg { width: 22px; height: 22px; display: block; flex-shrink: 0; }
button svg { pointer-events: none; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(30px, 3.2vw, 40px); font-weight: 600; letter-spacing: -1.4px; line-height: 1.2; }
h2 { font-size: 24px; font-weight: 600; letter-spacing: -.6px; line-height: 1.3; }
h3 { font-size: 16px; font-weight: 600; letter-spacing: -.3px; margin-bottom: 12px; }
.site-header { max-width: 1092px; margin: 0 auto; min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.site-header.offline { justify-content: flex-end; }
.library-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--muted); font-size: 13px; text-decoration: none; }
.library-link svg { width: 17px; height: 17px; }
.library-link:hover { color: var(--ink); }
.header-actions { display: flex; gap: 8px; }
.utility { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 10px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 13px; }
.utility svg { width: 18px; height: 18px; }
.utility:hover { background: var(--accent-soft); color: var(--ink); }
.board-main { max-width: 1092px; margin: 0 auto; padding-bottom: 30px; }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 30px 0 25px; }
.board-sections { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-width: 640px; margin-bottom: 20px; }
.board-sections button { display: flex; align-items: center; justify-content: center; min-height: 50px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font-size: 17px; font-weight: 600; }
.board-sections svg { margin-right: 9px; width: 21px; height: 21px; }
.board-sections button:hover { background: var(--accent-soft); }
.board-sections button[aria-pressed=true] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
#flashcards-section { max-width: 640px; margin: 0 auto; }
.flash-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.flash-toolbar label { display: grid; gap: 4px; width: 230px; max-width: 65%; font-size: 14px; font-weight: 600; }
.flash-toolbar select { width: 100%; }
.flash-position { margin: 8px 0; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; text-align: center; }
.flash-card { display: grid; place-items: center; width: 100%; height: 34vh; min-height: 240px; max-height: 340px; padding: 20px; border: 1px solid #d4d4d4; border-radius: 8px; background: var(--paper); }
.flash-card:hover { border-color: var(--ink); }
.flash-card:active:not(:disabled) { transform: none; }
#flash-picture { display: grid; place-items: center; width: 100%; height: 100%; min-height: 0; }
#flash-image { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
#flash-image-error { max-width: 28ch; font-size: 19px; text-align: center; }
#flash-word { max-width: 100%; font-size: clamp(44px, 10vw, 84px); font-weight: 600; line-height: 1.15; overflow-wrap: anywhere; }
.flash-flip { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 12px; }
.flash-flip p { max-width: 28ch; color: var(--muted); font-size: 15px; }
.flash-flip button { flex-shrink: 0; }
.flash-navigation { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.flash-navigation button { min-height: 52px; font-size: 18px; }
.flash-credits { overflow-wrap: anywhere; font-size: 12px; }
.flash-credits p { margin-top: 14px; }
.flash-credits span { display: block; }
@media(max-width:520px) {
  .board-sections { gap: 8px; margin-bottom: 16px; }
  .board-sections button { padding: 10px 8px; font-size: 15px; }
  .board-sections svg { width: 19px; height: 19px; margin-right: 6px; }
  .flash-card { padding: 16px; }
  .flash-flip { gap: 12px; }
  .flash-flip p { font-size: 14px; }
}
.help-now { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 14px; border: 1px solid #d4d4d4; border-radius: 8px; background: var(--paper); font-size: 14px; font-weight: 600; flex-shrink: 0; }
.help-now svg { width: 19px; height: 19px; }
.help-now:hover { background: var(--accent-soft); border-color: #a3a3a3; }
.message-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 106px; padding: 22px 24px; border-radius: 8px; background: var(--accent); color: #fff; }
.message-copy { flex: 1; min-width: 0; }
#message { font-size: clamp(26px, 3.1vw, 36px); font-weight: 600; letter-spacing: -.7px; line-height: 1.25; overflow-wrap: anywhere; }
.message-actions { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.say-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 46px; border: 1px solid #fff; border-radius: 6px; padding: 10px 15px; background: #fff; color: #171717; font-size: 14px; font-weight: 600; }
.say-button svg { width: 20px; height: 20px; }
.clear-button { display: grid; place-items: center; width: 44px; height: 46px; border: 0; border-radius: 6px; background: transparent; color: #fff; }
.clear-button:hover:not(:disabled) { background: #333; }
.speech-status { margin-top: 7px; color: #d4d4d4; font-size: 12px; }
.speech-status:empty { display: none; }
.answers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0 26px; }
.answer { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 70px; padding: 12px 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; font-size: 22px; }
.answer strong { font-weight: 600; }
.answer svg { width: 25px; height: 25px; }
.answer:hover { background: var(--accent-soft); }
.answer[aria-pressed=true] { color: #fff; background: #000; border-color: #000; }
.categories { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-bottom: 16px; }
.category { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 7px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 15px; }
.category svg { width: 19px; height: 19px; }
.category:hover { background: #f5f5f5; }
.category[aria-pressed=true] { color: #171717; background: #ededed; font-weight: 600; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; outline: none; }
.tile { position: relative; display: flex; align-items: center; gap: 22px; min-height: 148px; padding: 24px; text-align: left; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.tile:hover { background: #fafafa; border-color: #a3a3a3; }
.tile[aria-pressed=true] { border-color: #000; box-shadow: inset 0 0 0 2px #000; background: #f5f5f5; }
.pictogram { display: grid; place-items: center; width: 52px; height: 52px; flex-shrink: 0; color: #171717; }
.pictogram svg { width: 46px; height: 46px; stroke-width: 1.7; }
.tile strong { font-size: 26px; font-weight: 600; letter-spacing: -.5px; line-height: 1.2; overflow-wrap: anywhere; }
.tile img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; outline: 1px solid rgb(0 0 0 / .1); }
.selection-mark { display: none; position: absolute; top: 12px; right: 12px; }
.selection-mark svg { width: 17px; height: 17px; }
.tile[aria-pressed=true] .selection-mark { display: block; }
.tiles.simple { grid-template-columns: repeat(2, 1fr); }
.tiles.simple .tile { min-height: 175px; }
.page-controls { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; min-height: 46px; }
.page-controls p { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.page-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 13px; }
.page-button:hover:not(:disabled) { background: #f5f5f5; }
.page-button svg { width: 17px; height: 17px; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 10; padding: 12px 20px; border-radius: 8px; background: #000; color: #fff; }
.skip-link:focus { top: 16px; }
.unlock-screen { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: #fff; }
.unlock-card { width: 100%; max-width: 380px; }
.brand-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 8px; background: #000; color: #fff; margin-bottom: 24px; }
.brand-mark svg { width: 23px; height: 23px; }
.unlock-card h1 { font-size: 30px; margin-bottom: 28px; letter-spacing: -1px; }
.unlock-card input { margin: 8px 0 16px; }
.unlock-card .primary { width: 100%; justify-content: space-between; }
.unlock-card [role=status] { color: #666; margin-top: 13px; font-size: 13px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; }
input, select, textarea { width: 100%; min-height: 46px; padding: 11px 12px; border: 1px solid #d4d4d4; border-radius: 6px; background: #fff; color: #171717; }
textarea { resize: vertical; font-size: 24px; }
input[type=file] { font-size: 12px; padding: 8px; min-height: 40px; }
.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border-radius: 6px; padding: 11px 15px; font-size: 13px; font-weight: 500; }
.primary { border: 1px solid #000; background: #000; color: #fff; }
.secondary { border: 1px solid #d4d4d4; background: #fff; }
.secondary:hover { background: #f5f5f5; }
.secondary[aria-pressed=true] { background: #171717; color: #fff; border-color: #171717; }
.primary svg, .secondary svg { width: 18px; height: 18px; }
.icon-button { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 6px; background: transparent; flex-shrink: 0; }
.icon-button:hover { background: #f5f5f5; }
.text-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 7px 0; border: 0; background: transparent; font-size: 13px; }
.text-button svg { width: 17px; height: 17px; }
dialog { width: calc(100% - 32px); max-width: 760px; max-height: calc(100dvh - 32px); padding: 0; border: 1px solid #eaeaea; border-radius: 10px; background: #fff; color: #171717; box-shadow: 0 16px 64px rgb(0 0 0 / .2); }
dialog::backdrop { background: rgb(0 0 0 / .5); }
.dialog-header { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 19px 24px; border-bottom: 1px solid var(--line); background: #fff; }
.tools-content { padding: 24px; }
.tools-content section { margin-top: 25px; padding-top: 25px; border-top: 1px solid var(--line); }
.guide-card { border: 1px solid var(--line); border-radius: 8px; background: #fafafa; padding: 16px 18px; }
.guide-card summary { cursor: pointer; font-size: 14px; font-weight: 500; }
.guide-content { padding-top: 14px; }
.guide-content p, .guide-content li { font-size: 13px; line-height: 1.7; }
.guide-content ol { padding-left: 22px; margin: 12px 0; }
.guide-content li+li { margin-top: 5px; }
.guide-note { margin-top: 12px; }
.source-links { margin-top: 14px; font-size: 12px !important; }
.form-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 13px; }
.field-note { font-size: 12px; color: var(--muted); line-height: 1.65; margin: 10px 0 14px; }
.tool-buttons { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 13px; }
.people-settings { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 18px 0; }
.person-setting { padding: 14px; border: 1px solid var(--line); border-radius: 8px; }
.person-setting>label+label { margin-top: 10px; }
.person-preview { display: flex; align-items: center; gap: 10px; margin-top: 9px; font-size: 12px; }
.person-preview img { width: 42px; height: 42px; border-radius: 6px; object-fit: cover; outline: 1px solid rgb(0 0 0 / .1); }
.remove-photo { min-height: 40px; border: 0; background: transparent; padding: 7px; font-size: 12px; }
.custom-form { display: grid; grid-template-columns: 1fr 1.7fr; gap: 12px; }
.custom-form button { grid-column: 1/-1; justify-self: start; }
.custom-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.custom-row p { overflow-wrap: anywhere; }
.custom-row button { min-height: 44px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 12px; }
.tools-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 25px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; }
.file-label { display: flex; position: relative; justify-content: center; cursor: pointer; }
.file-label input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.file-label:focus-within { outline: 2px solid #000; outline-offset: 4px; }
.two-dialog { max-width: 920px; padding-bottom: 22px; }
.two-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; padding: 18px 24px; }
.two-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 12px 24px; }
.two-choices .tile { min-height: 220px; flex-direction: column; justify-content: center; text-align: center; }
.two-choices .tile strong { font-size: 34px; }
.two-choices .pictogram { width: 80px; height: 80px; }
.two-choices .pictogram svg { width: 62px; height: 62px; }
.two-choices .tile.scanning { box-shadow: inset 0 0 0 4px #000; }
.two-controls { display: flex; flex-wrap: wrap; gap: 12px; padding: 15px 24px 0; }
.two-dialog>.field-note { padding: 0 24px; }
.type-dialog, .draw-dialog { padding: 0 24px 24px; }
.type-dialog .dialog-header, .draw-dialog .dialog-header { padding-left: 0; padding-right: 0; margin-bottom: 18px; }
.letter-keys { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-top: 16px; }
.letter-keys button { min-height: 55px; font-size: 25px; border: 1px solid #d4d4d4; border-radius: 6px; background: #fff; }
.draw-dialog { max-width: 1000px; }
canvas { width: 100%; height: auto; background: #fff; border: 1px solid #a3a3a3; border-radius: 8px; touch-action: none; }
.empty-custom { grid-column: 1/-1; padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.empty-custom h3 { margin-bottom: 6px; }
.empty-custom p { font-size: 14px; color: var(--muted); }
.empty-custom button { margin-top: 12px; }
.print-sheet { display: none; }
@media(max-width:1160px) {
  .site-header, .board-main { margin-left: 32px; margin-right: 32px; }
  .tile { padding: 22px; gap: 18px; }
  .tile strong { font-size: 24px; }
}
@media(max-width:760px) {
  html { scroll-padding-top: 130px; }
  .site-header, .board-main { margin-left: 20px; margin-right: 20px; }
  .site-header { min-height: 64px; }
  .page-header { padding: 24px 0 20px; }
  h1 { font-size: 30px; letter-spacing: -1px; }
  .message-panel { position: sticky; top: 8px; z-index: 1; min-height: 98px; padding: 20px; box-shadow: 0 4px 12px rgb(0 0 0 / .12); }
  #message { font-size: 29px; }
  .categories { grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .tile { flex-direction: column; text-align: center; justify-content: center; gap: 14px; padding: 20px 12px; min-height: 145px; }
  .tiles { gap: 12px; }
  .tile strong { font-size: 24px; }
  .answer { font-size: 19px; gap: 7px; }
  .answer svg { width: 23px; height: 23px; }
  .dialog-header { padding: 17px 20px; }
  .tools-content { padding: 20px; }
  .two-form { grid-template-columns: 1fr 1fr; }
  .two-form button { grid-column: 1/-1; justify-self: start; }
}
@media(max-width:520px) {
  .site-header, .board-main { margin-left: 16px; margin-right: 16px; }
  .site-header { min-height: 62px; gap: 8px; }
  .library-link { font-size: 12px; gap: 6px; }
  .library-link svg { width: 15px; height: 15px; }
  .header-actions { gap: 2px; }
  .utility { padding: 9px 7px; font-size: 12px; gap: 5px; }
  .utility svg { width: 17px; height: 17px; }
  .page-header { padding: 22px 0 18px; align-items: flex-start; gap: 12px; }
  .page-header h1 { font-size: 28px; max-width: 215px; }
  .help-now { padding: 9px 10px; min-height: 44px; font-size: 13px; gap: 5px; }
  .help-now svg { width: 17px; height: 17px; }
  .message-panel { padding: 18px; gap: 12px; min-height: 106px; }
  #message { font-size: 26px; letter-spacing: -.5px; }
  .message-actions { gap: 6px; flex-direction: column; }
  .say-button { font-size: 12px; gap: 5px; min-height: 42px; padding: 9px 10px; }
  .say-button svg { width: 17px; height: 17px; }
  .clear-button { width: 42px; height: 32px; }
  .clear-button svg { width: 17px; height: 17px; }
  .answers { margin: 12px 0 18px; gap: 8px; }
  .answer { flex-direction: column; gap: 6px; min-height: 76px; padding: 10px 4px; font-size: 15px; }
  .answer.different { font-size: 13px; }
  .categories { margin-bottom: 14px; }
  .category { font-size: 13px; min-height: 46px; gap: 5px; padding: 9px 4px; }
  .category svg { width: 17px; height: 17px; }
  .tiles { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .tile { min-height: 140px; padding: 18px 10px; gap: 12px; }
  .tile strong { font-size: 23px; letter-spacing: -.4px; }
  .pictogram { width: 45px; height: 45px; }
  .pictogram svg { width: 42px; height: 42px; }
  .tiles.simple .tile { min-height: 170px; }
  .page-controls { gap: 8px; }
  .page-controls p { font-size: 11px; }
  .page-button { font-size: 12px; padding: 9px 10px; gap: 5px; }
  .form-grid, .people-settings, .custom-form { grid-template-columns: 1fr; }
  .dialog-header h2 { font-size: 22px; }
  .tools-content { padding: 17px; }
  .two-form { padding: 16px; }
  .two-choices { gap: 12px; padding: 10px 16px; }
  .two-choices .tile strong { font-size: 25px; }
  .two-choices .pictogram { width: 65px; height: 65px; }
  .two-choices .pictogram svg { width: 50px; height: 50px; }
  .two-controls { padding: 12px 16px; }
  .type-dialog, .draw-dialog { padding-left: 17px; padding-right: 17px; }
  .letter-keys { gap: 5px; }
  .letter-keys button { min-height: 48px; font-size: 20px; }
  .tools-bottom { flex-wrap: wrap; }
}
@media(max-width:360px) {
  .site-header, .board-main { margin-left: 12px; margin-right: 12px; }
  .library-link { font-size: 11px; }
  .utility { font-size: 11px; padding: 9px 5px; }
  .page-header h1 { font-size: 25px; }
  .category { font-size: 12px; }
  .tile strong { font-size: 22px; }
}
@media(prefers-reduced-motion:reduce) {
  button { transition: none; }
  button:active:not(:disabled) { transform: none; }
}
@page { size: letter landscape; margin: .38in; }
@media print {
  body { background: #fff !important; color: #000 !important; }
  body>* { display: none !important; }
  .print-sheet { display: block !important; font-size: 12px; }
  .print-sheet h1 { font-size: 25px; margin-bottom: 16px; letter-spacing: -.4px; }
  .print-responses { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
  .print-responses div { padding: 9px; border: 2px solid #222; border-radius: 6px; text-align: center; font-size: 19px; font-weight: 600; }
  .print-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
  .print-grid>div { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; height: 116px; padding: 8px; border: 1.5px solid #333; border-radius: 6px; text-align: center; font-size: 18px; font-weight: 600; break-inside: avoid; }
  .print-grid svg { width: 45px; height: 45px; }
  .print-grid img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; }
  .print-foot { margin-top: 13px !important; font-size: 11px !important; }
}
