/* まきまきソフトの画面の見た目（HUD・メニュー・結果の札・作品展）。3D は canvas#game に描く。 */
:root { color-scheme: light; --body: 'M PLUS Rounded 1c', system-ui, sans-serif; --title: 'Dela Gothic One', var(--body); --ink: #3b2a2f; --pink: #ff6f91; --mint: #4fc3a1; --cream: #fff8ec; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #ffe7ef; color: var(--ink); font-family: var(--body); -webkit-user-select: none; user-select: none; touch-action: none; }
#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }
button { font-family: var(--body); font-weight: 800; cursor: pointer; }

#hud { position: fixed; inset: 0; pointer-events: none; }
#hud button { pointer-events: auto; }

#order { position: absolute; left: max(10px, env(safe-area-inset-left)); top: max(10px, env(safe-area-inset-top)); right: 150px; display: flex; gap: 10px; align-items: center; }
#guest { width: 76px; height: 76px; border-radius: 14px; background: #fff; border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,.12); flex: none; object-fit: cover; }
#order .ot { min-width: 0; }
#who { margin: 0; font-size: 12px; opacity: .75; }
#say { margin: 2px 0; font-size: 14px; font-weight: 800; background: #fff; border-radius: 10px; padding: 4px 9px; display: inline-block; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
#want { margin: 2px 0 0; font-family: var(--title); font-size: clamp(22px, 6vw, 34px); letter-spacing: .04em; color: var(--ink); -webkit-text-stroke: 5px #fff; paint-order: stroke fill; }

#nums { position: absolute; right: max(10px, env(safe-area-inset-right)); top: max(10px, env(safe-area-inset-top)); background: rgba(255,255,255,.88); border-radius: 12px; padding: 6px 10px; min-width: 128px; box-shadow: 0 3px 10px rgba(0,0,0,.1); }
#nums p { margin: 2px 0; display: flex; align-items: baseline; gap: 6px; font-size: 12px; }
#nums span { opacity: .7; width: 3.6em; }
#nums b { font-size: 18px; font-variant-numeric: tabular-nums; }
#nums small { opacity: .6; }
#nums.warn #n-tilt { color: #e2352a; }

#machine { position: absolute; left: 50%; top: 30%; transform: translateX(-50%); margin: 0; background: #2f3b45; color: #9ff0c9; font-family: monospace; font-size: 15px; padding: 5px 12px; border-radius: 6px; border: 2px solid #9aa7b1; letter-spacing: .08em; }

#aim { position: absolute; left: max(10px, env(safe-area-inset-left)); bottom: calc(64px + env(safe-area-inset-bottom)); text-align: center; }
#aim-c { width: 110px; height: 110px; background: rgba(255,255,255,.85); border-radius: 50%; box-shadow: 0 3px 10px rgba(0,0,0,.12); }
#aim small { display: block; font-size: 11px; font-weight: 800; opacity: .75; }

#tank { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom)); width: min(320px, 60vw); height: 18px; background: rgba(255,255,255,.8); border-radius: 9px; overflow: hidden; box-shadow: 0 2px 6px rgba(0,0,0,.12); }
#tank i { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; background: linear-gradient(90deg, #ffd6a0, #ffb877); }
#tank span { position: relative; display: block; text-align: center; font-size: 11px; line-height: 18px; font-weight: 800; }

.sysbtns { position: absolute; right: max(10px, env(safe-area-inset-right)); bottom: calc(44px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 6px; }
.sysbtns button { border: 0; border-radius: 10px; padding: 7px 10px; font-size: 12px; background: rgba(255,255,255,.9); color: var(--ink); box-shadow: 0 2px 6px rgba(0,0,0,.12); }
.sysbtns button.off { opacity: .55; }

#pause { position: fixed; inset: 0; background: rgba(40,20,30,.45); display: grid; place-items: center; pointer-events: auto; }
.pin { background: var(--cream); border-radius: 18px; padding: 18px 22px; text-align: center; min-width: 220px; }
.pt { font-weight: 800; margin: 0 0 10px; }
.go, .home, .ghost { display: block; width: 100%; margin: 6px 0; border: 0; border-radius: 12px; padding: 11px 14px; font-size: 16px; }
.go { background: var(--pink); color: #fff; }
.home, .ghost { background: #fff; color: var(--ink); border: 2px solid #f3c6d3; }

#toast { position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%); background: rgba(59,42,47,.92); color: #fff; padding: 10px 16px; border-radius: 12px; font-weight: 800; text-align: center; z-index: 60; max-width: 86vw; pointer-events: none; }
#toast small { display: block; font-weight: 500; opacity: .85; margin-top: 3px; }

#card { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(440px, calc(100vw - 20px)); background: var(--cream); border-radius: 18px; padding: 14px 16px 12px; box-shadow: 0 10px 30px rgba(0,0,0,.25); z-index: 50; }
#card .row { display: flex; gap: 12px; align-items: center; }
#card .score { font-family: var(--title); font-size: 40px; line-height: 1; }
#card .score small { font-size: 16px; }
#card .verdict { font-weight: 800; font-size: 15px; }
#card .reason { margin: 4px 0 0; font-size: 14px; }
#card .line { margin: 8px 0; padding: 8px 10px; background: #fff; border-radius: 10px; font-weight: 800; }
#card .bd { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px 12px; font-size: 12px; margin: 6px 0; opacity: .85; }
#card .btns { display: flex; gap: 8px; }
#card .btns button { flex: 1; margin: 0; }
#card .rare { color: #c08a00; font-weight: 800; }

#gallery { position: fixed; inset: 0; background: rgba(255,231,239,.97); z-index: 70; overflow: auto; touch-action: pan-y; }
.g-in { max-width: 760px; margin: 0 auto; padding: 18px 14px 30px; }
.g-in h2 { font-family: var(--title); margin: 0; }
.g-sub { font-size: 12px; opacity: .75; }
#g-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin: 10px 0 16px; }
#g-list figure { margin: 0; background: #fff; border-radius: 12px; padding: 6px; text-align: center; font-size: 11px; }
#g-list img { width: 100%; aspect-ratio: 1; object-fit: contain; display: block; }
#g-list .empty { grid-column: 1 / -1; text-align: center; opacity: .7; }

#menu { position: fixed; inset: 0; overflow: auto; background: linear-gradient(#ffe7ef, #fff4dc); z-index: 80; touch-action: pan-y; }
.menu-in { max-width: 560px; margin: 0 auto; padding: 22px 16px 40px; text-align: center; }
.jk-series { margin: 0 0 4px; font-size: 12px; font-weight: 800; letter-spacing: .2em; opacity: .7; }
#menu h1 { font-family: var(--title); font-size: clamp(44px, 14vw, 72px); line-height: 1.02; margin: 0 0 8px; color: var(--pink); text-shadow: 0 4px 0 #fff; }
.sub { font-size: 14px; line-height: 1.7; }
.howto { background: rgba(255,255,255,.75); border-radius: 14px; padding: 8px 12px; text-align: left; margin: 12px 0; }
.sec { font-size: 15px; margin: 14px 0 6px; text-align: left; }
.sec i { font-style: normal; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--pink); color: #fff; margin-right: 6px; font-size: 12px; }
.sec small { font-weight: 500; opacity: .6; margin-left: 8px; font-size: 11px; }
.steps { margin: 0; padding-left: 20px; font-size: 13px; }
.steps li { margin: 4px 0; }
.steps span { display: block; opacity: .7; font-size: 12px; }
#stages { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
#stages button { border: 0; border-radius: 12px; padding: 10px 8px; background: #fff; color: var(--ink); text-align: left; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
#stages button b { display: block; font-size: 14px; }
#stages button small { font-weight: 500; font-size: 11px; opacity: .75; }
#stages button[disabled] { opacity: .4; cursor: default; }
#stages button .best { float: right; color: var(--pink); }

@media (orientation: landscape) and (max-height: 520px) {
  #want { font-size: 24px; }
  #guest { width: 58px; height: 58px; }
  #aim-c { width: 86px; height: 86px; }
}

body.playing #furi-btn, body.carded #furi-btn { display: none; }
#furi-btn { z-index: 90 !important; }
