/* ================================================================
   rhythm.css — 名曲リズムボックス（studio/rhythm/）。色は style.css のトークンを使う
   ページは横にスクロールさせない（広いパターン表だけ、表の中で横スクロール）
   ================================================================ */
.rb-sec { padding: 26px 0 40px; }
.rb-feats { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.rb-feat { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow); }
.rb-feat img { width: 44px; height: 44px; flex-shrink: 0; }
.rb-feat b { display: block; font-size: 1rem; }
.rb-feat p { margin: 4px 0 0; font-size: 0.86rem; color: var(--muted); line-height: 1.65; }
.rb-loading { text-align: center; padding: 40px 0; color: var(--muted); }
.rb-loading img { margin: 0 auto 10px; width: 120px; height: 120px; }

/* ---------- 全体のならび ---------- */
.rb-app { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
.rb-main, .rb-aside { display: grid; gap: 18px; min-width: 0; }
@media (min-width: 1060px) { .rb-app { grid-template-columns: minmax(0, 1fr) 340px; } .rb-aside { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; overscroll-behavior: contain; border-radius: var(--r); } }
.rb-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.rb-panel h3 { font-family: var(--mincho); font-size: 1.15rem; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rb-panel h3 small { font-family: var(--en); font-size: 0.95rem; color: var(--muted); font-weight: 600; }
.rb-panel hr { border: 0; border-top: 1px dashed var(--line); margin: 16px 0; }
.rb-ph { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin-bottom: 10px; }
.rb-ph h3 { margin: 0; }

/* ---------- ステージ ---------- */
.rb-stage { background: var(--velvet); color: #f7ecd9; border-radius: 26px; padding: 18px 18px 14px; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.rb-stage::before { content: ''; position: absolute; inset: 0; background: radial-gradient(60% 40% at 50% 0%, rgba(255, 220, 140, 0.18), transparent 70%); pointer-events: none; }
.rb-stage > * { position: relative; }
.rb-stage-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.rb-kick { font-family: var(--en); letter-spacing: 0.24em; font-size: 0.74rem; color: var(--gold2); margin: 0; font-weight: 700; }
.rb-sname { font-family: var(--mincho); font-size: clamp(1.4rem, 4vw, 2.1rem); margin: 0; line-height: 1.3; color: #fff; }
.rb-meter { display: inline-block; border: 1px solid rgba(233, 200, 121, 0.7); color: var(--gold2); border-radius: 999px; padding: 1px 10px; font-size: 0.82rem; font-weight: 700; }
.rb-sen { font-family: var(--en); font-size: 1.05rem; color: #e8d9c6; }
.rb-stage-bpm { text-align: right; }
.rb-stage-bpm > div { display: flex; align-items: baseline; gap: 6px; justify-content: flex-end; }
.rb-bpm { font-family: var(--en); font-size: clamp(3rem, 9vw, 4.6rem); line-height: 1; color: var(--gold2); font-variant-numeric: tabular-nums; }
.rb-stage-bpm span { font-weight: 900; letter-spacing: 0.12em; color: #d9c3b8; font-size: 0.9rem; }
.rb-tname { display: block; color: #e8d9c6; font-weight: 700; font-size: 0.86rem; }
.rb-viz { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0 4px; align-items: center; }
.rb-viz-c, .rb-viz-r { position: relative; max-width: 300px; width: 100%; min-width: 0; margin: 0 auto; }
.rb-viz svg { width: 100%; height: auto; display: block; overflow: visible; }
.rb-cond-path { fill: none; stroke: rgba(233, 200, 121, 0.4); stroke-width: 2; stroke-dasharray: 4 5; }
.rb-cpt circle { fill: rgba(255, 255, 255, 0.07); stroke: rgba(233, 200, 121, 0.55); stroke-width: 1.5; transition: fill 0.12s; }
.rb-cpt text { fill: #f7ecd9; font-size: 12px; font-weight: 900; font-family: var(--jp); }
.rb-cpt.on circle { fill: var(--gold); stroke: #fff3cf; }
.rb-cpt.on text { fill: #2a1a05; }
.rb-baton { stroke: #f7ecd9; stroke-width: 3; stroke-linecap: round; opacity: 0.85; }
.rb-tip { fill: #fff3cf; filter: drop-shadow(0 0 6px rgba(255, 210, 120, 0.9)); }
.rb-bignum { position: absolute; left: 4px; top: 0; font-family: var(--en); font-weight: 700; font-size: clamp(2.6rem, 9vw, 4rem); line-height: 1; color: var(--gold2); text-shadow: 0 0 18px rgba(255, 200, 100, 0.55); pointer-events: none; }
.rb-bignum.ci { color: #ff9ab2; }
.rb-tk { stroke: rgba(255, 255, 255, 0.28); stroke-width: 1.4; }
.rb-tk.bar { stroke: var(--gold2); stroke-width: 2.4; }
.rb-dot { fill: rgba(255, 255, 255, 0.12); transition: fill 0.08s; }
.rb-dot.on.g-d { fill: #ff8fa8; }
.rb-dot.on.g-b { fill: #5fd39b; }
.rb-dot.on.g-c { fill: #8fb8ff; }
.rb-dot.now { stroke: #fff3cf; stroke-width: 2; }
.rb-dot.on.now { fill: #fff3cf; }
.rb-hand { stroke: var(--gold2); stroke-width: 2.5; stroke-linecap: round; opacity: 0; }
.rb-hand.on { opacity: 0.9; }
.rb-ring-c { fill: #fff; font-family: var(--en); font-weight: 700; font-size: 22px; }
.rb-lamps { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 4px 0 10px; }
.rb-lamp { position: relative; display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 999px; padding: 3px 12px 3px 6px; font-size: 0.78rem; color: #eadbc6; background: rgba(0, 0, 0, 0.18); }
.rb-lamp i { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle, #fff3cf, #e9c879 60%, transparent 70%); opacity: 0; flex-shrink: 0; }
.rb-lamp[data-f='1'] i { background: radial-gradient(circle, #fff, #ff8fa8 60%, transparent 72%); }
.rb-lamp[data-f='8'] i { background: radial-gradient(circle, #fff, #5fd39b 60%, transparent 72%); }
.rb-lamp[data-f='16'] i { background: radial-gradient(circle, #fff, #8fb8ff 60%, transparent 72%); }
.rb-lamp.on i { opacity: 1; }
.rb-transport { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 6px 0 10px; }
.rb-stage .btn.ghost { color: #f7ecd9; border-color: rgba(255, 255, 255, 0.28); }
.rb-stage .btn.ghost:hover { border-color: var(--gold2); color: #fff; }
.rb-stage .btn.ghost.on { background: rgba(233, 200, 121, 0.22); border-color: var(--gold2); }
.rb-start { font-size: 1.15rem; padding: 13px 30px; min-width: 170px; justify-content: center; }
.rb-start.on { background: linear-gradient(135deg, #ff6f91, #c2385c); color: #fff; }
.rb-start.wait { opacity: 0.7; }
.rb-stopico { width: 16px; height: 16px; background: currentColor; border-radius: 3px; display: inline-block; }
.rb-tempo { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
.rb-bpmslider { flex: 1 1 200px; min-width: 0; accent-color: var(--gold2); }
.rb-stepbtn { border: 1px solid rgba(255, 255, 255, 0.28); background: rgba(255, 255, 255, 0.06); color: #f7ecd9; border-radius: 10px; padding: 5px 9px; font-weight: 900; font-size: 0.85rem; min-width: 42px; cursor: pointer; }
.rb-stepbtn:hover { border-color: var(--gold2); }
@media (max-width: 560px) { .rb-bpmslider { order: -1; flex-basis: 100%; } }
.rb-statusrow { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: center; margin-top: 12px; padding-top: 12px; border-top: 1px dashed rgba(255, 255, 255, 0.2); }
.rb-count { min-width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-family: var(--en); font-weight: 700; font-size: 1.5rem; color: #fff; background: var(--wine2); opacity: 0; transform: scale(0.6); transition: 0.12s; }
.rb-count.on { opacity: 1; transform: scale(1); }
.rb-beatdots { display: flex; gap: 6px; }
.rb-bd { width: 32px; height: 32px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.3); display: grid; place-items: center; font-weight: 900; font-size: 0.85rem; color: #d9c3b8; transition: 0.08s; }
.rb-bd.now { background: var(--gold2); border-color: var(--gold2); color: #2a1a05; transform: scale(1.15); }
.rb-chordwrap { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.rb-chords { display: flex; gap: 4px; flex-wrap: wrap; }
.rb-chord { padding: 3px 9px; border-radius: 8px; background: rgba(255, 255, 255, 0.1); font-weight: 900; font-size: 0.85rem; transition: 0.1s; }
.rb-chord.on { background: var(--gold2); color: #2a1a05; transform: scale(1.1); }
.rb-barlabel { font-weight: 900; color: var(--gold2); font-size: 0.82rem; }
.rb-status { margin: 8px 0 0; text-align: center; font-size: 0.85rem; color: var(--gold2); min-height: 1em; }
@media (max-width: 480px) { .rb-stage { padding: 14px 12px 12px; border-radius: 20px; } .rb-start { min-width: 0; flex: 1 1 100%; } .rb-viz { gap: 4px; } .rb-lamp span { font-size: 0.7rem; } }

/* ---------- スタイル選び ---------- */
.rb-cats { flex-wrap: wrap; max-width: 100%; }
.rb-stylegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 7px; }
.rb-style { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; border: 2px solid var(--line); background: var(--bg); border-radius: 14px; padding: 8px 11px; text-align: left; cursor: pointer; color: var(--ink); transition: border-color 0.15s, transform 0.15s, background 0.15s; min-width: 0; }
.rb-style b { font-size: 0.9rem; line-height: 1.35; }
.rb-style small { font-size: 0.72rem; color: var(--muted); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.rb-style small span { font-family: var(--en); font-size: 1.05em; }
.rb-style:hover { border-color: var(--gold); transform: translateY(-1px); }
.rb-style.on { border-color: var(--gold); background: var(--goldgrad); color: #2a1a05; box-shadow: 0 6px 16px -8px #b8892e; }
.rb-style.on small { color: #3c2a08; }
.rb-style[data-cat='classic']:not(.on) { border-left: 4px solid var(--gold2); }

/* ---------- 説明 ---------- */
.rb-info p { margin: 0 0 8px; }
.rb-desc { line-height: 1.85; }
.rb-tip { font-weight: 700; color: var(--wine); font-size: 0.92rem; display: flex; gap: 6px; align-items: flex-start; }
.rb-tip img { flex-shrink: 0; margin-top: 3px; }
.rb-pieces { align-items: center; margin: 6px 0 4px; }
.rb-pieces .chip { white-space: normal; text-align: left; }
.rb-prognote { color: var(--muted); }
.rb-prognote img { display: inline; vertical-align: -4px; }

/* ---------- 音読ステージ ---------- */
.rb-readcard .rb-fs { margin-left: auto; display: flex; gap: 6px; }
.rb-mini { border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 3px 10px; font-weight: 900; font-size: 0.82rem; color: var(--ink2); cursor: pointer; }
.rb-mini:hover { border-color: var(--gold); }
.rb-banner { font-weight: 900; color: var(--wine); }
.rb-reader { --rb-fs: 34px; max-height: 46vh; overflow: auto; background: var(--bg2); border-radius: 18px; padding: 12px 14px; font-size: var(--rb-fs); line-height: 1.5; font-family: var(--en); font-weight: 700; overflow-wrap: anywhere; }
.rb-line { padding: 3px 10px; border-radius: 14px; opacity: 0.5; transition: opacity 0.2s, background 0.2s; }
.rb-line.on, .rb-reader.allon .rb-line { opacity: 1; }
.rb-line.on { background: color-mix(in srgb, var(--gold2) 35%, transparent); }
.rb-w { display: inline-block; padding: 0 5px; border-radius: 10px; transition: transform 0.1s, background 0.1s; }
.rb-w.on { background: var(--wine); color: #fff; transform: scale(1.12); }
.rb-empty { font-family: var(--jp); font-size: 1rem; color: var(--muted); }
.rb-readset { margin-top: 10px; }
.rb-readset summary { cursor: pointer; font-weight: 900; font-size: 0.9rem; padding: 6px 0; }
.rb-ta { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px; font: inherit; font-family: var(--en); font-size: 1.05rem; background: var(--bg); color: var(--ink); resize: vertical; }

/* ---------- 設定 ---------- */
.rb-field { display: grid; gap: 3px; margin: 0 0 10px; min-width: 0; }
.rb-flabel { font-size: 0.8rem; font-weight: 700; color: var(--ink2); }
.rb-flabel b { color: var(--wine); }
.rb-sel { width: 100%; max-width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 7px 8px; background: var(--bg); color: var(--ink); font: inherit; font-size: 0.86rem; }
.rb-field input[type='range'] { width: 100%; accent-color: var(--wine); }
.rb-row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 10px; align-items: end; }
@media (max-width: 420px) { .rb-row2 { grid-template-columns: minmax(0, 1fr); } }
.rb-check { display: flex; gap: 8px; align-items: center; font-size: 0.88rem; font-weight: 700; margin: 0 0 10px; cursor: pointer; }
.rb-check input { width: 18px; height: 18px; accent-color: var(--wine); flex-shrink: 0; }
.rb-keys { margin-top: 10px; }

/* ---------- パターン表 ---------- */
.rb-gridwrap { overflow-x: auto; overscroll-behavior-x: contain; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
.rb-grid { --n: 16; }
.rb-grow { display: grid; grid-template-columns: 132px repeat(var(--n), minmax(24px, 1fr)); gap: 3px; align-items: center; margin-bottom: 3px; min-width: calc(132px + var(--n) * 27px); }
.rb-grow.unused { opacity: 0.6; }
.rb-gname { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 700; color: var(--ink2); min-width: 0; position: sticky; left: 0; background: var(--card); z-index: 2; padding-right: 4px; height: 100%; }
.rb-gname span { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.rb-gname small { font-family: var(--en); font-size: 0.9em; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-mute { border: 0; background: none; cursor: pointer; padding: 0; flex-shrink: 0; }
.rb-mute img { width: 16px; height: 16px; }
.rb-mute.off { opacity: 0.5; }
.rb-gh { text-align: center; font-size: 0.68rem; color: var(--muted); font-weight: 700; position: relative; }
.rb-gh.beat { color: var(--ink); font-size: 0.78rem; }
.rb-barn { position: absolute; top: -14px; left: 0; font-size: 0.62rem; color: var(--wine); }
.rb-ghead { margin-top: 12px; }
.rb-cell { height: 28px; border-radius: 7px; border: 1px solid var(--line); background: var(--bg2); cursor: pointer; padding: 0; font: inherit; font-size: 0.7rem; font-weight: 900; color: #fff; transition: background 0.06s; }
.rb-cell.beat { border-left: 3px solid color-mix(in srgb, var(--muted) 45%, transparent); }
.rb-cell.bar { border-left: 3px solid var(--wine); }
.rb-cell[data-v='1'] { background: var(--wine); border-color: var(--wine); }
.rb-cell[data-v='2'] { background: #e8743b; border-color: #e8743b; }
.rb-cell[data-v='3'] { background: color-mix(in srgb, var(--wine) 22%, var(--card)); border-color: var(--wine); color: var(--wine); }
.rb-cell[data-g='b']:not([data-v='0']) { background: #1e9b62; border-color: #1e9b62; color: #fff; }
.rb-cell[data-g='c']:not([data-v='0']) { background: #3d6fd9; border-color: #3d6fd9; }
.rb-cell[data-g='c'][data-v='3'] { background: color-mix(in srgb, #3d6fd9 25%, var(--card)); color: #3d6fd9; }
.rb-cell.now { outline: 3px solid var(--gold); outline-offset: -1px; position: relative; z-index: 1; }
.rb-gridtools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.rb-gridtools .rb-check { margin: 0 0 0 6px; }
.rb-gridtools .btn:disabled { opacity: 0.45; pointer-events: none; }
@media (max-width: 560px) {
  .rb-grow { grid-template-columns: 92px repeat(var(--n), minmax(22px, 1fr)); min-width: calc(92px + var(--n) * 25px); }
  .rb-gname small { display: none; }
}

/* ---------- 書き出し・共有 ---------- */
.rb-out .seg { flex-wrap: wrap; max-width: 100%; margin-bottom: 10px; }
.rb-btnrow { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.rb-btnrow.center { justify-content: center; }
.rb-btnrow .btn:disabled { opacity: 0.5; pointer-events: none; }
.rb-prog { height: 6px; border-radius: 6px; background: var(--bg2); overflow: hidden; margin: 8px 0 4px; }
.rb-prog i { display: block; height: 100%; background: var(--goldgrad); transform: scaleX(0); transform-origin: left; transition: transform 0.2s; }
.rb-outstatus { min-height: 1.4em; margin: 4px 0 0; }
.rb-shareurl { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 8px; font-size: 0.78rem; background: var(--bg); color: var(--ink2); }

.rb-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); max-width: min(92vw, 520px); background: #241632; color: #fff; padding: 10px 18px; border-radius: 14px; font-weight: 700; font-size: 0.9rem; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s; z-index: 90; text-align: center; }
.rb-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- リズムまね名人 ---------- */
.rb-game { max-width: 860px; margin: 0 auto; }
.rb-gtop { text-align: center; }
.rb-glv { flex-wrap: wrap; max-width: 100%; justify-content: center; }
.rb-glv button:disabled { opacity: 0.5; }
.rb-gboard { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 18px; box-shadow: var(--shadow); margin-top: 12px; }
.rb-gstat { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; font-weight: 700; color: var(--muted); }
.rb-gstat b { color: var(--ink); font-family: var(--en); font-size: 1.3rem; }
.rb-gcombo { color: var(--wine); font-weight: 900; min-width: 6em; }
.rb-gmsg { text-align: center; font-weight: 700; min-height: 3.2em; margin: 10px 0; }
.rb-gmsg a { margin-left: 6px; }
.rb-gpiece { display: inline; color: var(--wine); }
.rb-lanewrap { position: relative; }
.rb-lane { position: relative; height: 70px; background: var(--bg2); border-radius: 16px; border: 1px solid var(--line); overflow: hidden; margin: 0 4px; }
.rb-lbeat { position: absolute; top: 0; bottom: 0; width: 1px; background: color-mix(in srgb, var(--muted) 40%, transparent); }
.rb-lbeat.bar { width: 2px; background: var(--gold); }
.rb-lnote { position: absolute; top: 14px; width: 16px; height: 42px; margin-left: 2px; border-radius: 8px; background: var(--wine); box-shadow: 0 4px 10px -4px var(--wine); transition: background 0.15s; }
.rb-lnote.hide { background: transparent; box-shadow: none; border: 2px dashed color-mix(in srgb, var(--muted) 50%, transparent); }
.rb-lnote.perfect { background: #e9b10f; }
.rb-lnote.great { background: #1e9b62; }
.rb-lnote.good { background: #3d6fd9; }
.rb-lnote.miss { background: #9a8fa0; box-shadow: none; }
.rb-ltap { position: absolute; bottom: 4px; width: 3px; height: 14px; margin-left: 8px; background: var(--ink); border-radius: 2px; }
.rb-lcur { position: absolute; top: 0; bottom: 0; width: 3px; background: var(--gold); left: 0; box-shadow: 0 0 10px var(--gold); }
.rb-judge { position: absolute; left: 50%; top: -12px; transform: translateX(-50%); font-family: var(--en); font-weight: 700; font-size: 2rem; opacity: 0; pointer-events: none; white-space: nowrap; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); }
.rb-judge.perfect { color: #e9b10f; }
.rb-judge.great { color: #1e9b62; }
.rb-judge.good { color: #3d6fd9; }
.rb-judge.miss, .rb-judge.extra { color: #9a8fa0; font-family: var(--jp); font-size: 1.4rem; }
.rb-pad { display: flex; flex-direction: column; align-items: center; gap: 2px; width: min(100%, 300px); margin: 18px auto 10px; border: 3px solid var(--line); border-radius: 28px; background: var(--bg); padding: 14px; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; color: var(--ink); transition: border-color 0.2s, box-shadow 0.2s; }
.rb-pad img { width: 96px; height: 96px; pointer-events: none; }
.rb-pad span { font-weight: 900; font-size: 1.2rem; }
.rb-pad small { color: var(--muted); font-family: var(--en); }
.rb-pad.ready { border-color: var(--gold); box-shadow: 0 0 0 6px color-mix(in srgb, var(--gold2) 40%, transparent); }
.rb-gresult { text-align: center; }
.rb-rank { display: inline-flex; align-items: center; gap: 12px; margin-top: 12px; padding: 10px 22px; border-radius: 18px; background: var(--velvet); color: #fff; }
.rb-rank b { font-family: var(--en); font-size: 2.6rem; line-height: 1; color: var(--gold2); }
.rb-rank span { font-family: var(--mincho); font-size: 1.2rem; }
.rb-gset { margin-top: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 10px 16px; }
.rb-gset summary { cursor: pointer; font-weight: 900; }

/* ---------- 本文 ---------- */
.rb-steps { padding-left: 1.3em; }
.rb-steps li { margin-bottom: 6px; }
.rb-words { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.rb-words span { display: inline-flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; padding: 6px 12px; background: var(--bg); font-size: 0.8rem; color: var(--muted); }
.rb-words b { font-family: var(--en); font-size: 1.15rem; color: var(--ink); }
.rb-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 16px; }
.rb-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow); min-width: 0; scroll-margin-top: 90px; }
.rb-card-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.rb-card h3 { font-family: var(--mincho); font-size: 1.25rem; margin: 0; }
.rb-card .rb-meter { color: var(--gold-ink); border-color: var(--gold); flex-shrink: 0; }
.rb-card-en { font-family: var(--en); color: var(--gold-ink); font-size: 1.05rem; margin: 2px 0 8px; }
.rb-card p { font-size: 0.93rem; margin: 0 0 8px; }
.rb-card .chip { white-space: normal; }
.rb-subh { text-align: center; font-family: var(--mincho); margin: 34px 0 12px; font-size: 1.25rem; }
.rb-progs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 10px; }
.rb-pcard { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.rb-pcard p { margin: 4px 0 6px; }
.rb-faq { border-bottom: 1px solid var(--line); padding: 10px 0; }
.rb-faq summary { cursor: pointer; font-weight: 900; }
.rb-faq p { margin: 8px 0 0; }
