body {
  background: var(--kid-bg);
  color: var(--kid-ink);
  font-family: var(--round);
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  overscroll-behavior: none;
}
#app { height: 100dvh; min-height: 100%; }
.screen {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: calc(env(safe-area-inset-top, 0px) + 16px) 16px calc(env(safe-area-inset-bottom, 0px) + 16px);
  overflow-y: auto;
}
.title { font-size: clamp(26px, 6vw, 40px); font-weight: 700; margin: 8px 0 0; text-align: center; letter-spacing: .04em; }
.sub { font-size: 15px; color: var(--kid-sub); margin: 0; text-align: center; }
.err { color: #c0342c; font-size: 14px; min-height: 1.2em; margin: 0; font-family: var(--sans); }
.btn {
  border: 0; border-radius: 18px; padding: 14px 22px; font-weight: 700; font-size: 18px;
  background: #fff; box-shadow: 0 4px 0 rgba(0, 0, 0, .12); cursor: pointer; touch-action: manipulation;
}
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0, 0, 0, .12); }
.btn:disabled { opacity: .45; }
.btn.go { background: var(--yellow); color: var(--k-ink); box-shadow: 0 0 0 2px rgba(43, 47, 69, .12), 0 5px 0 rgba(43, 47, 69, .18); }
.btn.big { font-size: 22px; padding: 16px 28px; }
.btn.feed { background: var(--orange); color: #fff; }
.btn:focus-visible, .chip:focus-visible, .tool:focus-visible, .kid:focus-visible, .motion:focus-visible, .room:focus-visible, .swatch:focus-visible { outline: 3px solid #F08A3C; outline-offset: 3px; }
.linkbtn { background: none; border: 0; color: var(--kid-sub); text-decoration: underline; font-size: 14px; padding: 8px; cursor: pointer; }
.card { background: #fff; border-radius: 20px; padding: 18px; width: min(420px, 100%); box-shadow: 0 4px 0 rgba(0, 0, 0, .06); }
.row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.col { display: grid; gap: 10px; width: min(360px, 100%); }

/* 大人向けフォーム */
.adult { font-family: var(--sans); justify-content: center; }
.logo { display: grid; justify-items: center; gap: 4px; font-family: var(--round); }
.logo svg { width: 88px; margin: 0 0 6px; }
.logo h1 { margin: 0; font-size: 38px; font-weight: 900; letter-spacing: .04em; }
.logo p { margin: 0; color: var(--kid-sub); }
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 4px; font-size: 14px; font-weight: 700; font-family: var(--sans); }
.form input { font: inherit; font-size: 16px; font-weight: 400; padding: 10px 12px; border-radius: 10px; border: 1px solid #E7E1D4; background: #fff; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: #F5F1E8; border-radius: 12px; padding: 4px; }
.tabs button { border: 0; background: transparent; padding: 8px; border-radius: 9px; font-weight: 700; cursor: pointer; }
.tabs button[aria-selected="true"] { background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }

/* だれがかく */
.kid-list { display: grid; gap: 12px; width: min(420px, 100%); }
.kid {
  display: flex; align-items: center; gap: 14px; background: #fff; border: 0; border-radius: 20px;
  padding: 14px 18px; font-size: 24px; font-weight: 700; box-shadow: 0 4px 0 rgba(0, 0, 0, .08); cursor: pointer; text-align: left;
}
.kid small { margin-left: auto; font-size: 13px; color: var(--kid-sub); font-weight: 700; }
.kid.sel { outline: 4px solid var(--yellow); }
.add-kid summary { cursor: pointer; font-weight: 700; color: var(--kid-sub); }
.add-kid[open] summary { margin-bottom: 12px; }
.lbl { font-size: 14px; font-weight: 700; font-family: var(--sans); }
.pick { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { border: 0; padding: 0; border-radius: 50%; background: none; cursor: pointer; }
.swatch[aria-checked="true"] .mark, .swatch[aria-checked="true"] i { outline: 3px solid var(--kid-ink); outline-offset: 2px; }
.swatch i { display: block; width: 36px; height: 36px; border-radius: 50%; }
.remember { font-size: 15px; color: var(--kid-sub); display: flex; gap: 8px; align-items: center; }

/* どこにうつす */
.room-list { display: grid; gap: 12px; width: min(420px, 100%); }
.room { background: #fff; border: 0; border-radius: 20px; padding: 16px 18px; text-align: left; display: grid; gap: 4px; box-shadow: 0 4px 0 rgba(0, 0, 0, .08); cursor: pointer; }
.room b { font-size: 22px; }
.room span { color: var(--kid-sub); font-size: 14px; }

/* かく */
.draw { gap: 10px; padding-top: calc(env(safe-area-inset-top, 0px) + 10px); }
.topbar { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; border: 0; background: #fff; border-radius: 999px; padding: 4px 14px 4px 4px; font-weight: 700; font-size: 16px; cursor: pointer; }
#b-snd { padding: 8px 14px; }
#b-snd[aria-pressed="false"] { opacity: .5; text-decoration: line-through; }
.room-name { font-size: 13px; color: var(--kid-sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawbody { flex: 1; width: 100%; min-height: 0; display: grid; gap: 10px; grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto auto auto; justify-items: center; }
.paper-wrap { width: 100%; height: 100%; min-height: 0; display: grid; place-items: center; container-type: size; }
.paper { position: relative; width: min(100cqw, 100cqh); aspect-ratio: 1; background: #fff; border-radius: 22px; box-shadow: inset 0 0 0 3px #E7E1D4; overflow: hidden; }
#cv { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; display: block; }
.palette { display: flex; gap: 10px; overflow-x: auto; padding: 6px 4px; max-width: 100%; scrollbar-width: none; }
.palette::-webkit-scrollbar { display: none; }
.palette .swatch i { width: 40px; height: 40px; border: 2px solid rgba(0, 0, 0, .1); }
.tools { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.tool { border: 0; background: #fff; border-radius: 14px; min-width: 52px; padding: 6px 6px; display: grid; justify-items: center; align-content: center; gap: 3px; font-weight: 700; font-size: 12px; cursor: pointer; }
.tool i { display: block; border-radius: 50%; background: var(--kid-ink); }
.tool svg { width: 22px; height: 22px; }
.tool.on { outline: 3px solid var(--yellow); }
.tool.hold { background: #ffd9d6; }
#b-done { width: min(360px, 100%); }

@media (min-width: 700px) and (min-aspect-ratio: 1/1) {
  .drawbody { grid-template-columns: 110px minmax(0, 1fr) 120px; grid-template-rows: minmax(0, 1fr) auto; align-items: center; }
  .palette { grid-column: 1; grid-row: 1; display: grid; grid-template-columns: 1fr 1fr; overflow: visible; align-self: center; }
  .paper-wrap { grid-column: 2; grid-row: 1 / span 2; }
  .tools { grid-column: 3; grid-row: 1; flex-direction: column; flex-wrap: nowrap; align-self: center; }
  #b-done { grid-column: 3; grid-row: 2; width: 100%; font-size: 20px; padding: 16px 8px; align-self: end; white-space: nowrap; }
}

/* うごきかた */
.thumb { width: min(220px, 50vw); aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: 20px; padding: 10px; }
.motion-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; width: min(520px, 100%); }
.motion { border: 0; background: #fff; border-radius: 20px; padding: 18px 10px; display: grid; justify-items: center; gap: 8px; font-size: 20px; font-weight: 700; box-shadow: 0 4px 0 rgba(0, 0, 0, .08); cursor: pointer; }
.motion svg { width: 48px; height: 48px; color: var(--kid-ink); }

/* なまえ */
.name-body { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: center; }
.mic-area { display: grid; justify-items: center; gap: 12px; }
.micbtn { width: 150px; height: 150px; border-radius: 50%; border: 0; background: var(--red); display: grid; place-items: center; box-shadow: 0 0 0 14px rgba(229, 72, 63, .2), 0 6px 0 #b8322b; cursor: pointer; touch-action: none; }
.micbtn svg { width: 46%; }
.micbtn.rec { transform: scale(1.06); box-shadow: 0 0 0 22px rgba(229, 72, 63, .3), 0 6px 0 #b8322b; }
.wave { display: flex; gap: 4px; align-items: center; height: 40px; }
.wave i { width: 6px; border-radius: 3px; background: var(--red); height: 4px; transition: height .06s; }

/* おくったよ */
.sent { background: #FFF2C2; justify-content: center; }
.status { font-size: 22px; font-weight: 700; margin: 0; text-align: center; }
.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 20px); transform: translateX(-50%); background: var(--kid-ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 15px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }


/* ================= 手触り（v0.3） ================= */
.btn, .tool, .swatch, .kid, .motion, .chip, .room, .adult-hold {
  transition: transform .09s ease-out, box-shadow .09s ease-out, opacity .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active, .tool:active, .kid:active, .motion:active, .chip:active, .room:active { transform: translateY(3px) scale(.96); }
.swatch:active { transform: scale(.88); }
.pop { animation: pop .32s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pop { 0% { transform: scale(.86); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
.palette .swatch[aria-checked="true"] i { transform: translateY(-4px); box-shadow: 0 5px 0 rgba(0, 0, 0, .15); }
.palette .swatch i { transition: transform .15s cubic-bezier(.3, 1.6, .5, 1); }

/* 大人向け：ながおし */
.adult-hold { position: relative; isolation: isolate; overflow: hidden; border: 2px dashed #A5A193; background: transparent; border-radius: 16px; padding: 10px 18px; display: grid; gap: 2px; justify-items: center; color: var(--kid-sub); font-weight: 700; font-size: 16px; cursor: pointer; width: min(420px, 100%); }
.adult-hold small { font-size: 11px; font-weight: 700; opacity: .8; }
.adult-hold.small { width: auto; font-size: 13px; padding: 6px 14px; }
.adult-hold::before { content: ""; position: absolute; inset: 0; background: #F5F1E8; transform-origin: left; transform: scaleX(var(--p, 0)); z-index: -1; }

/* 長押しリング（ぜんぶけす） */
.tool.ring { background: conic-gradient(#ffb3ab calc(var(--p, 0) * 1turn), #fff 0); }

/* お手本の指 */
.coach { position: absolute; inset: 0; pointer-events: none; display: grid; place-items: center; transition: opacity .3s; }
.coach.off { opacity: 0; }
.coach .trail { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.coach .trail path { fill: none; stroke: #E7E1D4; stroke-width: 1.1; stroke-dasharray: 2.4 2.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.coach .trail path { stroke-width: 5px; stroke-dasharray: 12 11; }
/* お手本の ペン：ペン先が 点線の まるを なぞる（ペン先が 要素の まんなかに くる） */
/* ペン先の 位置（left・top）は draw.js が お手本の かたちに そって うごかす（まる・なみ・ぎざぎざ・うずまき・8のじ・ほし・ハート・くるくる） */
.coach .pen { position: absolute; width: 15%; aspect-ratio: 1; left: 72%; top: 50%; transform: translate(-50%, -50%); }
.coach .pen svg { position: absolute; left: 50%; bottom: 50%; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 6px 8px rgba(35, 50, 74, .25)); transform-origin: 0 100%; animation: scribble 2.6s ease-in-out infinite; }
@keyframes scribble { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(-6deg); } 50% { transform: rotate(3deg); } 75% { transform: rotate(-4deg); } }
@keyframes orbit { from { transform: rotate(0deg) translateX(min(22cqw, 22cqh)) rotate(0deg); } to { transform: rotate(360deg) translateX(min(22cqw, 22cqh)) rotate(-360deg); } }
.paper.shake { animation: shake .45s ease-in-out; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-14px) rotate(-1deg); } 40% { transform: translateX(12px) rotate(1deg); } 60% { transform: translateX(-8px); } 80% { transform: translateX(5px); } }
.paper.wipe { animation: wipe .38s ease-in forwards; }
@keyframes wipe { to { transform: scale(.6) rotate(-8deg); opacity: 0; } }
.paper.back { animation: pop .35s cubic-bezier(.3, 1.6, .5, 1); }

/* できた！の状態 */
#b-done.sleep { filter: grayscale(.85); opacity: .55; box-shadow: 0 4px 0 #b9b9b9; }
#b-done.nudge { animation: nudge 1.1s ease-in-out infinite; }
@keyframes nudge { 0%, 70%, 100% { transform: rotate(0); } 76% { transform: rotate(-4deg) scale(1.04); } 84% { transform: rotate(4deg) scale(1.04); } 92% { transform: rotate(-2deg); } }

/* 動き方：自分の絵が動いてみせる */
.motion { padding: 12px 10px 16px; }
.mv { display: block; width: 110px; height: 96px; display: grid; place-items: center; }
.mv .in { display: block; transform-origin: 50% 100%; }
.mv img { display: block; max-width: 84px; max-height: 70px; object-fit: contain; }
.mv-walk { animation: m-walk-x 2.4s ease-in-out infinite alternate; }
.mv-walk .in { animation: m-bob .36s ease-in-out infinite alternate; }
.mv-hop .in { animation: m-hop .9s cubic-bezier(.3, 0, .6, 1) infinite; }
.mv-fly { animation: m-wave 1.8s ease-in-out infinite; }
.mv-fly .in { transform-origin: 50% 50%; animation: m-flap .18s ease-in-out infinite alternate; }
.mv-swim { animation: m-walk-x 3s ease-in-out infinite alternate; }
.mv-swim .in { transform-origin: 50% 50%; animation: m-swim .7s ease-in-out infinite alternate; }
.mv-float .in { transform-origin: 50% 50%; animation: m-float 2.2s ease-in-out infinite; }
.mv-crawl { animation: m-walk-x 4s linear infinite alternate; }
.mv-crawl .in { animation: m-wiggle .16s linear infinite alternate; }
@keyframes m-walk-x { from { transform: translateX(-10px); } to { transform: translateX(10px); } }
@keyframes m-bob { from { transform: translateY(0) rotate(-4deg); } to { transform: translateY(-6px) rotate(4deg); } }
@keyframes m-hop { 0% { transform: translateY(0) scale(1.12, .86); } 15% { transform: translateY(0) scale(.92, 1.1); } 50% { transform: translateY(-26px) scale(.96, 1.05); } 85% { transform: translateY(0) scale(1, 1); } 100% { transform: translateY(0) scale(1.12, .86); } }
@keyframes m-wave { 0%, 100% { transform: translateY(6px); } 50% { transform: translateY(-10px); } }
@keyframes m-flap { from { transform: scaleY(1.08); } to { transform: scaleY(.9); } }
@keyframes m-swim { from { transform: skewY(-5deg) rotate(-3deg); } to { transform: skewY(5deg) rotate(3deg); } }
@keyframes m-float { 0%, 100% { transform: translateY(6px) scale(1.06, .94); } 50% { transform: translateY(-10px) scale(.94, 1.06); } }
@keyframes m-wiggle { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }

/* 録音 */
.micwrap { position: relative; width: 190px; height: 190px; display: grid; place-items: center; }
.micring { position: absolute; inset: 0; pointer-events: none; width: 100%; height: 100%; transform: rotate(-90deg); }
.micring circle { fill: none; stroke-width: 6; }
.micring .track { stroke: rgba(229, 72, 63, .15); }
.micring .prog { stroke: var(--red); stroke-linecap: round; stroke-dasharray: 289; stroke-dashoffset: 289; }
.micbtn { animation: breathe 2.2s ease-in-out infinite; transition: transform .06s; }
.micbtn.rec { animation: none; }
@keyframes breathe { 0%, 100% { box-shadow: 0 0 0 10px rgba(229, 72, 63, .18), 0 6px 0 #b8322b; } 50% { box-shadow: 0 0 0 20px rgba(229, 72, 63, .1), 0 6px 0 #b8322b; } }
.thumb.talk { animation: talk .22s ease-in-out infinite alternate; }
@keyframes talk { from { transform: scale(1, 1) rotate(-2deg); } to { transform: scale(1.06, .95) rotate(2deg); } }

/* おくる：絵が飛んでいく */
.flyer { position: fixed; z-index: 20; pointer-events: none; object-fit: contain; }
.sent-art { position: relative; width: 170px; height: 170px; display: grid; place-items: end center; }
.sent-art img { max-width: 150px; max-height: 130px; object-fit: contain; transform-origin: 50% 100%; }
.sent-art .shadow { position: absolute; bottom: -6px; width: 90px; height: 12px; border-radius: 50%; background: rgba(0, 0, 0, .12); }
.sent-art.wait img { animation: m-hop .9s cubic-bezier(.3, 0, .6, 1) infinite; }
.sent-art.cheer img { animation: cheer .7s cubic-bezier(.3, 1.6, .5, 1) 2; }
@keyframes cheer { 0% { transform: translateY(0) scale(1.15, .85); } 40% { transform: translateY(-60px) scale(.9, 1.12) rotate(-8deg); } 100% { transform: translateY(0) scale(1); } }
.dots::after { content: ""; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "・"; } 50% { content: "・・"; } 75% { content: "・・・"; } }
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 30; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 3px; }

@media (prefers-reduced-motion: reduce) {
  .coach .pen, .coach .pen svg, #b-done.nudge, .mv, .mv .in, .micbtn, .thumb.talk, .sent-art img, .dots::after { animation: none !important; }
}
#s-motion, #s-name { justify-content: center; }

/* ---------- これまでの え ---------- */
.chip.gal { padding: 6px 14px; font-size: 15px; }
.gallery { justify-content: flex-start; gap: 12px; }
.gal-seg { display: inline-flex; background: #fff; border-radius: 999px; padding: 4px; gap: 4px; }
.gal-seg button { font: inherit; font-weight: 700; font-size: 15px; border: 0; border-radius: 999px; padding: 6px 16px; background: transparent; color: inherit; cursor: pointer; }
.gal-seg button[aria-pressed="true"] { background: var(--yellow); }
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; width: min(760px, 100%); }
.gal-tile { position: relative; border: 0; background: #fff; border-radius: 18px; padding: 8px; aspect-ratio: 1; cursor: pointer; box-shadow: 0 3px 0 rgba(0, 0, 0, .08); }
.gal-tile img { width: 100%; height: 100%; object-fit: contain; }
.gal-tile .mk { position: absolute; left: 6px; bottom: 6px; }
.gal-tile .vc { position: absolute; right: 8px; top: 6px; font-size: 14px; }
.gal-tile:active { transform: scale(.96); }
.gal-sheet { position: fixed; inset: 0; background: rgba(20, 30, 45, .45); display: grid; place-items: center; padding: 16px; z-index: 20; }
.gal-sheet[hidden] { display: none; }
.gal-card { background: var(--kid-bg, #FFFDF8); border-radius: 28px; padding: 20px; display: grid; justify-items: center; gap: 12px; width: min(420px, 100%); }
.gal-card .thumb { width: min(260px, 70vw); }
.gal-meta { margin: 0; font-weight: 700; font-size: 17px; text-align: center; }

/* ---------- さわっても こわれない ---------- */
html, body { touch-action: manipulation; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
img { -webkit-user-drag: none; user-select: none; pointer-events: auto; }
input, textarea { -webkit-user-select: text; user-select: text; }

/* ---------- スクリーンの自分の絵を うごかす ---------- */
.acts { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.acts[hidden] { display: none; }
.act { width: 104px; height: 104px; border: 0; border-radius: 28px; background: #fff; box-shadow: 0 5px 0 rgba(0, 0, 0, .12); display: grid; place-items: center; align-content: center; gap: 2px; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; touch-action: manipulation; }
.act .ic { font-size: 40px; line-height: 1; }
.act:active { transform: translateY(3px) scale(.96); box-shadow: 0 2px 0 rgba(0, 0, 0, .12); }
.act:focus-visible { outline: 3px solid #F08A3C; outline-offset: 3px; }

/* にじいろ */
.swatch.rainbow i { background: conic-gradient(from 0deg, #ff4b4b, #ffb03a, #FFD23F, #53c75a, #2fb6e0, #5a6ff0, #c65ae8, #ff4b8e, #ff4b4b); }
@media (min-width: 700px) and (min-aspect-ratio: 1/1) { .palette .swatch.rainbow { grid-column: 1 / span 2; justify-self: center; } }

/* せいかく */
.nature { margin: 0; font-size: 16px; text-align: center; color: var(--kid-sub); display: grid; gap: 2px; }
.nature b { color: var(--kid-ink); font-size: 20px; }
.nature small { font-size: 13px; }

/* みんなで なにする？ */
.tg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; }
.tg { border: 0; border-radius: 22px; background: #fff; box-shadow: 0 5px 0 rgba(0, 0, 0, .12); aspect-ratio: 1; display: grid; place-items: center; align-content: center; gap: 2px; font: inherit; font-weight: 700; font-size: 13px; line-height: 1.2; cursor: pointer; touch-action: manipulation; padding: 4px; }
.tg .ic { font-size: 38px; line-height: 1; }
.tg:active { transform: translateY(3px) scale(.96); box-shadow: 0 2px 0 rgba(0, 0, 0, .12); }
.tg:focus-visible { outline: 3px solid #F08A3C; outline-offset: 3px; }

/* 発達に合わせた 描く画面 */
.tools [hidden] { display: none !important; }
.odai-now { position: absolute; left: 12px; top: 10px; max-width: calc(100% - 130px); border: 0; border-radius: 999px; background: #FFF2C2; color: var(--kid-ink); font: inherit; font-weight: 700; font-size: 15px; padding: 6px 12px; box-shadow: 0 2px 0 rgba(0, 0, 0, .08); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.name-art { display: grid; justify-items: center; gap: 8px; }
.desc { margin: 0; background: #fff; border-radius: 18px; padding: 8px 16px; font-weight: 700; font-size: 18px; box-shadow: 0 3px 0 rgba(0, 0, 0, .06); min-height: 1em; }
.desc:empty { display: none; }
.adult-hint { margin: 0; font-family: var(--sans); font-size: 13px; color: var(--kid-sub); background: rgba(255, 255, 255, .7); border-radius: 12px; padding: 8px 12px; width: min(360px, 100%); line-height: 1.6; }
.adult-hint b { color: var(--kid-ink); }
body.st-tiny .palette .swatch i { width: 52px; height: 52px; }
body.st-tiny .tools .tool { min-width: 64px; }

/* きもち */
.feel { display: grid; justify-items: center; gap: 6px; }
.feel-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.fe { border: 0; background: #fff; border-radius: 18px; width: 72px; height: 76px; display: grid; place-items: center; align-content: center; gap: 0; font: inherit; font-weight: 700; font-size: 12px; box-shadow: 0 3px 0 rgba(0, 0, 0, .1); cursor: pointer; }
.fe .ic { font-size: 34px; line-height: 1.1; }
.fe[aria-checked="true"] { outline: 4px solid var(--yellow); transform: translateY(-3px); }
.feel-row.small .fe { width: 56px; height: 60px; font-size: 10px; }
.feel-row.small .fe .ic { font-size: 26px; }
/* おはなし */
.story { display: grid; justify-items: center; gap: 6px; background: rgba(255, 255, 255, .6); border-radius: 20px; padding: 10px 14px; width: min(420px, 100%); }
.story-q { margin: 0; font-weight: 700; font-size: 18px; text-align: center; }
.story-rec { display: inline-flex; gap: 8px; align-items: center; touch-action: none; }
.story-rec .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--red); }
.story-rec.rec { background: #ffd9d6; }
.story-rec.rec .dot { animation: breathe 1s ease-in-out infinite; }
/* たすけて */
.trouble { position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 58px); transform: translateX(-50%); z-index: 25; display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 20px; padding: 8px 10px 8px 14px; box-shadow: 0 8px 24px rgba(20, 30, 45, .2); width: min(440px, calc(100% - 24px)); animation: pop .35s cubic-bezier(.3, 1.6, .5, 1); }
.trouble[hidden] { display: none; }
.trouble .t-ic { font-size: 26px; }
.trouble .t-txt { flex: 1; font-weight: 700; font-size: 15px; line-height: 1.35; }
.trouble .btn { padding: 10px 14px; font-size: 16px; white-space: nowrap; }

/* おきゃくさん・つれてかえる */
.guest-name { display: grid; gap: 4px; font-size: 14px; font-weight: 700; font-family: var(--sans); color: var(--kid-sub); width: min(300px, 100%); }
.guest-name input { font: inherit; font-size: 18px; padding: 8px 12px; border-radius: 12px; border: 2px solid #E7E1D4; }
.takehome { display: grid; justify-items: center; gap: 6px; background: #fff; border-radius: 22px; padding: 14px 16px; width: min(380px, 100%); box-shadow: 0 4px 0 rgba(0, 0, 0, .06); }
.takehome[hidden] { display: none; }
.th-title { margin: 0; font-weight: 700; font-size: 19px; }
.th-sub { margin: 0; font-size: 13px; color: var(--kid-sub); font-family: var(--sans); text-align: center; }
.th-qr svg { width: 150px; height: 150px; }
.th-qr:empty { display: none; }
.th-code { margin: 0; font-family: var(--mono, monospace); letter-spacing: .12em; font-size: 14px; color: var(--kid-sub); }
.takehome .btn { text-decoration: none; }
body.guest #b-who, body.guest #b-gallery, body.guest #b-sent-gallery, body.guest #b-feed, body.guest #b-together, body.guest #sent-acts { display: none !important; }

/* みせる・どうが */
.share-row .btn { font-size: 15px; padding: 10px 16px; }
/* どうがに する：1 えらぶ → 2 つくる → 3 ほぞん・おくる */
.steps { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0; font-size: 13px; font-weight: 700; }
.steps li { padding: 4px 10px; border-radius: 999px; background: #fff; color: #A5A193; }
.steps li.now { background: var(--yellow); color: #2B2F45; }
.steps li.past { color: #2B2F45; }
.clip-stage { position: relative; width: min(300px, 64vw); aspect-ratio: 1; }
#clip-canvas, #clip-video, .rp-canvas { width: min(300px, 64vw); aspect-ratio: 1; border-radius: 18px; background: #fff; box-shadow: 0 4px 0 rgba(0, 0, 0, .08); }
#clip-canvas { width: 100%; }
#clip-video { background: #000; }
.clip-prog { width: min(300px, 64vw); height: 10px; border-radius: 999px; background: #fff; overflow: hidden; }
.clip-stage .clip-prog { position: absolute; left: 8%; right: 8%; bottom: 12px; width: auto; box-shadow: 0 1px 0 rgba(0, 0, 0, .1); }
.clip-prog i { display: block; height: 100%; width: 0; background: var(--yellow); transition: width .2s linear; }
.clip-opts { display: grid; gap: 6px; }
.clip-opt { font-size: 15px; font-family: var(--sans); display: flex; gap: 8px; align-items: center; }
.clip-opt input { width: 22px; height: 22px; }
.clip-done { display: grid; gap: 8px; justify-items: center; }
.btn.big { font-size: 20px; padding: 14px 26px; }
.sub.small { font-size: 12px; }
/* シートが 画面より 高いときは 中で スクロール */
.gal-card { max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; }
.gal-card .thumb { width: min(220px, 55vw); }

/* これまでの え の「すき」 */
.fav-filter[aria-pressed="true"] { background: var(--yellow); }
.gal-tile .fv { position: absolute; left: 8px; top: 4px; font-size: 18px; filter: drop-shadow(0 1px 0 #fff); }
.gal-imgwrap { position: relative; display: grid; place-items: center; }
.fav-btn { position: absolute; right: -10px; top: -10px; width: 56px; height: 56px; border-radius: 50%; border: 3px solid #2B2F45; background: #fff; font-size: 30px; line-height: 1; color: #A5A193; cursor: pointer; box-shadow: 0 3px 0 rgba(0, 0, 0, .12); display: grid; place-items: center; }
.fav-btn[aria-pressed="true"] { background: var(--yellow); color: #2B2F45; }
.fav-btn.burst { animation: favpop .5s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes favpop { 0% { transform: scale(.6); } 60% { transform: scale(1.25) rotate(12deg); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .fav-btn.burst { animation: none; } }

/* こえかけ：絵の いきものから 描いた 子へ（public/shared/callouts.js） */
.callouts { width: 100%; box-sizing: border-box; justify-self: stretch; align-self: stretch; background: #FFF2C2; border-radius: 20px; padding: 10px 10px 12px; }
.callouts[hidden] { display: none; }
.co-h { margin: 0 0 8px; font-weight: 700; font-size: 14px; text-align: center; color: #6b5310; }
.co-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.co { border: 0; border-radius: 999px; background: #fff; box-shadow: 0 4px 0 rgba(0, 0, 0, .12); padding: 8px; font: inherit; font-weight: 700; font-size: 14px; justify-content: center; line-height: 1.2; cursor: pointer; touch-action: manipulation; display: inline-flex; gap: 6px; align-items: center; min-height: 48px; }
.co .ic { font-size: 20px; flex: none; line-height: 1; }
.co:active { transform: translateY(3px) scale(.96); box-shadow: 0 1px 0 rgba(0, 0, 0, .12); }
.co:focus-visible { outline: 3px solid #F08A3C; outline-offset: 3px; }
.co[disabled] { opacity: .5; }

/* これまでの え：タブで わける（うごかす／こえかけ／みる・おくる） */
.gal-tabs { display: flex; justify-content: center; margin: 4px auto 0; }
.gal-pane { width: 100%; min-height: 120px; display: grid; align-content: start; }
.gal-pane[hidden] { display: none; }
.acts.small { gap: 8px; }
.acts.small .act { width: 74px; height: 82px; border-radius: 22px; font-size: 12px; }
.acts.small .act .ic { font-size: 30px; }
.act.go { background: #FFD23F; }
.sec-h { margin: 10px 0 6px; font-weight: 700; font-size: 15px; text-align: center; color: #454A63; }
/* なまえ：おくるは いちばん したに 大きく */
.send-big { min-width: min(360px, 90vw); margin-top: 6px; }
.btn.small { padding: 8px 16px; font-size: 15px; min-height: 0; }
.act.feed { background: var(--orange); color: #fff; }
#gal-sheet .gal-card { width: min(480px, 100%); }
.gal-tabs button { white-space: nowrap; padding: 8px 14px; font-size: 15px; }
.acts.small .act { width: 70px; }
/* 描く画面の うえ：左に だれ・どこ、右に ボタンを まとめる */
#s-draw .topbar { justify-content: flex-start; }
#s-draw .topbar .room-name { margin-right: auto; min-width: 0; }
#b-play-top { background: #FFD23F; }
#s-draw .topbar .chip { white-space: nowrap; }
@media (max-width: 560px) {
  #s-draw .topbar .room-name { display: none; }
  #s-draw .topbar #b-who { margin-right: auto; }
  #s-draw .topbar .chip.gal { padding: 6px 12px; font-size: 20px; }
  #sent-acts .act { width: 76px; height: 84px; border-radius: 22px; font-size: 12px; }
  #sent-acts .act .ic { font-size: 30px; }
}
/* みんなで あそぼう：4れつ */
#tg-sheet .gal-card { width: min(560px, 100%); }
#tg-sheet .tg-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
#tg-sheet .tg { font-size: 12px; border-radius: 18px; }
#tg-sheet .tg .ic { font-size: 32px; }
@media (max-width: 420px) { #tg-sheet .tg-grid { grid-template-columns: repeat(3, 1fr); } }
#tg-sheet .gal-card { box-sizing: border-box; }
#tg-sheet .tg-grid { box-sizing: border-box; min-width: 0; grid-template-columns: repeat(5, minmax(0, 1fr)); }
#tg-sheet .tg { min-width: 0; aspect-ratio: auto; height: 92px; }
#tg-sheet #tg-song-grid { grid-template-columns: 1fr; }
#tg-sheet #tg-song-grid .tg-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#tg-sheet #tg-song-grid .tg { height: 76px; grid-auto-flow: column; gap: 8px; font-size: 13px; }
@media (max-width: 420px) { #tg-sheet .tg-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ===== 字は なるべく ださない（字が よめない 子も さわれるように。ことばは 声と aria-label で） ===== */
.tx, #me-name, #s-draw .topbar .room-name { display: none !important; }
body { background: #fff; }
.sent { background: #fff; }
.gal-card { background: #fff; box-shadow: 0 10px 40px rgba(0, 0, 0, .18); }
/* 白い 背景でも ボタンが わかるように ふちを つける */
.btn, .chip, .tool, .act, .tg, .co, .fe, .kid, .gal-tile, .room, .gal-seg { box-shadow: 0 0 0 2px #E7E1D4, 0 4px 0 rgba(0, 0, 0, .1); }
.btn.go { box-shadow: 0 0 0 2px rgba(43, 47, 69, .12), 0 5px 0 rgba(43, 47, 69, .18); }
.tool.on { box-shadow: 0 0 0 3px var(--yellow); }
.paper { box-shadow: inset 0 0 0 3px #E7E1D4; }
/* 字の かわりの 大きな アイコン */
#b-done .ico { width: 44px; height: 44px; }
#b-send { font-size: 40px; line-height: 1; padding: 14px 28px; }
#b-send .arrow { font-size: 34px; }
#b-again { font-size: 44px; line-height: 1; padding: 12px 24px; }
#b-together, #b-sent-gallery, #b-retry, #od-free, #b-gal-more { font-size: 30px; line-height: 1; padding: 10px 22px; }
.col { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: center; }
.col #b-again { flex-basis: 100%; max-width: 360px; }
.chip.back { padding: 8px 16px; font-size: 22px; }
.act .ic { font-size: 46px; }
.acts.small .act .ic { font-size: 34px; }
.tg .ic { font-size: 44px; }
#tg-sheet .tg .ic { font-size: 40px; }
#tg-sheet #tg-song-grid .tg .ic { font-size: 40px; }
.co { justify-content: center; }
.co .ic { font-size: 30px; }
.co-row { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
.gal-tabs button { font-size: 24px; padding: 6px 18px; }
.gal-seg button { font-size: 22px; }
.fav-filter { font-size: 22px; padding: 6px 14px; }
.empty-ic { font-size: 44px; }
.sec-h { font-size: 26px; margin: 6px 0 2px; }
.closex { border: 0; background: #F5F1E8; width: 52px; height: 52px; border-radius: 50%; font-size: 22px; font-weight: 700; cursor: pointer; }
.gal-meta { font-size: 13px; color: var(--kid-sub); margin: 0; }
.t-ic { font-size: 34px; }
#b-help { font-size: 30px; padding: 8px 20px; }
.kid small { display: none; }
.tool { min-width: 58px; min-height: 58px; }
.tool svg { width: 28px; height: 28px; }

.adult-hint { background: transparent; text-align: center; }
.hint-ic { border: 0; background: #F5F1E8; border-radius: 50%; width: 40px; height: 40px; font-size: 20px; cursor: pointer; }
.hint-tx { display: block; margin-top: 6px; background: #FFFDF8; border-radius: 12px; padding: 8px 12px; text-align: left; }
.hint-tx[hidden] { display: none; }
.chip .lbl { display: none !important; }
#s-draw .topbar .chip.gal { padding: 6px 14px; font-size: 22px; }
.thumb { box-shadow: 0 0 0 2px #E7E1D4; }
@media (max-width: 420px) { .tools { gap: 6px; } .tool { min-width: 48px; min-height: 50px; } .tool svg { width: 24px; height: 24px; } }

/* ---- 続けたくなる しくみ（docs/moments.md） ---- */
.chip.post { animation: postBob 1.6s ease-in-out 3; background: #FFF2C2; }
@keyframes postBob { 50% { transform: translateY(-3px) rotate(-6deg); } }
.shelf { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 4px 0 12px; }
.shelf button { width: 54px; height: 54px; border-radius: 16px; border: 0; background: #fff; font-size: 30px; box-shadow: 0 3px 0 rgba(0,0,0,.08); cursor: pointer; }
.shelf button.new { animation: postBob 1.2s ease-in-out 3; background: #FFF2C2; }
.peek { position: fixed; right: 16px; bottom: 16px; z-index: 30; display: flex; align-items: center; gap: 10px; border: 0; background: #fff; border-radius: 22px; padding: 8px 14px 8px 8px; box-shadow: 0 8px 24px rgba(20,30,45,.25); cursor: pointer; animation: peekIn .45s cubic-bezier(.3,1.6,.5,1); }
.peek img { width: 72px; height: 72px; object-fit: contain; border-radius: 14px; background: #F5F1E8; }
.peek img:not([src]), .peek img[src=""] { display: none; }
.pk-ic { font-size: 40px; }
@keyframes peekIn { from { transform: translateY(40px) scale(.6); opacity: 0; } }
.trial { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 20px 16px; }
.trial canvas { width: min(100%, 720px); aspect-ratio: 3 / 2; border-radius: 24px; background: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.trial-msg { max-width: 34em; text-align: center; font-size: 14px; color: #646880; margin: 0; }
.later { border: 0; background: none; color: #646880; font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; padding: 6px; }
body.trial #b-gallery, body.trial #b-play-top, body.trial #b-odai, body.trial #b-post { display: none; }

/* ---- ためしの あそび（docs/trial.md） ---- */
.od-special { margin-bottom: 4px; }
.od-special .tg { background: #FFF2C2; box-shadow: 0 5px 0 #FFD23F; }
.vplay-card { gap: 14px; }
.vp-sky { position: relative; width: min(320px, 78vw); aspect-ratio: 1; border-radius: 24px; background: linear-gradient(#F5F1E8, #FFFDF8 70%, #DDEBC8 70%); overflow: hidden; }
.vp-sky img { position: absolute; left: 50%; width: 38%; bottom: 30%; transform: translate(-50%, 0); transition: bottom .12s linear, transform .12s linear; }
.vp-sky img:not([src]), .vp-sky img[src=""] { display: none; }
.vp-ring { position: absolute; left: 50%; bottom: 8%; width: 60px; height: 60px; margin-left: -30px; border-radius: 50%; border: 4px solid #FF8FAB; opacity: 0; transition: transform .1s linear, opacity .1s linear; }
.vp-mic { width: 120px; height: 120px; border-radius: 50%; border: 0; background: #FF8FAB; font-size: 56px; box-shadow: 0 6px 0 #D96A87; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; }
.vp-mic.on { background: #E5483F; box-shadow: 0 2px 0 #B0322B; transform: translateY(4px); }
.vp-word { margin: 0; min-height: 1.4em; font-size: 28px; }
.vp-hint { margin: 0; width: 100%; font-size: 13px; }

/* ---- 紙の 絵を とりこむ（public/draw/scan.js） ---- */
#cv-base { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.scan-body { flex: 1; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 12px; padding: 12px 16px 16px; }
.scan-view { position: relative; min-height: 0; display: grid; place-items: center; }
.scan-photo, .scan-result { position: relative; max-width: 100%; max-height: 100%; }
.scan-photo canvas, .scan-result canvas { display: block; max-width: 100%; max-height: min(62dvh, 100%); border-radius: 14px; }
.scan-result canvas { background: #fff; box-shadow: inset 0 0 0 3px #E7E1D4; background-image: linear-gradient(45deg, #F5F1E8 25%, transparent 25%, transparent 75%, #F5F1E8 75%), linear-gradient(45deg, #F5F1E8 25%, transparent 25%, transparent 75%, #F5F1E8 75%); background-size: 24px 24px; background-position: 0 0, 12px 12px; }
.scan-photo svg { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.scan-photo svg circle { fill: rgba(255, 255, 255, .85); stroke: #FFD23F; stroke-width: 4; cursor: grab; }
.scan-photo svg polygon { fill: rgba(242, 178, 0, .12); stroke: #FFD23F; stroke-width: 3; }
.scan-busy { position: absolute; font-size: 48px; margin: 0; animation: postBob 1s ease-in-out infinite; }
.scan-ctl { display: grid; justify-items: center; gap: 10px; }
.scan-row { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; }
.scan-tip { margin: 0; font-family: var(--sans); font-size: 14px; color: var(--kid-sub, #646880); }
.scan-str { display: flex; align-items: center; gap: 8px; font-family: var(--sans); font-size: 13px; color: var(--kid-sub, #646880); }
.scan-str input { width: min(240px, 50vw); }
.scan-hint { margin: 0; font-size: 13px; max-width: 34em; }
.screen.scan { display: flex; flex-direction: column; }
.screen.scan[hidden] { display: none; }
#scan-ok { min-width: 120px; }
#scan-ok .ico { width: 36px; height: 36px; color: var(--kid-ink, #2B2F45); }

/* ---- 字の ボタン（もどる・えを おくる）---- */
.txt { font-family: var(--round, inherit); font-weight: 700; }
.chip.txt { font-size: 17px; padding: 8px 16px; }
#b-send.txt { font-size: 24px; letter-spacing: .04em; }
/* まず 1まい：おとな むけの ログイン */
.trial-login { display: none; font-size: 14px; font-weight: 700; }
body.trial .trial-login, body.guest .trial-login { display: inline; }
body.trial #b-who, body.guest #b-who { padding: 6px 14px; }
body.guest #s-draw #b-who { display: inline-flex !important; }
/* せまい 画面では うえの ボタンを 2だんに（はみ出して 見えなく ならないように） */
#s-draw .topbar { flex-wrap: wrap; row-gap: 6px; }
@media (max-width: 520px) { #s-draw .topbar .chip.gal { padding: 5px 9px; font-size: 18px; } }

/* うた：なかまごと（ていばん・にんき・どうぶつ・きせつ） */
.song-cats, #tg-sheet .song-cats { display: grid; grid-template-columns: 1fr; gap: 4px; width: 100%; }
.song-cat { margin: 10px 0 2px; font-weight: 700; font-size: 14px; color: #454A63; display: flex; align-items: center; gap: 6px; }
.song-cat:first-child { margin-top: 0; }
.song-cats .tg .tx { font-size: 12px; }

/* 描く画面の 上の ボタン：子どもの 指でも おしまちがえない 大きさ（高さ 64px・あいだ 16px） */
#s-draw .topbar { gap: 16px; row-gap: 10px; }
#s-draw .topbar .chip { min-height: 64px; }
#s-draw .topbar .chip.gal { min-width: 76px; justify-content: center; padding: 8px 16px; font-size: 32px; }
#s-draw .topbar #b-who { padding: 6px 18px 6px 8px; font-size: 18px; min-width: 76px; }
#s-draw .topbar #me-mark { display: inline-flex; }
@media (max-width: 520px) {
  #s-draw .topbar { gap: 8px; }
  #s-draw .topbar #b-who { margin-right: 0; min-width: 58px; padding: 4px 8px; }
  #s-draw .topbar .chip { min-height: 54px; }
  #s-draw .topbar .chip.gal { min-width: 56px; padding: 6px 8px; font-size: 26px; }
}

/* いっしょに うたおう（うたを ながした あいだ） */
.singalong { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; align-content: center; gap: 14px; background: radial-gradient(circle at 50% 40%, #FFF2C2 0, #ffe1ec 45%, #F5F1E8 100%); overflow: hidden; }
.singalong[hidden] { display: none; }
.sa-stage { position: relative; width: min(56vmin, 420px); aspect-ratio: 1; display: grid; place-items: center; animation: saSing calc(var(--beat, .6s) * 2) ease-in-out infinite; transform-origin: 50% 92%; }
.sa-stage > * { grid-area: 1 / 1; }
.sa-glow { width: 86%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(255, 224, 103, .55) 0, rgba(255, 143, 171, .25) 55%, transparent 72%); animation: saGlow var(--beat, .6s) ease-out infinite; }
@keyframes saGlow { 0% { transform: scale(.82); opacity: .9; } 100% { transform: scale(1.12); opacity: .2; } }
/* うたっている：拍で のびて ちぢむ、2拍で ひだり・みぎ に ゆれる */
@keyframes saSing {
  0% { transform: translateY(0) scale(1.05, .95) rotate(-5deg); }
  25% { transform: translateY(-6%) scale(.96, 1.06) rotate(0deg); }
  50% { transform: translateY(0) scale(1.05, .95) rotate(5deg); }
  75% { transform: translateY(-6%) scale(.96, 1.06) rotate(0deg); }
  100% { transform: translateY(0) scale(1.05, .95) rotate(-5deg); }
}
.sa-stage img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 14px 18px rgba(40, 50, 80, .18)); }
.sa-stage img:not([src]), .sa-stage img[src=""] { display: none; }
.sa-ic { font-size: min(30vmin, 220px); display: none; }
.sa-stage.noimg .sa-ic { display: block; }
@keyframes saBob { 0%, 100% { transform: translateY(0) scale(1.03, .97) rotate(-4deg); } 50% { transform: translateY(-5%) scale(.98, 1.03) rotate(4deg); } }
.sa-title { margin: 0; font-size: clamp(30px, 6vmin, 56px); font-weight: 900; color: #2B2F45; letter-spacing: .04em; animation: saPulse calc(var(--beat, .6s) * 2) ease-in-out infinite; text-align: center; }
@keyframes saPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.sa-song { margin: 0; font-size: 44px; }
.sa-notes i { position: absolute; bottom: -60px; font-style: normal; font-size: 48px; color: #FF8FAB; animation: saNote 4.5s linear infinite; }
.sa-notes i:nth-child(2) { left: 22%; animation-delay: .7s; color: #5AA9E6; }
.sa-notes i:nth-child(3) { left: 40%; animation-delay: 1.5s; color: #7BC96F; }
.sa-notes i:nth-child(4) { left: 60%; animation-delay: 2.2s; color: #F2B84B; }
.sa-notes i:nth-child(5) { left: 78%; animation-delay: 3s; color: #B78CFF; }
.sa-notes i:nth-child(6) { left: 90%; animation-delay: 3.7s; }
.sa-notes i:nth-child(1) { left: 8%; }
@keyframes saNote { 0% { transform: translateY(0) rotate(0); opacity: 0; } 10% { opacity: 1; } 100% { transform: translateY(-110vh) rotate(30deg); opacity: 0; } }
.sa-rec { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 16px); left: 16px; display: flex; align-items: center; gap: 6px; background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 22px; box-shadow: 0 4px 12px rgba(0, 0, 0, .12); }
.sa-rec b { width: 12px; height: 12px; border-radius: 50%; background: #E5483F; animation: saRec 1s ease-in-out infinite; }
@keyframes saRec { 50% { opacity: .25; } }
.sa-bar { width: min(70vw, 520px); height: 12px; border-radius: 6px; background: rgba(255, 255, 255, .7); overflow: hidden; }
.sa-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #FF8FAB, #FFD23F, #7BC96F, #5AA9E6); border-radius: 6px; }
.singalong .closex { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 12px); right: 12px; }
@media (prefers-reduced-motion: reduce) { .sa-stage, .sa-title, .sa-notes i { animation: none; } }

/* これまでの え の 🎤：いっしょに うたった うた */
.sing-grid .gal-tile { position: relative; }
.sing-grid .gal-tile .sg { position: absolute; right: 6px; bottom: 6px; font-size: 26px; }
.sing-grid .gal-tile .ph { font-size: 44px; }
.sing-grid .gal-tile.playing img, .sing-grid .gal-tile.playing .ph { animation: saSing calc(var(--beat, .6s) * 2) ease-in-out infinite; transform-origin: 50% 90%; }
.sing-grid .gal-tile.playing { box-shadow: 0 0 0 4px #FFD23F, 0 4px 0 rgba(0, 0, 0, .1); }
.gal-filters { display: inline-flex; gap: 10px; }
#s-gallery.singing .shelf { display: none; }
