/* capitomo.css — CapiTomo pages only. Loaded after /assets/dc-tokens.css and
   dc.css (the shared design system: tokens; type, base, buttons, forms); adds
   CapiTomo's own rules. */
/* ============================================================
   1. CapiTomo components
   ============================================================ */
.placeholder { background: var(--sky); color: var(--navy); padding: 0 var(--space-1); border-radius: 4px; }
[data-theme="dark"] .placeholder { color: var(--ink); }

/* hero: text left, sample member card right */
.hero { padding: var(--space-7) 0; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--space-7); align-items: center; }
.hero-kicker { color: var(--accent-pink-text); font: 700 15px/24px var(--font-sans); margin-bottom: var(--space-2); }
.hero h1 { margin-bottom: var(--space-4); }
.hero .lead { margin-bottom: var(--space-5); max-width: 34em; }
.price-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2) var(--space-4); margin-bottom: var(--space-5); }
.price { font: 800 32px/38px var(--font-sans); }
.price small { font: 400 13px/20px var(--font-sans); color: var(--ink-muted); margin-left: var(--space-1); }
.no-renew { font: 600 13px/16px var(--font-sans); color: var(--violet); }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* キャピ友の家 (capitomo_member_view()): the greeting and the posts' heading, search and filters
   left of the card, so the posts begin right below it; on phones greeting, card, tools. */
.hero.home { padding: var(--space-6) 0 var(--space-4); }
.hero .wrap.home-grid { grid-template-columns: 1.1fr 1fr; grid-template-areas: "greet card" "tools card";
  gap: var(--space-4) var(--space-7); align-items: start; }
.home-greet { grid-area: greet; }
/* The greeting is the page's h1 in a speech bubble: no .hero h1 margin under it. */
.home-greet h1 { margin-bottom: 0; }
.home-card { grid-area: card; }
.home-tools { grid-area: tools; align-self: end; scroll-margin-top: var(--space-4); }
.home-tools h2 { margin-bottom: var(--space-2); }
.home-tools .feed-filter { margin-bottom: 0; }
.home-renew { margin-top: var(--space-4); }
.home-renew p { margin-top: var(--space-2); }
/* section.block (dc.css) would add 48px above the first post; the posts' own padding spaces them. */
section.block.home-feed { padding-top: 0; }
.checkout-msg { margin-top: var(--space-3); font: 400 13px/20px var(--font-sans); color: var(--accent-pink-text); }

/* the member card — the one bold element on the page. The skin image
   (--card-skin, set on the card; 4:5 portrait artwork) fills the card's
   height at the right edge, so it spans about the right half. Two fades in
   the card's color sit over it: solid over the left half, where the club
   name, avatar and name sit, fading to clear at 40% from the right edge (so
   the image's left fifth fades); and a band along the bottom for the dates.
   White text stays readable whatever the image. The color is the member's
   (--card-rgb, "r g b", set on the card from CAPITOMO_CARD_COLORS; navy by
   default), not a theme token: the card is the same in light and dark mode. */
.member-card { --card-rgb: 31 51 71; position: relative; aspect-ratio: 1.586; /* ID-1 card ratio */
  background:
    linear-gradient(0deg, rgb(var(--card-rgb) / .85) 0%, rgb(var(--card-rgb) / 0) 28%),
    linear-gradient(90deg, rgb(var(--card-rgb)) 0%, rgb(var(--card-rgb)) 50%, rgb(var(--card-rgb) / 0) 60%),
    var(--card-skin, none) right center / auto 100% no-repeat,
    rgb(var(--card-rgb));
  color: #fff; border-radius: var(--radius-lg);
  padding: var(--space-5); display: grid; grid-template-rows: auto 1fr auto; overflow: hidden;
  transform: rotate(-3deg); box-shadow: 0 18px 40px -18px rgb(var(--card-rgb) / .55); }
.mc-top { display: flex; justify-content: space-between; align-items: flex-start; position: relative; z-index: 1; }
.mc-club { font: 800 20px/24px var(--font-sans); }
.mc-club span { display: block; margin-top: var(--space-1); font: 600 12px/16px var(--font-sans); opacity: .8; }
/* the middle of the card: avatar, name and number, and under them the founders' badge — gold
   with near-black lettering; the gradient, oversized and anchored right, gives a still glint */
.mc-mid { display: grid; gap: var(--space-3); justify-items: start; align-self: center; position: relative; z-index: 1; }
.mc-badge { white-space: nowrap; font: 700 11px/16px var(--font-sans); letter-spacing: .14em; color: #1D1608;
  background: linear-gradient(110deg, #8F6A1E 0%, #D6AF55 20%, #FDF0BD 38%, #D4A948 52%, #9C7426 72%, #ECD28A 88%, #A98230 100%)
    100% 0 / 250% 100%;
  border-radius: var(--radius-full); padding: 2px var(--space-3); }
.mc-who { display: flex; align-items: center; gap: var(--space-4); position: relative; z-index: 1; align-self: center; }
.mc-avatar { position: relative; overflow: hidden; width: 64px; height: 64px; border-radius: 50%; background: #8FC0DE; color: #1F3347;
  display: grid; place-items: center; font: 800 26px/1 var(--font-sans); border: 3px solid #fff; flex: none; }
/* A chosen avatar covers the initial letter. */
.mc-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mc-avatar img[hidden] { display: none; }
/* A long name can reach the photo; the shadow keeps it legible there. */
.mc-name { font: 700 20px/28px var(--font-sans); text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.mc-num { font: 400 13px/20px var(--font-sans); opacity: .85; font-variant-numeric: tabular-nums; }
.mc-name--pick a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.mc-foot { display: flex; justify-content: space-between; font: 400 12px/16px var(--font-sans); opacity: .9; position: relative; z-index: 1; font-variant-numeric: tabular-nums; }
.card-note { text-align: center; margin-top: var(--space-5); }

/* perks: plain two-column list, not a card grid. One numbered list per
   column, so each column keeps its own item heights; the counter runs on
   from the left column into the right. */
.perks { counter-reset: perk; display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5) var(--space-7); align-items: start; }
.perks ol { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-5); }
.perks li { counter-increment: perk; border-left: 3px solid var(--accent-pink); padding-left: var(--space-4); }
.perks h3 { margin-bottom: var(--space-1); }
.perks h3::before { content: counter(perk) ". "; }

/* how it works: a real sequence, so numbered */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-5); }
.steps li { counter-increment: s; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--fill-primary); color: var(--on-fill-primary); font: 800 17px/1 var(--font-sans); margin-bottom: var(--space-3); }
.steps h3 { margin-bottom: var(--space-1); }

/* FAQ */
.faq { max-width: 720px; }
.faq details { border-bottom: 1px solid var(--border); padding: var(--space-4) 0; }
.faq summary { font: 700 17px/24px var(--font-sans); cursor: pointer; list-style-position: outside; }
.faq details p { margin-top: var(--space-3); color: var(--ink-muted); }

/* closing CTA on navy */
.closing { background: var(--navy); color: #fff; padding: var(--space-7) 0; text-align: center; }
.closing p { margin: var(--space-3) auto var(--space-5); max-width: 32em; opacity: .9; }
.closing .btn-primary { background: #fff; color: #1F3347; }
.closing .checkout-msg { color: #fff; }

/* footer */
.site-foot { padding: var(--space-6) 0; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); margin-bottom: var(--space-3); }
.site-foot a { font: 400 13px/20px var(--font-sans); }

/* responsive */
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; gap: var(--space-6); }
  .hero .wrap.home-grid { grid-template-columns: 1fr; grid-template-areas: "greet" "card" "tools"; gap: var(--space-5); }
  .member-card { transform: rotate(-2deg); max-width: 420px; margin: 0 auto; width: 100%; }
  .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .perks, .steps { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: no-preference) {
  .member-card { transition: transform .4s ease; }
  .member-card:hover { transform: rotate(0deg); }
}

/* ============================================================
   2. Member view
   ============================================================ */
.member-card--flat { transform: none; }
@media (prefers-reduced-motion: no-preference) { .member-card--flat:hover { transform: none; } }
.member-facts { display: grid; grid-template-columns: auto 1fr; gap: var(--space-2) var(--space-5); margin: 0 0 var(--space-5); }
.member-facts dt { color: var(--ink-muted); }
.member-facts dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
/* On phones each label sits above its value, with a space before the next label, so long values keep the full width. */
@media (max-width: 599px) {
  .member-facts { grid-template-columns: 1fr; row-gap: 0; }
  .member-facts dd + dt { margin-top: var(--space-4); }
}
.empty-state { padding: var(--space-6); border: 1px dashed var(--control-border); border-radius: var(--radius-md);
  color: var(--ink-muted); text-align: center; }

/* ============================================================
   3. Member posts: feed, post page, watermarked player
   ============================================================ */
.post-list { list-style: none; margin: 0; padding: 0; max-width: 720px; }
.post-list li { border-bottom: 1px solid var(--border); }
.post-link { display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-4) 0; color: var(--ink); text-decoration: none; }
/* Date and type on one line, title below, so every entry's text starts at the same left edge. */
.post-text { display: flex; flex-direction: column; gap: var(--space-1); flex: 1 1 auto; min-width: 0; }
.post-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-4); }
/* Video thumbnail, 16:9 (Bunny's own thumbnails can differ, so crop to fit). */
.post-thumb { flex: none; width: 112px; height: auto; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: var(--radius-sm); background: var(--surface-100); }
.post-link:hover .post-title { text-decoration: underline; }
.post-date { font: 400 13px/20px var(--font-sans); color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.post-title { font: 700 17px/24px var(--font-sans); }
.post-type { font: 600 12px/16px var(--font-sans); color: var(--ink-muted); }
.feed-search { display: flex; gap: var(--space-2); margin: var(--space-3) 0 var(--space-4); max-width: 34em; }
.feed-search input[type="search"] { flex: 1 1 auto; min-width: 0; font: 400 16px/24px var(--font-sans); /* 16px keeps iOS from zooming */
  color: var(--ink); background: var(--surface-100); border: 1px solid var(--control-border);
  border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3); }
.feed-filter { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0 0 var(--space-5); }
.feed-filter a { font: 600 13px/16px var(--font-sans); color: var(--ink); text-decoration: none;
  border: 1px solid var(--control-border); border-radius: var(--radius-full); padding: var(--space-1) var(--space-3); }
.feed-filter a[aria-current="true"] { background: var(--fill-primary); color: var(--on-fill-primary); border-color: var(--fill-primary); }
/* "Favorites only" narrows whichever type is chosen — set apart, in the secondary color. */
.feed-filter-divider { width: 1px; align-self: stretch; background: var(--border); margin: 0 var(--space-1); }
.feed-filter a.feed-filter-fav { border-style: dashed; }
.feed-filter a.feed-filter-fav[aria-pressed="true"] { background: var(--fill-accent); color: var(--on-fill-accent);
  border-color: var(--fill-accent); border-style: solid; }
/* Favorite / pin controls (feed entries, post page) */
.post-list li { display: flex; align-items: center; gap: var(--space-3); }
.post-list li .post-link { flex: 1 1 auto; min-width: 0; }
.post-marks { display: flex; gap: var(--space-1); flex: none; }
.post-marks form { margin: 0; }
/* Phones: in the feed, the star above the pin, leaving the title one button's width more. */
@media (max-width: 599px) { .post-list .post-marks { flex-direction: column; } }
.mark-button { font-size: 18px; line-height: 1; background: none; border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: var(--space-1) var(--space-2); cursor: pointer; color: var(--ink-muted); }
.mark-button:hover, .mark-button:focus-visible { border-color: var(--control-border); }
.mark-favorite.is-on { color: var(--accent-pink-text); }
.mark-pinned { opacity: .35; }
.mark-pinned.is-on { opacity: 1; }
.post-page-marks { margin: 0 0 var(--space-5); }
.feed-paging { display: flex; justify-content: space-between; gap: var(--space-4); margin-top: var(--space-5); font-weight: 600; }
.post-tag { font: 600 12px/16px var(--font-sans); color: var(--accent-pink-text);
  border: 1px solid var(--accent-pink); border-radius: var(--radius-full); padding: 0 var(--space-2); }

.post .wrap { max-width: 800px; }
.post-back { margin-bottom: var(--space-5); font: 600 13px/16px var(--font-sans); }
.post h1 { margin: var(--space-1) 0 var(--space-5); }
.post-body { max-width: 40em; }
.post-body p { margin-bottom: var(--space-4); }
.post-body a { overflow-wrap: anywhere; }

/* Never taller than the visible screen (e.g. a phone in landscape): width is
   capped at screen height × 16/9. dvh excludes browser toolbars; vh is the
   fallback for browsers without it. */
.fc-player { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius-md); overflow: hidden;
  width: min(100%, calc(100vh * 16 / 9)); width: min(100%, calc(100dvh * 16 / 9)); margin-inline: auto;
  container-type: inline-size; }
.fc-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.fc-player:fullscreen { aspect-ratio: auto; width: 100%; height: 100%; border-radius: 0; }
/* Watermark: kept faint and in the corners, away from faces, hands and
   on-screen text. The knobs are the font sizes and the rgba alpha. */
.fc-watermark { position: absolute; top: 6%; left: 4%; pointer-events: none; user-select: none;
  font: 600 15px/1 var(--font-sans); letter-spacing: .04em; color: rgba(255, 255, 255, .3);
  text-shadow: 0 0 2px rgba(0, 0, 0, .4); transition: opacity 1s ease; }
.fc-watermark.is-hidden { opacity: 0; }
.fc-player:fullscreen .fc-watermark { font-size: 20px; }
/* The question being answered (capitomo.js): white, bold, a thick black
   outline of stacked shadows, centred between 20 % and 80 % of the width,
   6 % up from the bottom (the controls may cover it while in use). Sized
   from the player's width — 5 % of a 16:9 player's height. Phones (screens
   under 600 px — the Q&A page's player is narrower than that on a desktop,
   so the player's own width cannot tell a phone) get 8 % and nearly the
   full width (4 % to each side).
   auto-phrase breaks Japanese at phrase boundaries (needs the lang set). */
.fc-caption { position: absolute; left: 20%; right: 20%; bottom: 6%; pointer-events: none; user-select: none;
  text-align: center; color: #fff; font: 700 calc(5cqw * 9 / 16)/1.25 var(--font-sans);
  text-wrap: balance; word-break: auto-phrase;
  text-shadow: .15em 0 0 #000, -.15em 0 0 #000, 0 .15em 0 #000, 0 -.15em 0 #000,
    .105em .105em 0 #000, -.105em .105em 0 #000, .105em -.105em 0 #000, -.105em -.105em 0 #000, 0 0 .18em #000; }
@media (max-width: 599px) { .fc-caption { left: 4%; right: 4%; font-size: calc(8cqw * 9 / 16); } }
.fc-player-actions { margin: var(--space-3) 0 var(--space-6); }
.fc-player-actions[hidden] { display: none; }
/* The reminder under the player: quiet gray, its link marked by the underline alone. */
.fc-player-note { margin: var(--space-2) 0 0; }
.fc-player-note a { color: inherit; text-decoration: underline; }

/* Image gallery (capitomo_gallery()): a strip of slides, one per image, that
   snaps from slide to slide. The stage has the first image's shape (set
   inline as --gallery-ratio) and, like the player, is never taller than the
   visible screen; each image fits inside it on black. Captions sit under the
   stage. .is-full (capitomo.js) turns the whole gallery into a black overlay
   over the page: the stage fills the screen, captions stay under it. */
.fc-gallery { margin: var(--space-4) 0 var(--space-6); }
.fc-gallery-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  overscroll-behavior-x: contain; border-radius: var(--radius-md); }
.fc-gallery-track::-webkit-scrollbar { display: none; }
.fc-gallery-slide { flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always; margin: 0; }
.fc-gallery-stage { aspect-ratio: var(--gallery-ratio, 4 / 3); max-height: 85vh; max-height: 85dvh; width: 100%;
  background: #000; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.fc-gallery-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; cursor: zoom-in; }
.fc-gallery-caption { margin: var(--space-2) 0 0; font: 400 14px/1.5 var(--font-sans); }
.fc-gallery-bar { display: flex; align-items: center; justify-content: center; gap: var(--space-4); margin-top: var(--space-2); }
.fc-gallery-bar[hidden] { display: none; }
.fc-gallery-arrow, .fc-gallery-close { min-width: 44px; min-height: 44px; border: 0; border-radius: 50%; background: transparent;
  color: inherit; font: 400 28px/1 var(--font-sans); cursor: pointer; }
.fc-gallery-arrow:disabled { opacity: .3; cursor: default; }
.fc-gallery-count { font: 600 13px/1 var(--font-sans); font-variant-numeric: tabular-nums; min-width: 4em; text-align: center; }
.fc-gallery-close { display: none; }

.fc-gallery.is-full { position: fixed; inset: 0; z-index: 1000; margin: 0; background: #000; color: #fff;
  display: flex; flex-direction: column; }
.fc-gallery.is-full .fc-gallery-track { flex: 1; border-radius: 0; }
.fc-gallery.is-full .fc-gallery-slide { display: flex; flex-direction: column; }
.fc-gallery.is-full .fc-gallery-stage { flex: 1; aspect-ratio: auto; max-height: none; min-height: 0; }
.fc-gallery.is-full .fc-gallery-stage img { cursor: zoom-out; }
.fc-gallery.is-full .fc-gallery-caption { margin: 0; padding: var(--space-2) var(--space-4); text-align: center; }
.fc-gallery.is-full .fc-gallery-bar { margin: 0; padding: var(--space-2) 0 max(var(--space-2), env(safe-area-inset-bottom)); }
.fc-gallery.is-full .fc-gallery-close { display: block; position: absolute; top: max(var(--space-2), env(safe-area-inset-top)); right: var(--space-2);
  background: rgba(0, 0, 0, .5); }
html.gallery-open { overflow: hidden; }

/* ============================================================
   4. Offer-claim page (the form itself: .form, dc.css)
   ============================================================ */
.claim-card { max-width: 380px; margin: 0 auto var(--space-7); }

/* "Check your email" after a logged-out claim or guest checkout
   (capitomo_signup_sent()): the address large enough to spot a typo. */
.signup-address { font: 700 22px/30px var(--font-sans); overflow-wrap: anywhere; margin: var(--space-2) 0 var(--space-3); }
.signup-status { font-weight: 600; }
/* Still checking (no data-state yet): gray, and three dots that light up one
   after another (capitomo_signup_dots()); still dots where motion is reduced.
   capitomo.js replaces the text, dots included, once there is an answer. */
.signup-status:not([data-state]) { color: var(--ink-muted); }
.signup-dots span { animation: signup-dot 1.4s infinite; opacity: .2; }
.signup-dots span:nth-child(2) { animation-delay: .2s; }
.signup-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes signup-dot { 0%, 60%, 100% { opacity: .2; } 30% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .signup-dots span { animation: none; opacity: 1; } }
.signup-status[data-state="delivered"] { color: var(--brand-blue-text); }
.signup-status[data-state="bounced"] { color: var(--accent-pink-text); }
.signup-fix { max-width: 40em; margin-bottom: var(--space-5); }
.signup-fix summary { cursor: pointer; font-weight: 600; color: var(--brand-blue-text); margin-bottom: var(--space-3); }
.signup-fix .form { margin-bottom: var(--space-4); }

/* ============================================================
   5. Member questions (questions.php)
   ============================================================ */
.qa-left { font-weight: 600; margin-bottom: var(--space-2); }
.qa-count { float: right; font-variant-numeric: tabular-nums; }
.qa-count.is-over { color: var(--accent-pink-text); font-weight: 600; }
.qa-mine-heading { margin: var(--space-7) 0 var(--space-3); }
.qa-mine { list-style: none; margin: 0; padding: 0; }
.qa-mine li { border-bottom: 1px solid var(--border); padding: var(--space-3) 0; display: grid; gap: var(--space-1); }
.qa-mine-question { font-weight: 600; }
.qa-link { margin-top: var(--space-4); font-weight: 600; }
/* the Q&A page's search (labelled 検索) and, on its own line, 「または」 and the button to ask a
   new question — apart, so the field does not look like the place to type a question */
.qa-tools { margin: var(--space-3) 0 var(--space-4); }
.qa-tools .feed-search { align-items: center; gap: var(--space-3); margin: 0; max-width: 24em; }
/* The field and the button both 32px tall; the field's text stays 16px (iOS zooms below that). */
.qa-tools .feed-search input[type="search"] { line-height: 20px; padding: 5px 10px; }
.qa-ask .btn { font-size: 14px; line-height: 18px; padding: 6px 12px; }
/* The category filter close above the questions (the first question's own padding adds the rest). */
.qa-browse .feed-filter { margin-bottom: var(--space-2); }
.qa-ask { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin: var(--space-3) 0 0; }
/* 「検索：」 and 「または」 read alike: quiet lead-ins to the field and the button */
.qa-tools .feed-search label, .qa-ask span { color: var(--ink-muted); white-space: nowrap; }
.qa-mine-watch { font-weight: 600; }
.qa-mine-answer summary { cursor: pointer; font-weight: 600; color: var(--brand-blue-text); }
.qa-mine-answer p { margin: var(--space-2) 0 0; }

/* Similar answered questions while typing (questions.php) */
.qa-suggest { margin: var(--space-2) 0 var(--space-3); padding: var(--space-3) var(--space-4);
  background: var(--surface-200); border-left: 3px solid var(--violet); border-radius: var(--radius-sm); }
.qa-suggest[hidden] { display: none; }
.qa-suggest-heading { margin: 0 0 var(--space-2); font-weight: 600; }
.qa-suggest-list { list-style: none; margin: 0; padding: 0; }
.qa-suggest-list li { padding: var(--space-2) 0; border-top: 1px solid var(--border); }
.qa-suggest-question { margin: 0; font-weight: 600; }
.qa-suggest-list a, .qa-suggest-list summary { font: 600 13px/20px var(--font-sans); }
.qa-suggest-list summary { cursor: pointer; color: var(--brand-blue-text); }
.qa-suggest-answer { margin: var(--space-1) 0 0; white-space: pre-line; }

/* Questions answered in a post (post.php) */
.qa-items { margin: var(--space-6) 0; max-width: 40em; }
.qa-items h2 { margin-bottom: var(--space-3); }
.qa-list { list-style: none; margin: 0; padding: 0; }
.qa-list li { border-top: 1px solid var(--border); padding: var(--space-4) 0; }
.qa-question { font: 700 17px/26px var(--font-sans); margin: 0; }
/* Answer buttons side by side; they wrap on narrow phones. */
.qa-buttons { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-2) 0 0; }
/* Compact, like the Q&A page's ask button (post pages and the Q&A page). */
.qa-buttons .btn { font-size: 14px; line-height: 18px; padding: 6px 12px; }
/* The answer playing (capitomo.js), so it stands out among the buttons. */
.qa-buttons .btn[aria-current="true"] { background: var(--fill-accent); color: var(--on-fill-accent); border-color: var(--fill-accent); }
.qa-answer p { margin: var(--space-2) 0 0; }

/* Song requests, round 1, under a request post's text (post.php) */
.song-requests { margin: var(--space-6) 0; max-width: 40em; }
.song-requests-heading { margin-bottom: var(--space-2); }
.song-deadline { font-weight: 600; margin-bottom: var(--space-1); }
.song-mine { list-style: none; margin: var(--space-4) 0 0; padding: 0; }
.song-mine li { border-top: 1px solid var(--border); padding: var(--space-3) 0; display: grid; gap: var(--space-1); }
.song-mine li:last-child { border-bottom: 1px solid var(--border); }
.song-mine-title { font-weight: 600; }
.song-mine-link { font: 400 13px/20px var(--font-sans); overflow-wrap: anywhere; }
.song-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; margin-top: var(--space-2); }
.song-actions form { margin: 0; }
.song-actions .btn { margin-top: 0; }
.song-new { margin-top: var(--space-4); }

/* Q&A page (qa.php): the chosen answer stays in view while the question list
   scrolls — on top in portrait (at most about half the screen; a long written
   answer scrolls inside it), on the left in landscape, and on the left in any
   window at least 1024px wide (a large, nearly square desktop window is
   portrait, yet has room for both). */
/* The page starts as high as the arcade and Polls pages. */
section.block.qa-page { padding-top: var(--space-5); }
.qa-catalog { display: grid; gap: var(--space-5); align-items: start; }
.qa-viewer { position: sticky; top: 0; z-index: 1; max-height: 55vh; overflow-y: auto;
  background: var(--surface-100); padding-bottom: var(--space-3); border-bottom: 1px solid var(--border); }
.qa-viewer .fc-player-actions { margin: var(--space-2) 0 var(--space-3); }
.qa-viewer .qa-question { margin-top: var(--space-3); }
.qa-index { list-style: none; margin: 0; padding: 0; }
.qa-index li { border-bottom: 1px solid var(--border); }
.qa-index a { display: block; padding: var(--space-3) var(--space-2); color: var(--ink); font-weight: 600; text-decoration: none; }
.qa-index a:hover { text-decoration: underline; }
/* The category tag sits on its own line above the question, in the feed's type style. */
.qa-index .post-type { display: block; }
/* The answer showing: an accent bar and accent text, not a fill — a fill reads as a button
   (Jonathan); two cues, so it never relies on color alone. The bar replaces left padding,
   so the text does not move. */
.qa-index a { border-left: 4px solid transparent; }
.qa-index a[aria-current="true"] { border-left-color: var(--accent-pink); color: var(--accent-pink-text); font-weight: 700; }
/* Dr. Capital's instruction (.qa-start, a .speaker) tops the question column, scrolling with
   it. Beside the answer it always shows. Where the answer sits above the list, it shows only
   while no answer is chosen (.is-unchosen, until a question is tapped; capitomo.js), with the
   answer area hidden and no question highlighted; then it goes. The :not() selector outweighs
   .speaker's own display. */
@media (orientation: portrait) and (max-width: 1023px), (max-width: 639px) {
  .qa-catalog:not(.is-unchosen) .qa-start { display: none; }
  .is-unchosen .qa-viewer { display: none; }
  .is-unchosen .qa-index a[aria-current="true"] { border-left-color: transparent; color: var(--ink); font-weight: 600; }
  /* The search row just under the answer's dividing line (not touching it). */
  .qa-catalog { row-gap: 0; }
  .qa-tools { margin-top: var(--space-2); }
  /* The answer buttons on one line: equal widths, text wrapping between words. */
  .qa-viewer .qa-buttons { flex-wrap: nowrap; }
  .qa-viewer .qa-buttons .btn { flex: 1 1 0; min-width: 0; padding-left: 8px; padding-right: 8px; text-align: center; }
}
@media (orientation: landscape) and (min-width: 640px), (min-width: 1024px) {
  /* 3 : 2, but the question column is never under 380px nor over half: a full-width desktop
     keeps 3 : 2, a phone sideways comes to about half and half, and windows in between slide. */
  .qa-catalog { grid-template-columns: minmax(0, 3fr) minmax(min(380px, 50%), 2fr); gap: var(--space-6); }
  .qa-viewer { top: var(--space-4); max-height: calc(100vh - 2 * var(--space-4)); border-bottom: 0; }
}
/* A short window side by side (a phone held sideways): the terms reminder moves above the
   video, and capitomo.js scrolls the answer column to the video's top, so the reminder sits
   just out of view and the room goes to the question and buttons. */
@media (orientation: landscape) and (min-width: 640px) and (max-height: 499px) {
  #qa-player { display: flex; flex-direction: column; }
  #qa-player .fc-player-note { order: -1; margin: 0 0 var(--space-2); }
}
.setting-label { font: 600 13px/16px var(--font-sans); margin-top: var(--space-3); }
.setting-value { display: flex; align-items: baseline; gap: var(--space-4); margin: 0; }
.setting-value span { font: 700 20px/28px var(--font-sans); }
.setting-value a { font: 600 13px/16px var(--font-sans); }
/* The name field and its own Save on one line. The field is sized for most
   names rather than a full 20 characters; the text scrolls inside it. */
.name-row { display: flex; gap: var(--space-2); align-items: stretch; }
.name-row input[type="text"] { flex: 0 1 14em; min-width: 0; }
.form .name-row .btn { margin-top: 0; white-space: nowrap; }
/* Settings: the card preview, the name (its own small form), then one form —
   pickers (radio buttons kept for keyboard and screen readers but drawn as the
   pictures themselves; the input comes right before its picture), then
   preferences. */
/* The card preview stays in view while the pickers below scroll under it (like the Q&A
   player); full size on phones too (Jonathan). */
.settings-card { position: sticky; top: 0; z-index: 2; max-width: 420px; margin: 0 0 var(--space-5);
  padding: var(--space-3) 0; background: var(--surface-100); }
.settings-form .pick-group { margin-top: var(--space-5); }
.pick-group { border: 0; margin: 0 0 var(--space-4); padding: 0; min-width: 0; }
.pick-group legend { padding: 0; margin-bottom: var(--space-2); }
.pick-group .field-help { margin: 0 0 var(--space-2); }
.pick-row { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.pick { position: relative; display: grid; justify-items: center; gap: var(--space-1); cursor: pointer; }
.pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pick img, .pick-initial { display: block; border: 2px solid var(--border); }
/* The designs stay on one row, shrinking on narrow screens. */
.pick-row--skins { display: grid; grid-template-columns: repeat(3, minmax(0, 80px)); }
.pick-skin img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: right center; border-radius: var(--radius-sm); }
.pick-avatar img, .pick-initial { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.pick-initial { display: grid; place-items: center; background: #8FC0DE; color: #1F3347; font: 800 22px/1 var(--font-sans); }
/* card colors: a round swatch in the color itself */
.pick-swatch { display: block; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--border); }
.pick input:checked + img, .pick input:checked + .pick-initial, .pick input:checked + .pick-swatch { border-color: var(--fill-primary); outline: 3px solid var(--fill-primary); outline-offset: 2px; }
.pick input:focus-visible + img, .pick input:focus-visible + .pick-initial, .pick input:focus-visible + .pick-swatch { outline: 3px solid var(--brand-blue-text); outline-offset: 2px; }
.pick-caption { font: 600 12px/16px var(--font-sans); color: var(--ink-muted); }
.pick.is-locked { cursor: default; }
.pick.is-locked img { opacity: .35; filter: grayscale(1); }

/* ============================================================
   6. Inbox (messages.php)
   ============================================================ */
.message-list { list-style: none; margin: 0; padding: 0; }
.message { border-bottom: 1px solid var(--border); padding: var(--space-5) 0; }
/* New on this visit: a tinted panel instead of the divider. */
.message.is-unread { background: var(--surface-200); border-bottom-color: transparent;
  border-radius: var(--radius-md); padding: var(--space-5) var(--space-4); }
.message-meta { display: flex; align-items: baseline; gap: var(--space-3); margin: 0 0 var(--space-1); }
.message-subject { font: 700 17px/24px var(--font-sans); margin: 0 0 var(--space-3); }
.message .post-body p:last-child { margin-bottom: 0; }

/* キャピ友取説 / CapiTomo Guide (help.php): headings and text in one column. */
.help h2 { margin: var(--space-7) 0 var(--space-3); }
.help h3 { margin: var(--space-5) 0 var(--space-2); }
/* Steps 4a and 4b: no list number; their own label hangs in the number column. */
.help-sub { list-style: none; position: relative; }
.help-sub-n { position: absolute; right: 100%; margin-right: .35em; }
/* The browser names under Computer. */
.help h4 { margin: var(--space-4) 0 var(--space-2); font-weight: 600; }
.help p, .help ol { max-width: 40em; }
/* The app page's in-app line: as much space above as below. */
.help [data-app-installed] { margin-top: var(--space-5); }
/* A button that looks like a link (the in-app line's "show the steps anyway"). */
.text-button { padding: 0; border: 0; background: none; font: inherit; color: var(--brand-blue-text);
  text-decoration: underline; cursor: pointer; }
.help ol { margin: 0; padding-left: 1.5em; display: grid; gap: var(--space-2); }
/* :not([hidden]): a display value would otherwise override the hidden attribute. */
/* The iPhone screenshots (capitomo_help_iphone_shots()): a blue frame all round, a jagged edge on the cut side just inside the frame, a
   shadow behind the picture (a light glow in dark mode, where a dark one
   would not show), pink boxes on what to tap, and a blue arrow between steps. */
/* The note above them is outside .help-shots, so it wraps like the page's other
   text. No max-width: 40em at its smaller font would stop short of the column. */
.help .help-shots-note { margin-top: var(--space-5); max-width: none; }
.help-shots { max-width: 400px; margin-top: var(--space-4); }
/* Smaller on wider screens; a phone's column is already under 400px. */
@media (min-width: 600px) { .help-shots { max-width: 340px; } }
.help-step { margin: 0; }
/* The 2% padding (of the column's width, so the same inset in every frame)
   keeps each picture's square corners clear of the frame's rounded ones. */
.help-shot { border: 3px solid var(--brand-blue); border-radius: 12px; overflow: hidden; padding: 2%; }
.help-shot--top { padding-top: calc(2% + 4px); }
.help-shot--bottom { padding-bottom: calc(2% + 4px); }
/* A whole menu, at the scale of the full-width pictures (742 of the screen's 1179 px). */
.help-shot--menu { width: 63%; margin: 0 auto; border-radius: 18px; padding-bottom: calc(2% + 4px); }
.help-shot-in { position: relative; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); }
[data-theme="dark"] .help-shot-in { filter: drop-shadow(0 0 3px rgba(255, 255, 255, .55)); }
.help-shot img { display: block; width: 100%; }
/* .help-shot in each selector: they must outweigh .help-shot img above. */
.help-shot .help-img-dark, [data-theme="dark"] .help-shot .help-img-light { display: none; }
[data-theme="dark"] .help-shot .help-img-dark { display: block; }
.help-shot--top img { clip-path: polygon(0 12px, 4% 0, 8% 12px, 12% 0, 16% 12px, 20% 0, 24% 12px, 28% 0, 32% 12px, 36% 0, 40% 12px, 44% 0, 48% 12px, 52% 0, 56% 12px, 60% 0, 64% 12px, 68% 0, 72% 12px, 76% 0, 80% 12px, 84% 0, 88% 12px, 92% 0, 96% 12px, 100% 0, 100% 100%, 0 100%); }
.help-shot--bottom img, .help-shot--menu img { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), 96% 100%, 92% calc(100% - 12px), 88% 100%, 84% calc(100% - 12px), 80% 100%, 76% calc(100% - 12px), 72% 100%, 68% calc(100% - 12px), 64% 100%, 60% calc(100% - 12px), 56% 100%, 52% calc(100% - 12px), 48% 100%, 44% calc(100% - 12px), 40% 100%, 36% calc(100% - 12px), 32% 100%, 28% calc(100% - 12px), 24% 100%, 20% calc(100% - 12px), 16% 100%, 12% calc(100% - 12px), 8% 100%, 4% calc(100% - 12px), 0 100%); }
.help-box { position: absolute; border: 4.5px solid var(--accent-pink); border-radius: 10px; }
/* Page text behind Safari's own controls, blurred so it does not read as part of the guide. */
.help-blur { position: absolute; -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
/* 6px each side: with the blank space inside the arrow's drawing, about 10px between it and each frame. */
.help-break { display: flex; justify-content: center; margin: 6px 0; color: var(--brand-blue); }
.help-break svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.help-install:not([hidden]) { display: grid; justify-items: start; gap: var(--space-3); margin-bottom: var(--space-4); }

/* ============================================================
   7. アンケート / Polls (polls.php): キャピ友の気分, then the song surveys
   ============================================================ */
/* Each section's heading: the dials, Round 1, Round 2. */
.poll-heading { text-decoration: underline 4px var(--brand-blue); text-underline-offset: 8px; text-decoration-skip-ink: none; }
.mood-page .poll-heading { margin-bottom: var(--space-3); }
/* Every dial colour shares one lightness and chroma (only the hue differs), so neither end
   of a dial reads as lighter or better; the hue comes from lib/mood.php. */
.mood-page { --mood-l: 0.66; --mood-c: 0.14; --mood-thumb: #FFFFFF; }
[data-theme="dark"] .mood-page { --mood-l: 0.74; --mood-c: 0.13; --mood-thumb: var(--ink); }
/* Sized to fit one screen, phone or desktop, with the button in view (Jonathan). */
section.block.mood-page { padding: var(--space-5) 0 var(--space-6); }
/* As wide as the song sections under it, so the page's left edges line up (Jonathan). */
.mood-page .wrap { max-width: 1000px; }
.mood-lead { margin-bottom: var(--space-3); font: 400 15px/24px var(--font-sans); color: var(--ink-muted); }
.mood-cols, .mood-row { display: grid; grid-template-columns: minmax(0, 1fr) 10em; gap: var(--space-4); align-items: center; }
.mood-cols { padding-bottom: var(--space-2); border-bottom: 1px solid var(--border); font: 700 13px/18px var(--font-sans); }
.mood-cols > :last-child { text-align: center; }
.mood-cols .mood-mine { font: 700 17px/24px var(--font-sans); }
.mood-lock-note { display: block; font: 400 11px/16px var(--font-sans); color: var(--ink-muted); }
.mood:not(.is-locked) .mood-lock-note { display: none; }
.mood-row { padding: var(--space-2) 0; border-bottom: 1px solid var(--border); }
.mood-me { display: grid; grid-template-columns: 28px 5.5em minmax(0, 1fr) 5.5em; grid-template-areas: "x a s b";
  gap: var(--space-2); align-items: center; }
.mood-end { font: 600 13px/16px var(--font-sans); }
.mood-a { grid-area: a; text-align: right; }
.mood-b { grid-area: b; }
.mood-me input[type="range"] { grid-area: s; }
.mood-clear { grid-area: x; width: 28px; height: 28px; padding: 0; border-radius: 50%; border: 1px solid var(--border);
  background: transparent; color: var(--ink-muted); font: 700 13px/1 var(--font-sans); cursor: pointer; }
.mood-clear:focus-visible { outline: 3px solid var(--brand-blue-text); outline-offset: 2px; }
.is-unset .mood-clear { visibility: hidden; }
.is-unset .mood-end { color: var(--ink-muted); }
/* the slider: the track shows the dial's colours (--track, set per dial); no answer = grey, no marker */
/* The whole track takes a press and a horizontal drag (capitomo.js); a vertical swipe still scrolls the page. */
.mood-me input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; margin: 0;
  background: transparent; cursor: pointer; touch-action: pan-y; }
.mood-me input[type="range"]:focus-visible { outline: 3px solid var(--brand-blue-text); outline-offset: 2px; border-radius: var(--radius-full); }
.mood-me input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: var(--radius-full); background: var(--track); }
.mood-me input[type="range"]::-moz-range-track { height: 8px; border-radius: var(--radius-full); background: var(--track); }
.mood-me input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -6px;
  border-radius: 50%; background: var(--mood-thumb); border: 2px solid var(--control-border); }
.mood-me input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%;
  background: var(--mood-thumb); border: 2px solid var(--control-border); }
.is-unset input[type="range"]::-webkit-slider-runnable-track { background: var(--border); }
.is-unset input[type="range"]::-moz-range-track { background: var(--border); }
.is-unset input[type="range"]::-webkit-slider-thumb { opacity: 0; }
.is-unset input[type="range"]::-moz-range-thumb { opacity: 0; }
/* the club's result: a circle in the blended colour and a label; grey and dashed until there is one */
.mood-them { display: flex; align-items: center; gap: var(--space-2); }
.mood-circle { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--surface-200);
  border: 1px dashed var(--control-border); }
.mood-circle.has-hue { background: oklch(var(--mood-l) var(--mood-c) var(--mood-h)); border-color: transparent; }
.mood.is-locked .mood-circle { background: var(--surface-200); border: 1px dashed var(--control-border); }
.mood.is-locked .mood-label { visibility: hidden; }
.mood-label { font: 700 12px/16px var(--font-sans); }
@media (prefers-reduced-motion: no-preference) { .mood-circle { transition: background-color .5s ease; } }
/* the button centred under the sliders' column, the confirmation under the results' */
.mood-actions { display: grid; grid-template-columns: minmax(0, 1fr) 10em; gap: var(--space-4); align-items: center;
  padding-top: var(--space-4); }
.mood-actions .btn { justify-self: center; }
/* nothing new to send: grey, so it is clear at a glance the average already includes these answers */
.mood-actions .btn:disabled { opacity: 1; background: var(--surface-200); color: var(--ink-muted); cursor: default; }
.mood-toast { font: 600 13px/20px var(--font-sans); color: var(--brand-blue-text); text-align: center; }
/* Phones: the two ends above the slider, the result beside it, circle over label. */
@media (max-width: 600px) {
  section.block.mood-page { padding: var(--space-4) 0 var(--space-5); }
  .mood-cols, .mood-row, .mood-actions { grid-template-columns: minmax(0, 1fr) 5.5em; gap: var(--space-3); }
  .mood-cols { font-size: 12px; line-height: 16px; }
  .mood-cols .mood-mine { font-size: 15px; line-height: 20px; }
  .mood-row { padding: 6px 0; }
  .mood-me { grid-template-columns: 28px 1fr 1fr; grid-template-areas: ". a b" "x s s"; row-gap: 0; }
  .mood-a { text-align: left; }
  .mood-b { text-align: right; }
  .mood-them { flex-direction: column; gap: 2px; text-align: center; }
  .mood-label { font-size: 11px; line-height: 14px; }
}

/* みんなで決めよう: Round 2 of song request surveys, below the dials. The
   player sits beside the list on wide screens and docks at the top on phones,
   staying in view as the list scrolls (Jonathan: small, so the list stays the
   main thing). Before anything plays it is only a one-line hint. */
section.block.song-vote, section.block.song-round1 { padding-top: var(--space-5); }
.song-vote { --song-pick-w: 80px; }
/* The player's column on wide screens; the past surveys leave the same room, so they line up with the song list. */
.song-vote, .song-past { --song-player-w: 320px; }
.song-vote .wrap, .song-round1 .wrap, .song-past .wrap { max-width: 1000px; }
/* The column is the screen's width whatever it holds (minmax(0, 1fr), min-width: 0): without
   that, a long line in the player widened the whole column on phones, list and text with it. */
.song-vote-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); align-items: start; }
.song-player, .song-surveys { min-width: 0; }
.song-player { position: sticky; top: 0; z-index: 2; background: var(--surface-100); padding: var(--space-2) 0; }
/* Nothing until a song plays (the hint is above the list instead). */
.song-player:not(.is-playing) { display: none; }
/* height: auto overrides the height YouTube's player API writes on the frame (390), so 16:9 applies. */
.song-player-frame iframe { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius-sm); }
.song-player-bar { display: flex; align-items: flex-start; gap: var(--space-3); margin-top: var(--space-1); font: 400 13px/20px var(--font-sans); }
.song-player-now { flex: 1 1 auto; min-width: 0; margin: 0; overflow-wrap: anywhere; }
.song-player-title { font-weight: 600; }
/* The circle is drawn in the ✕'s own color (currentColor); larger on phones, where it is tapped. */
.song-player-close { flex: none; width: 28px; height: 28px; padding: 0; border-radius: 50%; border: 1px solid currentColor;
  background: transparent; color: var(--ink); cursor: pointer; }
@media (max-width: 899px) {
  .song-player-close { width: 36px; height: 36px; font-size: 18px; }
}
@media (min-width: 900px) {
  .song-vote-grid { grid-template-columns: minmax(0, 1fr) var(--song-player-w); grid-template-areas: "list player"; gap: var(--space-6); }
  .song-past-inner { max-width: calc(100% - var(--song-player-w) - var(--space-6)); }
  .song-player { grid-area: player; top: var(--space-4); padding: 0; }
  .song-surveys { grid-area: list; }
}
.song-survey + .song-survey { margin-top: var(--space-7); padding-top: var(--space-5); border-top: 1px solid var(--border); }
.song-survey-title { margin-bottom: var(--space-1); color: var(--accent-pink-text); }
.song-instructions { margin: var(--space-1) 0 0; font: 400 17px/26px var(--font-sans); }
/* The count over the column of pick buttons; the hint to listen under it, centered over the
   songs (the right padding is the pick column: its button's width and the row's gap). */
.song-count { font-weight: 600; margin: var(--space-3) 0 0; text-align: right; }
.song-listen { margin: var(--space-1) 0 0; padding-right: calc(var(--song-pick-w) + var(--space-3)); text-align: center;
  font: 600 14px/20px var(--font-sans); color: var(--accent-pink-text); }
.song-vote-note { margin: var(--space-1) 0 0; min-height: 0; }
.song-vote-note:empty { display: none; }
.song-index-heading { margin: var(--space-5) 0 var(--space-1); font: 700 15px/20px var(--font-sans); color: var(--ink-muted); }
.song-index { list-style: none; margin: 0; padding: 0; }
.song-item { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) 0; border-bottom: 1px solid var(--border); }
.song-item.is-playing { background: var(--surface-200); }
/* "artist — title", one line that wraps; the song itself is the button that plays it. */
.song-text { flex: 1 1 auto; min-width: 0; display: grid; }
.song-play { display: block; width: 100%; padding: 0; border: 0; background: transparent; color: var(--ink);
  font: 400 15px/22px var(--font-sans); text-align: left; overflow-wrap: anywhere; cursor: pointer; }
.song-play strong { font-weight: 700; }
/* Underlined on hover only: the song playing is named under the player, and an underline there
   would read as a link asking to be tapped (Jonathan). */
.song-play:hover strong { text-decoration: underline; }
.song-item.is-picked .song-play { color: var(--brand-blue-text); }
.song-note { font: 400 12px/18px var(--font-sans); color: var(--ink-muted); }
.song-item form { flex: none; margin: 0; }
/* Picked: filled, with the pressed state for screen readers — never color alone. */
.song-pick { width: var(--song-pick-w); padding: 6px 8px; border-radius: var(--radius-full); border: 1px solid var(--control-border);
  background: transparent; color: var(--ink); font: 600 13px/18px var(--font-sans); cursor: pointer; }
.song-pick[aria-pressed="true"] { background: var(--fill-primary); color: var(--on-fill-primary); border-color: var(--fill-primary); }
.song-pick:disabled { opacity: .45; cursor: default; }
.song-play:focus-visible, .song-pick:focus-visible, .song-player-close:focus-visible { outline: 3px solid var(--brand-blue-text); outline-offset: 2px; }
/* Dr. Capital's thanks under the list, once the member has a pick in the survey. */
.song-thanks { margin-top: var(--space-5); }
.song-thanks img { width: 64px; height: 64px; }
.song-survey:not(.has-picks) .song-thanks { display: none; }

/* Past surveys: titles and dates only, no songs. */
/* A heavier rule above, as wide as the song list, so the closed surveys read apart from the open
   ones (Jonathan); it replaces the section's own full-width line. */
section.block.song-past { border-top: 0; padding-top: 0; }
.song-past-inner { border-top: 2px solid var(--ink-muted); padding-top: var(--space-5); }
.song-past-list { list-style: none; margin: 0; padding: 0; }
.song-past-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-1) var(--space-4);
  padding: var(--space-2) 0; border-bottom: 1px solid var(--border); }
.song-past-title { font-weight: 600; }

/* ============================================================
   8. ゲームセンター, the arcade (arcade.php; the notation board's own styles
      are /assets/dc-notation.css, the fretboard board's are here)
   ============================================================ */
section.block.arcade { padding: var(--space-5) 0 var(--space-6); }
.arcade .wrap { max-width: 760px; }
/* Dr. Capital's welcome above the cards (the shared .speaker styles), then
   the note on the guitar sounds. */
.arcade-welcome { margin-bottom: var(--space-4); }
.arcade-sound-note { margin: 0 0 var(--space-4); }
/* The list of games: a card per game, framed in the game's navy, its
   picture on top and its title and lead on navy below, so it reads as a
   button. Two across (a phone in landscape too), one on a phone upright.
   Only the picture has a fixed shape; the text takes the height it needs,
   so a long lead is never cut off. */
.arcade-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-5); }
.arcade-card { display: grid; overflow: hidden; text-decoration: none; background: var(--navy);
  border: 3px solid var(--navy); border-radius: var(--radius-md); transition: transform .15s, box-shadow .15s; }
.arcade-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, .18); }
.arcade-card:focus-visible { outline: 2px solid var(--brand-blue); outline-offset: 2px; }
.arcade-card-picture { display: grid; place-items: center; aspect-ratio: 16 / 9; max-width: none; margin: 0;
  padding: var(--space-4) var(--space-5); background: var(--surface-100); border-radius: calc(var(--radius-md) - 3px) calc(var(--radius-md) - 3px) 0 0; }
/* The pictures carry fixed width/height attributes; this sizes them from the head's
   stylesheet, so a first, uncached load does not lay the cards out at the drawing's
   width while dc-notation.css (linked after the cards) is still arriving. */
.arcade-card-picture svg { display: block; width: 100%; height: auto; }
.arcade-card-text { display: grid; gap: var(--space-1); padding: var(--space-3) var(--space-4) var(--space-4); color: #fff; }
.arcade-card-text .muted { color: #fff; opacity: .85; }
@media (max-width: 540px) {
  .arcade-cards { grid-template-columns: 1fr; }
}
.arcade-back { margin-bottom: var(--space-2); }
.arcade-game .wrap { max-width: 1000px; }
.arcade-game h1 { margin: 0 0 var(--space-3); }
/* arcade.js shows and hides its parts with the hidden attribute; .btn sets a
   display of its own, which would otherwise win over it. */
.arcade [hidden] { display: none; }
/* The stamps' gold, always on navy or under navy letters; not a design-system
   token. */
.arcade { --arcade-gold: #F2C14E; }
[data-theme="dark"] .arcade { --arcade-gold: #F5CB63; }

/* The game frame: a navy bezel around a 16:9 screen, a top bar like an old
   arcade game, then the board at the screen's full width. The layout inside
   follows the frame's own size (@container arcade), so the same rules serve
   the page and the app's turned frame (.is-overlay). The widths match the
   screen widths they stand for: the frame's inside is the screen less the
   page's gutters (2 × 24px) and the bezel. Height queries answer only where
   the frame's height is set (container-type: size): a phone sideways, full
   screen and the app's frame; 484px is a 500px-high screen less the bezel. */
.arcade-frame { box-sizing: border-box; width: 100%; aspect-ratio: 16 / 9; padding: 10px;
  background: var(--navy); border-radius: var(--radius-lg); container: arcade / inline-size; }
/* The screen's one column is capped at the frame's width, so a wide header or
   row can never stretch it (and the staff with it) past the edge. */
.arcade-screen { position: relative; height: 100%; display: grid; grid-template-rows: auto 1fr; grid-template-columns: minmax(0, 1fr);
  background: var(--surface-100); border-radius: var(--radius-md); overflow: hidden; }
.arcade-top { display: flex; align-items: center; gap: var(--space-5); padding: 6px var(--space-3) 6px 18px;
  background: var(--navy); color: #fff; font-variant-numeric: tabular-nums; }
/* When the top bar is short of room, the player's name gives way first
   (shortened with …); the other stats and the tools keep their size. */
.arcade-stat { display: grid; flex: none; min-width: 0; }
.arcade-stat-player { flex: 0 1 auto; }
.arcade-stat small { font: 600 11px/14px var(--font-sans); letter-spacing: .08em; opacity: .8; white-space: nowrap; }
.arcade-stat b { font: 800 18px/22px var(--font-sans); }
.arcade-stat-player b { display: flex; align-items: baseline; font-weight: 700; max-width: 14em; white-space: nowrap; }
.arcade-stat-player [data-arcade-stat] { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* The game's winning streak: a gold ★ after the name, never cut off with it. */
.arcade-streak-mark { flex: none; margin-left: 4px; color: var(--arcade-gold); font-size: .9em; }
/* The countdown shows only in a timed round. */
.arcade-stat-time { display: none; }
.arcade-frame.is-timed .arcade-stat-time { display: grid; }
.arcade-stat-time b { color: var(--sky); }
/* The level, which opens the level menu (not during a round). */
.arcade-level-button { display: flex; align-items: center; gap: var(--space-1); padding: 0; border: 0; background: none;
  color: inherit; font: inherit; cursor: pointer; }
/* The ▾ in pink draws the eye to the menu. On the navy bar: the system's
   dark-theme pink (5.6:1); the dark theme's lighter navy needs a lighter tint
   for 3:1 (3.4:1), not a token. */
.arcade-caret { width: 0; height: 0; margin-left: 2px; border-left: 6px solid transparent;
  border-right: 6px solid transparent; border-top: 8px solid #E890AA; }
[data-theme="dark"] .arcade-caret { border-top-color: #F5B8CB; }
.arcade-level-button:disabled { cursor: default; }
.arcade-level-button:disabled .arcade-caret { visibility: hidden; }
/* The top bar's tools: the timer, Show (the lines to display) and ?. */
.arcade-tools { display: flex; flex: none; gap: 6px; margin-left: auto; }
.arcade-icon { position: relative; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; cursor: pointer;
  border-radius: var(--radius-sm); background: rgba(255, 255, 255, .12); color: #fff; }
/* A larger, invisible tap area than the icon (Jonathan, 2026-11-09: a
   finger often missed them on a phone): 10px above and below, and half the
   gap between icons to each side, so neighbors never overlap. */
.arcade-icon::after { content: ""; position: absolute; inset: -10px -3px; }
.arcade-icon:hover { background: rgba(255, 255, 255, .22); }
.arcade-icon[aria-pressed="true"] { background: rgba(255, 255, 255, .32); }
.arcade-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.arcade-menu-wrap { position: relative; }
.arcade-menu { position: absolute; z-index: 3; top: calc(100% + 6px); right: 0; display: grid; min-width: 10em; padding: 4px;
  background: var(--surface-100); border: 1px solid var(--control-border); border-radius: var(--radius-sm);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .2); }
.arcade-menu button { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) 10px; border: 0;
  border-radius: 6px; background: none; color: var(--ink); font: 600 14px/20px var(--font-sans); text-align: left;
  cursor: pointer; white-space: nowrap; }
.arcade-menu button::before { content: ""; width: 1em; }
.arcade-menu button[aria-checked="true"]::before { content: "✓"; color: var(--brand-blue-text); }
.arcade-menu button:hover { background: var(--surface-200); }
.arcade-menu button small { margin-left: auto; padding-left: var(--space-4); font: 400 12px/20px var(--font-sans); color: var(--ink-muted); }
.arcade-menu button:disabled { opacity: .4; cursor: default; }
.arcade-menu button:disabled:hover { background: none; }
.arcade-menu-left { left: 0; right: auto; }

.arcade-main { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); min-height: 0; }

/* The board fills the stage as far as its shape allows: as wide as the stage,
   or as tall, whichever comes first (arcade.js sets --nb-ratio from the
   drawing). */
.arcade-stage { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; min-height: 0; padding: var(--space-2) var(--space-3); }
.arcade-fit { container-type: size; display: grid; place-items: center; min-height: 0; }
.arcade-fit .nb { max-width: none; margin: 0; width: min(100cqw, calc(100cqh * var(--nb-ratio, 2))); }

.arcade-icon:disabled { opacity: .35; cursor: default; }

/* The row above the staff (arcade.js places it halfway down the white space
   over the drawing): Dr. Capital's line and Start before a round, Quit at the
   right during one. Start in Practice, and Quit after the second answer, turn
   invisible rather than going, so nothing on the screen moves. */
.arcade-row { position: absolute; z-index: 1; left: 0; right: 0; display: flex; align-items: center; justify-content: center;
  gap: var(--space-3); padding: 0 var(--space-3); transform: translateY(-50%); pointer-events: none; }
.arcade-row .btn { padding: var(--space-2) var(--space-5); white-space: nowrap; pointer-events: auto; }
.arcade-row .is-invisible { visibility: hidden; }
.arcade-frame.is-playing .arcade-start { display: none; }
.arcade-quit { display: none; position: absolute; right: var(--space-3); }
.arcade-frame.is-playing .arcade-quit { display: block; }

/* Dr. Capital speaking (CAPITOMO_HOST_PICTURE and a bubble), shared with the
   member home's greeting, the Q&A page's instruction and the Polls page's
   thanks: the welcome on the list of games, before Start in the row above
   the staff, and after a round over the faded board. */
.speaker { display: flex; align-items: center; gap: 14px; }
.speaker img { flex: none; width: 84px; height: 84px; border-radius: 50%; }
.speaker-bubble { position: relative; margin: 0; padding: 10px 14px; white-space: pre-line; background: var(--surface-200);
  border: 1px solid var(--border); border-radius: var(--radius-md); font: 700 17px/24px var(--font-sans); }
/* On the pages themselves (home, Q&A, the list of games) the face is as tall as a two-line
   bubble: two 24px lines, 10px padding top and bottom, and the border. */
.home-greet .speaker img, .qa-start img, .arcade-welcome img { width: 70px; height: 70px; }
.speaker-bubble::before { content: ""; position: absolute; left: -8px; top: 50%; width: 14px; height: 14px; margin-top: -7px;
  background: var(--surface-200); border-left: 1px solid var(--border); border-bottom: 1px solid var(--border); transform: rotate(45deg); }
.arcade-hint { flex: 0 1 auto; min-width: 0; gap: var(--space-3); }
.arcade-hint .speaker-bubble { min-width: 0; }
.arcade-row .btn { flex: none; }
.arcade-hint img { width: 48px; height: 48px; }
.arcade-hint .speaker-bubble { font-size: 15px; line-height: 22px; padding: 6px 12px; }

/* The faded board: after a round (Dr. Capital's message), during
   establish-key (the designation), when Quit's row comes above it, and
   before free play (.arcade-intro, which shares the result's classes). */
.arcade-result, .arcade-establish { position: absolute; z-index: 2; inset: 0; display: grid; place-items: center;
  background: color-mix(in srgb, var(--surface-100) 88%, transparent); }
.arcade-designation { margin: 0; padding: 0 var(--space-4); font: 800 32px/40px var(--font-sans); text-align: center; }
.arcade-frame.is-establishing .arcade-row { z-index: 3; }
.arcade-close { position: absolute; top: var(--space-2); right: var(--space-2); display: grid; place-items: center;
  width: 36px; height: 36px; padding: 0; border: 0; border-radius: var(--radius-sm); background: var(--surface-200);
  color: var(--ink); cursor: pointer; }
.arcade-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
/* The ? panel, over the board and the side column. */
.arcade-help { position: absolute; z-index: 2; inset: 0; overflow: auto; padding: var(--space-4) var(--space-6) var(--space-4) var(--space-5);
  background: var(--surface-100); }
.arcade-help h2 { margin: 0 0 6px; font: 700 17px/24px var(--font-sans); }
/* The panel's first line, so it stays clear of the close button. */
.arcade-help .arcade-sound-note { margin: 0 0 14px; padding-right: var(--space-4); font: 400 15px/22px var(--font-sans); }
.arcade-help ul { margin: 0 0 14px; padding-left: 1.2em; font: 400 15px/22px var(--font-sans); }
.arcade-help li { margin-bottom: 2px; }
.arcade-help li svg { width: 1.15em; height: 1.15em; vertical-align: -0.2em; fill: none; stroke: currentColor;
  stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.arcade-result-card { display: grid; justify-items: center; gap: var(--space-3); padding: var(--space-4); }
.arcade-score { margin: 0; font: 800 40px/44px var(--font-sans); font-variant-numeric: tabular-nums; }
.arcade-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2); }

/* The score boards, over the board like the ? panel. One row: ‹ the level ›,
   the two boards' buttons (the shown one filled blue, the other an empty
   outline), game master, the play count, ×. Under it the shown board, rows
   1–5 on the left and 6–10 on the right, each half only as wide as its rows
   so a row reads as one line. Sideways swipes are the page's (arcade.js). */
.arcade-scores { position: absolute; z-index: 2; inset: 0; display: grid; grid-template-rows: auto 1fr; gap: var(--space-2);
  padding: var(--space-2) var(--space-3) var(--space-3); background: var(--surface-100); touch-action: pan-y; }
.arcade-scores-nav { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
.arcade-scores-nav .arcade-close { position: static; flex: none; margin-left: var(--space-2); }
.arcade-scores-step { display: grid; place-items: center; flex: none; width: 34px; height: 34px; padding: 0; border: 1px solid var(--control-border);
  border-radius: var(--radius-full); background: var(--surface-100); color: var(--ink); cursor: pointer; }
.arcade-scores-step svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.arcade-scores-step:disabled { opacity: .3; cursor: default; }
.arcade-scores-level { min-width: 5.5em; font: 800 18px/24px var(--font-sans); color: var(--ink); text-align: center; white-space: nowrap; }
.arcade-scores-pick { display: flex; gap: var(--space-2); margin-left: var(--space-4); }
.arcade-scores-pick button { display: inline-flex; align-items: center; gap: var(--space-2); height: 34px; padding: 0 14px;
  border: 1.5px solid var(--fill-primary); border-radius: var(--radius-full); background: none; color: var(--brand-blue-text);
  font: 700 14px/1 var(--font-sans); white-space: nowrap; cursor: pointer; }
.arcade-scores-pick button[aria-pressed="true"] { background: var(--fill-primary); color: var(--on-fill-primary); }
/* Recent 10 / Best 10; Recent / Best on a phone upright (English only; the
   Japanese names are the same in both). */
.arcade-name-short { display: none; }
.arcade-scores-plays { margin-left: auto; font: 600 13px/18px var(--font-sans); color: var(--ink-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.arcade-scores-plays b { color: var(--ink); font-weight: 800; }
/* A level's stamp, in its board's button: gold with navy letters, which read
   on the blue fill and on the outline alike. */
.arcade-stamp { display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 7px; border: 1.5px solid #B8862B;
  border-radius: var(--radius-full); transform: rotate(-6deg); background: var(--arcade-gold); color: #1F3347;
  font: 800 11px/1 var(--font-sans); letter-spacing: .06em; }
.arcade-stamp svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
/* Game master: a pink badge with its crown; the crown alone on a phone upright. */
.arcade-gamemaster { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: var(--radius-full);
  background: var(--fill-accent); color: var(--on-fill-accent); font: 800 11px/14px var(--font-sans); letter-spacing: .06em; white-space: nowrap; }
.arcade-gamemaster svg { display: block; width: 14px; height: 14px; fill: currentColor; }
/* The score leads (large, in the frame's navy; the highlight blue in dark
   mode); the date and time are reference. */
.arcade-halves { display: grid; grid-template-columns: repeat(2, max-content); justify-content: center; align-content: center;
  column-gap: var(--space-7); min-height: 0; }
.arcade-halves table { border-collapse: collapse; font: 400 16px/1 var(--font-sans); color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.arcade-halves td { height: 60px; padding: 0 8px; border-top: 1px solid var(--border); white-space: nowrap; }
.arcade-halves tr:first-child td { border-top: 0; }
.arcade-halves td.n { min-width: 1.4em; padding-right: 6px; text-align: right; }
.arcade-halves td.d { color: var(--ink); }
.arcade-halves .time { margin-left: 6px; color: var(--ink-muted); }
.arcade-halves td.w { min-width: 4em; padding-left: 16px; }
.arcade-halves td.s { padding-left: 20px; text-align: right; color: var(--navy); font: 800 30px/1 var(--font-sans); }
[data-theme="dark"] .arcade-halves td.s { color: var(--brand-blue); }
.arcade-halves td.s small { font: 700 16px/1 var(--font-sans); }
.arcade-halves tr.is-empty td.s { font-weight: 400; color: var(--ink-muted); }
.arcade-halves tr.is-new td { background: color-mix(in srgb, var(--sky) 26%, transparent); }
/* A timed round: the stopwatch, then its seconds, outlined; untimed shows nothing. */
.arcade-timer-badge { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px 2px 5px; border: 1.5px solid var(--navy);
  border-radius: var(--radius-full); color: var(--navy); font: 700 12px/14px var(--font-sans); }
[data-theme="dark"] .arcade-timer-badge { border-color: var(--ink); color: var(--ink); }
.arcade-timer-badge svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
/* A phone upright: one compact row without the play count, stamps and game
   master as icons only, no time of day. */
@container arcade (max-width: 439px) {
  .arcade-scores { padding: var(--space-2) 6px; }
  .arcade-scores-nav { gap: 2px; }
  .arcade-scores-plays, .arcade-stamp-text, .arcade-gamemaster span { display: none; }
  .arcade-name-long { display: none; }
  .arcade-name-short { display: inline; }
  .arcade-scores-level { min-width: 0; padding: 0 2px; font-size: 13px; }
  .arcade-scores-step { width: 24px; height: 24px; }
  .arcade-scores-step svg { width: 14px; height: 14px; }
  .arcade-scores-pick { gap: 4px; margin-left: 6px; }
  .arcade-scores-pick button { gap: 4px; height: 28px; padding: 0 9px; font-size: 12px; }
  .arcade-scores-nav .arcade-close { width: 28px; height: 28px; margin-left: auto; }
  .arcade-gamemaster { margin-left: 4px; padding: 0; background: none; color: var(--accent-pink-text); }
  .arcade-gamemaster svg { width: 20px; height: 20px; }
  .arcade-stamp { gap: 0; height: 17px; padding: 0 4px; }
  .arcade-stamp svg { width: 10px; height: 10px; }
  .arcade-halves { column-gap: var(--space-4); }
  .arcade-halves table { font-size: 12px; }
  .arcade-halves td { height: 38px; padding: 0 2px; }
  .arcade-halves .time { display: none; }
  .arcade-halves td.w { min-width: 2.8em; padding-left: 5px; }
  .arcade-halves td.s { padding-left: 6px; font-size: 19px; }
  .arcade-halves td.s small { font-size: 11px; }
  .arcade-timer-badge { gap: 2px; padding: 1px 5px 1px 3px; border-width: 1px; font-size: 10px; }
  .arcade-timer-badge svg { width: 11px; height: 11px; }
}
/* A phone sideways: the same row, a size smaller. */
@container arcade (max-height: 484px) {
  .arcade-scores { gap: 4px; padding: 6px var(--space-2) var(--space-2); }
  .arcade-scores-step { width: 28px; height: 28px; }
  .arcade-scores-level { min-width: 4.6em; font-size: 15px; }
  .arcade-scores-pick { margin-left: var(--space-2); }
  .arcade-scores-pick button { height: 28px; padding: 0 10px; font-size: 13px; }
  .arcade-scores-nav .arcade-close { width: 30px; height: 30px; }
  .arcade-stamp { height: 18px; font-size: 9px; }
  .arcade-halves { column-gap: var(--space-6); }
  .arcade-halves table { font-size: 13px; }
  .arcade-halves td { height: 40px; }
  .arcade-halves td.s { font-size: 22px; }
  .arcade-halves td.s small { font-size: 13px; }
}

/* The fretboard board (learn/js/fretboard-board.js) and a fretboard game's
   card still (.fb-still, the colors only). The renderer bakes its light palette into the drawing; these
   rules give every part the theme's colors instead. A fretted dot shows only
   while lit; an open string's dot is a gray hollow circle until lit, or an ×
   while a chord leaves it out. */
.fb-board, .fb-still { --fb-lit: #2E7D32; --fb-open: #9AA3AD; }
[data-theme="dark"] .fb-board, [data-theme="dark"] .fb-still { --fb-lit: #43A047; --fb-open: #6B7580; }
.fb-board svg, .fb-still svg { display: block; width: 100%; height: auto; }
.fb-board svg { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: none; }
.fb-board svg > line, .fb-still svg > line { stroke: var(--ink); }
.fb-board svg > text, .fb-still svg > text { fill: var(--ink); }
.fb-board .fretboard-note:not([data-fret="0"]):not(.is-lit) { visibility: hidden; }
.fb-board .fretboard-note circle { fill: none; stroke: var(--fb-open); }
.fb-board .fretboard-note text { visibility: hidden; fill: #fff; }
.fb-board .fretboard-note.is-lit circle { fill: var(--fb-lit); stroke: var(--fb-lit); }
.fb-board .fretboard-note.is-lit text { visibility: visible; }
.fb-board.fb-no-pitch .fretboard-note text { visibility: hidden; }
.fb-board .fretboard-note.is-muted { visibility: hidden; }
.fb-board.fb-no-open .fretboard-note[data-fret="0"]:not(.is-lit) { visibility: hidden; }
.fb-board .fb-mute { visibility: hidden; fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; }
.fb-board .fb-mute.is-shown { visibility: visible; }
.fb-board .fb-zones rect { fill: transparent; cursor: pointer; }
/* The still shows a chord: every dot it draws is lit. */
.fb-still .fretboard-note circle { fill: var(--fb-lit); stroke: var(--fb-lit); }
.fb-still .fretboard-note text { fill: #fff; }

/* "Play Dr. Capital's guitar": an empty band at the top, which the board's
   layout is tuned against (Jonathan, 2026-11-09); the board's top 22px run
   under it, into the blank space above the top string (arcade-guitar.js
   gives that space to the strings). Under it the fretboard, as large as
   fits, with the chord buttons in columns on its right, centered on it: the
   grid fills each column top to bottom, as the registry lists them
   (--chord-rows, set by the page). The game opens under Dr. Capital's
   instruction and Start on the faded board (.arcade-intro). */
.arcade-stage.arcade-guitar { grid-template-rows: auto minmax(0, 1fr); padding-top: 0; }
.arcade-guitar .arcade-row { position: relative; transform: none; min-height: 60px; margin-bottom: -22px; }
.arcade-guitar-fit { container-type: size; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
  gap: var(--space-4); min-height: 0; }
.arcade-guitar-board { justify-self: center; width: min(100%, calc(100cqh * var(--fb-ratio, 1.8))); }
/* The buttons grow with the board (cqh: the board's area, .arcade-guitar-fit),
   so full screen enlarges them in proportion; in the page's frame (about
   450px of board) they are 44px high, 72px wide, 18px text, their smallest. */
.arcade-chords { display: grid; grid-auto-flow: column; grid-template-rows: repeat(var(--chord-rows), max(44px, 9.8cqh));
  align-content: center; gap: max(6px, 1.3cqh); max-height: 100cqh; margin-right: var(--space-5); }
.arcade-chord { min-width: max(72px, 16cqh); padding: 0 var(--space-3); border: 1.5px solid var(--fill-primary);
  border-radius: var(--radius-sm); background: var(--surface-100); color: var(--brand-blue-text); font: 800 max(18px, 4cqh)/1 var(--font-sans);
  cursor: pointer; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: none; }
.arcade-chord.is-held { background: var(--fill-primary); color: var(--on-fill-primary); }
/* Light mode: the frame's navy (Jonathan, 2026-11-09), as firm as the board's
   lines; the blue text color read too light beside them. */
:root:not([data-theme="dark"]) .arcade-chord { border-color: var(--navy); color: var(--navy); }
:root:not([data-theme="dark"]) .arcade-chord.is-held { background: var(--navy); color: #fff; }
.arcade-chord:focus-visible { outline: 2px solid var(--brand-blue); outline-offset: 2px; }
@container arcade (max-height: 484px) {
  .arcade-guitar .arcade-row { min-height: 44px; }
  .arcade-chords { grid-template-rows: repeat(var(--chord-rows), minmax(30px, 44px)); gap: 6px; }
  .arcade-chord { min-width: 58px; font-size: 15px; }
}

/* A narrow screen (a phone upright, a narrow window): the frame as tall as
   it needs, the row of Dr. Capital and Start given its own space above the
   staff, which takes the full width. */
@media (max-width: 699px) {
  .arcade-frame { aspect-ratio: auto; padding: 6px; }
}
@container arcade (max-width: 639px) {
  .arcade-top { gap: var(--space-4); padding-left: var(--space-3); }
  .arcade-stage { padding-top: 64px; }
  .arcade-fit { container-type: normal; }
  .arcade-fit .nb { width: 100%; }
  /* The chord buttons go under the fretboard, in rows: each column of the
     wide layout becomes a row, read right to left (C Dm … Am; Jonathan,
     2026-11-10), so rtl fills the grid and each button keeps ltr. No height
     to scale with here (cqh would follow the screen): fixed sizes. */
  .arcade-guitar-fit { container-type: normal; grid-template-columns: minmax(0, 1fr); }
  .arcade-guitar-board { width: 100%; }
  .arcade-chords { direction: rtl; grid-auto-flow: row; grid-template-rows: none; grid-template-columns: repeat(var(--chord-rows), minmax(0, 1fr));
    grid-auto-rows: 44px; gap: 6px; max-height: none; margin-right: 0; }
  .arcade-chord { direction: ltr; min-width: 0; padding: 0; font-size: 16px; }
  .speaker img { width: 64px; height: 64px; }
  .arcade-hint img { width: 36px; height: 36px; }
  .arcade-hint .speaker-bubble { font-size: 13px; line-height: 18px; }
  .arcade-score { font-size: 32px; line-height: 36px; }
}
/* A phone upright: a more compact top bar (without the player's name, and
   with it the streak's ★) and row, so all of it fits. */
@container arcade (max-width: 439px) {
  .arcade-stat-player { display: none; }
  .arcade-top { gap: 10px; padding: 4px 6px 4px 10px; }
  .arcade-stat small { font-size: 10px; letter-spacing: .02em; }
  .arcade-stat b { font-size: 15px; line-height: 20px; }
  .arcade-tools { gap: 4px; }
  .arcade-icon { width: 30px; height: 30px; }
  .arcade-icon::after { inset: -10px -2px; }
  .arcade-icon svg { width: 18px; height: 18px; }
  .arcade-row { gap: var(--space-2); padding: 0 var(--space-2); }
  .arcade-row .btn { padding: 6px var(--space-3); font-size: 14px; }
  .arcade-hint { gap: var(--space-2); }
  .arcade-hint .speaker-bubble { padding: 4px 8px; }
}

/* Full screen (where the browser offers it: computers, iPad, Android; not
   iPhone): the frame alone fills the display. The
   button shows the icon for what it will do. Two rules, because a browser
   drops a whole selector list it does not fully understand. */
.arcade-frame:fullscreen { width: 100%; height: 100%; aspect-ratio: auto; padding: 0; border-radius: 0; container-type: size; }
.arcade-frame:-webkit-full-screen { width: 100%; height: 100%; aspect-ratio: auto; padding: 0; border-radius: 0; container-type: size; }
.arcade-frame.is-fullscreen .arcade-screen { border-radius: 0; }
.arcade-when-full, .arcade-frame.is-fullscreen .arcade-when-windowed { display: none; }
.arcade-frame.is-fullscreen .arcade-when-full { display: contents; }

/* A short screen (a phone sideways): the frame no taller than the screen with
   the browser's bars showing (svh), so the whole game is always in view and
   does not resize when the bars shrink or return (LMS §18 item 80); the
   staff fits inside, and the top bar is more compact. Comes after the
   narrow-screen rules so it wins on a small phone sideways. */
@media (max-height: 500px) {
  .arcade-frame { aspect-ratio: auto; height: calc(100vh - 8px); height: calc(100svh - 8px); padding: 4px; container-type: size; }
}
@container arcade (max-height: 484px) {
  .arcade-top { gap: var(--space-4); padding: 4px var(--space-2) 4px var(--space-3); }
  .arcade-stat b { font-size: 16px; line-height: 20px; }
  .arcade-icon { width: 32px; height: 32px; }
  .arcade-stage { padding-top: var(--space-2); }
  .arcade-fit { container-type: size; }
  .arcade-fit .nb { width: min(100cqw, calc(100cqh * var(--nb-ratio, 2))); }
  .arcade-hint img { width: 36px; height: 36px; }
  .arcade-hint .speaker-bubble { font-size: 13px; line-height: 18px; padding: 4px 10px; }
  .arcade-row .btn { padding: 6px var(--space-4); font-size: 14px; }
}

/* The Home Screen app on a phone (arcade.js adds is-overlay; LMS §18 item
   80): the frame covers the whole screen in landscape, whichever way the
   phone is held. While the screen is upright it is turned a quarter, its top
   toward the screen's right; is-flipped turns it half a turn more, for a
   player lying on the other side. Nothing behind it scrolls
   (html.arcade-covered), and the score boards' swipe is all arcade.js's. */
.arcade-frame.is-overlay { position: fixed; z-index: 100; top: 0; left: 0; width: 100vw; height: 100vh;
  aspect-ratio: auto; padding: 0; border-radius: 0; container-type: size; }
.arcade-frame.is-overlay.is-flipped { transform: rotate(180deg); }
@media (orientation: portrait) {
  .arcade-frame.is-overlay { width: 100vh; height: 100vw; transform-origin: 0 0; transform: translateX(100vw) rotate(90deg); }
  .arcade-frame.is-overlay.is-flipped { transform: translateY(100vh) rotate(-90deg); }
  /* Turned, the top bar's right end lands in a rounded corner of the screen;
     the extra room keeps the last icon clear of it. Sideways, iOS keeps the
     page clear of the corners itself. */
  .arcade-frame.is-overlay .arcade-top { padding-right: 28px; }
}
.arcade-frame.is-overlay .arcade-scores { touch-action: none; }
html.arcade-covered, html.arcade-covered body { overflow: hidden; }
