/* MON CRU — 暗い店内でもまぶしくない、ボトルの深緑を地にした配色 */
:root {
  --bg: #0d1412; --surface: #151e1b; --surface2: #1c2824; --line: #2b3a34; --line2: #3a4d45;
  --text: #edf0ea; --muted: #9fb0a6; --faint: #6f8278;
  --wine: #c4405f; --wine-deep: #8f2843; --gold: #d6b36c; --rose: #e7a0ab; --straw: #e3d38a; --amber: #d98e3f;
  --ok: #7fc8a0; --warn: #e2b25c;
  --label: "Didot", "Bodoni 72", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", sans-serif;
  --r: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--sans); padding-bottom: calc(72px + env(safe-area-inset-bottom)); overflow-wrap: anywhere; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }

.top { display: flex; align-items: baseline; gap: 10px; padding: calc(14px + env(safe-area-inset-top)) 16px 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(13, 20, 18, .94); backdrop-filter: blur(8px); z-index: 5; }
.logo { font: 500 22px/1 var(--label); letter-spacing: .22em; }
.logo-sub { font-size: 12px; color: var(--muted); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
main { max-width: 720px; margin: 0 auto; padding: 16px 16px 24px; outline: none; }
section { margin-bottom: 28px; }
h2 { font-size: 13px; font-weight: 600; letter-spacing: .12em; color: var(--muted); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }
h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .center { text-align: center; }
.note { font-size: 13px; color: var(--muted); }

/* ボタン */
.btn, .primary, .ghost { min-height: 44px; padding: 8px 16px; border-radius: var(--r); border: 1px solid var(--line2); background: var(--surface2); }
.primary { background: var(--wine); border-color: var(--wine); color: #fff; font-weight: 600; }
.primary:disabled, .btn:disabled { opacity: .55; cursor: default; }
.ghost { background: transparent; }
.ghost.small, .btn.small { min-height: 36px; padding: 4px 12px; font-size: 13px; }
.wide { width: 100%; }
.danger { color: #f0a0a8; border-color: #6b3540; }
.linklike { background: none; border: 0; padding: 0; color: var(--gold); text-decoration: underline; min-height: 0; }
a { color: var(--gold); }

/* 下のタブ */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); background: #0a100e; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 6; }
.tabs button { background: none; border: 0; min-height: 60px; font-size: 11px; color: var(--faint); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 4px 0; }
.tabs button[aria-current="page"] { color: var(--text); }
.ti { width: 22px; height: 22px; border-radius: 50%; border: 2px solid currentColor; position: relative; }
.tabs button[aria-current="page"] .ti { background: var(--wine); border-color: var(--gold); }
.ti-log { border-radius: 4px; } .ti-board { border-radius: 4px 4px 11px 11px; } .ti-som { border-radius: 11px 11px 4px 4px; } .ti-shop { border-radius: 2px 11px 2px 11px; }

/* 入力 */
label, .lbl { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
input[type="text"], input[type="email"], input[type="date"], input[type="number"], input[type="search"], select, textarea {
  width: 100%; min-height: 44px; padding: 8px 12px; border-radius: var(--r); border: 1px solid var(--line2); background: #0f1715; min-width: 0; }
textarea { min-height: 112px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--faint); }
.field { margin-bottom: 14px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cols > * { min-width: 0; }
.row { display: flex; gap: 8px; align-items: stretch; }
.row > input, .row > select { flex: 1; }
.row > button { flex: none; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { min-height: 40px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line2); background: transparent; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.seg button[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 600; }
.sugg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sugg button { min-height: 32px; padding: 2px 10px; font-size: 13px; border-radius: 999px; border: 1px dashed var(--line2); background: transparent; color: var(--muted); }
input[type="range"] { width: 100%; accent-color: var(--wine); min-height: 32px; }
.slider { display: grid; grid-template-columns: 52px 1fr 20px; gap: 8px; align-items: center; font-size: 13px; }
.check { display: flex; align-items: center; gap: 8px; min-height: 40px; color: var(--text); font-size: 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--wine); }

/* ワインの色の丸 */
.sw { width: 18px; height: 18px; border-radius: 50%; flex: none; display: inline-block; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .22); }
.sw-red { background: radial-gradient(circle at 40% 40%, #a02a48, #4d1022); }
.sw-white { background: radial-gradient(circle at 40% 40%, #f2e9a8, #c9b659); }
.sw-rose { background: radial-gradient(circle at 40% 40%, #f6b7bd, #d9808e); }
.sw-sparkling { background: radial-gradient(circle at 30% 30%, #fff 0 8%, transparent 9%), radial-gradient(circle at 65% 55%, #fff 0 7%, transparent 8%), radial-gradient(circle at 40% 40%, #f5ecc0, #d4c377); }
.sw-orange { background: radial-gradient(circle at 40% 40%, #eeb062, #b96a1f); }
.sw-sweet { background: radial-gradient(circle at 40% 40%, #e2a23a, #7a4310); }
.sw-other { background: radial-gradient(circle at 40% 40%, #9fb0a6, #4c5c54); }

/* ランク */
.rank { font: 500 20px/1 var(--label); width: 36px; height: 36px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; flex: none; border: 1px solid var(--line2); color: var(--muted); }
.rank-S { background: var(--gold); border-color: var(--gold); color: #2a2008; }
.rank-A { background: var(--wine); border-color: var(--wine); color: #fff; }
.rank-B { background: transparent; border-color: var(--rose); color: var(--rose); }
.rank-C { border-color: var(--line2); color: var(--muted); }
.rank-D { border-color: var(--line); color: var(--faint); border-style: dashed; }
.rankpick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.rankpick button { border-radius: 8px; border: 1px solid var(--line2); background: transparent; padding: 8px 2px 6px; display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 68px; }
.rankpick button b { font: 500 24px/1 var(--label); }
.rankpick button span { font-size: 10px; line-height: 1.25; color: var(--muted); }
.rankpick button[aria-pressed="true"] { border-color: var(--gold); background: rgba(214, 179, 108, .14); }
.rankpick button[aria-pressed="true"] span { color: var(--text); }

/* 記録の行 */
.entry { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 2px; background: none; border: 0; border-bottom: 1px solid var(--line); text-align: left; min-height: 60px; }
.e-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.e-main b { font-weight: 600; font-size: 15px; line-height: 1.35; }
.e-main small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.day { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; font-size: 13px; color: var(--muted); padding: 16px 0 4px; border-bottom: 1px solid var(--line2); }
.day b { color: var(--text); font-weight: 600; }
.day span:last-child { flex: none; }

/* ホーム */
.banner { background: rgba(226, 178, 92, .12); border: 1px solid rgba(226, 178, 92, .45); border-radius: var(--r); padding: 10px 12px; font-size: 13px; margin-bottom: 16px; display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.banner button { flex: none; white-space: nowrap; }
.quick { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.best-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.best { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; min-width: 0; text-align: left; display: block; width: 100%; }
.quick .primary { margin-top: 10px; }
.best .k, .best .v, .best .d { display: block; }
.best .k { font-size: 11.5px; letter-spacing: .08em; color: var(--muted); }
.best .v { font: 500 26px/1.15 var(--label); margin: 4px 0 2px; }
.best .v small { font: 13px var(--sans); color: var(--muted); margin-left: 2px; }
.best .d { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.best.hero { grid-column: 1 / -1; display: flex; gap: 14px; align-items: center; border-color: rgba(214, 179, 108, .5); background: linear-gradient(135deg, rgba(214, 179, 108, .1), transparent 60%), var(--surface); }
.best.hero .big { font: 500 56px/1 var(--label); color: var(--gold); width: 56px; text-align: center; flex: none; }
.best.hero .v { font: 600 17px/1.35 var(--sans); }
.empty { text-align: center; padding: 36px 8px; }
.empty p { color: var(--muted); margin: 8px 0 18px; }
.empty .stack { display: flex; flex-direction: column; gap: 10px; max-width: 320px; margin: 0 auto; }

/* 格付け表 */
.tier { display: grid; grid-template-columns: 60px 1fr; border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 8px; background: var(--surface); overflow: hidden; }
.tier-S { border-color: rgba(214, 179, 108, .55); }
.tier .rail { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 10px 4px; background: var(--surface2); }
.tier .rail b { font: 500 30px/1 var(--label); }
.tier-S .rail b { color: var(--gold); } .tier-A .rail b { color: #e86c88; } .tier-B .rail b { color: var(--rose); }
.tier .rail span { font-size: 11px; color: var(--muted); }
.tier .chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; align-content: flex-start; min-height: 60px; min-width: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 36px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line2); background: #0f1715; font-size: 13px; text-align: left; line-height: 1.3; }
.chip .sw { width: 12px; height: 12px; }
.tier .none { color: var(--faint); font-size: 13px; align-self: center; }
.tier-label { font-size: 12px; color: var(--muted); margin: 14px 0 4px; }
.bars { display: grid; gap: 8px; }
.bar { display: grid; grid-template-columns: minmax(0, 1fr) 72px auto; gap: 10px; align-items: center; font-size: 14px; }
.bar .track { display: block; height: 8px; background: var(--surface2); border-radius: 4px; overflow: hidden; }
.bar .fill { display: block; height: 100%; background: var(--wine); border-radius: 4px; width: 0; }
.bar .fill.lead { background: var(--gold); }
.bar .n { font-size: 12.5px; color: var(--muted); text-align: right; white-space: nowrap; }

/* ソムリエ */
.subtabs { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line2); border-radius: var(--r); overflow: hidden; margin-bottom: 18px; }
.subtabs button { min-height: 44px; background: transparent; border: 0; font-size: 14px; color: var(--muted); border-right: 1px solid var(--line2); padding: 4px; }
.subtabs button:last-child { border-right: 0; }
.subtabs button[aria-pressed="true"] { background: var(--surface2); color: var(--text); font-weight: 600; }
.taste { display: grid; grid-template-columns: 160px 1fr; gap: 12px; align-items: center; }
.radar { width: 100%; max-width: 180px; height: auto; display: block; }
.radar text { font-size: 11px; fill: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin-bottom: 10px; }
.card .head { display: flex; gap: 12px; align-items: flex-start; }
.card .head .t { flex: 1; min-width: 0; }
.card .head b { font-size: 16px; line-height: 1.35; display: block; }
.card .meta { font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; margin-top: 3px; }
.card .meta > span:not(.sw):not(.num) { flex: 1 1 0; min-width: 0; }
.card .meta > span.num { flex: 0 0 100%; }
.card .why { font-size: 14px; margin-top: 8px; }
.card .caution { font-size: 13px; color: var(--warn); margin-top: 4px; }
.card .foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.pick { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 4px; background: var(--gold); color: #2a2008; margin-bottom: 6px; }
.pick.adv { background: var(--ok); color: #082015; } .pick.val { background: var(--rose); color: #2a0d12; } .pick.over { background: transparent; border: 1px solid var(--line2); color: var(--muted); font-weight: 500; }
.ring { width: 52px; height: 52px; flex: none; }
.ring text { font: 600 15px var(--sans); fill: var(--text); }
.ring .bg { stroke: var(--surface2); } .ring .fg { stroke: var(--faint); }
.ring.hi .fg { stroke: var(--gold); } .ring.mid .fg { stroke: var(--wine); }
.photo-pick { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line2); }
.file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.filebtn { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text); font-size: 16px; margin: 0; }
.status { font-size: 12.5px; padding: 8px 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); margin-bottom: 14px; }
.status.err { border-color: #6b3540; color: #f0a0a8; }
.chat { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.msg { padding: 10px 12px; border-radius: 12px; max-width: 92%; white-space: pre-wrap; font-size: 15px; }
.msg.me { align-self: flex-end; background: var(--wine-deep); }
.msg.ai { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); }

/* お店 */
.shop { width: 100%; display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; padding: 12px 2px; background: none; border: 0; border-bottom: 1px solid var(--line); text-align: left; }
.shop .pos { font: 500 20px var(--label); color: var(--muted); text-align: center; }
.shop .nm { font-weight: 600; display: block; }
.shop .mt { font-size: 12.5px; color: var(--muted); display: block; }
.shop .sc { font: 500 28px/1 var(--label); text-align: right; }
.shop .sc small { display: block; font: 10.5px var(--sans); color: var(--muted); margin-top: 3px; }
.dist { display: flex; height: 6px; border-radius: 3px; overflow: hidden; margin-top: 6px; background: var(--surface2); max-width: 220px; }
.dist i { display: block; height: 100%; width: 0; }
.dist .dS { background: var(--gold); } .dist .dA { background: var(--wine); } .dist .dB { background: var(--rose); } .dist .dC { background: var(--line2); } .dist .dD { background: #26332e; }
.links { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; }

/* ダイアログ */
dialog { border: 1px solid var(--line2); background: var(--surface); color: var(--text); padding: 0; border-radius: 14px; width: min(560px, calc(100vw - 16px)); max-width: none; max-height: calc(100dvh - 24px); }
dialog::backdrop { background: rgba(0, 0, 0, .62); }
dialog[open] { display: flex; flex-direction: column; }
.d-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); flex: none; }
.d-head h3 { margin: 0; font-size: 16px; min-width: 0; }
.d-body { padding: 14px; overflow-y: auto; flex: 1; min-height: 0; }
.d-foot { display: flex; gap: 8px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); flex: none; }
.d-foot > * { flex: 1; min-width: 0; }
.d-foot .danger { flex: 0 0 auto; }
.confirm { width: min(360px, calc(100vw - 32px)); }
.confirm p { padding: 18px 16px 4px; }
.detail-photo { width: 100%; max-height: 300px; object-fit: contain; border-radius: 8px; background: #0a100e; margin-bottom: 12px; }
.kv { display: grid; grid-template-columns: 88px 1fr; gap: 6px 10px; font-size: 14px; margin: 12px 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; min-width: 0; }
.err-text { color: #f0a0a8; font-size: 13px; min-height: 1.3em; }

/* 公的な格付け */
.off-tag { display: inline-block; font-size: 11px; line-height: 1.55; padding: 0 6px; border: 1px solid rgba(214, 179, 108, .7); color: var(--gold); border-radius: 4px; white-space: nowrap; font-weight: 500; }
.off-line { display: flex; flex-wrap: wrap; gap: 4px; margin: 3px 0 2px; }
.chip-off { border-color: rgba(214, 179, 108, .6); }
.chip-mark { color: var(--gold); font-size: 10px; flex: none; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.offrow { width: 100%; background: none; border: 0; padding: 4px 0; text-align: left; min-height: 44px; }
.off-box { border: 1px solid rgba(214, 179, 108, .45); background: rgba(214, 179, 108, .07); border-radius: var(--r); padding: 10px 12px; margin: 12px 0; font-size: 14px; }
.off-box p + p { margin-top: 6px; }
.off-note { margin: 12px 0; }
.off-btn { display: inline-block; min-height: 44px; padding: 0 6px; }
.off-h { margin: 16px 0 4px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.off-foot { margin-top: 16px; }
.o-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 2px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; min-height: 52px; }
.o-item b { font-weight: 500; color: var(--muted); }
.o-item.done b { font-weight: 600; color: var(--text); }
.o-mark { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line2); flex: none; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; line-height: 1; color: #2a2008; }
.o-item.done .o-mark { background: var(--gold); border-color: var(--gold); }
.card-prev { display: block; width: min(100%, 300px); height: auto; aspect-ratio: 4 / 5; margin: 0 auto 14px; border-radius: 8px; background: #0a100e; border: 1px solid var(--line); }
.card-prev[hidden] { display: none; }
.card-wait { display: flex; align-items: center; justify-content: center; padding: 16px; text-align: center; }

/* ログインの画面(タブと設定は出さない)・同期の状態 */
body.out { padding-bottom: env(safe-area-inset-bottom); }
body.out .tabs, body.out .top button { display: none; }
.login { max-width: 420px; margin: 0 auto; padding: 28px 4px; display: grid; gap: 16px; }
.login-lead { font: 500 20px/1.4 var(--label); letter-spacing: .08em; text-align: center; }
.login .status { margin: 0; font-size: 14px; }
.linkbtn { display: flex; align-items: center; justify-content: center; text-decoration: none; min-height: 48px; }
.login-dev { border-top: 1px solid var(--line); padding-top: 16px; }
.acct { font-size: 15px; color: var(--text); font-weight: 600; }
.acct.ref { font-family: ui-monospace, Menlo, monospace; letter-spacing: .06em; user-select: all; -webkit-user-select: all; overflow-wrap: anywhere; }
/* 運営者からのお知らせ(画面の上。閉じられる) */
.notice { display: flex; align-items: flex-start; gap: 10px; max-width: 688px; margin: 12px auto 0; width: calc(100% - 32px); padding: 10px 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--warn); font-size: 13.5px; line-height: 1.6; }
.notice[hidden] { display: none; }
.notice p { flex: 1; min-width: 0; margin: 0; overflow-wrap: anywhere; white-space: pre-line; }
.notice b { display: block; font-size: 12px; color: var(--warn); }
.notice button { flex: none; }
.top .dot { position: relative; }
.top .dot::after { content: ""; position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }

#toast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 8px 16px; border-radius: 999px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 20; width: max-content; max-width: calc(100vw - 32px); text-align: center; }
#toast.show { opacity: 1; }

@media (max-width: 400px) {
  .taste { grid-template-columns: 1fr; justify-items: center; }
  .best .v { font-size: 23px; }
  .bar { grid-template-columns: minmax(0, 1fr) 52px auto; font-size: 13.5px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* 「また飲みたい」の印 */
.want { min-height: 44px; padding: 6px 16px; border-radius: 999px; border: 1px solid var(--line2); background: transparent; font-size: 14px; }
.want[aria-pressed="true"] { border-color: var(--rose); color: var(--rose); background: rgba(231, 160, 171, .1); font-weight: 600; }
.want-row { margin: 12px 0 0; }
.again-tag { display: inline-block; font-size: 11px; line-height: 1.55; padding: 0 6px; border: 1px solid rgba(231, 160, 171, .7); color: var(--rose); border-radius: 4px; white-space: nowrap; font-weight: 500; }
.chip-want { color: var(--rose); font-size: 11px; flex: none; }
.home-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.home-links .btn { flex: 1 1 150px; }
.empty.first { padding-bottom: 8px; }
.empty-sub { margin-top: 14px; }

/* 記録の一覧: 月の見出し(押すと畳める)・小さな写真・下に固定した記録ボタン */
.log { padding-bottom: 64px; }
.log-sum { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 44px; }
.fold-all { min-height: 44px; padding: 0 4px; font-size: 13px; }
.month-h { width: 100%; min-height: 48px; display: flex; align-items: center; gap: 8px; padding: 6px 10px; margin-top: 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); text-align: left; }
.month-h b { flex: 1; min-width: 0; font-size: 15px; }
.month-h .num { font-size: 12.5px; color: var(--muted); flex: none; }
.mk { width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); flex: none; margin: 0 4px 3px 2px; }
[aria-expanded="false"] > .mk { transform: rotate(-45deg); margin-bottom: 0; }
.e-photo { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line2); background: var(--surface2); flex: none; }
.fab { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(72px + env(safe-area-inset-bottom)); z-index: 4; min-height: 48px; padding: 8px 22px; border-radius: 999px; white-space: nowrap; box-shadow: 0 6px 18px rgba(0, 0, 0, .55); }
body.with-fab #toast { bottom: calc(136px + env(safe-area-inset-bottom)); }

/* 格付け表: 段を畳む */
button.rail { border: 0; color: inherit; min-height: 60px; width: 100%; }
.rail .mk { margin: 4px 0 0; }
.tier-shut { background: none; border: 0; text-align: left; padding: 10px; color: var(--muted); font-size: 13px; min-height: 60px; }

/* 記録フォーム: 必須の印・誤りのある欄・写真から入れた欄・「くわしく」 */
.req { display: inline-block; font-size: 11px; line-height: 1.5; padding: 0 6px; margin-left: 4px; border-radius: 4px; background: var(--wine); color: #fff; font-weight: 600; }
.field.bad .rankpick { outline: 2px solid #f0a0a8; outline-offset: 4px; border-radius: 8px; }
.field.bad input { border-color: #f0a0a8; }
.field .err-text { min-height: 0; margin-top: 8px; font-weight: 600; }
.read-tag { display: inline-block; font-size: 11px; line-height: 1.5; padding: 0 6px; margin-left: 4px; border-radius: 4px; border: 1px solid var(--ok); color: var(--ok); }
.field.got input { border-color: var(--ok); }
.field.got .seg button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ok); }
.photo-note { margin-top: 6px; }
.read-msg { margin: 8px 0 0; font-size: 13px; }
textarea.memo { min-height: 72px; }
details.more { border-top: 1px solid var(--line); margin-bottom: 14px; }
details.more > summary { min-height: 44px; display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; color: var(--gold); list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); flex: none; margin-left: 2px; }
details.more[open] > summary::before { transform: rotate(45deg); margin-bottom: 3px; }
details.more > .note { margin-bottom: 12px; }
.home-links { flex-direction: column; }
.home-links .btn { flex: none; }

/* 押す場所は 44px 以上 */
.ghost.small, .btn.small, .seg button, .sugg button { min-height: 44px; }
.linklike { min-height: 44px; display: inline-flex; align-items: center; }
.chip { min-height: 44px; }

/* 2 回目の直し */
.fab { left: auto; right: 16px; transform: none; width: 56px; height: 56px; min-height: 56px; padding: 0; border-radius: 50%; font-size: 28px; line-height: 1; display: flex; align-items: center; justify-content: center; bottom: calc(76px + env(safe-area-inset-bottom)); }
.log { padding-bottom: 84px; }
body.with-fab #toast { bottom: calc(144px + env(safe-area-inset-bottom)); }
.month-h.still { cursor: default; }
.below-note { margin: 0 0 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.want-note { margin-top: 6px; }
.reading { display: flex; align-items: center; gap: 10px; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line2); border-top-color: var(--gold); flex: none; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }
.warn-tag { display: inline-block; font-size: 11px; line-height: 1.5; padding: 0 6px; margin-left: 4px; border-radius: 4px; border: 1px solid var(--warn); color: var(--warn); }
.field.unsure .seg button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--warn); }
.tier { overflow: clip; }
.tier .rail { justify-content: flex-start; }
.rail-in { position: sticky; top: calc(76px + env(safe-area-inset-top)); display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; }
.d-head button { flex: none; white-space: nowrap; }
.kv { grid-template-columns: minmax(88px, max-content) 1fr; }
.kv dt { white-space: nowrap; }
.seg button { min-width: 44px; justify-content: center; }

/* ログインの画面: 預かるものの説明 */
.keep { border-top: 1px solid var(--line); padding-top: 14px; font-size: 13px; color: var(--muted); }
.keep h3 { font-size: 13px; color: var(--text); }
.keep ul { margin: 6px 0 4px; padding-left: 1.2em; display: grid; gap: 4px; }
.keep details.more { border-top: 0; margin-bottom: 0; }
a.contact { display: inline-flex; align-items: center; min-height: 44px; }
