/* 花と器：画面の見た目。
   決まり：枠（線）と塗りは押せる物（ボタン・札）だけ。パネルは塗らない。塗りの中に塗りや線を置かない。一辺だけの線・下線は使わない。
   「選んでいる」は字の色と太さで示す。書体は明朝（Shippori Mincho）が基本、筆文字（行書）は題と見出しだけ。 */
:root {
  --ai: #0c121b; --ai2: #131c2a; --shiro: #f3ecdd; --hai: #aca897; --kin: #dcc48c; --kin2: #f5e6b8; --beni: #e0566b; --sumi: #17130f;
  --min: 'Shippori Mincho', 'Hiragino Mincho ProN', 'Yu Mincho', 'YuMincho', serif;
  --ease: cubic-bezier(.2, .75, .2, 1); --pad: clamp(14px, 2.4vw, 34px);
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--ai); color: var(--shiro); font-family: var(--min); font-weight: 500; font-size: 15px; line-height: 1.75; -webkit-font-smoothing: antialiased; overflow: hidden; overscroll-behavior: none; -webkit-text-size-adjust: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: inherit; touch-action: manipulation; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--kin2); outline-offset: 3px; }
a { color: var(--kin); text-underline-offset: 3px; }
p, h1, h2, h3, ul, dl, dd, figure { margin: 0; padding: 0; } ul { list-style: none; }
[hidden] { display: none !important; }
.stage { position: fixed; inset: 0; } .stage canvas { display: block; width: 100%; height: 100%; touch-action: none; }
#fx { position: fixed; inset: 0; width: 100%; height: 100%; }
#scrim { position: fixed; inset: 0; pointer-events: none; opacity: 0; transition: opacity .6s; background: linear-gradient(180deg, rgba(6, 9, 14, .62) 0, rgba(6, 9, 14, 0) 17%, rgba(6, 9, 14, 0) 58%, rgba(6, 9, 14, .78) 100%); }
#scrim.on { opacity: 1; } #scrim.side { background: linear-gradient(90deg, rgba(6, 9, 14, 0) 50%, rgba(6, 9, 14, .84) 63%, rgba(6, 9, 14, .93) 100%); }
#ui { position: fixed; inset: 0; pointer-events: none; } #ui > * { pointer-events: auto; }

/* ---------- 筆文字 ---------- */
.fude { display: inline-block; fill: currentColor; vertical-align: middle; overflow: visible; flex: none; }
.fude-in path { opacity: 0; animation: ink .62s var(--ease) forwards; animation-delay: calc(var(--i) * 85ms + var(--d, 0ms)); transform-box: fill-box; transform-origin: 50% 20%; }
@keyframes ink { 0% { opacity: 0; transform: translateY(-9%) scale(1.12); filter: blur(5px); } 55% { opacity: 1; filter: blur(0); } 100% { opacity: 1; transform: none; filter: blur(0); } }

/* ---------- 押せる物 ---------- */
/* 短冊：金箔の地に墨の字。主になる操作 */
.tz { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .62em 1.7em; color: var(--sumi); font-weight: 800; letter-spacing: .14em; border-radius: 2px; overflow: hidden; background: linear-gradient(135deg, #e9d59e 0%, #cfb373 38%, #f1e0ad 56%, #c7a964 100%); background-size: 220% 220%; background-position: 20% 20%; transition: transform .35s var(--ease), background-position .9s var(--ease), filter .3s; }
.tz::after { content: ''; position: absolute; inset: -40% -60%; background: linear-gradient(105deg, rgba(255, 255, 255, 0) 42%, rgba(255, 255, 255, .7) 50%, rgba(255, 255, 255, 0) 58%); transform: translateX(-70%); pointer-events: none; }
.tz:hover, .tz:focus-visible { transform: translateY(-3px); background-position: 80% 80%; } .tz:hover::after, .tz:focus-visible::after { transform: translateX(70%); transition: transform .9s var(--ease); }
.tz:active { transform: translateY(1px) scale(.98); } .tz[disabled] { filter: grayscale(.7) brightness(.6); cursor: default; }
.tz .fude { font-size: 1.5em; }
.tz-v { writing-mode: vertical-rl; padding: 1.5em .5em; letter-spacing: .3em; }
/* 輪郭だけのボタン：次に大事な操作 */
.ol { display: inline-flex; align-items: center; gap: .5em; padding: .45em 1.2em; border: 1px solid rgba(220, 196, 140, .55); border-radius: 999px; color: var(--kin2); letter-spacing: .1em; transition: background-color .3s, border-color .3s, transform .3s var(--ease); }
.ol:hover, .ol:focus-visible { background-color: rgba(220, 196, 140, .14); border-color: var(--kin2); transform: translateY(-2px); } .ol:active { transform: scale(.97); }
/* 字だけのボタン：切り替え・絞り込み。選んでいる物は金色の太字 */
.tx { padding: .3em .55em; color: var(--hai); letter-spacing: .08em; transition: color .25s, transform .3s var(--ease); white-space: nowrap; }
.tx:hover, .tx:focus-visible { color: var(--shiro); transform: translateY(-1px); } .tx.on { color: var(--kin2); font-weight: 800; }
.tx svg.dot { width: .8em; height: .8em; margin-right: .3em; vertical-align: -.05em; }
/* 絵と短い名前のボタン：道具 */
.ic { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; min-width: 48px; padding: 6px 4px; color: var(--shiro); font-size: 11.5px; line-height: 1.3; letter-spacing: .06em; text-shadow: 0 1px 6px rgba(0, 0, 0, .9); transition: color .25s, transform .3s var(--ease); white-space: nowrap; }
.ic svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .8)); }
.ic:hover, .ic:focus-visible { color: var(--kin2); transform: translateY(-2px); } .ic.on { color: var(--kin2); font-weight: 800; } .ic.on svg { stroke-width: 2.1; } .ic[disabled] { opacity: .35; cursor: default; transform: none; }
#tip { position: fixed; z-index: 60; max-width: 260px; padding: 8px 12px; background-color: #f3ecdd; color: #17130f; font-size: 12.5px; line-height: 1.6; border-radius: 3px; pointer-events: none; transform: translate(-50%, 0); }
#tip b { display: block; font-weight: 800; letter-spacing: .08em; }

/* ---------- 画面の出入り ---------- */
.sc { position: absolute; inset: 0; display: flex; flex-direction: column; opacity: 0; transition: opacity .5s; }
.sc.show { opacity: 1; }
.ground { background-color: #0c121b; }
.rise { opacity: 0; transform: translateY(14px); animation: rise .7s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 70ms + var(--d, 0ms)); }
@keyframes rise { to { opacity: 1; transform: none; } }
#door { position: fixed; inset: 0; pointer-events: none; z-index: 40; display: flex; }
#door i { flex: 1; background-size: cover; background-position: right center; transform: translateX(-102%); transition: transform .62s cubic-bezier(.6, 0, .2, 1); }
#door i + i { background-position: left center; transform: translateX(102%); } #door.shut { pointer-events: auto; } #door.shut i, #door.shut i + i { transform: none; }
#boot { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background-color: #0c121b; transition: opacity .8s; }
#boot.off { opacity: 0; pointer-events: none; } .boot-t { font-size: 34px; font-weight: 800; letter-spacing: .5em; text-indent: .5em; color: var(--kin2); } .boot-s { color: var(--hai); letter-spacing: .2em; font-size: 13px; }
.nojs { position: fixed; inset: auto 0 20px; text-align: center; }

/* ---------- 題 ---------- */
.sc-title { align-items: center; justify-content: center; }
.title-row { display: flex; flex-direction: row-reverse; align-items: flex-start; justify-content: center; gap: clamp(22px, 5vw, 76px); }
.title-name { color: var(--shiro); font-size: clamp(92px, 23vh, 196px); filter: drop-shadow(0 6px 24px rgba(0, 0, 0, .55)); }
.title-sub { writing-mode: vertical-rl; letter-spacing: .5em; color: var(--kin); font-size: clamp(13px, 1.9vh, 17px); padding-top: 1.4em; }
.title-menu { display: flex; flex-direction: row-reverse; gap: clamp(12px, 2vw, 26px); padding-top: clamp(40px, 12vh, 120px); }
.title-menu .tz-v { font-size: clamp(26px, 4.7vh, 40px); padding: 1.1em .42em 1.3em; transform-origin: 50% -30px; animation: drop .9s var(--ease) backwards, sway 6s ease-in-out infinite; animation-delay: calc(var(--i) * 140ms + 500ms), calc(var(--i) * -1.7s); }
.title-menu .tz-v:nth-child(2) { margin-top: 34px; } .title-menu .tz-v:nth-child(3) { margin-top: 68px; }
.title-menu .tz-v .fude { font-size: 1em; }
@keyframes drop { from { opacity: 0; transform: translateY(-60px) rotate(-5deg); } } @keyframes sway { 0%, 100% { rotate: -1.1deg; } 50% { rotate: 1.1deg; } }
.title-foot { position: absolute; left: 0; right: 0; bottom: calc(18.5vh + var(--sab)); display: flex; justify-content: center; align-items: center; gap: 18px; color: var(--hai); font-size: 12.5px; }

/* ---------- 設え（場所・型・花器・花材を選ぶ） ---------- */
.sc-setup { padding: calc(10px + var(--sat)) var(--pad) calc(12px + var(--sab)); gap: clamp(6px, 1.4vh, 16px); }
.steps { display: flex; align-items: flex-start; justify-content: center; gap: clamp(6px, 3vw, 44px); flex: none; }
.step { display: flex; flex-direction: column; align-items: center; color: var(--hai); transition: color .4s, transform .4s var(--ease); min-width: 62px; }
.step .fude { font-size: clamp(24px, 4vh, 36px); } .step small { font-size: 12px; letter-spacing: .1em; min-height: 1.75em; }
.step.on { color: var(--kin2); transform: translateY(2px) scale(1.12); } .step.done { color: var(--shiro); } .step:hover { color: var(--kin); } .step[disabled] { cursor: default; opacity: .5; }
.steps .ic { position: absolute; top: calc(8px + var(--sat)); } .steps .ic.l { left: var(--pad); } .steps .ic.r { right: var(--pad); }
.lead { text-align: center; color: var(--hai); letter-spacing: .12em; font-size: 13.5px; flex: none; min-height: 1.75em; }
.deck { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: clamp(10px, 1.8vw, 26px); perspective: 1600px; }
.card { position: relative; flex: none; display: flex; flex-direction: column; background-color: #111a27; border-radius: 3px; overflow: hidden; color: var(--shiro); transform-style: preserve-3d; transition: transform .55s var(--ease), filter .4s, opacity .4s; animation: unfold .8s var(--ease) backwards; animation-delay: calc(var(--i) * 90ms + 120ms); transform: rotateY(var(--ry, 0deg)) translateZ(var(--tz, 0px)) scale(var(--s, 1)); filter: brightness(.74) saturate(.85); }
@keyframes unfold { from { opacity: 0; transform: rotateY(-78deg) translateX(60px) scale(.9); } }
.card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(112deg, rgba(255, 255, 255, 0) 40%, rgba(255, 240, 200, .26) 50%, rgba(255, 255, 255, 0) 60%); transform: translateX(-120%); pointer-events: none; }
.card:hover::after, .card.on::after { transform: translateX(120%); transition: transform 1.1s var(--ease); }
.card:hover { filter: brightness(.95); --s: 1.03; } .card.on { filter: none; --s: 1.09; --tz: 40px; }
.card img { display: block; width: 100%; object-fit: cover; transition: transform 6s linear; } .card.on img, .card:hover img { transform: scale(1.09); }
.card .nm { padding: .5em .4em .1em; text-align: center; font-weight: 800; letter-spacing: .14em; transition: color .3s; } .card .ym { padding: 0 .4em .55em; text-align: center; font-size: 11.5px; color: var(--hai); letter-spacing: .1em; }
.card.on .nm { color: var(--kin2); } .card.form .ym { padding-bottom: 0; } .card .fit { padding: 0 .4em .55em; min-height: 2.3em; text-align: center; font-size: 11.5px; letter-spacing: .14em; color: var(--kin); }
.card.place { width: clamp(132px, 15.5vw, 224px); } .card.place img { aspect-ratio: 3 / 4; }
.card.form { width: clamp(150px, 18vw, 240px); } .card.form svg.dia { display: block; width: 100%; aspect-ratio: 1 / 1.05; }
.card.vessel { width: clamp(112px, 12.5vw, 176px); } .card.vessel img { aspect-ratio: 1; }
.dia .st { fill: none; stroke: #e9dfc6; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s var(--ease) forwards; animation-delay: calc(var(--k) * 260ms + var(--i, 0) * 90ms + 500ms); } @keyframes draw { to { stroke-dashoffset: 0; } }
.dia text { font-family: var(--min); font-size: 9px; fill: var(--kin2); opacity: 0; animation: rise .5s forwards; animation-delay: calc(var(--k) * 260ms + var(--i, 0) * 90ms + 1200ms); } .dia .vs { fill: #2a3548; } .dia .wt { fill: #3d5670; } .dia .dt { fill: #e9dfc6; }
.detail { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; min-height: clamp(132px, 22vh, 190px); }
.detail .big { color: var(--shiro); font-size: clamp(34px, 6vh, 54px); min-height: 1.15em; } .detail .line { max-width: 34em; color: var(--shiro); } .detail .note { max-width: 36em; color: var(--hai); font-size: 13px; }
.opts { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px 6px; } .opts .lab { color: var(--hai); font-size: 12px; letter-spacing: .2em; padding-right: 2px; }
.go { flex: none; display: flex; justify-content: center; gap: 14px; align-items: center; min-height: 48px; }
/* 花材 */
.pick { flex: 1; min-height: 0; display: flex; gap: clamp(12px, 2vw, 30px); }
.pick-l { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 6px; }
.filters { display: flex; flex-wrap: wrap; gap: 0 4px; align-items: center; flex: none; } .filters .lab { color: var(--hai); font-size: 12px; letter-spacing: .2em; padding: 0 2px 0 10px; } .filters .lab:first-child { padding-left: 0; }
.grid { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(88px, 9vw, 118px), 1fr)); gap: 10px; grid-auto-rows: max-content; align-content: start; padding: 4px 6px 16px 2px; scrollbar-width: thin; scrollbar-color: rgba(220, 196, 140, .4) transparent; perspective: 1200px; }
.card.plant { width: auto; animation-delay: calc(var(--i) * 16ms); filter: none; } .card.plant:hover { filter: none; } .card.plant img { aspect-ratio: 3 / 4; } .card.plant .nm { font-size: 13px; letter-spacing: .06em; padding-top: .35em; white-space: nowrap; } .card.plant .nm.long { font-size: 11.5px; letter-spacing: 0; line-height: 1.98; } .card.plant .ym { display: none; }
.card.plant.on { --s: 1; --tz: 0px; } .card.plant.sel { filter: none; } .card.plant.sel .nm { color: var(--kin2); } .card.plant .mk { position: absolute; top: 4px; left: 0; right: 0; text-align: center; font-size: 12px; font-weight: 800; letter-spacing: .3em; color: #1b1611; text-shadow: 0 0 5px rgba(255, 248, 230, .75); }
.pick-r { flex: none; width: clamp(250px, 26vw, 340px); display: flex; flex-direction: column; gap: 6px; overflow-y: auto; scrollbar-width: none; }
.pick-r .big { font-size: clamp(34px, 5.4vh, 50px); min-height: 1.15em; color: var(--shiro); } .pick-r .ym { color: var(--hai); letter-spacing: .2em; font-size: 12.5px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; font-size: 13.5px; } .facts dt { color: var(--kin); letter-spacing: .18em; white-space: nowrap; } .facts dd { color: var(--shiro); }
.chosen { display: flex; flex-wrap: wrap; gap: 0 2px; align-items: center; min-height: 2.2em; } .chosen .lab { color: var(--hai); font-size: 12px; letter-spacing: .2em; padding-right: 4px; }

/* ---------- いける ---------- */
.sc-room { pointer-events: none !important; } .sc-room > * { pointer-events: auto; }
.hud-t { position: absolute; top: calc(8px + var(--sat)); left: var(--pad); right: var(--pad); display: flex; align-items: flex-start; gap: 6px; pointer-events: none; } .hud-t > * { pointer-events: auto; }
.hud-t .odai { display: flex; flex-direction: column; margin: 2px 8px 0 4px; text-shadow: 0 1px 8px #000; line-height: 1.4; } .odai .fude { font-size: 26px; color: var(--kin2); filter: drop-shadow(0 1px 5px #000); } .odai small { font-size: 12px; color: var(--shiro); letter-spacing: .12em; }
.hud-t .sp { flex: 1; }
.hud-t .tz { margin-left: 8px; padding: .5em 1.25em; }
.tools { position: absolute; left: calc(var(--pad) - 10px); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 0; padding: 12px 5px; border-radius: 34px; background-color: rgba(12, 17, 25, .8); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: opacity .3s, transform .4s var(--ease); } .tools.off { opacity: 0; transform: translate(-16px, -50%); pointer-events: none; }
.hud-b { position: absolute; left: 0; right: 0; bottom: calc(8px + var(--sab)); display: flex; flex-direction: column; align-items: center; gap: 2px; pointer-events: none; } .hud-b > * { pointer-events: auto; }
.hint { max-width: min(92vw, 44em); text-align: center; color: var(--shiro); font-size: 13.5px; letter-spacing: .08em; text-shadow: 0 1px 8px #000, 0 0 3px #000; min-height: 1.75em; pointer-events: none; }
.hint b { color: var(--kin2); font-weight: 800; }
.ctx { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0 4px; text-shadow: 0 1px 8px #000, 0 0 3px #000; min-height: 2.2em; } .ctx .lab { color: var(--hai); font-size: 12px; letter-spacing: .2em; padding: 0 0 0 10px; } .ctx .tx { color: #d4cfbf; } .ctx .tx.on { color: var(--kin2); }
.strip { display: flex; gap: 8px; max-width: 100vw; overflow-x: auto; padding: 4px var(--pad) 2px; scrollbar-width: none; align-items: flex-end; }
.mat { flex: none; width: 80px; display: flex; flex-direction: column; align-items: center; border-radius: 3px; background-color: #111a27; overflow: hidden; font-size: 11px; line-height: 1.5; letter-spacing: .02em; transition: transform .3s var(--ease); }
.mat img { width: 80px; height: 74px; object-fit: cover; object-position: 50% 22%; display: block; } .mat span { padding: 1px 2px 2px; white-space: nowrap; } .mat .long { font-size: 9.5px; letter-spacing: 0; line-height: 1.75; }
.mat:hover, .mat:focus-visible { transform: translateY(-6px); filter: none; } .mat:active { transform: translateY(0) scale(.96); }
.mat.add { justify-content: center; width: 62px; height: 96px; background-color: transparent; border: 1px solid rgba(220, 196, 140, .5); color: var(--kin2); filter: none; } .mat.add svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.pt { position: absolute; right: var(--pad); bottom: calc(112px + var(--sab)); font-size: 11.5px; letter-spacing: .2em; color: var(--kin); text-shadow: 0 1px 6px #000; opacity: 0; transition: opacity .5s; pointer-events: none; } .pt.on { opacity: 1; }
.readout { position: fixed; z-index: 30; transform: translate(18px, -130%); font-size: 13px; font-weight: 800; letter-spacing: .08em; color: var(--kin2); text-shadow: 0 1px 6px #000, 0 0 3px #000; pointer-events: none; white-space: nowrap; }

/* ---------- 拝見 ---------- */
.sc-result { pointer-events: none !important; flex-direction: row; justify-content: flex-end; } .sc-result > * { pointer-events: auto; }
.res { width: min(100%, 470px); height: 100%; overflow-y: auto; scrollbar-width: none; padding: calc(18px + var(--sat)) var(--pad) calc(18px + var(--sab)) 10px; display: flex; flex-direction: column; gap: 10px; }
.res-head { display: flex; flex-direction: row-reverse; justify-content: flex-start; align-items: flex-start; gap: 16px; }
.res-mei { font-size: clamp(40px, 7.4vh, 62px); color: var(--shiro); filter: drop-shadow(0 2px 10px #000); }
.res-rank { display: flex; flex-direction: column; align-items: center; gap: 9px; padding-top: 4px; } .res-rank .fude { font-size: clamp(30px, 5.4vh, 44px); color: var(--kin2); } .res-rank svg.bloom { width: 112px; height: 112px; }
.res-pts { letter-spacing: .14em; color: var(--shiro); } .res-pts b { font-size: 34px; font-weight: 800; line-height: 1; color: var(--kin2); padding-right: .12em; }
.bloom .pt0 { fill: url(#bloomG); stroke: #dcc48c; stroke-width: .7; opacity: 0; transform-box: fill-box; transform-origin: 50% 100%; animation: bloom 1s var(--ease) forwards; animation-delay: calc(var(--i) * 70ms + 700ms); } @keyframes bloom { from { opacity: 0; transform: scale(.2); } to { opacity: var(--o, 1); transform: scale(var(--sc, 1)); } }
.bloom .core { fill: #e4c66a; }
.res h3 { font-size: 12.5px; font-weight: 800; letter-spacing: .34em; color: var(--kin); margin-top: 6px; }
.rows li { display: grid; grid-template-columns: 9.4em 3em 1fr; align-items: center; gap: 0 8px; padding: 3px 0; } .rows .n { font-weight: 800; letter-spacing: .06em; } .rows .p { text-align: right; font-weight: 800; color: var(--kin2); font-variant-numeric: tabular-nums; } .rows svg { width: 100%; height: 8px; display: block; }
.rows .say { grid-column: 1 / -1; font-size: 13px; color: #d9d3c2; } .rows .tipx { grid-column: 1 / -1; font-size: 13px; color: var(--kin2); } .rows .tipx .tx { padding: 0 .3em; color: var(--beni); }
.rows .bar { fill: #dcc48c; transform-box: fill-box; transform-origin: 0 50%; animation: grow .9s var(--ease) backwards; animation-delay: calc(var(--i) * 90ms + 900ms); } .rows .trk { fill: rgba(243, 236, 221, .16); } @keyframes grow { from { transform: scaleX(0); } }
.learn li { padding: 2px 0; font-size: 13.5px; } .learn b { font-weight: 800; letter-spacing: .08em; padding-right: .6em; } .learn span { color: var(--kin); padding-right: .6em; }
.res .go { justify-content: flex-start; flex-wrap: wrap; gap: 10px; margin-top: 6px; } .small { font-size: 11.5px; color: var(--hai); line-height: 1.6; }

/* ---------- 図鑑・写真を残す（全画面） ---------- */
.sc-zukan, .sc-share { z-index: 20; padding: calc(10px + var(--sat)) var(--pad) calc(12px + var(--sab)); gap: 8px; }
.zk-top { display: flex; align-items: center; gap: clamp(4px, 2vw, 26px); flex: none; flex-wrap: wrap; } .zk-top .fude { font-size: 30px; color: var(--kin2); } .zk-top .tx { font-size: 15px; } .zk-top .cnt { color: var(--hai); font-size: 12.5px; letter-spacing: .1em; }
.zk-body { flex: 1; min-height: 0; display: flex; gap: clamp(12px, 2vw, 30px); }
.zk-list { flex: 1; min-width: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(220, 196, 140, .4) transparent; padding-right: 6px; }
.zk-list .grid { overflow: visible; } .prose { max-width: 46em; display: flex; flex-direction: column; gap: 16px; padding-bottom: 24px; }
.prose h3 { font-size: 17px; font-weight: 800; letter-spacing: .12em; color: var(--kin2); } .prose h3 small { font-size: 12px; color: var(--hai); padding-left: .8em; font-weight: 500; } .prose p { color: var(--shiro); } .prose .note { color: var(--hai); font-size: 13px; } .prose li { padding-left: 1em; text-indent: -1em; }
.prose .rolerow { display: grid; grid-template-columns: 4.6em 1fr; gap: 0 10px; } .prose .rolerow b { color: var(--kin); font-weight: 800; }
.share-body { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: clamp(14px, 3vw, 44px); flex-wrap: wrap; overflow-y: auto; }
.share-body img { max-height: min(74vh, 720px); max-width: min(92vw, 520px); border-radius: 2px; display: block; }
.share-side { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; max-width: 300px; }

/* ---------- 幅の狭い画面 ---------- */
@media (max-width: 760px) {
  html, body { font-size: 14px; }
  .title-row { gap: 14px; } .title-name { font-size: clamp(76px, 19vh, 132px); } .title-menu { gap: 8px; padding-top: 48px; } .title-menu .tz-v { font-size: 21px; } .title-menu .tz-v:nth-child(2) { margin-top: 22px; } .title-menu .tz-v:nth-child(3) { margin-top: 44px; }
  .steps { padding: 0 44px; gap: 2px; } .step { min-width: 50px; } .step .fude { font-size: 24px; } .step small { font-size: 10.5px; letter-spacing: 0; }
  .deck { justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; padding: 14px calc(50% - 76px); scrollbar-width: none; perspective: none; } .deck .card { scroll-snap-align: center; --ry: 0deg !important; }
  .card.place { width: 152px; } .card.form { width: 168px; } .card.vessel { width: 124px; }
  .detail { min-height: 150px; } .detail .big { font-size: 34px; }
  .pick { flex-direction: column; gap: 4px; } .pick-r { width: auto; flex: none; max-height: 31vh; } .pick-r .big { font-size: 30px; } .grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 7px; }
  .tools { left: 0; right: 0; top: auto; bottom: calc(156px + var(--sab)); transform: none; flex-direction: row; justify-content: center; gap: 0; } .tools.off { transform: translateY(10px); } .ic { min-width: 44px; font-size: 10.5px; }
  .hud-t { left: 6px; right: 6px; gap: 0; } .hud-t .tz { padding: .45em .9em; margin-left: 2px; } .odai .fude { font-size: 21px; } .hint { font-size: 12.5px; } .ctx { flex-wrap: nowrap; overflow-x: auto; max-width: 100vw; justify-content: flex-start; padding: 0 10px; scrollbar-width: none; }
  .pt { bottom: calc(236px + var(--sab)); }
  .sc-result { flex-direction: column; justify-content: flex-end; } .res { width: 100%; height: 58%; padding-left: var(--pad); } #scrim.side { background: linear-gradient(180deg, rgba(6, 9, 14, 0) 26%, rgba(6, 9, 14, .88) 50%, rgba(6, 9, 14, .95) 100%); }
  .rows li { grid-template-columns: 8.6em 2.6em 1fr; } .zk-body { flex-direction: column; } .zk-body .pick-r { max-height: 34vh; }
}
@media (max-height: 560px) and (min-width: 761px) { .detail { min-height: 96px; } .detail .note { display: none; } .card.place { width: clamp(110px, 13vw, 170px); } }
@media (prefers-reduced-motion: reduce) { *, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; } }

/* ---------- 追加：つまみ・図鑑の細部 ---------- */
.sl { -webkit-appearance: none; appearance: none; width: min(46vw, 300px); height: 30px; margin: 0 8px; background: transparent; cursor: pointer; touch-action: none; }
.sl::-webkit-slider-runnable-track { height: 2px; border-radius: 2px; background: rgba(243, 236, 221, .6); }
.sl::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -10px; border: 0; border-radius: 50%; background: #f5e6b8; box-shadow: 0 1px 7px rgba(0, 0, 0, .7); }
.sl::-moz-range-track { height: 2px; border-radius: 2px; background: rgba(243, 236, 221, .6); }
.sl::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: #f5e6b8; box-shadow: 0 1px 7px rgba(0, 0, 0, .7); }
.sl:focus-visible { outline: 2px solid var(--kin2); outline-offset: 2px; }
.val { min-width: 4.4em; color: var(--kin2); font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ctx .lab { white-space: nowrap; }
.pick-r .opts, .pick-r .go, .pick-r .chosen { justify-content: flex-start; } .pick-r .go { margin: 4px 0; min-height: 44px; }
.zk-top .sp { flex: 1; } .prose .rolerow { grid-template-columns: 8.6em 1fr; } .prose section { display: flex; flex-direction: column; gap: 4px; }
.share-side p { color: var(--hai); font-size: 13px; } .lead + .lead { margin-top: 0; }
.res .small .tx { color: var(--kin); padding-left: .8em; } .res .tx { padding-left: .2em; padding-right: .2em; } .learn .tx { color: var(--shiro); font-weight: 800; }
.sc-result .pt { left: var(--pad); right: auto; bottom: calc(14px + var(--sab)); }
@media (max-width: 760px) { .wide { display: none !important; } .sc-result .pt { bottom: auto; top: calc(10px + var(--sat)); } .sl { width: 52vw; } }

/* 長すぎる枝を選んでいる時、「切る」を知らせる */
.ic.want { color: var(--kin2); } .ic.want svg { animation: nudge 1.5s ease-in-out infinite; } @keyframes nudge { 0%, 100% { transform: none; } 30% { transform: translateY(-4px) rotate(-12deg) scale(1.1); } 60% { transform: translateY(-2px) rotate(7deg) scale(1.05); } }
/* 道具の後ろだけ、やわらかく暗くする（明るい壁の上でも字が読めるように）。枝を選んでいない時は道具ごと消える */
.tools .ic { min-width: 58px; text-shadow: none; } .tools .ic svg { filter: none; }
@media (max-width: 760px) { .tools { padding: 4px 6px; border-radius: 30px; left: 50%; right: auto; transform: translateX(-50%); } .tools.off { transform: translate(-50%, 10px); } .tools .ic { min-width: 42px; } }
/* 筆文字の見出しは 1 行の箱にして、下の行へはみ出させない */
.big { display: flex; line-height: 1; } .detail .big { justify-content: center; }
.prose a { display: inline-block; padding: .3em 0; }
/* 指で押す画面：字だけのボタンの押せる範囲を広げる（並びは変えない） */
@media (max-width: 760px), (pointer: coarse) { .tx { padding: .78em .62em; margin: -.48em 0; } .res .small .tx, .res p .tx, .learn .tx { padding: .78em .62em; } .res .small .tx { min-width: 44px; } .rows .tipx .tx { padding: .78em .3em; } }

/* 花材選びの右側：大きい絵と、その下に選んだ花材の小さいサムネ（押せる）。横に名前と解説 */
.sc-setup .pick-r { width: clamp(430px, 43vw, 640px); flex-direction: row; gap: clamp(12px, 1.5vw, 22px); overflow: hidden; }
.pv-a { flex: none; width: 46%; min-height: 0; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; scrollbar-width: none; }
.pv-b { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; scrollbar-width: none; }
.pv-head { display: flex; flex-direction: column; gap: 6px; }
.pv-img { display: block; width: 100%; aspect-ratio: 3 / 4; flex: 0 1 auto; min-height: 150px; object-fit: cover; border-radius: 3px; background: #a69c8a center / cover no-repeat; }
.sc-setup .chosen { gap: 5px; align-items: center; } .sc-setup .chosen .lab { width: 100%; padding: 0; }
/* 小さいサムネは暗くしない（地が暗いと花材が見づらい）。いま大きく見せている物は、下の金の点で示す */
.pv-t { flex: none; width: calc((100% - 15px) / 4); display: flex; flex-direction: column; align-items: center; gap: 5px; transition: transform .3s var(--ease); }
.pv-t img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; object-position: 50% 18%; border-radius: 2px; }
.pv-t::after { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--kin); opacity: 0; transition: opacity .25s; } .pv-t.on::after { opacity: 1; }
.pv-t:hover, .pv-t:focus-visible { transform: translateY(-2px); }
/* ---------- 追加：スマホ幅の花材選び・いける画面 ---------- */
.fg { display: inline-flex; align-items: center; white-space: nowrap; } .filters .fg:not(:first-child) .lab { padding-left: 10px; } .filters .fg:first-child .lab { padding-left: 0; }
.tools { position: fixed; }
.res .learn .tx, .rows .tipx .tx { color: var(--kin2); }
@media (max-width: 760px) {
  .filters { gap: 0; } .fg { display: flex; align-items: center; width: 100%; } .filters .fg .lab, .filters .fg:not(:first-child) .lab { padding-left: 0; min-width: 3.2em; } .sc-setup .fg:nth-child(3) { display: none; }
  /* 花材選びの下の欄：左に大きい絵、右に名前・大きさ・加える。その下に選んだ花材の小さいサムネ、解説 */
  .sc-setup .pick-r { width: auto; display: grid; grid-template-columns: 108px minmax(0, 1fr); grid-auto-rows: min-content; align-content: start; gap: 6px 12px; overflow-y: auto; }
  .sc-setup .pv-a, .sc-setup .pv-b { display: contents; }
  .sc-setup .pv-img { grid-column: 1; grid-row: 1; width: 108px; flex: none; } .sc-setup .pv-head { grid-column: 2; grid-row: 1; gap: 2px; }
  .sc-setup .pick-r .chosen { grid-column: 1 / -1; grid-row: 2; } .sc-setup .pick-r .facts { grid-column: 1 / -1; grid-row: 3; }
  .sc-setup .pv-t { width: calc((100% - 35px) / 8); max-width: 44px; } .sc-setup .pick-r .go { margin: 0; justify-content: flex-start; }
  .tools, .tools.off { position: static; transform: none; } .tools.off { display: none; }
  .pt { bottom: auto; top: calc(66px + var(--sat)); }
}
.pt { color: var(--kin2); text-shadow: 0 0 3px #000, 0 0 7px rgba(0, 0, 0, .9), 0 1px 12px #000; }

/* 札の一覧：選んだ札を真ん中へ送る基準にする。見出しと選択肢は組のまま折り返す */
.deck { position: relative; } .opts .og { display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: center; }
@media (max-width: 760px) { .deck.d-form { padding-left: calc(50% - 84px); padding-right: calc(50% - 84px); } .deck.d-vessel { padding-left: calc(50% - 62px); padding-right: calc(50% - 62px); } }
/* スマホ幅の花材の札は正方形にして、一度に見える数を増やす */
@media (max-width: 760px) { .card.plant img { aspect-ratio: 1; object-position: 50% 16%; } .sc-setup .pick-r { max-height: 37vh; } }
/* 写真の画面の知らせは、幅に合わせて折り返す */
.share-body .lead { flex: 0 1 auto; max-width: 100%; }
/* 写真の画面：仕上げている間は下見を少し沈めて、進み具合を金の字で出す。押せない間のボタンは色を落とす */
.share-body img { transition: filter .6s, opacity .6s; } .share-body img.draft { filter: blur(1.5px) brightness(.72); }
.share-side .lead { color: var(--kin2); font-size: 14px; min-height: 1.6em; } .ol[disabled] { opacity: .4; cursor: default; }

/* ---------- いける画面：画の上に重ねる印（選んだ枝の線・根もとのつまみ・名前、お手本の役の名前、鋏を入れる所）と、上から見た図 ---------- */
.aid2d { position: fixed; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none !important; }
.aid2d path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.a-line { stroke: #f5e6b8; stroke-width: 1.5; opacity: .9; filter: drop-shadow(0 0 2px rgba(0, 0, 0, .95)); }
.a-ring { fill: rgba(245, 230, 184, .18); stroke: #f5e6b8; stroke-width: 2; filter: drop-shadow(0 0 3px rgba(0, 0, 0, .9)); }
.a-cut { stroke: #ff8fa0; stroke-width: 3.4; filter: drop-shadow(0 0 3px rgba(0, 0, 0, .9)); }
.a-dot { fill: #ff8fa0; stroke: #fff; stroke-width: 1.5; filter: drop-shadow(0 0 3px rgba(0, 0, 0, .9)); }
.aid2d text { font-family: var(--min); paint-order: stroke; stroke: rgba(6, 9, 14, .92); stroke-width: 4px; stroke-linejoin: round; letter-spacing: .08em; }
.a-name { font-size: 16px; font-weight: 800; fill: var(--kin2); } .a-role { font-size: 12.5px; fill: var(--shiro); } .a-guide { font-size: 12.5px; font-weight: 800; fill: var(--kin); }
/* お手本の線：暗い線を下に敷いて、明るい壁の前でも暗い壁の前でも見えるようにする。次に入れる役は明るく、床へ落とした線で手前・奥を示す */
.g-under { stroke: rgba(6, 9, 14, .7); stroke-width: 4.2; stroke-dasharray: 9 8; } .g-line { stroke: var(--kin); stroke-width: 1.8; stroke-dasharray: 9 8; opacity: .8; } .g-line.hot { stroke: #ffe9a8; stroke-width: 2.4; opacity: 1; }
.g-tip { fill: var(--kin); stroke: rgba(6, 9, 14, .8); stroke-width: 1.5; } .g-tip.hot { fill: #ffe9a8; }
.g-floor { stroke: rgba(255, 233, 168, .7); stroke-width: 1.2; stroke-dasharray: 2 5; filter: drop-shadow(0 0 2px rgba(0, 0, 0, .9)); }
.a-guide.hot { fill: #ffe9a8; font-size: 14px; }
#stage.cutting canvas { cursor: crosshair; }
.plan { position: fixed; right: var(--pad); top: calc(86px + var(--sat)); width: 168px; height: 168px; opacity: 0; transition: opacity .4s; pointer-events: none !important; touch-action: none; } .plan.on { opacity: 1; pointer-events: auto !important; cursor: grab; }
.p-bg { fill: rgba(10, 14, 21, .68); } .p-ves { fill: none; stroke: rgba(243, 236, 221, .5); stroke-width: 1; } .p-g { fill: none; stroke: rgba(220, 196, 140, .45); stroke-width: .8; }
.p-s { fill: none; stroke: rgba(243, 236, 221, .7); stroke-width: 1.2; stroke-linecap: round; } .p-s.role { stroke: var(--kin); } .p-s.cur { stroke: var(--kin2); stroke-width: 2.4; }
.p-d { fill: rgba(243, 236, 221, .85); } .p-d.role { fill: var(--kin); } .p-d.cur { fill: var(--kin2); }
.p-t { font-family: var(--min); font-size: 7.5px; fill: var(--hai); letter-spacing: .1em; } .p-t.cur { fill: var(--kin2); font-weight: 800; font-size: 8.5px; paint-order: stroke; stroke: rgba(6, 9, 14, .9); stroke-width: 2px; }
/* 札：選んでいる枝の花材は名前を金色の太字にして持ち上げ、ほかは沈める */
.mat:not(.add) span { color: var(--hai); } .mat.cur { transform: translateY(-6px); } .mat.cur span { color: var(--kin2); font-weight: 800; }
.mat.scrap { width: 66px; } .mat.scrap img { width: 66px; height: 60px; }
.ctx .lab.how { color: var(--kin); letter-spacing: .08em; }
@media (max-width: 760px) { .plan { width: 132px; height: 132px; top: calc(98px + var(--sat)); right: 6px; } .a-name { font-size: 14.5px; } }
