/* 1台でいっしょに */
.issho-hero { text-align: center; padding: 8px 0 4px; }
.issho-hero .lead { max-width: 30em; margin: 0 auto 8px; }
.koma-pair { display: flex; justify-content: center; gap: 4px; }
.issho-games { display: grid; gap: 12px; }
.issho-card { text-align: left; font: inherit; color: inherit; cursor: pointer; width: 100%; }
.issho-card:hover { border-color: var(--accent); }

html.is-playing, html.is-playing body { overflow: hidden; }
.stage {
  position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column;
  background: #FFF8EE; color: #40332E;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.stage[hidden] { display: none; }
.half { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; transition: background .12s; }
.half.top { background: #E6F5EC; }
.half.bottom { background: #FFF0DF; }
.half.top .half-inner { transform: rotate(180deg); }
.half.hit.top { background: #C9EBD6; }
.half.hit.bottom { background: #FFDDB5; }
.half-inner { padding: 12px; }
.koma { display: flex; justify-content: center; }
.msg { font-size: clamp(30px, 9vw, 48px); font-weight: 800; margin: 6px 0 0; line-height: 1.3; }
.sub { font-size: 15px; color: #7A6A60; margin: 4px 0 0; min-height: 1.5em; }
.mid { position: relative; height: 0; border-top: 2px dashed #D9C8B8; }
.flag {
  position: absolute; left: 50%; top: 0; width: 64px; height: 18px; border-radius: 9px;
  background: #F2B33D; border: 3px solid #40332E; transform: translate(-50%, -50%); transition: transform .08s linear; z-index: 2;
}
.flag[hidden] { display: none; }
.quit {
  position: absolute; right: 10px; top: 0; transform: translateY(-50%); z-index: 3;
  width: 44px; height: 44px; border-radius: 50%; border: 2px solid #D9C8B8; background: #fff; color: #40332E;
  font-size: 22px; line-height: 1; cursor: pointer;
}
.result { position: absolute; inset: 0; background: rgba(64, 51, 46, .45); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 5; }
.result[hidden] { display: none; }
.result-card { background: #FFFDF9; color: #40332E; border-radius: 24px; padding: 22px 20px; width: min(360px, 100%); text-align: center; display: grid; gap: 10px; }
.res-label { margin: 0; font-weight: 700; color: #7A6A60; }
.res-num { margin: 0; font-size: 48px; font-weight: 900; line-height: 1.1; color: #C4364F; }
.res-num.is-small { font-size: 30px; }
.res-detail { margin: 0; font-size: 15px; line-height: 1.6; }
.result-card .btn-ghost { color: #40332E; border-color: #D9C8B8; }
@media (prefers-reduced-motion: reduce) { .flag, .half { transition: none; } }

/* 全画面で遊ぶゲーム（ものさしヒント・じんとりペイント） */
.stage.is-full .half { visibility: hidden; }
.stage.is-full .mid { position: absolute; top: 0; left: 0; right: 0; border: 0; z-index: 6; }
.stage.is-full .quit { top: 30px; }
.paint { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; touch-action: none; }
.paint[hidden] { display: none; }
.mono {
  position: absolute; inset: 0; z-index: 2; overflow-y: auto; touch-action: auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 64px 20px 28px; text-align: center; background: #FFF8EE;
}
.mono[hidden] { display: none; }
.mono-round { margin: 0; font-size: 14px; color: #7A6A60; font-weight: 700; }
.mono-who { margin: 0; font-size: 22px; font-weight: 800; }
.mono-theme { display: flex; justify-content: space-between; width: min(420px, 100%); font-weight: 800; font-size: 17px; gap: 8px; }
.mono-theme span:last-child { text-align: right; }
.mono-meter { width: min(420px, 100%); height: auto; touch-action: none; }
.mono-meter.is-drag { cursor: grab; }
.mono-meter:focus-visible { outline: 3px solid #F2B33D; outline-offset: 4px; border-radius: 8px; }
.m-base { fill: #FFFDF9; stroke: #40332E; stroke-width: 2.5; }
.m-b2 { fill: #FFE2C2; }
.m-b3 { fill: #FFC078; }
.m-b4 { fill: #F28C1B; }
.m-needle { stroke: #C4364F; stroke-width: 4; stroke-linecap: round; }
.m-needle.is-off { opacity: 0; }
.m-hub { fill: #40332E; }
.mono-msg { margin: 0; max-width: 26em; font-size: 15px; line-height: 1.7; min-height: 3.4em; }
.mono .btn-big { width: min(420px, 100%); }

/* ふりがな・プレイヤー名 */
ruby rt { font-size: .5em; font-weight: 700; letter-spacing: 0; }
.who { margin: 2px 0 0; font-size: 15px; font-weight: 800; color: #7A6A60; }
.names { margin: 8px 0 16px; display: grid; gap: 10px; }
.names-h { margin: 0; font-size: 1.05rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.names-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.names-f { display: grid; gap: 4px; font-size: 14px; font-weight: 700; }
.names-f input {
  font: inherit; font-size: 16px; font-weight: 500; min-height: 44px; padding: 8px 12px; width: 100%;
  border: 2px solid var(--border); border-radius: 12px; background: var(--bg, #fff); color: inherit;
}
.names-f input:focus-visible { outline: 3px solid #F2B33D; outline-offset: 1px; }
.names-note { margin: 0; }
@media (max-width: 360px) { .names-row { grid-template-columns: 1fr; } }
