/* うごけ！ロボ — おもちゃ箱の質感のブロックプログラミング */
:root {
  --sky: #2BB3EE;
  --sky-pale: #E4F6FE;
  --sky-mid: #BDE8FB;
  --sky-deep: #0A5C8A;
  --sun: #FFD43B;
  --sun-pale: #FFF4C2;
  --sun-deep: #7A5200;
  --red: #DA3229;
  --red-deep: #A51D17;
  --ink: #10294A;
  --ink-2: #3D5373;
  --paper: #FFFFFF;
  --b-move: #62C9F5;  --b-move-d: #2A97C9;
  --b-turn: #FFD43B;  --b-turn-d: #D6A600;
  --b-loop: #FF8378;  --b-loop-d: #D9483D;
  --b-if: #1B4F8C;    --b-if-d: #0E3360;
  --f-jp: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Hiragino Sans", sans-serif;
  --f-num: "Fredoka", "M PLUS Rounded 1c", sans-serif;
  --boing: cubic-bezier(.34, 1.7, .5, 1);
  --ease: cubic-bezier(.2, 0, 0, 1);
  --step: 420ms;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --tab-h: 74px;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font-family: var(--f-jp); font-weight: 500; font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--sky-pale); line-break: strict; overflow: hidden; -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
.kp, .kids { word-break: keep-all; overflow-wrap: normal; }
.nw { white-space: nowrap; }
.num { font-family: var(--f-num); font-weight: 600; font-variant-numeric: tabular-nums; }
.ic { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic--fill { fill: currentColor; stroke: none; }

@media (min-width: 600px) {
  body { background-color: var(--sky); background-image: linear-gradient(45deg, rgba(255, 255, 255, .14) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, .14) 75%), linear-gradient(45deg, rgba(255, 255, 255, .14) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, .14) 75%); background-size: 64px 64px; background-position: 0 0, 32px 32px; }
  #app { box-shadow: 0 0 0 6px var(--sun), 0 30px 70px rgba(10, 60, 100, .45); }
}
#app { position: relative; max-width: 430px; height: 100dvh; margin: 0 auto; overflow: hidden; background: var(--sky-pale); }
.boot-fail { padding: 48px 24px; text-align: center; }
.boot-fail__t { font-size: 26px; font-weight: 800; color: var(--sky-deep); }

.scr { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--sky-pale); }
.scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: none; }
.scroll::-webkit-scrollbar { display: none; }
.has-tabs .scroll { padding-bottom: calc(var(--tab-h) + var(--safe-b) + 24px); }
.in-push { animation: inPush .42s var(--ease) both; }
.in-pop { animation: inPop .42s var(--ease) both; }
.in-fade { animation: inFade .3s var(--ease) both; }
.out { animation: outFade .2s linear both; }
@keyframes inPush { from { transform: translateY(40px) scale(.96); opacity: 0; } }
@keyframes inPop { from { transform: scale(1.04); opacity: 0; } }
@keyframes inFade { from { opacity: 0; } }
@keyframes outFade { to { opacity: 0; } }

/* ===== ヘッダー ===== */
.top { flex: none; display: flex; align-items: center; gap: 6px; min-height: 60px; padding: calc(6px + var(--safe-t)) 8px 6px; background: var(--sky-pale); position: relative; z-index: 3; }
.top__t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.top__k { font-size: 12px; font-weight: 800; color: var(--sky-deep); }
.top__n { font-size: 19px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbtn { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 16px; background: var(--paper); box-shadow: 0 3px 0 var(--sky-mid); transition: transform .25s var(--boing); }
.tbtn:active { transform: translateY(3px); box-shadow: none; }
.tbtn[aria-pressed="false"] { color: var(--ink-2); }

/* ===== タブ ===== */
.tabs { position: absolute; left: 10px; right: 10px; bottom: calc(10px + var(--safe-b)); z-index: 20; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 6px; height: var(--tab-h); border-radius: 26px; background: var(--paper); box-shadow: 0 6px 0 var(--sky-mid), 0 14px 30px rgba(10, 60, 100, .18); }
.tabs.off { display: none; }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 20px; font-size: 12px; font-weight: 800; color: var(--ink-2); transition: background-color .25s, transform .3s var(--boing); }
.tab:active { transform: scale(.92); }
.tab[aria-current="page"] { background: var(--sun); color: var(--ink); }

/* ===== ステージ選択 ===== */
.hero { position: relative; height: 330px; background: var(--sky) url(/app-development/apps/a069/img/title.webp) center 62% / cover no-repeat; border-radius: 0 0 36px 36px; overflow: hidden; }
.hero__plate { position: absolute; left: 50%; top: calc(26px + var(--safe-t)); transform: translateX(-50%) rotate(-3deg); padding: 10px 22px 12px; border-radius: 22px; background: var(--paper); box-shadow: 0 6px 0 var(--sun); text-align: center; white-space: nowrap; animation: plate .8s var(--boing) both; }
.hero__name { font-size: 36px; font-weight: 800; line-height: 1.15; color: var(--sky-deep); letter-spacing: .02em; }
.hero__name b { color: var(--red); }
.hero__sub { font-size: 13px; font-weight: 800; color: var(--ink-2); }
@keyframes plate { from { transform: translateX(-50%) rotate(-12deg) scale(.6); opacity: 0; } }
.cont { position: relative; margin: -46px 16px 0; display: flex; align-items: center; gap: 14px; padding: 14px 14px 14px 16px; border-radius: 26px; background: var(--paper); box-shadow: 0 6px 0 var(--sky-mid); z-index: 2; }
.cont__n { width: 56px; height: 56px; flex: none; border-radius: 18px; background: var(--red); color: #fff; display: grid; place-items: center; font: 600 28px var(--f-num); box-shadow: 0 4px 0 var(--red-deep); }
.cont__b { flex: 1; min-width: 0; }
.cont__k { font-size: 12px; font-weight: 800; color: var(--red-deep); }
.cont__t { font-size: 17px; font-weight: 800; line-height: 1.35; }
.go { min-height: 48px; padding: 0 18px; border-radius: 16px; background: var(--sun); color: var(--ink); font-weight: 800; display: inline-flex; align-items: center; gap: 6px; box-shadow: 0 4px 0 var(--b-turn-d); transition: transform .2s var(--boing); white-space: nowrap; }
.go:active { transform: translateY(4px); box-shadow: none; }
.tally { display: flex; justify-content: center; gap: 10px; margin: 18px 16px 4px; }
.tally span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 14px; background: var(--paper); font-weight: 800; font-size: 14px; }
.tally .ic { width: 20px; height: 20px; color: #E9A600; }
.tally span + span .ic { color: #1C8C4E; }
.tally b { font-size: 18px; }
.path { position: relative; margin: 6px 0 0; }
.path svg.road { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.node { position: absolute; width: 112px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.node__b { width: 78px; height: 72px; border-radius: 22px; display: grid; place-items: center; font: 600 32px var(--f-num); color: var(--ink); background: var(--sun); box-shadow: 0 7px 0 var(--b-turn-d); transition: transform .25s var(--boing); position: relative; }
.node__b:active { transform: translateY(6px); box-shadow: 0 1px 0 var(--b-turn-d); }
.node--now .node__b { background: var(--red); color: #fff; box-shadow: 0 7px 0 var(--red-deep); animation: bob 1.6s ease-in-out infinite; }
.node--lock .node__b { background: #D7E6EF; color: var(--ink-2); box-shadow: 0 7px 0 #A9C2D2; }
@keyframes bob { 50% { transform: translateY(-6px); } }
.node__l { padding: 2px 10px; border-radius: 10px; background: var(--paper); font-size: 12px; font-weight: 800; white-space: nowrap; }
.node__s { display: flex; gap: 1px; color: #E9A600; }
.node__s .ic { width: 16px; height: 16px; }
.node__s .ic.off { color: #B9CBD8; }
.node__tag { position: absolute; top: -12px; right: -14px; padding: 2px 8px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 800; white-space: nowrap; }

/* ===== プログラミング画面 ===== */
.scr-stage { background: var(--sky-pale); }
.goalbar { flex: none; margin: 0 12px; display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 16px; background: var(--paper); font-size: 14px; font-weight: 800; }
.goalbar__ic { width: 30px; height: 30px; border-radius: 10px; background: var(--sun); display: grid; place-items: center; flex: none; }
.goalbar__ic .ic { width: 20px; height: 20px; }
.goalbar__t { flex: 1; min-width: 0; line-height: 1.4; }
.goalbar__g { display: inline-flex; align-items: center; gap: 4px; font-family: var(--f-num); font-weight: 600; white-space: nowrap; }
.boardwrap { flex: none; display: grid; place-items: center; padding: 10px 0 8px; position: relative; }
.board { width: min(calc(100vw - 40px), 34dvh, 340px); aspect-ratio: 1; position: relative; }
.board svg { width: 100%; height: 100%; display: block; overflow: visible; }
.board.shake { animation: shake .4s; }
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
.robo { transition: transform var(--step) cubic-bezier(.45, 0, .25, 1); }
.gear-g { transform-box: fill-box; transform-origin: center; animation: spin 6s linear infinite; }
.gear-got { transform-box: fill-box; transform-origin: center; animation: got .5s var(--boing) forwards; }
@keyframes got { 40% { transform: scale(1.5); opacity: 1; } 100% { transform: scale(0) translateY(-40px); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
.glow { transform-box: fill-box; transform-origin: center; animation: glow 1.6s ease-in-out infinite; }
@keyframes glow { 50% { transform: scale(1.18); opacity: .35; } }

.prog { flex: 1; min-height: 0; margin: 0 12px; border-radius: 22px 22px 0 0; background: var(--paper); display: flex; flex-direction: column; position: relative; box-shadow: inset 0 0 0 2px var(--sky-mid); }
.prog__h { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px 4px; }
.prog__t { font-size: 14px; font-weight: 800; color: var(--sky-deep); }
.cnt { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 12px; background: var(--sky-pale); font-size: 13px; font-weight: 800; white-space: nowrap; }
.cnt b { font: 600 17px var(--f-num); }
.cnt.ok { background: var(--sun-pale); color: var(--sun-deep); }
.cnt.over { background: #FFE4E1; color: var(--red-deep); }
.prog .scroll { padding: 6px 12px 28px 12px; position: relative; }
.prog.running .scroll { pointer-events: none; }
.prog.running .scroll { overflow-y: auto; pointer-events: auto; }
.prog.running .blk, .prog.running .pill { pointer-events: none; }
.hat { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px 0 14px; border-radius: 22px 22px 12px 12px; background: var(--red); color: #fff; font-weight: 800; font-size: 15px; box-shadow: 0 4px 0 var(--red-deep); margin-bottom: 8px; position: relative; }
.hat .ic { width: 20px; height: 20px; }
.list { position: relative; min-height: 8px; }
.list--root { padding-left: 4px; min-height: 120px; }
.empty-hint { display: flex; align-items: center; gap: 10px; margin: 6px 0 0 4px; padding: 12px 14px; border: 2.5px dashed var(--sky-mid); border-radius: 16px; color: var(--sky-deep); font-size: 14px; font-weight: 800; }
.empty-hint .ic { color: var(--sky); }

/* ブロック */
.blk { --c: var(--b-move); --cd: var(--b-move-d); --t: var(--ink); position: relative; margin-bottom: 10px; width: max-content; max-width: 100%; touch-action: none; user-select: none; -webkit-user-select: none; }
.blk--turn { --c: var(--b-turn); --cd: var(--b-turn-d); }
.blk--loop { --c: var(--b-loop); --cd: var(--b-loop-d); }
.blk--if { --c: var(--b-if); --cd: var(--b-if-d); --t: #FFFFFF; }
.blk__head, .blk--s { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px 0 10px; border-radius: 14px; background: var(--c); color: var(--t); font-weight: 800; font-size: 15px; box-shadow: 0 4px 0 var(--cd); position: relative; white-space: nowrap; cursor: grab; }
.blk__head::after, .blk--s::after { content: ""; position: absolute; left: 16px; bottom: -7px; width: 22px; height: 8px; border-radius: 0 0 9px 9px; background: var(--c); z-index: 1; }
.blk__head::before, .blk--s::before { content: ""; position: absolute; left: 16px; top: 0; width: 22px; height: 6px; border-radius: 0 0 9px 9px; background: rgba(16, 41, 74, .16); }
.blk__ic { width: 30px; height: 30px; border-radius: 10px; background: rgba(255, 255, 255, .5); display: grid; place-items: center; flex: none; }
.blk--if .blk__ic { background: rgba(255, 255, 255, .18); }
.blk__ic .ic { width: 20px; height: 20px; stroke-width: 2.8; }
.blk--c { min-width: 220px; }
.blk--c > .blk__head { border-radius: 14px 14px 14px 0; box-shadow: none; }
.blk__arm { display: flex; }
.blk__arm::before { content: ""; width: 16px; flex: none; background: var(--c); }
.blk__body { flex: 1; min-width: 0; padding: 10px 0 2px 8px; min-height: 58px; }
.blk__body > .list { min-height: 48px; }
.blk__mid { display: flex; align-items: center; min-height: 34px; padding: 0 14px; background: var(--c); color: var(--t); font-weight: 800; font-size: 13px; border-radius: 0 12px 12px 0; position: relative; }
.blk__foot { height: 18px; width: 100px; background: var(--c); border-radius: 0 0 14px 14px; box-shadow: 0 4px 0 var(--cd); position: relative; }
.blk__foot::after { content: ""; position: absolute; left: 16px; bottom: -7px; width: 22px; height: 8px; border-radius: 0 0 9px 9px; background: var(--c); }
.slot-empty { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border: 2px dashed rgba(16, 41, 74, .25); border-radius: 12px; font-size: 13px; font-weight: 800; color: var(--ink-2); white-space: nowrap; }
.pill { min-width: 44px; min-height: 36px; padding: 0 10px; border-radius: 12px; background: var(--paper); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 4px; font-weight: 800; font-size: 14px; box-shadow: 0 2px 0 rgba(16, 41, 74, .25); cursor: pointer; transition: transform .2s var(--boing); }
.pill:active { transform: scale(.9); }
.pill .num { font-size: 19px; }
.pill .ic { width: 14px; height: 14px; stroke-width: 3; }
.blk.is-run > .blk__head, .blk--s.is-run { outline: 4px solid var(--red); outline-offset: 2px; }
.blk.is-pop { animation: pop .45s var(--boing); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.blk.is-src { opacity: .3; }
.verdict { position: absolute; right: -10px; top: -12px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; box-shadow: 0 2px 0 rgba(0, 0, 0, .2); animation: pop .3s var(--boing); z-index: 2; }
.verdict--ok { background: #1C8C4E; }
.verdict--ng { background: var(--red-deep); }
.verdict .ic { width: 16px; height: 16px; stroke-width: 3.4; }
.loopn { position: absolute; right: -10px; top: -12px; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 14px; background: var(--ink); color: #fff; display: grid; place-items: center; font: 600 14px var(--f-num); z-index: 2; animation: pop .3s var(--boing); }
.drop-line { position: absolute; height: 6px; border-radius: 3px; background: var(--red); box-shadow: 0 0 0 3px rgba(238, 59, 50, .2); pointer-events: none; z-index: 5; transition: top .08s, left .08s, width .08s; }
.drop-line::before { content: ""; position: absolute; left: -6px; top: -4px; width: 14px; height: 14px; border-radius: 50%; background: var(--red); }
.ghost { position: absolute; z-index: 70; pointer-events: none; transform: rotate(-3deg) scale(1.04); filter: drop-shadow(0 12px 16px rgba(10, 60, 100, .3)); margin: 0; }
.ghost.is-trash { opacity: .5; transform: rotate(-8deg) scale(.85); }

/* パレット */
.tray { flex: none; margin: 0 12px; padding: 10px 10px 12px; background: var(--sky-mid); border-radius: 0 0 22px 22px; display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; scrollbar-width: none; position: relative; transition: background-color .2s; }
.tray::-webkit-scrollbar { display: none; }
.tray .blk { flex: none; touch-action: pan-x; }
.tray .blk { margin: 0 0 4px; }
.tray .blk__head, .tray .blk--s { min-height: 46px; font-size: 14px; padding: 0 12px 0 7px; gap: 6px; }
.tray .blk__ic { width: 26px; height: 26px; }
.tray.trash { background: #FFD9D5; }
.tray__trash { position: absolute; inset: 0; z-index: 3; display: none; align-items: center; justify-content: center; gap: 8px; font-weight: 800; color: var(--red-deep); border-radius: 0 0 22px 22px; border: 3px dashed var(--red); background: #FFE4E1; }
.tray.dragging .tray__trash { display: flex; }
.runbar { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 12px calc(10px + var(--safe-b)); }
.btn { min-height: 56px; padding: 0 20px; border-radius: 20px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 800; font-size: 17px; background: var(--paper); color: var(--ink); box-shadow: 0 5px 0 var(--sky-mid); transition: transform .2s var(--boing), box-shadow .2s; white-space: nowrap; }
.btn:active { transform: translateY(5px); box-shadow: 0 0 0 var(--sky-mid); }
.btn--run { flex: 1; background: var(--red); color: #fff; box-shadow: 0 5px 0 var(--red-deep); font-size: 19px; }
.btn--run:active { box-shadow: 0 0 0 var(--red-deep); }
.btn--sun { background: var(--sun); box-shadow: 0 5px 0 var(--b-turn-d); }
.btn--s { min-height: 48px; font-size: 15px; padding: 0 16px; border-radius: 16px; }
.btn .ic { width: 22px; height: 22px; }
.speed { display: flex; gap: 4px; padding: 4px; border-radius: 16px; background: var(--paper); flex: none; }
.speed button { min-width: 44px; min-height: 44px; padding: 0 8px; border-radius: 12px; font-size: 13px; font-weight: 800; color: var(--ink-2); }
.speed button[aria-checked="true"] { background: var(--sky-deep); color: #fff; }

/* シート・トースト */
.scrim { position: absolute; inset: 0; z-index: 40; background: rgba(16, 41, 74, .5); animation: inFade .2s both; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 90%; overflow-y: auto; padding: 10px 20px calc(20px + var(--safe-b)); border-radius: 32px 32px 0 0; background: var(--paper); animation: sheetIn .5s var(--boing) both; text-align: center; }
@keyframes sheetIn { from { transform: translateY(100%); } }
.sheet__grab { width: 44px; height: 5px; border-radius: 3px; background: #B9CBD8; margin: 0 auto 8px; }
.res__img { width: 170px; height: 170px; margin: -4px auto 4px; border-radius: 40px; object-fit: cover; }
.res__t { font-size: 28px; font-weight: 800; line-height: 1.3; }
.res__t--win { color: var(--red); }
.res__s { margin-top: 6px; font-size: 15px; color: var(--ink-2); text-align: left; }
.res__stars { display: flex; justify-content: center; gap: 6px; margin: 10px 0 6px; }
.res__stars .ic { width: 46px; height: 46px; color: #B9CBD8; }
.res__stars .ic.on { color: #F5B400; animation: starIn .5s var(--boing) both; }
.res__stars .ic.on:nth-child(2) { animation-delay: .15s; }
.res__stars .ic.on:nth-child(3) { animation-delay: .3s; }
@keyframes starIn { from { transform: scale(0) rotate(-120deg); } }
.res__meta { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.res__meta span { padding: 6px 12px; border-radius: 12px; background: var(--sky-pale); font-size: 14px; font-weight: 800; }
.res__acts { display: flex; gap: 10px; margin-top: 18px; }
.res__acts .btn { flex: 1; padding: 0 12px; }
.hint__img { width: 120px; height: 120px; border-radius: 30px; margin: 0 auto 8px; object-fit: cover; }
.hint__t { font-size: 20px; font-weight: 800; }
.hint__s { margin-top: 8px; font-size: 16px; text-align: left; }
.toast { position: absolute; left: 16px; right: 16px; margin: 0 auto; width: fit-content; bottom: calc(var(--tab-h) + 28px + var(--safe-b)); z-index: 60; padding: 12px 18px; border-radius: 16px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 800; display: flex; align-items: center; gap: 12px; animation: toastIn .4s var(--boing) both; }
.toast.low { bottom: auto; top: calc(66px + var(--safe-t)); box-shadow: 0 8px 20px rgba(16, 41, 74, .3); }
.toast button { min-height: 40px; padding: 0 10px; border-radius: 10px; color: var(--sun); font-weight: 800; white-space: nowrap; }
@keyframes toastIn { from { transform: translateY(20px); opacity: 0; } }
.confetti { position: absolute; inset: 0; pointer-events: none; z-index: 45; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 12px; height: 12px; animation: fall 1.9s ease-in forwards; }
@keyframes fall { to { transform: translateY(820px) rotate(600deg); } }

/* ロック画面・作品・設定 */
.locked { padding: 24px 28px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.locked img { width: 210px; height: 210px; border-radius: 48px; object-fit: cover; }
.locked__t { font-size: 22px; font-weight: 800; line-height: 1.45; }
.locked__s { font-size: 15px; color: var(--ink-2); }
.works-hero { position: relative; margin: 0 12px; height: 180px; border-radius: 30px; background: #CBEFFD url(/app-development/apps/a069/img/works.webp) right center / cover no-repeat; }
.works-hero__p { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); padding: 12px 16px; border-radius: 20px; background: var(--paper); box-shadow: 0 5px 0 var(--sun); }
.works-hero__t { font-size: 24px; font-weight: 800; }
.works-hero__s { font-size: 13px; font-weight: 800; color: var(--ink-2); }
.work { margin: 14px 12px 0; padding: 14px; border-radius: 26px; background: var(--paper); box-shadow: 0 5px 0 var(--sky-mid); }
.work__h { display: flex; align-items: center; gap: 12px; }
.work__no { width: 44px; height: 44px; border-radius: 14px; background: var(--sun); display: grid; place-items: center; font: 600 22px var(--f-num); box-shadow: 0 3px 0 var(--b-turn-d); flex: none; }
.work__t { flex: 1; min-width: 0; }
.work__n { font-size: 17px; font-weight: 800; }
.work__m { font-size: 13px; color: var(--ink-2); font-weight: 800; display: flex; align-items: center; gap: 8px; }
.work__m .node__s { display: inline-flex; }
.work__body { display: flex; gap: 12px; margin-top: 12px; align-items: flex-start; }
.mini { width: 112px; height: 112px; flex: none; border-radius: 16px; overflow: hidden; }
.mini svg { width: 100%; height: 100%; display: block; }
.code { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.code span { display: inline-flex; align-self: flex-start; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 7px; font-size: 12px; font-weight: 800; color: var(--ink); white-space: nowrap; }
.code .c-move { background: var(--b-move); }
.code .c-turn { background: var(--b-turn); }
.code .c-loop { background: var(--b-loop); }
.code .c-if { background: var(--b-if); color: #fff; }
.work__f { display: flex; justify-content: flex-end; margin-top: 10px; }
.works-empty { margin: 20px 16px; text-align: center; }
.works-empty img { width: 180px; height: 180px; border-radius: 40px; margin: 0 auto 10px; object-fit: cover; }
.grp { margin: 18px 12px 0; }
.grp__t { padding: 0 8px 8px; font-size: 14px; font-weight: 800; color: var(--sky-deep); }
.card { border-radius: 24px; background: var(--paper); box-shadow: 0 5px 0 var(--sky-mid); overflow: hidden; }
.row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 10px 16px; text-align: left; }
.row + .row { border-top: 2px solid var(--sky-pale); }
.row__ic { width: 42px; height: 42px; border-radius: 14px; flex: none; display: grid; place-items: center; background: var(--sky-pale); color: var(--sky-deep); }
.row__b { flex: 1; min-width: 0; }
.row__t { font-weight: 800; font-size: 16px; display: block; }
.row__s { font-size: 13px; color: var(--ink-2); display: block; }
.sw { position: relative; width: 56px; height: 34px; flex: none; border-radius: 17px; background: #CFDCE6; transition: background-color .2s; }
.sw::after { content: ""; position: absolute; left: 4px; top: 4px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 0 rgba(0, 0, 0, .15); transition: transform .35s var(--boing); }
[aria-checked="true"] > .sw { background: #1C8C4E; }
[aria-checked="true"] > .sw::after { transform: translateX(22px); }
.seg3 { display: flex; gap: 4px; padding: 4px; margin: 0 16px 14px; border-radius: 16px; background: var(--sky-pale); }
.seg3 button { flex: 1; min-height: 44px; border-radius: 12px; font-weight: 800; font-size: 14px; color: var(--ink-2); }
.seg3 button[aria-checked="true"] { background: var(--sky-deep); color: #fff; }
.parent { padding: 16px; font-size: 15px; }
.parent p + p { margin-top: 10px; }
.learn { display: grid; gap: 8px; margin-top: 12px; }
.learn div { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--sky-pale); font-size: 14px; }
.learn b { flex: none; padding: 2px 10px; border-radius: 8px; font-size: 13px; }
.about { margin: 0 12px; padding: 18px; border-radius: 24px; background: var(--paper); box-shadow: 0 5px 0 var(--sky-mid); font-size: 15px; }
.about p + p { margin-top: 10px; }
.about strong { color: var(--red-deep); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chips span { padding: 6px 12px; border-radius: 10px; background: var(--sky-pale); font-size: 13px; font-weight: 800; color: var(--sky-deep); }
.cta { margin: 16px 12px 0; display: flex; align-items: center; justify-content: space-between; min-height: 64px; padding: 0 20px; border-radius: 22px; background: var(--ink); color: #fff; font-weight: 800; box-shadow: 0 5px 0 #000; }
.ver { margin: 18px 0 0; text-align: center; font-size: 13px; color: var(--ink-2); }

/* スプラッシュ・はじめて */
.splash { position: absolute; inset: 0; z-index: 90; background: var(--sun); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.splash img { width: 120px; height: 120px; border-radius: 34px; box-shadow: 0 8px 0 var(--b-turn-d); animation: splashIn .7s var(--boing) both; }
.splash b { font-size: 30px; font-weight: 800; color: var(--ink); }
@keyframes splashIn { from { transform: translateY(40px) scale(.5); opacity: 0; } }
.ob { position: absolute; inset: 0; z-index: 89; background: var(--sky-pale); display: flex; flex-direction: column; padding: calc(16px + var(--safe-t)) 20px calc(20px + var(--safe-b)); }
.ob__skip { align-self: flex-end; min-height: 44px; padding: 0 16px; border-radius: 14px; background: var(--paper); font-weight: 800; color: var(--sky-deep); }
.ob__img { width: min(78vw, 300px); aspect-ratio: 1; margin: 18px auto 0; border-radius: 48px; object-fit: cover; box-shadow: 0 8px 0 var(--sky-mid); animation: inPush .45s var(--boing) both; }
.ob__t { margin-top: 26px; font-size: 26px; font-weight: 800; line-height: 1.4; text-align: center; }
.ob__s { margin-top: 10px; font-size: 16px; color: var(--ink-2); }
.ob__f { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.ob__dots { display: flex; gap: 6px; }
.ob__dots i { width: 10px; height: 10px; border-radius: 5px; background: var(--sky-mid); transition: width .3s var(--boing); }
.ob__dots i.on { width: 28px; background: var(--red); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .robo { transition-duration: 1ms !important; }
}
