/* Japan Undercover slang phrasebook: stroke order option v1.00. Uses the page's own custom properties
   (--ink, --paper, --red, --line) with fallbacks, so it also works if slang.css changes. */
.strokes-row { margin: 14px 0 0; }
.strokes-btn, .stk-ctl-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px;
  border: 1.5px solid var(--ink, #101820); border-radius: 999px; background: transparent; color: var(--ink, #101820);
  font: 700 .95rem/1 "DM Sans", "Be Vietnam Pro", "Noto Sans KR", "Noto Sans JP", sans-serif; cursor: pointer;
}
.strokes-btn:hover, .stk-ctl-btn:hover { background: var(--ink, #101820); color: var(--paper, #f4eddf); }
.strokes-btn[aria-expanded="true"], .stk-speed[aria-pressed="true"] { background: var(--ink, #101820); color: var(--paper, #f4eddf); }
.strokes-btn:focus-visible, .stk-ctl-btn:focus-visible, .stk-char:focus-visible { outline: 3px solid var(--blue, #2c5ccd); outline-offset: 3px; }

.strokes-panel { margin: 12px 0 0; padding: 14px; background: var(--paper, #f4eddf); border: 1px solid var(--line, rgba(16, 24, 32, .2)); border-radius: 3px; --stk-box: 108px; }
.strokes-panel[hidden] { display: none; }
.strokes-panel.stk-big { --stk-box: 128px; }
.stk-chars { display: flex; flex-wrap: wrap; gap: 12px 10px; }
.stk-br { flex-basis: 100%; height: 0; }
.stk-cell { display: flex; flex-direction: column; align-items: center; gap: 5px; width: var(--stk-box); }
.stk-char { display: block; width: var(--stk-box); height: var(--stk-box); margin: 0; padding: 0; border: 1.5px solid var(--ink, #101820); border-radius: 3px; background: #fffaf0; cursor: pointer; }
.stk-char svg { display: block; width: 100%; height: 100%; overflow: hidden; }
.stk-none { display: flex; align-items: center; justify-content: center; border-style: dashed; border-color: var(--line, rgba(16, 24, 32, .2)); background: transparent; cursor: default;
  font: 500 2.2rem/1 "Noto Sans JP", sans-serif; color: rgba(16, 24, 32, .35); }
.stk-count { font: 500 .85rem/1.2 "DM Sans", "Be Vietnam Pro", "Noto Sans KR", "Noto Sans JP", sans-serif; text-align: center; color: rgba(16, 24, 32, .72); }

.stk-guide line { stroke: rgba(16, 24, 32, .22); stroke-width: .7; stroke-dasharray: 2.5 2.5; }
.stk-ghost { stroke: var(--ink, #101820); opacity: .09; }
.stk-s { stroke-dasharray: 1 3; stroke-dashoffset: 0; }
.stk-s:not(.is-done):not(.is-cur) { visibility: hidden; }
.stk-s.is-done { stroke: var(--ink, #101820); }
.stk-s.is-cur { stroke: var(--red, #b72c20); }
.stk-n { opacity: 0; font: 700 10px "DM Sans", sans-serif; fill: rgba(16, 24, 32, .8); paint-order: stroke; stroke: #fffaf0; stroke-width: 2.6px; stroke-linejoin: round; }
.stk-n.is-on { opacity: 1; }
.stk-n.is-cur { fill: var(--red, #b72c20); }

.stk-ctl { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.stk-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.strokes-credit { margin: 40px 0 0; padding: 14px 0 0; border-top: 1px dashed var(--line, rgba(16, 24, 32, .2)); font: .85rem/1.5 "DM Sans", "Be Vietnam Pro", "Noto Sans KR", sans-serif; color: rgba(16, 24, 32, .72); }
.strokes-credit a { color: inherit; }

@media (max-width: 660px) {
  .strokes-panel { padding: 12px; --stk-box: 90px; }
  .strokes-panel.stk-big { --stk-box: 112px; }
  .stk-chars { gap: 10px 8px; }
}
@media (prefers-reduced-motion: reduce) { .stk-s { transition: none; } }
