* { box-sizing: border-box; }
:root {
  --paper: #fff8ee;
  --card: #fffdf7;
  --line: rgba(202, 164, 91, .34);
  --gold: #caa45b;
  --red: #9b2b25;
  --ink: #301b13;
  --muted: #806f5b;
  --soft: #fff1e4;
}
body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--paper), #f7ead7);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.splash {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: var(--paper);
  animation: splashFade 2s ease forwards;
}
.splash-card {
  width: min(360px, calc(100vw - 48px));
  padding: 34px 24px;
  border: 1px solid var(--gold);
  border-radius: 18px;
  background: var(--card);
  text-align: center;
  box-shadow: 0 22px 60px rgba(91, 29, 22, .12);
}
.seal {
  display: inline-block;
  padding: 8px 18px;
  border: 1px solid var(--gold);
  color: var(--red);
  font-weight: 900;
  letter-spacing: 6px;
}
.splash-bottle { width: 86px; height: 222px; margin: 28px auto 0; }
.bottle-cap { width: 30px; height: 16px; margin: auto; border-radius: 6px 6px 2px 2px; background: var(--gold); }
.bottle-neck { width: 24px; height: 48px; margin: auto; border-left: 2px solid var(--gold); border-right: 2px solid var(--gold); background: #fff4de; }
.bottle-body { position: relative; overflow: hidden; height: 148px; border: 2px solid var(--gold); border-radius: 10px 10px 18px 18px; background: #fffaf0; }
.bottle-label { position: absolute; z-index: 2; left: 10px; right: 10px; top: 42px; padding: 10px 4px; border: 1px solid var(--gold); background: var(--card); color: var(--red); }
.bottle-label strong { display: block; font-size: 14px; letter-spacing: 2px; }
.bottle-label span { color: #8d7350; font-size: 11px; }
.liquid { position: absolute; left: 0; right: 0; bottom: 0; height: 38%; background: linear-gradient(#c8463f, #7d211d); animation: liquidRise 1.6s ease both; }
.splash p { color: #8a6e45; letter-spacing: 4px; }
.app { width: min(960px, 100%); margin: 0 auto; padding: 18px 16px 104px; }
.topbar, .section-head, .page-head, .summary-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand, .eyebrow { color: var(--red); font-size: 13px; font-weight: 900; letter-spacing: 4px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 28px; margin-top: 4px; }
h2 { font-size: 32px; line-height: 1.18; }
h3 { font-size: 20px; }
p { color: var(--muted); line-height: 1.5; }
.top-pill, .metric, .status { flex: none; padding: 8px 12px; border-radius: 999px; background: var(--red); color: #fff8ee; font-size: 13px; font-weight: 900; }
.view { display: none; }
.view.active { display: block; }
.hero, .card, .category-card, .library-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,253,247,.94);
  box-shadow: 0 14px 34px rgba(94,48,25,.08);
}
.hero { margin-top: 18px; padding: 26px; background: linear-gradient(135deg, #fffdf7, #fff0d6 58%, #f8d2c9); }
.hero h2 { margin: 12px 0; }
.card { margin-top: 18px; padding: 20px; }
.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }
.category-card { padding: 18px; cursor: pointer; }
.category-card.active, .drink-option.active, .match-btn.active, .rank-row.me { border-color: var(--red); background: var(--soft); }
.category-name { font-size: 22px; font-weight: 900; }
.category-culture, .drink-detail, .muted, .rank-city, .record-meta, .verify-meta, .member-meta, .cellar-meta, .cellar-status { color: var(--muted); font-size: 13px; line-height: 1.45; }
.drink-list { display: grid; gap: 10px; margin-top: 16px; }
.drink-option, .rank-row, .record-line, .verify-row, .cellar-item {
  display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid rgba(202,164,91,.24); border-radius: 14px; background: #fffaf1;
}
.drink-mark, .rank-no, .bottle-icon, .cellar-icon { flex: none; display: grid; place-items: center; font-weight: 900; }
.drink-mark { width: 44px; height: 44px; border-radius: 14px; background: var(--red); color: #fff8ee; }
.drink-copy, .rank-person, .cellar-main, .verify-main { flex: 1; min-width: 0; }
.drink-name, .rank-name, .record-name, .verify-title, .cellar-name { font-weight: 900; }
.input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label span { display: block; margin-bottom: 8px; color: var(--red); font-size: 13px; font-weight: 900; }
select, input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: #fffaf1; color: var(--ink); font-size: 16px; }
.summary-row { margin-top: 14px; color: #6f4d37; }
.primary, .ghost { border: 0; cursor: pointer; font: inherit; font-weight: 900; }
.primary { width: 100%; height: 48px; margin-top: 16px; border-radius: 12px; background: var(--red); color: #fff8ee; }
.match-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.match-btn { min-height: 78px; border: 1px solid var(--line); border-radius: 14px; background: #fffaf1; color: #6f4d37; font-weight: 900; }
.match-icon { width: 30px; height: 30px; margin: 0 auto 6px; border-radius: 50%; background: currentColor; color: #fff8ee; display: grid; place-items: center; font-size: 12px; }
.match-note { margin-top: 12px; padding: 12px; border-radius: 12px; background: #f7ead7; color: var(--red); font-weight: 800; }
.member-strip { display: flex; gap: 10px; overflow-x: auto; margin-top: 12px; }
.member-pill { flex: none; min-width: 116px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.verify-row { align-items: flex-start; flex-wrap: wrap; margin-top: 10px; }
.verify-status { padding: 6px 10px; border-radius: 999px; background: #f3dfba; color: #6f4825; font-size: 12px; font-weight: 900; }
.verify-status.ok { background: #e2f1df; color: #2d7441; }
.verify-actions { display: flex; gap: 8px; width: 100%; }
.ghost { flex: 1; height: 38px; border: 1px solid var(--gold); border-radius: 10px; background: var(--card); color: var(--red); }
.ghost.warn { background: var(--soft); border-color: var(--red); }
.rank-row { margin-top: 10px; }
.rank-no { width: 38px; height: 38px; border-radius: 50%; background: #f3dfba; color: #7a4c23; }
.rank-volume, .record-time { color: var(--red); font-weight: 900; }
.library-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 18px; }
.library-card { padding: 18px; }
.cellar-item { margin-top: 10px; }
.cellar-item.locked { opacity: .62; }
.cellar-icon, .bottle-icon { width: 42px; height: 58px; border: 1px solid var(--gold); border-radius: 10px 10px 16px 16px; background: var(--card); color: var(--red); }
.progress-track { height: 8px; margin-top: 8px; border-radius: 999px; background: #ead7b6; overflow: hidden; }
.progress-fill { height: 100%; background: var(--red); }
.mine-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.body-card { text-align: center; }
.body-outline { position: relative; width: 190px; height: 340px; margin: 10px auto 12px; overflow: hidden; border: 3px solid var(--gold); border-radius: 92px 92px 48px 48px; background: var(--card); }
.body-outline:before { content: ''; position: absolute; z-index: 2; left: 54px; top: 14px; width: 74px; height: 74px; border: 3px solid var(--gold); border-radius: 50%; background: var(--paper); }
.body-fill { position: absolute; left: 0; right: 0; bottom: 0; height: 5%; transition: height .3s ease; background: linear-gradient(#e4bd72, #b6813e); }
.body-fill.warn { background: linear-gradient(#e8a448, #c86d22); }
.body-fill.danger { background: linear-gradient(#e64949, var(--red)); }
.body-percent { position: absolute; z-index: 3; inset: 0; display: grid; place-items: center; color: var(--red); font-size: 34px; font-weight: 900; }
.side-stack { display: grid; gap: 16px; }
.big-stat { margin: 8px 0 14px; font-size: 26px; font-weight: 900; }
.top-bottle { display: flex; align-items: center; gap: 12px; }
.top-bottle span { display: block; color: var(--red); font-size: 13px; font-weight: 900; }
.health-level { margin: 10px 0; color: var(--red); font-size: 22px; font-weight: 900; }
.record-line { justify-content: space-between; margin-top: 10px; }
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 10px 14px max(10px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255,253,247,.96); }
.nav-item { border: 0; background: transparent; color: #9a8568; font: inherit; font-size: 12px; font-weight: 900; }
.nav-item.active { color: var(--red); }
.nav-item span { display: grid; place-items: center; width: 30px; height: 30px; margin: 0 auto 4px; border: 1px solid currentColor; border-radius: 50%; }
@keyframes liquidRise { from { height: 0; } to { height: 38%; } }
@keyframes splashFade { 0%, 78% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@media (max-width: 720px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .library-grid, .mine-grid { grid-template-columns: 1fr; }
  .input-row, .match-grid { grid-template-columns: 1fr; }
  h2 { font-size: 28px; }
}
