/* ============================================================
   Cigar Cafe
   Theme: 明るいカフェ — ラテのようなクリーム地に
   コーヒーブラウンの文字、キャラメルの差し色。
   はじめての人が入りやすい、あたたかく分かりやすい配色。
   ============================================================ */

:root {
  /* 明るいカフェ・パレット（ラテ×コーヒー×キャラメル） */
  --bg: #f7f1e7;             /* ラテのクリーム地 */
  --bg-2: #efe7d8;
  --panel: #fffdf8;          /* あたたかい白のカード */
  --panel-2: #f4ecdd;
  --line: #ddceb5;
  --line-soft: #ece2d0;
  --text: #40342a;           /* コーヒーブラウンの本文 */
  --text-soft: #6f6252;
  --muted: #9c8f7b;
  --gold: #b5763a;           /* 差し色：キャラメル */
  --gold-bright: #9a5f27;    /* 明るい地の上で読める濃いキャラメル */
  --wine-dark: #3a2c1f;      /* フッター・CTA帯：エスプレッソ */
  --rose-tint: #f4ecdd;      /* 強調カード背景 */
  --ember: #c0562f;          /* 警告・削除：テラコッタ */
  --ember-glow: #a8451f;
  --leaf: #6f7a4f;
  --cream: #2f2418;          /* 見出し等：エスプレッソ（濃色） */
  --on-accent: #fffdf8;      /* 濃色・キャラメル地の上に置く文字色 */
  --radius: 10px;            /* やわらかい角丸で親しみやすく */
  --radius-sm: 8px;
  --shadow: 0 2px 6px rgba(74,55,35,.06), 0 14px 30px rgba(74,55,35,.10);
  --shadow-sm: 0 1px 3px rgba(74,55,35,.05), 0 6px 16px rgba(74,55,35,.07);
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", serif;
  --sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", "Noto Sans JP", system-ui, sans-serif;

  /* モーション・トークン */
  --ease: cubic-bezier(.16,1,.3,1);       /* expo-out：滑らかな減速 */
  --ease-spring: cubic-bezier(.34,1.56,.64,1); /* わずかなオーバーシュート */
  --dur-fast: .18s;
  --dur: .38s;
  --dur-slow: .6s;
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur-fast: .001s; --dur: .001s; --dur-slow: .001s; }
  html { scroll-behavior: auto; }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden; /* 100vw のフルブリード要素などによる横はみ出しの保険 */
  /* 長い本文段落は通常の折り返し（文字単位）のままにして行末の余白が
     間延びしないようにする。単語途中の改行を避けたい見出し・短い語句には
     下記で個別に word-break: keep-all を適用する。 */
  overflow-wrap: break-word;
}

/* overflow-x:hidden は body をスクロールコンテナ化してヘッダーの
   position:sticky を無効にする。対応ブラウザでは clip を使う
   （はみ出し防止は同じで、スクロール文脈を作らない）。
   ※ この節は上の html / body ルールより後に置くこと */
@supports (overflow-x: clip) {
  html { overflow-x: clip; }
  body { overflow-x: clip; }
}

a { color: var(--gold-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

/* 見出しや短いラベルは複合語の途中で改行されないように。
   段落本文（p）には適用しない — 長文だと行末の余白が大きくなり読みにくくなるため。 */
h1, h2, h3, h4, h5, h6,
button, .chip, .strength-badge, .go, .eyebrow, .kicker,
.hero p.desc b, .hero p.desc strong {
  word-break: keep-all;
}

/* 途中で改行させたくない語句（カタカナ語など）に付与するユーティリティ */
.nowrap { white-space: nowrap; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 95; /* ボトムシート（#navTabsはこの子孫）をスクリム(80)より前面に */
  background: rgba(255,253,248,.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  position: relative;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--serif);
  cursor: pointer;
  user-select: none;
}
.brand > div { line-height: 1.15; }
.brand .mark { font-size: 1.5rem; }
.brand-logo { width: 36px; height: 36px; border-radius: var(--radius-sm); object-fit: cover; flex: 0 0 auto; }
.brand .title {
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--cream);
}
.brand .sub {
  font-size: .64rem;
  letter-spacing: .18em;
  color: var(--muted);
  text-transform: uppercase;
}
.nav-tabs {
  display: flex;
  gap: 2px;
  margin-left: auto;
  align-items: center;
}
.nav-tabs button {
  font-family: var(--sans);
  font-size: .87rem;
  color: var(--text-soft);
  background: transparent;
  border: none;
  box-shadow: inset 0 -2px 0 transparent;
  padding: 8px 12px;
  border-radius: 0;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.nav-tabs button .ic { display: none; }
.nav-tabs button:hover { color: var(--cream); }
.nav-tabs button.is-pressed { color: var(--gold-bright); }
.nav-tabs button.active {
  color: var(--cream);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--gold-bright);
}
/* 記録ノートは先頭側に置き、事典セクションと区切って強調 */
.nav-tabs .nav-journal {
  margin-right: 10px;
  padding-right: 14px;
  border-right: 1px solid var(--line);
  color: var(--gold-bright);
  font-weight: 600;
}

/* ハンバーガー（モバイル用・デフォルト非表示） */
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px; height: 42px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius-sm);
  cursor: pointer;
  position: relative;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  content: ""; position: absolute; left: 50%; width: 20px; height: 2px;
  background: var(--cream); border-radius: 2px; transform: translateX(-50%);
  transition: transform .22s ease, opacity .18s ease;
}
.nav-toggle-bars { top: 50%; margin-top: -1px; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }
.nav-toggle.open .nav-toggle-bars { background: transparent; }
.nav-toggle.open .nav-toggle-bars::before { transform: translateX(-50%) translateY(7px) rotate(45deg); }
.nav-toggle.open .nav-toggle-bars::after { transform: translateX(-50%) translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  /* モバイルはボトムナビ主体。ヘッダーのハンバーガーは隠す */
  .nav-toggle { display: none; }

  /* ヘッダーの backdrop-filter は固定配置の子孫（#navTabsのボトムシート）の
     基準ボックスをヘッダーに変えてしまい、シートが正しく画面下に出ない。
     モバイルではぼかしを外し不透明背景にして基準を viewport に戻す。 */
  .site-header {
    background: var(--panel);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  /* フルメニューはボトムシートとして下からせり上がる。
     項目数が多いため2列グリッドにし、全項目が一画面に収まるようにする。 */
  .nav-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    align-content: start;
    position: fixed;
    left: 0; right: 0;
    bottom: 0;
    margin: 0;
    padding: 8px 12px calc(14px + env(safe-area-inset-bottom));
    max-height: 82vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--panel);
    border-top: 1px solid var(--line);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -12px 34px rgba(74,55,35,.18);
    z-index: 90;
    transform: translateY(102%);
    visibility: hidden;
    transition: transform var(--dur) var(--ease-spring), visibility var(--dur) var(--ease);
  }
  /* シート上部のつまみ（グラバー）：2列にまたがせる */
  .nav-tabs::before {
    content: ""; display: block; grid-column: 1 / -1;
    width: 40px; height: 4px; border-radius: 2px;
    background: var(--line); margin: 2px auto 6px;
  }
  .nav-tabs.open { transform: none; visibility: visible; }
  .nav-tabs button {
    width: 100%;
    justify-content: flex-start;
    font-size: .95rem;
    padding: 13px 14px;
    border-radius: 12px;
    box-shadow: none;
    background: var(--panel-2);
  }
  .nav-tabs button.active { background: var(--gold); color: var(--on-accent); box-shadow: none; font-weight: 700; }
  .nav-tabs button.is-pressed:not(.active) { background: var(--line-soft); }
  /* ホーム・記録ノートは全幅で見出し的に。以下のカテゴリは2列 */
  .nav-tabs button[data-view="home"] { grid-column: 1 / -1; }
  .nav-tabs .nav-journal { grid-column: 1 / -1; margin: 0; padding: 14px 16px; border: none; border-radius: 12px; color: var(--gold-bright); font-weight: 700; }
}

/* ---------- Layout ---------- */
main { max-width: 1180px; margin: 0 auto; padding: 0 20px 80px; }
/* .view はページ全体のコンテナ。transform を使うアニメを当てると、
   アニメ中だけ position:fixed の子孫（FAB・トップへ）が絶対配置化して
   飛ぶため、不透明度のみでフェードさせる（動きは View Transitions が担う）。 */
.view { display: none; animation: viewIn var(--dur-slow) var(--ease); }
.view.active { display: block; }
@keyframes viewIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade { from { opacity: 0; transform: translateY(14px);} to {opacity:1; transform:none;} }

/* ---------- View Transitions API：ハッシュ切り替えを滑らかにクロスフェード ---------- */
@keyframes vt-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
::view-transition-old(root) { animation: var(--dur-fast) var(--ease) both vt-out; }
::view-transition-new(root) { animation: var(--dur-slow) var(--ease) both vt-in; }

/* ---------- スクロール・リビール（要素がビューポートに入ったらフェードアップ） ---------- */
.home-card, .card, .country-card, .tool-card, .person, .review-card,
.entry, .shop-card, .gloss-item, .compound, .pair-card, .qa-item,
.myth-item, .lex, .gauge-figure, .stat-box, .tier-card, .shade {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}
.home-card.in-view, .card.in-view, .country-card.in-view, .tool-card.in-view,
.person.in-view, .review-card.in-view, .entry.in-view, .shop-card.in-view,
.gloss-item.in-view, .compound.in-view, .pair-card.in-view, .qa-item.in-view,
.myth-item.in-view, .lex.in-view, .gauge-figure.in-view, .stat-box.in-view,
.tier-card.in-view, .shade.in-view {
  opacity: 1;
  transform: none;
}
/* JS未対応・prefers-reduced-motion時は即座に表示 */
.motion-off .home-card, .motion-off .card, .motion-off .country-card, .motion-off .tool-card,
.motion-off .person, .motion-off .review-card, .motion-off .entry, .motion-off .shop-card,
.motion-off .gloss-item, .motion-off .compound, .motion-off .pair-card, .motion-off .qa-item,
.motion-off .myth-item, .motion-off .lex, .motion-off .gauge-figure, .motion-off .stat-box,
.motion-off .tier-card, .motion-off .shade {
  opacity: 1; transform: none;
}
/* グリッド内カードの段差アニメーション（最初の数枚だけ時差をつける） */
.home-grid > :nth-child(1), .grid > :nth-child(1) { transition-delay: .02s; }
.home-grid > :nth-child(2), .grid > :nth-child(2) { transition-delay: .07s; }
.home-grid > :nth-child(3), .grid > :nth-child(3) { transition-delay: .12s; }
.home-grid > :nth-child(4), .grid > :nth-child(4) { transition-delay: .17s; }
.home-grid > :nth-child(5), .grid > :nth-child(5) { transition-delay: .22s; }
.home-grid > :nth-child(6), .grid > :nth-child(6) { transition-delay: .27s; }

.section-head {
  margin: 58px 0 26px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.section-head .eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .22em;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 600;
}
.section-head .eyebrow::before {
  content: ""; width: 22px; height: 1px; background: var(--gold);
}
.section-head h2 {
  font-family: var(--sans);
  font-size: 2.15rem;
  color: var(--cream);
  font-weight: 800;
  letter-spacing: -.01em;
  margin-top: 10px;
  line-height: 1.25;
}
.section-head p { font-family: var(--serif); color: var(--text-soft); margin-top: 12px; max-width: 760px; }

.lead { color: var(--text-soft); font-size: 1.05rem; max-width: 800px; }

/* セクション冒頭の写真バナー（世界編・記録ノートなど） */
.section-photo {
  display: block; width: 100%; height: min(34vw, 280px); object-fit: cover;
  border-radius: var(--radius); margin-top: 30px;
  filter: saturate(1.05) contrast(1.02);
  border: 1px solid var(--line-soft);
}
.basics-hero { height: min(44vw, 380px); margin-top: 22px; object-position: center 34%; }

/* ---------- Hero（白地に大見出し＋グレースケール写真バンド） ---------- */
.hero { padding-top: 40px; }
.hero-text { max-width: 640px; }
.hero .kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-size: .72rem; letter-spacing: .22em;
  color: var(--muted); text-transform: uppercase; font-weight: 600;
}
.hero .kicker::before { content: ""; width: 22px; height: 1px; background: var(--gold); }
.hero h1 {
  font-family: var(--sans);
  font-size: clamp(2.5rem, 10vw, 3.8rem);
  color: var(--cream);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin: 18px 0 0;
  display: block;
}
.hero .hero-en {
  display: block; font-family: var(--sans); font-size: .8rem; letter-spacing: .12em;
  color: var(--muted); text-transform: uppercase; font-weight: 600; margin-top: 12px;
}
.hero p.desc { font-family: var(--serif); color: var(--text-soft); max-width: 560px; margin: 26px 0 0; font-size: 1.02rem; }
.hero-photo {
  display: block; width: 100vw;
  margin: 40px calc(50% - 50vw) 0;
  height: min(64vw, 420px); object-fit: cover; object-position: center 30%;
  filter: saturate(1.05) contrast(1.02);
}
@media (max-width: 640px) {
  .hero-photo { height: 62vw; }
}

/* ============================================================
   トップページ — シネマティック構成
   画面いっぱいの写真に和文の縦書きを重ね、以降を
   「数字 → 今日の一本 → 銘柄の並び → 索引」と読み進める設計。
   演出はすべて prefers-reduced-motion を尊重する。
   ============================================================ */
.hero-cine {
  position: relative;
  width: 100vw;
  margin: -18px calc(50% - 50vw) 0;
  min-height: 100vh;
  min-height: min(100svh, 860px);
  display: flex; align-items: flex-end;
  overflow: hidden;
  background: #241a11;
}
.hc-media {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 32%;
  transform: scale(1.06);
  animation: hcZoom 26s var(--ease) forwards;
}
@keyframes hcZoom { from { transform: scale(1.14); } to { transform: scale(1.0); } }
.hc-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(20,13,8,.62) 0%, rgba(20,13,8,.20) 34%, rgba(20,13,8,.72) 78%, rgba(20,13,8,.92) 100%),
    radial-gradient(120% 80% at 18% 80%, rgba(20,13,8,.55), transparent 60%),
    /* 右端は縦書きを読ませるためにわずかに落とす */
    linear-gradient(270deg, rgba(20,13,8,.55) 0%, transparent 22%);
}
.hc-inner {
  position: relative;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 0 22px 76px;
  display: flex; align-items: flex-end; gap: 30px;
}
/* 和文の縦書き。写真の右側に大きく置き、葉巻サイトらしい「間」をつくる。
   writing-mode: vertical-rl は端末に縦組みメトリクスを持つ和文フォントが
   無いと漢字が重なることがあるため、1文字幅の箱に折り返させて縦に積む。
   これならフォントに依存せず、どの環境でも同じように表示される。 */
.hc-tate {
  position: absolute;
  right: max(26px, 3.5vw);
  top: clamp(96px, 15vh, 165px);
  z-index: 1;
  display: flex;
  flex-direction: row-reverse;      /* 右の列から読む */
  gap: 1.15em;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.9vw, 1.5rem);
  color: rgba(255,250,242,.92);
  margin: 0;
  text-shadow: 0 2px 22px rgba(0,0,0,.75), 0 0 60px rgba(0,0,0,.5);
  animation: hcFade 1.4s .7s var(--ease) both;
  pointer-events: none;
}
.hc-tate span {
  width: 1em;
  word-break: break-all;            /* 1文字ずつ折り返す */
  line-height: 1.85;
  text-align: center;
}
.hc-main { flex: 1 1 auto; min-width: 0; }
.hc-kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-size: .68rem; letter-spacing: .24em;
  color: rgba(255,250,242,.72); text-transform: uppercase; font-weight: 600;
  animation: hcFade .9s .15s var(--ease) both;
}
.hc-kicker::before { content: ""; width: 26px; height: 1px; background: var(--gold); }
.hc-title {
  font-family: var(--serif);
  font-size: clamp(2.9rem, 9.5vw, 6.4rem);
  line-height: 1.02;
  letter-spacing: .01em;
  font-weight: 400;
  color: #fffaf2;
  margin: 16px 0 0;
  text-shadow: 0 2px 30px rgba(0,0,0,.4);
  animation: hcRise 1.1s .25s var(--ease) both;
}
.hc-sub {
  font-family: var(--sans); font-size: .78rem; letter-spacing: .2em;
  color: rgba(255,250,242,.66); margin: 14px 0 0; font-weight: 600;
  animation: hcFade .9s .45s var(--ease) both;
}
.hc-lead {
  font-family: var(--serif); color: rgba(255,250,242,.86);
  max-width: 40em; margin: 20px 0 0; font-size: 1rem; line-height: 1.95;
  animation: hcFade 1s .6s var(--ease) both;
}
.hc-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; animation: hcFade 1s .75s var(--ease) both; }
.hc-btn {
  font-family: var(--sans); font-size: .92rem; font-weight: 700;
  padding: 14px 26px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(255,250,242,.5); background: rgba(255,250,242,.08);
  color: #fffaf2; backdrop-filter: blur(6px);
  transition: background .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.hc-btn:hover { background: rgba(255,250,242,.18); border-color: rgba(255,250,242,.85); transform: translateY(-2px); }
.hc-btn.primary { background: var(--gold); border-color: var(--gold); color: #fffaf2; }
.hc-btn.primary:hover { background: var(--gold-bright); border-color: var(--gold-bright); }
.hc-scroll {
  position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%);
  font-family: var(--sans); font-size: .6rem; letter-spacing: .3em;
  color: rgba(255,250,242,.6); display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.hc-scroll::after { content: ""; width: 1px; height: 34px; background: linear-gradient(180deg, rgba(255,250,242,.7), transparent); animation: hcLine 2.2s infinite var(--ease); transform-origin: top; }
@keyframes hcFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes hcRise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes hcLine { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(0); transform-origin: bottom; } }
@media (max-width: 760px) {
  .hc-tate { display: none; }               /* 幅が足りないと縦書きが窮屈になるため */
  .hc-scroll { display: none; }             /* ボタンと干渉するので出さない */
  .hc-inner { padding-bottom: 56px; }
  .hero-cine { min-height: min(92svh, 700px); }
  .hc-lead { font-size: .95rem; line-height: 1.85; }
}

/* ---------- 数字で見る ---------- */
.home-figures {
  display: grid; gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  margin-top: 52px;
  border-radius: var(--radius);
  overflow: hidden;
}
.stat-box.fig { background: var(--panel); padding: 26px 20px; text-align: left; border: none; border-radius: 0; }
.stat-box.fig .sv {
  font-family: var(--serif); font-size: clamp(2.1rem, 5vw, 2.9rem);
  color: var(--gold-bright); line-height: 1; font-weight: 400;
}
.stat-box.fig .sl { font-family: var(--sans); font-size: .84rem; font-weight: 700; color: var(--cream); margin-top: 12px; }
.stat-box.fig .sn { font-family: var(--serif); font-size: .78rem; color: var(--muted); margin-top: 6px; line-height: 1.7; }

/* ---------- 今日の一本（特集） ---------- */
.feature-brand {
  display: block; width: 100%; text-align: left; cursor: pointer;
  margin-top: 46px; padding: 38px 34px;
  background: linear-gradient(135deg, var(--wine-dark), #4a382a);
  border: none; border-radius: var(--radius); color: var(--on-accent);
  box-shadow: var(--shadow);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.feature-brand:hover { transform: translateY(-3px); box-shadow: 0 6px 14px rgba(74,55,35,.16), 0 22px 46px rgba(74,55,35,.20); }
.fb-kicker { font-family: var(--sans); font-size: .68rem; letter-spacing: .22em; color: var(--gold); font-weight: 700; text-transform: uppercase; }
.fb-title { font-family: var(--serif); font-size: clamp(1.7rem, 4.4vw, 2.5rem); margin: 14px 0 0; color: #fffaf2; font-weight: 400; line-height: 1.25; }
.fb-en { font-family: var(--sans); font-size: .8rem; letter-spacing: .1em; color: rgba(255,250,242,.62); margin-top: 8px; }
.fb-lead { font-family: var(--serif); font-size: .95rem; line-height: 1.95; color: rgba(255,250,242,.82); margin: 18px 0 0; max-width: 46em; }
.fb-go { font-family: var(--sans); font-size: .84rem; font-weight: 700; color: var(--gold); margin-top: 20px; }

/* ---------- 銘柄ショーケース（横スクロール） ---------- */
.showcase-head, .home-index-head {
  display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap;
  margin: 56px 0 18px;
}
.hi-num { font-family: var(--sans); font-size: .64rem; letter-spacing: .28em; color: var(--gold-bright); font-weight: 700; }
.showcase-head h2, .home-index-head h2 {
  font-family: var(--serif); font-size: clamp(1.3rem, 3.4vw, 1.75rem);
  color: var(--cream); margin: 0; font-weight: 400; flex: 1 1 auto;
}
.sc-more { font-family: var(--sans); font-size: .8rem; font-weight: 700; color: var(--gold-bright); background: none; border: none; cursor: pointer; padding: 4px; }
.sc-more:hover { text-decoration: underline; }
.showcase-rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 232px);
  gap: 14px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; padding: 4px 22px 18px;
  margin: 0 calc(50% - 50vw); width: 100vw;
  scrollbar-width: thin;
}
.showcase-rail::-webkit-scrollbar { height: 6px; }
.showcase-rail::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.sc-card {
  scroll-snap-align: start; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: 6px;
  background: var(--panel); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 20px 18px; min-height: 152px;
  transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.sc-card:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: var(--shadow-sm); }
.sc-country { font-family: var(--sans); font-size: .64rem; letter-spacing: .18em; color: var(--gold-bright); font-weight: 700; }
.sc-ja { font-family: var(--serif); font-size: 1.06rem; color: var(--cream); line-height: 1.4; margin-top: 4px; }
.sc-en { font-family: var(--sans); font-size: .72rem; color: var(--muted); letter-spacing: .04em; }
.sc-founded { font-family: var(--serif); font-size: .72rem; color: var(--text-soft); margin-top: auto; }

/* 索引の通し番号 */
.idx-card .idx-n { font-family: var(--sans); font-size: .7rem; color: var(--gold-bright); font-weight: 700; letter-spacing: .1em; }

@media (prefers-reduced-motion: reduce) {
  .hc-media { animation: none; transform: none; }
  .hc-tate, .hc-kicker, .hc-title, .hc-sub, .hc-lead, .hc-actions { animation: none; }
  .hc-scroll::after { animation: none; }
}

/* ---------- Home cards ---------- */
/* 番号つきエディトリアル・リスト（カードグリッドではなく1行ずつの明細） */
.home-grid {
  display: block;
  margin-top: 44px;
  border-top: 1px solid var(--line);
  counter-reset: cardnum;
}
.home-card {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 20px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  padding: 26px 6px;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), padding-left var(--dur) var(--ease),
    opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
  position: relative;
}
.home-card::before {
  counter-increment: cardnum;
  content: counter(cardnum, decimal-leading-zero);
  grid-column: 1; grid-row: 1 / 3;
  font-family: var(--serif); font-size: .82rem; font-weight: 700;
  color: var(--gold-bright); letter-spacing: .03em; align-self: start; margin-top: 3px;
}
.home-card:hover { background: var(--panel-2); padding-left: 16px; }
.home-card:active, .home-card.is-pressed { background: var(--panel-2); padding-left: 16px; transition-duration: var(--dur-fast); }
.home-card.is-pressed .go { transform: translateX(4px); color: var(--gold-bright); }
.home-card .ic { display: none; }
.home-card h3 {
  grid-column: 2; grid-row: 1;
  min-width: 0;
  font-family: var(--sans); font-size: 1.14rem; color: var(--cream); font-weight: 700;
  letter-spacing: -.01em;
}
.home-card p {
  grid-column: 2; grid-row: 2; min-width: 0;
  font-family: var(--serif); font-size: .87rem; color: var(--muted); margin-top: 5px;
}
.home-card .go {
  grid-column: 3; grid-row: 1 / 3;
  font-family: var(--sans); font-size: .8rem; font-weight: 600;
  color: var(--cream); letter-spacing: .02em; white-space: nowrap;
  transition: transform var(--dur) var(--ease-spring), color var(--dur-fast) var(--ease);
}
.home-card:hover .go { transform: translateX(4px); color: var(--gold-bright); }
@media (max-width: 480px) {
  .home-card {
    grid-template-columns: 22px 1fr;
    grid-template-rows: auto auto auto;
    column-gap: 10px;
    padding: 22px 4px;
  }
  .home-card::before { grid-row: 1 / 4; }
  .home-card h3 { grid-column: 2; grid-row: 1; font-size: 1.02rem; }
  .home-card p { grid-column: 2; grid-row: 2; }
  .home-card .go {
    grid-column: 2; grid-row: 3;
    justify-self: start; margin-top: 10px;
  }
}

/* 記録ノートCTA：純黒バンドで一覧リストから分離して強調 */
.note-cta {
  display: flex; align-items: center; gap: 20px; width: 100%; text-align: left;
  margin-top: 30px; padding: 30px 28px;
  background: var(--wine-dark);
  border: 1px solid var(--line);
  border-radius: 0; cursor: pointer;
  box-shadow: none;
  transition: padding-left var(--dur) var(--ease), border-color var(--dur-fast) var(--ease), opacity var(--dur-slow) var(--ease);
}
.note-cta:hover { padding-left: 34px; border-color: var(--gold); }
.note-cta:active, .note-cta.is-pressed { background: #000; border-color: var(--gold); padding-left: 34px; transition-duration: var(--dur-fast); }
.note-cta-ic { display: none; }
.note-cta-text { flex: 1; min-width: 0; }
/* CTA帯はエスプレッソ色の濃い帯なので文字は明るく */
.note-cta-text h3 { font-family: var(--sans); font-size: 1.1rem; font-weight: 700; color: #fff8ee; margin-bottom: 4px; }
.note-cta-text p { font-family: var(--serif); font-size: .87rem; color: rgba(255,248,238,.78); }
.note-cta-go {
  font-family: var(--sans); font-size: .8rem; font-weight: 600; color: var(--on-accent); letter-spacing: .02em; flex: 0 0 auto;
  background: var(--gold-bright); padding: 11px 20px; border-radius: 0;
  transition: transform var(--dur) var(--ease-spring);
}
.note-cta:hover .note-cta-go { transform: translateX(4px); }
@media (max-width: 640px) {
  .note-cta { flex-wrap: wrap; padding: 26px 24px; gap: 8px 14px; }
  .note-cta-go { flex-basis: 100%; margin-top: 10px; text-align: center; }
}

/* ---------- ビトラ一覧（表の代わりのカード：スマホで横スクロール不要） ---------- */
.vitola-list { display: grid; gap: 14px; margin-top: 6px; }
@media (min-width: 720px) { .vitola-list { grid-template-columns: 1fr 1fr; } }
.vitola-card {
  background: var(--panel); border: 1px solid var(--line-soft);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 18px 18px 16px;
}
.vitola-card .vc-name {
  font-family: var(--serif); font-size: 1.2rem; font-weight: 600; color: var(--cream);
  line-height: 1.35;
}
.vitola-card .vc-en {
  display: inline-block; font-family: var(--sans); font-size: .72rem; letter-spacing: .06em;
  color: var(--muted); text-transform: uppercase; margin-left: 8px;
}
.vitola-card .vc-specs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  margin: 13px 0 14px; background: var(--line); border: 1px solid var(--line);
  border-radius: var(--radius-sm); overflow: hidden;
}
.vitola-card .vc-spec {
  background: var(--panel-2); padding: 9px 6px; text-align: center;
  display: flex; flex-direction: column; gap: 3px; min-width: 0;
}
.vitola-card .vc-k {
  font-family: var(--sans); font-size: .64rem; letter-spacing: .04em; color: var(--muted);
}
.vitola-card .vc-v {
  font-family: var(--sans); font-size: .92rem; font-weight: 700; color: var(--cream);
  line-height: 1.2; word-break: keep-all;
}
.vitola-card .vc-feat {
  font-family: var(--serif); font-size: .92rem; color: var(--text-soft); line-height: 1.85; margin: 0;
}

/* ---------- Generic cards ---------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* ---------- Country cards ---------- */
.country-card { display: flex; flex-direction: column; }
.country-card .flag { font-size: 2.4rem; line-height: 1; }
.country-card h3 {
  font-family: var(--serif); font-size: 1.5rem; color: var(--cream);
  margin: 6px 0 2px; display: flex; align-items: center; gap: 10px;
}
.country-card .en-name { font-size: .76rem; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.field { margin-top: 14px; }
.field .lbl { font-size: .7rem; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; margin-bottom: 3px; }
.field .val { font-size: .94rem; color: var(--text-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip {
  font-family: var(--sans); font-size: .78rem; padding: 4px 11px; border-radius: var(--radius-sm);
  background: none; border: 1px solid var(--line); color: var(--text-soft);
}
.chip.brand { border-color: var(--cream); color: var(--cream); font-weight: 600; }
/* ブランド大全へリンクするチップ */
.chip.brand-link {
  cursor: pointer; font: inherit; font-size: .78rem; font-weight: 600;
  display: inline-flex; align-items: baseline; gap: 5px;
  transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.chip.brand-link:hover { border-color: var(--gold-bright); background: var(--panel); }
.chip.brand-link .brand-link-go { color: var(--gold); font-weight: 700; transform: translateY(1px); }
.chip.brand-link:hover .brand-link-go { color: var(--gold-bright); }
@keyframes brandFlash { 0% { box-shadow: 0 0 0 2px var(--gold-bright); } 100% { box-shadow: 0 0 0 2px transparent; } }
.brand-entry.brand-flash { animation: brandFlash 1.6s var(--ease); border-radius: var(--radius); }

/* ブランドのエンブレム（頭文字モノグラム／任意で実ロゴ画像） */
.brand-entry > summary { gap: 12px; }
.brand-sum-wrap { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 auto; }
.brand-sum { min-width: 0; }
.brand-emblem {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg, #6b4226); color: #fdf6ea;
  font-family: var(--serif); font-weight: 700; font-size: .85rem; letter-spacing: .01em;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .22), 0 1px 3px rgba(0, 0, 0, .2);
}
.brand-emblem.has-img { background: #fff; }
.brand-emblem img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
@media (max-width: 640px) { .brand-emblem { width: 34px; height: 34px; font-size: .8rem; } }

/* strength meter：無彩色2段階＋フルボディだけ差し色を塗って強調 */
.strength-badge {
  display: inline-block; font-family: var(--sans); font-size: .72rem; padding: 3px 11px; border-radius: var(--radius-sm);
  font-weight: 600; letter-spacing: .04em;
}
.s-mild   { background: none;          color: var(--muted);    border: 1px solid var(--line); }
.s-medium { background: var(--panel-2); color: var(--text-soft); border: 1px solid var(--line); }
.s-full   { background: var(--gold-bright); color: var(--on-accent); border: 1px solid var(--gold-bright); }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--line-soft); }
table { width: 100%; border-collapse: collapse; min-width: 620px; }
th, td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line-soft); font-size: .92rem; }
th { background: var(--panel-2); color: var(--text-soft); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; font-weight: 600; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--panel-2); }
td .vn { font-family: var(--serif); font-size: 1.05rem; color: var(--cream); }
td .ve { font-size: .74rem; color: var(--muted); letter-spacing: .04em; }

/* ---------- Anatomy / knowledge ---------- */
.kb-block { margin-top: 30px; }
.kb-block h3 {
  font-family: var(--serif); font-size: 1.3rem; font-weight: 600; color: var(--cream);
  margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line-soft);
}
.prose { color: var(--text-soft); }
.prose p { margin-bottom: 12px; }
.prose p:last-child { margin-bottom: 0; }

/* ---------- 長文内の小見出し（FMT.prose が【ラベル】から生成する .ph） ---------- */
.ph {
  display: block;
  font-family: var(--sans);
  font-weight: 700;
  font-size: .95em;
  color: var(--cream);
  line-height: 1.5;
  margin: 20px 0 8px;
  padding-left: 10px;
  border-left: 3px solid var(--gold);
  word-break: keep-all;
}
.ph:first-child { margin-top: 2px; }
/* .val（国別・喫煙具などのフィールド値）内でも段落として読みやすく */
.field .val p { margin-bottom: 10px; }
.field .val p:last-child { margin-bottom: 0; }

.step-list { counter-reset: step; list-style: none; display: grid; grid-template-columns: minmax(0,1fr); gap: 10px; }
.step-list li {
  position: relative; min-width: 0; padding: 16px 18px 16px 60px;
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
}
.step-list li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 16px; top: 15px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--gold-bright);
  color: var(--on-accent); font-weight: 700; display: grid; place-items: center;
  font-family: var(--serif); font-size: .95rem;
}
.step-list li .st { font-family: var(--serif); color: var(--cream); font-size: 1.08rem; display:block; margin-bottom: 2px; }
.step-list li .sd { font-size: .9rem; color: var(--text-soft); }

/* anatomy list */
.anatomy-list { display: grid; grid-template-columns: minmax(0,1fr); gap: 10px; }
.anatomy-list .item {
  display: grid; grid-template-columns: 160px minmax(0,1fr); gap: 14px; min-width: 0;
  padding: 12px 14px; background: var(--panel); border:1px solid var(--line-soft); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
}
.anatomy-list .item .p-name { font-family: var(--serif); color: var(--cream); }
.anatomy-list .item .p-en { font-size: .72rem; color: var(--gold); letter-spacing: .1em; display:block; }
.anatomy-list .item .p-desc { font-size: .9rem; color: var(--text-soft); min-width: 0; }

/* wrapper shades */
.shade-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 12px; }
.shade {
  border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line-soft);
  background: var(--panel); box-shadow: var(--shadow-sm);
}
.shade .swatch { height: 64px; }
.shade .meta { padding: 10px 12px; }
.shade .meta .sn { font-family: var(--serif); color: var(--cream); }
.shade .meta .se { font-size: .68rem; color: var(--muted); letter-spacing: .06em; }
.shade .meta .sf { font-size: .8rem; color: var(--muted); margin-top: 4px; }

/* glossary */
.glossary { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 12px; }
.gloss-item { padding: 14px 16px; background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }
.gloss-item .gt { font-family: var(--serif); color: var(--cream); font-size: 1.05rem; }
.gloss-item .ge { font-size: .72rem; color: var(--muted); letter-spacing: .04em; }
.gloss-item .gd { font-size: .88rem; color: var(--text-soft); margin-top: 4px; }

/* tools */
.tool-card h3 { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; color: var(--cream); }
.tool-card h3 .ic { display: none; }
.tool-card .en-name { font-size: .74rem; letter-spacing:.1em; color: var(--muted); text-transform: uppercase; margin-bottom: 10px; }

/* 喫煙具：アコーディオン一覧（間延び防止） */
.tool-list { margin-bottom: 12px; }
.tool-acc > summary { padding: 16px 18px; }
.tool-sum { display: flex; align-items: center; gap: 13px; min-width: 0; }
.tool-ic { font-size: 1.5rem; line-height: 1; flex: 0 0 auto; }
.tool-sum-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tool-sum-en { font-family: var(--sans); font-size: .68rem; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.tool-body .field:first-child { margin-top: 2px; }
/* 入れ子（種類・使い方・手入れ・歴史）は控えめに */
.tool-more { margin: 14px 0 4px; }
.tool-sub { background: var(--panel-2); box-shadow: none; margin-bottom: 8px; }
.tool-sub > summary { font-family: var(--sans); font-size: .95rem; font-weight: 600; color: var(--gold-bright); padding: 11px 15px; }
.tool-sub > summary::after { font-size: 1rem; }
.tool-sub .acc-body { padding-top: 4px; }
.storage-acc > summary { font-family: var(--serif); font-size: 1.12rem; }

/* price tiers */
.tier-card { position: relative; overflow: hidden; }
.tier-card .price-band {
  font-family: var(--serif); font-size: 1.6rem; color: var(--gold-bright);
  margin: 4px 0 10px;
}
.tier-card h3 { font-family: var(--serif); font-size: 1.4rem; color: var(--cream); }

/* ---------- Recording Note ---------- */
.note-toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.btn {
  font-family: var(--sans); font-size: .86rem; font-weight: 600; letter-spacing: .02em; cursor: pointer;
  padding: 11px 22px; border-radius: var(--radius-sm); border: 1px solid var(--cream);
  background: var(--panel); color: var(--cream);
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease-spring);
}
.btn:hover { background: var(--cream); color: var(--on-accent); }
.btn:active, .btn.is-pressed { transform: scale(.96); background: var(--cream); color: var(--on-accent); }
.btn-primary {
  background: var(--cream);
  color: var(--on-accent); font-weight: 600; border-color: var(--cream);
}
.btn-primary:hover { background: var(--gold-bright); border-color: var(--gold-bright); }
.btn-danger { color: var(--ember-glow); border-color: var(--ember); background: transparent; }
.btn-danger:hover { background: var(--ember); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-soft); border-color: var(--line); }
.btn-ghost:hover { background: var(--panel-2); color: var(--cream); border-color: var(--line); }
.btn-sm { padding: 7px 15px; font-size: .78rem; }

.count-pill {
  margin-left: auto; font-size: .82rem; color: var(--muted);
  background: var(--panel); border:1px solid var(--line-soft); padding: 6px 14px; border-radius: var(--radius-sm);
}

/* 記入を最優先にする大きな記録ボタン */
.note-add-hero {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 17px; font-size: 1.05rem; border-radius: var(--radius-sm); margin: 4px 0 14px;
}
.note-add-hero .na-plus { font-size: 1.3rem; line-height: 1; font-weight: 400; }
.note-utils { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 4px; }
.note-utils .note-search { flex: 1; min-width: 220px; margin: 0; }
/* スマホでは折り返しで最後のボタンだけが余ってしまうため、
   検索／並び替え＋件数／書き出し＋読み込み の3段にきちんと割り付ける */
@media (max-width: 640px) {
  .note-utils { display: grid; grid-template-columns: 1fr auto; align-items: center; }
  .note-utils .note-search { grid-column: 1 / -1; min-width: 0; }
  .note-utils .note-sort { grid-column: 1; width: 100%; }
  .note-utils .count-pill { grid-column: 2; justify-self: end; }
  .note-utils #btnExport { grid-column: 1; }
  .note-utils #btnImport { grid-column: 2; }
}
.note-sort {
  padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line-soft);
  background: var(--panel); color: var(--text); font-family: var(--sans); font-size: .88rem;
}
.note-sort:focus { outline: none; border-color: var(--gold); }

/* 記録者・モード表示 */
.note-topbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 6px 0 14px; }
.note-author { display: flex; align-items: center; gap: 10px; }
.note-author label { font-size: .8rem; color: var(--muted); letter-spacing: .02em; }
.note-author input {
  padding: 9px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--panel); color: var(--text); font-family: var(--sans); font-size: 1rem; min-width: 180px;
}
.note-author input:focus { outline: none; border-color: var(--gold); }
.note-mode { margin-left: auto; font-size: .76rem; padding: 5px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line-soft); color: var(--muted); }
.note-mode.cloud { color: var(--leaf); border-color: var(--leaf); background: rgba(95,107,73,.08); }

.btn-lg { padding: 13px 26px; font-size: 1rem; }

/* フローティング記録ボタン */
.note-fab {
  position: fixed; right: 22px; bottom: 26px; z-index: 60;
  width: 54px; height: 54px; border-radius: 50%; border: none;
  background: var(--cream);
  color: var(--on-accent); font-size: 1.7rem; font-weight: 400; cursor: pointer;
  box-shadow: 0 4px 16px rgba(74,55,35,.28); line-height: 1;
  display: grid; place-items: center; /* 親(#view-note)が非表示のときは一緒に隠れる */
  transition: transform var(--dur-fast) var(--ease-spring), background-color var(--dur-fast) var(--ease);
}
.note-fab:hover { background: var(--gold-bright); transform: scale(1.08); }
.note-fab:active, .note-fab.is-pressed { transform: scale(.9); background: var(--gold-bright); }

.e-author { font-size: .74rem; color: var(--muted); margin-top: 2px; }

.note-search {
  width: 100%; padding: 11px 16px; border-radius: var(--radius-sm);
  background: var(--panel); border: 1px solid var(--line-soft); color: var(--text);
  font-family: var(--sans); font-size: 1rem; margin: 14px 0 6px; /* 16px以上でiOSの自動ズームを防ぐ */
}
.note-search:focus { outline: none; border-color: var(--gold); }

.entry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 16px; margin-top: 18px; }
.entry {
  background: var(--panel);
  border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px 18px 16px;
  position: relative;
}
.entry .e-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.entry .e-title { min-width: 0; }
.entry .e-side { text-align: right; flex-shrink: 0; }
.entry h4 { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; color: var(--cream); }
.entry .e-brand { font-size: .82rem; color: var(--muted); }
.entry .e-date { font-size: .74rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.entry .e-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.entry .e-note {
  font-size: .92rem; color: var(--text-soft); white-space: pre-wrap; line-height: 1.85;
  margin-top: 8px; padding: 10px 0 0; border-top: 1px dashed var(--line-soft);
}
.entry .e-note.clamp {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden;
}
.entry .e-note-more {
  background: none; border: none; padding: 4px 0 0; cursor: pointer;
  font-family: var(--sans); font-size: .8rem; color: var(--gold-bright); letter-spacing: .04em;
}
/* 星表示（半個刻み対応：背景の5つ星に、評価分だけ幅クリップした金色を重ねる） */
.stars { position: relative; display: inline-block; white-space: nowrap; letter-spacing: 2px; line-height: 1; font-size: 1.05rem; }
.stars .s-bg { color: var(--line); }
.stars .s-fg { position: absolute; left: 0; top: 0; overflow: hidden; color: var(--gold-bright); }
.entry .e-actions { display: flex; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); }

.empty-state {
  text-align: center; padding: 60px 20px; color: var(--muted);
  border: 1px dashed var(--line); border-radius: var(--radius); margin-top: 20px;
}
.empty-state .ic { display: none; }

/* Modal */
/* 記録フォーム：ページ内にそのまま展開（ポップアップにしない＝スクロールで全項目に届く） */
.entry-panel {
  background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); margin: 4px 0 18px; overflow: hidden;
}
.entry-panel[hidden] { display: none; }
.entry-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 12px; border-bottom: 1px solid var(--line-soft); }
.entry-panel-head h3 { font-family: var(--serif); font-size: 1.35rem; color: var(--cream); }
.modal-x { background: none; border: none; color: var(--muted); font-size: 1.8rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.modal-x:hover { color: var(--cream); }
.entry-panel-body { padding: 18px 22px 6px; }
.entry-more { margin-top: 6px; padding-top: 14px; border-top: 1px dashed var(--line-soft); }
.entry-more-title { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
.form-row { margin-bottom: 15px; }
.form-row label { display: block; font-size: .8rem; letter-spacing: .08em; color: var(--gold); margin-bottom: 5px; text-transform: uppercase; }
.form-row input, .form-row textarea, .form-row select {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--bg-2); border: 1px solid var(--line); color: var(--text);
  font-family: var(--sans); font-size: 1rem; /* 16px以上でiOSの自動ズームを防ぐ */
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus { outline: none; border-color: var(--gold); }
.form-row textarea { resize: vertical; min-height: 110px; line-height: 1.7; }
.form-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rating-wrap { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rating-label { font-size: .8rem; color: var(--muted); letter-spacing: .04em; }
.rating-label.set { color: var(--gold-bright); }
.rating-input { display: flex; gap: 6px; font-size: 1.7rem; cursor: pointer; }
.rating-input .star { position: relative; color: var(--line); transition: transform .12s; }
.rating-input .star::after { content: "★"; position: absolute; left: 0; top: 0; width: 0; overflow: hidden; color: var(--gold-bright); pointer-events: none; }
.rating-input .star.half::after { width: 50%; }
.rating-input .star.on::after { width: 100%; }
.rating-input .star:active { transform: scale(1.25); }

/* テイスト（強さ）のワンタップ五択：長い選択肢もあるため折り返せるピル型 */
.seg-input { display: flex; flex-wrap: wrap; gap: 8px; }
.seg-input button {
  padding: 10px 15px; background: var(--bg-2); color: var(--text-soft);
  border: 1px solid var(--line); border-radius: 999px; font-family: var(--sans); font-size: .88rem;
  cursor: pointer; transition: background-color .15s, color .15s, border-color .15s, transform .12s;
  word-break: keep-all;
}
.seg-input button:active, .seg-input button.is-pressed { transform: scale(.94); }
.seg-input button.on { background: var(--cream); color: var(--bg); border-color: var(--cream); font-weight: 700; }

/* テイスティング用語チップ（タップでメモへ追加） */
.memo-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.memo-chips button {
  padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text-soft); font-family: var(--sans); font-size: .82rem;
  cursor: pointer; transition: border-color .15s, color .15s, transform .12s;
}
.memo-chips button:active, .memo-chips button.is-pressed { transform: scale(.92); border-color: var(--gold); color: var(--gold-bright); }
.memo-chips button.on { background: var(--cream); color: var(--bg); border-color: var(--cream); font-weight: 700; }
.entry-panel-actions { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--line-soft); background: var(--panel-2); }
.entry-panel-actions .btn-lg { flex: 1; max-width: 260px; }
.rating-input { font-size: 2rem; }

/* 写真アップロード（フォーム先頭）：見ながら書けるよう大きく表示 */
.photo-uploader { display: flex; flex-direction: column; gap: 10px; }
.photo-previews { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.photo-previews:empty { display: none; }
.photo-thumb {
  position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: var(--radius-sm);
  overflow: hidden; border: 1px solid var(--line); background: var(--bg-2);
}
/* 1枚だけのときは全幅でさらに大きく */
.photo-thumb:only-child { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.photo-thumb .rm {
  position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(253,252,249,.92); color: var(--ember); border: 1px solid var(--ember);
  font-size: 1rem; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0;
}
.photo-thumb .rm:hover { background: var(--ember); color: #fdfcf9; }
.photo-add-btn { cursor: pointer; display: flex; align-items: center; justify-content: center; width: 100%; padding: 13px; }
.photo-hint { font-size: .74rem; color: var(--muted); margin-top: 6px; width: 100%; }

/* 写真からのAI自動入力 */
.ai-fill { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.btn-ai { align-self: flex-start; background: linear-gradient(135deg, var(--gold), var(--gold-bright)); color: var(--on-accent); border: none; font-weight: 700; cursor: pointer; }
.btn-ai:hover { filter: brightness(1.05); }
.btn-ai:disabled, .btn-ai.busy { opacity: .6; cursor: default; }
.ai-status { font-size: .8rem; line-height: 1.5; padding: 8px 11px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2, rgba(0,0,0,.03)); }
.ai-status.loading { color: var(--gold-bright); }
.ai-status.ok { color: #2f6d3a; border-color: rgba(47,109,58,.35); background: rgba(47,109,58,.07); }
.ai-status.warn { color: var(--gold-bright); border-color: rgba(181,118,58,.4); background: rgba(181,118,58,.08); }
.ai-status.error { color: var(--ember); border-color: rgba(192,86,47,.4); background: rgba(192,86,47,.07); }

/* クラウド未サインイン時の案内バナー（記録は表示したまま） */
.cloud-hint { font-size: .82rem; line-height: 1.6; color: var(--gold-bright); padding: 10px 13px; border: 1px solid rgba(181,118,58,.35); background: rgba(181,118,58,.07); border-radius: 10px; margin-bottom: 14px; }

/* 写真サムネイル（記録カード内） */
.entry-photos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.entry-photo {
  width: 62px; height: 62px; object-fit: cover; border-radius: var(--radius-sm);
  border: 1px solid var(--line-soft); cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-spring), border-color var(--dur-fast) var(--ease);
}
.entry-photo:hover { transform: scale(1.08); border-color: var(--gold); }
.entry-photo:active, .entry-photo.is-pressed { transform: scale(.94); border-color: var(--gold); }

/* ライトボックス */
.lightbox {
  position: fixed; inset: 0; z-index: 200; display: none;
  align-items: flex-start; justify-content: center; padding: 24px; overflow: auto;
  background: rgba(28,20,10,.92); backdrop-filter: blur(6px); cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: min(920px, 100%); height: auto; border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid var(--line); margin: auto;
}
.lightbox .lb-close {
  position: absolute; top: 18px; right: 22px; font-size: 2rem; color: #fff;
  cursor: pointer; line-height: 1; background: none; border: none;
}

/* ============================================================
   記録ノートの統計パネル
   本数を主役に据えた濃色のパネル。ホームのヒーローや今日の一本と
   同じ色調でそろえ、記録ページの入口を印象づける。
   ============================================================ */
.note-stats {
  margin-top: 16px;
  border-radius: 16px;
  overflow: hidden;
  background:
    radial-gradient(120% 100% at 80% 0%, rgba(181,118,58,.28), transparent 62%),
    linear-gradient(150deg, #3a2c1f 0%, #4d3a2a 100%);
  color: var(--on-accent);
  padding: 30px 24px 24px;
  box-shadow: var(--shadow);
}
.note-stats .stat-box { background: none; border: none; border-radius: 0; padding: 0; text-align: left; position: relative; }
.note-stats .stat-box::after { content: none; }

/* 主役：記録した本数 */
.ns-hero { display: grid; grid-template-columns: auto auto 1fr; align-items: baseline; column-gap: 10px; }
.ns-kicker {
  grid-column: 1 / -1;
  font-family: var(--sans); font-size: .62rem; letter-spacing: .28em;
  text-transform: uppercase; font-weight: 700; color: var(--gold);
}
.ns-hero .sv {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(3.2rem, 17vw, 4.6rem); line-height: .95;
  color: #fffaf2; margin-top: 10px; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.ns-unit { font-family: var(--serif); font-size: 1.05rem; color: rgba(255,250,242,.7); }
.ns-hero .sl {
  grid-column: 1 / -1;
  font-family: var(--serif); font-size: .84rem; color: rgba(255,250,242,.62);
  margin-top: 8px; letter-spacing: .04em;
}

/* 3つ並び */
.ns-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  margin-top: 26px; padding-top: 22px;
  border-top: 1px solid rgba(255,250,242,.16);
}
.ns-row .stat-box + .stat-box { border-left: 1px solid rgba(255,250,242,.13); padding-left: 16px; }
.ns-row .sv {
  font-family: var(--serif); font-weight: 400; font-size: clamp(1.5rem, 6.5vw, 2rem);
  color: var(--gold); line-height: 1.1; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.ns-row .sl { font-family: var(--sans); font-size: .68rem; color: rgba(255,250,242,.6); margin-top: 8px; display: block; letter-spacing: .06em; }

/* 総額 */
.ns-total {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  margin-top: 22px; padding-top: 18px;
  border-top: 1px solid rgba(255,250,242,.16);
}
.ns-total .sl { font-family: var(--sans); font-size: .7rem; color: rgba(255,250,242,.6); letter-spacing: .08em; }
.ns-total .sv {
  font-family: var(--serif); font-size: clamp(1.35rem, 5.5vw, 1.7rem); color: #fffaf2;
  white-space: nowrap; font-variant-numeric: tabular-nums;
}

/* ---- 登場のモーション（順にせり上がる） ---- */
@media (prefers-reduced-motion: no-preference) {
  .note-stats .ns-kicker { animation: nsUp .7s var(--ease) both; }
  .note-stats .ns-hero .sv, .note-stats .ns-unit { animation: nsUp .9s .08s var(--ease-spring) both; }
  .note-stats .ns-hero .sl { animation: nsUp .8s .18s var(--ease) both; }
  .note-stats .ns-row .stat-box:nth-child(1) { animation: nsUp .8s .24s var(--ease) both; }
  .note-stats .ns-row .stat-box:nth-child(2) { animation: nsUp .8s .30s var(--ease) both; }
  .note-stats .ns-row .stat-box:nth-child(3) { animation: nsUp .8s .36s var(--ease) both; }
  .note-stats .ns-total { animation: nsUp .8s .44s var(--ease) both; }
}
@keyframes nsUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---- スクロール連動（対応ブラウザのみ）----
   スクロール量に追従して動くため、指の動きに張り付いたなめらかさになる。
   合成スレッドで動くのでスマホでもカクつきにくい。
   未対応のブラウザは上の登場モーションと既存のフェードインだけが効く。 */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .note-stats {
      animation: nsPanel linear both;
      animation-timeline: view();
      animation-range: exit 0% exit 70%;
    }
    @keyframes nsPanel { to { transform: scale(.965); opacity: .55; } }

    /* 統計・在庫のカードは、画面に入ってくる量に合わせてせり上がる */
    #view-note .insights, #view-note .stock-panel {
      animation: nsCard linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 58%;
    }
    @keyframes nsCard { from { opacity: 0; transform: translateY(26px) scale(.97); } to { opacity: 1; transform: none; } }
  }
}

/* モバイルでの詰め */
@media (max-width: 720px) {
  .note-stats { padding: 26px 20px 20px; }
  .ns-row .stat-box + .stat-box { padding-left: 12px; }
}

/* ---------- Footer（濃色バンド＋メニュー） ---------- */
.site-footer {
  width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw);
  margin-top: 56px;
  background: var(--wine-dark);
  padding: 40px 20px 30px; text-align: center; color: rgba(255,255,255,.7); font-size: .82rem;
}
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 30px; max-width: 900px; margin: 0 auto; }
.footer-brand { text-align: center; }
.footer-logo { width: 44px; height: 44px; border-radius: var(--radius-sm); object-fit: cover; margin: 0 auto 14px; display: block; }
.footer-brand-name { color: #fff; font-family: var(--sans); font-weight: 700; font-size: .96rem; letter-spacing: .05em; }
.footer-brand-en { color: rgba(255,255,255,.45); font-family: var(--sans); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; margin-top: 5px; }

/* フッターメニュー：3カラムのリンク一覧 */
.footer-nav {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px 16px;
  width: 100%; max-width: 460px;
  padding-top: 26px; border-top: 1px solid rgba(255,255,255,.14);
  text-align: left;
}
.footer-nav-col { display: flex; flex-direction: column; gap: 11px; }
.footer-nav-h {
  font-family: var(--sans); font-size: .64rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: rgba(255,255,255,.4); margin-bottom: 2px;
}
.footer-nav-col button {
  background: none; border: none; padding: 0; margin: 0; text-align: left; cursor: pointer;
  font-family: var(--sans); font-size: .85rem; color: rgba(255,255,255,.8);
  transition: color var(--dur-fast) var(--ease);
}
.footer-nav-col button:hover { color: var(--gold); }
button.footer-nav-note { color: #fff; font-weight: 600; }
button.footer-nav-note:hover { color: var(--gold); }

/* 製作者 */
.footer-author {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  max-width: 460px; margin: 28px auto 0; padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.14);
}
.fa-h { font-family: var(--sans); font-size: .64rem; font-weight: 700; letter-spacing: .12em; color: rgba(255,255,255,.4); }
.fa-x {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22); color: rgba(255,255,255,.88);
  font-family: var(--sans); font-size: .82rem; text-decoration: none;
  transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.fa-x:hover { background: rgba(255,255,255,.08); border-color: var(--gold); color: #fff; }
.fa-ico { width: 14px; height: 14px; flex: none; }

.site-footer .disc { max-width: 640px; margin: 30px auto 0; font-size: .74rem; opacity: .78; }

@media (min-width: 640px) {
  .footer-inner { flex-direction: row; align-items: flex-start; justify-content: space-between; text-align: left; }
  .footer-brand { text-align: left; }
  .footer-logo { margin: 0 0 14px; }
  .footer-nav { border-top: none; padding-top: 4px; max-width: 440px; }
}

/* ---------- Callout ---------- */
.callout {
  border-left: 2px solid var(--gold); background: var(--panel-2);
  padding: 12px 16px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 14px 0;
  font-size: .9rem; color: var(--text-soft);
}
.callout.warn { border-color: var(--ember); }

/* ============================================================
   上級編（マニア）コンポーネント
   ============================================================ */
/* sub-nav within advanced view：塗りピルではなく下線インジケーターの最小限タブ */
.subnav {
  display: flex; gap: 22px; flex-wrap: nowrap; margin: 0 0 8px;
  position: sticky; top: 67px; z-index: 20;
  background: var(--bg);
  padding: 14px 2px 13px; border-bottom: 1px solid var(--line);
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.subnav::-webkit-scrollbar { display: none; }
.subnav button {
  font-family: var(--sans); font-size: .82rem; color: var(--muted);
  background: none; border: none;
  box-shadow: inset 0 -2px 0 transparent;
  padding: 4px 0 10px; border-radius: 0; cursor: pointer;
  transition: color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
  white-space: nowrap; flex: 0 0 auto;
}
.subnav button:hover { color: var(--cream); }
.subnav button:active, .subnav button.is-pressed { color: var(--gold-bright); box-shadow: inset 0 -2px 0 var(--gold); }
.subnav button.active { color: var(--cream); font-weight: 700; box-shadow: inset 0 -2px 0 var(--gold-bright); }

.sub-view { display: none; }
.sub-view.active { display: block; animation: fade var(--dur-slow) var(--ease); }

/* accordion */
.acc { border: 1px solid var(--line-soft); border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 10px; background: var(--panel); box-shadow: var(--shadow-sm); }
.acc summary {
  cursor: pointer; padding: 15px 18px; font-family: var(--serif); font-size: 1.12rem;
  color: var(--cream); list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after {
  content: "＋"; color: var(--gold); font-size: 1.2rem; line-height: 1;
  display: inline-block; transition: transform var(--dur) var(--ease-spring);
}
.acc[open] summary::after { transform: rotate(135deg); }
.acc summary:hover { background: var(--panel-2); }
.acc summary:active, .acc summary.is-pressed { background: var(--panel-2); transform: scale(.99); }
.acc .acc-body {
  padding: 2px 18px 18px; color: var(--text-soft); font-size: .95rem;
  overflow: hidden; transition: height var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.acc .acc-body p { margin-bottom: 10px; }
.acc .acc-body p:last-child { margin-bottom: 0; }
.acc .tag { font-size:.7rem; padding:2px 9px; border-radius:var(--radius-sm); background:var(--panel-2); border:1px solid var(--line); color:var(--gold-bright); margin-left:8px; font-family:var(--sans); white-space:nowrap; }
/* 葉・産地の項目（銘柄ではないもの）を一目で区別するためのバッジ */
.acc .tag.leaf { color:var(--leaf, #6f9c6a); border-color:currentColor; opacity:.95; }

/* ---------- 論文精読（文献レビュー） ---------- */
.lit-list { margin-top: 18px; display: flex; flex-direction: column; gap: 14px; }
.lit-acc { border-color: var(--line); }
.lit-acc > summary { align-items: flex-start; padding: 18px 18px; }
.lit-acc > summary::after { margin-top: 4px; }
.lit-field {
  display: inline-block; font-family: var(--sans); font-size: .66rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--on-accent);
  background: var(--gold); padding: 3px 9px; border-radius: var(--radius-sm); margin-bottom: 9px;
}
.lit-title {
  display: block; font-family: var(--serif); font-size: 1.2rem; font-weight: 600;
  color: var(--cream); line-height: 1.4;
}
.lit-en {
  display: block; font-family: var(--sans); font-size: .72rem; letter-spacing: .08em;
  color: var(--muted); text-transform: uppercase; margin-top: 4px;
}
.lit-abstract {
  font-family: var(--serif); font-size: 1rem; color: var(--text); line-height: 1.9;
  padding: 14px 16px; margin: 4px 0 18px; background: var(--panel-2);
  border-left: 3px solid var(--gold); border-radius: var(--radius-sm);
}
.lit-acc .prose { font-size: .96rem; line-height: 1.95; }
.lit-refs {
  margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line);
}
.lit-refs-h {
  font-family: var(--sans); font-size: .74rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--gold-bright); margin-bottom: 12px;
}
.lit-refs-n { color: var(--muted); font-weight: 500; letter-spacing: 0; }
.lit-refs ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.lit-refs li {
  font-family: var(--sans); font-size: .8rem; color: var(--text-soft); line-height: 1.65;
  padding-left: 4px;
}
.lit-refs li::marker { color: var(--gold); font-variant-numeric: tabular-nums; }

/* ブランド大全：各銘柄の主要出典 */
.brand-refs { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); }
.brand-refs-h {
  font-family: var(--sans); font-size: .72rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--gold-bright); margin-bottom: 10px;
}
.brand-refs-n { color: var(--muted); font-weight: 500; letter-spacing: 0; }
.brand-refs ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 7px; }
.brand-refs li { font-family: var(--sans); font-size: .78rem; color: var(--text-soft); line-height: 1.6; padding-left: 3px; }
.brand-refs li::marker { color: var(--gold); font-variant-numeric: tabular-nums; }
@media (max-width: 480px) {
  .lit-acc > summary { padding: 15px 14px; }
  .lit-title { font-size: 1.08rem; }
}

/* process timeline */
.timeline { position: relative; margin: 10px 0 0 8px; padding-left: 26px; }
.timeline::before { content:""; position:absolute; left:6px; top:6px; bottom:6px; width:1px; background: var(--line); }
.tl-item { position: relative; margin-bottom: 18px; }
.tl-item::before {
  content:""; position:absolute; left:-26px; top:4px; width:9px; height:9px; border-radius:50%;
  background: var(--panel); border: 2px solid var(--gold-bright);
}
.tl-item .tl-h { font-family: var(--serif); color: var(--cream); font-size:1.1rem; }
.tl-item .tl-en { font-size:.72rem; color: var(--gold); letter-spacing:.1em; }
.tl-item .tl-d { font-size:.92rem; color: var(--text-soft); margin-top:3px; }
.tl-item .tl-chem { font-size:.85rem; color: var(--leaf); margin-top:5px; padding-left:10px; border-left:2px solid var(--leaf); }

/* def list / spec rows */
.spec-row { display:grid; grid-template-columns: 200px minmax(0,1fr); gap:12px; padding:11px 0; border-bottom:1px solid var(--line-soft); }
.spec-row:last-child { border-bottom:none; }
.spec-row .k { color: var(--gold-bright); font-size:.9rem; }
.spec-row .k .en { display:block; color: var(--muted); font-size:.7rem; letter-spacing:.08em; }
.spec-row .v { color: var(--text-soft); font-size:.92rem; min-width: 0; }

/* pairing cards */
.pair-card { border:1px solid var(--line-soft); border-radius:var(--radius-sm); padding:16px; background:var(--panel); box-shadow: var(--shadow-sm); }
.pair-card h4 { font-family:var(--serif); font-size:1.2rem; color:var(--cream); display:flex; align-items:baseline; gap:8px; }
.pair-card h4 .en { font-size:.72rem; color:var(--gold); letter-spacing:.15em; }
.pair-card .pw { font-size:.78rem; color:var(--gold-bright); margin:6px 0; }

/* quick-match table highlight */
.match-row .cig { font-family:var(--serif); color:var(--cream); }

/* 博士編：research note / compound / data density */
.research-note {
  border-left: 3px solid var(--leaf); background: rgba(124,138,78,.08);
  padding: 12px 16px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 12px 0;
  font-size: .86rem; color: var(--text-soft);
}
.research-note .rn-h { color: var(--leaf); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; display:block; margin-bottom: 4px; }
.health-box {
  border: 1px solid var(--ember); background: rgba(178,58,78,.07);
  border-radius: var(--radius-sm); padding: 14px 18px; margin: 12px 0;
}
.health-box .hb-h { color: var(--ember-glow); font-family: var(--serif); font-size: 1.05rem; margin-bottom: 6px; }
.compound-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 12px; }
.compound { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 13px 15px; box-shadow: var(--shadow-sm); }
.compound .cn { font-family: var(--serif); color: var(--cream); font-size: 1.05rem; }
.compound .cc { font-size: .78rem; color: var(--gold-bright); margin: 3px 0 5px; font-style: italic; }
.compound .cd { font-size: .85rem; color: var(--text-soft); }
.data-count { font-size: .74rem; color: var(--muted); letter-spacing:.05em; margin-left:8px; }
/* compact reference table */
table.ref td, table.ref th { padding: 9px 12px; font-size: .86rem; }
table.ref { min-width: 480px; }

@media (max-width: 640px) {
  .spec-row { grid-template-columns: 1fr; gap: 2px; }
}

/* ============================================================
   世界編コンポーネント
   ============================================================ */
/* 縦型ヒストリー年表 */
.htimeline { position: relative; margin-left: 6px; padding-left: 28px; }
.htimeline::before { content:""; position:absolute; left:7px; top:4px; bottom:4px; width:1px; background: var(--line); }
.ht-item { position: relative; margin-bottom: 18px; }
.ht-item::before {
  content:""; position:absolute; left:-28px; top:5px; width:9px; height:9px; border-radius:50%;
  background: var(--panel); border: 2px solid var(--gold-bright);
}
.ht-item .ht-y { font-family: var(--serif); color: var(--gold-bright); font-size: 1.15rem; font-weight:700; }
.ht-item .ht-t { font-family: var(--serif); color: var(--cream); font-size: 1.05rem; margin: 2px 0 3px; }
.ht-item .ht-d { font-size: .92rem; color: var(--text-soft); }

/* 人物カード */
.person-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 14px; }
.person {
  background: var(--panel);
  border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 16px 18px;
}
.person .pn { font-family: var(--serif); color: var(--cream); font-size: 1.18rem; }
.person .pf { font-size: .72rem; letter-spacing:.1em; color: var(--gold); text-transform: uppercase; margin: 2px 0 8px; }
.person .ps { font-size: .9rem; color: var(--text-soft); }
.person .pfav { font-size: .82rem; color: var(--gold-bright); margin-top: 8px; }

/* レビューカード */
.review-card {
  background: var(--panel);
  border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px 20px;
}
.review-card .rv-top { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; flex-wrap:wrap; }
.review-card h4 { font-family: var(--serif); color: var(--cream); font-size: 1.28rem; }
.review-card .rv-sub { font-size:.78rem; color: var(--gold); letter-spacing:.06em; margin-top:2px; }
.review-card .rv-chips { display:flex; flex-wrap:wrap; gap:6px; margin:10px 0; }
.review-card .rv-thirds { display:grid; gap:8px; margin-top:10px; }
.review-card .rv-third { display:grid; grid-template-columns: 76px minmax(0,1fr); gap:10px; font-size:.9rem; }
.review-card .rv-third .lb { color: var(--gold); font-size:.78rem; }
.review-card .rv-third .tx { color: var(--text-soft); min-width: 0; }
.review-card .rv-foot { margin-top:12px; padding-top:10px; border-top:1px solid var(--line-soft); font-size:.9rem; color: var(--text-soft); }
.review-card .rv-foot .k { color: var(--gold); font-size:.76rem; letter-spacing:.06em; }

/* Q&A / 神話 */
.qa-item, .myth-item { border:1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--panel); padding: 14px 16px; margin-bottom: 10px; box-shadow: var(--shadow-sm); }
.qa-item .q { font-family: var(--serif); color: var(--cream); font-size: 1.05rem; }
.qa-item .q::before { content:"Q. "; color: var(--gold); }
.qa-item .a { font-size: .92rem; color: var(--text-soft); margin-top: 6px; }
.qa-item .a::before { content:"A. "; color: var(--gold-bright); font-weight:700; }
.myth-item .mc { font-family: var(--serif); color: var(--cream); font-size: 1.05rem; }
.myth-verdict { display:inline-block; font-size:.72rem; font-weight:700; padding:2px 10px; border-radius:var(--radius-sm); margin:8px 0; }
.mv-false { background: rgba(178,58,78,.1); color: var(--ember-glow); border:1px solid var(--ember); }
.mv-true  { background: rgba(95,107,73,.12); color: var(--leaf); border:1px solid var(--leaf); }
.mv-half  { background: rgba(156,84,104,.1); color: var(--gold-bright); border:1px solid var(--gold); }
.myth-item .me { font-size:.92rem; color: var(--text-soft); }

/* 用語辞典グリッド */
.lex-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap:10px; }
.lex { border:1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--panel); padding: 12px 14px; box-shadow: var(--shadow-sm); }
.lex .lx-ja { font-family: var(--serif); color: var(--cream); font-size: 1.02rem; }
.lex .lx-for { font-size:.74rem; color: var(--gold); margin: 2px 0 5px; }
.lex .lx-for .es { color: var(--gold-bright); }
.lex .lx-d { font-size:.85rem; color: var(--text-soft); }
.lex-search { margin-bottom: 14px; }

/* 国別・国セレクター＋詳細テキスト */
/* 国セレクターは固定しない（画面を広く使えるように） */
/* 国セレクターは固定せず、全タブを折り返して表示（横スクロールで隠れないように） */
#countryNav {
  position: static; top: auto; background: transparent; backdrop-filter: none;
  border-bottom: 1px solid var(--line); padding: 6px 0 4px;
  flex-wrap: wrap; overflow-x: visible; column-gap: 20px; row-gap: 2px;
}
#countryNav button { font-size: .92rem; padding: 6px 0 10px; }
.country-detail { max-width: 980px; margin: 0 auto; animation: fade var(--dur-slow) var(--ease); }
.cd-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.cd-flag { font-size: 2.6rem; line-height: 1; }
.cd-title .cd-name { font-family: var(--serif); font-size: 1.7rem; color: var(--cream); font-weight: 700; }
.cd-title .cd-en { font-size: .74rem; letter-spacing: .2em; color: var(--gold); text-transform: uppercase; }
.cd-head .strength-badge { margin-left: auto; }
.cd-body .field:first-child { margin-top: 4px; }
.cd-sections { margin-top: 18px; }
.cd-sections .acc { margin-top: 10px; }
.cd-placeholder {
  text-align: center; padding: 34px 20px; border: 1px dashed var(--line);
  border-radius: var(--radius); color: var(--text-soft); font-size: .95rem; background: var(--panel);
}

/* 添付写真をそのまま表示（assets/gauge-size-chart.png があれば表示） */
.gauge-photo { width: 100%; height: auto; display: block; border-radius: var(--radius); border: 1px solid var(--line-soft); box-shadow: var(--shadow-sm); }

/* 基礎知識：構造・吸い方のビジュアルガイド（assets/anatomy-guide.png） */
.guide-photo {
  width: 100%; max-width: 640px; height: auto; display: block; margin: 0 auto;
  border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); cursor: zoom-in;
}

/* ゲージ（太さ）ビジュアル一覧 */
.gauge-figure {
  background: var(--panel);
  border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 22px 18px 18px;
}
.gauge-figure .gf-lead { text-align:center; color: var(--text-soft); font-size:.95rem; margin-bottom: 18px; }
.gauge-scroll { overflow-x: auto; padding-bottom: 6px; }
.gauge-track { display: flex; align-items: flex-end; justify-content: center; gap: 14px; min-width: 660px; }
.gauge-col { display: flex; flex-direction: column; align-items: center; flex: 0 0 auto; }
.cig {
  position: relative; height: 190px;
  background: linear-gradient(90deg, #4e2c14 0%, #8a5a30 24%, #b27a44 44%, #8a5330 68%, #40230f 100%);
  border-radius: 46% 46% 10% 10% / 12% 12% 4% 4%;
  box-shadow: inset 0 -8px 14px rgba(0,0,0,.4), 0 4px 10px rgba(0,0,0,.35);
}
.cig::after { /* フット（火付け側）の断面 */
  content:""; position:absolute; left:8%; right:8%; bottom:0; height:8px;
  background: repeating-linear-gradient(90deg,#c9a877 0 2px,#9a7748 2px 4px);
  border-radius: 0 0 3px 3px; opacity:.75;
}
.cig .band {
  position: absolute; left:-2px; right:-2px; top:52%; height: 22px;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold) 60%, #9a7a2e);
  border-top: 1px solid #f2d98c; border-bottom: 1px solid #7c5f22;
  display: grid; place-items: center;
}
.cig .band::before { content:""; width:8px; height:8px; border-radius:50%; background: radial-gradient(circle at 40% 35%, #5b3d12, #2c1e08); }
.gauge-col .g-num { font-family: var(--serif); font-size: 1.5rem; font-weight:700; color: var(--gold-bright); margin-top: 12px; line-height:1; }
.gauge-col .g-name { font-size:.82rem; color: var(--cream); margin-top: 5px; }
.gauge-col .g-mm { font-size:.74rem; color: var(--muted); margin-top: 2px; }

/* 味わい・喫煙時間グラデーション */
.gauge-gradients { margin-top: 20px; display: grid; gap: 10px; }
.gg-row { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 12px; }
.gg-row .gg-lbl { font-size:.78rem; color: var(--gold); text-align:right; }
.gg-bar {
  position: relative; height: 30px; border-radius: 999px;
  background: linear-gradient(90deg, rgba(124,138,78,.35), rgba(201,162,75,.35) 50%, rgba(209,102,47,.5));
  display: flex; align-items: center; justify-content: space-between; padding: 0 14px;
  border: 1px solid var(--line);
}
.gg-bar .l, .gg-bar .r { font-size:.76rem; color: var(--cream); white-space:nowrap; }
.gg-bar .arrow { position:absolute; left:50%; transform:translateX(-50%); color: var(--gold-bright); font-size:.9rem; }

/* ゲージ早見表＋説明 */
.gauge-explain { display:grid; grid-template-columns: 300px minmax(0,1fr); gap:16px; margin-top:20px; }
.gauge-def { background: var(--panel); border:1px solid var(--line-soft); border-radius: var(--radius-sm); padding:16px; }
.gauge-def h4 { font-family:var(--serif); color:var(--cream); font-size:1.1rem; margin-bottom:8px; }
.gauge-def p { font-size:.86rem; color: var(--text-soft); }
.gauge-def .ring-vis { display:flex; align-items:center; gap:12px; margin-top:12px; }
.gauge-def .ring-circle { width:56px; height:56px; border-radius:50%; flex:0 0 auto;
  background: repeating-radial-gradient(circle at 50% 50%, #6b4a28 0 3px, #4e3418 3px 6px);
  border:2px solid var(--gold); }
.gauge-def .ring-cap { font-size:.72rem; color: var(--gold); }
@media (max-width: 720px){ .gauge-explain { grid-template-columns: minmax(0,1fr); } .gg-row{ grid-template-columns: 70px minmax(0,1fr); } }

/* 店舗リスト（大阪など）カード */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 14px; }
.shop-card {
  background: var(--panel);
  border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 16px 18px;
}
.shop-card .sh-name { font-family: var(--serif); color: var(--cream); font-size: 1.18rem; }
.shop-card .sh-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.shop-card .sh-type { font-size: .72rem; padding: 3px 10px; border-radius: var(--radius-sm); background: rgba(156,84,104,.16); color: var(--gold-bright); border: 1px solid var(--gold); }
.shop-card .sh-area { font-size: .72rem; padding: 3px 10px; border-radius: var(--radius-sm); background: var(--panel-2); color: var(--text-soft); border: 1px solid var(--line); }
.shop-card .sh-desc { font-size: .9rem; color: var(--text-soft); }
.shop-card .sh-note { font-size: .78rem; color: var(--muted); margin-top: 8px; font-style: italic; }

/* ---------- 日本ガイド：全国ディレクトリ ---------- */
.jp-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 2px 0 12px; }
.jp-updated { font-size: .78rem; color: var(--muted); }
.jp-region { margin-top: 20px; }
.jp-region-h { font-family: var(--serif); color: var(--gold-bright); font-size: 1.05rem; letter-spacing: .04em;
  margin: 0 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.pref-acc { background: var(--panel); }
.pref-acc > summary { font-family: var(--serif); font-size: 1.02rem; }
.pref-acc .pref-name { color: var(--cream); }
.pref-acc .pref-count { font-family: var(--sans); font-size: .78rem; color: var(--muted); margin-left: auto; margin-right: 10px; }
.pref-note { font-size: .84rem; color: var(--text-soft); margin-bottom: 12px; }
.jp-shop .sh-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.shop-status { font-size: .68rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; flex: 0 0 auto; }
.shop-status.open { background: rgba(90,140,90,.16); color: #6ea36e; border: 1px solid rgba(110,163,110,.5); }
.shop-status.closed { background: rgba(150,150,150,.14); color: var(--muted); border: 1px solid var(--line); text-decoration: line-through; }
.shop-status.moved { background: rgba(181,118,58,.14); color: var(--gold-bright); border: 1px solid var(--gold); }
.shop-status.check { background: rgba(181,118,58,.10); color: var(--gold); border: 1px dashed var(--gold); }
.jp-shop .sh-src { margin-top: 8px; font-size: .72rem; display: flex; flex-direction: column; gap: 3px; }
.jp-shop .sh-src a { color: var(--gold); word-break: break-all; }
.jp-guide { margin-top: 34px; }

/* ---------- モバイル・ボトムナビ（今風のタブバー） ---------- */
.bottom-nav { display: none; }
.nav-scrim {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(0,0,0,.55); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none; transition: opacity var(--dur) var(--ease);
}
.nav-scrim.show { opacity: 1; pointer-events: auto; }

@media (max-width: 860px) {
  .bottom-nav {
    display: flex;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    background: rgba(255,253,248,.92);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    border-top: 1px solid var(--line-soft);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .bottom-nav button {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    background: none; border: none; cursor: pointer;
    padding: 9px 2px 8px;
    color: var(--muted);
    font-family: var(--sans); font-size: .64rem; letter-spacing: .02em;
    transition: color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease-spring);
  }
  .bottom-nav button svg {
    width: 24px; height: 24px; display: block;
    fill: none; stroke: currentColor; stroke-width: 1.7;
    stroke-linecap: round; stroke-linejoin: round;
    transition: transform var(--dur-fast) var(--ease-spring);
  }
  .bottom-nav button span { white-space: nowrap; }
  .bottom-nav button.active { color: var(--gold-bright); }
  .bottom-nav button.active svg { transform: translateY(-1px) scale(1.06); }
  .bottom-nav button.is-pressed { color: var(--gold-bright); }
  .bottom-nav button.is-pressed svg { transform: scale(.86); }

  /* コンテンツがバーに隠れないよう下部に余白。フッターの後にバー分を確保 */
  body { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
  /* メニュー展開中は背面固定 */
  body.nav-open { overflow: hidden; }
  /* FABはバーの上に持ち上げる */
  .note-fab { bottom: calc(74px + env(safe-area-inset-bottom)); right: 18px; }
}

/* ---------- 「ページ上部へ」ボタン（長いページ用・スクロールで出現） ---------- */
.to-top {
  position: fixed; left: 18px; bottom: 26px; z-index: 60;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel); color: var(--cream);
  font-size: 1.15rem; line-height: 1; cursor: pointer;
  box-shadow: var(--shadow-sm);
  display: grid; place-items: center;
  opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease),
    background-color var(--dur-fast) var(--ease);
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--panel-2); }
.to-top:active { transform: scale(.92); }
/* モバイルではボトムナビと重なるため非表示。
   代わりにアクティブなタブをタップするとページ先頭へスクロールする
   （showView が毎回 window.scrollTo(top:0) を呼ぶ）。 */
@media (max-width: 860px) { .to-top { display: none !important; } }

/* scrollbar */
::-webkit-scrollbar { height: 10px; width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* responsive */
@media (max-width: 640px) {
  .anatomy-list .item { grid-template-columns: 1fr; gap: 4px; }
  .form-two { grid-template-columns: 1fr; }
  .section-head h2 { font-size: 1.6rem; }
}

/* ============================================================
   追加機能：横断検索・今日の一本・統計・タイマー・為替・在庫・
   吸いたいリスト・クイズ・実寸表示・シェア・年間まとめ
   ============================================================ */

/* --- 横断検索（ホーム） --- */
.global-search { position: relative; margin: 26px 0 6px; }
.global-search input {
  width: 100%; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--panel); color: var(--cream); font-size: 1rem;
}
.gs-results {
  position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 6px);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(0,0,0,.25); overflow: hidden; max-height: 420px; overflow-y: auto;
}
.gs-item {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 12px 14px; background: none; border: none; border-bottom: 1px solid var(--line-soft);
  cursor: pointer; color: var(--cream);
}
.gs-item:last-child { border-bottom: none; }
.gs-item:hover { background: var(--panel-2); }
.gs-item.gs-static { cursor: default; }
.gs-ico { flex: 0 0 auto; font-size: 1.1rem; }
.gs-txt { min-width: 0; flex: 1; }
.gs-label { display: block; font-weight: 600; font-size: .95rem; }
.gs-sub { display: block; font-size: .78rem; color: var(--text-soft); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.gs-go { color: var(--gold-bright); font-size: 1.2rem; }
.gs-empty { padding: 14px; font-size: .88rem; color: var(--text-soft); }

/* --- 今日の一本 ---
   ホームの一覧は「番号｜本文｜→」の3列グリッドのため、
   このカードだけは通常フローの独立カードとして表示する（番号も振らない） */
.home-card.daily-card {
  display: block;
  border: 1px solid rgba(181,118,58,.5);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(181,118,58,.10), rgba(181,118,58,.03));
  padding: 18px 20px;
  margin: 18px 0 14px;
}
.home-card.daily-card::before { content: none; counter-increment: none; }
.home-card.daily-card:hover, .home-card.daily-card.is-pressed { padding-left: 20px; background: linear-gradient(135deg, rgba(181,118,58,.16), rgba(181,118,58,.05)); }
.daily-kicker { font-size: .74rem; letter-spacing: .08em; color: var(--gold-bright); font-weight: 700; margin-bottom: 8px; }
.home-card.daily-card h3 { font-size: 1.06rem; margin-bottom: 6px; }
.home-card.daily-card p { margin: 0 0 10px; }
.home-card.daily-card .go { color: var(--gold-bright); }

/* --- くわしい統計 --- */
.insights { border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--panel); margin-top: 14px; box-shadow: var(--shadow-sm); }
.insights > summary { cursor: pointer; padding: 14px 18px; list-style: none; font-weight: 700; color: var(--cream); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.insights > summary::-webkit-details-marker { display: none; }
.ins-year { font-size: .76rem; color: var(--gold-bright); background: var(--panel-2); border: 1px solid var(--line); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.ins-body { padding: 4px 18px 18px; }
.ch-h { font-size: .82rem; font-weight: 700; color: var(--gold-bright); margin: 16px 0 8px; }
.mchart { display: flex; align-items: flex-end; gap: 4px; height: 110px; }
.mcol { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-width: 0; }
.mval { font-size: .68rem; color: var(--text-soft); }
.mbar { width: 70%; max-width: 26px; background: linear-gradient(180deg, var(--gold), var(--gold-bright)); border-radius: 3px 3px 0 0; }
.mlbl { font-size: .62rem; color: var(--text-soft); margin-top: 4px; white-space: nowrap; }
.ins-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
@media (max-width: 640px) { .ins-grid { grid-template-columns: 1fr; } }
.ch-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.ch-lbl { flex: 0 0 92px; font-size: .78rem; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-track { flex: 1; height: 10px; background: var(--panel-2); border-radius: 999px; overflow: hidden; }
.ch-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-bright)); border-radius: 999px; }
.ch-val { flex: 0 0 auto; font-size: .76rem; color: var(--text-soft); }
.dur-row { font-size: .85rem; margin-bottom: 4px; }
.ins-actions { text-align: right; margin-top: 14px; }

/* --- リピート表示 --- */
.repeat-hint { font-size: .8rem; line-height: 1.6; color: var(--gold-bright); background: rgba(181,118,58,.08); border: 1px solid rgba(181,118,58,.3); border-radius: 9px; padding: 8px 11px; margin-top: 8px; }
.chip.repeat { color: var(--gold-bright); border-color: rgba(181,118,58,.45); }

/* --- 喫煙タイマー --- */
.timer-wrap { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
#btnTimer.on { color: var(--ember); border-color: rgba(192,86,47,.5); }
.dur-input { width: 76px; padding: 9px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--cream); font-size: .95rem; }
.dur-unit { color: var(--text-soft); font-size: .85rem; margin-left: -4px; }
.timer-disp { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--gold-bright); }

/* --- 為替換算 --- */
.fx-conv { margin-top: 8px; font-size: .82rem; }
.fx-conv > summary { cursor: pointer; color: var(--gold-bright); }
.fx-row { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.fx-row input { width: 90px; padding: 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--cream); }
.fx-row select { padding: 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--cream); }
.fx-x { color: var(--text-soft); }

/* --- AI講評 --- */
.e-ai { font-size: .84rem; line-height: 1.7; color: var(--text-soft); background: rgba(181,118,58,.07); border-left: 3px solid var(--gold); padding: 9px 12px; border-radius: 0 9px 9px 0; margin-top: 10px; }

/* --- 吸いたいリスト --- */
.wish-btn { flex: 0 0 auto; background: none; border: none; cursor: pointer; font-size: 1.25rem; color: var(--line); padding: 2px 6px; line-height: 1; transition: transform .15s var(--ease); }
.wish-btn.on { color: var(--gold); }
.wish-btn:hover { transform: scale(1.2); }
.wish-panel { border: 1px solid rgba(181,118,58,.4); background: rgba(181,118,58,.06); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; }
.wish-h { font-weight: 700; color: var(--cream); display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.wish-items { display: flex; flex-wrap: wrap; gap: 8px; }
.wish-item { display: inline-flex; align-items: center; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 5px 6px 5px 12px; font-size: .84rem; }
.wi-name { font-weight: 600; }
.wi-log { border: none; background: var(--panel-2); color: var(--gold-bright); border-radius: 999px; padding: 3px 9px; font-size: .76rem; cursor: pointer; }
.wi-rm { border: none; background: none; color: var(--text-soft); cursor: pointer; font-size: 1rem; padding: 0 4px; }
.wi-rm:hover { color: var(--ember); }

/* --- ヒュミドール在庫 --- */
.stock-panel { border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--panel); margin-top: 14px; box-shadow: var(--shadow-sm); }
.stock-panel > summary { cursor: pointer; padding: 14px 18px; list-style: none; font-weight: 700; color: var(--cream); display: flex; align-items: center; gap: 10px; }
.stock-panel > summary::-webkit-details-marker { display: none; }
#stockBody { padding: 4px 18px 18px; }
/* 在庫の可視化：数字・棚・産地の内訳・熟成の分布 */
.stk-viz { border: 1px solid var(--line-soft); border-radius: 12px; background: linear-gradient(160deg, var(--panel), var(--panel-2)); padding: 14px 14px 16px; margin: 8px 0 14px; }
.stk-figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 8px; margin-top: 12px; }
.sf { border: 1px solid var(--line-soft); border-radius: 10px; background: var(--panel); padding: 9px 8px; text-align: center; }
.sf-v { display: block; font-family: var(--serif); font-size: 1.05rem; font-weight: 700; line-height: 1.2; color: var(--gold-bright); font-variant-numeric: tabular-nums; }
.sf-l { display: block; margin-top: 3px; font-size: .66rem; letter-spacing: .1em; color: var(--text-soft); }

/* 葉巻の花：在庫を1本ずつ中心から放射状に並べる。
   同じ産地を隣り合わせに置くので、1本＝等しい角度のまま円グラフとしても読める。 */
.stk-flower { position: relative; width: min(280px, 82%); aspect-ratio: 1; margin: 6px auto 2px; }
.stk-petal { position: absolute; left: 50%; bottom: 50%; width: var(--pw, 8px); height: 47%; margin-left: calc(var(--pw, 8px) / -2); transform-origin: 50% 100%; transform: rotate(var(--a, 0deg)); animation: stkBloom .55s cubic-bezier(.2, .9, .25, 1) backwards; animation-delay: calc(var(--i, 0) * 13ms); }
/* 葉巻本体。中心側は空けて、輪の中に本数を置けるようにする */
.stk-petal::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 56%; border-radius: 999px 999px 3px 3px; background: var(--tone, #8a6a45); box-shadow: inset -1.5px 0 0 rgba(0, 0, 0, .22), inset 1.5px 0 0 rgba(255, 255, 255, .22), 0 1px 2px rgba(74, 55, 35, .16); }
/* バンド（帯） */
.stk-petal::after { content: ""; position: absolute; left: 0; right: 0; top: 40%; height: 13%; background: rgba(255, 249, 235, .55); }
.stk-core { position: absolute; inset: 30%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; border-radius: 50%; background: radial-gradient(circle at 50% 40%, var(--panel), var(--panel-2)); box-shadow: 0 0 0 1px var(--line-soft) inset; }
.sc-n { font-family: var(--serif); font-size: 1.7rem; font-weight: 700; line-height: 1; color: var(--cream); font-variant-numeric: tabular-nums; }
.sc-u { font-size: .68rem; letter-spacing: .16em; color: var(--text-soft); margin-top: 3px; }
.sc-note { font-size: .58rem; color: var(--muted); margin-top: 3px; }
@keyframes stkBloom { from { transform: rotate(var(--a, 0deg)) scaleY(.06); opacity: 0; } }
@keyframes stkGrow { from { width: 0; } }

/* 産地の内訳（花の色の凡例。そのまま絞り込みボタンになっている） */
.stk-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin-top: 10px; font-size: .72rem; color: var(--text-soft); }
.stk-lg { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; border: 1px solid transparent; background: none; font: inherit; color: inherit; cursor: pointer; transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease); }
.stk-lg:hover { background: var(--panel); border-color: var(--line-soft); }
.stk-lg.on { background: var(--panel); border-color: var(--gold); color: var(--cream); }
.stk-lg i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.stk-lg b { color: var(--cream); font-variant-numeric: tabular-nums; }

/* 産地未設定をまとめて直す欄 */
.stk-fix { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; padding: 9px 10px; border: 1px dashed var(--line); border-radius: 9px; background: var(--panel); font-size: .76rem; color: var(--text-soft); }
.stk-fix b { color: var(--cream); }
.stk-fix select { padding: 5px 8px; border-radius: 7px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: .78rem; }

/* 熟成の分布 */
.stk-aging { margin-top: 14px; }
.stk-sub-h { font-size: .72rem; letter-spacing: .12em; color: var(--text-soft); margin-bottom: 6px; }
.stk-age { display: grid; grid-template-columns: 5.6em 1fr 2.2em; align-items: center; gap: 8px; margin-top: 5px; font-size: .74rem; }
.sa-l { color: var(--text-soft); }
.sa-t { height: 7px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line-soft); overflow: hidden; }
.sa-f { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--gold), var(--gold-bright)); animation: stkGrow .8s cubic-bezier(.2, .9, .25, 1) backwards; }
.sa-n { text-align: right; color: var(--cream); font-weight: 700; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) {
  .stk-petal, .sa-f { animation: none; }
}

/* 探すための道具立て（検索・並び替え） */
.stk-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 8px; }
.stk-tools input[type="search"] { flex: 3 1 180px; min-width: 0; padding: 9px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: .86rem; }
.stk-tools select { flex: 1 1 120px; padding: 9px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: .8rem; }
/* スマホでは検索欄を1行使いにして、説明文が切れないようにする */
@media (max-width: 520px) {
  .stk-tools input[type="search"] { flex: 1 1 100%; }
  .stk-tools select { flex: 0 1 auto; min-width: 150px; }
}
.stk-hits { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .74rem; color: var(--text-soft); margin-bottom: 8px; }
.stk-hits b { color: var(--cream); }
.stk-showzero, .stk-clear { border: 1px solid var(--line); background: var(--panel); color: var(--text-soft); border-radius: 999px; padding: 3px 10px; font-size: .72rem; font-family: var(--sans); cursor: pointer; }
.stk-showzero:hover, .stk-clear:hover { border-color: var(--gold); color: var(--cream); }

.stk-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
/* 行頭の点は産地の色。花の色と同じなので、一覧でも産地が目で追える */
.stk-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 7px; vertical-align: 1px; }
.stk-row { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line-soft); border-radius: 10px; padding: 10px 12px; flex-wrap: wrap; }
.stk-main { flex: 1 1 200px; min-width: 0; }
.stk-name { font-weight: 700; }
.stk-brand { font-weight: 400; color: var(--text-soft); font-size: .8rem; margin-left: 8px; }
.stk-sub { font-size: .76rem; color: var(--text-soft); margin-top: 2px; }
/* 行ごとの産地。未設定のときだけ点線にして、直すべき箇所が分かるようにする */
.stk-csel { margin-top: 5px; max-width: 100%; padding: 4px 8px; border-radius: 7px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font-size: .74rem; }
.stk-csel.none { border-style: dashed; color: var(--muted); }
.stk-qty { display: flex; align-items: center; gap: 8px; }
.stk-btn { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel-2); color: var(--cream); cursor: pointer; font-size: 1rem; line-height: 1; }
.stk-n { min-width: 22px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.stk-acts { display: flex; gap: 6px; }
/* 在庫フォームの写真AI自動入力（ボタンと結果表示は1行使い） */
.stk-ai { flex: 1 0 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 4px; }
.stk-ai-status { font-family: var(--sans); font-size: .78rem; line-height: 1.6; color: var(--text-soft); flex: 1 1 200px; min-width: 0; }
.stk-ai-status.loading { color: var(--gold-bright); }
.stk-ai-status.ok { color: var(--leaf); }
.stk-ai-status.warn { color: var(--gold-bright); }
.stk-ai-status.error { color: var(--ember); }
.stk-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.stk-form input, .stk-form select { padding: 9px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--cream); font-size: .88rem; }
#stkCountry { flex: 1 1 120px; }
#stkName { flex: 2 1 180px; } #stkBrand { flex: 1 1 120px; }
#stkQty { width: 64px; } #stkDate { width: 140px; } #stkPrice { width: 120px; }

/* --- 用語クイズ --- */
.quiz-card { border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--panel); padding: 20px; margin-top: 26px; box-shadow: var(--shadow-sm); }
.qz-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.qz-head h3 { margin: 0; }
.qz-score { font-size: .8rem; color: var(--gold-bright); font-weight: 700; }
.qz-q { font-weight: 700; margin: 14px 0 8px; }
.qz-desc { font-size: .92rem; line-height: 1.8; color: var(--text-soft); background: var(--panel-2); border-radius: 10px; padding: 12px 14px; }
.qz-choices { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.qz-c { text-align: left; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--cream); cursor: pointer; font-size: .95rem; }
.qz-c:hover:not(:disabled) { background: var(--panel-2); }
.qz-es { color: var(--text-soft); font-size: .78rem; margin-left: 8px; }
.qz-c.right { border-color: #2f6d3a; background: rgba(47,109,58,.12); }
.qz-c.wrong { border-color: var(--ember); background: rgba(192,86,47,.1); }
.qz-fb { margin-top: 12px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.qz-ok { color: #2f6d3a; font-weight: 700; }
.qz-ng { color: var(--ember); font-weight: 700; }

/* --- サイズ実寸表示 --- */
.rs-cardbox { margin: 10px 0; }
.rs-card { height: 54px; border: 2px dashed var(--gold); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: .74rem; color: var(--gold-bright); max-width: 100%; }
.rs-picker { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.rs-pick { cursor: pointer; border: 1px solid var(--line); background: var(--panel); }
.rs-pick.on { background: var(--gold); color: var(--on-accent); border-color: var(--gold); }
.rs-scroll { overflow-x: auto; padding: 18px 4px; }
.rs-cigar { position: relative; background: linear-gradient(180deg, #8a5a34, #6b4226 55%, #5a361e); border-radius: 999px / 40%; box-shadow: 0 3px 8px rgba(0,0,0,.25); min-width: 40px; }
.rs-band { position: absolute; top: 0; bottom: 0; left: 18%; background: linear-gradient(180deg, #d8b25e, #b5763a); border-left: 1px solid rgba(255,255,255,.35); border-right: 1px solid rgba(255,255,255,.35); }
.rs-caption { font-size: .84rem; margin-top: 6px; }

/* --- 年間まとめ --- */
.wrapped-ov { position: fixed; inset: 0; z-index: 200; background: rgba(20,12,8,.7); display: none; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(3px); }
.wrapped-ov.open { display: flex; }
.wrapped-card { position: relative; width: min(460px, 100%); max-height: 86vh; overflow-y: auto; background: var(--panel); border: 1px solid var(--gold); border-radius: var(--radius); padding: 26px 24px; box-shadow: 0 24px 60px rgba(0,0,0,.4); }
.wr-kicker { font-size: .68rem; letter-spacing: .18em; color: var(--gold-bright); font-weight: 700; }
.wrapped-card h3 { font-family: var(--serif); font-size: 1.5rem; margin: 6px 0 12px; }
.wr-years { display: flex; gap: 8px; margin-bottom: 12px; }
.wr-years .chip { cursor: pointer; }
.wr-years .chip.on { background: var(--gold); color: var(--on-accent); border-color: var(--gold); }
.wr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.wr-stat { border: 1px solid var(--line-soft); border-radius: 10px; padding: 12px; text-align: center; }
.wr-stat .sv { font-family: var(--serif); font-size: 1.4rem; color: var(--gold-bright); }
.wr-stat .sl { font-size: .72rem; color: var(--text-soft); margin-top: 4px; }
.wr-line { font-size: .9rem; margin: 8px 0; line-height: 1.7; }

/* --- 葉巻ニュース --- */
.news-note { margin: 14px 0 18px; }
.news-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.news-filter .nf { cursor: pointer; border: 1px solid var(--line); background: var(--panel); }
.news-filter .nf.on { background: var(--gold); color: var(--on-accent); border-color: var(--gold); }
.news-list { display: flex; flex-direction: column; gap: 14px; }
.news-card { border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--panel); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.news-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.news-date { font-family: var(--serif); font-weight: 700; color: var(--gold-bright); font-size: .9rem; }
.news-cat { font-size: .7rem; padding: 2px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text-soft); }
.news-title { font-family: var(--sans); font-size: 1.05rem; font-weight: 700; margin: 0 0 8px; line-height: 1.5; }
.news-sum { font-size: .9rem; line-height: 1.8; color: var(--text-soft); margin: 0 0 10px; }
.news-src { font-size: .76rem; color: var(--muted); line-height: 1.7; }
.news-src a { color: var(--gold-bright); font-weight: 600; margin-left: 6px; white-space: nowrap; }

/* --- シェアメニュー & 共有リンク閲覧 --- */
.share-menu { width: min(400px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: 0 24px 60px rgba(0,0,0,.4); display: flex; flex-direction: column; gap: 10px; }
.sm-title { font-weight: 700; margin-bottom: 4px; }
.sm-item { text-align: left; padding: 13px 15px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--cream); cursor: pointer; font-size: .95rem; font-weight: 600; }
.sm-item:hover:not(:disabled) { background: var(--panel-2); }
.sm-item:disabled { opacity: .6; }
.sm-sub { display: block; font-weight: 400; font-size: .76rem; color: var(--text-soft); margin-top: 3px; }
.sm-cancel { align-self: flex-end; margin-top: 2px; }
.share-view { position: relative; width: min(480px, 100%); max-height: 88vh; overflow-y: auto; background: var(--panel); border: 1px solid var(--gold); border-radius: var(--radius); padding: 26px 24px; box-shadow: 0 24px 60px rgba(0,0,0,.4); }
.share-view h3 { font-family: var(--serif); font-size: 1.4rem; margin: 6px 0 4px; }
.sv-brand { color: var(--gold-bright); font-size: .95rem; margin-bottom: 6px; }
.sv-author { margin-top: 14px; font-size: .82rem; color: var(--text-soft); }
.sv-foot { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line-soft); font-family: var(--serif); color: var(--gold-bright); font-size: .88rem; }

/* ============================================================
   管理画面（#admin）
   ナビには出さない補助的な画面。表形式で読みやすさを優先する。
   ============================================================ */
.admin-warn {
  background: #fdf3ec; border: 1px solid #e6c4ae; border-left: 4px solid var(--ember);
  border-radius: var(--radius-sm); padding: 16px 18px; margin-top: 18px;
  font-family: var(--serif); font-size: .9rem; line-height: 1.85; color: var(--text);
}
.admin-warn code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .86em; background: rgba(0,0,0,.05); padding: 1px 5px; border-radius: 4px; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.admin-stats {
  display: grid; gap: 1px; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  background: var(--line-soft); border: 1px solid var(--line-soft);
  border-radius: var(--radius); overflow: hidden; margin-top: 26px;
}
.admin-stats .stat-box { background: var(--panel); padding: 20px 14px; border: none; border-radius: 0; text-align: center; }
.admin-sort { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px; font-family: var(--sans); font-size: .8rem; color: var(--muted); }
.as-btn {
  font-family: var(--sans); font-size: .8rem; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text-soft); cursor: pointer;
}
.as-btn.on { background: var(--gold); border-color: var(--gold); color: var(--on-accent); font-weight: 700; }
.admin-owners { margin-top: 14px; border-top: 1px solid var(--line); }
.admin-owner { border-bottom: 1px solid var(--line); }
.ao-head {
  width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  background: none; border: none; padding: 18px 6px; cursor: pointer; text-align: left;
  transition: background-color var(--dur) var(--ease);
}
.ao-head:hover { background: var(--panel-2); }
.ao-name { font-family: var(--sans); font-weight: 700; color: var(--cream); font-size: 1rem; flex: 1 1 auto; min-width: 0; }
.ao-count { font-family: var(--serif); color: var(--gold-bright); font-size: 1.05rem; }
.ao-meta { font-family: var(--sans); font-size: .76rem; color: var(--muted); }
.ao-caret { font-size: .7rem; color: var(--muted); }
.ao-body { overflow-x: auto; padding-bottom: 18px; }
.admin-table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: .84rem; min-width: 560px; }
.admin-table th {
  text-align: left; font-size: .72rem; letter-spacing: .08em; color: var(--muted);
  font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line);
}
.admin-table td { padding: 10px; border-bottom: 1px solid var(--line-soft); color: var(--text); vertical-align: top; }
.at-sub { display: block; font-size: .72rem; color: var(--muted); margin-top: 2px; }
.at-del {
  font-family: var(--sans); font-size: .74rem; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel); color: var(--ember); cursor: pointer;
}
.at-del:hover { background: var(--ember); border-color: var(--ember); color: #fff; }
@media (max-width: 640px) {
  .ao-head { gap: 8px 12px; padding: 16px 4px; }
  .ao-name { flex: 1 1 100%; }
}
