:root {
  --bg: #F7F4EE;
  --surface: #FFFFFF;
  --ink: #222222;
  --muted: #6B6862;
  --line: #E4DFD6;
  --ph: #E9E3D8;
  --accent: #B5412F;
  --primary: #2F4858;
  --serif: 'Hiragino Mincho ProN', 'Yu Mincho', 'Noto Serif JP', 'Songti SC', 'Noto Serif SC', serif;
  --sans: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Noto Sans JP', 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #1A1917; --surface: #242320; --ink: #F1EEE8; --muted: #A9A398; --line: #3A3833; --ph: #322F2A; }
}
:root[data-theme="dark"] { --bg: #1A1917; --surface: #242320; --ink: #F1EEE8; --muted: #A9A398; --line: #3A3833; --ph: #322F2A; }

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); line-height: 1.7; letter-spacing: .02em; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
input, textarea { font: inherit; font-size: 16px; color: var(--ink); }

.app { max-width: 430px; min-height: 100vh; margin: 0 auto; padding: 0 16px 96px; }
.serif { font-family: var(--serif); letter-spacing: .05em; }
.muted { color: var(--muted); font-size: 12px; }
.sub { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; letter-spacing: .03em; }
.lang { position: fixed; top: 16px; right: 16px; z-index: 5; display: flex; border: 1px solid var(--ink); border-radius: 2px; overflow: hidden; background: var(--surface); }
.lang button { width: 30px; height: 28px; border: 0; background: transparent; cursor: pointer; font-size: 12px; }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }

.seal { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--accent); white-space: nowrap; }
.seal b { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border: 1px solid var(--accent); border-radius: 2px; font-family: var(--serif); font-weight: 400; }
.ph { background: var(--ph); color: var(--muted); display: flex; align-items: center; justify-content: center; font-size: 11px; border-radius: 2px; }

.search-box { margin-top: 52px; height: 44px; border-bottom: 1px solid var(--ink); display: flex; align-items: center; gap: 10px; }
.search-box input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; padding: 0; height: 40px; }
.genres { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 20px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); background: var(--surface); }
.genres button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 12px; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: transparent; cursor: pointer; text-align: left; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin: 28px 0 4px; }
.section-head h2 { margin: 0; font-family: var(--serif); font-size: 18px; font-weight: 400; }

.card { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.card .thumb { width: 84px; height: 84px; flex: none; }
.card .body { flex: 1; min-width: 0; }
.row { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.name { font-family: var(--serif); font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.score { font-family: var(--serif); font-size: 18px; font-variant-numeric: tabular-nums; }
.meta { margin-top: 8px; font-size: 12px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }

.tabbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 430px; height: 80px; display: flex; background: var(--surface); border-top: 1px solid var(--line); padding: 10px 8px 24px; z-index: 4; }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12px; color: var(--muted); }
.tabbar a[aria-current="page"] { color: var(--primary); font-weight: 600; }
.tabbar .ico { font-size: 18px; line-height: 1; }

.back { width: 36px; height: 36px; margin: 16px 0 0 -8px; border: 0; background: none; cursor: pointer; font-size: 20px; }
.hero { height: 240px; margin: 0 -16px; border-radius: 0; }
.stats { display: flex; gap: 20px; align-items: flex-end; padding: 18px 0; border-bottom: 1px solid var(--line); }
.bigscore { font-family: var(--serif); font-size: 44px; line-height: 1; font-variant-numeric: tabular-nums; }
.bars { flex: 1; display: flex; flex-direction: column; gap: 9px; font-size: 12px; }
.bar-row { display: flex; align-items: center; gap: 8px; }
.bar-row .lbl { width: 52px; }
.bar { flex: 1; height: 2px; background: var(--line); }
.bar i { display: block; height: 100%; background: var(--primary); }
.info { display: grid; grid-template-columns: 72px 1fr; margin-top: 4px; border-top: 1px solid var(--line); }
.info > div { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.info > div.k { color: var(--muted); font-size: 12px; }

.chips { display: flex; gap: 18px; margin-top: 8px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.chip { padding: 6px 0; border: 0; border-bottom: 1px solid transparent; background: none; color: var(--muted); font-size: 13px; cursor: pointer; white-space: nowrap; }
.chip[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.review { padding: 16px 0; border-bottom: 1px solid var(--line); }
.review p { margin: 10px 0 0; font-size: 14px; line-height: 1.75; }
.reply { margin-top: 12px; border-left: 1px solid var(--line); padding-left: 12px; font-size: 12px; }
.stars { color: var(--accent); letter-spacing: 1px; font-size: 11px; }

.bottom-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 430px; display: flex; gap: 10px; padding: 12px 16px 24px; background: var(--surface); border-top: 1px solid var(--line); z-index: 4; }
.btn-ghost { width: 96px; height: 46px; border: 1px solid var(--ink); border-radius: 2px; background: var(--surface); cursor: pointer; font-size: 13px; }
.btn-primary { flex: 1; height: 46px; border: 0; border-radius: 2px; background: var(--primary); color: #fff; cursor: pointer; font-size: 15px; font-weight: 600; }
.btn-primary:disabled { opacity: .5; cursor: default; }

.field { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; border-bottom: 1px solid var(--line); }
.field .lbl { font-size: 13px; min-width: 72px; }
.star { width: 28px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; color: #B9B1A6; font-size: 22px; line-height: 1; }
.star[aria-checked="true"] { color: var(--accent); }
.textarea { display: block; width: 100%; height: 112px; margin-top: 8px; border: 1px solid #C9C2B5; border-radius: 2px; padding: 10px 12px; background: var(--surface); resize: none; }
.photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.photos .ph, .photos button { height: 72px; }
.photos button { border: 1px dashed #A9A196; border-radius: 2px; background: transparent; cursor: pointer; color: var(--muted); font-size: 10px; }
.receipt { margin-top: 22px; padding: 16px; border: 1px solid #C9C2B5; border-radius: 2px; background: var(--surface); }
.empty { padding: 48px 0; text-align: center; color: var(--muted); font-size: 13px; }
.notice { margin: 0 0 4px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
