/* ひといき — 色はコーヒーから。深煎りの焦げ茶、クラフト紙、落ち着いたキャラメル。角は立てて、線は太く。 */
:root {
  --bg: #0b1326; --card: #131d35; --ink: #e2eaf8; --sub: #93a4c2; --line: #2e3d5c; --hair: #1d293f; --soft: #18233a;
  --accent: #6d9bff; --accent-ink: #0b1326; --mark: #6d9bff; --warm: #6d9bff; --edge: #060b16; --hot: #e0795f; --good: #7bbd9a; --warn: #d8a85a; --on-warn: #0b1326;
  --bar: #070d1b; --bar-ink: #e2eaf8; --bar-sub: #8294b3; --track: #2e3d5c; --grid: rgba(226, 234, 248, .025);
  --hard: 5px 5px 0 #060b16; --hard-s: 3px 3px 0 #060b16;
  --f-body: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  --f-head: "Space Grotesk", "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic UI", sans-serif;
  --f-mono: "Space Mono", "Zen Kaku Gothic New", ui-monospace, monospace;
}
/* ライト：クラフト紙に焦げ茶。選んだものは焙煎の飴色。 */
:root[data-theme="light"] {
  --bg: #ffffff; --card: #f4f7fc; --ink: #14306b; --sub: #5a6c8c; --line: #bcc9de; --hair: #e2e9f3; --soft: #edf2f9;
  --accent: #1b4fd8; --accent-ink: #ffffff; --mark: #1b4fd8; --warm: #1b4fd8; --edge: #14306b; --hot: #c0462f; --good: #2f7a5a; --warn: #a8701c; --on-warn: #ffffff;
  --bar: #14306b; --bar-ink: #f4f7fc; --bar-sub: #9aabc6; --track: #d4ddea; --grid: rgba(20, 48, 107, .045);
  --hard: 5px 5px 0 rgba(20, 48, 107, .75); --hard-s: 3px 3px 0 rgba(20, 48, 107, .6);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); background: linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 100% 28px, linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 28px 100%, var(--bg); font-family: var(--f-body); font-size: 16px; font-weight: 500; line-height: 1.7; -webkit-tap-highlight-color: transparent; min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p, dl { margin: 0; }
b { font-weight: 900; }
[hidden] { display: none !important; }
.ic { flex: none; vertical-align: -4px; }
::selection { background: var(--accent); color: var(--accent-ink); }

#app { max-width: 560px; margin: 0 auto; padding: 22px 16px 150px; }
#app > * { animation: rise .3s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── 下のタブ */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; justify-content: center; background: var(--bar); border-top: 1.5px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
.tabs button { flex: 1; max-width: 108px; background: none; border: 0; padding: 7px 0 5px; display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; color: var(--bar-sub); border-radius: 2px; }
.tabs button.on { color: var(--accent-ink); background: var(--accent); }
.fab { position: fixed; z-index: 6; right: max(16px, calc(50% - 264px)); bottom: calc(84px + env(safe-area-inset-bottom)); width: 60px; height: 60px; border-radius: 2px; border: 2px solid var(--edge); background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; box-shadow: var(--hard); transition: transform .1s, box-shadow .1s; }
.fab:active { transform: translate(4px, 4px); box-shadow: none; }

/* 黒い面の上では、ライトでもライムで目立たせる */

/* ── 共通 */
.over { display: block; font-family: var(--f-mono); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--sub); line-height: 1.6; }
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1.5px solid var(--line); }
.top h1 { font-weight: 900; font-size: 36px; letter-spacing: -.02em; line-height: 1.15; margin-top: 2px; }
.top p { color: var(--sub); font-size: 12.5px; }
.lvchip { background: var(--card); border: 1.5px solid var(--line); border-radius: 2px; padding: 5px 10px 5px 6px; display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 900; white-space: nowrap; }
.sec { font-weight: 900; font-size: 16px; margin: 30px 0 10px; display: flex; justify-content: flex-start; align-items: baseline; gap: 8px; }
.sec::before { content: ''; width: 10px; height: 10px; background: var(--warm); border: 0; flex: none; align-self: center; margin-right: 0; }
.sec small { font-family: var(--f-mono); font-weight: 400; color: var(--sub); font-size: 11px; margin-left: auto; }
.card { background: var(--card); border: 1.5px solid var(--line); border-radius: 2px; padding: 16px; }
.card + .card { margin-top: 10px; }
button.card { width: 100%; text-align: left; display: block; }
button.card:active, .entry:active, .mcard:active, .bean:active, .tool:active, .lesson:active { transform: translate(2px, 2px); }
.muted { color: var(--sub); font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; }
.grow { flex: 1; min-width: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 2px solid var(--edge); border-radius: 2px; background: var(--accent); color: var(--accent-ink); font-weight: 900; padding: 12px 22px; min-height: 50px; letter-spacing: .04em; box-shadow: var(--hard-s); transition: transform .08s, box-shadow .08s; }
.btn:active { transform: translate(3px, 3px); box-shadow: none; }
.btn.block { width: 100%; }
.btn.ghost { background: var(--card); color: var(--ink); border-color: var(--line); box-shadow: none; }
.btn.small { padding: 6px 13px; min-height: 38px; font-size: 13.5px; box-shadow: none; }
.btn.small.ghost, .btn.danger { box-shadow: none; }
.btn.danger { background: none; color: var(--warn); border-color: var(--warn); }
.btns { display: flex; gap: 10px; flex-wrap: wrap; }
.tag { display: inline-block; border: 1.5px solid var(--line); border-radius: 2px; padding: 0 8px; font-size: 12px; font-weight: 700; margin: 2px 4px 2px 0; }
.tag.fl { color: #fff; background: var(--c); border-color: var(--c); }
.empty { text-align: center; padding: 34px 16px; color: var(--sub); }
.segc { display: flex; border: 1.5px solid var(--line); border-radius: 2px; margin-bottom: 14px; background: var(--card); }
.segc button { flex: 1; border: 0; background: none; padding: 10px 0; font-weight: 900; font-size: 13.5px; color: var(--sub); }
.segc button + button { border-left: 1.5px solid var(--line); }
.segc button.on { background: var(--ink); color: var(--bg); }
.badge { display: inline-block; border-radius: 2px; padding: 0 8px; font-family: var(--f-mono); font-size: 12px; font-weight: 700; background: var(--soft); }
.badge.ok { background: var(--accent); color: var(--accent-ink); }
.badge.ng { background: var(--warn); color: var(--on-warn); }

/* ── きょう */
.hero { text-align: center; padding: 0 18px 20px; overflow: hidden; background: var(--card); color: var(--ink); border-color: var(--line); }
.marquee { margin: 0 -18px 12px; background: var(--accent); color: var(--accent-ink); overflow: hidden; white-space: nowrap; font-family: var(--f-mono); font-size: 11px; font-weight: 700; letter-spacing: .12em; padding: 5px 0; }
.marquee div { display: inline-block; animation: marquee 40s linear infinite; }
@keyframes marquee { to { transform: translateX(-50%); } }
.hero h2 { font-weight: 900; font-size: 26px; margin: 4px 0 2px; letter-spacing: -.01em; line-height: 1.35; }
.hero p { color: var(--sub); font-size: 13px; margin-bottom: 16px; }
.hero .btn { box-shadow: var(--hard); }
.hero .btn:active { box-shadow: none; }
.cup-svg { display: block; margin: 0 auto; color: var(--warm); }
.cup-body, .cup-rim { fill: none; stroke: currentColor; stroke-width: 3; }
.cup-line { stroke: currentColor; stroke-width: 3 !important; }
.cup-coffee { fill: currentColor; }
.cup-shadow { fill: none; }
.steam path { opacity: 0; stroke-width: 3; animation: steam 3.4s ease-in-out infinite; }
.steam path:nth-child(2) { animation-delay: .7s; } .steam path:nth-child(3) { animation-delay: 1.4s; }
@keyframes steam { 0% { opacity: 0; transform: translateY(10px); } 35% { opacity: .9; } 100% { opacity: 0; transform: translateY(-12px); } }
.empty .cup-svg, .welcome .cup-svg { color: var(--mark); }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); }
.week div { text-align: center; font-family: var(--f-mono); font-size: 10.5px; color: var(--bar-sub); }
.week i { display: grid; place-items: center; width: 34px; height: 34px; margin: 0 auto 3px; border-radius: 50%; border: 1.5px dashed var(--line); }
.week .has i { border: 0; }
.week .now { color: var(--warm); font-weight: 700; }
.prompt { font-weight: 900; font-size: 18px; text-align: center; padding: 20px 16px; border-style: dashed; background: none; line-height: 1.6; }
.prompt small { display: block; font-family: var(--f-mono); font-weight: 400; font-size: 10.5px; letter-spacing: .14em; color: var(--sub); margin-bottom: 4px; }
.memo-card { border-left-width: 10px; border-left-color: var(--warm); }
.memo-card b { display: block; font-family: var(--f-mono); font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--sub); }
.stat3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; text-align: center; border: 1.5px solid var(--line); background: var(--card); border-radius: 2px; }
.stat3 .card { padding: 12px 4px; margin: 0; border: 0; border-radius: 0; background: none; }
.stat3 .card + .card { border-left: 1.5px solid var(--line); }
.stat3 b { display: block; font-family: var(--f-head); font-weight: 700; font-size: 32px; line-height: 1.2; letter-spacing: -.03em; }
.stat3 span { font-size: 11px; color: var(--sub); font-weight: 700; }

/* ── 記録カード */
.entry, .mcard { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; background: var(--card); border: 1.5px solid var(--line); border-radius: 2px; padding: 10px 12px 10px 10px; margin-top: -1.5px; position: relative; }
.entry.sel { background: var(--accent); color: var(--accent-ink); z-index: 1; }
.entry.sel .s { color: var(--accent-ink); }
.entry .lead { position: relative; width: 50px; height: 50px; flex: none; display: grid; place-items: center; }
.entry .thumb { width: 50px; height: 50px; border-radius: 2px; object-fit: cover; border: 1.5px solid var(--line); }
.entry .thumb + .face-svg { position: absolute; right: -7px; bottom: -7px; }
.entry .t { font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry .s { font-size: 12px; color: var(--sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry .dots { display: flex; gap: 3px; margin-top: 4px; }
.entry .dots i { width: 14px; height: 5px; background: var(--c); }
.daylabel { font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; color: var(--sub); margin: 22px 0 8px; font-weight: 700; }
.mcard { padding: 14px 12px; }
.mcard b { display: block; font-size: 17px; line-height: 1.4; }
.mcard .muted { display: block; }
.st-no { font-family: var(--f-mono); font-size: 12px; font-weight: 700; background: var(--ink); color: var(--bg); padding: 1px 6px; border-radius: 2px; flex: none; }

/* ── 入力 */
label.f, .f { display: block; font-size: 12.5px; font-weight: 700; color: var(--sub); margin: 16px 0 6px; }
input[type=text], input[type=number], input[type=search], input[type=datetime-local], input[type=date], select, textarea { width: 100%; background: var(--card); border: 1.5px solid var(--line); border-radius: 2px; padding: 10px 12px; min-height: 48px; }
textarea { min-height: 84px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--sub); opacity: .85; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--warm); }
button:focus-visible, .seg:focus-visible { outline: 3px solid var(--hot); outline-offset: 2px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 8px; }
.grid3 .f { margin-top: 10px; font-size: 11.5px; white-space: nowrap; }
.pgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.pgrid .full { grid-column: 1 / -1; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips.scroll .chip { flex: none; }
.chip { background: var(--card); border: 1.5px solid var(--line); border-radius: 2px; padding: 6px 12px; font-size: 13.5px; font-weight: 700; min-height: 40px; transition: transform .08s; }
.chip:active { transform: translate(2px, 2px); }
.chip.on { background: var(--accent); border-color: var(--edge); color: var(--accent-ink); font-weight: 900; }
.chip.del { color: var(--warn); border-color: var(--warn); border-style: dashed; }
.faces { display: flex; justify-content: space-between; gap: 0; flex-wrap: nowrap; }
.faces .chip { flex: 1; padding: 12px 0 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; line-height: 1.4; }
.faces .chip + .chip { margin-left: -1.5px; }
.faces .chip .face-svg { filter: grayscale(1); opacity: .6; transition: transform .2s cubic-bezier(.3, 1.6, .5, 1), filter .2s, opacity .2s; }
.faces .chip.on { z-index: 1; }
.faces .chip.on .face-svg { filter: none; opacity: 1; transform: scale(1.2) rotate(-8deg); }
details.more { margin-top: -1.5px; border: 1.5px solid var(--line); border-radius: 2px; background: var(--card); }
details.more > summary { padding: 15px 16px; font-weight: 900; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: '+'; font-family: var(--f-mono); font-size: 20px; line-height: 1; }
details.more[open] > summary::after { content: '−'; }
details.more[open] > summary { border-bottom: 1.5px dashed var(--hair); margin-bottom: 14px; }
details.more > summary small { font-family: var(--f-mono); font-weight: 400; font-size: 11px; color: var(--sub); margin-left: 10px; }
details.more .in { padding: 0 16px 18px; }
.ratio { font-family: var(--f-mono); font-size: 12.5px; margin-top: 8px; min-height: 1.4em; font-weight: 700; }
.ratio:not(:empty) { display: inline-block; background: var(--accent); color: var(--accent-ink); padding: 0 8px; }
.slider { display: grid; grid-template-columns: 44px 1fr 32px; align-items: center; gap: 8px; margin-top: 2px; font-size: 13.5px; font-weight: 700; }
.slider output { text-align: right; font-family: var(--f-mono); font-size: 13px; }
input[type=range] { width: 100%; accent-color: var(--mark); min-height: 34px; }
.photo-pick { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.photo-pick .ph { width: 76px; height: 76px; border-radius: 2px; border: 1.5px dashed var(--line); background: var(--card); display: grid; place-items: center; overflow: hidden; flex: none; }
.photo-pick .ph img { width: 100%; height: 100%; object-fit: cover; }
.stepcard { border: 1.5px solid var(--line); border-radius: 2px; background: var(--card); padding: 12px 14px 14px; margin-top: -1.5px; }
.x.sm { width: 32px; height: 32px; }

/* ── 図表 */
.radar { display: block; margin: 8px auto 0; max-width: 100%; }
.radar .grid, .line .grid { fill: none; stroke: var(--hair); stroke-width: 1; }
.radar .shape { fill: var(--warm); fill-opacity: .5; stroke: var(--mark); stroke-width: 2; stroke-linejoin: miter; }
.radar .shape2 { fill: var(--hot); fill-opacity: .12; stroke: var(--hot); stroke-width: 2; stroke-dasharray: 5 4; }
.radar text { fill: var(--sub); font-size: 11px; font-weight: 700; }
.legend { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; font-size: 12px; color: var(--sub); font-weight: 700; }
.legend i { display: inline-block; width: 10px; height: 10px; margin-right: 5px; background: var(--warm); border: 1.5px solid var(--mark); }
.legend i.b { background: none; border: 1.5px dashed var(--hot); }
.ring { position: relative; display: inline-grid; place-items: center; flex: none; }
.ring svg { position: absolute; inset: 0; }
.ring-bg { stroke: var(--track); } .ring-fg { stroke: var(--warm); stroke-linecap: butt; transition: stroke-dashoffset .6s ease; }
.ring-in { position: relative; font-weight: 900; font-size: 13px; line-height: 1; display: grid; place-items: center; font-family: var(--f-head); }
.line .ma { fill: none; stroke: var(--mark); stroke-width: 2.5; stroke-linejoin: round; }
.line .area { fill: var(--warm); opacity: .35; }
.line .dot { stroke: var(--mark); stroke-width: 1; }
.wheel { display: block; width: 100%; max-width: 380px; margin: 4px auto 0; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.wheel .wcat { fill: var(--c); }
.wheel .wcat-t { fill: #fff; font-size: 10.5px; font-weight: 900; pointer-events: none; }
.wheel .seg { cursor: pointer; outline-offset: -2px; }
.wheel .seg path { fill: color-mix(in srgb, var(--c) 24%, var(--card)); stroke: var(--bg); stroke-width: 1.5; transition: fill .12s; }
.wheel .seg text { fill: var(--ink); font-size: 11px; font-weight: 500; pointer-events: none; }
.wheel .seg.on path { fill: var(--c); }
.wheel .seg.on text { fill: #fff; font-weight: 900; }
.wheel-c { fill: var(--accent); stroke: var(--edge); stroke-width: 1.5; }
.wheel-n { font-family: var(--f-head); font-weight: 700; font-size: 28px; fill: var(--accent-ink); }
.wheel-l { font-size: 8.5px; font-weight: 700; fill: var(--accent-ink); }
.nums { display: grid; grid-template-columns: repeat(4, 1fr); border: 1.5px solid var(--line); background: var(--card); margin-top: 12px; }
.nums div { padding: 10px 6px; text-align: center; min-width: 0; }
.nums div + div { border-left: 1.5px solid var(--line); }
.nums span { display: block; font-size: 10.5px; font-weight: 700; color: var(--sub); }
.nums b { font-family: var(--f-head); font-weight: 700; font-size: 24px; line-height: 1.25; letter-spacing: -.03em; }
.nums b small { font-size: 12px; margin-left: 1px; letter-spacing: 0; }
.nums.two { grid-template-columns: 1fr 1fr; }
.nums.two div { padding: 10px; text-align: left; }
.nums.two div:nth-child(3) { border-left: 0; }
.nums.two div:nth-child(n+3) { border-top: 1.5px solid var(--line); }
.nums.two b { font-family: var(--f-body); font-weight: 900; font-size: 15px; letter-spacing: 0; }

/* ── シート */
.sheet { position: fixed; inset: 0; z-index: 10; background: var(--bg); overflow-y: auto; overscroll-behavior: contain; animation: sheetIn .22s cubic-bezier(.2, .8, .3, 1); }
@keyframes sheetIn { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-inner { max-width: 560px; margin: 0 auto; padding: 0 16px 130px; }
.sheet-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 -16px 14px; position: sticky; top: 0; background: var(--bg); padding: 10px 16px; z-index: 2; border-bottom: 1.5px solid var(--line); }
.sheet-top h2 { font-weight: 900; font-size: 15px; letter-spacing: .06em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x { background: var(--card); border: 1.5px solid var(--line); border-radius: 2px; width: 40px; height: 40px; display: grid; place-items: center; flex: none; }
.savebar { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1.5px solid var(--line); z-index: 3; }
.savebar .btn { max-width: 524px; margin: 0 auto; display: flex; width: calc(100% - 4px); }

/* ── レシピ作りの道順（順番に聞いていく） */
.wiz { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 14px; padding: 0 16px 2px; scrollbar-width: none; }
.wiz::-webkit-scrollbar { display: none; }
.wz { flex: none; display: flex; align-items: center; gap: 7px; border: 1.5px solid var(--line); background: var(--card); color: var(--sub); border-radius: 2px; padding: 7px 12px; font-size: 12.5px; font-weight: 700; min-height: 42px; }
.wz span { display: inline-flex; align-items: center; justify-content: center; width: 19px; height: 19px; border-radius: 50%; background: var(--track); color: var(--ink); font-size: 10.5px; font-weight: 900; font-family: var(--f-mono); }
.wz.did { color: var(--ink); }
.wz.did span { background: var(--mark); color: var(--accent-ink); }
.wz.on { background: var(--accent); color: var(--accent-ink); border-color: var(--edge); box-shadow: var(--hard-s); }
.wz.on span { background: var(--accent-ink); color: var(--accent); }
.wiz-h { font-weight: 900; font-size: 17px; margin: 0 0 12px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.wiz-h small { color: var(--sub); font-family: var(--f-mono); font-size: 11.5px; font-weight: 700; letter-spacing: .06em; }
.navbar { display: flex; gap: 10px; max-width: 524px; margin: 0 auto; }
.savebar .navbar .btn { max-width: none; width: auto; margin: 0; flex: 1; min-width: 0; }
.savebar .navbar .btn.ghost { flex: 0 0 33%; }

/* ── 手に持って使うとき */
@media (max-width: 430px) {
  .grid3 { grid-template-columns: 1fr 1fr; }
  .grid3 .f { white-space: normal; }
  .chip { min-height: 44px; padding: 8px 13px; }
  .btn.small { min-height: 44px; }
  .wiz-h { font-size: 16px; }
  .sheet-inner { padding-bottom: 140px; }
}
.q { font-weight: 900; font-size: 26px; margin: 8px 0 14px; text-align: center; letter-spacing: -.01em; }

/* ── 詳細 */
.d-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 2px; border: 1.5px solid var(--line); display: block; margin-bottom: 14px; }
.d-face { text-align: center; line-height: 1; margin-top: 4px; }
.d-title { text-align: center; font-weight: 900; font-size: 27px; margin-top: 6px; letter-spacing: -.01em; line-height: 1.35; }
.d-sub { text-align: center; color: var(--sub); font-size: 12.5px; margin-bottom: 14px; }
.kv { display: grid; grid-template-columns: 82px 1fr; gap: 6px 10px; font-size: 14px; }
.kv dt { color: var(--sub); font-size: 12.5px; font-weight: 700; padding-top: 1px; } .kv dd { margin: 0; font-weight: 700; }
.hint { background: var(--soft); border-left: 6px solid var(--mark); padding: 12px 14px; font-size: 13.5px; margin-top: 10px; }
.hint b { display: block; }
.hint ul { margin: 4px 0 0; padding-left: 1.2em; }
.quote { white-space: pre-wrap; }

/* ── 手順・抽出モード */
.steps { margin: 0; padding: 0; list-style: none; }
.steps li { display: grid; grid-template-columns: 54px 1fr; gap: 10px; padding: 11px 10px; font-size: 14px; align-items: start; border-bottom: 1.5px dashed var(--hair); }
.steps li:last-child { border-bottom: 0; }
.st-t { font-family: var(--f-mono); font-weight: 700; font-size: 13px; padding-top: 2px; }
.st-b b { font-size: 15px; }
.st-w { margin-left: 8px; font-weight: 900; }
.vb { display: inline-block; font-family: var(--f-mono); font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 0 6px; margin-left: 8px; border: 1.5px solid var(--ink); vertical-align: 1px; }
.vb.o { background: var(--warm); color: var(--accent-ink); border-color: var(--warm); }
.vb.c { background: none; color: var(--ink); }
.st-b small { font-family: var(--f-mono); color: var(--sub); margin-left: 6px; font-size: 11.5px; }
.st-m { display: block; font-size: 12.5px; font-weight: 700; min-height: 0; }
.st-n { display: block; font-size: 12.5px; color: var(--sub); }
.steps li.now { background: var(--accent); color: var(--accent-ink); border-bottom-style: solid; border-color: var(--edge); }
.steps li.now * { color: inherit; }
.steps li.done { opacity: .35; }
.howto { margin: 0; padding: 0; list-style: none; counter-reset: h; border: 1.5px solid var(--line); background: var(--card); }
.howto li { counter-increment: h; display: grid; grid-template-columns: 34px 1fr; gap: 8px; padding: 11px 12px; font-size: 14.5px; }
.howto li + li { border-top: 1.5px dashed var(--hair); }
.howto li::before { content: counter(h, decimal-leading-zero); font-family: var(--f-mono); font-weight: 700; font-size: 12px; padding-top: 3px; color: var(--sub); }
.stage { position: relative; display: grid; place-items: center; margin: 8px auto 0; width: 260px; height: 260px; }
.stage .ring { position: absolute; inset: 0; width: 260px !important; height: 260px !important; }
.stage .ring-fg { transition: stroke-dashoffset .25s linear; }
.clock { font-family: var(--f-head); font-weight: 700; font-size: 68px; font-variant-numeric: tabular-nums; letter-spacing: -.04em; line-height: 1.05; position: relative; text-align: center; }
.clock small { display: block; font-family: var(--f-mono); font-size: 11px; letter-spacing: .04em; color: var(--sub); font-weight: 400; }
.clock b { display: table; margin: 4px auto !important; font-size: 22px; letter-spacing: -.02em; background: var(--accent); color: var(--accent-ink); padding: 0 8px; margin: 4px 0; }
.now-card { text-align: center; margin-top: 12px; }
.now-card .muted { font-family: var(--f-mono); font-size: 11.5px; }
.now-card .big { font-weight: 900; font-size: 24px; line-height: 1.4; }
.now-card #bNote { font-size: 13.5px; }
.now-card #bNote:empty, .now-card .st-m:empty { display: none; }
.server { height: 16px; border: 1.5px solid var(--line); background: var(--card); overflow: hidden; margin-top: 12px; }
.server i { display: block; height: 100%; width: 0; background: var(--mark); transition: width .25s linear; }

/* ── みんな */
.post { display: block; width: 100%; text-align: left; background: var(--card); border: 1.5px solid var(--line); border-radius: 2px; padding: 12px; margin-top: -1.5px; color: var(--ink); }
.post .t { font-weight: 900; font-size: 16px; line-height: 1.35; }
.post .s { font-size: 12px; color: var(--sub); }
.post .s.q { margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pmeta { display: flex; gap: 12px; align-items: center; margin-top: 10px; font-family: var(--f-mono); font-size: 12px; color: var(--sub); }
.pmeta span { display: inline-flex; gap: 4px; align-items: center; }
.pmeta .on { color: var(--hot); } .pmeta .on .ic { fill: currentColor; }
.prank { display: flex; gap: 8px; align-items: flex-start; }
.prank > .st-no { margin-top: 12px; }
.prank > .post { flex: 1; min-width: 0; }
.cmt { border-top: 1.5px solid var(--hair); padding: 10px 0; }
.cmt:first-child { border-top: 0; padding-top: 0; }
.cmt b { font-size: 13px; }

.cmp { margin-top: 14px; }
.cmp:first-child { margin-top: 0; }
.cmp .bar small { color: var(--sub); font-weight: 400; }

/* ── ロースター・レシピをくらべる行 */
.rrow { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; background: none; border: 0; border-top: 1.5px solid var(--hair); padding: 10px 0; color: var(--ink); }
.rrow:first-child { border-top: 0; }
.rrow > .grow { background: none; border: 0; color: inherit; display: block; min-width: 0; }
.rrow b { display: block; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rrow .s { display: block; font-size: 12px; color: var(--sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rrow.best b::after { content: 'BEST'; font-family: var(--f-mono); font-size: 10px; background: var(--accent); color: var(--accent-ink); padding: 1px 5px; margin-left: 6px; vertical-align: 2px; }
.star { flex: none; width: 38px; height: 38px; display: grid; place-items: center; background: none; border: 1.5px solid var(--line); border-radius: 2px; color: var(--sub); }
.star.on { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.star.on .ic { fill: currentColor; }
.st-no.rank { background: var(--accent); color: var(--accent-ink); font-size: 14px; padding: 2px 8px; }
#codeOut, #codeIn { word-break: break-all; }

/* ── 豆の棚 */
.bean { display: block; width: 100%; text-align: left; background: var(--card); border: 1.5px solid var(--line); border-radius: 2px; padding: 14px; margin-top: -1.5px; }
.bean .t { font-weight: 900; } .bean .s { font-size: 12px; color: var(--sub); }
.fresh { height: 10px; margin-top: 12px; position: relative; border: 1.5px solid var(--line); background: linear-gradient(90deg, #b4a995 0 10%, #7b8b5e 11% 59%, #c49a4e 60% 98%, #8f4a2a 100%); }
.fresh i { position: absolute; top: -6px; width: 8px; height: 19px; background: var(--ink); border: 1.5px solid var(--bg); transform: translateX(-50%); }
.fk { font-size: 12.5px; font-weight: 900; }
.fk.peak { background: var(--accent); color: var(--accent-ink); padding: 0 8px; } .fk.soon { color: var(--hot); } .fk.old { color: var(--warn); } .fk.rest { color: var(--sub); }

/* ── まなぶ */
.cats { display: grid; grid-template-columns: repeat(3, 1fr); border: 1.5px solid var(--line); background: var(--card); }
.cat { background: none; border: 0; border-right: 1.5px solid var(--line); border-bottom: 1.5px solid var(--line); padding: 14px 4px 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 900; margin: 0 -1.5px -1.5px 0; }
.cat.on { background: var(--accent); color: var(--accent-ink); }
.cat.on .muted { color: var(--accent-ink); }
.cat .ring-in { font-size: 20px; }
.tools { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.tool { background: var(--card); border: 1.5px solid var(--line); border-radius: 2px; padding: 14px; text-align: left; display: flex; flex-direction: column; gap: 2px; color: var(--ink); }
.tool + .tool { margin-left: -1.5px; }
.tool .ic { margin-bottom: 6px; }
.tool b { font-size: 15px; } .tool span { font-size: 12px; color: var(--sub); line-height: 1.5; }
.lesson { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; background: var(--card); border: 1.5px solid var(--line); border-radius: 2px; padding: 12px 14px; margin-top: -1.5px; }
.lesson .ck, .check .ck { width: 26px; height: 26px; border-radius: 2px; border: 1.5px solid var(--line); display: grid; place-items: center; flex: none; color: transparent; }
.lesson.done .ck, .check.on .ck { background: var(--accent); border-color: var(--edge); color: var(--accent-ink); }
.l-title { font-weight: 900; font-size: 30px; margin: 2px 0 14px; line-height: 1.3; letter-spacing: -.01em; }
.l-body { font-size: 16px; line-height: 2; }
.l-point { background: var(--accent); color: var(--accent-ink); border: 1.5px solid var(--edge); padding: 12px 14px; margin: 18px 0; font-weight: 900; box-shadow: var(--hard); }
.l-point small { display: block; font-family: var(--f-mono); font-weight: 700; font-size: 10.5px; letter-spacing: .12em; }
.opt { display: block; width: 100%; text-align: left; background: var(--card); border: 1.5px solid var(--line); border-radius: 2px; padding: 13px 14px; margin-top: -1.5px; min-height: 52px; font-weight: 700; }
.opt.ok { background: var(--accent); color: var(--accent-ink); border-color: var(--edge); font-weight: 900; position: relative; z-index: 1; }
.opt.ng { color: var(--warn); text-decoration: line-through; }
.compass { display: grid; grid-template-columns: 1fr 1fr; }
.compass button { background: var(--card); border: 1.5px solid var(--line); border-radius: 2px; padding: 12px 8px; font-size: 13px; font-weight: 700; min-height: 76px; margin: 0 -1.5px -1.5px 0; }
.compass button i { display: block; font-style: normal; font-size: 22px; }
.gloss { padding: 11px 2px; border-bottom: 1.5px dashed var(--hair); }
.gloss b { display: block; }
.gloss span { font-size: 13.5px; color: var(--sub); }
.qbar { display: flex; gap: 4px; margin: 4px 0 16px; }
.qbar i { flex: 1; height: 8px; background: var(--soft); border: 1.5px solid var(--line); }
.qbar i.ok { background: var(--accent); } .qbar i.ng { background: var(--hot); } .qbar i.cur { background: var(--ink); }

/* ── わたし */
.level { display: flex; align-items: center; gap: 16px; }
.level .name { font-weight: 900; font-size: 24px; line-height: 1.35; letter-spacing: -.01em; }
.insight { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1.5px dashed var(--hair); font-size: 14px; }
.insight:last-child { border: 0; padding-bottom: 0; } .insight:first-child { padding-top: 0; }
.insight .ic { margin-top: 3px; }
.insight b { background: var(--accent); color: var(--accent-ink); padding: 0 4px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; font-family: var(--f-mono); font-size: 11.5px; }
.cal .w { color: var(--sub); font-family: var(--f-body); font-weight: 700; }
.cal .d { aspect-ratio: 1; display: grid; place-items: center; background: var(--soft); color: var(--sub); }
.cal .d.has { background: var(--accent); color: var(--accent-ink); font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--edge); }
.cal .d.has.lv2 { background: var(--soft); box-shadow: inset 0 0 0 2px var(--mark); color: var(--ink); }
.cal .d.has.lv1 { background: var(--soft); box-shadow: inset 0 0 0 1.5px var(--sub); color: var(--ink); }
.cal .d.today { outline: 2px solid var(--hot); outline-offset: 1px; }
.cal .d.off { background: none; }
.bar { display: grid; grid-template-columns: 96px 1fr 38px; gap: 8px; align-items: center; font-size: 13px; font-weight: 700; margin-top: 6px; }
.bar > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .b { height: 12px; background: var(--soft); overflow: hidden; }
.bar .b i { display: block; height: 100%; background: var(--c, var(--mark)); }
.bar span:last-child { text-align: right; color: var(--sub); font-family: var(--f-mono); font-size: 11.5px; font-weight: 400; }
.stamps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 8px; }
.stamp { aspect-ratio: 1; border-radius: 50%; border: 1.5px dashed var(--hair); display: grid; place-items: center; text-align: center; font-size: 11px; font-weight: 700; line-height: 1.3; color: var(--sub); padding: 4px; }
.stamp.on { border: 2px solid var(--edge); background: var(--accent); color: var(--accent-ink); font-weight: 900; transform: rotate(var(--r, -6deg)); }
.stamp small { display: block; font-size: 8px; font-weight: 500; }

/* ── カフェ開業 */
.sim-row { margin-top: 12px; }
.sim-row .row { justify-content: space-between; font-size: 12.5px; font-weight: 700; color: var(--sub); }
.sim-row b { color: var(--ink); font-family: var(--f-head); font-size: 17px; }
.money { text-align: center; padding: 6px 0 2px; }
.money .v { display: inline-block; font-family: var(--f-head); font-weight: 700; font-size: 46px; line-height: 1.2; letter-spacing: -.04em; padding: 0 10px; }
.money .v.plus { background: var(--accent); color: var(--accent-ink); } .money .v.minus { background: var(--warn); color: var(--on-warn); }
.stack { display: flex; height: 22px; overflow: hidden; margin: 12px 0 8px; background: var(--soft); border: 1.5px solid var(--line); }
.stack i { display: block; height: 100%; transition: width .2s; }
.keys { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; font-weight: 700; color: var(--sub); }
.keys i { display: inline-block; width: 9px; height: 9px; margin-right: 4px; }
.menu-card { background: var(--card); border: 1.5px solid var(--line); padding: 26px 22px; box-shadow: var(--hard); }
.menu-card h3 { font-weight: 900; font-size: 26px; text-align: center; letter-spacing: .04em; line-height: 1.3; }
.menu-card .sub { text-align: center; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .4em; color: var(--sub); margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1.5px solid var(--line); }
.menu-line { display: flex; align-items: baseline; gap: 8px; margin-top: 12px; font-weight: 900; font-size: 16px; }
.menu-line .dots { flex: 1; border-bottom: 2px dotted var(--sub); transform: translateY(-4px); }
.menu-line span:last-child { font-family: var(--f-head); }
.menu-meta { font-size: 11.5px; color: var(--sub); display: flex; gap: 8px; align-items: center; }
.menu-meta button { border: 0; background: none; color: var(--sub); text-decoration: underline; padding: 0; font-size: 11.5px; }
.check { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; background: none; border: 0; padding: 11px 2px; border-bottom: 1.5px dashed var(--hair); font-weight: 700; }
.check:last-child { border-bottom: 0; }
.check.on span:last-child { color: var(--sub); text-decoration: line-through; }

/* ── ひとこと通知・演出 */
.toast { position: fixed; left: 50%; bottom: 160px; transform: translateX(-50%); background: var(--accent); color: var(--accent-ink); border: 2px solid var(--edge); padding: 9px 18px; border-radius: 2px; z-index: 30; font-size: 13.5px; font-weight: 900; box-shadow: var(--hard-s); max-width: calc(100% - 32px); text-align: center; }
.pop { animation: pop .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pop { from { transform: scale(.5) rotate(-20deg); opacity: 0; } to { transform: none; opacity: 1; } }
.rain { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 20; }
.rain i { position: absolute; top: -30px; width: 14px; height: 20px; border-radius: 50%; background: var(--warm); border: 1.5px solid var(--edge); animation: fall linear forwards; }
.rain i::after { content: ''; position: absolute; left: 5px; top: 2px; bottom: 2px; width: 1.5px; background: var(--edge); transform: rotate(8deg); }
@keyframes fall { to { transform: translateY(110vh) rotate(540deg); opacity: 0; } }
.welcome { padding-top: 5vh; }
.welcome .cup-svg { margin: 0; }
.welcome h2 { font-family: var(--f-head); font-weight: 700; font-size: 64px; letter-spacing: -.05em; line-height: 1; text-transform: uppercase; margin-top: 8px; }
.welcome .lead { display: inline-block; font-weight: 900; font-size: 18px; margin: 10px 0 20px; background: var(--accent); color: var(--accent-ink); padding: 2px 10px; }
.welcome ul { padding: 0; margin: 0 0 22px; border-top: 1.5px solid var(--line); }
.welcome li { list-style: none; display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1.5px dashed var(--hair); }
.welcome li .ic { margin-top: 3px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .steam path { opacity: .6; } }
