/* ヘックス陣 — 大理石と真鍮のボードゲーム */
:root {
  --felt: #0f3b2e;
  --felt-d: #0a2a21;
  --felt-l: #17503e;
  --brass: #d4ad55;
  --brass-d: #8a6522;
  --brass-l: #f1d68f;
  --marble: #f5f1e8;
  --marble-2: #e9e2d2;
  --ink: #1c2420;
  --ink-2: #4a524c;
  --cream: #f2ecdc;
  --mist: #c3d5c9;
  --jade: #1f6b4f;
  --red: #9b2a20;
  --f-mincho: "Shippori Mincho B1", "Hiragino Mincho ProN", serif;
  --f-body: "Zen Kaku Gothic New", "Hiragino Sans", sans-serif;
  --f-num: "Bodoni Moda", "Shippori Mincho B1", serif;
  --f-it: "Cormorant Garamond", "Shippori Mincho B1", serif;
  --r-s: 10px;
  --r-m: 16px;
  --r-l: 22px;
  --sh-card: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 10px 24px rgba(0, 0, 0, .28);
  --brass-grad: linear-gradient(160deg, #f6e2a4 0%, #e0bd68 38%, #c99c40 70%, #e8c97c 100%);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --t-fast: 100ms;
  --t-mid: 280ms;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--felt-d);
  color: var(--cream);
  font-family: var(--f-body);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.65;
  line-break: strict;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; }
svg { width: 24px; height: 24px; flex: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
.num { font-family: var(--f-num); font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
:focus-visible { outline: 2px solid var(--brass-l); outline-offset: 2px; }
.app { position: fixed; inset: 0; overflow: hidden; background: var(--felt); }
@media (min-width: 600px) {
  body { background: radial-gradient(ellipse at 50% 40%, #134535, #061a14 70%); }
  .app { left: 50%; right: auto; width: 430px; transform: translateX(-50%); box-shadow: 0 0 0 1px #8a6522, 0 30px 80px rgba(0, 0, 0, .55); }
}

/* ---------- 共通 ---------- */
.screen { position: absolute; inset: 0; display: none; flex-direction: column; overflow: hidden; }
.screen.is-active { display: flex; }
/* JS が読めなかったときもタイトルは見せる */
html:not([data-ready]) .screen--title { display: flex; }
.screen.is-enter { animation: enter var(--t-mid) var(--ease); }
@keyframes enter { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
.screen--title.is-enter { animation-name: fade; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
  color: var(--cream);
  background: var(--felt-d);
  box-shadow: inset 0 0 0 1px rgba(212, 173, 85, .55);
  transition: transform var(--t-fast) var(--ease);
}
.icon-btn:active { transform: scale(.9); }
.icon-btn--spacer { visibility: hidden; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 20px;
  border-radius: var(--r-s);
  font-weight: 700; font-size: 16px; letter-spacing: .06em;
  word-break: keep-all;
  transition: transform var(--t-fast) var(--ease), filter var(--t-fast);
}
.btn:active { transform: scale(.97); }
.btn--l { width: 100%; min-height: 54px; font-size: 17px; }
.btn--xl { width: 100%; min-height: 62px; font-size: 19px; }
.btn--brass {
  background: var(--brass-grad);
  color: #261b04;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 -2px 0 rgba(90, 60, 10, .35), 0 8px 20px rgba(0, 0, 0, .35);
  font-family: var(--f-mincho); font-weight: 800;
}
.btn--brass:active { filter: brightness(1.08); }
.btn--marble { background: var(--marble); color: var(--ink); box-shadow: var(--sh-card); }
.btn--danger { background: #f3dcd6; color: #7a1f16; box-shadow: inset 0 0 0 1px #d9a79c; }
.btn--text { min-height: 44px; padding: 0 12px; font-weight: 700; color: var(--ink-2); }
.bar {
  flex: none; display: flex; align-items: center; gap: 10px;
  padding: calc(8px + var(--safe-t)) 14px 10px;
  background: var(--felt-d);
  border-bottom: 1px solid rgba(212, 173, 85, .4);
  position: relative; z-index: 3;
}
.bar--clear { position: absolute; left: 0; right: 0; top: 0; background: transparent; border-bottom: 0; }
.bar__title { flex: 1; display: flex; flex-direction: column; align-items: center; line-height: 1.25; font-family: var(--f-mincho); font-weight: 800; font-size: 18px; }
.bar__en { font-family: var(--f-it); font-style: italic; font-weight: 600; font-size: 14px; color: var(--brass-l); letter-spacing: .06em; }
.sec-h { display: flex; align-items: baseline; gap: 10px; margin: 26px 2px 12px; font-family: var(--f-mincho); font-weight: 800; font-size: 18px; font-feature-settings: "palt"; }
.sec-h__en { font-family: var(--f-it); font-style: italic; font-weight: 600; font-size: 15px; color: var(--brass-l); }

/* ---------- タイトル ---------- */
.screen--title {
  background:
    linear-gradient(180deg, rgba(10, 42, 33, .25) 0%, rgba(10, 42, 33, 0) 40%, rgba(10, 42, 33, 0) 58%, rgba(10, 42, 33, .92) 80%, #0a2a21 100%),
    url("/app-development/apps/a014/img/title.webp") center 60% / cover no-repeat,
    var(--felt-d);
}
.title__top { display: flex; justify-content: flex-end; padding: calc(10px + var(--safe-t)) 14px 0; }
.icon-btn--glass { background: rgba(10, 42, 33, .9); }
.title__logo { text-align: center; padding: 3vh 20px 0; }
.title__en { font-family: var(--f-it); font-style: italic; font-weight: 600; font-size: 18px; color: var(--brass-l); letter-spacing: .08em; }
.logo {
  margin-top: 4px;
  font-family: var(--f-mincho); font-weight: 800;
  font-size: 58px; line-height: 1.1; letter-spacing: .08em;
  color: var(--brass-l);
  text-shadow: 0 1px 0 #fff4cc, 0 2px 0 #8a6522, 0 10px 30px rgba(0, 0, 0, .6);
  font-feature-settings: "palt";
}
.title__rule { margin-top: 12px; display: flex; align-items: center; justify-content: center; gap: 12px; font-family: var(--f-mincho); font-weight: 700; font-size: 16px; color: var(--cream); word-break: keep-all; }
.title__rule-l { width: 28px; height: 1px; background: var(--brass); }
.title__menu { margin-top: auto; padding: 0 22px calc(16px + var(--safe-b)); display: flex; flex-direction: column; gap: 12px; }
.title__nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tnav {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 64px; border-radius: var(--r-m);
  background: var(--felt-d);
  box-shadow: inset 0 0 0 1px rgba(212, 173, 85, .5);
  font-weight: 700; font-size: 14px; color: var(--cream);
  transition: transform var(--t-fast) var(--ease), background var(--t-fast);
}
.tnav svg { color: var(--brass-l); }
.tnav:active { transform: scale(.95); background: var(--felt-l); }

/* ---------- 対局 ---------- */
.screen--play { background: url("/app-development/apps/a014/img/felt.webp") center / cover no-repeat, var(--felt); }
.pbar { flex: none; display: flex; align-items: center; gap: 10px; padding: calc(6px + var(--safe-t)) 12px 4px; }
.pbar__t { flex: 1; display: flex; flex-direction: column; align-items: center; line-height: 1.3; }
.pbar__mode { font-family: var(--f-mincho); font-weight: 800; font-size: 15px; padding: 0 10px; border-radius: 999px; background: var(--felt-d); }
.pbar__move { font-size: 13px; color: var(--mist); background: var(--felt-d); padding: 0 8px; border-radius: 999px; font-family: var(--f-body); font-weight: 700; }
.plate {
  flex: none;
  margin: 4px 12px;
  display: flex; align-items: center; gap: 12px;
  padding: 8px 14px 8px 8px;
  border-radius: var(--r-m);
  background: var(--marble);
  color: var(--ink);
  box-shadow: var(--sh-card);
  transition: box-shadow var(--t-mid), transform var(--t-mid) var(--ease);
  position: relative;
}
.plate.is-turn { box-shadow: 0 0 0 2px var(--brass), 0 0 22px rgba(241, 214, 143, .45), var(--sh-card); }
.plate.is-turn::before {
  content: "手番"; position: absolute; top: -9px; left: 54px;
  font-size: 11px; font-weight: 700; letter-spacing: .1em;
  padding: 0 8px; border-radius: 999px; background: var(--brass-d); color: #fff8e6;
}
.plate__stone { width: 40px; height: 40px; border-radius: 50%; flex: none; background: url("/app-development/apps/a014/img/stone-g.webp") center / 112% no-repeat; box-shadow: 0 3px 6px rgba(0, 0, 0, .35); }
.plate[data-side="2"] .plate__stone { background-image: url("/app-development/apps/a014/img/stone-w.webp"); }
.plate__who { flex: 1; min-width: 0; line-height: 1.3; }
.plate__name { font-family: var(--f-mincho); font-weight: 800; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plate__sub { font-size: 12px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.plate__score { display: flex; align-items: baseline; gap: 2px; }
.plate__score b { font-size: 30px; font-weight: 700; line-height: 1; }
.plate__unit { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.plate__think { display: none; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--brass-d); }
.plate__think.is-on { display: inline-flex; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--brass-d); }
@media (prefers-reduced-motion: no-preference) {
  .dots i { animation: dot 1s ease-in-out infinite; }
  .dots i:nth-child(2) { animation-delay: .15s; }
  .dots i:nth-child(3) { animation-delay: .3s; }
}
@keyframes dot { 0%, 100% { transform: translateY(0); opacity: .4; } 50% { transform: translateY(-4px); opacity: 1; } }
.balance { flex: none; height: 6px; margin: 4px 24px 0; border-radius: 3px; background: var(--marble); box-shadow: 0 0 0 1px var(--brass-d); overflow: hidden; }
.balance i { display: block; height: 100%; background: linear-gradient(90deg, #15563e, #2b8a64); transform-origin: left; transform: scaleX(.5); transition: transform 420ms var(--ease); }
.boardwrap { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2px 8px 0; }
.board { width: 100%; height: 100%; min-height: 0; flex: 1; overflow: visible; touch-action: manipulation; }
.turnmsg {
  flex: none; margin: 2px 0 2px;
  padding: 2px 14px; border-radius: 999px;
  background: var(--felt-d); color: var(--cream);
  font-size: 14px; font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(212, 173, 85, .35);
  word-break: keep-all; text-align: center;
}
.actions { flex: none; display: grid; grid-template-columns: 72px 72px 1fr; gap: 10px; padding: 6px 12px calc(10px + var(--safe-b)); }
.act {
  min-height: 56px; border-radius: var(--r-m);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  background: var(--felt-d); color: var(--cream);
  box-shadow: inset 0 0 0 1px rgba(212, 173, 85, .5);
  font-size: 13px; font-weight: 700;
  transition: transform var(--t-fast) var(--ease);
}
.act svg { color: var(--brass-l); }
.act:active:not(:disabled) { transform: scale(.94); }
.act:disabled { color: #9fb5a8; box-shadow: inset 0 0 0 1px rgba(212, 173, 85, .2); }
.act:disabled svg { color: #9fb5a8; }
.act--main { flex-direction: row; gap: 8px; background: var(--brass-grad); color: #261b04; font-family: var(--f-mincho); font-weight: 800; font-size: 17px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 6px 16px rgba(0, 0, 0, .3); }
.act--main svg { color: #261b04; }
.act--main:disabled { background: #2a5444; color: #d5e2d9; box-shadow: inset 0 0 0 1px rgba(212, 173, 85, .3); }
.act--main:disabled svg { color: #d5e2d9; }

/* 盤の中 */
.cell:focus { outline: none; }
.cell { stroke: #a88431; stroke-width: .5; cursor: pointer; transition: filter var(--t-fast); }
.cell:not(.is-empty) { cursor: default; }
@media (hover: hover) { .cell.is-empty:hover { filter: brightness(1.06) sepia(.15); } }
.st, .ghost, .cap, .lastmark, .sel, .hintring, .thinkring, .marks { pointer-events: none; }
.st__in { transform-box: fill-box; transform-origin: center; }
.sel { stroke: #c99c40; stroke-width: 1.6; }
.cap { fill: rgba(255, 230, 150, .22); stroke: #f6d77a; stroke-width: 1.4; }
.hintring { stroke: #f1d68f; stroke-width: 2.2; stroke-dasharray: 3 2; }
.thinkring { stroke: #fff; stroke-opacity: .85; stroke-width: 1.6; }
@media (prefers-reduced-motion: no-preference) {
  .st--drop .st__in { animation: drop 320ms var(--spring) both; }
  .st--drop .st__shadow { animation: shadowin 320ms var(--ease) both; }
  .st--flip > .st__in { animation: flipIn 170ms ease-out calc(var(--d) + 170ms) both; }
  .st__old > .st__in { animation: flipOut 170ms ease-in var(--d) both; }
  .cap { animation: pulse 1.1s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
  .hintring { animation: spin 3s linear infinite; transform-box: fill-box; transform-origin: center; }
  .thinkring { animation: blink .5s steps(2) infinite; }
  .ghost { animation: hover 1.4s ease-in-out infinite; }
}
@keyframes drop { from { transform: translateY(-16px) scale(1.25); opacity: 0; } 55% { transform: translateY(0) scale(.92); opacity: 1; } to { transform: none; } }
@keyframes shadowin { from { opacity: 0; } to { opacity: 1; } }
@keyframes flipIn { from { transform: scaleX(0); } to { transform: none; } }
@keyframes flipOut { from { transform: none; } to { transform: scaleX(0); } }
@keyframes pulse { 0%, 100% { opacity: .55; transform: scale(.94); } 50% { opacity: 1; transform: scale(1.04); } }
@keyframes spin { to { transform: rotate(60deg); } }
@keyframes blink { 50% { stroke-opacity: .2; } }
@keyframes hover { 0%, 100% { opacity: .55; } 50% { opacity: .8; } }
@media (prefers-reduced-motion: reduce) { .st__old { display: none; } }

/* 終局 */
.endcard { position: absolute; inset: 0; z-index: 8; display: none; place-items: center; padding: 20px; background: rgba(6, 26, 20, .72); }
.endcard.is-on { display: grid; animation: fade var(--t-mid) var(--ease); }
.endcard__in {
  width: min(100%, 350px);
  padding: 22px 18px 10px;
  border-radius: var(--r-l);
  background: var(--marble); color: var(--ink);
  box-shadow: 0 0 0 3px var(--brass), 0 0 0 4px var(--brass-d), 0 30px 60px rgba(0, 0, 0, .5);
  display: flex; flex-direction: column; align-items: stretch; gap: 10px; text-align: center;
}
@media (prefers-reduced-motion: no-preference) { .endcard.is-on .endcard__in { animation: rise 420ms var(--spring); } }
@keyframes rise { from { transform: translateY(30px) scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
.endcard__en { font-family: var(--f-it); font-style: italic; font-weight: 600; font-size: 20px; color: var(--brass-d); }
.endcard__title { font-family: var(--f-mincho); font-weight: 800; font-size: 32px; line-height: 1.2; font-feature-settings: "palt"; }
.endcard[data-result="lose"] .endcard__en { color: var(--ink-2); }
.endcard__score { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 4px 0; }
.es { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.es__stone { width: 34px; height: 34px; border-radius: 50%; background: url("/app-development/apps/a014/img/stone-g.webp") center / 112%; box-shadow: 0 3px 6px rgba(0, 0, 0, .3); }
.es--w .es__stone { background-image: url("/app-development/apps/a014/img/stone-w.webp"); }
.es b { font-size: 44px; line-height: 1; font-weight: 700; }
.es__k { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.es__dash { font-size: 24px; color: var(--brass-d); }
.endcard__note { font-size: 14px; color: var(--ink-2); }
.endcard__row { display: flex; justify-content: center; gap: 4px; }

/* ---------- ルール ---------- */
.screen--rules { background: var(--felt); }
.rules__scroll { padding: 4px 16px calc(28px + var(--safe-b)); }
.rules__lead { margin: 18px 2px 14px; font-family: var(--f-mincho); font-weight: 700; font-size: 17px; word-break: keep-all; }
.rules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.rule {
  display: grid; grid-template-columns: 100px 1fr; gap: 12px; align-items: center;
  padding: 12px; border-radius: var(--r-m);
  background: var(--marble); color: var(--ink); box-shadow: var(--sh-card);
}
.rule__fig { width: 100px; height: 112px; border-radius: 12px; background: #8a6522; display: grid; place-items: center; }
.rule__fig svg { width: 94px; height: 106px; }
.rule__no { font-family: var(--f-num); font-weight: 700; font-size: 15px; color: var(--brass-d); line-height: 1; }
.rule h2 { font-family: var(--f-mincho); font-weight: 800; font-size: 17px; line-height: 1.45; margin: 4px 0 4px; word-break: keep-all; font-feature-settings: "palt"; }
.rule p:last-child { font-size: 14px; color: var(--ink); }
@media (prefers-reduced-motion: no-preference) {
  .mdrop .st__in { animation: figdrop 3.2s var(--ease) infinite; }
  .mflip > .st__in { animation: figflipIn 3.2s linear infinite; }
  .mflip .st__old > .st__in { animation: figflipOut 3.2s linear infinite; }
  .drill .mdrop .st__in { animation: drop 320ms var(--spring) both; }
  .drill .mflip > .st__in { animation: flipIn 170ms ease-out 340ms both; }
  .drill .mflip .st__old > .st__in { animation: flipOut 170ms ease-in 170ms both; }
}
@keyframes figdrop { 0%, 8% { transform: translateY(-14px) scale(1.25); opacity: 0; } 20% { transform: none; opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes figflipOut { 0%, 30% { transform: none; } 36%, 100% { transform: scaleX(0); } }
@keyframes figflipIn { 0%, 36% { transform: scaleX(0); } 42%, 100% { transform: none; } }
.drill { padding: 14px; border-radius: var(--r-m); background: var(--marble); color: var(--ink); box-shadow: var(--sh-card); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.drill__q { font-weight: 700; font-size: 15px; align-self: stretch; }
.drill__board { width: 230px; height: 256px; background: #8a6522; border-radius: 18px; padding: 6px; }
.drill__board .mcell { cursor: pointer; }
.drill__board .mcell.is-no { stroke: var(--red); stroke-width: 2.4; }
.drill__a { align-self: stretch; font-size: 14px; font-weight: 700; padding: 8px 12px; border-radius: 10px; background: var(--marble-2); color: var(--ink); }
.drill__a[data-ok="1"] { background: #d7ead9; color: #10402d; }
.drill__a[data-ok="0"] { background: #f4dfda; color: #6e1d14; }
.drill .btn--marble { background: var(--marble-2); box-shadow: inset 0 0 0 1px #cfc5ae; }
.rules__cta { margin-top: 20px; }

/* ---------- 戦績 ---------- */
.screen--record { background: var(--felt); }
.record__scroll { padding: 0 16px calc(28px + var(--safe-b)); }
.rhero {
  margin: 0 -16px;
  min-height: 270px;
  padding: calc(76px + var(--safe-t)) 16px 16px;
  display: flex; align-items: flex-end; justify-content: flex-end;
  background:
    linear-gradient(180deg, rgba(15, 59, 46, 0) 60%, var(--felt) 100%),
    url("/app-development/apps/a014/img/record.webp") 22% center / cover no-repeat;
}
.rhero__card {
  width: 54%;
  padding: 14px 16px;
  border-radius: var(--r-m);
  background: var(--felt-d);
  box-shadow: inset 0 0 0 1px var(--brass), 0 12px 30px rgba(0, 0, 0, .4);
  text-align: center;
}
.rhero__k { font-size: 13px; font-weight: 700; color: var(--mist); }
.rhero__rate { display: flex; align-items: baseline; justify-content: center; gap: 2px; color: var(--brass-l); line-height: 1.05; }
.rhero__rate b { font-size: 58px; font-weight: 700; }
.rhero__rate span { font-size: 22px; }
.rhero__sum { font-size: 14px; font-weight: 700; color: var(--cream); white-space: nowrap; }
.opps { list-style: none; margin: 0; padding: 0; border-radius: var(--r-m); background: var(--marble); color: var(--ink); box-shadow: var(--sh-card); overflow: hidden; }
.opp { display: grid; grid-template-columns: 64px 1fr auto 44px; align-items: center; gap: 10px; padding: 12px 14px; }
.opp + .opp { border-top: 1px solid #ddd4c1; }
.opp__k { font-family: var(--f-mincho); font-weight: 800; font-size: 15px; white-space: nowrap; }
.opp__bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: #e2dccd; }
.opp__bar .w { background: var(--jade); }
.opp__bar .d { background: var(--brass); }
.opp__bar .l { background: #9a9e97; }
.opp__bar .z { background: #e2dccd; }
.opp__n { font-family: var(--f-body); font-size: 13px; font-weight: 700; color: var(--ink-2); }
.opp__r { font-size: 16px; font-weight: 700; text-align: right; }
.opp__r small, .rhero__rate span { font-family: var(--f-body); font-weight: 700; }
.opp__r small { font-size: 12px; margin-left: 1px; }
.opp--duo { grid-template-columns: 64px 1fr; }
.opp__duo { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.opp__duo b { color: var(--ink); font-size: 16px; }
.games { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.gm { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-radius: var(--r-m); background: var(--marble); color: var(--ink); box-shadow: var(--sh-card); }
.gm svg { width: 64px; height: 67px; }
.gm__t { flex: 1; min-width: 0; line-height: 1.4; }
.gm__vs { font-family: var(--f-mincho); font-weight: 800; font-size: 16px; display: flex; flex-wrap: wrap; column-gap: 8px; }
.gm__vs span { font-family: var(--f-body); font-size: 12px; font-weight: 700; color: var(--ink-2); align-self: center; }
.gm__when { font-family: var(--f-body); font-size: 13px; color: var(--ink-2); font-weight: 700; }
.gm__r { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.gm__res { font-size: 13px; font-weight: 700; padding: 0 10px; border-radius: 999px; background: #e2dccd; color: var(--ink); }
.gm[data-res="win"] .gm__res { background: var(--jade); color: #fff; }
.gm[data-res="lose"] .gm__res { background: #d9d4c8; color: #3b3f3c; }
.gm[data-res="draw"] .gm__res { background: #ecd9a4; color: #4a3608; }
.gm__sc { font-size: 20px; font-weight: 700; }
.gm__sc i { font-style: normal; margin: 0 3px; color: var(--brass-d); }
.empty { text-align: center; padding: 30px 20px; }
.empty svg { width: 48px; height: 48px; color: var(--brass-l); }
.empty__t { font-family: var(--f-mincho); font-weight: 800; font-size: 18px; margin-top: 8px; }
.empty__p { font-size: 14px; color: var(--mist); }

/* ---------- 設定・アプリについて ---------- */
.screen--settings, .screen--about { background: var(--felt); }
.settings__scroll { padding: 0 16px calc(28px + var(--safe-b)); }
.group { border-radius: var(--r-m); background: var(--marble); color: var(--ink); box-shadow: var(--sh-card); overflow: hidden; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; padding: 10px 16px; }
.row + .row { border-top: 1px solid #ddd4c1; }
.row__label { display: flex; flex-direction: column; font-weight: 700; font-size: 15px; line-height: 1.45; }
.row__label small { font-size: 12px; color: var(--ink-2); font-weight: 700; }
.row--btn { width: 100%; justify-content: flex-start; gap: 12px; font-weight: 700; text-align: left; }
.row--btn:active { background: var(--marble-2); }
.row--btn svg { color: var(--brass-d); }
.row--danger { color: #7a1f16; }
.row--danger svg { color: #7a1f16; }
.row__grow { flex: 1; }
.row__chev { width: 18px; height: 18px; }
.switch { position: relative; flex: none; width: 54px; height: 32px; border-radius: 999px; background: #b9b2a2; transition: background var(--t-mid); }
.switch i { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .3); transition: transform var(--t-mid) var(--spring); }
.switch[aria-checked="true"] { background: var(--jade); }
.switch[aria-checked="true"] i { transform: translateX(22px); }
.about__head { display: flex; align-items: center; gap: 16px; margin: 22px 0 16px; }
.about__head img { width: 76px; height: 76px; border-radius: 18px; box-shadow: 0 0 0 2px var(--brass), 0 10px 20px rgba(0, 0, 0, .35); }
.about__name { font-family: var(--f-mincho); font-weight: 800; font-size: 24px; }
.about__ver { font-size: 14px; color: var(--mist); font-weight: 700; }
.about__box { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.about__k { margin: 18px 0 8px; font-weight: 700; }
.chips { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 4px 12px; border-radius: 999px; background: var(--felt-d); box-shadow: inset 0 0 0 1px rgba(212, 173, 85, .5); font-size: 13px; font-weight: 700; }

/* ---------- シート ---------- */
.scrim { position: absolute; inset: 0; z-index: 20; background: rgba(4, 18, 14, .6); opacity: 0; pointer-events: none; transition: opacity var(--t-mid); }
.scrim.is-on { opacity: 1; pointer-events: auto; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 21;
  max-height: 92%; overflow-y: auto;
  padding: 10px 16px calc(16px + var(--safe-b));
  border-radius: var(--r-l) var(--r-l) 0 0;
  background: var(--marble); color: var(--ink);
  box-shadow: 0 -3px 0 var(--brass), 0 -20px 50px rgba(0, 0, 0, .45);
  display: flex; flex-direction: column; gap: 10px;
  transform: translateY(105%); visibility: hidden;
  transition: transform 340ms var(--ease), visibility 0s 340ms;
}
.sheet.is-on { transform: none; visibility: visible; transition: transform 340ms var(--ease); }
.sheet__grab { align-self: center; width: 40px; height: 5px; border-radius: 3px; background: #cfc5ae; margin-bottom: 4px; }
.sheet h2 { font-family: var(--f-mincho); font-weight: 800; font-size: 21px; line-height: 1.4; word-break: keep-all; }
.sheet p { font-size: 15px; }
.opp-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opp-pick button {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  min-height: 92px; padding: 10px 12px; border-radius: var(--r-m);
  background: #fff; text-align: left;
  box-shadow: inset 0 0 0 1px #d6ccb5;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-mid);
}
.opp-pick button:active { transform: scale(.97); }
.opp-pick button[aria-checked="true"] { box-shadow: inset 0 0 0 2px var(--brass-d), 0 6px 14px rgba(138, 101, 34, .25); background: #fffaf0; }
.opp-pick button[aria-checked="true"]::after { content: ""; position: absolute; top: 12px; right: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--jade); box-shadow: 0 0 0 3px #cfe3d7; }
.op__k { font-family: var(--f-mincho); font-weight: 800; font-size: 18px; }
.op__s { display: flex; gap: 3px; height: 14px; align-items: center; }
.op__s i { width: 12px; height: 12px; border-radius: 50%; background: url("/app-development/apps/a014/img/stone-g.webp") center / 112%; }
.op__s svg { width: 18px; height: 18px; color: var(--brass-d); }
.op__d { font-size: 12px; font-weight: 700; color: var(--ink-2); line-height: 1.45; word-break: keep-all; }
.side-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; transition: opacity var(--t-mid); }
.side-pick.is-off { opacity: .4; pointer-events: none; }
.side-pick button { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; border-radius: var(--r-m); background: #fff; box-shadow: inset 0 0 0 1px #d6ccb5; font-weight: 700; }
.side-pick button[aria-checked="true"] { box-shadow: inset 0 0 0 2px var(--brass-d); background: #fffaf0; }
.sp__stone { width: 26px; height: 26px; border-radius: 50%; background: url("/app-development/apps/a014/img/stone-g.webp") center / 112%; box-shadow: 0 2px 4px rgba(0, 0, 0, .3); }
.sp__stone--w { background-image: url("/app-development/apps/a014/img/stone-w.webp"); }

.toast {
  position: absolute; left: 50%; top: calc(12px + var(--safe-t)); z-index: 30;
  transform: translate(-50%, -150%); opacity: 0; visibility: hidden;
  max-width: calc(100% - 32px);
  padding: 9px 18px; border-radius: 999px;
  background: var(--marble); color: var(--ink);
  box-shadow: 0 0 0 1px var(--brass), 0 10px 24px rgba(0, 0, 0, .35);
  font-weight: 700; font-size: 14px; word-break: keep-all; text-align: center;
  transition: transform 300ms var(--spring), opacity 200ms, visibility 0s 300ms;
  pointer-events: none;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition: transform 300ms var(--spring), opacity 200ms; }
.splash { position: absolute; inset: 0; z-index: 40; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: var(--felt-d); }
.splash.is-on { display: flex; }
.splash.is-out { opacity: 0; transition: opacity 320ms; }
.splash img { width: 120px; height: 120px; border-radius: 28px; box-shadow: 0 0 0 2px var(--brass), 0 20px 40px rgba(0, 0, 0, .4); }
.splash p { font-family: var(--f-mincho); font-weight: 800; font-size: 26px; letter-spacing: .1em; color: var(--brass-l); }
.noscript, .jsfail { position: absolute; left: 16px; right: 16px; top: 40%; z-index: 50; padding: 16px; border-radius: 16px; background: var(--marble); color: var(--ink); text-align: center; font-weight: 700; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; animation-delay: 0ms !important; }
}
@media (max-height: 700px) {
  .logo { font-size: 48px; }
  .plate { padding-top: 5px; padding-bottom: 5px; }
  .plate__stone { width: 32px; height: 32px; }
  .act { min-height: 50px; }
}
