/* 麻雀勉強アプリ ― 方眼ノートのような明るい紙の地に、深緑・藍の文字、朱と蛍光ペンの差し色
   （2026-11-27 夜の配色から一新。成績アプリ「ツモログ」の明るいアイボリー基調にそろえた） */
:root {
  --bg: #f5f1e6;            /* 紙 */
  --bg2: #ede7d7;
  --panel: #fffdf8;         /* カード（白いノート） */
  --panel-solid: #fffdf8;
  --panel-hi: #f4efe3;
  --ink: #1b2a3f;           /* 藍墨 */
  --sub: #646d76;
  --line: #e3dbc8;
  --line-hi: #cfc4aa;
  --brand: #17503b;         /* 深緑（見出し・主ボタン） */
  --brand-deep: #0e3628;
  --brand-soft: #e4efe8;
  --navy: #1e3a6b;          /* 藍（選択中・強調） */
  --navy-deep: #0f2348;
  --navy-soft: #e5ebf5;
  --gold: #17503b;          /* 旧名（他の場所で使っていても深緑になる） */
  --gold-deep: #0e3628;
  --gold-soft: #e4efe8;
  --marker: #f6dc6e;        /* 蛍光ペン */
  --marker-soft: #fdf4cc;
  --accent: #c8452c;        /* 朱 */
  --accent-soft: #fbe9e3;
  --ok: #1b7a50;
  --ok-soft: #e2f2e8;
  --ng: #c2352a;
  --ng-soft: #fbe7e3;
  --pin: #1e3a6b;
  --felt1: #2e6d57;         /* 牌を置くマット */
  --felt2: #1d5443;
  --radius: 16px;
  --shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 1px 2px rgba(60,48,20,.06), 0 10px 24px -16px rgba(60,48,20,.35);
  --tw: clamp(18px, calc((100vw - 84px) / 15), 44px);   /* 牌の幅（スマホで14枚が横に並ぶ） */
  font-size: 18px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html { background: var(--bg); }
body {
  /* 方眼ノートの目（ごく薄く） */
  background:
    linear-gradient(rgba(30,58,107,.045) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgba(30,58,107,.045) 1px, transparent 1px) 0 0 / 24px 24px,
    var(--bg);
  color: var(--ink);
  font-family: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  font-weight: 500;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
  overflow-x: hidden;
}
body > * { position: relative; z-index: 1; }
a { color: var(--navy); }
button { font: inherit; color: inherit; }
::selection { background: var(--marker); color: var(--ink); }

/* ---------- 上部 ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 12px;
  padding: 10px max(16px, calc((100vw - 760px) / 2));
  background: rgba(255, 253, 248, .9);
  backdrop-filter: blur(12px) saturate(140%); -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 3px 0 -2px var(--brand);
}
.logo {
  font-family: "Cinzel", "Shippori Mincho B1", serif;
  font-size: 11px; letter-spacing: .3em; font-weight: 700;
  color: #fffdf6; text-decoration: none; background: var(--brand);
  border-radius: 5px; padding: 3px 7px 3px 10px;
  box-shadow: 0 2px 0 var(--brand-deep);
}
.top-title {
  flex: 1; font-family: "Shippori Mincho B1", serif; font-weight: 800;
  font-size: 16px; color: var(--ink); text-decoration: none; letter-spacing: .06em;
}
.sound {
  border: 1px solid var(--line-hi); background: var(--panel); border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .08em; padding: 4px 12px; cursor: pointer; color: var(--brand);
  transition: border-color .2s, color .2s;
}
.sound:hover { border-color: var(--brand); }
.sound[aria-pressed="false"] { color: var(--sub); }

/* ---------- 共通 ---------- */
main { max-width: 760px; margin: 0 auto; padding: 0 16px 56px; }
main > * { animation: rise .4s cubic-bezier(.2, .8, .2, 1) both; }
main > *:nth-child(2) { animation-delay: .04s; }
main > *:nth-child(3) { animation-delay: .08s; }
main > *:nth-child(4) { animation-delay: .12s; }
main > *:nth-child(n+5) { animation-delay: .16s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.wrap { max-width: 760px; margin: 0 auto; padding: 16px; }
.card {
  background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; margin: 16px 0;
  box-shadow: var(--shadow);
}
h1, h2, h3 { line-height: 1.35; margin: 0 0 10px; letter-spacing: .02em; color: var(--brand); }
h1 { font-family: "Shippori Mincho B1", serif; font-weight: 800; font-size: 2.4rem; }
h2 { font-size: 1.3rem; font-weight: 900; }
h2::before {   /* 見出しの頭に小さな朱の印 */
  content: ""; display: inline-block; width: .32em; height: 1em; margin-right: .45em; vertical-align: -.12em;
  border-radius: 2px; background: var(--accent);
}
h3 { font-size: 1.05rem; font-weight: 900; color: var(--navy); }
p { margin: 0 0 10px; }
.muted { color: var(--sub); font-size: .9rem; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spacer { flex: 1; }
strong, b { font-weight: 900; }
mark { background: linear-gradient(transparent 55%, var(--marker) 55%); color: inherit; padding: 0 .1em; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 10px 24px; border-radius: 12px;
  border: 0; color: #fffdf6;
  background: linear-gradient(180deg, #1f6149, var(--brand));
  box-shadow: 0 3px 0 var(--brand-deep), 0 8px 16px -10px rgba(14,54,40,.7);
  font-weight: 900; font-size: 1.05rem; letter-spacing: .04em; cursor: pointer; text-decoration: none;
  transition: transform .1s, box-shadow .1s, filter .2s;
}
.btn:hover { filter: brightness(1.08); }
.btn.ghost {
  background: var(--panel); color: var(--navy);
  border: 1.5px solid var(--line-hi); font-weight: 700;
  box-shadow: 0 3px 0 var(--line);
}
.btn.ghost:hover { border-color: var(--navy); filter: none; }
.btn.wide { width: 100%; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--brand-deep); }
.btn.ghost:active { box-shadow: 0 1px 0 var(--line); }
.btn:focus-visible, .opt:focus-visible, .mode:focus-visible, .sound:focus-visible { outline: 3px solid var(--marker); outline-offset: 2px; }

/* ---------- ホーム ---------- */
.hero { text-align: center; padding: 30px 0 6px; }
.hero::before {
  content: "MAHJONG STUDY"; display: block;
  font-family: "Cinzel", serif; font-size: 11px; letter-spacing: .42em; color: var(--accent); margin-bottom: 2px;
}
.hero h1 {
  font-size: clamp(2.2rem, 9vw, 3.3rem); margin: 4px 0 6px; color: var(--brand);
  display: inline-block; padding: 0 .15em;
  background: linear-gradient(transparent 64%, var(--marker) 64%, var(--marker) 92%, transparent 92%);
}
.hero .sub { font-size: 1rem; color: var(--sub); margin-top: 0; letter-spacing: .04em; }
.hero-tiles {
  display: flex; justify-content: center; gap: 5px; margin: 8px auto 16px; padding: 20px 24px 24px;
  width: max-content; max-width: 100%;
  --tw: clamp(40px, 11vw, 58px);
  background: radial-gradient(120% 140% at 50% 0%, var(--felt1), var(--felt2));
  border-radius: 18px; border: 1px solid #154536;
  box-shadow: inset 0 2px 10px rgba(0,0,0,.3), 0 4px 0 #d9cfb7, 0 16px 30px -18px rgba(40,40,20,.6);
}
.hero-tiles .tile { animation: deal .6s cubic-bezier(.2, .9, .25, 1.15) both; }
.hero-tiles .tile:nth-child(1) { animation-delay: .05s; }
.hero-tiles .tile:nth-child(2) { animation-delay: .15s; }
.hero-tiles .tile:nth-child(3) { animation-delay: .25s; }
.hero-tiles .tile:nth-child(4) { animation-delay: .35s; }
@keyframes deal { from { opacity: 0; transform: translateY(-22px) rotate(-6deg); } to { opacity: 1; transform: none; } }

.modes { display: grid; gap: 10px; margin-top: 14px; }
.mode {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 50px 1fr; gap: 0 14px; align-items: center;
  text-align: left; background: var(--panel);
  border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 14px;
  padding: 14px 16px 14px 12px; cursor: pointer; text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform .15s, border-color .2s, box-shadow .2s;
}
.mode::after {   /* 右端の矢印 */
  content: "›"; position: absolute; right: 14px; top: 50%; transform: translateY(-52%);
  font-size: 1.6rem; color: var(--line-hi); font-weight: 700; transition: color .2s, right .2s;
}
.mode:hover { transform: translateY(-2px); border-color: var(--line-hi); border-left-color: var(--accent); }
.mode:hover::after { color: var(--accent); right: 10px; }
.mode:active { transform: translateY(1px); }
.mode .num {   /* 牌の形のバッジ */
  grid-row: span 2; width: 40px; height: 52px; border-radius: 6px; justify-self: center;
  display: grid; place-items: center; font-family: "Zen Old Mincho", "Shippori Mincho B1", serif;
  font-size: 1.4rem; font-weight: 900; color: #c61f1f;
  background: linear-gradient(180deg, #ffffff, #f1ebdb);
  border: 1px solid #2d302b;
  box-shadow: 0 1px 0 #fff inset, 0 3px 0 #d6cbb0, 0 6px 0 #16583b, 0 6px 0 1px #2d302b, 0 10px 12px -6px rgba(40,40,20,.45);
  margin-bottom: 6px;
}
.mode b { font-size: 1.1rem; letter-spacing: .03em; color: var(--brand); padding-right: 18px; }
.mode span:not(.num) { color: var(--sub); font-size: .86rem; line-height: 1.5; padding-right: 18px; }
.sublinks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.sublinks .btn { font-size: .98rem; padding: 10px 12px; white-space: nowrap; }

/* ---------- 牌（絵は tiles.js の SVG） ---------- */
.tiles { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px calc(var(--tw) * .24); }
.group { display: flex; gap: calc(var(--tw) * .03); }
.tile {
  position: relative; display: inline-block; flex: none; line-height: 0;
  width: var(--tw); height: calc(var(--tw) * 1.4);
  border-radius: calc(var(--tw) * .1);
  filter: drop-shadow(0 calc(var(--tw) * .05) calc(var(--tw) * .05) rgba(20, 28, 22, .3));
  transition: transform .15s;
}
.tile-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.tile.side { width: calc(var(--tw) * 77 / 60); height: calc(var(--tw) * 67 / 60); }   /* 横向きの牌（絵は tiles.js で横に描く） */
.tile.win { filter: drop-shadow(0 0 calc(var(--tw) * .14) rgba(246,220,110,.95)) drop-shadow(0 calc(var(--tw) * .05) calc(var(--tw) * .05) rgba(20,28,22,.3)); transform: translateY(calc(var(--tw) * -.1)); }
.winrow .tile.win { margin-left: calc(var(--tw) * .1); }

/* ---------- 問題 ---------- */
.progress { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: .88rem; color: var(--sub); font-weight: 700; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.bar { flex: 1; height: 8px; background: #e6dfcf; border-radius: 99px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(60,48,20,.15); }
.bar i {
  display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--brand), #2f8a63);
  transition: width .4s;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip {
  font-size: .82rem; padding: 2px 11px; border-radius: 6px; font-weight: 700; letter-spacing: .04em;
  background: var(--panel-hi); color: var(--ink); border: 1px solid var(--line);
}
.chip.dealer { background: var(--accent-soft); color: var(--accent); border-color: #efc1b4; }
.chip.win { background: var(--navy-soft); color: var(--navy); border-color: #c3cfe5; }
.question {
  font-size: 1.5rem; font-weight: 900; line-height: 1.45; margin: 6px 0 6px; letter-spacing: .02em; color: var(--ink);
}
.question em { font-style: normal; color: var(--accent); background: linear-gradient(transparent 62%, var(--marker-soft) 62%); }
.label { font-size: .78rem; color: var(--brand); font-weight: 900; margin: 14px 0 8px; letter-spacing: .14em; }
.handbox {
  background: radial-gradient(130% 160% at 50% 0%, var(--felt1), var(--felt2));
  border-radius: 12px; padding: 16px 14px 20px;
  border: 1px solid #154536;
  box-shadow: inset 0 2px 10px rgba(0,0,0,.28), 0 3px 0 #ddd3bc;
}
.handbox .label { color: rgba(255,253,240,.88); }
/* 手牌は横一列（折り返さない）。枠の幅 ÷ 牌の枚数で大きさを決める */
.handbox { container-type: inline-size; }
.handbox > * { --tw: min(44px, calc(100cqw / 14.5)); }
.handbox > .hand-line { --tw: min(46px, calc((100cqw - 2px) / var(--n, 14))); }
.hand-line { display: flex; flex-wrap: nowrap; align-items: flex-end; gap: calc(var(--tw) * .45); padding-top: 4px; }
.hand-line .concealed, .hand-line .meld { display: flex; flex-wrap: nowrap; align-items: flex-end; gap: 0; }
.hand-line .meld { position: relative; }
.hand-line .meld::before {   /* 「ポン（対面から）」などの小さな札 */
  content: attr(data-lab); position: absolute; left: 0; bottom: 100%; margin-bottom: 4px; white-space: nowrap;
  font-size: max(10px, calc(var(--tw) * .3)); line-height: 1.2; color: rgba(255,253,240,.85); font-weight: 700; letter-spacing: .04em;
}
.hand-line .meld + .meld { margin-left: calc(var(--tw) * -.25); }
.hand-line:has(.meld) { padding-top: calc(max(10px, var(--tw) * .3) + 10px); }
.winrow { display: flex; flex-wrap: wrap; gap: 14px 22px; margin-top: 16px; align-items: flex-end; }
.winrow .lab { font-size: .8rem; color: rgba(255,253,240,.85); font-weight: 700; margin-bottom: 8px; letter-spacing: .08em; }
.steps { display: flex; gap: 6px; margin: 16px 0 6px; counter-reset: step; }
.steps span {
  flex: 1; text-align: center; padding: 6px 0; border-radius: 8px; font-weight: 700; font-size: .9rem;
  background: var(--panel); color: var(--sub); border: 1px solid var(--line);
}
.steps span.on { background: var(--navy); color: #fff; border-color: var(--navy); box-shadow: 0 2px 0 var(--navy-deep); }
.steps span.ok { background: var(--ok-soft); color: var(--ok); border-color: #a9d6bd; }
.steps span.ng { background: var(--ng-soft); color: var(--ng); border-color: #eab3aa; }

.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.opt {
  position: relative;
  min-height: 62px; padding: 10px 8px; border-radius: 12px;
  border: 1.5px solid var(--line-hi); background: var(--panel);
  box-shadow: 0 3px 0 var(--line);
  font-size: 1.2rem; font-weight: 900; cursor: pointer; line-height: 1.25; letter-spacing: .02em;
  font-variant-numeric: tabular-nums; color: var(--ink);
  transition: transform .1s, border-color .15s, background .15s, box-shadow .1s, color .15s;
}
.opt:hover:not(:disabled) { border-color: var(--navy); }
.opt:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.opt.small { font-size: 1rem; }
.opt:disabled { cursor: default; }
.opt .tile { vertical-align: middle; }
/* 複数選択で押している状態：藍で塗りつぶし＋右上にチェック */
.opt.picked {
  border-color: var(--navy); background: var(--navy); color: #fff;
  box-shadow: 0 3px 0 var(--navy-deep), 0 0 0 3px var(--navy-soft);
}
.opt.picked::after {
  content: "✓"; position: absolute; top: -8px; right: -6px;
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: 13px; line-height: 1; font-weight: 900; color: var(--ink);
  background: var(--marker); border: 2px solid var(--panel); box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.opt.picked:hover:not(:disabled) { border-color: var(--navy-deep); }
.opt.correct { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); box-shadow: 0 3px 0 #a9d6bd, 0 0 0 2px var(--ok) inset; animation: pop .35s; }
.opt.wrong { border-color: var(--ng); background: var(--ng-soft); color: var(--ng); box-shadow: 0 3px 0 #eab3aa; animation: shake .4s; }
.opt.correct::after, .opt.wrong::after {
  position: absolute; top: -8px; right: -6px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; line-height: 1; font-weight: 900; color: #fff; border: 2px solid var(--panel);
}
.opt.correct::after { content: "○"; background: var(--ok); }
.opt.wrong::after { content: "×"; background: var(--ng); }
.opt.dim { opacity: .4; box-shadow: none; }
@keyframes pop { 40% { transform: scale(1.04); } }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

.feedback { border-radius: 12px; padding: 14px 16px; margin-top: 14px; border: 1px solid transparent; border-left-width: 5px; animation: rise .3s both; }
.feedback.ok { background: var(--ok-soft); border-color: #a9d6bd; border-left-color: var(--ok); }
.feedback.ng { background: var(--ng-soft); border-color: #eab3aa; border-left-color: var(--ng); }
.feedback .head { font-weight: 900; font-size: 1.2rem; margin-bottom: 4px; letter-spacing: .04em; }
.feedback.ok .head { color: var(--ok); }
.feedback.ng .head { color: var(--ng); }
.feedback .calc { font-size: .95rem; color: var(--ink); }
.answer-box {
  border: 1px solid #e9cf72; background: var(--marker-soft); border-radius: 12px; padding: 12px 16px; margin-top: 14px;
  box-shadow: 0 2px 0 #eadfb4;
}
.answer-box .big { font-size: 1.35rem; font-weight: 900; color: var(--navy); }
.note { font-size: 1rem; margin-top: 10px; }
.next { margin-top: 16px; }

/* ---------- チャレンジ ---------- */
.timer { font-variant-numeric: tabular-nums; font-weight: 900; color: var(--navy); }
.result-big { text-align: center; padding: 26px 20px; }
.result-big .score {
  font-size: 3.6rem; font-weight: 800; font-family: "Shippori Mincho B1", serif; line-height: 1.15; color: var(--brand);
}
.result-big .score small { font-size: 1.2rem; }
.best {
  display: inline-block; color: var(--ink); border-radius: 999px; padding: 3px 16px; font-weight: 900; font-size: .9rem; margin-top: 8px; letter-spacing: .08em;
  background: var(--marker); box-shadow: 0 2px 0 #d9bb45;
}
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 1rem; }
.kv dt { color: var(--sub); }
.kv dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- 苦手の記録 ---------- */
.weak { display: grid; gap: 16px; }
.weak-row .top-line { display: flex; justify-content: space-between; font-weight: 700; }
.weak-row .top-line span:last-child { font-weight: 500; color: var(--sub); }
.weak-row .bar { height: 10px; margin-top: 6px; }
.weak-row .bar i { background: linear-gradient(90deg, #e07a68, var(--ng)); }
.tip { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 10px; padding: 12px 14px; font-size: .95rem; }

/* ---------- ルール ---------- */
.rules li { margin-bottom: 6px; }
.rules ul { padding-left: 1.2em; margin: 6px 0 12px; }
.rules li::marker { color: var(--accent); }
.seg { display: inline-flex; border: 1.5px solid var(--line-hi); border-radius: 10px; overflow: hidden; margin: 2px 0 10px; background: var(--panel); }
.seg button { border: 0; background: transparent; padding: 8px 20px; font-weight: 700; cursor: pointer; min-height: 44px; color: var(--sub); transition: background .15s, color .15s; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--brand); color: #fff; }
.seg button:focus-visible { outline: 3px solid var(--marker); outline-offset: -3px; }

/* ---------- 待ち当て・オーラス・模擬試験 ---------- */
.tile.mini { --tw: 26px; vertical-align: middle; }
.mt { border-collapse: collapse; margin: 10px 0; width: 100%; font-size: .95rem; }
.mt td { border-top: 1px solid var(--line); padding: 8px 4px; vertical-align: middle; line-height: 1.5; }
.mt tr:last-child td { border-bottom: 1px solid var(--line); }
.mt td:first-child { width: 36px; }
.jinfo { margin: 0 0 8px; }
.jt { border-collapse: collapse; width: 100%; font-size: .95rem; font-variant-numeric: tabular-nums; }
.jt th, .jt td { border-bottom: 1px solid var(--line); padding: 8px 8px; text-align: left; }
.jt th { font-size: .78rem; color: var(--brand); font-weight: 900; letter-spacing: .1em; border-bottom: 2px solid var(--brand); }
.jt tr.me td { background: var(--marker-soft); font-weight: 900; color: var(--ink); }
.jt tr.me td:first-child { box-shadow: inset 4px 0 0 var(--accent); }
.jrule { margin: 6px 0 0; font-size: .82rem; }
.rev { border-top: 1px solid var(--line); padding: 10px 0; }
.rev summary { cursor: pointer; font-weight: 700; line-height: 1.5; }
.rev summary::marker { color: var(--accent); }
.seg.pills { border: 0; border-radius: 0; gap: 6px; flex-wrap: wrap; overflow: visible; margin-top: 6px; background: none; }
.seg.pills button { border: 1.5px solid var(--line-hi); border-radius: 999px; padding: 4px 16px; min-height: 38px; font-size: .88rem; background: var(--panel); }
.seg.pills button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- 案内 ---------- */
.promo { display: grid; gap: 10px; margin-top: 8px; }
.promo a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px; border-radius: 12px; text-decoration: none; font-weight: 900; font-size: 1.05rem;
  border: 1px solid var(--line-hi); color: var(--brand); background: var(--panel);
  box-shadow: 0 3px 0 var(--line);
  transition: border-color .2s, transform .2s;
}
.promo a:hover { border-color: var(--brand); transform: translateX(3px); }
.promo a.book { background: var(--marker-soft); border-color: #e9cf72; box-shadow: 0 3px 0 #eadfb4; }
.promo a small { font-weight: 500; font-size: .82rem; display: block; color: var(--sub); }
.promo a::after { content: "→"; font-size: 1.3rem; color: var(--accent); }
footer.foot { text-align: center; color: var(--sub); font-size: .75rem; margin-top: 36px; letter-spacing: .1em; }

@media (min-width: 760px) {
  :root { font-size: 19px; }
  .modes { grid-template-columns: 1fr 1fr 1fr; }
  .mode { grid-template-columns: 1fr; text-align: center; justify-items: center; padding: 24px 16px 20px; border-left-width: 1px; border-top: 4px solid var(--brand); }
  .mode:hover { border-left-color: var(--line-hi); border-top-color: var(--accent); }
  .mode::after { display: none; }
  .mode b, .mode span:not(.num) { padding-right: 0; }
  .mode .num { grid-row: auto; margin-bottom: 16px; }
  .opts { grid-template-columns: repeat(4, 1fr); }
  .opts.two { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .card { padding: 18px 14px; }
  .handbox { padding: 14px 8px 18px; }
  .hero-tiles { padding: 18px 18px 22px; }
}
@media (max-width: 380px) {
  :root { font-size: 16px; }
  .question { font-size: 1.3rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* 何切る：受け入れの牌と、切る牌ごとの表 */
.uke { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 4px; }
.uke .tile.mini { --tw: 22px; }
.nani-table td { vertical-align: top; padding-top: 8px; padding-bottom: 8px; }
.nani-table td:first-child { white-space: nowrap; width: 4.5em; }
.nani-table tr.nani-best td { background: rgba(255, 214, 64, .28); font-weight: 700; }
/* 符の内訳：説明の列を広く、符の列は折り返さない */
.fu-table { width: 100%; }
.fu-table td:first-child { width: 100%; white-space: normal; }
.fu-table td:last-child { white-space: nowrap; padding-left: 12px; }
/* 点差の早見表：翻・符の列は折り返さない */
.jt td:first-child { white-space: nowrap; }
.jt td:first-child .muted { white-space: normal; font-size: .78rem; }

/* 模擬試験：黒地に金の文字（特別なモード） */
.mode.mode-exam { background: linear-gradient(160deg, #1b1b1b, #0b0b0b); border-color: #b8913a; border-left-color: #d9b45a; }
.mode.mode-exam b { color: #e7c873; }
.mode.mode-exam span:not(.num) { color: #cdb27a; }
.mode.mode-exam .num { background: #0b0b0b; color: #e7c873; border-color: #b8913a; }
.mode.mode-exam::after { color: #d9b45a; }
.mode.mode-exam:hover { border-color: #e7c873; border-left-color: #f0d68c; }
.exam-card h2, .exam-card h3 { color: inherit; }
.exam-parts { display: grid; gap: 8px; margin-top: 6px; }
.exam-parts .btn { text-align: left; line-height: 1.5; padding-top: 10px; padding-bottom: 10px; }
.exam-verdict { font-size: 1.7rem; font-weight: 900; margin: 6px 0; letter-spacing: .2em; }
.exam-verdict.pass { color: var(--brand); }
.exam-verdict.fail { color: var(--accent); }
.mode.mode-exam .num { box-shadow: 0 1px 0 #3a3a3a inset, 0 3px 0 #6b5420, 0 6px 0 #2a2110, 0 6px 0 1px #b8913a, 0 10px 12px -6px rgba(0,0,0,.6); }
@media (min-width: 720px) { .mode.mode-exam { border-top-color: #d9b45a; } }
.exam-parts .btn { display: block; }
.exam-card .jt td:nth-child(3), .exam-card .jt td:nth-child(4) { white-space: nowrap; }
