/* ===== production additions ===== */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rm { color: var(--muted); font-size: 0.92em; font-weight: 400; }
.front .rm, .card .rm { color: var(--card-muted); }
.lite .amb *, .lite .halo * { animation: none !important; }
.subnav { position: relative; z-index: 26; }
.subnav .wrap { display: flex; align-items: center; justify-content: center; gap: 10px; padding-top: 4px; flex-wrap: wrap; position: relative; }
details.menu { position: static; }
details.menu > summary, .savedbtn { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; padding: 0 16px; border: 1px solid var(--line); border-radius: 22px; background: var(--chip); font-size: 14px; font-weight: 600; cursor: pointer; list-style: none; color: var(--ink); }
details.menu > summary::-webkit-details-marker { display: none; }
details.menu > summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); margin-left: 4px; }
details.menu[open] > summary::after { transform: rotate(225deg); }
details.menu > summary:hover, .savedbtn:hover { border-color: var(--gold-line); }
.savedbtn .n { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; font-size: 12px; text-align: center; background: rgba(127, 127, 127, 0.25); }
.menu-p { position: absolute; left: 8px; right: 8px; top: 52px; z-index: 40; max-height: min(70vh, 620px); overflow: auto; background: var(--bar); border: 1px solid var(--gold-line); border-radius: 16px; padding: 14px 16px 6px; box-shadow: var(--shadow); display: grid; gap: 4px 28px; animation: pane-in 0.3s var(--ease) both; }
.menu-p .mg h2 { font-family: var(--display); font-size: 15px; letter-spacing: 0.08em; color: var(--gold); margin: 6px 0 2px; font-weight: var(--display-weight); }
.menu-p ul { list-style: none; margin: 0 0 10px; padding: 0; }
.menu-p a { display: flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; font-size: 15px; }
.menu-p a:hover { color: var(--gold); text-decoration: underline; }
.tag.med { background: var(--unsure-bg); color: var(--unsure-ink); border: 1px dashed var(--card-line); }
.front .hj, .slot .hj { font-weight: 400; font-size: 0.85em; opacity: 0.9; }
.front .nm.l { font-size: 23px; }
.front .nm.xl { font-size: 19px; }
.front .body { overflow-y: auto; scrollbar-width: thin; }
.front .lock { position: absolute; top: 6px; right: 6px; width: 44px; height: 44px; border: 0; background: transparent; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--card-muted); z-index: 4; transition: background-color 0.2s, color 0.2s, transform 0.2s var(--ease); }
.front .lock svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.front .lock:hover { background: var(--card-pressed); color: var(--card-ink); }
.front .lock[aria-pressed="true"] { background: var(--card-btn); color: var(--card-btn-ink); }
.front .lock[aria-pressed="true"] svg { fill: currentColor; fill-opacity: 0.25; }
.card.locked::before { opacity: 0.7 !important; }

.pane-list { position: relative; isolation: isolate; padding-bottom: 8px; }
.legal h1 { margin-top: 16px; }
.lctl { display: grid; gap: 10px; margin: 6px 0 4px; }
.lsearch, .searchbar label, .guide-lookup label { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
input[type="search"] { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); padding: 0 14px; font-size: 16px; }
input[type="search"]::placeholder { color: var(--muted); opacity: 0.85; }
.sb { display: flex; gap: 8px; align-items: stretch; margin-top: 6px; }
.sb .btn { min-height: 48px; padding: 0 20px; font-size: 15px; }
.searchbar, .guide-lookup { margin: 8px 0 12px; }
.lfilters { display: grid; gap: 8px; }
fieldset.chips { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
fieldset.chips legend { float: left; padding: 0; margin-right: 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); line-height: 44px; }
.chip { min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 22px; background: var(--chip); color: var(--ink); font-size: 14px; font-weight: 600; transition: background-color 0.2s, border-color 0.2s; }
.chip:hover { border-color: var(--gold-line); }
.chip[aria-pressed="true"] { background: var(--primary-grad); color: var(--on-primary); border-color: var(--gold-line); }
.lsort { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.lsort select { min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-2); padding: 0 10px; font-size: 16px; text-transform: none; letter-spacing: 0; font-weight: 400; }
.lcount { margin: 10px 0; font-size: 14px; color: var(--muted); text-align: center; }
.more-wrap { text-align: center; margin: 14px 0; }

ol.rows, ul.ovl { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
li.row, ul.ovl > li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; min-width: 0; }
.rh { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.rn { margin: 0; font-family: var(--serif); font-weight: var(--name-weight); font-size: 24px; line-height: 1.1; color: var(--ink); overflow-wrap: anywhere; }
.rs { font-family: var(--cjk); font-size: 18px; color: var(--muted); font-weight: 600; }
.rl, .rm2, .mt, .alt { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.rm2 { color: var(--ink); font-size: 15px; }
.rl .say { color: var(--gold); font-style: italic; font-weight: 600; }
.row .tags, .ovl .tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0 0; }
.row .callout, .ovl .callout { margin: 8px 0 0; padding: 8px 10px; border-radius: 10px; font-size: 13px; }
.callout.warn { background: var(--warn-bg); color: var(--warn-ink); }
.callout.over { background: var(--over-bg); color: var(--over-ink); }
.callout.soft { background: var(--unsure-bg); color: var(--unsure-ink); }
.alt strong { color: var(--ink); }
.ra { display: flex; gap: 8px; margin: 10px 0 0; }
.ra button { min-height: 44px; padding: 0 18px; border-radius: 22px; border: 1px solid var(--line); background: transparent; font-weight: 600; font-size: 14px; color: var(--ink); }
.ra button:hover { border-color: var(--gold-line); background: var(--chip); }
.ra button[aria-pressed="true"] { background: var(--primary-grad); color: var(--on-primary); border-color: var(--gold-line); }
ul.cg { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
ul.cg .cc { font-family: var(--cjk); font-size: 17px; color: var(--ink); font-weight: 600; margin-right: 4px; }
ul.cg .dg { color: var(--muted); font-size: 12px; }
dialog ul.cg { color: var(--card-muted); }
dialog ul.cg .cc { color: var(--card-ink); }
.row.empty { text-align: center; }

.blocks h2, h2.lad { font-family: var(--display); font-weight: var(--display-weight); font-size: 24px; margin: 26px 0 8px; letter-spacing: var(--display-track); }
.blocks h3 { font-family: var(--display); font-size: 17px; margin: 18px 0 6px; color: var(--gold); font-weight: var(--display-weight); letter-spacing: 0.04em; }
.blocks .lead { color: var(--muted); font-size: 15px; }
.blocks .cnt, h2 .cnt { font-size: 14px; color: var(--muted); font-family: var(--sans); font-weight: 400; }
table.g td { color: var(--ink); }
table.g th { white-space: nowrap; }
table.g td strong { font-weight: 700; }
table.g.cmp td:first-child { white-space: normal; min-width: 130px; }
.tw { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 10px 0 0; max-width: 100%; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.glossary .tw { border: 0; background: transparent; }
details.ladder { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin: 10px 0; padding: 0 14px 12px; }
details.ladder > summary { min-height: 48px; display: flex; align-items: center; font-weight: 700; cursor: pointer; font-family: var(--serif); font-size: 19px; }
details.ladder > p { margin: 0 0 6px; }

.copy.prose, .faq { max-width: 700px; margin-left: auto; margin-right: auto; }
.copy.prose { margin-top: 28px; }
.prose h2 { font-size: 24px; margin: 26px 0 8px; }
.prose p, .prose li { color: var(--ink); font-size: 16.5px; line-height: 1.65; }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 14px; }
.prose a { color: var(--gold); font-weight: 600; }
.prose table { border-collapse: collapse; width: 100%; font-size: 14px; }
.prose th, .prose td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.prose code { font-family: ui-monospace, Consolas, monospace; font-size: 0.92em; background: var(--chip); padding: 1px 5px; border-radius: 4px; }
.faq details p { color: var(--ink); opacity: 0.88; }
.related h2 { font-size: 22px; }
.related h3 { font-size: 16px; margin: 14px 0 6px; color: var(--gold); }
.related ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 8px; }
.related a { min-height: 44px; display: flex; align-items: center; padding: 0 16px; border: 1px solid var(--line); border-radius: 22px; text-decoration: none; font-size: 14px; font-weight: 600; color: var(--ink); background: var(--surface); }
.related a:hover { border-color: var(--gold-line); }
.fnav { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 14px; margin-bottom: 6px; }
.fnav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--gold); font-weight: 600; text-decoration: none; }
.fnav a:hover { text-decoration: underline; }
footer.site p { margin: 4px 0; }
footer.site .credit { font-size: 12px; opacity: 0.92; }
footer.site .credit a { color: var(--muted); }

.blazon { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.blazon p { margin: 0; font-family: var(--serif); font-style: italic; font-size: 20px; font-weight: 700; }
.shield { width: 64px; height: auto; flex: none; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)); }
.slots { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.slots .rm { width: 100%; margin: 0; }
.slots button { min-height: 44px; padding: 0 12px; border-radius: 22px; border: 1px solid var(--card-line); background: transparent; color: var(--card-ink); font-size: 13px; font-weight: 700; }
.slots button:hover { background: var(--card-pressed); }
.alts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.alts button { min-height: 44px; padding: 0 14px; border-radius: 22px; border: 1px solid currentColor; background: transparent; color: inherit; font-weight: 700; }
dialog .dsc { font-family: var(--cjk); font-size: 20px; color: var(--card-muted); }
dialog .dpr { font-family: var(--serif); font-style: italic; font-size: 18px; font-weight: 700; color: var(--card-gold); }
dialog .rm { color: var(--card-muted); }
dialog .callout a { color: inherit; text-decoration: underline; }
dialog#saved .note { color: var(--card-muted); max-width: none; text-align: left; padding: 8px 0; }
dialog#saved .saved-list li { background: transparent; border-color: var(--card-line); animation: none; }
dialog#saved .saved-list .su { color: var(--card-muted); }
dialog#saved .saved-list .sc2 { font-family: var(--cjk); color: var(--card-muted); }
dialog#saved { width: min(520px, calc(100vw - 24px)); }
dialog#dlg { overflow-y: auto; }
.toast { z-index: 200; }
.glossary[hidden] { display: none; }
.dealbar .tools { margin-top: 2px; }
.stage > .pane-draw > h1 { margin-top: 14px; }
[lang="ja"] { font-family: "Noto Serif JP", "Noto Sans JP", "Yu Gothic", "Hiragino Sans", "Meiryo", var(--cjk); }
[lang="zh"] { font-family: "Noto Serif SC", "Noto Sans SC", "Microsoft YaHei", "PingFang SC", var(--cjk); }
@media (min-width: 560px) { .related ul { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) {
  .menu-p { grid-template-columns: repeat(2, 1fr); left: 50%; right: auto; width: min(860px, 94vw); transform: translateX(-50%); }
  ol.rows, ul.ovl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .related ul { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1100px) {
  .menu-p { grid-template-columns: repeat(3, 1fr); width: min(1060px, 94vw); }
  .hand { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); justify-content: stretch; overflow: visible; gap: 18px; padding: 14px 0 26px; }
  .card { flex: none; max-width: none; height: 430px; }
  .front .nm { font-size: 26px; }
  .front .nm.l { font-size: 22px; }
  .front .nm.xl { font-size: 18px; }
  .front .pr { font-size: 17px; }
}
@media (min-width: 768px) and (max-width: 1099px) {
  .hand { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; margin: 0; padding: 14px 0 26px; gap: 16px; }
  .card { flex: none; max-width: none; height: 430px; }
}
@media (min-width: 768px) {
  .opts { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
}
.glossary table.g { min-width: 0; }
.glossary table.g th, .glossary table.g td, .glossary table.g td.n { white-space: normal; overflow-wrap: anywhere; }
ul.ovl .mt a, ol.rows .mt a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; }
.lctl .btn.sm { justify-self: start; }
