/* お絵描きパラダイス(2026-10-16): クレヨン/クレパスで描いたような黄土色(オーカー)のテーマ。
   黄土色は画面の色だけ。描く色(10色)には入れない。描く面は白。 */
:root {
  --ochre: #C4934F;      /* メイン */
  --ochre-d: #AA7737;    /* 濃いアクセント */
  --ochre-l: #E9CF9F;
  --paper: #F8F1DF;      /* 画用紙の生成り */
  --card: #FFFDF6;       /* カード・描画まわり */
  --ink: #473A2D;        /* 文字 */
  --ink-2: #7A6A58;
  --red: #D9573B;
  --ok: #5E9B4A;
  --line: #D9C6A2;
  --r: 18px;
  font-family: 'Hiragino Maru Gothic ProN', 'Hiragino Sans', 'BIZ UDPGothic', 'Meiryo', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background-color: var(--paper);
  /* 画用紙のざらつき(うすく) */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .35 0 0 0 0 .2 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E");
  overscroll-behavior: none;
  -webkit-user-select: none; user-select: none;
  -webkit-text-size-adjust: 100%;
}
input, textarea { -webkit-user-select: text; user-select: text; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
h1, h2, h3, .btn, .bigcode, .timer .tnum, .topic, .step, .ttl { font-family: 'Yusei Magic', 'Hiragino Maru Gothic ProN', sans-serif; font-weight: 400; }
#app { max-width: 560px; margin: 0 auto; min-height: 100dvh; padding: 0 16px calc(24px + env(safe-area-inset-bottom)); }
.hidden { display: none !important; }

/* クレヨンのふち: ::before に枠を描いて、SVG フィルタで少しゆらす(文字はゆらさない) */
.cr, .btn { position: relative; isolation: isolate; }
.cr::before, .btn::before {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  border: 2.5px solid var(--bd, var(--ochre)); background: var(--bg, var(--card));
  filter: url(#crayon);
}

.card { --bg: var(--card); border-radius: var(--r); padding: 16px; margin: 14px 0; }
.card h2 { font-size: 20px; margin: 0 0 10px; display: flex; align-items: baseline; gap: 8px; }
.card h3 { font-size: 16px; margin: 12px 0 8px; }
.lbl { margin: 0 0 4px; font-size: 13px; color: var(--ink-2); font-weight: 700; }
.hint { font-size: 13px; color: var(--ink-2); margin: 6px 0; line-height: 1.6; }
.center { display: grid; place-items: center; min-height: 50dvh; text-align: center; }
.loading { color: var(--ink-2); }
.warn { color: var(--red); }
.row { display: flex; gap: 10px; align-items: center; }
.center-row { justify-content: center; }

.btn {
  --bg: var(--ochre); --bd: var(--ochre-d);
  border: 0; background: none; color: #fff; border-radius: 16px;
  min-height: 48px; padding: 10px 20px; font-size: 19px; letter-spacing: .04em;
  text-shadow: 0 1px 0 rgba(90, 55, 15, .35);
  transition: transform .08s;
}
.btn:active:not(:disabled) { transform: translateY(2px) scale(.98); }
.btn.big { display: block; width: 100%; min-height: 58px; font-size: 23px; margin: 12px 0 6px; }
.btn.sm { min-height: 40px; font-size: 16px; padding: 6px 14px; }
.btn.ghost { --bg: var(--card); --bd: var(--ochre); color: var(--ochre-d); text-shadow: none; }
.btn:disabled { opacity: .45; }

input, textarea {
  font: inherit; font-size: 18px; color: var(--ink); width: 100%;
  border: 2px solid var(--line); border-radius: 14px; background: #fff; padding: 12px 14px; outline: none;
}
input:focus, textarea:focus { border-color: var(--ochre); }
textarea { resize: none; line-height: 1.5; }

/* ---------- ホーム ---------- */
.home { padding-top: calc(10px + env(safe-area-inset-top)); }
.top { display: inline-block; color: var(--ochre-d); text-decoration: none; font-weight: 700; padding: 8px 0; }
.logo { text-align: center; margin: 22px 0 14px; position: relative; z-index: 1; }
.logo h1 { margin: 0; font-size: 40px; line-height: 1.1; color: var(--ochre-d); display: flex; flex-direction: column; }
.logo h1 span:last-child { font-size: 52px; color: var(--ink); }
.scribble { display: block; width: min(260px, 80%); height: auto; margin: 6px auto 0; }
.logo .sub { margin: 6px 0 0; color: var(--ink-2); }
.field { display: block; margin: 10px 0; }
.field span { display: block; font-weight: 700; margin-bottom: 6px; }
.code-in { font-family: 'Yusei Magic', sans-serif; font-size: 28px; letter-spacing: .3em; text-align: center; flex: 1; min-width: 0; }
.home .row .btn { flex: none; }
.or { text-align: center; color: var(--ink-2); margin: 4px 0; font-size: 14px; }
.msg { min-height: 1.6em; text-align: center; color: var(--red); font-weight: 700; }

/* ---------- 上のバー ---------- */
.bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: calc(8px + env(safe-area-inset-top)) 0 8px; background: var(--paper); border-bottom: 2px dashed var(--line); margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.bar .rc { font-size: 14px; color: var(--ink-2); }
.bar .rc b { font-family: 'Yusei Magic', sans-serif; font-size: 20px; color: var(--ink); letter-spacing: .1em; }
.bar .who { flex: 1; text-align: right; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .x { border: 2px solid var(--line); background: var(--card); border-radius: 12px; padding: 6px 12px; font-size: 14px; font-weight: 700; color: var(--ink-2); min-height: 38px; }
.crown { display: inline-block; width: 18px; height: 14px; vertical-align: -1px; background: var(--ochre); clip-path: polygon(0 100%, 0 25%, 25% 60%, 50% 0, 75% 60%, 100% 25%, 100% 100%); }

/* ---------- 待合室 ---------- */
.codebox { text-align: center; }
.bigcode { font-size: 64px; margin: 0; letter-spacing: .18em; color: var(--ochre-d); line-height: 1.1; padding-left: .18em; }
.cnt { font-family: inherit; font-size: 15px; color: var(--ink-2); font-weight: 700; }
.members { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.members li { display: flex; align-items: center; gap: 6px; background: var(--paper); border-radius: 12px; padding: 10px; font-weight: 700; min-width: 0; }
.members li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.members li em { font-style: normal; font-size: 11px; background: var(--ochre); color: #fff; border-radius: 8px; padding: 1px 6px; margin-left: auto; flex: none; }
.members .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); flex: none; }
.members li.away .dot { background: #bbb; }
.members li.away { color: var(--ink-2); }
.pend { list-style: none; margin: 0; padding: 0; }
.pend li { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.pend li span { flex: 1; font-weight: 700; }
.modes { display: grid; gap: 10px; }
.mode { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 10px; text-align: left; padding: 12px; border-radius: 16px; border: 2.5px solid var(--line); background: #fff; }
.mode svg { grid-row: 1 / 3; width: 44px; height: 44px; color: var(--ink-2); background: var(--paper); border-radius: 12px; padding: 6px; }
.mode b { font-family: 'Yusei Magic', sans-serif; font-weight: 400; font-size: 19px; }
.mode span { font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.mode.on { border-color: var(--ochre); background: #FFF6E3; box-shadow: 0 3px 0 var(--ochre-l); }
.mode.on svg { color: #fff; background: var(--ochre); }
.mode:disabled { opacity: 1; }
.mode:disabled:not(.on) { opacity: .55; }
.sethd { font-weight: 700; color: var(--ochre-d); margin: 12px 0 4px; font-size: 14px; }
.sethd:first-child { margin-top: 0; }
.set { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.set:last-child { border-bottom: 0; }
.set > span { font-weight: 700; font-size: 15px; }
.seg { display: inline-flex; background: var(--paper); border-radius: 12px; padding: 3px; flex: none; }
.seg button { border: 0; background: none; min-height: 38px; min-width: 52px; padding: 4px 10px; border-radius: 10px; font-weight: 700; font-size: 14px; color: var(--ink-2); }
.seg button.on { background: var(--ochre); color: #fff; box-shadow: 0 2px 0 var(--ochre-d); }
.seg button:disabled:not(.on) { opacity: .6; }
.startbox { margin-top: 6px; text-align: center; }
.waitline { text-align: center; color: var(--ink-2); font-weight: 700; }

/* 待っている点々 */
.dots { display: inline-flex; gap: 6px; justify-content: center; margin: 8px 0 0 6px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--ochre); animation: bob 1.2s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes bob { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-5px); opacity: 1; } }

/* ---------- 進行中 ---------- */
.phase-hd { display: flex; align-items: center; gap: 12px; margin: 10px 0 0; }
.step { margin: 0; font-size: 18px; flex: 1; color: var(--ochre-d); }
.timer { display: flex; align-items: center; gap: 8px; flex: none; }
.timer .tnum { font-size: 30px; min-width: 2.2ch; text-align: right; line-height: 1; }
.timer .tbar { width: 72px; height: 12px; border-radius: 8px; background: var(--ochre-l); overflow: hidden; display: block; }
.timer .tbar b { display: block; height: 100%; background: var(--ochre); border-radius: 8px; transition: width .25s linear; }
.timer.hurry .tnum { color: var(--red); }
.timer.hurry .tbar b { background: var(--red); }
.timer.paused { opacity: .5; }
.count { flex: 1; color: var(--ink-2); font-size: 14px; }
.waitcard { min-width: 260px; }
.big-msg { font-size: 18px; font-weight: 700; margin: 4px 0; line-height: 1.6; }
.prog { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.prog li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: var(--paper); font-size: 14px; font-weight: 700; color: var(--ink-2); }
.prog li i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); background: #fff; }
.prog li.ok { color: var(--ink); }
.prog li.ok i { background: var(--ok); border-color: var(--ok); }
.prog li.away i { background: #ccc; border-color: #ccc; }
.prog li.left { text-decoration: line-through; opacity: .6; }

.ref { margin: 8px 0; padding: 8px 12px; display: flex; align-items: center; gap: 12px; }
.ref .lbl { margin: 0; }
.ref .hint { margin: 2px 0 0; font-size: 12px; }
.ref .topic { margin: 0; font-size: 22px; flex: 3; }
.reftx { flex: 1; min-width: 0; }
.refimg { border: 0; padding: 0; background: #fff; border-radius: 10px; width: 84px; height: 84px; flex: none; box-shadow: 0 0 0 2px var(--line); overflow: hidden; }
.refimg img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* 描く面: 白。白いクレヨンも見えるよう、うすい枠 */
.padwrap { position: relative; margin: 6px auto 0; width: min(100%, calc(100dvh - 390px - env(safe-area-inset-top) - env(safe-area-inset-bottom))); min-width: 220px; }
.padwrap.wide { width: 100%; }
.pad { display: block; width: 100%; aspect-ratio: 1; background: #fff; border-radius: 14px; box-shadow: 0 0 0 2px var(--line), 0 3px 0 2px var(--ochre-l); touch-action: none; }
.padnote { position: absolute; left: 0; right: 0; top: 8px; text-align: center; margin: 0; font-size: 13px; color: #bbb; pointer-events: none; }
.tools { margin-top: 8px; }
.padwrap.wide .pad { aspect-ratio: 2; }
.pal { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; }
.col { aspect-ratio: 1; border-radius: 50%; border: 0; background: var(--c); box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, .18); padding: 0; min-height: 28px; transition: transform .1s; }
.col.on { transform: scale(1.12); box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, .18), 0 0 0 3px #fff, 0 0 0 5.5px var(--ink); }
.tools2 { margin-top: 8px; gap: 4px; flex-wrap: nowrap; justify-content: space-between; }
.sizes { display: flex; gap: 4px; background: var(--paper); border-radius: 12px; padding: 3px; }
.sz { width: 38px; height: 42px; border: 0; background: none; border-radius: 10px; display: grid; place-items: center; }
.sz i { width: var(--w); height: var(--w); max-width: 22px; max-height: 22px; border-radius: 50%; background: var(--ink); }
.sz.on { background: #fff; box-shadow: 0 0 0 2px var(--ochre); }
.tl { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; border: 0; background: var(--paper); border-radius: 12px; flex: 1; min-width: 0; height: 48px; padding: 2px 2px; white-space: nowrap; font-size: 11px; font-weight: 700; color: var(--ink-2); }
.tl svg { width: 22px; height: 22px; }
.tl.on { background: var(--ochre); color: #fff; }

/* 描く画面は「完成!」まで1画面に */
.stage.drawing .btn.big { margin-top: 10px; min-height: 54px; }

/* ---------- 発表 ---------- */
.stage.result { padding-bottom: 150px; }
.ttl { text-align: center; font-size: 26px; color: var(--ochre-d); margin: 16px 0 4px; }
.chain-topic, .chain-item { padding: 10px 0; border-bottom: 2px dashed var(--line); }
.chain-item:last-child { border-bottom: 0; }
.topic { font-size: 26px; margin: 2px 0; line-height: 1.35; word-break: break-all; }
.pic { background: #fff; border-radius: 12px; box-shadow: 0 0 0 2px var(--line); aspect-ratio: 1; overflow: hidden; display: grid; place-items: center; }
.pic img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pic img:not([src]) { visibility: hidden; }
.pic.skip { background: repeating-linear-gradient(45deg, #f6efe0 0 10px, #fff 10px 20px); color: var(--ink-2); font-weight: 700; }
.pic.skip img { display: none; }
.chain-item .pic { width: min(100%, 420px); margin: 0 auto; }
.chain-item.answer .pic { aspect-ratio: 2; }
.chain.all { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.chain.all .chain-topic, .chain.all .chain-item.answer { grid-column: 1 / -1; }
.chain.all .chain-item { border-bottom: 0; padding: 6px 0; }
.chain.all .chain-item.answer .pic { width: 100%; }
.chain-item.answer .lbl b { background: var(--ochre); color: #fff; border-radius: 8px; padding: 1px 8px; margin-right: 4px; }
.pop { animation: pop .45s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; } /* 2列はいつも同じ幅(中身が長いと片方だけ広がっていた 2026-10-18) */
.grid figure { margin: 0; min-width: 0; }
.grid figcaption { text-align: center; font-weight: 700; font-size: 14px; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid figcaption em { font-style: normal; font-size: 11px; background: var(--ochre); color: #fff; border-radius: 8px; padding: 1px 6px; margin-left: 4px; }
.hostbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--paper) 22%); max-width: 560px; margin: 0 auto; }
.hostbar .btn { width: 100%; margin: 6px 0 0; }
.hostbar .btn.big { margin-top: 0; }
.hostbar .waitline { margin: 18px 0 6px; }

/* ---------- 重ねて出すもの ---------- */
.overlay { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px; background: rgba(71, 58, 45, .55); }
.pausecard { max-width: 380px; text-align: center; }
.pausecard .btn { width: 100%; margin-top: 8px; }
.zoom img { max-width: 100%; max-height: 90dvh; background: #fff; border-radius: 14px; }
.toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 30; background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: 15px; box-shadow: 0 4px 12px rgba(0, 0, 0, .2); max-width: calc(100% - 32px); text-align: center; }

@media (max-width: 360px) {
  .bigcode { font-size: 52px; }
  .members { grid-template-columns: 1fr; }
  .tl { min-width: 44px; }
  .sz { width: 36px; height: 36px; }
}
@media (prefers-reduced-motion: reduce) { .pop, .dots i { animation: none; } }

/* 試し描き(ひとりで) */
.solo-btn { display: block; width: 100%; margin-top: 4px; }
.solo-ttl { text-align: left !important; font-family: 'Yusei Magic', sans-serif; font-size: 20px; }
.solo-hint { margin: 10px 0 0; }

/* 書き足し伝言(2026-10-17) */
.kpad { position: relative; }
.prep { position: absolute; left: 0; right: 0; top: 0; aspect-ratio: 1; max-width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; pointer-events: none; background: rgba(255, 253, 246, .78); border-radius: 14px; font-weight: 700; color: var(--ochre-d); }
.prep b { font-family: 'Yusei Magic', sans-serif; font-weight: 400; font-size: 64px; line-height: 1; color: var(--ink); }
.prep.hidden { display: none; }
.kdraw .kpad .prep { width: min(100%, calc(100dvh - 390px - env(safe-area-inset-top) - env(safe-area-inset-bottom))); min-width: 220px; margin: 6px auto 0; }
.kpic { margin: 8px auto 0; width: min(100%, 420px); }
.pic.blank { color: var(--ink-2); font-weight: 700; }
.kline { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; counter-reset: k; }
.kline li { counter-increment: k; padding: 6px 10px; border-radius: 999px; background: var(--paper); font-size: 14px; font-weight: 700; color: var(--ink-2); }
.kline li::before { content: counter(k) ". "; }
.kline li.ok { color: var(--ink); background: #e8f2df; }
.kline li.now { background: var(--ochre); color: #fff; }
.kline li.ans::before { content: ''; }
.kline li.ans em { font-style: normal; font-size: 11px; background: var(--ink); color: #fff; border-radius: 8px; padding: 1px 6px; margin-left: 4px; }
/* 答える画面: 上に絵、下に回答欄(絵の半分の高さ)。2つで1画面に収める */
.kans { width: min(100%, calc((100dvh - 250px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) / 1.5)); min-width: 220px; margin: 0 auto; }
.kans .kpic { width: 100%; margin-top: 6px; }
.kans .padwrap { width: 100%; }
.kans .prep { aspect-ratio: 2; top: 6px; }
.kanswer .tools2 { justify-content: center; }
.kanswer .tl { flex: 0 1 90px; }
.seikai { color: var(--red); font-size: 30px; }
.kfinal .pic { width: min(100%, 420px); margin: 4px auto 8px; }
.ksteps { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ksteps figcaption { font-size: 12px; }

/* BGM のボタン(2026-10-16) */
.homebar { display: flex; align-items: center; justify-content: space-between; }
.bgm { display: inline-flex; align-items: center; gap: 4px; border: 2px solid var(--line); background: var(--card); border-radius: 12px; padding: 6px 10px; min-height: 38px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.bgm svg { width: 18px; height: 18px; }
.bgm.on { background: var(--ochre); border-color: var(--ochre-d); color: #fff; }
.bar .bgm { flex: none; }
.bar .bgm span { display: none; }

/* みんなでお絵描きの発表: 垂れ幕(2026-10-16)。押すと左右に開く。だれの作品かは開く前から下に出す */
.curtains figure { position: relative; }
.curtains .pic { position: relative; }
.curtain { position: absolute; left: 0; right: 0; top: 0; aspect-ratio: 1; border: 0; padding: 0; border-radius: 12px; overflow: hidden; z-index: 2; background: none;
  color: #fff; font-weight: 700; font-size: 14px; line-height: 1.4; text-shadow: 0 1px 2px rgba(0,0,0,.4); display: grid; place-items: center; cursor: pointer; }
.curtain .cl, .curtain .cr2 { position: absolute; top: 0; bottom: 0; width: 51%;
  background: radial-gradient(ellipse at 50% -10%, rgba(255,255,255,.22), transparent 60%), repeating-linear-gradient(90deg, #c0392b 0 18%, #a93226 18% 26%, #cf4a3a 26% 40%);
  box-shadow: inset 0 -10px 0 #8e2a20; transition: transform .8s cubic-bezier(.55,-.1,.3,1); }
.curtain .cl { left: 0; box-shadow: inset 0 -10px 0 #8e2a20, inset -3px 0 0 #7b241c; transform-origin: left; }
.curtain .cr2 { right: 0; box-shadow: inset 0 -10px 0 #8e2a20, inset 3px 0 0 #7b241c; transform-origin: right; }
.curtain .cl::after, .curtain .cr2::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 12px;
  background: radial-gradient(circle at 50% 0, #f1c40f 0 4px, transparent 5px) 0 0 / 16px 12px repeat-x; } /* 金のふさ */
.curtain span { position: relative; z-index: 1; background: rgba(0,0,0,.2); border-radius: 10px; padding: 4px 10px; transition: opacity .3s; }
.curtain:disabled { cursor: default; }
.curtains figure.open .curtain { pointer-events: none; }
.curtains figure.open .cl { transform: translateX(-100%) scaleX(.6); }
.curtains figure.open .cr2 { transform: translateX(100%) scaleX(.6); }
.curtains figure.open .curtain span { opacity: 0; }
.curtains figcaption { display: flex; align-items: center; justify-content: center; gap: 4px; }
@media (prefers-reduced-motion: reduce) { .curtain .cl, .curtain .cr2 { transition: none; } }
.hostnote { margin: 4px 0 6px; font-size: 14px; }
@media (prefers-reduced-motion: reduce) { .curtain { transition: none; } }

/* 絵描きクイズ(2026-10-16) */
.choices { display: grid; gap: 8px; margin-bottom: 10px; }
.choices .btn { width: 100%; font-size: 22px; }
.qview { position: relative; margin: 8px auto 0; width: min(100%, calc(100dvh - 400px)); min-width: 220px; aspect-ratio: 1; background: #fff; border-radius: 14px; box-shadow: 0 0 0 2px var(--line); overflow: hidden; }
.qview img { width: 100%; height: 100%; object-fit: contain; display: block; }
.qview img:not([src]) { visibility: hidden; }
.qblank { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: #bbb; font-weight: 700; }
.qhint { text-align: center; margin: 8px 0; color: var(--ink-2); font-weight: 700; }
.qhint b { letter-spacing: .2em; color: var(--ochre-d); font-size: 18px; }
.qans input { flex: 1; min-width: 0; }
.qans .btn { flex: none; }
.qfeed { margin-top: 10px; padding: 10px 14px; }
.qfeed h3 { margin: 0 0 6px; font-size: 14px; }
.feed { list-style: none; margin: 0; padding: 0; max-height: 132px; overflow-y: auto; }
.feed li { padding: 3px 0; font-size: 15px; border-bottom: 1px dashed var(--line); }
.feed li:last-child { border-bottom: 0; }
.feed li b { color: var(--ochre-d); margin-right: 8px; font-size: 13px; }
.feed li.ok { color: var(--red); font-weight: 700; }
.qdraw .qfeed { margin-top: 8px; }
.qdraw .feed { max-height: 70px; }
.qwin { text-align: center; font-size: 20px; font-weight: 700; margin: 6px 0 10px; }
.qwin b { color: var(--red); }
.scores { list-style: none; margin: 0; padding: 0; }
.scores li { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px dashed var(--line); font-weight: 700; }
.scores li:last-child { border-bottom: 0; }
.scores .rk { width: 28px; height: 28px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; font-family: 'Yusei Magic', sans-serif; flex: none; }
.scores li.top .rk { background: var(--ochre); color: #fff; }
.scores .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scores .nm em { font-style: normal; font-size: 11px; background: var(--ochre); color: #fff; border-radius: 8px; padding: 1px 6px; margin-left: 6px; }
.scores b { font-size: 18px; }
.row .btn.sm { flex: none; white-space: nowrap; }

/* ホームをはなやかに(2026-10-16 ユーザー「トップ画面 はなやかに。もう少し」): 文字ごとのクレヨンの色・まわりの落書き・モードの札 */
.hero { position: relative; padding: 6px 0 2px; }
.logo h1 .t1 { display: flex; justify-content: center; gap: 2px; }
.logo h1 .t1 i { font-style: normal; color: var(--c); display: inline-block; text-shadow: 0 2px 0 rgba(71,58,45,.12); animation: hop 2.4s ease-in-out var(--d) infinite; }
.logo h1 .t1 i:nth-child(odd) { transform: rotate(-4deg); }
.logo h1 .t1 i:nth-child(even) { transform: rotate(3deg); }
@keyframes hop { 0%, 80%, 100% { translate: 0 0; } 88% { translate: 0 -6px; } }
.logo h1 .t2 { font-size: 54px; color: var(--ink); letter-spacing: .02em; }
.doodle { position: absolute; width: 38px; height: 38px; z-index: 0; animation: floaty 4s ease-in-out infinite; opacity: .95; }
.doodle.d1 { left: 2%; top: 14px; animation-delay: -.5s; }
.doodle.d2 { right: 4%; top: 6px; width: 34px; animation-delay: -1.5s; }
.doodle.d3 { right: -2px; top: 104px; width: 42px; height: 42px; animation-delay: -2.2s; }
.doodle.d4 { left: -4px; top: 112px; width: 36px; animation-delay: -1s; }
.doodle.d5 { left: 0; top: 200px; width: 30px; animation-delay: -3s; }
.doodle.d6 { right: -4px; top: 196px; width: 46px; height: 30px; animation-delay: -.2s; }
.doodle.d7 { left: 30%; top: -2px; width: 22px; height: 22px; animation-delay: -2.6s; }
.doodle.d8 { right: 26%; top: 0; width: 26px; height: 26px; animation-delay: -1.2s; }
@keyframes floaty { 0%, 100% { translate: 0 0; rotate: -6deg; } 50% { translate: 0 -6px; rotate: 6deg; } }
.modechips { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.modechips li { font-size: 12px; font-weight: 700; color: var(--c); background: #fff; border: 2px solid var(--c); border-radius: 999px; padding: 3px 10px; box-shadow: 0 2px 0 color-mix(in srgb, var(--c) 35%, transparent); }
@media (max-width: 360px) { .logo h1 .t2 { font-size: 44px; } .doodle { width: 30px; height: 30px; } }
@media (prefers-reduced-motion: reduce) { .logo h1 .t1 i, .doodle { animation: none; } }

/* アイコン(2026-10-16): 24種類 × 11色 */
.av { flex: none; display: inline-grid; place-items: center; vertical-align: middle; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 2px rgba(255,255,255,.55), 0 1px 2px rgba(71,58,45,.25); overflow: hidden; }
/* アイコンは span なので、ほかの「〇〇 span」の決まり(.field span の block・.members li span の flex:1 など)が当たって、丸が楕円・動物がずれた(2026-10-16)。ここで上書きする */
.av { display: inline-grid !important; flex: 0 0 auto !important; place-items: center !important; padding: 0 !important; overflow: hidden !important; max-width: none !important; min-width: 0; text-overflow: clip !important; white-space: normal !important; line-height: 0; }
.field .av, .pick-now .av { margin: 0 !important; }
.av img { width: 72%; height: 72%; object-fit: contain; display: block; pointer-events: none; }
.av img.dg { width: 84%; height: 84%; } /* ダンゴウオは少し大きく */
.flbl { display: block; font-weight: 700; margin-bottom: 6px; }
.nmrow { gap: 8px; }
.nmrow input { flex: 1; min-width: 0; }
.myicon { flex: none; display: flex; flex-direction: column; align-items: center; border: 2px solid var(--line); background: #fff; border-radius: 14px; padding: 2px 6px 3px; }
.myicon small { font-size: 10px; color: var(--ink-2); font-weight: 700; line-height: 1; }
.members li .av { margin: -4px 0; }
.members li.me { cursor: pointer; box-shadow: inset 0 0 0 2px var(--ochre-l); }
.prog li .av { margin: -3px 0 -3px -4px; }
.grid figcaption .av, .curtains figcaption .av { margin-right: 2px; }
.feed li .av { margin-right: 4px; vertical-align: -4px; }
.scores .nm .av { margin-right: 6px; vertical-align: -6px; }
.picker { width: min(100%, 420px); max-height: 92dvh; overflow-y: auto; }
.pick-now { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; margin-bottom: 10px; }
.pick-colors { display: grid; grid-template-columns: repeat(11, 1fr); gap: 4px; margin-bottom: 10px; }
.pc { aspect-ratio: 1; border-radius: 50%; border: 0; background: var(--c); padding: 0; box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.15); }
.pc.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); }
.pick-kinds { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-bottom: 12px; }
.pk { border: 0; background: var(--paper); border-radius: 12px; padding: 3px; aspect-ratio: 1; display: grid; place-items: center; }
.pk .av { width: 100% !important; height: 100% !important; }
.pk.on { background: #fff; box-shadow: 0 0 0 2.5px var(--ochre); }
.picker .row .btn { flex: 1; }

/* 待合室のメンバー: アイコンが入ったので1列に(名前が切れないように) */
.members { grid-template-columns: 1fr; }
.members li span { flex: 1; min-width: 0; }
/* 絵描きクイズ: 下にみんなのアイコン、答えると吹き出し3秒(2026-10-16) */
.qplayers { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 10px; margin: 46px 0 6px; }
.qpl { position: relative; display: flex; flex-direction: column; align-items: center; width: 64px; }
.qpl span { font-size: 11px; font-weight: 700; color: var(--ink-2); max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qpl.drawer { opacity: .75; }
.bub { position: absolute; bottom: calc(100% - 2px); left: 50%; transform: translateX(-50%); z-index: 3; max-width: 150px; width: max-content;
  background: #fff; color: var(--ink); border: 2px solid var(--ink); border-radius: 14px; padding: 4px 10px; font-size: 14px; font-weight: 700; line-height: 1.3; word-break: break-all; box-shadow: 0 2px 0 rgba(71,58,45,.25); }
.bub::after { content: ""; position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); border: 7px solid transparent; border-top-color: var(--ink); border-bottom: 0; }
.bub.ok { background: #fff3c4; border-color: var(--red); color: var(--red); }
.bub.ok::after { border-top-color: var(--red); }
.bub.pop { animation: bubPop .25s ease-out; }
@keyframes bubPop { from { transform: translateX(-50%) scale(.6); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }

.credit { text-align: center; font-size: 10px; color: var(--ink-2); opacity: .7; margin: 18px 0 0; }

/* ホーム画面に追加(ホームの一番下、2026-10-16) */
.a2hs-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin: 10px 0 0; --bg: #5e8fd6; --bd: #3f6db0; font-size: 18px; }
.a2hs-btn svg { width: 22px; height: 22px; flex: none; }
.a2hscard { width: min(100%, 380px); }
.a2steps { margin: 8px 0 12px; padding-left: 22px; line-height: 1.7; font-size: 15px; }
.a2steps li { margin-bottom: 4px; }
.a2hscard .btn { width: 100%; }

/* 絵描きクイズ: お題の難しさ(押すたびに出し直し)・文字数ヒント(2026-10-16) */
.levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.lvb { border: 2px solid var(--line); background: #fff; border-radius: 12px; min-height: 44px; font-weight: 700; font-size: 16px; color: var(--ink-2); }
.lvb.on { background: var(--ochre); border-color: var(--ochre-d); color: #fff; }
.lvhint { margin: 4px 0 8px; font-size: 12px; }
.qdraw .ref { flex-wrap: wrap; }
.qdraw .ref .btn { flex: none; margin-left: auto; }
.qhint:empty { display: none; }

/* 絵描きクイズの描く人: 描くところを大きく(2026-10-16 ユーザー「書くスペースが小さい」)。お題は1行、みんなはキャンバスの上で吹き出しは下へ */
.qtopic { display: flex; align-items: center; gap: 8px; margin: 6px 0 2px; }
.qtopic .lbl { margin: 0; }
.qtopic b { flex: 1; min-width: 0; font-family: 'Yusei Magic', sans-serif; font-weight: 400; font-size: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qtopic .btn.sm { min-height: 34px; font-size: 13px; padding: 4px 10px; }
.qplayers.down { margin: 2px 0 4px; gap: 2px 6px; position: relative; z-index: 5; }
.qplayers.down .qpl { width: 52px; }
.qplayers.down .qpl span { font-size: 10px; max-width: 52px; }
.qplayers.down .bub { bottom: auto; top: calc(100% - 4px); }
.qplayers.down .bub::after { bottom: auto; top: -8px; border-top: 0; border-bottom: 7px solid var(--ink); border-left-color: transparent; border-right-color: transparent; }
.qplayers.down .bub.ok::after { border-bottom-color: var(--red); }
.qdraw .padwrap { width: min(100%, calc(100dvh - 320px - env(safe-area-inset-top) - env(safe-area-inset-bottom))); margin-top: 0; }
.qguess .qview { width: min(100%, calc(100dvh - 330px - env(safe-area-inset-top) - env(safe-area-inset-bottom))); }
.qguess .qplayers { margin-top: 40px; }

/* 一人モード・個展(2026-10-17) */
.solo-btn small, .ex-open small { display: block; font-family: system-ui, sans-serif; font-size: 12.5px; opacity: .8; margin-top: 2px; }
.solotop { display: flex; flex-direction: column; gap: 8px; padding-top: 18px; }
.ex-open { min-height: 92px; }
.ex-open b { font-weight: 400; font-size: 26px; }
.pen-note { margin-top: auto; padding: 24px 0 8px; text-align: center; font-size: 13px; color: var(--ink-2); }
.ex-q { margin-top: 18px; font-size: 15px; }
.ex-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 8px 0; }
.ex-in { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 8px; border-radius: var(--r); border: 3px solid var(--line); background: var(--card); color: var(--ink); min-height: 150px; }
.ex-in svg { width: 56px; height: 56px; }
.ex-in b { font-family: 'Yusei Magic', sans-serif; font-weight: 400; font-size: 22px; }
.ex-in small { color: var(--ink-2); font-weight: 700; }
.ex-in:active { transform: translateY(2px); }
.ex-intro { text-align: center; padding: 22px 14px; }
.ex-topic { font-size: 30px; line-height: 1.35; margin: 6px 0; }
.ex-topic-sm { font-size: 18px; line-height: 1.3; }
.ex-mine { text-align: center; }
.ex-big { display: block; width: 100%; max-width: 360px; margin: 8px auto; padding: 0; border: 3px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.ex-big img { display: block; width: 100%; aspect-ratio: 1; }
.ex-by { margin: 6px 0 0; display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.ex-by small { color: var(--ink-2); }
.in { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; color: #fff; }
.in-pen { background: #1e63d6; } .in-finger { background: #e5833a; }
.ex-h { font-family: 'Yusei Magic', sans-serif; font-weight: 400; font-size: 20px; margin: 18px 2px 8px; }
.ex-first { text-align: center; padding: 10px; }
.ex-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 520px) { .ex-grid { grid-template-columns: repeat(3, 1fr); } }
.ex-card { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 6px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); color: var(--ink); text-align: left; min-width: 0; }
.ex-card img { width: 100%; aspect-ratio: 1; border-radius: 10px; background: #fff; display: block; }
.ex-card .ex-n, .ex-card .ex-t { font-weight: 700; font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-card small { color: var(--ink-2); font-size: 11.5px; }
.ex-card.mine { border-color: #fbd000; box-shadow: 0 0 0 2px #fbd000 inset; }
.ex-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 12px 0; }
.ex-tabs button { border: 2px solid var(--line); background: var(--card); border-radius: 12px; min-height: 52px; font-weight: 700; font-size: 13.5px; color: var(--ink-2); line-height: 1.3; }
.ex-tabs button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ex-gh { text-align: center; font-size: 24px; }
.ex-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ex-list button { width: 100%; display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; gap: 2px 10px; align-items: center; text-align: left; padding: 10px 12px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); color: var(--ink); }
.ex-list .no { grid-row: 1 / 3; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.ex-list b { font-size: 16px; }
.ex-list .thumbs { grid-row: 1 / 3; grid-column: 3; display: flex; gap: 3px; }
.ex-list .thumbs img { width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.ex-list small { color: var(--ink-2); font-size: 12px; }
/* ホーム: 一人モードを上に大きく、下に「みんなでお絵描き」(2026-10-17) */
.btn.big.solo-big { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 96px; margin: 14px 0 4px; }
.btn.big.solo-big svg { width: 50px; height: 50px; flex: none; }
.btn.big.solo-big span { text-align: left; line-height: 1.2; }
.btn.big.solo-big b { font-weight: 400; font-size: 30px; display: block; }
.btn.big.solo-big small { display: block; font-family: system-ui, sans-serif; font-size: 13px; opacity: .85; margin-top: 4px; }
.together { margin-top: 16px; }
.together .tg-h { justify-content: center; font-size: 24px; margin-bottom: 4px; }
.together .tg-h small { font-family: system-ui, sans-serif; font-size: 13px; color: var(--ink-2); }
.together .modechips { margin: 4px 0 12px; }
.together .field { margin-top: 0; }
.together .tg-l { margin-top: 12px; }
.together .btn.big { margin-bottom: 0; }
/* 個展 確定版(2026-10-17): ジャンル・2周目・白紙の案内・まだ描いていないお題 */
.cat { display: inline-block; font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); color: var(--ink-2); margin-left: 4px; }
.cy { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: #8e44ad; color: #fff; margin-left: 4px; }
.ex-card .tags { display: flex; gap: 2px; flex-wrap: wrap; }
.ex-blank { text-align: center; margin-top: 0; }
.btn.big:disabled { opacity: .45; }
.ex-list button.locked { opacity: .55; }
.ex-list button.locked b { letter-spacing: .3em; color: var(--ink-2); }
.btn.more { display: block; width: 100%; margin-top: 10px; }

/* 個展: AI のロボットが吹き出しで「何の絵か」を答える(2026-10-17) */
.ex-ai { text-align: left; display: flex; align-items: flex-end; gap: 10px; margin-top: 12px; }
.ex-ai .robot { width: 58px; height: 58px; flex: none; animation: robo-bob 1.6s ease-in-out infinite; }
.ex-ai .robot .ant { animation: robo-blink 1.2s steps(1) infinite; }
.ex-ai.done .robot { animation: robo-hop .5s ease-out 1; }
.ex-ai.done .robot .ant { animation: none; fill: #fbd000; }
.ai-bub { position: relative; flex: 1; min-width: 0; background: #fff; border: 2.5px solid var(--ink); border-radius: 18px; padding: 10px 14px; font-size: 15px; line-height: 1.5; color: var(--ink); margin-bottom: 14px; }
.ai-bub::before, .ai-bub::after { content: ''; position: absolute; left: -12px; bottom: 10px; border: 7px solid transparent; border-right: 11px solid var(--ink); border-left: 0; }
.ai-bub::after { left: -8px; border-right-color: #fff; }
.ai-bub b { font-size: 17px; }
.ai-think { color: var(--ink-2); }
.ai-think .dots { display: inline-flex; gap: 3px; margin-left: 4px; vertical-align: middle; }
.ai-think .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-2); animation: robo-dot 1s ease-in-out infinite; }
.ai-think .dots i:nth-child(2) { animation-delay: .15s; } .ai-think .dots i:nth-child(3) { animation-delay: .3s; }
.ex-ai.done .ai-bub { animation: bub-pop .35s ease-out 1; }
.ai-sorry { color: var(--ink-2); }
@keyframes robo-bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-3px) rotate(3deg); } }
@keyframes robo-blink { 50% { fill: #5ec8f2; } }
@keyframes robo-hop { 0% { transform: translateY(0); } 40% { transform: translateY(-10px); } 100% { transform: translateY(0); } }
@keyframes robo-dot { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
@keyframes bub-pop { 0% { transform: scale(.85); opacity: .4; } 100% { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ex-ai .robot, .ex-ai .robot .ant, .ai-think .dots i, .ex-ai.done .ai-bub { animation: none; } }

/* みんなでお絵描き: AI の点数(垂れ幕を開ける前から右上に)とひとこと(開けたら絵の下に)(2026-10-17) */
.ai-sc { display: flex; align-items: center; justify-content: center; gap: 2px; margin: 4px auto 0; width: max-content; background: #fff; border: 2px solid var(--ink); border-radius: 999px; padding: 1px 9px 1px 3px; color: var(--ink); line-height: 1.2; }
.ai-sc .robot { width: 24px; height: 24px; }
.ai-sc b { font-size: 18px; font-weight: 800; }
.ai-sc small { font-size: 11px; font-weight: 700; }
.ai-sc .ai-wait { font-size: 11px; font-weight: 700; color: var(--ink-2); animation: robo-dot 1.2s ease-in-out infinite; }
.curtains .ai-sc { position: absolute; top: 6px; right: 6px; margin: 0; z-index: 3; box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.ai-cm { margin: 4px 2px 0; font-size: 12px; line-height: 1.4; color: var(--ink-2); text-align: center; }
.curtains figure:not(.open) .ai-cm { display: none; }
.ai-h { display: flex; align-items: center; gap: 6px; }
.ai-h .robot { width: 30px; height: 30px; }
/* 点数は垂れ幕を開けてから(2026-10-17 おすすめ。開ける前に出したい時はこの2行を消す) */
.curtains figure:not(.open) .ai-sc { display: none; }
.curtains figure.open .ai-sc { animation: bub-pop .45s ease-out .35s both; }
/* AI判定モードの回答者アイコン(2026-10-17) */
.av.ai-av { background: #c9ecfa; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; }
.av.ai-av .robot { width: 92%; height: 92%; }
.ai-hint { margin: 2px 0 6px; }
.chain-item .ex-ai { margin-top: 4px; }
/* ホーム下: 共有ボタンとホーム画面に追加の案内(2026-10-17) */
.share-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 14px; }
.share-btn svg { width: 20px; height: 20px; flex: none; }
.a2hs-note { margin: 14px 0 0; padding: 10px 12px; border-radius: 14px; background: #fff7d6; border: 2px dashed #e0b84a; font-size: 14px; line-height: 1.5; text-align: center; color: var(--ink); }
.qkana { margin: 4px 0 0; text-align: center; }
.qkana b { color: var(--red, #e53935); }
/* 絵描きクイズ: 答えを打っている間(キーボードが出ている間)も絵が見える(2026-10-18) */
body.qtyping .qguess .qview { width: var(--qsize, 60vw); min-width: 0; margin-top: 4px; }
body.qtyping .qguess .qplayers, body.qtyping .qguess .qfeed, body.qtyping .qguess .qkana { display: none; }
body.qtyping .qguess .qhint { margin: 4px 0; }
body.qtyping .qguess .qans { margin-top: 6px; }
/* ホーム: 部屋に「入る」「作る」を並べる。入るを押すと4桁の番号の欄(2026-10-18) */
.room-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.room-pick .btn.big { margin: 0; padding-left: 8px; padding-right: 8px; font-size: 20px; }
.room-pick #openJoin { --bg: #5e8fd6; --bd: #3f6db0; }
.joinbox #joinBack { display: block; margin: 10px auto 0; }
/* あそぶモードの色分け(2026-10-18、色は MODES の col = ホームの札と同じ) */
.mode[style*="--c"] { border-color: color-mix(in srgb, var(--c) 35%, #fff); }
.mode[style*="--c"] svg { color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); }
.mode[style*="--c"] b { color: color-mix(in srgb, var(--c) 80%, #000); }
.mode[style*="--c"].on { border-color: var(--c); background: color-mix(in srgb, var(--c) 9%, #fff); box-shadow: 0 3px 0 color-mix(in srgb, var(--c) 45%, #fff); }
.mode[style*="--c"].on svg { color: #fff; background: var(--c); }
.sethd.mode-hd { color: var(--c); }
/* 描き始める前の「3・2・1 スタート!」(2026-10-18) */
.gocd { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(71, 58, 45, .45); }
.gocd-card { width: min(100%, 340px); background: var(--card); border: 3px solid var(--ink); border-radius: 22px; padding: 20px 16px 18px; text-align: center; box-shadow: 0 6px 0 rgba(0,0,0,.25); }
.gocd-t { margin: 0; font-family: 'Yusei Magic', sans-serif; font-size: 24px; color: var(--ochre-d); }
.gocd-s { margin: 8px 0 0; font-size: 17px; font-weight: 700; line-height: 1.5; word-break: break-word; }
.gocd b { display: block; margin: 10px 0 0; font-family: 'Yusei Magic', sans-serif; font-weight: 400; font-size: 84px; line-height: 1; color: var(--ink); }
.gocd b.pop { animation: cd-pop .45s ease-out; }
.gocd-r { margin: 6px 0 0; font-size: 14px; color: var(--ink-2); min-height: 1.2em; }
.gocd.go b { font-size: 46px; color: #e53935; animation: cd-pop .35s ease-out; }
.gocd.go { animation: cd-out .7s ease-in forwards; }
@keyframes cd-pop { 0% { transform: scale(1.6); opacity: .2; } 100% { transform: scale(1); opacity: 1; } }
@keyframes cd-out { 0%, 55% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .gocd b.pop, .gocd.go, .gocd.go b { animation: none; } }
.khide span { text-align: center; line-height: 1.6; font-weight: 700; color: var(--ink-2); } /* 書き足し「直前まで絵を見せない」 */
/* 書き足し伝言: 描く順番を縦に矢印でつなぐ(2026-10-18) */
.korder { padding: 10px 12px; }
.korder h3 { margin: 0 0 6px; font-size: 14px; }
.khead { margin: 0 0 8px; padding: 6px 10px; border-radius: 12px; background: #fff4e0; text-align: center; font-size: 15px; }
.khead .kn { font-size: 20px; color: var(--ochre-d); margin: 0 2px; }
.kline { flex-direction: column; flex-wrap: nowrap; gap: 0; align-items: stretch; }
.kline li { display: flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 12px; position: relative; margin-top: 16px; background: var(--paper); }
.kline li:first-child { margin-top: 0; }
.kline li + li::after { content: '↓'; position: absolute; left: 50%; top: -17px; transform: translateX(-50%); font-size: 14px; line-height: 16px; color: var(--ink-2); font-weight: 700; }
.kline li::before { content: counter(k); min-width: 1.3em; text-align: center; font-size: 12px; color: var(--ink-2); }
.kline li.ans::before { content: '🎯'; }
.kline li .kname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kline li .kst { font-style: normal; font-size: 12px; font-weight: 700; color: var(--ink-2); flex: none; }
.kline li.ok { background: #e8f2df; color: var(--ink); }
.kline li.now { background: var(--ochre); color: #fff; box-shadow: 0 2px 0 var(--ochre-d); }
.kline li.now::before, .kline li.now .kst { color: #fff; }
.kline li.now .kst { animation: robo-dot 1.2s ease-in-out infinite; }
.kline li.me { outline: 2.5px solid #1e63d6; outline-offset: -2.5px; }
.kline li .you { font-style: normal; font-size: 11px; background: #1e63d6; color: #fff; border-radius: 8px; padding: 1px 6px; flex: none; }
.kline li.ans em:not(.you) { display: none; }

/* ===== ホーム(2026-10-18 ユーザーの見本画像のデザイン)。.home.h2 の中だけ ===== */
.h2 { --rf: 'M PLUS Rounded 1c', system-ui, sans-serif; position: relative; padding-bottom: 20px; }
.h2-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(160px 130px at -20px 62%, rgba(255, 150, 170, .28), transparent 70%),
    radial-gradient(150px 120px at 105% 30%, rgba(120, 190, 255, .25), transparent 70%),
    radial-gradient(170px 120px at 102% 96%, rgba(130, 210, 150, .28), transparent 70%),
    radial-gradient(160px 120px at 0% 100%, rgba(255, 170, 150, .25), transparent 70%),
    radial-gradient(120px 90px at 10% 6%, rgba(255, 220, 140, .25), transparent 70%); }
.h2 .homebar .top { color: var(--ink); font-family: var(--rf); font-weight: 800; font-size: 17px; }
.h2 .homebar .bgm { border-radius: 999px; padding: 6px 14px; font-family: var(--rf); font-size: 15px; color: var(--ink); background: #fffdf8; border-color: #ecd9b8; }
.h2 .homebar .bgm.on { background: var(--ochre); color: #fff; border-color: var(--ochre-d); }
.h2 .hero { padding: 0; }
.h2 .logo { position: relative; margin: 8px 0 12px; padding: 4px 0 0; text-align: left; }
.h2 .logo h1 { font-family: var(--rf); font-weight: 800; align-items: flex-start; padding-left: 6%; line-height: 1.05; }
.h2 .logo h1 .t1 { font-size: 50px; justify-content: flex-start; gap: 0; padding-left: 8%; }
.h2 .logo h1 .t1 i { -webkit-text-stroke: 1.5px rgba(255,255,255,.9); paint-order: stroke fill; text-shadow: 0 3px 0 rgba(71,58,45,.12); }
.h2 .logo h1 .t2 { font-size: 54px; color: #4a3326; letter-spacing: 0; text-shadow: 0 3px 0 rgba(71,58,45,.12); }
.h2 .logo .scribble { width: min(300px, 78%); margin: 2px 0 0 4%; }
.h2 .pencil { position: absolute; width: 50px; height: 100px; right: 22%; top: 40px; }
.h2 .octo { position: absolute; width: 96px; height: 88px; right: -4px; top: 52px; animation: octo 3.2s ease-in-out infinite; transform-origin: 50% 90%; }
.h2 .spark { position: absolute; width: 22px; height: 22px; animation: floaty 4s ease-in-out infinite; }
.h2 .spark.s1 { left: 1%; top: 104px; }
.h2 .spark.s2 { right: 18%; top: 6px; width: 30px; height: 30px; animation-delay: -1.5s; }
.h2 .dash { position: absolute; width: 46px; height: 46px; }
.h2 .dash.d-l { left: -6px; top: 8px; }
.h2 .dash.d-r { right: 4%; top: 2px; }
@keyframes octo { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(4deg) translateY(-3px); } }
/* 一人モード(黄色の大きなボタン) */
.h2 .solo-big { display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px 16px 14px 10px; margin: 6px 0 14px; border-radius: 30px; border: 3px solid #f0a92e;
  background: linear-gradient(180deg, #ffe48a 0%, #ffc94d 55%, #f9b33a 100%); box-shadow: 0 5px 0 #e39a22, inset 0 2px 0 rgba(255,255,255,.7); color: #4a3326; cursor: pointer; text-align: center; font: inherit; }
.h2 .solo-big:active { transform: translateY(3px); box-shadow: 0 2px 0 #e39a22; }
.h2 .solo-big .sb-pen { width: 70px; height: 70px; flex: none; }
.h2 .solo-big .sb-tx { flex: 1; display: flex; flex-direction: column; align-items: center; }
.h2 .solo-big b { font-family: var(--rf); font-weight: 800; font-size: 40px; line-height: 1.1; letter-spacing: .02em; }
.h2 .solo-big small { font-size: 15px; font-weight: 700; color: #6b5340; margin-top: 2px; }
.h2 .solo-big .sb-go { width: 44px; height: 44px; flex: none; border-radius: 50%; background: rgba(255,255,255,.75); display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700; line-height: 1; padding-bottom: 3px; }
/* みんなでお絵描きのカード */
.h2 .h2-card { background: #fffefb; border-radius: 24px; padding: 12px 14px 16px; box-shadow: 0 4px 18px rgba(120, 90, 50, .1), 0 0 0 1.5px #f1e4cc; }
.h2 .together { margin-top: 0; }
.h2 .tg-band { display: flex; align-items: center; gap: 8px; background: linear-gradient(90deg, #ffe7ef, #fff3f6 70%, rgba(255,255,255,0)); border-radius: 16px; padding: 6px 10px; }
.h2 .tg-band .faces { width: 74px; height: 46px; flex: none; }
.h2 .together .tg-h { margin: 0; font-family: var(--rf); font-weight: 800; font-size: 23px; color: #4a3326; display: flex; align-items: baseline; gap: 8px; justify-content: flex-start; flex-wrap: wrap; }
.h2 .together .tg-h small { font-family: var(--rf); font-weight: 700; font-size: 13px; }
.h2 .modechips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin: 10px 0 12px; }
.h2 .modechips li { text-align: center; font-family: var(--rf); font-weight: 800; font-size: 12px; padding: 5px 2px; white-space: nowrap; background: color-mix(in srgb, var(--c) 6%, #fff); }
@media (max-width: 360px) { .h2 .modechips { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.h2 .flbl { font-family: var(--rf); font-weight: 700; }
.h2 #nm { font-size: 18px; }
/* 丸いボタン(青・茶・白) */
.hbtn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; border-radius: 999px; padding: 14px; font-family: 'M PLUS Rounded 1c', system-ui, sans-serif; font-weight: 800; font-size: 18px; cursor: pointer; border: 2.5px solid transparent; }
.hbtn svg { width: 26px; height: 26px; flex: none; }
.hbtn i { font-style: normal; font-size: 22px; line-height: 1; margin-left: 2px; }
.hbtn:active { transform: translateY(3px); }
.hb-blue { color: #fff; background: linear-gradient(180deg, #5db4ff, #2f86ea); border-color: #2a74cf; box-shadow: 0 4px 0 #2163b8, inset 0 2px 0 rgba(255,255,255,.35); }
.hb-brown { color: #fff; background: linear-gradient(180deg, #e3a06a, #c27236); border-color: #a95f2a; box-shadow: 0 4px 0 #94521f, inset 0 2px 0 rgba(255,255,255,.3); }
.hb-white { color: #6b4b33; background: #fffefb; border-color: #f0e2c8; box-shadow: 0 3px 0 #ecdcbc; }
.h2 .room-pick { gap: 10px; margin-top: 14px; }
.h2 .room-pick .hbtn { padding: 13px 8px; font-size: 17px; }
.h2 .share-btn { margin-top: 14px; }
.h2 .a2hs-note { display: flex; align-items: center; gap: 8px; text-align: left; background: #fffbea; }
.h2 .a2hs-note svg { width: 28px; height: 28px; flex: none; }
.h2 .a2hs-btn { margin-top: 12px; font-size: 20px; padding: 16px; }
@media (max-width: 370px) { .h2 .logo h1 .t1 { font-size: 42px; } .h2 .logo h1 .t2 { font-size: 44px; } .h2 .solo-big b { font-size: 32px; } .h2 .octo { width: 78px; } .h2 .pencil { right: 20%; } }
/* ホームの大きさの調整(390px で えんぴつ・タコが文字に重ならない) */
.h2 .logo h1 .t1 { font-size: 46px; }
.h2 .logo h1 .t2 { font-size: 47px; }
.h2 .pencil { width: 40px; height: 82px; right: 88px; top: 44px; }
.h2 .octo { width: 84px; height: 78px; right: -2px; top: 60px; }
.h2 .solo-big b { font-size: 34px; white-space: nowrap; }
.h2 .together .tg-h { font-size: 21px; }
.h2 .modechips li { font-size: 11px; }
.h2 .msg:empty { margin: 0; min-height: 0; }
@media (max-width: 370px) { .h2 .logo h1 .t1 { font-size: 40px; } .h2 .logo h1 .t2 { font-size: 40px; } .h2 .pencil { right: 76px; top: 40px; width: 34px; } .h2 .octo { width: 72px; top: 58px; } .h2 .solo-big b { font-size: 29px; } .h2 .solo-big .sb-pen { width: 56px; height: 56px; } }
@media (max-width: 370px) { .h2 .room-pick .hbtn { font-size: 15px; gap: 5px; padding: 12px 6px; } .h2 .room-pick .hbtn svg { width: 22px; height: 22px; } .h2 .room-pick .hbtn i { display: none; } .h2 .share-btn { font-size: 15px; } }
.hbtn span { white-space: nowrap; }

/* ===== 全体のテイストをホームの見本に合わせる(2026-10-18 ユーザー「他のページもこのテイストに」) =====
   丸ゴシックの太字・ぷっくりした丸いボタン・白いカード(やわらかい影)・パステルの背景。クレヨンのゆれは使わない */
:root { --rf: 'M PLUS Rounded 1c', 'Hiragino Maru Gothic ProN', system-ui, sans-serif; --paper: #FBF5E8; --card: #FFFEFB; --line: #EBDDC2; }
body { background-color: var(--paper); }
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(160px 130px at -20px 62%, rgba(255, 150, 170, .22), transparent 70%),
    radial-gradient(150px 120px at 105% 30%, rgba(120, 190, 255, .2), transparent 70%),
    radial-gradient(170px 120px at 102% 96%, rgba(130, 210, 150, .22), transparent 70%),
    radial-gradient(160px 120px at 0% 100%, rgba(255, 170, 150, .2), transparent 70%); }
.h2-bg { display: none; }
h1, h2, h3, .btn, .bigcode, .timer .tnum, .topic, .step, .ttl, .mode b, .gocd-t, .gocd b, .prep b, .tg-h { font-family: var(--rf); font-weight: 800; }
.cr::before, .btn::before { filter: none; }
.card, .card.cr { border-radius: 22px; }
.cr::before { background: var(--card); border: 1.5px solid #f1e4cc; box-shadow: 0 4px 16px rgba(120, 90, 50, .09); }
.btn { --bg: #cf8a4f; --bd: #a9662e; border-radius: 999px; letter-spacing: .02em; text-shadow: 0 1px 0 rgba(90, 45, 10, .25); }
.btn::before { border-width: 2.5px; background: linear-gradient(180deg, rgba(255,255,255,.32), rgba(255,255,255,0) 55%), var(--bg); box-shadow: 0 4px 0 var(--bd); }
.btn:active:not(:disabled) { transform: translateY(3px); }
.btn.big { border-radius: 28px; font-size: 22px; }
.btn.ghost { --bg: #fffefb; --bd: #ead9b9; color: #8a5a32; }
.btn.ghost::before { box-shadow: 0 3px 0 #ead9b9; }
.bar .x, .bgm { border-radius: 999px; font-family: var(--rf); font-weight: 800; }
.ttl, .step { color: #8a5a32; }
.topic { color: #4a3326; }
.seg { border-radius: 999px; }
.seg button { border-radius: 999px; font-family: var(--rf); font-weight: 800; }
.seg button.on { background: linear-gradient(180deg, #e3a06a, #c27236); box-shadow: 0 2px 0 #94521f; }
.mode { border-radius: 20px; }
.timer .tbar b { background: linear-gradient(90deg, #ffc94d, #f39c12); }
.timer .tnum { color: #4a3326; }
input, textarea { border-radius: 16px; border-color: var(--line); }
input:focus, textarea:focus { border-color: #4aa3f5; box-shadow: 0 0 0 3px rgba(74, 163, 245, .18); }
.pad { box-shadow: 0 0 0 2px var(--line), 0 4px 14px rgba(120, 90, 50, .1); }
.pic { box-shadow: 0 0 0 1.5px var(--line); }
.toast { font-family: var(--rf); font-weight: 800; }
.bar { background: rgba(251, 245, 232, .92); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border-bottom: 1.5px solid var(--line); }
/* タイトルは真ん中・大きさは前と同じ(お絵描き40px・パラダイス54px)、えんぴつとタコはタイトルに重ねる(2026-10-18 ユーザー指示) */
.h2 .logo { text-align: center; }
.h2 .logo h1 { align-items: center; padding-left: 0; position: relative; z-index: 1; }
.h2 .logo h1 .t1 { font-size: 40px; justify-content: center; padding-left: 0; }
.h2 .logo h1 .t2 { font-size: 54px; }
.h2 .logo .scribble { margin: 2px auto 0; }
.h2 .pencil { z-index: 2; width: 38px; height: 78px; right: 12%; top: 34px; }
.h2 .octo { z-index: 2; width: 76px; height: 70px; right: -8px; top: 60px; }
@media (max-width: 370px) { .h2 .logo h1 .t1 { font-size: 36px; } .h2 .logo h1 .t2 { font-size: 46px; } .h2 .pencil { right: 11%; top: 30px; width: 32px; height: 66px; } .h2 .octo { width: 64px; top: 58px; right: -8px; } }
.h2 .pencil, .h2 .sb-pen { overflow: visible; } /* 回したえんぴつの右がSVGの枠で切れていた(2026-10-18) */

/* ===== 手描き感(2026-10-18 ユーザー「枠線とか文字のフォントを手描き感でるかんじに」) =====
   文字: 見出し・ボタン・お題などはマーカーで書いたような Yusei Magic(少し太らせる)
   ふち: ボタン・カードの背景とふちを ::before に移し、#hand フィルタでペンで描いたようにゆらす(文字はゆらさない) */
:root { --rf: 'Yusei Magic', 'M PLUS Rounded 1c', 'Hiragino Maru Gothic ProN', sans-serif; }
h1, h2, h3, .btn, .bigcode, .timer .tnum, .topic, .step, .ttl, .mode b, .gocd-t, .gocd b, .prep b, .tg-h,
.hbtn, .solo-big b, .h2 .homebar .top, .bgm, .bar .x, .seg button, .modechips li, .flbl, .toast { font-family: var(--rf); font-weight: 400; -webkit-text-stroke: .5px currentColor; }
.h2 .logo h1 .t1 i { -webkit-text-stroke: 1.5px rgba(255,255,255,.9); }
.h2 .logo h1, .h2 .logo h1 .t2 { -webkit-text-stroke: 1px currentColor; }
.cr::before, .btn::before { filter: url(#hand); }
.cr::before { border: 2.5px solid #e2cfa9; }
/* 丸いボタン: 色は変数、形は ::before(ゆらす) */
.hbtn, .h2 .solo-big, .h2 .h2-card { position: relative; isolation: isolate; background: none !important; border-color: transparent !important; box-shadow: none !important; }
.hbtn::before, .h2 .solo-big::before, .h2 .h2-card::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; filter: url(#hand);
  background: var(--hb-bg); border: 2.8px solid var(--hb-bd); box-shadow: 0 4px 0 var(--hb-sh); }
.hb-blue { --hb-bg: linear-gradient(180deg, #5db4ff, #2f86ea); --hb-bd: #2160b0; --hb-sh: #2163b8; }
.hb-brown { --hb-bg: linear-gradient(180deg, #e3a06a, #c27236); --hb-bd: #8c4d1d; --hb-sh: #94521f; }
.hb-white { --hb-bg: #fffefb; --hb-bd: #d9c19a; --hb-sh: #ecdcbc; }
.h2 .solo-big { --hb-bg: linear-gradient(180deg, #ffe48a 0%, #ffc94d 55%, #f9b33a 100%); --hb-bd: #d98e1c; --hb-sh: #e39a22; }
.h2 .h2-card { --hb-bg: #fffefb; --hb-bd: #e2cfa9; --hb-sh: rgba(0,0,0,0); }
.hbtn:active::before, .h2 .solo-big:active::before { box-shadow: 0 1px 0 var(--hb-sh); }
.h2 .solo-big b { font-size: 36px; -webkit-text-stroke: 1px currentColor; }
.modechips li { border-style: solid; border-width: 2px; }
.h2 .a2hs-note, .a2hs-note { border-width: 2.5px; }
.h2 { --rf: 'Yusei Magic', 'M PLUS Rounded 1c', 'Hiragino Maru Gothic ProN', sans-serif; } /* ホームも手描き風の字に */
/* 字が見づらい(2026-10-18 ユーザー)→ 読みやすい手書き風の丸文字 Kiwi Maru に。太らせる線(text-stroke)もやめる。タイトルのロゴだけ Yusei Magic のまま */
:root, .h2 { --rf: 'Kiwi Maru', 'M PLUS Rounded 1c', 'Hiragino Maru Gothic ProN', sans-serif; }
h1, h2, h3, .btn, .bigcode, .timer .tnum, .topic, .step, .ttl, .mode b, .gocd-t, .gocd b, .prep b, .tg-h,
.hbtn, .solo-big b, .h2 .homebar .top, .bgm, .bar .x, .seg button, .modechips li, .flbl, .toast { font-weight: 500; -webkit-text-stroke: 0; }
.h2 .logo h1, .h2 .logo h1 .t2 { font-family: 'Yusei Magic', sans-serif; -webkit-text-stroke: 1px currentColor; }
.h2 .logo h1 .t1 i { font-family: 'Yusei Magic', sans-serif; -webkit-text-stroke: 1.5px rgba(255,255,255,.9); }
.h2 .solo-big b { -webkit-text-stroke: 0; }
