/* 外まわりの画面（C2）: タイトル・ステージえらび・VS・審査結果・順位表・
   オリジナルステージ・設定・このアプリについて。土台は base.css、値は tokens.css。 */

/* ============================================================ タイトル */
.screen--title .screen__in { justify-content: center; padding-top: max(30px, calc(env(safe-area-inset-top) + 18px)); }
.screen--title .powered { margin-top: 30px; }

.ttl__head { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 0 4px; }
.ttl__lamp {   /* 上から降りるスポットライト */
  position: absolute; left: 50%; top: -18vh; width: 130%; height: 46vh; transform: translateX(-50%);
  background: conic-gradient(from 168deg at 50% 0%, transparent 0deg 12deg, rgba(255, 201, 60, .20) 12deg 24deg, transparent 24deg 36deg);
  filter: blur(6px); pointer-events: none;
}
.ttl__head .logo { margin: 4px 0 2px; animation: logo-in .7s var(--ease-pop) both; }
@keyframes logo-in { from { opacity: 0; transform: scale(.7) rotate(-6deg); } }

.ttl__catch {
  font-size: clamp(13.5px, 4.05vw, 19px); line-height: 1.4; text-align: center; margin-top: 4px;
  -webkit-text-stroke-width: 4.5px; letter-spacing: -.005em; white-space: nowrap;
}
.ttl__sub {
  font-family: var(--font-body); font-weight: 700; font-size: 12px; letter-spacing: .3em;
  color: var(--gold); text-indent: .3em;
  padding: 4px 14px; border: 2px solid rgba(255, 201, 60, .5); border-radius: var(--r-pill);
}

.ttl__box { display: flex; flex-direction: column; gap: 12px; margin: 22px 0 6px; }
.ttl__box.is-busy { opacity: .6; }
.ttl__err {
  margin: -4px 0 0; padding: 11px 14px; border-radius: var(--r-sm);
  background: rgba(230, 62, 43, .16); border: 2px solid var(--red);
  color: #FFD9D3; font-size: 14px; font-weight: 700; text-align: center;
}
.ttl__links { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.ttl__links .iconbtn__t { display: inline; }   /* 丸アイコンだけでは何のボタンか分からない */
.ttl__ask { font-family: var(--font-display); font-size: 17px; text-align: center; color: var(--paper); }
.ttl__hint { font-size: 12.5px; color: rgba(255, 247, 232, .66); text-align: center; }

.code { display: flex; gap: 7px; justify-content: center; }
.code__c {
  width: 100%; max-width: 54px; height: 66px; padding: 0;
  text-align: center; font-family: var(--font-display); font-size: 27px;
  border: var(--line-thick); border-radius: var(--r-sm);
  background: var(--paper); color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.code__c:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.ttl__namewrap { position: relative; }
.ttl__name { text-align: center; font-family: var(--font-display); font-size: 22px; height: 64px; padding-right: 62px; }
.ttl__count { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 12px; color: #8D8598; font-weight: 700; }

.ttl__support { display: flex; flex-direction: column; gap: 9px; }
.ttl__supporth { display: flex; align-items: center; gap: 7px; font-family: var(--font-display); font-size: 15px; }
.ttl__supporth svg { width: 20px; height: 20px; flex: none; color: var(--red); }
.ttl__supportl { display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; }
.ttl__supportl li { padding-left: 16px; position: relative; }
.ttl__supportl li::before { content: "・"; position: absolute; left: 0; }

.ttl__faces { display: flex; justify-content: center; gap: 5px; margin-top: 26px; flex-wrap: nowrap; }
.ttl__face { animation: sway 3.4s ease-in-out infinite; animation-delay: calc(var(--i) * -.48s); }
.ttl__face .pt { width: clamp(44px, 14vw, 58px); height: clamp(44px, 14vw, 58px); border-width: 2.5px; }
@keyframes sway { 0%, 100% { transform: translateY(0) rotate(-2.5deg); } 50% { transform: translateY(-7px) rotate(2.5deg); } }
.ttl__castnote { text-align: center; font-size: 12.5px; color: rgba(255, 247, 232, .66); margin-top: 10px; }

/* ============================================================ ステージえらび */
.sgh { display: flex; flex-direction: column; gap: 6px; }
.sgh__row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sgh__t { font-size: clamp(23px, 6.6vw, 30px); line-height: 1.15; flex: 1; min-width: 0; -webkit-text-stroke-width: 6px; }
@media (max-width: 560px) {   /* 題と挑戦者名がぶつかるので、狭い画面では2段に */
  .sgh__row { flex-direction: column-reverse; align-items: flex-start; gap: 8px; }
  .sgh__t { flex: none; }
}
.sgh__s { font-size: 13.5px; color: rgba(255, 247, 232, .72); }

.who {
  display: inline-flex; align-items: center; gap: 7px; min-height: 48px; padding: 6px 14px;
  border: 2.5px dashed rgba(255, 201, 60, .7); border-radius: var(--r-pill);
  background: rgba(21, 16, 43, .5); color: var(--paper); cursor: pointer;
}
.who:hover { background: rgba(255, 201, 60, .14); }
.who__k { font-size: 11px; color: var(--gold); letter-spacing: .1em; }
.who__v { font-family: var(--font-display); font-size: 16px; max-width: 8em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who__i { width: 16px; height: 16px; flex: none; color: rgba(255, 247, 232, .6); }

.tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (min-width: 560px) { .tools { grid-template-columns: repeat(4, 1fr); } }
.tools__b {
  min-width: 0; min-height: 48px; padding: 8px 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 2px solid rgba(255, 247, 232, .4); border-radius: var(--r-sm);
  background: rgba(27, 23, 38, .42); color: var(--paper);
  font-size: 12.5px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.tools__b:hover { background: rgba(255, 247, 232, .14); }
.tools__b svg { width: 18px; height: 18px; flex: none; color: var(--gold); }

.sgrid { display: grid; gap: 13px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .sgrid { grid-template-columns: 1fr 1fr; } }

.scard {
  position: relative; display: flex; gap: 12px; align-items: stretch; text-align: left;
  padding: 13px 34px 13px 13px;
  background: var(--paper); color: var(--ink);
  border: var(--line-thick); border-radius: var(--r);
  box-shadow: var(--shadow); cursor: pointer;
  transition: transform .12s var(--ease-pop), box-shadow .12s var(--ease-out);
  overflow: hidden;
}
.scard::before {   /* 紙の網点 */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(27, 23, 38, .11) 1px, transparent 1.2px);
  background-size: 9px 9px; opacity: .38;
}
.scard:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.scard:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }
.scard:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.scard.is-won { background: linear-gradient(140deg, #FFF4D6, var(--paper) 46%); }

.scard__left { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; flex: none; z-index: 1; }
.scard__no {
  font-family: var(--font-body); font-weight: 900; font-size: 11px; letter-spacing: .04em;
  padding: 3px 8px; border-radius: var(--r-pill);
  background: var(--ink); color: var(--paper); white-space: nowrap;
}
.scard__no--c { background: var(--red); }
.scard__plus {
  display: grid; place-items: center; width: 104px; height: 104px; border-radius: 18px;
  border: 3px dashed var(--ink); background: rgba(27, 23, 38, .05); color: var(--ink);
}
.scard__plus svg { width: 48px; height: 48px; }

.scard__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; z-index: 1; }
.scard__nick {
  display: inline-block; align-self: flex-start; max-width: 100%;
  font-family: var(--font-body); font-weight: 900; font-size: 12px; line-height: 1.25;
  padding: 5px 9px; border-radius: 4px;
  background: var(--red); color: #fff; transform: rotate(-1.5deg);
}
.scard__title { font-family: var(--font-display); font-size: 19px; line-height: 1.24; margin-top: 3px; text-wrap: balance; }
.scard__head { font-family: var(--font-hand); font-size: 14.5px; line-height: 1.35; color: var(--red-deep); }
.scard__meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 4px; }
.scard__stars { display: inline-flex; align-items: center; gap: 5px; }
.scard__starsk { font-size: 10.5px; font-weight: 700; color: #6C6478; }
.tag--ghostink { background: transparent; border-style: dashed; }
.scard__who { font-size: 11.5px; color: #6C6478; margin-top: 2px; }
.scard__best { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-top: 6px; padding-top: 6px; border-top: 2px dotted rgba(27, 23, 38, .25); }
.scard__bestk { font-size: 10.5px; font-weight: 700; color: #6C6478; }
.scard__bestk--none { color: #A49CAE; }
.scard__bestv { font-family: var(--font-display); font-size: 17px; color: var(--red-deep); }
.scard__besttitle { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: var(--r-pill); background: var(--gold); }
.scard__stamp {   /* 顔写真の右下に「押した」ように重ねる（本文に被らない） */
  position: absolute; left: 61px; top: 59px; z-index: 2; opacity: .95; pointer-events: none;
  --stamp-size: 56px; --stamp-line: 3px; --stamp-font: 11.5px;
  background: rgba(255, 247, 232, .84);
}
.scard__go { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); color: rgba(27, 23, 38, .35); z-index: 1; }
.scard__go svg { width: 22px; height: 22px; }
.scard--make { background: linear-gradient(140deg, #2C2050, #1A1334); color: var(--paper); border-color: var(--gold); }
.scard--make::before { background-image: radial-gradient(rgba(255, 255, 255, .16) 1.1px, transparent 1.3px); }
.scard--make .scard__title { color: var(--gold); }
.scard--make .scard__head { color: #FFE9A8; }
.scard--make .scard__who { color: rgba(255, 247, 232, .6); }
.scard--make .scard__plus { border-color: var(--gold); color: var(--gold); background: rgba(255, 201, 60, .1); }
.scard--make .scard__go { color: rgba(255, 247, 232, .5); }
.scard--custom { border-style: solid; border-color: var(--red); }

/* ============================================================ VS画面 */
.vs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 6px; padding: 18px 12px; }
.vs__side { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; }
.vs__you {   /* 挑戦者側にも同じ大きさの枠を置いて、対戦カードの釣り合いを取る */
  display: grid; place-items: center; gap: 2px;
  width: 132px; max-width: 100%; aspect-ratio: 1; border-radius: 22px;
  border: var(--line-thick); border-style: dashed; border-color: var(--gold);
  background: radial-gradient(circle at 50% 38%, rgba(255,201,60,.22), rgba(21,16,43,.5) 70%);
  color: var(--gold);
}
.vs__you svg { width: 40px; height: 40px; }
.vs__youl { font-family: var(--font-body); font-weight: 900; font-size: 11px; letter-spacing: .12em; }
.vs__k { font-size: 10.5px; letter-spacing: .18em; color: var(--gold); }
.vs__name { font-size: 20px; line-height: 1.2; text-align: center; word-break: break-word; -webkit-text-stroke-width: 5px; }
.vs__side--you .vs__name { max-width: 100%; }
.vs__mid { flex: none; padding: 0 2px; align-self: start; margin-top: 44px; }
.vs__vs {
  display: block; font-family: var(--font-display); font-size: 26px; line-height: 1;
  color: var(--red); -webkit-text-stroke: 6px #fff; paint-order: stroke fill;
  transform: rotate(-9deg); filter: drop-shadow(3px 3px 0 var(--ink));
}
.vs__side--foe .pt { margin-bottom: 3px; }
.vs__nick {
  font-family: var(--font-body); font-weight: 900; font-size: 12px; padding: 5px 9px; border-radius: 4px;
  background: var(--red); color: #fff; transform: rotate(-1.5deg); text-align: center;
}
.vs__role { font-size: 11.5px; color: rgba(255, 247, 232, .72); text-align: center; }
.vs__one { grid-column: 1 / -1; font-size: 12.5px; line-height: 1.5; color: rgba(255, 247, 232, .82); text-align: center; margin-top: 6px; }
.vs .stars--dark, .vs .stars { margin-top: 2px; }

.mis { display: flex; flex-direction: column; gap: 12px; }
.mis__band {
  margin: -16px -16px 0; padding: 12px 16px;
  background: linear-gradient(100deg, var(--red), #F2694F);
  border-bottom: var(--line); border-radius: 13px 13px 0 0;
  color: #fff;
}
.mis__k { font-size: 10.5px; letter-spacing: .2em; opacity: .9; }
.mis__v { font-family: var(--font-display); font-size: 18px; line-height: 1.34; text-wrap: balance; }
.mis__dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 13.5px; line-height: 1.6; }
.mis__dl dt { font-family: var(--font-body); font-weight: 900; font-size: 12.5px; color: var(--red-deep); white-space: nowrap; padding-top: 2px; }
.mis__dl dd { margin: 0; }

.rules__h { font-family: var(--font-display); font-size: 16px; margin-bottom: 9px; }
.rules__l { display: flex; flex-direction: column; gap: 9px; }
.rules__i { display: flex; gap: 10px; align-items: flex-start; }
.rules__n {
  flex: none; display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%;
  background: var(--gold); border: 2.5px solid var(--ink); font-family: var(--font-display); font-size: 14px;
}
.rules__b { display: flex; flex-direction: column; }
.rules__b b { font-family: var(--font-display); font-weight: 400; font-size: 15px; }
.rules__d { font-size: 12.5px; color: #6C6478; line-height: 1.5; }

.tips { background: linear-gradient(150deg, #FFF6DC, var(--paper) 55%); }
.tips__h { display: flex; align-items: center; gap: 7px; font-family: var(--font-display); font-size: 15px; margin-bottom: 8px; }
.tips__h svg { width: 20px; height: 20px; color: var(--orange); }
.tips__l { display: flex; flex-direction: column; gap: 6px; font-family: var(--font-hand); font-size: 15px; }
.tips__l li { padding-left: 20px; position: relative; }
.tips__l li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }

.opts { display: flex; flex-direction: column; gap: 14px; }
.opts__row { display: flex; flex-direction: column; gap: 7px; }
.opts__k { font-family: var(--font-body); font-weight: 900; font-size: 13.5px; }
.opts__n { font-size: 12px; line-height: 1.55; color: #6C6478; }
/* 5択（制限時間）は3+2で折り返す。3択・2択は1行のまま */
.opts .seg__b, .setg .seg__b { flex: 1 1 27%; min-width: 64px; }

.prep__foot { display: flex; flex-direction: column; gap: 10px; }
.prep__go.is-busy { opacity: .7; }

/* ============================================================ 審査結果 */
/* ① 勝敗の帯 */
.band {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 22px 14px 16px; border: var(--line-thick); border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  background: linear-gradient(170deg, #3A2A6B, #1B1233);
}
.band--win { background: linear-gradient(170deg, #E63E2B, #B3261A); }
.band--come { background: linear-gradient(170deg, #FF8A1F, #C4441A); }
.band--lose { background: linear-gradient(170deg, #3E3A6B, #1C1934); }
.band__burst {
  position: absolute; left: 50%; top: 50%; width: 200%; aspect-ratio: 1; transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 0deg at 50% 50%, rgba(255, 255, 255, .13) 0deg 6deg, transparent 6deg 12deg);
  animation: bg-spin 34s linear infinite;
}
.band__t { position: relative; font-size: 46px; line-height: 1.05; -webkit-text-stroke-width: 9px; animation: stamp-in .5s var(--ease-pop) both; }
.band--win .band__t, .band--come .band__t { color: var(--gold); }
@keyframes stamp-in { from { opacity: 0; transform: scale(2.1) rotate(-9deg); } 70% { opacity: 1; } }
.band__s { position: relative; font-size: 13.5px; font-weight: 700; color: rgba(255, 247, 232, .92); text-align: center; }
.band__meta { position: relative; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; font-size: 11.5px; color: rgba(255, 247, 232, .72); margin-top: 6px; }
.band__dot { width: 4px; height: 4px; border-radius: 50%; background: rgba(255, 247, 232, .45); }

/* ② 得点 */
.score { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 14px; }
.score__k { font-size: 11px; letter-spacing: .24em; color: var(--gold); }
.score__num { display: flex; align-items: baseline; gap: 6px; }
.score__v { font-family: var(--font-display); font-size: 68px; line-height: 1; color: var(--gold); text-shadow: 0 5px 0 rgba(0, 0, 0, .5); font-variant-numeric: tabular-nums; }
.score.is-done .score__v { animation: score-pop .4s var(--ease-pop); }
@keyframes score-pop { 50% { transform: scale(1.14); } }
.score__max { font-family: var(--font-display); font-size: 17px; color: rgba(255, 247, 232, .6); }
.score__wait { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 700; padding: 14px 0 8px; color: rgba(255, 247, 232, .88); }
.score__dots { display: inline-flex; gap: 4px; }
.score__dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); animation: dotbeat 1s ease-in-out infinite; }
.score__dots i:nth-child(2) { animation-delay: .15s; }
.score__dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dotbeat { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-4px); } }
.score__err { display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 8px 0; }
.score__errt { font-size: 13.5px; color: #FFD9D3; }
.score__rank { display: flex; align-items: baseline; gap: 6px; margin-top: 6px; padding: 6px 14px; border-radius: var(--r-pill); background: rgba(255, 201, 60, .16); border: 2px solid rgba(255, 201, 60, .5); }
.score__rankk { font-size: 11px; color: var(--gold); letter-spacing: .1em; }
.score__rankp { font-family: var(--font-display); font-size: 19px; color: var(--gold); }
.score__rankt { font-size: 11.5px; color: rgba(255, 247, 232, .7); }

/* ③ 称号 */
.ttlbox { display: flex; justify-content: center; }
.ttlbox__frame {
  position: relative; width: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 20px 20px 16px;
  border: 7px solid transparent; border-radius: var(--r);
  background:
    linear-gradient(170deg, #2A1F4A, #191233) padding-box,
    linear-gradient(150deg, #FFE9A8, #FFC93C 30%, #B98A12 55%, #FFE9A8 80%, #FFC93C) border-box;
  box-shadow: var(--shadow), inset 0 0 26px rgba(255, 201, 60, .2);
}
.ttlbox.is-in .ttlbox__frame { animation: pop-in .55s var(--ease-pop) both; }
.ttlbox__k { font-size: 10.5px; letter-spacing: .3em; color: var(--gold); text-indent: .3em; }
.ttlbox__v {
  font-family: var(--font-display); font-size: 31px; line-height: 1.2; text-align: center; text-wrap: balance;
  color: var(--gold); text-shadow: 0 3px 0 rgba(0, 0, 0, .55), 0 0 22px rgba(255, 201, 60, .5);
}
.ttlbox__r { font-size: 13px; line-height: 1.55; color: rgba(255, 247, 232, .82); text-align: center; }

/* ④ 5つの力 */
.axes { display: flex; flex-direction: column; gap: 12px; }
.axes__h { font-family: var(--font-display); font-size: 16px; }
.axes__row { display: flex; flex-direction: column; gap: 4px; }
.axes__top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.axes__k { font-family: var(--font-display); font-size: 14.5px; }
.axes__n { font-size: 12px; font-weight: 700; color: #6C6478; font-variant-numeric: tabular-nums; }
.axes__bar { height: 17px; border: 2.5px solid var(--ink); border-radius: var(--r-pill); background: rgba(27, 23, 38, .08); overflow: hidden; }
.axes__fill {
  display: block; height: 100%; width: var(--w); border-radius: var(--r-pill);
  background: repeating-linear-gradient(115deg, var(--gold) 0 11px, var(--orange) 11px 22px);
  animation: bar-in .8s var(--ease-out) both; animation-delay: calc(var(--i) * 110ms + 140ms);
}
@keyframes bar-in { from { width: 0; } }
.axes__c { font-size: 12.5px; line-height: 1.5; color: #4A4358; }

/* ⑤ メーターの推移 */
.graph { padding: 12px; }
.graph__svg { width: 100%; height: auto; }
.gmark { cursor: pointer; transition: transform .12s var(--ease-pop); transform-box: fill-box; transform-origin: center; }
.gmark:hover, .gmark.is-sel { transform: scale(1.3); }
.gmark:focus-visible { outline: none; }
.gmark:focus-visible circle, .gmark:focus-visible path { stroke: var(--gold); stroke-width: 3.6; }
.graph__cap { margin-top: 8px; font-size: 12.5px; line-height: 1.5; color: #6C6478; min-height: 2.6em; }
.graph__cap.is-on { color: var(--ink); font-weight: 700; background: rgba(255, 201, 60, .3); border-radius: var(--r-sm); padding: 6px 9px; }

/* ヒット一覧 */
.hits__h { font-family: var(--font-display); font-size: 16px; margin-bottom: 10px; }
.hits__l { display: flex; flex-direction: column; gap: 7px; }
.hits__i { display: flex; align-items: center; gap: 8px; padding-bottom: 7px; border-bottom: 2px dotted rgba(27, 23, 38, .18); }
.hits__i:last-child { border-bottom: none; padding-bottom: 0; }
.hits__t { font-size: 11.5px; font-weight: 700; color: #6C6478; font-variant-numeric: tabular-nums; flex: none; width: 3.1em; }
.hits__i .sticker { font-family: var(--font-body); font-weight: 900; font-size: 11px; padding: 5px 8px; flex: none; transform: rotate(-1.5deg); }
.hits__lab { flex: 1; min-width: 0; font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hits__d { flex: none; font-family: var(--font-display); font-size: 15px; font-variant-numeric: tabular-nums; }
.hits__i--critical .hits__d, .hits__i--good .hits__d { color: var(--green); }
.hits__i--bad .hits__d, .hits__i--landmine .hits__d { color: var(--violet); }
.hits__i--landmine .hits__d { color: var(--red); }

/* ⑥ 名ゼリフ・迷ゼリフ */
.quotes { display: flex; flex-direction: column; gap: 12px; }
.q { position: relative; padding: 15px 16px 14px; border: var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); }
.q::after { content: ""; position: absolute; left: 30px; bottom: -13px; width: 0; height: 0; border: 13px solid transparent; border-top-color: var(--ink); border-bottom: 0; }
.q--best { background: linear-gradient(160deg, #FFF0C2, var(--gold)); color: var(--ink); }
.q--worst { background: var(--paper); color: var(--ink); }
.q__head { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.q__k { display: inline-block; font-family: var(--font-body); font-weight: 900; font-size: 12px; padding: 5px 11px; border-radius: var(--r-pill); background: var(--ink); color: var(--paper); }
.q--worst .q__k { background: var(--violet); }
.q__b { margin: 0; font-family: var(--font-display); font-size: 17px; line-height: 1.45; text-wrap: balance; }
.q__w { display: flex; gap: 8px; align-items: baseline; margin-top: 8px; font-size: 12.5px; line-height: 1.5; color: #5A4A20; }
.q--worst .q__w { color: #6C6478; }
.q__wt { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; }
.q__wt--w { font-size: 11.5px; color: #8D8598; }
.q__tsu {
  margin-top: 10px; padding: 9px 12px 9px 34px; position: relative;
  font-family: var(--font-hand); font-size: 15.5px; line-height: 1.45; color: var(--red-deep);
  transform: rotate(-1.2deg);
}
.q__tsu::before {
  content: ""; position: absolute; left: 8px; top: 8px; width: 18px; height: 18px;
  border-radius: 50%; border: 3px solid var(--red); opacity: .8;
}
.q__all { align-self: flex-start; }

/* ⑦ 答え合わせ */
.ans { display: flex; flex-direction: column; gap: 11px; }
.ans__lead { font-size: 13.5px; color: rgba(255, 247, 232, .82); }
.ans__grid { display: grid; gap: 11px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .ans__grid { grid-template-columns: repeat(3, 1fr); } }

.flip { perspective: 1000px; }
.flip__in {
  position: relative; transform-style: preserve-3d;
  animation: flipcard .75s var(--ease-pop) both; animation-delay: var(--d);
}
@keyframes flipcard { from { transform: rotateY(0deg); } to { transform: rotateY(180deg); } }
.flip__front, .flip__back { backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: var(--r); border: var(--line-thick); }
.flip__front {
  position: relative; transform: rotateY(180deg);
  display: flex; flex-direction: column; gap: 6px; padding: 13px;
  background: var(--paper); color: var(--ink); min-height: 156px;
  box-shadow: var(--shadow-sm);
}
.flip.is-hit .flip__front { background: linear-gradient(155deg, #FFF3CE, var(--gold)); }
.flip.is-miss .flip__front { background: #E5E1DA; color: #55505E; }
.flip__back {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: linear-gradient(150deg, var(--stage-3), var(--stage-2)); color: var(--gold);
}
.flip__q { font-family: var(--font-display); font-size: 40px; line-height: 1; }
.flip__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.flip__no { font-family: var(--font-body); font-weight: 900; font-size: 11.5px; letter-spacing: .08em; }
.flip__badge { font-size: 10.5px; font-weight: 700; padding: 4px 9px; border-radius: var(--r-pill); border: 2px solid var(--ink); white-space: nowrap; }
.flip__badge--hit { background: var(--red); color: #fff; }
.flip__badge--miss { background: rgba(27, 23, 38, .1); color: #55505E; }
.flip__lab { font-family: var(--font-display); font-size: 16px; line-height: 1.3; text-wrap: balance; }
.flip__det { font-size: 12.5px; line-height: 1.55; }

.mines { margin-top: 4px; }
.mines__h { display: flex; align-items: center; gap: 7px; font-family: var(--font-display); font-size: 14.5px; color: var(--paper); margin-bottom: 8px; }
.mines__h svg { width: 19px; height: 19px; color: var(--red); }
.mines__l { display: flex; flex-direction: column; gap: 6px; }
.mines__i {
  display: flex; align-items: center; gap: 9px; padding: 9px 12px;
  border-radius: var(--r-sm); border: 2px solid rgba(255, 247, 232, .22);
  background: rgba(27, 23, 38, .42); font-size: 13px;
}
.mines__i.is-hit { border-color: var(--red); background: rgba(230, 62, 43, .2); }
.mines__mark { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255, 247, 232, .3); font-family: var(--font-display); font-size: 12px; }
.mines__i.is-hit .mines__mark { background: var(--red); border-color: var(--red); color: #fff; }
.mines__lab { flex: 1; min-width: 0; font-weight: 700; }
.mines__st { flex: none; font-size: 11px; color: rgba(255, 247, 232, .66); }
.mines__i.is-hit .mines__st { color: #FFD9D3; }

/* ⑧ こう言えば一発だった */
.killer { display: flex; flex-direction: column; gap: 6px; border-width: 4px; }
.killer__k { font-family: var(--font-display); font-size: 11.5px; letter-spacing: .12em; color: var(--red-deep); }
.killer__v { font-family: var(--font-display); font-size: 19px; line-height: 1.42; text-wrap: balance; }

/* ⑨ 相手からのひとこと */
.fromfoe { display: flex; gap: 12px; align-items: flex-start; }
.fromfoe__b {
  position: relative; flex: 1; min-width: 0;
  padding: 13px 15px; border: var(--line); border-radius: var(--r);
  background: var(--paper); color: var(--ink); box-shadow: var(--shadow-sm);
}
.fromfoe__b::before { content: ""; position: absolute; left: -13px; top: 26px; width: 0; height: 0; border: 11px solid transparent; border-right-color: var(--ink); border-left: 0; }
.fromfoe__k { font-size: 11px; font-weight: 700; color: #6C6478; }
.fromfoe__v { font-family: var(--font-hand); font-size: 16.5px; line-height: 1.5; margin-top: 3px; }

/* ⑩ AI審査員のひとこと */
.fromjudge { background: linear-gradient(160deg, #2A2148, #191233); color: var(--paper); border-color: var(--gold); }
.fromjudge__top { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.fromjudge__badge { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: var(--ink); border: 2.5px solid var(--ink); flex: none; }
.fromjudge__badge svg { width: 20px; height: 20px; }
.fromjudge__k { font-family: var(--font-display); font-size: 14.5px; color: var(--gold); }
.fromjudge__v { font-size: 14.5px; line-height: 1.66; }

/* ⑪ WizTryの研修メモ */
.memo { background: #FFFDF7; border-color: #2B2540; box-shadow: 4px 4px 0 #2B2540; }
.memo__top { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.memo__rule { flex: none; width: 5px; height: 22px; border-radius: 3px; background: linear-gradient(180deg, var(--gold), var(--orange)); }
.memo__k { font-family: var(--font-body); font-weight: 900; font-size: 14px; letter-spacing: .04em; }
.memo__v { font-size: 15px; line-height: 1.7; }
.memo__note { margin-top: 10px; padding-top: 10px; border-top: 1.5px solid rgba(27, 23, 38, .16); font-size: 12.5px; line-height: 1.6; color: #55505E; }
.memo__link { display: inline-flex; align-items: center; gap: 6px; margin-top: 9px; min-height: 48px; font-size: 13px; font-weight: 700; color: #2B2540; text-decoration-color: rgba(43, 37, 64, .4); }
.memo__link svg { width: 17px; height: 17px; }

/* ⑫ ボタン */
.rbtns { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.rbtns__row { display: flex; gap: 10px; }
.rbtns__row .btn { flex: 1; min-width: 0; font-size: 14px; padding: 12px 10px; }
.rbtns__row .btn svg { width: 18px; height: 18px; }

/* ============================================================ 順位表 */
.rank__scope .seg__b { min-height: 52px; }
.rank__stages {
  display: flex; gap: 7px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none;
  mask-image: linear-gradient(90deg, #000 0 92%, transparent);          /* 右へ続くのが分かるように */
  -webkit-mask-image: linear-gradient(90deg, #000 0 92%, transparent);
}
.rank__stages::-webkit-scrollbar { display: none; }
.rank__stage {
  flex: none; min-height: 48px; padding: 8px 15px; border-radius: var(--r-pill);
  border: 2px solid rgba(255, 247, 232, .34); background: rgba(27, 23, 38, .42); color: var(--paper);
  font-size: 12.5px; font-weight: 700; white-space: nowrap; cursor: pointer;
}
.rank__stage.is-on { background: var(--gold); color: var(--ink); border-color: var(--ink); }
.rank__sum { font-size: 12.5px; color: rgba(255, 247, 232, .6); }
.rank__list { display: flex; flex-direction: column; gap: 9px; }
.rank__empty { text-align: center; padding: 34px 18px; }
.rank__emptyt { font-family: var(--font-display); font-size: 17px; }
.rank__emptys { font-size: 13px; color: #6C6478; margin-top: 5px; }

.rrow {
  display: flex; align-items: center; gap: 11px; padding: 11px 13px;
  background: var(--paper); color: var(--ink);
  border: var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm);
}
.rrow__place { flex: none; display: flex; align-items: baseline; gap: 1px; width: 2.9em; justify-content: center; }
.rrow__p { font-family: var(--font-display); font-size: 25px; line-height: 1; font-variant-numeric: tabular-nums; }
.rrow__pu { font-size: 11px; }
.rrow--gold, .rrow--silver, .rrow--bronze { border-width: 4px; }
.rrow--gold { background: linear-gradient(140deg, #FFF3CE, var(--gold)); border-color: #A9791A; box-shadow: 5px 5px 0 #A9791A; }
.rrow--silver { background: linear-gradient(140deg, #FBFBFB, #D8D8DE); border-color: #7C7C88; box-shadow: 5px 5px 0 #7C7C88; }
.rrow--bronze { background: linear-gradient(140deg, #F6DCC0, #D9A377); border-color: #8A5A32; box-shadow: 5px 5px 0 #8A5A32; }
.rrow--gold .rrow__p, .rrow--silver .rrow__p, .rrow--bronze .rrow__p { font-size: 30px; }

.rrow__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rrow__l1 { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.rrow__name { font-family: var(--font-display); font-size: 17px; line-height: 1.2; }
.rrow__title { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: var(--r-pill); background: rgba(27, 23, 38, .82); color: var(--gold); }
.rrow__l2 { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12px; color: #55505E; }
.rrow__vs { color: #6C6478; }
.rrow__l3 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 3px; }
.rrow__l3 .tag { font-size: 10.5px; padding: 3px 8px; border-width: 1.5px; }
.rrow__when, .rrow__dur { font-size: 10.5px; color: #8D8598; font-variant-numeric: tabular-nums; }
.rrow__score { flex: none; display: flex; align-items: baseline; gap: 2px; }
.rrow__score b { font-family: var(--font-display); font-size: 27px; line-height: 1; font-variant-numeric: tabular-nums; }
.rrow__su { font-size: 11px; }

/* ============================================================ オリジナルステージ */
.cst__lead { font-size: 13.5px; line-height: 1.6; color: rgba(255, 247, 232, .82); }
.cst__form { display: flex; flex-direction: column; gap: 14px; }
.cst__field { position: relative; }
.cst__count { position: absolute; right: 2px; top: 1px; font-size: 11px; color: #8D8598; font-weight: 700; }
.cst__ex { display: flex; flex-direction: column; gap: 7px; }
.cst__exk { font-family: var(--font-body); font-weight: 900; font-size: 12.5px; color: #6C6478; }
.cst__exb { display: flex; gap: 7px; flex-wrap: wrap; }
.cst__exb .btn { font-size: 12px; }
.cst__err { padding: 11px 14px; border-radius: var(--r-sm); background: rgba(230, 62, 43, .14); border: 2px solid var(--red); color: var(--red-deep); font-size: 13.5px; font-weight: 700; }
.cst__warn { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; line-height: 1.55; color: #6C6478; }
.cst__warn svg { width: 17px; height: 17px; flex: none; margin-top: 2px; color: var(--green); }

.cst__made { display: flex; flex-direction: column; gap: 11px; }
.cst__card { display: flex; flex-direction: column; gap: 11px; }
.cst__cardtop { display: flex; gap: 14px; align-items: center; }
.cst__cardb { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.cst__nick { font-family: var(--font-body); font-weight: 900; font-size: 12px; padding: 5px 9px; border-radius: 4px; background: var(--red); color: #fff; transform: rotate(-1.5deg); }
.cst__name { font-size: 21px; line-height: 1.2; -webkit-text-stroke-width: 5px; }
.cst__role { font-size: 12px; color: rgba(255, 247, 232, .72); }
.cst__one { font-size: 13px; line-height: 1.55; color: rgba(255, 247, 232, .88); }
.cst__mission { display: flex; gap: 9px; align-items: baseline; font-size: 13.5px; line-height: 1.55; padding-top: 10px; border-top: 2px dotted rgba(255, 247, 232, .24); }
.cst__mk { flex: none; font-family: var(--font-body); font-weight: 900; font-size: 11.5px; padding: 4px 9px; border-radius: var(--r-pill); background: var(--gold); color: var(--ink); }

.cst__saved { display: flex; flex-direction: column; gap: 9px; }
.cst__row { display: flex; align-items: center; gap: 11px; padding: 10px 11px; }
.cst__rowb { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; text-align: left; background: none; border: none; cursor: pointer; padding: 6px 0; min-height: 48px; justify-content: center; }
.cst__rowt { font-family: var(--font-display); font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cst__rows { font-size: 11.5px; color: #6C6478; }
.cst__del { flex: none; border-color: rgba(27, 23, 38, .3); background: rgba(27, 23, 38, .05); color: var(--ink); min-width: 48px; justify-content: center; }
.cst__del:hover { background: rgba(230, 62, 43, .12); }

.wait { display: flex; flex-direction: column; align-items: center; gap: 11px; padding: 26px 18px; text-align: center; }
.wait__door { position: relative; width: 108px; height: 130px; border: 4px solid var(--ink); border-radius: 54px 54px 6px 6px; background: linear-gradient(180deg, #120D26, #241A45); overflow: hidden; }
.wait__silh {
  position: absolute; left: 50%; bottom: -8px; width: 62px; height: 86px; transform: translateX(-50%);
  background: radial-gradient(circle at 50% 22%, #0B0818 0 30%, transparent 31%), linear-gradient(180deg, transparent 0 26%, #0B0818 26%);
  border-radius: 31px 31px 0 0;
  animation: silh 2.6s ease-in-out infinite;
}
@keyframes silh { 0%, 100% { transform: translateX(-50%) translateY(14px); opacity: .55; } 50% { transform: translateX(-50%) translateY(0); opacity: 1; } }
.wait__beam { position: absolute; left: 50%; top: 0; width: 150%; height: 100%; transform: translateX(-50%); background: conic-gradient(from 160deg at 50% 0%, transparent 0deg 14deg, rgba(255, 201, 60, .35) 14deg 26deg, transparent 26deg 40deg); }
.wait__t { font-size: 21px; -webkit-text-stroke-width: 6px; }
.wait__line { font-size: 13px; color: rgba(255, 247, 232, .8); min-height: 1.6em; }
.wait__bar { width: 100%; max-width: 260px; height: 11px; border: 2.5px solid var(--ink); border-radius: var(--r-pill); background: rgba(0, 0, 0, .3); overflow: hidden; }
.wait__bar i { display: block; height: 100%; width: 42%; border-radius: var(--r-pill); background: repeating-linear-gradient(115deg, var(--gold) 0 10px, var(--orange) 10px 20px); animation: waitbar 1.5s var(--ease-out) infinite; }
@keyframes waitbar { 0% { transform: translateX(-110%); } 100% { transform: translateX(260%); } }

/* ============================================================ 設定 */
.setg { display: flex; flex-direction: column; gap: 4px; }
.setg > .sw + .sw { border-top: 2px dotted rgba(27, 23, 38, .18); }
.setg .opts__row { padding: 6px 0; }
.setg .seg { flex-wrap: wrap; }
.setg .note { margin: 4px 0; }
.vol { display: flex; flex-direction: column; gap: 7px; padding: 8px 0; }
.vol__k { display: flex; align-items: center; gap: 7px; font-family: var(--font-display); font-size: 15px; }
.vol__k svg { width: 19px; height: 19px; color: var(--orange); }
.vol__row { display: flex; align-items: center; gap: 12px; }
.vol__v { flex: none; width: 2.4em; text-align: right; font-family: var(--font-display); font-size: 15px; font-variant-numeric: tabular-nums; }
.vol__i { flex: 1; -webkit-appearance: none; appearance: none; height: 48px; background: transparent; cursor: pointer; }
.vol__i::-webkit-slider-runnable-track { height: 13px; border-radius: var(--r-pill); border: 2.5px solid var(--ink); background: linear-gradient(90deg, var(--gold), var(--orange)); }
.vol__i::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; margin-top: -8.5px; border-radius: 50%; background: var(--paper); border: 3px solid var(--ink); box-shadow: var(--shadow-sm); }
.vol__i:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: var(--r-pill); }

/* ============================================================ このアプリについて */
.ab__hero { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 22px 18px; }
.ab__catch { font-family: var(--font-display); font-size: clamp(13px, 3.9vw, 17px); line-height: 1.4; color: var(--gold); white-space: nowrap; }
.ab__lead { font-size: 13.5px; line-height: 1.75; color: rgba(255, 247, 232, .86); }

.ab__stack { display: flex; flex-direction: column; gap: 0; }
.ab__layer {
  position: relative; display: flex; gap: 14px; align-items: center;
  padding: 15px; background: var(--paper); color: var(--ink);
  border: var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm);
}
.ab__layer + .ab__layer { margin-top: 26px; }
.ab__layer + .ab__layer::before {
  content: ""; position: absolute; left: 50%; top: -22px; transform: translateX(-50%);
  width: 0; height: 0; border: 11px solid transparent; border-top-color: var(--gold); border-bottom: 0;
}
.ab__art { flex: none; width: 108px; }
.ab__art svg { width: 100%; height: auto; }
.ab__lb { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ab__no {
  position: absolute; left: -9px; top: -9px;
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--red); color: #fff; border: 2.5px solid var(--ink);
  font-family: var(--font-display); font-size: 14px;
}
.ab__k { font-size: 11px; letter-spacing: .18em; color: var(--red-deep); font-weight: 700; }
.ab__t { font-family: var(--font-display); font-size: 17px; line-height: 1.25; }
.ab__d { font-size: 12.5px; line-height: 1.66; color: #4A4358; margin-top: 3px; }
@media (max-width: 460px) {
  .ab__layer { flex-direction: column; align-items: stretch; }
  .ab__art { width: 100%; max-width: 190px; align-self: center; }
}

.ab__safe { display: flex; flex-direction: column; gap: 13px; }
.ab__safei { display: flex; gap: 12px; align-items: flex-start; }
.ab__safeic { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--green); color: #fff; border: 2.5px solid var(--ink); }
.ab__safeic svg { width: 21px; height: 21px; }
.ab__safet { font-family: var(--font-display); font-size: 15px; }
.ab__safed { font-size: 12.5px; line-height: 1.65; color: #4A4358; margin-top: 2px; }

.ab__sis { display: flex; flex-direction: column; gap: 6px; background: linear-gradient(160deg, #FFFDF7, #F4EEE0); }
.ab__sisn { font-family: var(--font-display); font-size: 19px; }
.ab__sisd { font-size: 12.5px; color: var(--red-deep); font-weight: 700; }
.ab__sist { font-size: 13px; line-height: 1.7; color: #4A4358; margin: 4px 0 8px; }
.ab__fine { font-size: 11.5px; color: rgba(255, 247, 232, .5); text-align: center; }

/* ============================================================ 動きを減らす／スタジオ */
html[data-reduce-motion="1"] .flip__in,
html[data-reduce-motion="1"] .axes__fill { animation-delay: 0s !important; }
@media (prefers-reduced-motion: reduce) {
  .flip__in, .axes__fill { animation-delay: 0s !important; }
  .ttl__face, .band__burst, .wait__bar i, .wait__silh { animation: none !important; }
}

html[data-studio="1"] .band__t { font-size: 54px; }
html[data-studio="1"] .score__v { font-size: 76px; }
html[data-studio="1"] .rrow__l3 { display: none; }
html[data-studio="1"] .rank__stages { flex-wrap: wrap; overflow: visible; mask-image: none; -webkit-mask-image: none; }
html[data-studio="1"] .rank__sum { font-size: 14px; }
.wait__note { margin: 6px 0 0; font-size: 13px; opacity: .78; text-align: center; }
