/* てがるツール — 事務机の道具箱:方眼紙のヘッダー、インデックスタブ、朱肉の認印 */
:root {
  --paper: #fafbfc;        /* ページ(紙) */
  --desk: #eef3f7;         /* ヘッダー(方眼紙) */
  --grid: #d6e2ec;         /* 方眼の線 */
  --surface: #ffffff;
  --text: #1c2733;         /* 墨紺 */
  --muted: #56636f;
  --line: #d7dee5;
  --tab: #dfe8f0;
  --seal: #c8372d;         /* 朱肉:ブランドの印だけに使う */
  --c-photo: #2a5596;      /* 証明写真:藍 */
  --c-compress: #1d6f63;   /* 画像圧縮:青緑 */
  --c-invoice: #94650f;    /* 請求書:山吹 */
  --accent: var(--c-photo);
  --accent-ink: #ffffff;
  --accent-soft: #e6edf7;
  --warn: #9a5b00;
  --radius: 12px;
  --max: 760px;
  --bg: var(--paper);
}
body[data-tool="image-compress"] { --accent: var(--c-compress); --accent-soft: #e2f0ed; }
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14191f;
    --desk: #1b232c;
    --grid: #26313c;
    --surface: #1d252e;
    --text: #e8edf2;
    --muted: #a3afba;
    --line: #313d49;
    --tab: #232d38;
    --seal: #e0574b;
    --c-photo: #8fb2ea;
    --c-compress: #6fcab9;
    --c-invoice: #e2b35a;
    --accent-ink: #0f1620;
    --accent-soft: #1f2c3c;
    --warn: #e0a647;
  }
  body[data-tool="image-compress"] { --accent-soft: #19302c; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", system-ui, -apple-system, "Yu Gothic UI", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  font-feature-settings: "palt" 0;
}
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* ---- ヘッダー:方眼紙 + インデックスタブ ---- */
header.site {
  background-color: var(--desk);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 20px 20px;
  background-position: -1px -1px;
  border-bottom: 0;
}
header.site .bar { display: flex; align-items: center; gap: 10px; padding-top: 14px; padding-bottom: 10px; }
a.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--text); }
.stamp {
  width: 32px; height: 32px; flex: none; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--seal); color: #fff; font-weight: 800; font-size: 17px; line-height: 1;
  box-shadow: inset 0 0 0 2px var(--seal), inset 0 0 0 3.5px rgba(255,255,255,.75);
  transform: rotate(-8deg);
}
.brand-name { font-weight: 800; font-size: 19px; letter-spacing: .04em; }
.brand-sub { font-size: 12px; color: var(--muted); margin-left: auto; text-align: right; line-height: 1.4; }
nav.tabs { overflow-x: auto; scrollbar-width: none; }
nav.tabs::-webkit-scrollbar { display: none; }
.tabs-row { display: flex; gap: 6px; align-items: flex-end; padding-top: 4px; }
.tab {
  --c: var(--c-photo);
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  min-height: 46px; padding: 8px 14px 8px 12px;
  border-radius: 10px 10px 0 0;
  background: var(--tab); color: var(--text);
  border-top: 4px solid var(--c);
  font-size: 15px; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.tab svg { width: 20px; height: 20px; color: var(--c); flex: none; }
.tab.t-compress { --c: var(--c-compress); }
.tab.t-invoice { --c: var(--c-invoice); }
.tab[aria-current="page"] { background: var(--paper); min-height: 52px; }
.tab.soon { color: var(--muted); border-top-style: dashed; }
.tab.soon small { font-size: 11px; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; line-height: 1.6; }
a.tab:not([aria-current]):hover { background: var(--surface); }

main { padding: 28px 0 56px; }
h1 { font-size: 27px; line-height: 1.45; margin: 4px 0 12px; font-weight: 800; letter-spacing: .01em; }
h2 { font-size: 21px; line-height: 1.5; margin: 48px 0 14px; padding-left: 12px; border-left: 4px solid var(--accent); font-weight: 800; }
h3 { font-size: 17px; margin: 24px 0 6px; }
.lead { color: var(--muted); margin: 0 0 16px; }

/* 約束:チェック付きの小さな札 */
.promise { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; font-weight: 700; color: var(--text); }
p.promise { display: block; font-weight: 400; }
.promise li { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 9px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line); line-height: 1.5; }
.promise li svg { width: 17px; height: 17px; color: var(--accent); flex: none; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
section.card { border-top: 4px solid var(--accent); border-radius: 4px 4px var(--radius) var(--radius); padding: 18px 16px 20px; box-shadow: 0 1px 0 var(--line); }
.drop {
  display: block; border: 2px dashed var(--line); border-radius: var(--radius);
  padding: 28px 16px; text-align: center; cursor: pointer; background: var(--surface);
}
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop input { display: none; }
.drop .big { font-size: 18px; font-weight: 700; display: block; }
.drop .small { font-size: 13px; color: var(--muted); display: block; }
.drop .small.error { color: var(--warn); font-weight: 700; }
.drop.has-files { border-style: solid; border-color: var(--accent); background: var(--accent-soft); padding: 16px; }
.drop.has-files .big { color: var(--accent); }
.drop-thumbs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-bottom: 10px; }
.drop-thumbs img, .drop-thumbs .more { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; background: var(--line); }
.drop-thumbs .more { display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: var(--accent); background: var(--surface); }
.drop.pulse { animation: dropPulse .5s ease-out; }
@keyframes dropPulse { 0% { transform: scale(.98); } 60% { transform: scale(1.01); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .drop.pulse { animation: none; } }
.btn {
  display: inline-block; border: 0; border-radius: 10px; padding: 12px 20px;
  font-size: 16px; font-weight: 700; background: var(--accent); color: var(--accent-ink);
  cursor: pointer; text-decoration: none; font-family: inherit;
}
.btn[disabled] { opacity: .5; cursor: default; }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.settings { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 16px 0; }
.settings > div { min-width: 0; }
.settings select { width: 100%; }
.settings label { font-size: 14px; font-weight: 700; display: block; margin-bottom: 4px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button {
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 999px; padding: 6px 14px; min-height: 44px; font-size: 15px; cursor: pointer; font-family: inherit;
}
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
select, input[type=number] {
  max-width: 100%;
  min-height: 44px;
  font-size: 16px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font-family: inherit;
}
.hint { font-size: 13px; color: var(--muted); }
.results { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 16px; }
.result > div { min-width: 0; }
.result { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: center; padding: 10px; }
.result.busy { opacity: .6; }
.result .remove { border: 0; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; width: 44px; height: 44px; cursor: pointer; border-radius: 8px; }
.result .remove:hover { background: var(--accent-soft); }
.result .actions:empty { display: none; }
.run-row { display: flex; gap: 8px; flex-wrap: wrap; }
.result img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; background: var(--line); }
.result .name { font-size: 14px; word-break: break-all; }
.result .size { font-size: 14px; color: var(--muted); }
.result .size b { color: var(--accent); }
.result .warn { color: var(--warn); font-size: 13px; }
.result .actions { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.compare { margin-top: 16px; }
.compare-box { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--line); touch-action: none; }
.compare-box img { display: block; width: 100%; height: auto; }
.compare-box .after { position: absolute; inset: 0; overflow: hidden; }
.compare-box .after img { width: 100%; height: 100%; object-fit: contain; }
.compare-box .bar { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.3); }
.compare-labels { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 4px; }
ol.steps { padding-left: 1.4em; }
ol.steps li { margin-bottom: 6px; }
table.spec { border-collapse: collapse; width: 100%; font-size: 14px; }
table.spec th, table.spec td { border: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: top; }
table.spec th { background: var(--surface); }
details.faq { border-bottom: 1px solid var(--line); padding: 10px 0; }
details.faq summary { font-weight: 700; cursor: pointer; }
details.faq p { margin: 8px 0 0; }
.ad-slot { display: none; }
body.ads-on .ad-slot { display: block; min-height: 100px; margin: 24px 0; }
footer.site { background: var(--desk); border-top: 1px solid var(--line); padding: 28px 0 44px; font-size: 14px; color: var(--muted); }
.foot { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px 24px; }
.foot h4 { margin: 0 0 6px; font-size: 13px; color: var(--text); }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin: 2px 0; }
footer.site a { color: var(--muted); }
footer.site .copy { margin: 22px 0 0; font-size: 12px; }

/* トップ:道具の一覧 */
.home-hero h1 { font-size: 28px; }
.tool-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 14px; }
.tool { --c: var(--c-photo); display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 4px 14px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: 6px var(--radius) var(--radius) 6px; text-decoration: none; color: var(--text); }
a.tool:hover { border-color: var(--c); }
.tool.t-compress { --c: var(--c-compress); }
.tool.t-invoice, .tool.t-genko { --c: var(--c-invoice); }
.tool .ico { grid-row: 1 / span 3; width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--surface)); }
.tool .ico svg { width: 30px; height: 30px; }
.tool strong { font-size: 18px; line-height: 1.5; }
.tool .desc { font-size: 14px; color: var(--muted); line-height: 1.65; }
.tool .feats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; padding: 0; list-style: none; }
.tool .feats li { font-size: 12px; font-weight: 700; color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); border-radius: 4px; padding: 0 6px; }
.tool.soon { border-left-style: dashed; background: transparent; }
.tool.soon strong, .tool.soon .ico { opacity: .7; }
.tool.soon .desc { font-weight: 700; }
.vows { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.vows li { padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; color: var(--muted); }
.vows strong { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 16px; margin-bottom: 2px; }
.vows svg { width: 22px; height: 22px; color: var(--c-photo); flex: none; }
.noscript { color: var(--warn); }

.viewer { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.92); display: flex; flex-direction: column; }
.viewer-bar { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 16px; color: #fff; font-size: 14px; }
.viewer-bar .btn.ghost { color: #fff; border-color: #fff; flex: none; }
.viewer img { flex: 1; min-height: 0; width: 100%; object-fit: contain; -webkit-touch-callout: default; user-select: auto; }

.result .actions .save-main { flex: 1 1 100%; text-align: center; font-size: 17px; padding: 14px 20px; }
.btn.done { background: var(--accent-soft); color: var(--accent); }
.alt { flex: 1 1 100%; font-size: 13px; color: var(--muted); text-align: center; }
.link { border: 0; background: none; color: var(--accent); text-decoration: underline; font: inherit; padding: 10px 4px; cursor: pointer; min-height: 40px; }
.btn.save-all { display: block; width: 100%; margin-top: 12px; font-size: 17px; padding: 14px 20px; }

/* 証明写真 */
.custom-size { margin-top: 8px; font-size: 15px; }
.custom-size input { width: 5.5em; }
.editor { margin: 8px 0 16px; }
.editor-help { margin: 0 0 8px; }
.guide-key { color: #1a9a52; font-weight: 700; }
.frame-wrap { display: flex; justify-content: center; }
.frame { position: relative; width: min(280px, 72vw); aspect-ratio: 3 / 4; border-radius: 4px; overflow: hidden; touch-action: none; cursor: grab; box-shadow: 0 0 0 1px var(--line), 0 4px 18px rgba(0,0,0,.12); background: #fff; user-select: none; -webkit-user-select: none; }
.frame:active { cursor: grabbing; }
.frame canvas, .frame svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.frame svg { pointer-events: none; }
.frame svg .band { fill: rgba(40, 190, 100, .22); stroke: rgba(26, 154, 82, .9); stroke-width: .15; }
.frame svg .center { stroke: rgba(26, 154, 82, .6); stroke-width: .12; stroke-dasharray: .8 .6; }
.frame svg text { font-size: 2.2px; fill: #0f6b38; font-weight: 700; paint-order: stroke; stroke: rgba(255,255,255,.85); stroke-width: .5px; }
.editor-controls { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; align-items: center; max-width: 420px; margin: 12px auto 0; font-size: 14px; font-weight: 700; }
.editor-controls input[type=range] { width: 100%; min-height: 44px; accent-color: var(--accent); }
.editor-controls .run-row { grid-column: 1 / -1; justify-content: center; }
.result.primary { border-color: var(--accent); }
.result .size { word-break: normal; }
details.calib { margin-top: 16px; font-size: 14px; }
details.calib summary { cursor: pointer; color: var(--accent); font-weight: 700; min-height: 40px; }
.calib-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.calib-row input { width: 6em; }
.notice { margin: 4px 0 12px; padding: 10px 12px; border-radius: 10px; background: #fff4df; color: #7a4a00; font-size: 14px; font-weight: 700; }
@media (prefers-color-scheme: dark) { .notice { background: #3a2c12; color: #f1c477; } }

.seg.sizes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.seg.sizes button { border-radius: 10px; display: flex; flex-direction: column; align-items: flex-start; text-align: left; padding: 8px 12px; line-height: 1.35; min-height: 58px; }
.seg.sizes button b { font-size: 15px; }
.seg.sizes button span { font-size: 13px; color: var(--muted); }
.seg.sizes button[aria-pressed="true"] span { color: inherit; opacity: .9; }
@media (min-width: 560px) { .seg.sizes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.guide-key { color: #12804a; }
@media (prefers-color-scheme: dark) { .guide-key { color: #6fd39b; } }

/* 請求書 */
body[data-tool="invoice"] { --accent: var(--c-invoice); --accent-soft: #f6eedd; }
@media (prefers-color-scheme: dark) { body[data-tool="invoice"] { --accent-soft: #33291a; } }
.inv fieldset { border: 0; border-top: 1px solid var(--line); margin: 18px 0 0; padding: 14px 0 0; min-width: 0; }
.inv legend { font-weight: 800; font-size: 16px; padding: 0 8px 0 0; }
.inv .field { display: block; margin: 0 0 12px; font-size: 14px; font-weight: 700; min-width: 0; }
.inv .field .hint { font-weight: 400; }
.inv .flabel { display: block; font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.inv .field input[type=text], .inv .field input[type=date], .inv .field textarea, .inv .field select { display: block; width: 100%; margin-top: 4px; font-weight: 400; }
.inv input[type=text], .inv input[type=date], .inv textarea { min-height: 44px; font-size: 16px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-family: inherit; max-width: 100%; }
.inv textarea { resize: vertical; line-height: 1.6; }
.inv .req { font-style: normal; font-size: 11px; color: #fff; background: var(--accent); border-radius: 4px; padding: 0 5px; margin-left: 4px; vertical-align: 1px; }
.inv .row2 { display: flex; gap: 10px; flex-wrap: wrap; }
.inv .row2 .field { flex: 1 1 140px; }
.inv .row2 .field.grow { flex: 3 1 220px; }
.seg.sizes.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
#regno-msg.ok { color: #1d6f3c; font-weight: 400; }
#regno-msg.error { color: var(--warn); font-weight: 700; }
@media (prefers-color-scheme: dark) { #regno-msg.ok { color: #7fd6a0; } }
.items { display: grid; gap: 10px; margin-bottom: 10px; }
.item { border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--paper); }
.item.bad { border-color: var(--warn); }
.item label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); min-width: 0; }
.item input, .item select { display: block; width: 100%; margin-top: 2px; }
.item-head { display: flex; gap: 8px; align-items: flex-end; }
.item-no { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; margin-bottom: 9px; }
.item .f-date { flex: 0 1 150px; }
.item .f-name { flex: 1 1 auto; }
.item .remove { flex: none; border: 0; background: transparent; color: var(--muted); font-size: 22px; width: 44px; height: 44px; cursor: pointer; border-radius: 8px; }
.item .remove:hover { background: var(--accent-soft); }
.item-nums { display: grid; grid-template-columns: 1fr 1fr 1.6fr; gap: 8px; margin-top: 8px; align-items: end; }
.item .f-rate { grid-column: 1 / 3; }
.item .f-amt { text-align: right; font-size: 12px; font-weight: 700; color: var(--muted); }
.item .f-amt output { display: block; font-size: 17px; color: var(--text); min-height: 44px; line-height: 44px; font-variant-numeric: tabular-nums; }
@media (min-width: 620px) { .item-nums { grid-template-columns: 70px 70px 1.2fr 1.2fr 1.2fr; } .item .f-rate { grid-column: auto; } }
.inline-check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; min-height: 44px; }
.inline-check input { width: 20px; height: 20px; accent-color: var(--accent); }
.inline-check.keep { display: flex; margin: 14px 0 6px; color: var(--muted); }
.totals { margin: 16px 0 0; padding: 14px; border-radius: 10px; background: var(--accent-soft); }
.totals table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.totals caption { text-align: left; font-weight: 800; font-size: 14px; padding-bottom: 6px; }
.totals th { text-align: left; font-weight: 400; font-size: 14px; padding: 3px 0; }
.totals td { text-align: right; font-size: 15px; padding: 3px 0; }
.totals tr.sub th, .totals tr.sub td { color: var(--muted); font-size: 13px; padding-left: 12px; }
.totals tr.sum th, .totals tr.sum td { font-weight: 800; font-size: 18px; border-top: 1.5px solid var(--text); padding-top: 8px; }
.totals .hint { margin: 8px 0 0; }
.checklist { margin-top: 16px; }
.checklist h3 { font-size: 15px; margin: 0 0 6px; }
.checklist ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.checklist li { display: flex; align-items: baseline; gap: 8px; font-size: 14px; }
.checklist li span { flex: none; width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; transform: translateY(3px); }
.checklist li.ok span { background: #dff1e6; color: #1d6f3c; }
.checklist li.ng span { background: #fde8d6; color: #9a4b00; }
.checklist li.ng { font-weight: 700; }
.checklist small { color: var(--muted); font-weight: 400; margin-left: auto; white-space: nowrap; padding-left: 8px; }
@media (prefers-color-scheme: dark) { .checklist li.ok span { background: #1d3a29; color: #7fd6a0; } .checklist li.ng span { background: #44301b; color: #f1c477; } }
#status.error { color: var(--warn); font-weight: 700; }
.pdf-ico { width: 72px; height: 72px; border-radius: 8px; background: #b3261e; color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; letter-spacing: .05em; }

/* 原稿用紙 */
body[data-tool="genko"] { --accent: #8a3b5c; --accent-soft: #f6e8ee; }
@media (prefers-color-scheme: dark) { body[data-tool="genko"] { --accent: #e59ab9; --accent-soft: #3a2230; } }
.tab.t-genko { --c: #8a3b5c; }
@media (prefers-color-scheme: dark) { .tab.t-genko { --c: #e59ab9; } }
.tool.t-genko { --c: #8a3b5c; }
.genko .flabel { display: block; font-size: 14px; font-weight: 700; margin: 0 0 4px; }
.genko textarea { display: block; width: 100%; min-height: 180px; font-size: 16px; line-height: 1.8; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-family: inherit; resize: vertical; }
/* 結果は入力中も見えるように上に固定(iPhone で長文を貼ると結果が画面外に出ていた) */
.genko-result { position: sticky; top: 8px; z-index: 5; margin: 0 0 14px; padding: 12px 16px; border-radius: 10px; background: var(--accent-soft); box-shadow: 0 6px 16px -10px rgba(0,0,0,.35); }
.genko-result .big { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.genko-result .big span { font-size: 30px; font-weight: 800; color: var(--accent); line-height: 1.3; font-variant-numeric: tabular-nums; }
.genko-result .big small { font-size: 14px; color: var(--muted); font-weight: 700; }
.genko-result dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px 16px; margin: 10px 0 0; }
.genko-result dt { font-size: 12px; color: var(--muted); font-weight: 700; }
.genko-result dd { margin: 0; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.genko .rules .inline-check { display: flex; min-height: 40px; }
.genko-preview { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 10px; direction: rtl; }
.gpage-wrap { direction: ltr; flex: none; text-align: center; }
.gpage { --cell: 15px; display: flex; flex-direction: row-reverse; background: #fffdf8; border: 1.5px solid #b0566f; padding: 6px; gap: 0; }
.gpage .gline { display: flex; flex-direction: column; border-left: 1px solid #e3b7c4; }
.gpage .gline:nth-child(10n) { margin-left: 6px; }
.gpage.half .gline:nth-child(10n) { margin-left: 0; }
.gpage .gline:first-child { border-left: 0; }
.gcell { width: var(--cell); height: var(--cell); border-bottom: 1px solid #f0d6de; writing-mode: vertical-rl; font-size: calc(var(--cell) * .78); line-height: var(--cell); text-align: center; color: #2a2124; overflow: hidden; display: block; }
.gcell.two { font-size: calc(var(--cell) * .5); }
.gcell.tcy { text-combine-upright: all; -webkit-text-combine: horizontal; font-size: calc(var(--cell) * .6); }
.gno { font-size: 12px; color: var(--muted); margin-top: 4px; }
@media (min-width: 620px) { .gpage { --cell: 17px; } }
@media (prefers-color-scheme: dark) { .gpage { background: #f4efe6; } }
.item .f-wh { grid-column: 1 / -1; min-height: 36px; font-size: 13px; }
.totals th small { display: block; font-size: 12px; color: var(--muted); }
.totals .hint.error { color: var(--warn); font-weight: 700; }
