/* 剪定いちねん — 画面の見た目。
   方針（ゲームUIの作法から）：
   ・主役は畑と木。絵は画面いっぱいに置き、ものさしとボタンはその上に浮かせる（紙の帯で絵を挟まない）。
   ・常に出すのは、いま判断に要るものだけ（夏の混み具合と切った量）。説明は短い一行で、絵の上に小さく。
   ・押すものは親指の届く下に、指で押せる大きさ（48px 以上）。一番大事な「一年すすめる」を一番大きく。
   ・重くしない：絵の上に backdrop-filter（ぼかし）や mix-blend-mode を重ねない（毎コマ描き変わる絵に重ねるとスマホで合成が重い）。
     半透明の面と細い影だけで浮かせる。
   ・文字はゴシック1種類で、太さと大きさで階層をつける。明朝は題字と大きな数字だけ。 */
:root {
  --surface: rgba(250, 249, 245, .93); --surface-solid: #faf9f5; --surface2: #f1efe8;
  --ink: #1d221e; --ink2: #545b55; --ink3: #8a908a;
  --line: rgba(29, 34, 30, .12); --line2: rgba(29, 34, 30, .22);
  --leaf: #3d6b34; --leaf-d: #2c5025; --leaf-l: #e5eedd;
  --cut: #c2532a; --cut-d: #983f1d; --warn: #c08519; --cool: #36678f;
  --shadow: 0 1px 2px rgba(20, 26, 20, .10), 0 10px 24px -14px rgba(20, 26, 20, .45);
  --mincho: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", "BIZ UDPMincho", serif;
  --gothic: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --r: 14px;
  font-family: var(--gothic);
  color: var(--ink);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overscroll-behavior: none; background: #cfd8d6; }
body { -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; touch-action: manipulation; }
button:disabled { opacity: .35; cursor: default; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

#app {
  height: 100dvh; display: grid; grid-template-rows: auto auto 1fr auto;
  max-width: 760px; margin: 0 auto; position: relative; overflow: hidden; background: #dfe6e4;
}
/* 絵は全部の段にまたがって敷く。帯はその上に浮かぶ */
.stage { grid-row: 1 / -1; grid-column: 1; }
.top { grid-row: 1; } .hud { grid-row: 2; } .dock { grid-row: 4; }
.top, .hud, .dock { grid-column: 1; position: relative; z-index: 5; }

/* ---- 上：ひとつの浮いた札（題と、ものさし） ---- */
.top { display: flex; align-items: center; gap: 8px; margin: calc(8px + var(--safe-t)) 10px 0; padding: 6px 6px 6px 14px;
  background: var(--surface); border-radius: var(--r) var(--r) 0 0; box-shadow: var(--shadow); align-self: end; }
body[data-phase="title"] .top, body[data-phase="loading"] .top { display: none; }
body:not([data-phase="winter"]):not([data-phase="growing"]) .top { border-radius: var(--r); }
.top .grow { flex: 1; }
.chip { font-weight: 700; font-size: 15px; letter-spacing: .02em; }
.count-chip { font-size: 12px; font-weight: 600; color: var(--ink2); font-variant-numeric: tabular-nums; background: var(--surface2); padding: 3px 8px; border-radius: 999px; }
.count-chip:empty { display: none; }
.icon { width: 40px; height: 40px; display: grid; place-items: center; color: var(--ink2); border-radius: 10px; }
.icon:active { background: rgba(0,0,0,.06); }
.icon.small { width: 34px; height: 34px; }

.hud { display: none; margin: 0 10px; padding: 4px 14px 12px; gap: 14px; background: var(--surface); border-radius: 0 0 var(--r) var(--r);
  box-shadow: 0 10px 24px -14px rgba(20,26,20,.45); align-self: start; }
.hud::before { content: ""; position: absolute; left: 14px; right: 14px; top: 0; border-top: 1px solid var(--line); }
body[data-phase="winter"] .hud-winter { display: grid; grid-template-columns: 1.3fr 1fr auto; }
body[data-phase="growing"] .hud-grow { display: grid; grid-template-columns: 1fr; gap: 8px; padding-top: 10px; }
.meter { position: relative; min-width: 0; padding-top: 8px; }
.meter .lbl { display: block; font-size: 11px; font-weight: 600; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meter .lbl small { margin-left: 4px; color: var(--ink3); font-weight: 500; }
.meter .val { display: block; font-size: 15px; font-weight: 800; margin-top: 5px; font-variant-numeric: tabular-nums; transition: color .2s; }
.bar { position: relative; height: 8px; background: var(--surface2); margin-top: 6px; border-radius: 4px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.bar .fill, .bar .trail { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; }
.bar .trail { background: #e3a98f; transition: width .6s cubic-bezier(.3,.1,.2,1) .25s; }
.bar .fill { background: var(--leaf); transition: width .18s cubic-bezier(.2,1.4,.4,1), background .2s; }
.meter[data-tone="ok"] .fill { background: var(--leaf); } .meter[data-tone="ok"] .val { color: var(--leaf-d); }
.meter[data-tone="warn"] .fill { background: var(--warn); } .meter[data-tone="warn"] .val { color: #8a5a12; }
.meter[data-tone="bad"] .fill { background: var(--cut); } .meter[data-tone="bad"] .val { color: var(--cut-d); }
.meter[data-tone="thin"] .fill { background: var(--cool); } .meter[data-tone="thin"] .val { color: var(--cool); }
/* 混み具合の「ちょうど良い」帯（0〜1.5 の目盛りで .75〜1.15） */
.bar.zones em { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(29,34,30,.35); z-index: 1; }
.bar.zones .z1 { left: 50%; } .bar.zones .z2 { left: 76.7%; } .bar.zones .z3 { left: 90%; }
.bar.zones::before { content: ""; position: absolute; left: 50%; width: 26.7%; top: 0; bottom: 0; background: rgba(61,107,52,.18); }
.bar .tick { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--cut); z-index: 1; }
.meter.buds { text-align: right; }
.bud-num { display: block; margin-top: 2px; } .bud-num b { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; } .bud-num small { font-size: 11px; margin-left: 2px; color: var(--ink2); }
.delta { position: absolute; right: 0; top: 0; font-weight: 800; color: var(--cut); animation: rise 1s ease-out forwards; }
@keyframes rise { from { transform: translateY(6px) scale(1.25); opacity: 1; } to { transform: translateY(-12px); opacity: 0; } }

/* 1年の流れ */
.timeline { display: flex; justify-content: space-between; }
.timeline span { width: 32px; height: 32px; display: grid; place-items: center; font-family: var(--mincho); font-size: 15px; font-weight: 700; color: var(--ink3); border-radius: 50%; transition: all .3s; background: var(--surface2); }
.timeline span.on { color: #fff; background: var(--leaf); transform: scale(1.06); }
.timeline span.on.k-harvest { background: var(--cut); }
.year-bar { height: 4px; background: var(--surface2); border-radius: 2px; overflow: hidden; }
.year-bar i { display: block; height: 100%; width: 0; background: var(--ink2); }
.grow-stats { display: flex; justify-content: space-between; font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.grow-stats i { font-style: normal; font-size: 12px; color: var(--ink2); font-weight: 600; }

/* ---- 木の舞台（画面いっぱい） ---- */
.stage { position: relative; min-height: 0; }
#tree, .stage .layer { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#tree { touch-action: none; }
.stage .layer { pointer-events: none; }
/* ひとことの案内：帯のすぐ下に、小さな札で */
.coach { position: absolute; left: 50%; transform: translateX(-50%); top: calc(var(--top-h, 120px) + 8px); margin: 0; z-index: 2; max-width: calc(100% - 28px); width: max-content;
  text-align: center; font-size: 13px; font-weight: 600; pointer-events: none; color: #fff; background: rgba(24, 30, 25, .66); border-radius: 999px; padding: 7px 14px; line-height: 1.45; }
.coach:empty { display: none; }
.coach.good { background: rgba(44, 80, 37, .88); }
.coach.bad { background: rgba(152, 63, 29, .9); }
body:not([data-phase="winter"]) .coach { display: none; }
.zoom { position: absolute; right: 10px; bottom: calc(var(--dock-h, 90px) + 10px); display: grid; z-index: 2; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.zoom button { width: 44px; height: 42px; font-size: 20px; color: var(--ink2); }
.zoom button + button { border-top: 1px solid var(--line); }
body:not([data-phase="winter"]) .zoom, .stage:has(.branch-sheet:not([hidden])) .zoom { display: none; }

/* 季節の節目：漢字一字の丸い印 */
.banner { position: absolute; left: 50%; top: 38%; z-index: 3; transform: translate(-50%, -50%); opacity: 0; pointer-events: none; text-align: center; display: grid; justify-items: center; gap: 8px; }
.banner.show { animation: stamp-in 1.6s cubic-bezier(.2,1.3,.4,1) forwards; }
.banner .b-kanji { width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mincho); font-size: 34px; font-weight: 700; color: #fff;
  background: var(--leaf); box-shadow: 0 0 0 3px rgba(255,255,255,.85), var(--shadow); }
.banner.k-harvest .b-kanji { background: var(--cut); }
.banner.k-winter .b-kanji { background: var(--cool); }
.banner b { font-size: 17px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.45), 0 0 12px rgba(0,0,0,.25); }
.banner small { font-size: 12px; font-weight: 600; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
@keyframes stamp-in { 0% { opacity: 0; transform: translate(-50%,-50%) scale(1.4); } 12% { opacity: 1; transform: translate(-50%,-50%) scale(.97); } 20% { transform: translate(-50%,-50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%,-56%); } }
.notes { position: absolute; left: 12px; right: 12px; bottom: calc(var(--dock-h, 90px) + 12px); z-index: 2; display: grid; gap: 6px; justify-items: center; pointer-events: none; }
body[data-phase="winter"] .notes { bottom: auto; top: calc(var(--top-h, 120px) + 46px); }
.small-note { background: rgba(24, 30, 25, .8); color: #fff; font-size: 13px; font-weight: 600; border-radius: 999px; padding: 7px 14px; animation: note 2.6s ease forwards; }
@keyframes note { 0% { opacity: 0; transform: translateY(6px); } 10%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* ---- 選んだ枝：下から出る札 ---- */
.branch-sheet { position: absolute; left: 8px; right: 8px; bottom: calc(8px + var(--safe-b)); z-index: 6; background: var(--surface-solid); border-radius: 18px; padding: 10px 12px 12px;
  box-shadow: 0 -1px 0 var(--line), 0 18px 40px -16px rgba(20,26,20,.55); animation: up .16s ease-out; }
@keyframes up { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.bs-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bs-head b { font-size: 17px; font-weight: 800; }
.tag { font-size: 11px; font-weight: 700; padding: 2px 8px; margin-right: 8px; vertical-align: 2px; border-radius: 999px; background: rgba(192,133,25,.15); color: #8a5a12; }
.branch-sheet .warn { margin: 4px 0 0; color: var(--cut-d); font-size: 13px; font-weight: 600; }
.bs-cost { display: flex; gap: 16px; margin: 4px 0 10px; font-size: 13px; color: var(--ink2); }
.bs-cost b { color: var(--ink); font-size: 17px; font-weight: 800; margin: 0 2px; font-variant-numeric: tabular-nums; }
.bs-btns { display: flex; gap: 8px; }
.bs-btns > * { flex: 1 1 0; min-width: 0; min-height: 50px; display: flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.bs-btns .primary { flex: 1.7 1 0; background: var(--cut); color: #fff; font-weight: 800; font-size: 17px; letter-spacing: .06em; border-radius: 14px; box-shadow: 0 2px 0 var(--cut-d); }
.bs-btns .primary:active { transform: translateY(2px); box-shadow: none; }
.bs-btns [hidden] { display: none; }
.ghost { background: var(--surface2); border-radius: 14px; padding: 10px 10px; font-size: 14px; font-weight: 700; color: var(--ink); }
.ghost:active { background: #e6e3da; }
.bs-hint { display: none; }

.quick { position: absolute; left: 10px; bottom: calc(var(--dock-h, 90px) + 10px); z-index: 2; display: flex; gap: 8px; flex-wrap: wrap; max-width: calc(100% - 76px); }
.quick[hidden], .quick [hidden] { display: none; }
.quick button { display: flex; align-items: center; gap: 4px; min-height: 42px; background: var(--surface); border-radius: 999px; padding: 8px 14px 8px 10px; font-size: 14px; font-weight: 700; box-shadow: var(--shadow); }
#autoBtn { color: var(--cool); }
body:not([data-phase="winter"]) .quick { display: none; }

/* ---- 下：浮いたボタン ---- */
.dock { display: none; gap: 8px; padding: 0 10px calc(10px + var(--safe-b)); align-items: stretch; align-self: end; }
body[data-phase="winter"] .dock-winter { display: grid; grid-template-columns: 62px 84px 1fr; }
body[data-phase="growing"] .dock-grow { display: grid; grid-template-columns: 1fr; gap: 6px; align-items: center; }
.speed { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); }
.speed button { min-height: 46px; border-radius: 14px; font-size: 14px; font-weight: 700; color: var(--ink2); }
.speed button.on { background: var(--leaf); color: #fff; }
.tool { background: var(--surface); border-radius: 16px; min-height: 58px; padding: 6px 2px; font-size: 11px; font-weight: 700; display: grid; justify-items: center; align-content: center; gap: 2px; position: relative; color: var(--ink2); box-shadow: var(--shadow); }
.tool svg { width: 22px; height: 22px; }
.tool i { font-style: normal; white-space: nowrap; }
.tool.on { color: #8a5a12; background: #fbf3df; box-shadow: inset 0 0 0 2px var(--warn), var(--shadow); }
.tool.on[data-mode="2"] { color: var(--cool); background: #e9f0f6; box-shadow: inset 0 0 0 2px var(--cool), var(--shadow); }
.tool.wide { grid-auto-flow: column; gap: 6px; padding: 10px 20px; font-size: 14px; align-items: center; border-radius: 999px; min-height: 50px; }
.tool em { position: absolute; top: 4px; right: 6px; font-style: normal; font-size: 11px; font-weight: 800; min-width: 18px; height: 18px; line-height: 18px; border-radius: 9px; background: var(--warn); color: #fff; padding: 0 4px; }
.tool em:empty, .tool em[data-zero] { display: none; }
.go { background: var(--leaf); color: #fff; border-radius: 16px; padding: 8px 12px; box-shadow: 0 3px 0 var(--leaf-d), var(--shadow); transition: transform .1s; display: grid; place-content: center; gap: 1px; min-height: 58px; }
.go span { font-weight: 800; font-size: 18px; letter-spacing: .08em; }
.go small { font-size: 11px; opacity: .8; letter-spacing: .12em; font-weight: 600; }
.go:active { transform: translateY(3px); box-shadow: 0 0 0 var(--leaf-d), var(--shadow); }
.go.ready { animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { box-shadow: 0 3px 0 var(--leaf-d), var(--shadow); } 50% { box-shadow: 0 3px 0 var(--leaf-d), 0 0 0 5px rgba(61,107,52,.28); } }
.go.big { width: 100%; font-weight: 800; font-size: 18px; letter-spacing: .1em; padding: 14px; min-height: 54px; }

/* ---- 重ねる画面 ---- */
.overlay { position: absolute; inset: 0; display: none; z-index: 10; }
body[data-phase="title"] #title, body[data-phase="loading"] #loading, body[data-phase="result"] #result, body[data-phase="grade"] #grade { display: grid; }
/* タイトル：空と畑の色の上に、白い札 */
.title { background: linear-gradient(#a9c6dc 0%, #dbe6ea 46%, #c9d6b8 47%, #9fb58a 100%); place-items: end center; padding: 20px 12px calc(12px + var(--safe-b)); overflow: auto; }
.t-card { width: 100%; max-width: 440px; position: relative; background: var(--surface-solid); border-radius: 22px; padding: 22px 18px 18px; box-shadow: var(--shadow); }
.t-kicker { margin: 0; color: var(--ink2); font-size: 13px; font-weight: 600; letter-spacing: .12em; }
.title h1 { font-family: var(--mincho); font-size: 44px; font-weight: 700; margin: 4px 0 0; letter-spacing: .06em; line-height: 1.1; }
.title h1 span { display: inline-block; font-size: 20px; letter-spacing: .3em; color: var(--ink2); margin-left: 10px; vertical-align: 6px; }
.t-seal { display: none; }
.t-label { font-weight: 700; margin: 18px 0 8px; font-size: 12px; color: var(--ink2); letter-spacing: .08em; }
.t-trees { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.t-trees button, .t-conds button { background: var(--surface2); border-radius: 14px; padding: 10px 6px; transition: box-shadow .15s, background .15s; }
.t-trees button.on, .t-conds button.on { background: #fff; box-shadow: inset 0 0 0 2px var(--leaf); }
.t-trees canvas { display: block; width: 44px; height: 44px; margin: 0 auto 4px; }
.t-trees b { font-size: 15px; font-weight: 800; }
.t-conds { display: grid; gap: 6px; }
.t-conds button { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: baseline; text-align: left; padding: 12px 14px; }
.t-conds b { font-size: 15px; font-weight: 800; } .t-conds small { color: var(--ink2); font-size: 12px; }
#startBtn { margin-top: 18px; }
.t-note { font-size: 11px; color: var(--ink3); margin: 12px 0 0; line-height: 1.7; }

.loading { place-items: end center; padding: 0 12px calc(16px + var(--safe-b)); pointer-events: none; }
.l-card { background: var(--surface); border-radius: 16px; padding: 12px 16px; width: 100%; max-width: 440px; display: grid; gap: 6px; text-align: center; box-shadow: var(--shadow); }
.l-card b { font-weight: 800; }
.l-card span { color: var(--ink2); font-size: 13px; }
.l-bar { height: 6px; background: var(--surface2); border-radius: 3px; overflow: hidden; }
.l-bar i { display: block; height: 100%; width: 0; background: var(--leaf); transition: width .2s; }

.sheet { background: rgba(20, 26, 20, .38); align-items: end; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.s-card { background: var(--surface-solid); border-radius: 22px 22px 0 0; padding: 18px 16px calc(14px + var(--safe-b)); max-height: 92dvh; overflow: auto; animation: up .25s ease-out; box-shadow: 0 -10px 30px -12px rgba(20,26,20,.4); }
.r-kicker { margin: 0; color: var(--ink2); font-size: 13px; font-weight: 700; display: flex; justify-content: space-between; }
.r-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 6px; }
.r-big { font-family: var(--mincho); font-weight: 700; line-height: 1; color: var(--ink); }
.r-big .count { font-size: 60px; font-variant-numeric: tabular-nums; display: inline-block; }
.r-big .count.done { animation: bump .35s cubic-bezier(.2,1.6,.4,1); }
@keyframes bump { 50% { transform: scale(1.12); } }
.r-big small { font-family: var(--gothic); font-size: 16px; font-weight: 700; margin-left: 4px; }
.r-big-label { margin: 4px 0 0; font-size: 12px; font-weight: 700; color: var(--leaf-d); }
.r-sub { margin: 0; text-align: right; color: var(--ink2); font-size: 12px; line-height: 1.7; }
.r-sub b { color: var(--ink); font-size: 15px; font-weight: 800; }
.stars { color: var(--warn); letter-spacing: 1px; }
.r-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0 0; }
.r-pair figure { margin: 0; background: var(--surface2); border-radius: 14px; overflow: hidden; }
.r-pair canvas { width: 100%; height: 150px; display: block; }
.r-pair figcaption { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 10px 8px; font-size: 12px; color: var(--ink2); }
.r-pair figcaption b { font-size: 13px; font-weight: 800; color: var(--ink); }
.r-pair figcaption b, .r-pair figcaption span { white-space: nowrap; }
.r-pair figcaption { gap: 6px; flex-wrap: wrap; }
.r-model { font-size: 12px; color: var(--ink2); margin: 8px 0 0; }
.r-model b { color: var(--cool); font-weight: 800; }
.r-notes { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 6px; }
.r-notes li { display: grid; grid-template-columns: 28px 1fr; align-items: start; gap: 10px; font-size: 14px; line-height: 1.6; padding: 10px 12px; background: var(--surface2); border-radius: 12px; }
.r-notes li span { width: 26px; height: 26px; display: grid; place-items: center; font-family: var(--mincho); font-size: 13px; font-weight: 700; border-radius: 50%; color: #fff; background: var(--ink3); }
.r-notes li.good span { background: var(--leaf); } .r-notes li.bad span { background: var(--cut); }
.r-chart { margin: 6px 0 14px; }
.bars { display: flex; gap: 6px; align-items: end; height: 84px; padding: 0 4px; border-bottom: 1px solid var(--line2); }
.bars .col { flex: 1; display: grid; grid-template-rows: 1fr auto; height: 100%; text-align: center; }
.bars .stack { position: relative; display: flex; align-items: end; justify-content: center; gap: 2px; }
.bars i { display: block; width: 36%; min-height: 2px; border-radius: 3px 3px 0 0; }
.bars i.mine { background: var(--leaf); } .bars i.none { background: #c3c7bd; }
.bars b.model { position: absolute; left: 8%; right: 8%; height: 0; border-top: 2px dashed var(--cool); }
.bars small { font-size: 11px; color: var(--ink2); }
.legend { font-size: 11px; color: var(--ink2); display: flex; gap: 12px; justify-content: flex-end; margin: 6px 0 0; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 8px; margin-right: 4px; vertical-align: 0; border-radius: 2px; }
.legend .mine::before { background: var(--leaf); } .legend .none::before { background: #c3c7bd; } .legend .model::before { border-top: 2px dashed var(--cool); height: 0; vertical-align: 3px; }

/* 通信簿 */
.rank-wrap { display: flex; align-items: center; gap: 16px; margin: 14px 0 10px; }
.rank { width: 92px; height: 92px; flex: none; display: grid; place-items: center; font-family: var(--mincho); font-size: 54px; font-weight: 700; color: #fff; background: var(--cut);
  border-radius: 50%; box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--cut); transform: rotate(-6deg); animation: stamp .45s cubic-bezier(.2,1.6,.4,1); }
.rank-C, .rank-B { background: var(--ink3); box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--ink3); }
@keyframes stamp { 0% { transform: scale(2) rotate(-20deg); opacity: 0; } 100% { transform: rotate(-6deg); opacity: 1; } }
.g-word { font-weight: 800; font-size: 19px; margin: 0; line-height: 1.5; }
.g-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.g-table th { text-align: left; font-weight: 500; color: var(--ink2); padding: 8px 2px; border-bottom: 1px solid var(--line); }
.g-table td { text-align: right; padding: 8px 2px; border-bottom: 1px solid var(--line); font-weight: 700; font-variant-numeric: tabular-nums; }
.g-tip { padding: 10px 12px; font-size: 14px; line-height: 1.6; background: #fbf3df; border-radius: 12px; }
.g-btns { display: grid; gap: 8px; }

.confirm { position: absolute; inset: 0; z-index: 30; background: rgba(20,26,20,.42); display: grid; place-items: center; padding: 20px; }
.confirm[hidden] { display: none; }
.c-card { background: var(--surface-solid); border-radius: 20px; padding: 18px; max-width: 360px; animation: up .2s; box-shadow: var(--shadow); }
.c-card b { font-size: 17px; font-weight: 800; }
.c-card p { color: var(--ink2); line-height: 1.7; font-size: 14px; }
.c-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.c-btns > * { min-height: 48px; }
.c-btns .primary { background: var(--cut); color: #fff; font-weight: 800; border-radius: 14px; padding: 11px; }

@media (min-width: 720px) {
  .r-pair canvas { height: 200px; }
}
@media (max-width: 380px) {
  .meter .lbl small { display: none; }
  .meter .val { font-size: 14px; }
  .go span { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .go.ready, .banner.show { animation-duration: .01s; }
}

/* ==== 2026-11-17：切る位置・木の応え・手帳・アルバム（落ち着いた体裁のまま足す） ==== */
[hidden] { display: none !important; }
body[data-phase="page"] .top { display: none; }
body[data-phase="page"] .page:not([hidden]) { display: grid; }
.page { background: rgba(20, 26, 20, .38); align-items: end; animation: fade .2s; }
.page .s-card { height: 100dvh; max-height: 100dvh; border-radius: 0; width: 100%; }
.pg-head { padding: 2px 2px 12px; } .pg-head b { font-family: var(--mincho); font-weight: 600; font-size: 24px; letter-spacing: .06em; } .pg-head small { display: block; font-size: 12px; color: var(--ink2); margin-top: 2px; }

/* タイトル */
.resume { width: 100%; margin-top: 14px; display: grid; text-align: left; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--leaf); color: #fff; box-shadow: 0 2px 0 var(--leaf-d); }
.resume b { font-family: var(--mincho); font-weight: 600; font-size: 17px; letter-spacing: .06em; } .resume small { font-size: 12px; opacity: .85; }
.daily { width: 100%; margin-top: 10px; display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 12px; text-align: left; padding: 10px 14px 10px 10px; border-radius: 14px; background: var(--surface2); box-shadow: inset 0 0 0 1px var(--line); }
.daily canvas { width: 52px; height: 52px; }
.d-body { display: grid; gap: 1px; } .d-body b { font-size: 15px; font-weight: 800; } .d-body small { font-size: 11px; color: var(--ink2); }
.d-body small:first-child { color: var(--leaf-d); font-weight: 700; letter-spacing: .08em; }
.t-trees canvas { width: 42px; height: 42px; }
.t-rank { margin: 14px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: baseline; font-size: 12px; }
.t-rank span { font-family: var(--mincho); font-weight: 600; font-size: 15px; } .t-rank small { color: var(--ink3); font-size: 11px; }
.t-prog { grid-column: 1 / -1; display: block; height: 3px; border-radius: 2px; background: var(--surface2); overflow: hidden; }
.t-prog i { display: block; height: 100%; background: var(--leaf); }
.t-sub { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.t-sub .ghost { min-height: 46px; }
.title h1 { font-weight: 600; }

/* 季節の言葉（二十四節気） */
#growMonth { font-family: var(--mincho); font-weight: 600; font-size: 17px; letter-spacing: .08em; }
#growMonth small { font-family: var(--gothic); font-size: 11px; color: var(--ink3); margin-left: 6px; letter-spacing: 0; font-weight: 600; }
.banner small { font-family: var(--mincho); }

/* 選んだ枝：切り方 */
.bs-head .kind { margin-left: 8px; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; vertical-align: 2px; }
.kind.thin { background: var(--leaf-l); color: var(--leaf-d); }
.kind.head { background: #f4e2d6; color: var(--cut-d); }
.bs-why { margin: 4px 0 0; font-size: 12px; color: var(--ink2); line-height: 1.6; }

/* 去年の切り口の印・ものさし */
.marks-btn { position: absolute; left: 10px; bottom: calc(var(--dock-h, 90px) + 44px); z-index: 2; min-height: 36px; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--ink2); background: var(--surface); box-shadow: var(--shadow); }
.marks-btn.on { color: var(--cut-d); box-shadow: inset 0 0 0 1.5px var(--cut), var(--shadow); }
body:not([data-phase="winter"]) .marks-btn, .stage:has(.branch-sheet:not([hidden])) .marks-btn, .stage:has(.quick:not([hidden])) .marks-btn { display: none; }
.ruler { position: absolute; left: 12px; bottom: calc(var(--dock-h, 90px) + 14px); z-index: 2; pointer-events: none; display: grid; justify-items: start; gap: 2px; }
.ruler i { display: block; width: var(--len, 60px); height: 7px; border: 1.5px solid rgba(255,255,255,.95); border-top: 0; filter: drop-shadow(0 0 1px rgba(0,0,0,.55)); }
.ruler span { font-size: 11px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.7); }
.stage:has(.branch-sheet:not([hidden])) .ruler { display: none; }

/* その年の実り */
.r-head { display: grid; grid-template-columns: 60px 1fr auto; align-items: center; gap: 12px; }
.r-fruit { width: 60px; height: 60px; }
.r-sub { text-align: left; margin: 8px 0 0; }
.seal { width: 62px; height: 62px; display: grid; place-items: center; font-family: var(--mincho); font-weight: 600; font-size: 30px; color: var(--cut); border: 2px solid currentColor; border-radius: 6px; transform: rotate(-6deg) scale(1.3); opacity: 0; transition: opacity .25s, transform .35s cubic-bezier(.2,1.2,.4,1); }
.seal.in { opacity: .9; transform: rotate(-6deg); }
.seal.s-優 { color: #a8722a; } .seal.s-良 { color: var(--leaf); } .seal.s-可 { color: var(--ink3); }
.grades { display: flex; gap: 2px; margin-top: 10px; height: 18px; border-radius: 3px; overflow: hidden; }
.grades i { font-style: normal; flex-basis: 0; min-width: 0; display: grid; place-items: center; font-size: 10px; color: #fff; overflow: hidden; }
.grades i b { font-family: var(--mincho); font-weight: 600; }
.grades .g-premium { background: #9c4a2a; } .grades .g-good { background: #b98a3e; } .grades .g-standard { background: #6f8a4a; } .grades .g-processing { background: #a7a296; }
.unlock { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.unlock span { font-size: 12px; color: var(--ink2); padding: 6px 12px; border-radius: 999px; background: var(--surface2); box-shadow: inset 0 0 0 1px var(--line); animation: fade .6s .6s both; }
.unlock b { font-family: var(--mincho); font-weight: 600; color: var(--ink); }
.r-run { font-size: 12px; color: var(--ink3); text-align: right; margin: 0 0 8px; }
.r-btns { display: grid; grid-template-columns: auto 1fr; gap: 8px; }
.r-btns .ghost { padding: 0 16px; }

/* 五年の評 */
.rank-S { font-size: 34px; letter-spacing: -.02em; }
.g-total { margin: 4px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 13px; color: var(--ink2); }
.g-total b { font-family: var(--mincho); font-weight: 600; font-size: 30px; color: var(--ink); margin: 0 2px; }
.g-total small { font-size: 12px; }
.best { font-style: normal; font-size: 11px; font-weight: 700; color: var(--cut-d); padding: 2px 8px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--cut); }
.g-title { display: flex; align-items: baseline; gap: 10px; margin: 12px 0 0; }
.g-title span { font-size: 12px; color: var(--ink2); }
.g-title b { font-family: var(--mincho); font-weight: 600; font-size: 18px; letter-spacing: .06em; }
.share-btn { display: flex; gap: 6px; min-height: 48px; }

/* アルバム・手帳 */
.album { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 12px; }
.photo { background: #fff; padding: 6px 6px 8px; border-radius: 4px; box-shadow: var(--shadow); text-align: left; display: grid; gap: 6px; }
.photo img { width: 100%; aspect-ratio: 5 / 6; object-fit: cover; display: block; background: var(--surface2); }
.ph-cap b { display: block; font-size: 12px; font-weight: 700; } .ph-cap small { font-size: 11px; color: var(--ink2); }
.empty { background: var(--surface2); border-radius: 12px; padding: 16px; font-size: 14px; line-height: 1.7; color: var(--ink2); }
.big-photo { display: block; width: 100%; max-height: 52dvh; object-fit: contain; border-radius: 6px; margin: 8px 0; background: var(--surface2); }
.note-card { background: #fff; border-radius: 14px; padding: 12px 14px; box-shadow: inset 0 0 0 1px var(--line); }
.note-card .g-title { margin: 0 0 6px; }
.t-next { display: block; font-size: 11px; color: var(--ink3); margin: 4px 0 6px; }
.best-grid { width: 100%; border-collapse: collapse; font-size: 12px; }
.best-grid th { font-weight: 600; color: var(--ink2); padding: 6px 2px; text-align: left; }
.best-grid td { text-align: right; font-weight: 700; padding: 6px 2px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.achv { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin-bottom: 12px; }
.achv div { background: var(--surface2); border-radius: 10px; padding: 8px 10px; }
.achv div.got { background: #fff; box-shadow: inset 0 0 0 1px var(--leaf); }
.achv b { display: block; font-family: var(--mincho); font-weight: 600; font-size: 14px; color: var(--ink3); } .achv .got b { color: var(--leaf-d); }
.achv small { font-size: 11px; color: var(--ink2); }
.c-body { color: var(--ink2); line-height: 1.7; font-size: 14px; margin: 8px 0 12px; }
.c-card { max-height: 92dvh; overflow: auto; }
a.ghost { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.ghost.wide { width: 100%; margin-top: 8px; min-height: 46px; }
.share-text { font-size: 12px; color: var(--ink2); line-height: 1.6; background: var(--surface2); padding: 8px 10px; border-radius: 8px; user-select: text; -webkit-user-select: text; }

#titlePlant { float: right; width: clamp(64px, 23%, 110px); height: 74px; object-fit: contain; }
#titleChoices { clear: both; }
.t-trees img, .daily img, .r-fruit { object-fit: contain; }
.t-trees img { display: block; width: 48px; height: 48px; margin: 0 auto 4px; }
.daily { grid-template-columns: 72px 1fr; }

/* ==== 2026-11-20：あそび方・木のようす・手引き・ふり返り・移り変わり ==== */
.t-modes { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.t-modes button { background: var(--surface2); border-radius: 14px; padding: 10px 12px; display: grid; gap: 2px; text-align: left; transition: box-shadow .15s, background .15s; }
.t-modes button.on { background: #fff; box-shadow: inset 0 0 0 2px var(--leaf); }
.t-modes b { font-size: 15px; font-weight: 800; } .t-modes small { font-size: 11px; color: var(--ink2); line-height: 1.5; }
.t-sub { grid-template-columns: 1fr 1fr 1fr; }
/* 腕だめし：ヒントの道具を出さない */
body[data-mode="test"] #hintBtn, body[data-mode="test"] #quick { display: none !important; }
body[data-mode="test"][data-phase="winter"] .dock-winter { grid-template-columns: 62px 1fr; }
/* 左下の小さな札：木のようす・去年の切り口 */
.chips { position: absolute; left: 10px; bottom: calc(var(--dock-h, 90px) + 44px); z-index: 2; display: flex; gap: 6px; }
.chips .marks-btn { position: static; }
body:not([data-phase="winter"]):not([data-phase="growing"]) .chips, .stage:has(.branch-sheet:not([hidden])) .chips, body[data-phase="winter"] .stage:has(.quick:not([hidden])) .chips { display: none; }
/* 成長中は「木の中の流れ」だけ出す */
body[data-phase="growing"] .chips .marks-btn { display: none; }
/* 木の中の流れ：見ない・ホルモン・養分 を並べて選ぶ（冬も成長中も） */
.flow-seg { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 92%, transparent); box-shadow: var(--shadow); }
.flow-seg .fs-h { padding: 0 6px 0 8px; font-size: calc(11px * var(--ts, 1)); font-weight: 700; color: var(--ink2); }
.flow-seg button { padding: 6px 10px; border-radius: 999px; font-size: calc(12.5px * var(--ts, 1)); font-weight: 700; color: var(--ink2); background: transparent; }
.flow-seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 2px var(--leaf); }
.flow-seg button[data-flow="hormone"][aria-pressed="true"] { box-shadow: inset 0 0 0 2px rgb(60,140,226); }
.flow-seg button[data-flow="sugar"][aria-pressed="true"] { box-shadow: inset 0 0 0 2px rgb(240,170,30); }
/* 流れの凡例：ものさしの帯や枝の札と重ならないよう、左下のボタンの上に小さく */
.flow-legend { position: absolute; left: 10px; bottom: calc(var(--dock-h, 90px) + 86px); z-index: 2; max-width: min(300px, calc(100% - 70px)); display: grid; gap: 1px; padding: 5px 8px; border-radius: 4px; font-size: calc(11px * var(--ts, 1)); line-height: 1.4; color: var(--ink); background: color-mix(in srgb, var(--surface) 92%, transparent); box-shadow: var(--shadow); pointer-events: none; }
.flow-legend b { font-size: calc(12px * var(--ts, 1)); } .flow-legend b small { font-weight: 400; }
.flow-legend span { display: flex; gap: 6px; align-items: flex-start; }
.flow-legend small { color: var(--ink2); }
.flow-legend .sw { flex: none; width: 14px; height: 5px; margin-top: .55em; border-radius: 3px; }
.flow-legend .sw-aux { background: rgb(214,70,70); } .flow-legend .sw-ck { background: rgb(60,140,226); }
.flow-legend .sw-bud { width: 9px; height: 9px; margin-top: .3em; border-radius: 50%; background: radial-gradient(#ffffd2, #78d25a 60%, transparent); }
.flow-legend .sw-sugar { background: rgb(240,185,40); } .flow-legend .sw-fruit { width: 9px; height: 9px; margin-top: .3em; border-radius: 50%; border: 1.6px solid rgb(170,90,0); }
.stage:has(.branch-sheet:not([hidden])) .flow-legend, body[data-phase="winter"] .stage:has(.quick:not([hidden])) .flow-legend, body:not([data-phase="winter"]):not([data-phase="growing"]) .flow-legend { display: none; }
.st-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.st-table th { text-align: left; font-weight: 500; color: var(--ink2); padding: 7px 8px 7px 0; border-bottom: 1px solid var(--line); vertical-align: top; white-space: nowrap; }
.st-table td { padding: 7px 0; border-bottom: 1px solid var(--line); text-align: right; }
.st-table td b { font-size: 15px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.st-table td small { display: block; font-size: 11px; color: var(--ink2); line-height: 1.5; margin-top: 2px; }
.c-body .st-habit { margin: 10px 0 0; padding: 8px 10px; font-size: 13px; background: var(--leaf-l); color: var(--leaf-d); border-radius: 10px; line-height: 1.6; }
.c-body .st-note { margin: 8px 0 0; font-size: 11px; color: var(--ink3); line-height: 1.6; }
.c-body > .ghost.wide { margin: 0 0 4px; }
/* 枝の札の説明 */
.bs-facts { margin: 4px 0 0; font-size: 12px; font-weight: 700; color: var(--ink2); font-variant-numeric: tabular-nums; }
.bs-what { margin: 2px 0 0; font-size: 13px; color: var(--ink); line-height: 1.55; }
.bs-why b { color: var(--ink); margin-right: 6px; }
.bs-more { margin: 4px 0 8px; font-size: 12px; color: var(--ink2); }
.bs-more summary { cursor: pointer; font-weight: 700; color: var(--leaf-d); padding: 2px 0; list-style: none; }
.bs-more summary::-webkit-details-marker { display: none; }
.bs-more summary::before { content: "＋ "; } .bs-more[open] summary::before { content: "－ "; }
.bs-more p { margin: 2px 0 0; line-height: 1.55; } .bs-more p b { color: var(--ink); margin-right: 6px; }
/* 成長中：いま木で起きていること */
.grow-now { margin: 0; font-size: 12px; line-height: 1.55; color: var(--ink2); min-height: 1.55em; }
.grow-now:empty { display: none; }
/* 結果：切った枝のふり返り・五年の移り変わり */
.review, .trend { margin: 12px 0; }
.review header, .trend header { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.review header b, .trend header b { font-family: var(--mincho); font-weight: 600; font-size: 16px; letter-spacing: .04em; }
.review header small, .trend header small { font-size: 11px; color: var(--ink2); }
.trend header small i { font-style: normal; color: var(--ink3); }
.review .link { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--leaf-d); text-decoration: underline; text-underline-offset: 3px; padding: 6px 0; }
.rv-match { margin: 0 0 8px; font-size: 13px; line-height: 1.6; color: var(--ink2); padding: 8px 10px; border-radius: 10px; background: #e9f0f6; }
.rv-match b { color: var(--cool); font-weight: 800; }
.review ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.review li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; padding: 8px 10px; border-radius: 10px; background: var(--surface2); }
.review li > span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; font-family: var(--mincho); font-size: 12px; font-weight: 700; color: #fff; background: var(--ink3); }
.review li.good > span { background: var(--leaf); } .review li.bad > span { background: var(--cut); }
.review li b { font-size: 13px; font-weight: 800; margin-right: 6px; }
.review li small { font-size: 11px; color: var(--ink2); }
.review li em { display: block; font-style: normal; font-size: 12px; margin-top: 2px; color: var(--ink); }
.review li.bad em { color: var(--cut-d); } .review li.good em { color: var(--leaf-d); }
.rv-more { margin: 4px 0 0; font-size: 11px; color: var(--ink3); text-align: right; }
.trend table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; table-layout: fixed; }
.trend th { font-weight: 500; color: var(--ink2); text-align: left; padding: 5px 2px; white-space: nowrap; }
.trend tr:first-child th { text-align: right; font-size: 11px; }
.trend tr:first-child th:first-child { width: 5.6em; }
.trend td { text-align: right; padding: 5px 2px; border-top: 1px solid var(--line); font-weight: 700; }
.trend td small { display: block; font-weight: 500; font-size: 10px; color: var(--ink3); }
.r-btns { grid-template-columns: auto auto 1fr; }
.r-btns .icon-btn { display: grid; place-items: center; padding: 0 12px; }
/* 切り方の手引き */
.guide { position: absolute; inset: 0; z-index: 25; display: grid; align-items: end; background: rgba(20, 26, 20, .38); animation: fade .2s; }
.guide .s-card { height: 100dvh; max-height: 100dvh; border-radius: 0; width: 100%; }
.gd { margin: 0 0 18px; }
.gd h3 { font-family: var(--mincho); font-weight: 600; font-size: 17px; margin: 0 0 6px; letter-spacing: .04em; }
.gd p { font-size: 14px; line-height: 1.75; margin: 6px 0 0; color: var(--ink); }
.gd p b { color: var(--leaf-d); }
.gd-tip { font-size: 13px !important; background: #fbf3df; padding: 8px 10px; border-radius: 10px; }
.gd-svg { width: 100%; height: auto; display: block; background: var(--surface2); border-radius: 12px; stroke-width: 0; }
.gd-svg path, .gd-svg circle, .gd-svg rect { fill: none; stroke-linecap: round; }
.gd-svg .wood path { stroke: #6b5440; stroke-width: 7; }
.gd-svg .wood.thin path { stroke-width: 4; }
.gd-svg .wood .drop { stroke: #b9aa98; stroke-dasharray: 6 6; stroke-width: 5; }
.gd-svg .young path { stroke: #9c3b2b; stroke-width: 4; }
.gd-svg .new path { stroke: #4f8a3c; stroke-width: 3; }
.gd-svg .weed path { stroke: #c08519; stroke-width: 4; }
.gd-svg .mark path { stroke: var(--cut); stroke-width: 3; }
.gd-svg .light path { stroke: #e3b341; stroke-width: 2; }
.gd-svg .bud circle { fill: #e8a5b4; stroke: #a8566b; stroke-width: 1.5; }
.gd-svg .bar { fill: #dcd8cc; } .gd-svg .ok { fill: var(--leaf); }
.gd-svg text { font-size: 11px; fill: var(--ink2); font-family: var(--gothic); font-weight: 600; stroke: none; }

/* ==== 2026-11-20：剪定日和 — 最初の画面（季節の果樹園を敷く）と、PC・タブレットの広い画面 ==== */
.title { background: #dfe6e4; padding: 0; overflow: hidden; display: none; }
body[data-phase="title"] #title { display: block; }
#titleArt { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.t-wrap { position: absolute; inset: 0; overflow: auto; overscroll-behavior: contain; display: flex; flex-direction: column; align-items: center;
  padding: calc(28px + var(--safe-t)) 12px calc(14px + var(--safe-b)); }
.t-hero { width: 100%; max-width: 440px; min-height: 50dvh; padding: 6px 8px 18px; color: var(--ink); }
.t-hero .t-kicker { color: #2d3a33; text-shadow: 0 1px 8px rgba(255,255,255,.8); }
.title h1 { font-family: var(--mincho); font-weight: 600; font-size: clamp(52px, 15vw, 76px); letter-spacing: .1em; line-height: 1.05; margin: 8px 0 0;
  color: #1f2a22; text-shadow: 0 1px 0 rgba(255,255,255,.6), 0 2px 18px rgba(255,255,255,.75); }
.t-hero { min-width: 0; }
.t-logo { display: block; width: min(100%, 4.8em); height: auto; }
.t-reading { margin: 6px 0 0 4px; font-size: 12px; letter-spacing: .5em; color: #2d3a33; font-weight: 600; text-shadow: 0 1px 8px rgba(255,255,255,.8); }
.t-card { margin-top: auto; background: rgba(250, 249, 245, .96); }
#titleChoices > :first-child { margin-top: 0; }
.install { margin-top: 10px; color: var(--leaf-d); box-shadow: inset 0 0 0 1.5px var(--leaf); background: #fff; }
/* 横長の画面（PC・タブレットの横向き）：題字は左の空、札は右に */
@media (min-aspect-ratio: 23/20) and (min-width: 760px) {
  .t-wrap { flex-direction: row; align-items: flex-start; justify-content: space-between; gap: 32px; padding: calc(40px + var(--safe-t)) clamp(20px, 5vw, 64px) 24px; }
  .t-hero { max-width: none; flex: 1; min-height: 0; padding-top: 4vh; }
  .title h1 { font-size: clamp(64px, 7vw, 104px); }
  .t-card { margin: 0 0 24px; flex: none; width: 440px; }
}
/* 広い画面：絵は全幅、帯とボタンは読みやすい幅で中央に */
@media (min-width: 900px) {
  #app { max-width: none; }
  .top, .hud, .dock { width: min(760px, calc(100% - 24px)); justify-self: center; margin-left: 0; margin-right: 0; }
  .branch-sheet { left: auto; right: 16px; width: 400px; bottom: calc(var(--dock-h, 90px) + 8px); }
  .sheet .s-card { width: min(680px, 100%); justify-self: center; }
  .sheet { justify-items: center; }
  .page .s-card, .guide .s-card { width: min(760px, 100%); justify-self: center; }
  .page, .guide { justify-items: center; }
  .chips { left: max(10px, calc(50% - 370px)); }
  .ruler { right: max(12px, calc(50% - 368px)); }
}
@media (min-width: 900px) { .zoom { right: max(10px, calc(50% - 370px)); } }

/* ==== 2026-11-25：梅日和・写す・共有する ==== */
.chips { flex-wrap: wrap; max-width: calc(100% - 70px); }
.snap-btn { display: inline-flex !important; align-items: center; gap: 4px; }
.snap-btn svg { width: 16px; height: 16px; }
body[data-phase="growing"] .chips .snap-btn { display: inline-flex !important; }
#app.snapped::after { content: ""; position: absolute; inset: 0; z-index: 40; pointer-events: none; background: #fff; animation: snapflash .45s ease-out forwards; }
@keyframes snapflash { from { opacity: .75; } to { opacity: 0; } }
.studio { position: absolute; inset: 0; z-index: 30; display: grid; align-items: end; background: rgba(20, 26, 20, .45); animation: fade .2s; }
.studio[hidden] { display: none; }
.studio .s-card { display: grid; gap: 10px; }
.studio .pg-head { margin-bottom: 0; }
.st-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.st-chips:empty { display: none; }
.st-chips button { flex: none; padding: 8px 12px; border-radius: 999px; background: var(--surface2); font-size: 13px; font-weight: 700; color: var(--ink2); }
.st-chips button.on { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 2px var(--leaf); }
.st-fmt { justify-content: center; }
.st-pick { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.st-pick button { flex: none; width: 74px; display: grid; gap: 2px; padding: 3px; border-radius: 8px; background: var(--surface2); }
.st-pick button.on { box-shadow: inset 0 0 0 2px var(--leaf); background: #fff; }
.st-pick button.txt { width: auto; padding: 8px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.st-pick img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 5px; display: block; }
.st-pick small { font-size: 10px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-prev { margin: 0; display: grid; place-items: center; background: var(--surface2); border-radius: 10px; padding: 8px; transition: opacity .15s; }
.st-prev.wait { opacity: .55; }
.st-prev img { display: block; max-width: 100%; max-height: 46dvh; width: auto; height: auto; border-radius: 4px; box-shadow: var(--shadow); }
.st-label { font-size: 12px; font-weight: 700; color: var(--ink2); } .st-label small { font-weight: 500; color: var(--ink3); }
#stText { width: 100%; font: inherit; font-size: 13px; line-height: 1.6; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line2); background: #fff; color: var(--ink); resize: vertical; user-select: text; -webkit-user-select: text; }
.st-btns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.st-btns .go { grid-column: 1 / -1; min-height: 54px; }
.st-btns .ghost { min-height: 44px; font-size: 13px; font-weight: 700; }
.st-note { margin: 0; font-size: 11px; color: var(--ink3); line-height: 1.6; }
@media (min-width: 900px) { .studio { justify-items: center; } .studio .s-card { width: min(560px, 100%); } }
/* 梅日和：紅梅の差し色。紙と墨の調子はそのまま */
body[data-edition="ume"] { --leaf: #8c3a4e; --leaf-d: #6a2a3a; --leaf-l: #f4e3e7; background: #e9dcdc; }
body[data-edition="ume"] #app { background: #ece3e1; }
body[data-edition="ume"] .t-hero h1 { color: #2a1f22; }
.t-ed { display: block; margin-top: 12px; padding: 10px 12px; border-radius: 12px; font-size: 12px; color: var(--ink2); text-decoration: none; background: var(--surface2); }
.t-ed b { font-family: var(--mincho); font-size: 15px; color: var(--ink); }
.t-ed.ume { background: #f6eaec; box-shadow: inset 0 0 0 1px rgba(140,58,78,.25); }
.t-ed.ume b { color: #8c3a4e; }

/* ==== 2026-11-25 その2：止めて眺める・見どころ ==== */
body[data-phase="growing"] .dock-grow { grid-template-columns: 1fr auto auto; }
.pause-btn { display: inline-flex; align-items: center; gap: 3px; min-height: 54px; padding: 0 12px; white-space: nowrap; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); font-size: 14px; font-weight: 700; color: var(--ink2); }
.pause-btn svg { width: 18px; height: 18px; }
.pause-btn.on { background: var(--leaf); color: #fff; }
.pause-card { position: absolute; left: 10px; right: 10px; bottom: calc(var(--dock-h, 90px) + 96px); z-index: 6; max-width: 440px; margin: 0 auto; padding: 9px 12px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); animation: up .25s ease-out; }
.pause-card[hidden] { display: none; }
.pc-head { display: flex; gap: 10px; align-items: center; }
.pc-head .b-kanji { flex: none; width: 28px; height: 28px; display: grid; place-items: center; background: var(--cut); color: #fff; font-family: var(--mincho); font-weight: 600; font-size: 20px; border-radius: 3px; }
.pc-head b { display: inline; margin-right: 8px; font-family: var(--mincho); font-size: 17px; font-weight: 600; }
.pc-head small { color: var(--ink2); font-size: 12px; }
.pause-card p { margin: 4px 0 7px; font-size: 12px; line-height: 1.6; color: var(--ink2); }
.pc-btns { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; }
.pc-btns .ghost { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 42px; font-weight: 700; }
.pc-btns .ghost svg { width: 18px; height: 18px; }
.pc-btns .go { min-height: 42px; }
.pc-btns .go span { font-size: 16px; }
.pc-opt { display: flex; gap: 6px; align-items: center; margin-top: 6px; font-size: 11px; color: var(--ink3); }
@media (min-width: 900px) { .pause-card { left: auto; right: 16px; width: 380px; } }
/* 止めているあいだは流れの凡例を出さない（札と重なる） */
.stage:has(.pause-card:not([hidden]):not(.mini)) .flow-legend { display: none; }
/* 流れを見ているあいだは札をしまう（下の「つづける」と「写す」はそのまま使える） */
.pause-card.mini { display: none; }
body[data-phase="growing"] .speed button { white-space: nowrap; font-size: 13px; padding: 0 2px; }

/* 梅日和はサブ：剪定日和のタイトルでは目立たない文字のリンクに */
.t-ed.sub { background: none; box-shadow: none; padding: 8px 2px 0; font-size: 12px; color: var(--ink3); text-align: right; }
.t-ed.sub b { font-size: 13px; color: var(--ink2); }

/* 流れの強さの帯（凡例） */
.flow-legend .ramp-row { align-items: center; gap: 6px; }
.flow-legend .ramp { flex: 1; min-width: 90px; height: 8px; border-radius: 4px; }
.flow-legend .ramp-sugar { background: linear-gradient(90deg, rgb(150,165,170), rgb(110,175,70) 20%, rgb(235,205,40) 45%, rgb(245,140,25) 70%, rgb(255,245,215)); box-shadow: 0 0 6px rgba(245,170,40,.6); }
.flow-legend .ramp-hormone { background: linear-gradient(90deg, rgb(214,40,60), rgb(200,190,200) 50%, rgb(40,120,226)); }
.flow-legend .lg-tip { color: var(--ink3); font-size: calc(10px * var(--ts, 1)); }
.flow-read { position: absolute; z-index: 7; pointer-events: none; max-width: 230px; padding: 6px 9px; border-radius: 6px; background: rgba(28,32,28,.86); color: #fff; font-size: 11px; line-height: 1.5; transform: translate(-50%, calc(-100% - 12px)); box-shadow: var(--shadow); }
.flow-read b { display: block; font-size: 12px; }
.bs-flow { display: grid; gap: 1px; margin: 6px 0; padding: 6px 8px; border-radius: 6px; background: #fbf6e4; font-size: 12px; color: var(--ink2); }
.bs-flow b { font-size: 12px; color: var(--ink); }
.flow-read[hidden] { display: none; }

/* ==== 研究ノート・やり直し ==== */
.t-sub { grid-template-columns: 1fr 1fr 1fr 1fr !important; }
.t-sub button { padding-left: 2px; padding-right: 2px; font-size: 13px; }
.r-lab { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.r-lab button { display: grid; gap: 1px; padding: 8px 6px; min-height: 48px; font-weight: 700; font-size: 13px; }
.r-lab small { font-size: 10px; font-weight: 500; color: var(--ink3); }
.nb-trees { margin-bottom: 8px; }
.nb-prof { display: grid; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--surface2); font-size: 12px; color: var(--ink2); margin-bottom: 8px; }
.nb-prof > b { font-family: var(--mincho); font-size: 15px; color: var(--ink); }
.nb-prof small { color: var(--ink3); line-height: 1.6; }
.nb-fig h3, .nb-ins h3, .nb-list h3 { font-family: var(--mincho); font-weight: 600; font-size: 15px; margin: 12px 0 4px; }
.nb-svg { width: 100%; height: auto; display: block; background: #fff; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--line); }
.nb-svg text { font-size: 9px; fill: var(--ink3); font-family: var(--gothic); }
.nb-svg .grid { stroke: rgba(0,0,0,.06); } .nb-svg .ref { stroke: rgba(38,48,42,.45); stroke-dasharray: 3 3; }
.nb-svg .over { fill: rgba(194,83,42,.07); } .nb-svg .lim { stroke: var(--cut); stroke-width: 1.2; } .nb-svg .lim-t { fill: var(--cut); font-weight: 700; }
.nb-svg .okzone { fill: rgba(61,107,52,.1); } .nb-svg .ax { fill: var(--ink2); }
.nb-cap { margin: 4px 0 0; font-size: 11px; color: var(--ink3); }
.nb-ins ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.7; color: var(--ink2); }
.nb-list table { width: 100%; border-collapse: collapse; font-size: 11px; font-variant-numeric: tabular-nums; }
.nb-list th { color: var(--ink3); font-weight: 600; text-align: right; padding: 3px 2px; } .nb-list th:first-child { text-align: left; }
.nb-list td { text-align: right; padding: 4px 2px; border-top: 1px solid var(--line); } .nb-list td:first-child { text-align: left; }
.nb-list td small { display: block; color: var(--ink3); } .nb-list tr.retry td { background: #fbf6e4; }
.nb-list td em { font-style: normal; font-size: 10px; color: #fff; background: var(--warn); border-radius: 3px; padding: 0 3px; margin-left: 3px; }
.meter { cursor: pointer; }
.meter .val .mv { margin-left: 5px; font-size: 11px; font-weight: 600; color: var(--ink3); }
/* 研究ノートの図：アイコン用の svg の線の指定（stroke: currentColor）を打ち消す */
.nb-svg, .nb-svg text, .nb-svg rect, .nb-svg circle { stroke: none; }
.nb-svg .grid, .nb-svg .ref, .nb-svg .lim { fill: none; }
.nb-svg .grid { stroke: rgba(0,0,0,.08); stroke-width: 1; } .nb-svg .ref { stroke: rgba(38,48,42,.45); stroke-width: 1; } .nb-svg .lim { stroke: var(--cut); stroke-width: 1.2; }
.nb-svg circle[stroke] { stroke: #26302a; stroke-width: 1; }

/* 腕前（2026-11-26）：一年ごとの点と、級・段。木の星 */
.skill { margin: 14px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--surface2); box-shadow: inset 0 0 0 1px var(--line); opacity: .35; transition: opacity .4s, box-shadow .4s; }
.skill.in { opacity: 1; }
.skill.up { box-shadow: inset 0 0 0 2px #b4532a, 0 0 0 4px rgba(180,83,42,.12); }
.sk-top { display: flex; justify-content: space-between; align-items: baseline; }
.sk-dan { font-size: 12px; color: var(--ink2); }
.sk-dan b { font-family: var(--mincho); font-size: 20px; font-weight: 700; color: var(--ink); letter-spacing: .06em; }
.skill.up .sk-dan b { color: #b4532a; display: inline-block; animation: sc-pop .9s cubic-bezier(.2,1.3,.4,1); }
.sk-gain { font-family: var(--mincho); font-size: 16px; color: var(--leaf-d); font-weight: 700; }
.sk-gain b { font-size: 30px; font-variant-numeric: tabular-nums; margin: 0 2px; }
.sk-gain small { font-size: 12px; }
.sk-bar { display: block; height: 8px; margin: 8px 0 4px; background: #fff; border-radius: 4px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.sk-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--leaf), #7fae4f); transition: width .5s cubic-bezier(.2,1,.3,1); }
.sk-next { display: block; font-size: 11px; color: var(--ink3); }
.sk-next b { color: var(--ink2); }
.sk-parts { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 14px; }
.sk-parts li { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink2); }
.sk-parts b { font-variant-numeric: tabular-nums; color: var(--ink); }
.sk-note { margin: 8px 0 0; font-size: 12px; color: var(--ink2); }
.sk-note b { color: #b4532a; }
.stars { display: inline-flex; gap: 1px; margin-left: 4px; }
.stars i { font-style: normal; color: #d6d2c6; font-size: 15px; }
.stars i.on { color: #d49a1c; }
.star-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: 6px 0 10px; }
.star-grid div { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.star-grid b { font-size: 12px; }
.t-label small { font-weight: 400; color: var(--ink3); font-size: 10px; }
.banner.k-rank .b-kanji { background: #b4532a; }

/* 木の点（2026-11-26）：結果の画面のいちばん上に大きく。細かいことは「くわしく見る」 */
.score-hero { display: flex; align-items: center; gap: 18px; margin: 10px 0 6px; }
.sc-ring { --v: 0; position: relative; width: 132px; height: 132px; flex: none; border-radius: 50%; display: grid; place-content: center; text-align: center;
  background: conic-gradient(var(--leaf) calc(var(--v) * 1%), #e6e2d6 0); transition: --v .9s; }
.sc-ring::before { content: ''; position: absolute; inset: 11px; border-radius: 50%; background: var(--surface-solid); }
.sc-ring > * { position: relative; }
.sc-n { font-family: var(--mincho); font-size: 54px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.sc-ring small { font-size: 13px; color: var(--ink2); margin-top: 2px; }
.sc-ring.in { animation: sc-pop .7s cubic-bezier(.2,1.4,.4,1); }
@keyframes sc-pop { 0% { transform: scale(1); } 35% { transform: scale(1.12); } 100% { transform: scale(1); } }
.sc-side { min-width: 0; flex: 1; }
.sc-word { margin: 0; font-family: var(--mincho); font-size: 30px; font-weight: 700; letter-spacing: .08em; color: var(--leaf-d); }
.sc-label { margin: 2px 0 8px; font-size: 12px; color: var(--ink3); }
.sc-kg { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink2); flex-wrap: wrap; }
.sc-kg img { width: 26px; height: 26px; }
.sc-kg b { font-size: 22px; color: var(--ink); font-variant-numeric: tabular-nums; }
.sc-kg small { color: var(--ink3); }
.score-hero .rank { width: 72px; height: 72px; font-size: 40px; }
.sc-parts { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 7px; }
.sc-parts li { display: grid; grid-template-columns: 6.2em 1fr 3.6em; align-items: center; gap: 10px; font-size: 14px; }
.sc-parts li > i { display: block; height: 12px; border-radius: 6px; background: #e6e2d6; overflow: hidden; }
.sc-parts li > i > i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--leaf), #86b552); }
.sc-parts b { text-align: right; font-variant-numeric: tabular-nums; font-size: 16px; } .sc-parts b small { font-size: 11px; color: var(--ink3); font-weight: 500; }
.life-line { margin: 12px 0 0; font-size: 12px; color: var(--ink2); }
.life-line b { color: var(--ink); font-size: 14px; }
.life-line em { margin-left: 8px; font-style: normal; color: #fff; background: var(--leaf); padding: 2px 8px; border-radius: 999px; font-size: 11px; }
details.more { margin: 14px 0 0; border-top: 1px solid var(--line); padding-top: 4px; }
details.more > summary { cursor: pointer; list-style: none; text-align: center; font-size: 13px; font-weight: 700; color: var(--ink2); padding: 10px; border-radius: 12px; background: var(--surface2); }
details.more > summary::-webkit-details-marker { display: none; }
details.more[open] > summary { margin-bottom: 8px; }
.year-scores { display: flex; gap: 8px; align-items: flex-end; height: 110px; margin: 12px 0 0; }
.year-scores div { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; }
.year-scores i { display: block; width: 70%; max-width: 56px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #86b552, var(--leaf)); min-height: 4px; }
.year-scores b { font-size: 14px; font-variant-numeric: tabular-nums; order: -1; }
.year-scores small { font-size: 11px; color: var(--ink3); }
#newBtn small { display: block; font-size: 10px; font-weight: 500; color: var(--ink3); }
@property --v { syntax: '<number>'; inherits: false; initial-value: 0; }

/* 音のつり合い（メニュー） */
.mixer { display: grid; gap: 8px; margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface2); }
.mixer label { display: grid; grid-template-columns: 4em 1fr 2.4em; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.mixer input { width: 100%; accent-color: var(--leaf); }
.mixer output { text-align: right; font-variant-numeric: tabular-nums; }
.mixer .link { justify-self: start; font-size: 11px; color: var(--ink3); background: none; padding: 0; text-decoration: underline; }
#confirm .c-body .ghost.wide { margin-bottom: 6px; }
.sc-formula { margin: 0 0 6px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; font-size: 13px; color: var(--ink3); }
.sc-formula span { color: var(--ink2); } .sc-formula b { font-size: 17px; color: var(--ink); font-variant-numeric: tabular-nums; }
.sc-formula .ded b { color: #b4532a; }
.sc-formula small { font-size: 11px; }
.sc-label b { color: var(--leaf-d); }
.sc-ring.big .sc-n { font-size: 46px; }
.run-sum { margin: 10px 0 0; font-size: 13px; color: var(--ink2); }
.run-sum b { font-size: 18px; color: var(--ink); font-variant-numeric: tabular-nums; } .run-sum small { color: var(--ink3); font-size: 11px; }
.tech { margin: 12px 0; } .tech header { display: grid; gap: 2px; } .tech header small { font-size: 11px; color: var(--ink3); }
.tech ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.tech li { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 8px; font-size: 13px; }
.tech li small { grid-column: 2; font-size: 11px; color: var(--ink3); }
.tech li b { grid-row: 1 / span 2; grid-column: 3; font-variant-numeric: tabular-nums; }
.tech li > span { grid-row: 1 / span 2; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; color: #fff; background: #b4532a; }
.tech li > span.head { background: #2f5d8a; }

/* 動くチュートリアル（tutorial.js）：暗くして、触る所だけ丸く明るく。触る所はそのまま押せる */
.tut { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.tut-ring { position: fixed; box-shadow: 0 0 0 9999px rgba(18, 22, 18, .42); border: 3px solid #fff; transition: all .35s cubic-bezier(.2,1,.3,1); animation: tut-pulse 1.6s ease-in-out infinite; }
.tut-ring.none { border: 0; animation: none; }
@keyframes tut-pulse { 50% { border-color: rgba(255,255,255,.55); } }
.tut.idle .tut-ring, .tut.idle .tut-hand, .tut.idle .tut-bubble { opacity: 0; transition: opacity .4s; }
.tut-ring, .tut-bubble { transition: opacity .4s; }
.tut-quit { position: fixed; top: max(10px, env(safe-area-inset-top)); right: 12px; z-index: 2; pointer-events: auto; background: rgba(250,249,245,.96); color: var(--ink); font-size: 13px; font-weight: 700; padding: 9px 14px; border-radius: 999px; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.tut-count { font-size: 11px; color: var(--ink3); font-variant-numeric: tabular-nums; }
.tut-bubble { position: fixed; pointer-events: auto; background: var(--surface-solid); border-radius: 16px; padding: 14px 16px 10px; box-shadow: 0 10px 30px rgba(0,0,0,.3); transition: top .35s, left .35s, opacity .3s; }
.tut-bubble p { margin: 0 0 10px; font-size: 15px; line-height: 1.7; }
.tut-bubble p .t { display: block; font-size: 18px; font-family: var(--mincho); margin-bottom: 4px; }
.tut-bubble b { color: var(--leaf-d); }
.tut-btns { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tut-skipall { background: none; font-size: 11px; color: var(--ink3); padding: 4px 0; }
.tut-next { background: var(--leaf); color: #fff; font-weight: 700; border-radius: 12px; padding: 9px 18px; font-size: 14px; }
.tut-next.soft { background: var(--surface2); color: var(--ink2); font-weight: 600; }
.tut-hand { position: fixed; width: 44px; height: 44px; margin: -6px 0 0 -10px; opacity: 0; transition: left .35s, top .35s; pointer-events: none;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 11V4.5a1.5 1.5 0 0 1 3 0V10l.1-1.4a1.5 1.5 0 0 1 3 .2V11l.1-.9a1.5 1.5 0 0 1 3 .3V15c0 3.3-2.2 6-5.6 6H11c-1.7 0-3-.8-4-2.2L4.3 15a1.5 1.5 0 0 1 2.3-1.9L9 15.3' fill='%23fff' stroke='%23222' stroke-width='1.3' stroke-linejoin='round'/%3E%3C/svg%3E"); filter: drop-shadow(0 2px 4px rgba(0,0,0,.4)); }
.tut[data-hand="tap"] .tut-hand { opacity: 1; animation: tut-tap 1.1s ease-in-out infinite; }
.tut[data-hand="drag"] .tut-hand { opacity: 1; animation: tut-drag 1.8s ease-in-out infinite; }
@keyframes tut-tap { 0%, 100% { transform: translate(6px, 10px) scale(1); } 45% { transform: translate(0, 0) scale(.9); } }
@keyframes tut-drag { 0% { transform: translate(-60px, 0); } 50% { transform: translate(60px, 0); } 100% { transform: translate(-60px, 0); } }
.tut-entry { width: 100%; margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--leaf-l); color: var(--leaf-d); font-size: 13px; text-align: left; box-shadow: inset 0 0 0 1px rgba(61,107,52,.25); }
.tut-entry b { font-weight: 700; }

/* 見どころで止まる／止まらずに進む（成長中の下の帯） */
.stops-btn { font-size: 12px; font-weight: 700; padding: 8px 12px; border-radius: 999px; background: var(--surface2); color: var(--ink2); white-space: nowrap; }
.stops-btn.on { background: var(--leaf-l); color: var(--leaf-d); box-shadow: inset 0 0 0 1px rgba(61,107,52,.3); }
@media (max-width: 520px) { body[data-phase="growing"] .dock-grow { grid-template-columns: 1fr auto; } .stops-btn { grid-column: 1 / -1; order: -1; justify-self: end; padding: 6px 12px; } }
/* 養分の流れ（2026-11-26）：道の色と、今季の糖のゆくえの帯 */
.flow-legend .sw-make { background: rgb(86,170,60); } .flow-legend .sw-fruitlane { background: rgb(232,120,30); }
.flow-legend .sw-grow { background: rgb(196,200,40); } .flow-legend .sw-root { background: rgb(140,96,52); }
.flow-legend .alloc-h { margin-top: 4px; font-weight: 700; color: var(--ink); }
.flow-legend .alloc { display: flex; height: 10px; border-radius: 5px; overflow: hidden; margin-top: 2px; }
.flow-legend .alloc i { display: block; min-width: 2px; }
.flow-legend .alloc-l { flex-wrap: wrap; gap: 2px 8px; }
.flow-legend .alloc-l em { font-style: normal; font-size: calc(10px * var(--ts, 1)); color: var(--ink2); }
.flow-legend .alloc-l em i { display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-right: 3px; vertical-align: middle; }
.flow-legend .alloc-n { font-size: calc(9.5px * var(--ts, 1)); color: var(--ink3); }
.al-fruit { background: rgb(232,120,30); } .al-grow { background: rgb(196,200,40); }
.al-root { background: rgb(140,96,52); } .al-store { background: rgb(214,196,150); } .al-resp { background: #b9bdb6; }

/* 切るほど何が起きるか（冬）：春に噴く強い枝の見込み・夏の混み具合・立て直しの木 */
.trade { position: absolute; left: 50%; transform: translateX(-50%); top: calc(var(--top-h, 120px) + 44px); z-index: 3; display: flex; gap: 6px; margin: 0; pointer-events: none; flex-wrap: wrap; justify-content: center; max-width: calc(100% - 24px); }
.trade:empty { display: none; }
.trade span { font-size: 11px; color: var(--ink2); background: color-mix(in srgb, var(--surface) 94%, transparent); padding: 3px 9px; border-radius: 999px; box-shadow: var(--shadow); }
.trade b { margin-left: 5px; color: var(--ink); } .trade b.warn { color: #b7791f; } .trade b.bad { color: #b4532a; } .trade b.ok { color: var(--leaf-d); }
.trade .rb { background: #f6e7dc; color: #8a3b17; font-weight: 700; }
/* 同じ年の、ほかの切り方 */
.cmp { margin: 12px 0 0; } .cmp header { display: grid; gap: 1px; } .cmp header small { font-size: 11px; color: var(--ink3); }
.cmp table { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 12px; font-variant-numeric: tabular-nums; }
.cmp th, .cmp td { padding: 4px 3px; text-align: center; border-bottom: 1px solid var(--line); }
.cmp th { font-weight: 600; color: var(--ink2); font-size: 11px; } .cmp tr th:first-child { text-align: left; color: var(--ink); }
.cmp tr.me { background: var(--leaf-l); } .cmp td.best1 { color: var(--leaf-d); font-weight: 800; }
.tech li > span.rebuild { background: #8a3b17; }
.trade small { margin-left: 4px; color: var(--ink3); font-size: 10px; }
.tut-entry.first { margin: 0 0 10px; padding: 14px; font-size: 14px; background: var(--leaf); color: #fff; box-shadow: 0 3px 0 var(--leaf-d); }
.trade-line { margin: 10px 0 0; padding: 9px 12px; border-radius: 12px; background: #f6efe6; font-size: 12.5px; line-height: 1.7; color: var(--ink2); }
.trade-line b { color: #8a3b17; margin-right: 4px; }
.tech li > span.lower { background: #5b6670; }
/* 狭い画面（スマホの縦）：左下の札を2段に（上に「木のようす・写す」、下に流れの三択）。流れの見出しは省く（2026-11-27） */
@media (max-width: 520px) {
  .chips .snap-btn { order: 2; }
  .chips .flow-seg { order: 3; }
  .flow-seg .fs-h { display: none; }
  .flow-seg button { padding: 6px 9px; }
  .flow-legend { bottom: calc(var(--dock-h, 90px) + 132px); }
}
/* 切ると・残すとの一行は冬の剪定のときだけ（成長中は上の札が高くなり、下に隠れていた。2026-11-27） */
body:not([data-phase="winter"]) .trade { display: none; }

/* ==== 2026-11-29：スマホで迷わない・探さない（決めるボタンはいつも見える所に、重なりをなくす） ==== */
/* お知らせ：どの場面でも上の札のすぐ下に。結果や手帳の上でも見えるように前へ（下だと、ものさし・左下の札・結果の札に隠れていた） */
.notes, body[data-phase="winter"] .notes { bottom: auto; top: calc(var(--top-h, 120px) + 46px); z-index: 45; }
body:not([data-phase="winter"]) .notes { top: calc(var(--top-h, 60px) + 10px); }
/* ものさしは右下へ（左下は「次の候補」「木のようす・流れ」の札と取り合っていた）。冬は拡大ボタンの上 */
.ruler { left: auto; right: 12px; justify-items: end; }
body[data-phase="winter"] .ruler { bottom: calc(var(--dock-h, 90px) + 104px); }
/* 左下の札は下のボタンのすぐ上に。成長中は拡大ボタンがないので横いっぱいまで使う */
.chips { bottom: calc(var(--dock-h, 90px) + 10px); }
body[data-phase="growing"] .chips { max-width: calc(100% - 20px); }
.flow-legend { bottom: calc(var(--dock-h, 90px) + 56px); }
/* 止めて眺める札：木の真ん中を隠さないよう、左下の札（1段）のすぐ上まで下げる */
.pause-card { bottom: calc(var(--dock-h, 90px) + 56px); }
.stage:has(.pause-card:not([hidden]):not(.mini)) .ruler { display: none; }
/* 結果・五年の評のあいだも、上の札（音・メニュー）を押せるように暗幕より前へ（見えているのに押せなかった） */
body[data-phase="result"] .top, body[data-phase="grade"] .top { z-index: 11; }
/* 結果・五年の評：決めるボタンは札の下に貼りつける（長い札の一番下までスクロールしないと次へ進めなかった） */
.sheet .r-btns, .sheet .g-btns { position: sticky; bottom: calc(-14px - var(--safe-b)); z-index: 3; margin: 0 -16px; padding: 10px 16px calc(12px + var(--safe-b));
  background: var(--surface-solid); box-shadow: 0 -10px 14px -12px rgba(20, 26, 20, .35); }
.g-btns { grid-template-columns: auto 1fr; }
.g-btns .share-btn { padding: 0 14px; }
#newBtn { display: grid; gap: 1px; justify-items: center; }
/* 全画面の札（手引き・アルバム・手帳・研究ノート）：「もどる・閉じる」は常に下に見えるように。上は端末の切り欠きを避ける */
.page .s-card, .guide .s-card { padding-top: calc(18px + var(--safe-t)); }
.page .s-card > .go.big:last-child, .guide .s-card > .go.big:last-child { position: sticky; bottom: 0; z-index: 3; box-shadow: 0 3px 0 var(--leaf-d), 0 0 0 10px var(--surface-solid), 0 -14px 16px 2px var(--surface-solid); }
.studio .s-card { padding-top: calc(18px + var(--safe-t)); }
.studio .st-btns { position: sticky; bottom: calc(-14px - var(--safe-b)); z-index: 3; margin: 0 -16px; padding: 8px 16px calc(10px + var(--safe-b)); background: var(--surface-solid); box-shadow: 0 -10px 14px -12px rgba(20, 26, 20, .35); }
@media (max-width: 520px) { .st-prev img { max-height: 36dvh; } }
.c-card { max-height: calc(100dvh - 40px - var(--safe-t) - var(--safe-b)); width: 100%; }

/* ---- 最初の画面：選ぶ所を詰め、「畑へ出る」は常に画面の下に見えるように ---- */
#startBtn { position: sticky; bottom: calc(6px + var(--safe-b)); z-index: 3; box-shadow: 0 3px 0 var(--leaf-d), 0 0 0 6px rgba(250, 249, 245, .96), 0 -16px 18px 4px rgba(250, 249, 245, .96); }
.tut-entry { display: grid; gap: 2px; justify-items: start; }
.tut-entry b { display: block; }
@media (max-width: 520px) {
  .t-wrap { padding-top: calc(18px + var(--safe-t)); padding-bottom: calc(8px + var(--safe-b)); }
  .t-hero { min-height: 34dvh; padding-bottom: 10px; }
  .t-card { padding: 16px 14px 12px; border-radius: 20px; }
  .t-label { margin: 12px 0 6px; }
  .tut-entry.first { padding: 11px 14px; margin-bottom: 8px; }
  .daily { margin-top: 8px; padding: 8px 12px 8px 8px; grid-template-columns: 60px 1fr; gap: 10px; }
  .daily img { width: 60px; height: 50px; }
  /* 木：一列に並べる（2段で縦に場所を取っていた） */
  .t-trees { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; }
  .t-trees button { padding: 6px 0 5px; border-radius: 12px; }
  .t-trees img { width: 36px; height: 36px; margin-bottom: 2px; }
  .t-trees b { font-size: 12.5px; }
  /* 木の様子：三つ横に */
  .t-conds { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .t-conds button { grid-template-columns: 1fr; align-content: start; row-gap: 2px; padding: 9px 9px; }
  .t-conds small { font-size: 10.5px; line-height: 1.45; }
  .t-modes button { padding: 9px 9px; }
  .t-modes small { font-size: 10.5px; line-height: 1.45; }
  .t-rank { margin-top: 10px; }
  #startBtn { margin-top: 14px; }
  .t-note { margin-top: 10px; }
}
/* 止めて眺める札にも「写す」があるので、左下の「写す」は出さない（同じボタンが二つ並んでいた） */
.stage:has(.pause-card:not([hidden]):not(.mini)) .chips .snap-btn { display: none !important; }
/* 狭い画面：点の輪と判子を少し小さく（五年の評で「まずまず」が二行に折れていた） */
@media (max-width: 520px) {
  .score-hero { gap: 12px; }
  .sc-ring { width: 112px; height: 112px; }
  .sc-ring::before { inset: 10px; }
  .sc-n { font-size: 46px; }
  .sc-ring.big .sc-n { font-size: 40px; }
  .sc-word { font-size: 26px; letter-spacing: .04em; white-space: nowrap; }
  .score-hero .rank { width: 58px; height: 58px; font-size: 32px; }
}
/* 上に積む札（案内・切ると何が起きるか・お知らせ）：縦に並べて、折り返しても重ならない */
.float-top { position: absolute; left: 12px; right: 12px; top: calc(var(--top-h, 120px) + 8px); z-index: 45; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.float-top > .coach, .float-top > .trade, .float-top > .notes,
body[data-phase="winter"] .float-top > .notes, body:not([data-phase="winter"]) .float-top > .notes { position: static; transform: none; left: auto; right: auto; top: auto; bottom: auto; margin: 0; max-width: 100%; }
.float-top > .notes { width: 100%; }
.coach { border-radius: 16px; text-wrap: balance; }
.small-note { max-width: 100%; border-radius: 16px; text-align: center; line-height: 1.5; text-wrap: balance; }
.coach, .small-note { word-break: auto-phrase; } /* 日本語を文節で折り返す（「切る／か」で折れていた） */
/* 背の低い画面：枝の札を詰める（札が画面の半分近くを覆っていた）。切り方の説明は「切ると・残すと」を開けば読める */
@media (max-height: 720px) {
  .branch-sheet { padding: 8px 12px 10px; }
  .branch-sheet .bs-why { display: none; }
  .bs-cost { margin: 2px 0 8px; }
  .bs-btns > * { min-height: 46px; }
}
/* チュートリアルの「やめる」：上の札の音・メニューのボタンを覆わないよう、その左に小さく（覆っていた） */
.tut-quit { top: calc(14px + var(--safe-t)); right: 104px; padding: 7px 12px; font-size: 12px; }
@media (min-width: 900px) { .tut-quit { right: calc(50% - 380px + 104px); } }
.r-btns .go.big { white-space: nowrap; letter-spacing: .04em; padding-left: 8px; padding-right: 8px; }
/* 横向きのスマホ（背が低い）：上下の札を詰めて、木の場所を空ける（木が小さく押しつぶされていた） */
@media (max-height: 500px) {
  .top { margin-top: calc(4px + var(--safe-t)); padding: 2px 4px 2px 12px; }
  .top .icon { width: 36px; height: 36px; }
  .hud { padding: 0 12px 6px; }
  body[data-phase="growing"] .hud-grow { gap: 4px; padding-top: 6px; }
  .timeline span { width: 24px; height: 24px; font-size: 13px; }
  .grow-now { display: none; }
  .meter { padding-top: 4px; }
  .meter .val { margin-top: 2px; font-size: 13px; }
  .bar { margin-top: 4px; }
  .bud-num b { font-size: 19px; }
  .dock { padding-bottom: calc(6px + var(--safe-b)); }
  .tool, .go { min-height: 46px; }
  .go span { font-size: 16px; } .go small { display: none; }
  .speed button { min-height: 38px; }
  .pause-btn { min-height: 46px; }
  .coach { padding: 5px 12px; font-size: 12px; }
  .chips { flex-wrap: nowrap; }
  .chips .marks-btn, .flow-seg button { min-height: 32px; padding-top: 4px; padding-bottom: 4px; }
  .s-card { max-height: 100dvh; }
}
