@font-face { font-family: LocalSans; src: local("Avenir Next"), local("Segoe UI"), local("Arial"); font-display: swap; }
:root { font-family: LocalSans, system-ui, sans-serif; font-synthesis: none; line-height: 1.5; }
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid #e4ebcb; outline-offset: 5px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip: rect(0,0,0,0); overflow: hidden; white-space: nowrap; }
.board { max-width: 1440px; min-height: 100svh; padding: 38px clamp(24px, 5vw, 76px) 110px; margin: 0 auto; display: flex; flex-direction: column; }
.board-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 48px; }
.answered-filter { display: inline-flex; align-items: center; cursor: pointer; padding: 10px 0; }
.answered-filter input, .card-check { appearance: none; flex-shrink: 0; width: 23px; height: 23px; margin: 0; border: 1.5px solid #e9eed8b3; border-radius: 4px; background: transparent; cursor: pointer; display: grid; place-content: center; }
.answered-filter input::before, .card-check::before { content: ""; width: 10px; height: 6px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-1px) rotate(-45deg) scale(0); }
.answered-filter input:checked { color: #254d37; background: #f4f6e9; border-color: #f4f6e9; }
.answered-filter input:checked::before, .card-check:checked::before { transform: translateY(-1px) rotate(-45deg) scale(1); }
.add-button { width: 48px; height: 48px; padding: 0; border: 0; background: transparent; color: #f8faee; display: grid; place-items: center; transition: opacity .2s; }
.add-button:hover { opacity: .7; }
.add-button svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.card-grid { display: flex; flex-direction: column; width: 100%; max-width: 560px; margin: 0 auto; gap: 26px; }
.flash-card {
  --card-height: 336px;
  --red-line: 44px;
  --rule-start: 44px;
  --text-top: 48px;
  --rule-gap: 28px;
  position: relative;
  background: #fff;
  color: #283d38;
  border-radius: 2px;
  box-shadow: 0 8px 28px #0c2b2026;
  isolation: isolate;
}
.flash-card::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  inset: var(--rule-start) 0 0;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--rule-gap) - 1px), #8caac5 calc(var(--rule-gap) - 1px), #8caac5 var(--rule-gap));
}
.flash-card::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: 0; right: 0; top: var(--red-line); height: 1px; background: #cf5268;
}
.note-card { width: 100%; min-height: var(--card-height); }
.card-open { display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; width: 100%; min-height: var(--card-height); padding: var(--text-top) 30px 36px; border: 0; border-radius: inherit; color: inherit; background: transparent; text-align: center; }
.card-text { display: block; font: 22px/var(--rule-gap) Georgia, 'Times New Roman', serif; letter-spacing: -.35px; white-space: pre-wrap; overflow-wrap: anywhere; }
.card-open:focus-visible { outline-color: #e4ebcb; outline-offset: 5px; }
.card-check { position: absolute; right: 20px; top: 10px; border-color: #9aaa9c; color: #fff; }
.card-check:checked { background: #436e50; border-color: #436e50; }
.card-check:hover { border-color: #315c3f; box-shadow: 0 0 0 4px #d8e4d34d; }
.card-check:focus-visible { outline-color: #436e50; }
.card-check:disabled { cursor: wait; opacity: .5; }
.board-message { margin: -18px 0 28px; color: #fff0d9; font-size: 14px; }
.quiet-button { padding: 8px 0; border: 0; background: transparent; color: #e4ebd2ba; font-size: 12px; width: fit-content; }
.quiet-button:hover { color: #fff; text-decoration: underline; }
dialog.flash-card { width: min(560px, calc(100% - 40px)); min-height: var(--card-height); max-height: calc(100svh - 48px); margin: auto; padding: var(--text-top) 30px 36px; border: 0; overflow-y: auto; box-shadow: 0 24px 100px #09241f4d; }
dialog::backdrop { background: #0c2c246b; backdrop-filter: blur(5px); }
#card-form { margin: 0; }
#card-text { text-align: center; display: block; resize: none; width: 100%; min-height: var(--rule-gap); height: var(--rule-gap); margin: 0; padding: 0; border: 0; border-radius: 0; outline: 0; background: transparent; color: inherit; font: 22px/var(--rule-gap) Georgia, 'Times New Roman', serif; letter-spacing: -.35px; overflow: hidden; caret-color: #284135; }
#card-form[aria-busy="true"] #card-text { opacity: .6; }
.form-error { margin: 24px 0 0; padding: 8px; background: #fffefbe8; font-size: 13px; color: #9c3c2c; text-align: center; }
@media (max-width: 600px) {
  .board { padding: 24px 22px 110px; } .board-toolbar { margin-bottom: 32px; } .card-grid { gap: 20px; }
  .flash-card { --card-height: 280px; }
  .card-open { padding-left: 22px; padding-right: 22px; }
  .card-text, #card-text { font-size: 20px; }
  dialog.flash-card { padding-left: 22px; padding-right: 22px; }
}
@media (prefers-reduced-motion: reduce) { .add-button { transition: none; } }

.icon-button { width: 48px; height: 48px; padding: 0; border: 0; background: transparent; color: #f8faee; display: grid; place-items: center; }
.icon-button svg { width: 28px; height: 28px; fill: currentColor; pointer-events: none; }
.icon-button:hover { opacity: .75; }
.trash-button { position: fixed; z-index: 5; right: max(16px, calc((100vw - 1440px) / 2 + 50px)); bottom: max(18px, env(safe-area-inset-bottom)); width: 80px; height: 80px; border-radius: 12px; transition: background .15s, transform .15s; }
.trash-button.drag-ready { background: #ffffff0a; }
.trash-button.drop-target { background: #ffffff25; transform: scale(1.15); opacity: 1; }
.note-card[draggable="true"] { cursor: grab; }
.note-card[draggable="true"] .card-open { cursor: grab; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.note-card.dragging { opacity: .4; }
.drag-ghost { position: fixed; z-index: 20; pointer-events: none; width: 280px; max-height: 180px; overflow: hidden; opacity: .88; transform: rotate(-4deg); box-shadow: 0 15px 45px #0c2b2055; }
@media (max-width: 600px) { .trash-button { right: 8px; bottom: max(12px, env(safe-area-inset-bottom)); } }
@media (prefers-reduced-motion: reduce) { .trash-button { transition: none; } }
