:root{
  --ink:#1f1b16; --muted:#7b7266; --line:#e6e0d6; --bg:#faf8f4; --card:#fff;
  --brand:#8A5A2B; --accent:#c8792f; --ok:#2e7d32; --err:#b3261e; --chip:#ececea;
  --radius:12px; --sans:-apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic ProN","Noto Sans JP","Segoe UI",sans-serif;
}
*{box-sizing:border-box}
/* hidden 属性を常に優先（display を指定するクラスに負けないように）。
   例: .hn-generating{display:flex} が [hidden] を上書きしてスピナーが常時表示される不具合対策。 */
[hidden]{display:none!important}
body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--sans);line-height:1.6;-webkit-font-smoothing:antialiased}
a{color:var(--brand)}
.hn-topbar{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:.7rem 1rem;background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:5}
.hn-brand{font-weight:800;text-decoration:none;color:var(--ink);font-size:1.05rem}
.hn-brand span{color:var(--brand);font-weight:700}
.hn-nav{display:flex;gap:1rem;align-items:center;flex-wrap:wrap}
.hn-nav a{text-decoration:none}
.hn-userbox{display:inline-flex;flex-direction:column;line-height:1.2;text-align:right}
.hn-userbox small{color:var(--muted);font-size:.72rem}
.inline{display:inline}
button.link{background:none;border:0;color:var(--brand);cursor:pointer;font:inherit;padding:0}
.hn-main{max-width:820px;margin:0 auto;padding:1.2rem 1rem 3rem}
.hn-card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:1.4rem;box-shadow:0 1px 2px rgba(0,0,0,.03)}
.hn-narrow{max-width:420px;margin:2rem auto}
h1{font-size:1.5rem;margin:.2rem 0 .6rem}
.hn-muted{color:var(--muted)}
.hn-error{background:#fdecea;color:var(--err);border:1px solid #f5c6c2;border-radius:8px;padding:.6rem .8rem;margin:.6rem 0}
.hn-ok{background:#eaf4ea;color:var(--ok);border:1px solid #bfe0bf;border-radius:8px;padding:.6rem .8rem}
.hn-form{display:flex;flex-direction:column;gap:1rem;margin-top:1rem}
.hn-form label{display:flex;flex-direction:column;gap:.35rem;font-weight:600}
.hn-form input[type=text],.hn-form input[type=password],.hn-form textarea,.hn-form select,.hn-form input[type=file]{
  font:inherit;padding:.6rem .7rem;border:1px solid var(--line);border-radius:8px;background:#fff;font-weight:400}
.hn-form textarea{resize:vertical}
.req{color:#fff;background:var(--accent);font-size:.7rem;border-radius:999px;padding:.05rem .5rem;margin-left:.4rem;vertical-align:middle;align-self:flex-start}
.hn-hint{color:var(--muted);font-weight:400;font-size:.82rem}
.hn-btn{font:inherit;font-weight:700;border:0;border-radius:10px;padding:.7rem 1.1rem;cursor:pointer}
.hn-btn.primary{background:var(--brand);color:#fff}
.hn-btn.primary:disabled{opacity:.6;cursor:not-allowed}
.hn-btn.ghost{background:#fff;border:1px solid var(--line);color:var(--ink)}
.hn-btn.publish{background:var(--ok);color:#fff;font-size:1.05rem;padding:.85rem 1.3rem}
.hn-photo-preview img{max-width:100%;border-radius:10px;border:1px solid var(--line)}
.hn-rating-row{display:flex;align-items:center;gap:.8rem}
.hn-rating-row input[type=range]{flex:1}
/* 星プレビュー: ★ のみ(U+2605)を2層重ねて width で塗り分け（半端な半星グリフを使わない） */
.hn-stars{position:relative;display:inline-block;font-size:1.3rem;line-height:1;letter-spacing:.08em;white-space:nowrap}
.hn-stars-base{color:#d8d8d8}
.hn-stars-fill{position:absolute;left:0;top:0;overflow:hidden;white-space:nowrap;width:0;color:#e8952b}
.hn-rating-num{font-weight:700;font-variant-numeric:tabular-nums;min-width:2.2em}
.dz-paste{margin:.35rem 0 0;font-size:.82rem;color:var(--muted)}
.hn-generating{color:var(--brand);font-weight:600}
/* 複数写真 UI */
.hn-field{display:flex;flex-direction:column;gap:.4rem}
.hn-label{font-weight:600}
.hn-btn.small{padding:.35rem .7rem;font-size:.85rem}
.hn-dropzone{border:2px dashed var(--line);border-radius:12px;background:#fbfaf7;padding:1.4rem 1rem;text-align:center;cursor:pointer;transition:.15s}
.hn-dropzone:hover,.hn-dropzone:focus{border-color:var(--brand);background:#f7f1e9;outline:none}
.hn-dropzone.drag{border-color:var(--accent);background:#f3e6d4}
.hn-dropzone .dz-icon{font-size:1.6rem}
.hn-dropzone .dz-main{font-weight:700;margin:.2rem 0}
.hn-dropzone .dz-sub{margin:.2rem 0}
.hn-thumbs{list-style:none;margin:.6rem 0 0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:.7rem}
.hn-thumb{border:1px solid var(--line);border-radius:10px;overflow:hidden;background:#fff;position:relative}
.hn-thumb.is-featured{border-color:var(--brand);box-shadow:0 0 0 2px rgba(138,90,43,.25)}
.hn-thumb.has-err{border-color:var(--err)}
.hn-thumb.dragging{opacity:.5}
.hn-thumb img{width:100%;height:110px;object-fit:cover;display:block}
.hn-thumb .t-meta{display:flex;justify-content:space-between;gap:.3rem;padding:.25rem .4rem;font-size:.72rem;color:var(--muted)}
.hn-thumb .t-err{color:var(--err);font-weight:700}
.hn-thumb .t-actions{display:flex;flex-wrap:wrap;align-items:center;gap:.2rem;padding:.2rem .4rem .45rem;font-size:.75rem}
.hn-thumb .t-feat{display:flex;align-items:center;gap:.2rem;flex:1;font-weight:600}
.hn-thumb .t-btn{border:1px solid var(--line);background:#fff;border-radius:6px;min-width:30px;min-height:30px;cursor:pointer;font-size:.8rem}
.hn-thumb .t-btn.t-del{color:var(--err)}
.hn-featured-badge{display:inline-block;background:var(--brand);color:#fff;border-radius:5px;font-size:.68rem;padding:.05em .4em;margin-left:.3em}
/* review */
.hn-actions{display:flex;flex-wrap:wrap;gap:.6rem;margin-top:1rem}
.hn-toggle{display:inline-flex;border:1px solid var(--line);border-radius:999px;overflow:hidden}
.hn-toggle button{background:#fff;border:0;padding:.4rem .9rem;cursor:pointer;font:inherit}
.hn-toggle button.on{background:var(--brand);color:#fff}
.hn-frame-wrap{margin:1rem 0;display:flex;justify-content:center;background:#f3f0ea;border-radius:12px;padding:1rem}
.hn-frame{width:100%;max-width:900px;height:70vh;border:1px solid var(--line);border-radius:10px;background:#fff;transition:max-width .2s}
.hn-frame.mobile{max-width:390px}
.hn-meta{display:grid;grid-template-columns:8em 1fr;gap:.35rem .8rem;margin:.4rem 0}
.hn-meta dt{color:var(--muted);font-weight:600}
.hn-badge{display:inline-block;background:var(--chip);color:#333;border-radius:6px;padding:.1em .5em;font-size:.85rem;margin:.1em .2em .1em 0}
.hn-warn{color:#8a5a00;background:#fff6e0;border:1px solid #f0dca0;border-radius:8px;padding:.5rem .7rem}
.hn-qr{display:flex;gap:1rem;align-items:center;flex-wrap:wrap}
.hn-qr img{width:150px;height:150px;border:1px solid var(--line);border-radius:8px;background:#fff}
table.hn-hist{width:100%;border-collapse:collapse;font-size:.9rem}
table.hn-hist th,table.hn-hist td{border-bottom:1px solid var(--line);padding:.5rem;text-align:left;vertical-align:top}
.state{font-size:.78rem;border-radius:6px;padding:.1em .5em;background:var(--chip)}
.state.review_ready{background:#e3f0ff}.state.published{background:#e6f6e6}.state.failed,.state.rolled_back{background:#fde8e6}
@media(max-width:480px){.hn-meta{grid-template-columns:1fr}}

/* ---- 参考資料 (§5) ---- */
.hn-refcard{margin:.4rem 0 1rem;border:1px dashed var(--line);border-radius:var(--radius);padding:.6rem .8rem;background:var(--bg)}
.hn-refcard>summary{cursor:pointer;font-weight:600}
.hn-dropzone.small{padding:.8rem}
.hn-refrow{display:flex;gap:.4rem;align-items:flex-start;margin:.4rem 0;flex-wrap:wrap}
.hn-refrow textarea,.hn-refrow input[type=url],.hn-refrow input[type=text]{flex:1;min-width:12rem}
.hn-thumb .t-memo{width:100%;margin-top:.25rem;font-size:.8rem}
.hn-refgrid{display:flex;flex-wrap:wrap;gap:.6rem;margin:.5rem 0}
.hn-refphoto{width:130px;margin:0;text-align:center;position:relative}
.hn-refphoto img{width:130px;height:100px;object-fit:cover;border-radius:8px;border:1px solid var(--line);filter:grayscale(.15)}
.hn-refphoto figcaption{font-size:.75rem;color:var(--muted);margin-top:.2rem}
.hn-badge.warn{background:#fde8e6;color:#a3341f}
.hn-reflist{margin:.4rem 0;padding-left:1.1rem;font-size:.85rem}
.hn-conflict{border:1px solid #f0c9c1;background:#fdf3f1;border-radius:8px;padding:.6rem .8rem;margin:.6rem 0;font-size:.9rem}
.hn-conflict ul{margin:.3rem 0 0;padding-left:1.1rem}
.hn-candtable{width:100%;border-collapse:collapse;font-size:.88rem;margin:.5rem 0}
.hn-candtable th,.hn-candtable td{border-bottom:1px solid var(--line);padding:.4rem .5rem;text-align:left;vertical-align:middle}
.hn-candtable tr.is-conflict{background:#fdf3f1}
.hn-inline{display:inline}
.hn-priceok{display:block;font-size:.78rem;color:#a3341f;margin-bottom:.2rem}

/* ---- 投稿タイプ選択（記録する） ---- */
.hn-choose{display:flex;gap:1rem;flex-wrap:wrap;margin-top:1.2rem}
.hn-choose-card{position:relative;flex:1;min-width:16rem;display:flex;flex-direction:column;gap:.55rem;
  padding:1.4rem 1.5rem;border:1px solid var(--line);border-radius:16px;background:var(--card);
  text-decoration:none;color:inherit;box-shadow:0 1px 2px rgba(0,0,0,.04);
  transition:border-color .15s,box-shadow .15s,transform .15s}
.hn-choose-card:hover,.hn-choose-card:focus-visible{border-color:var(--brand);
  box-shadow:0 6px 18px rgba(138,90,43,.14);transform:translateY(-2px);outline:none}
.hn-choose-head{display:flex;align-items:center;gap:.7rem}
.hn-choose-emoji{font-size:2.1rem;line-height:1;flex:none}
.hn-choose-title{font-weight:800;font-size:1.2rem}
.hn-choose-desc{font-size:.9rem;color:var(--muted);line-height:1.5}
.hn-choose-arrow{position:absolute;top:1.1rem;right:1.2rem;color:var(--brand);font-size:1.1rem;
  opacity:.5;transition:opacity .15s,transform .15s}
.hn-choose-card:hover .hn-choose-arrow{opacity:1;transform:translateX(3px)}
/* フッター中央寄せ（文字サイズ・色は変更なし） */
.hn-footer{text-align:center;padding:1.2rem 1rem}

/* ---- 訪問記録フォーム ---- */
.hn-section{font-size:1.05rem;margin:1.3rem 0 .3rem;padding-bottom:.25rem;border-bottom:2px solid var(--line)}
.hn-visitrow{display:flex;gap:.4rem;align-items:center;margin:.4rem 0;flex-wrap:wrap}
.hn-visitrow input[type=text]{flex:1;min-width:9rem}
.hn-visitrow input[type=number]{width:5.5rem}
.hn-visitrow.beer input[name=beer_comment]{flex-basis:100%}

/* ---- 訪問フォーム 改善（任意明示・ビールカード・折りたたみ） ---- */
.hn-minhint{background:#f3f7ee;border:1px solid #dbe7cc;border-radius:8px;padding:.55rem .8rem;color:#4a5a37;font-size:.88rem;margin:.6rem 0 0}
.opt{align-self:flex-start;color:var(--muted);background:var(--chip);font-size:.68rem;border-radius:999px;padding:.05rem .45rem;margin-left:.35rem;font-weight:600;vertical-align:middle}
.req-sm{align-self:flex-start;color:#fff;background:var(--accent);font-size:.62rem;border-radius:999px;padding:.02rem .4rem;margin-left:.3rem;font-weight:700;vertical-align:middle}
.hn-beercard{border:1px solid var(--line);border-radius:12px;background:#fcfbf9;padding:.9rem 1rem;margin:.6rem 0;display:flex;flex-direction:column;gap:.6rem}
.vr-lbl{display:flex;flex-direction:column;gap:.25rem;font-weight:600;font-size:.85rem}
.vr-lbl input{font-weight:400}
.vr-sub{display:flex;gap:.6rem;flex-wrap:wrap}
.vr-sub .vr-lbl{flex:1;min-width:9rem}
.vr-sub .vr-rate{flex:0 0 6.5rem;min-width:6.5rem}
/* 各ビールの評価スライダー行（カード幅いっぱい・研究員評価と同じ星表示を再利用） */
.vr-rate-row{display:flex;flex-direction:column;gap:.3rem}
.vr-rate-lbl{font-weight:600;font-size:.85rem}
.hn-beercard .hn-rating-row{gap:.7rem}
.hn-beercard .hn-rating-row input[type=range]{flex:1;min-height:1.6rem;touch-action:none}
.hn-beercard .hn-refdel{align-self:flex-end}
/* このビールの写真（各カード内・コンパクト） */
/* 各ビール/料理の写真ドロップゾーン（共通スタイル） */
.hn-beerphoto,.hn-foodphoto{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;padding-top:.5rem;border-top:1px dashed var(--line)}
.hn-beerphoto-label,.hn-foodphoto-label{font-size:.8rem;font-weight:700;color:var(--muted,#6b6b6b);flex:1 1 100%}
.hn-beerphoto-zone,.hn-foodphoto-zone{flex:1 1 100%;border:1.5px dashed var(--line);border-radius:10px;background:#fbfaf8;padding:.55rem .7rem;text-align:center;cursor:pointer;transition:border-color .15s,background .15s}
.hn-beerphoto-zone:hover,.hn-foodphoto-zone:hover{border-color:#c9b48a}
.hn-beerphoto-zone.is-drag,.hn-foodphoto-zone.is-drag{border-color:#7a5c1e;background:#fff5db;border-style:solid}
.hn-beerphoto-hint,.hn-foodphoto-hint{font-size:.8rem;color:var(--muted,#6b6b6b);line-height:1.5}
.hn-beerphoto-zone .hn-beerphoto-pick,.hn-foodphoto-zone .hn-foodphoto-pick{margin-top:.2rem}
.hn-beerphoto-thumb,.hn-foodphoto-thumb{display:inline-flex;align-items:center;gap:.4rem;flex:1 1 100%}
.hn-beerphoto-thumb img,.hn-foodphoto-thumb img{width:56px;height:56px;object-fit:cover;border-radius:8px;border:1px solid var(--line)}
.hn-beerphoto-name,.hn-foodphoto-name{font-size:.75rem;color:var(--muted,#6b6b6b);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:9rem}
.hn-beerphoto-del,.hn-foodphoto-del{border:none;background:#e9e6e0;border-radius:50%;width:1.4rem;height:1.4rem;line-height:1;cursor:pointer;font-size:.9rem}
.hn-beerphoto-err,.hn-foodphoto-err{color:#b3261e;font-size:.75rem;flex:1 1 100%;margin:0}
.hn-beerphoto-pending,.hn-foodphoto-pending{color:#8a6d00;background:#fff7e0;border-radius:8px;padding:.35rem .5rem;font-size:.75rem;flex:1 1 100%;margin:.2rem 0 0}
/* 食事カード（料理名+コメント+写真） */
.hn-foodcard{border:1px solid var(--line);border-radius:12px;background:#fcfbf9;padding:.75rem .9rem;margin:.5rem 0;display:flex;flex-direction:column;gap:.5rem}
.vr-foodline{display:flex;gap:.4rem;align-items:center;flex-wrap:wrap}
.vr-foodline input[type=text]{flex:1;min-width:9rem}
.hn-optional{border:1px dashed var(--line);border-radius:12px;padding:.4rem .9rem;background:var(--bg);margin:.4rem 0}
.hn-optional>summary{cursor:pointer;font-weight:700}
.hn-optional label{margin-top:.6rem}

/* ---- 履歴一覧: 投稿タイプ表示 ---- */
.hn-ptype{display:inline-block;white-space:nowrap;font-size:.8rem;font-weight:700;border-radius:999px;padding:.1rem .55rem}
.hn-ptype.beer{background:#f6ead6;color:#8a5a2b}
.hn-ptype.visit{background:#e4eef6;color:#2b5a8a}

/* ---- 星ウィジェット 共通（レビュー/公開確認/訪問ビール一覧） ---- */
.hn-stars.sm{font-size:1rem;letter-spacing:.04em}
.hn-stars + .hn-rating-num{margin-left:.35em;font-size:.9em;min-width:0}

/* ---- コレクション（history カードUI） ---- */
.hn-filters{display:flex;align-items:center;gap:1rem;flex-wrap:wrap;margin:.8rem 0 1.1rem}
.hn-fpills{display:inline-flex;border:1px solid var(--line);border-radius:999px;overflow:hidden;background:#fff}
.hn-fpills button{background:#fff;border:0;padding:.4rem .9rem;cursor:pointer;font:inherit;font-size:.88rem;white-space:nowrap}
.hn-fpills button.on{background:var(--brand);color:#fff;font-weight:700}
.hn-fcat{display:inline-flex;align-items:center;gap:.4rem;font-size:.88rem;font-weight:600;color:var(--muted)}
.hn-fcat select{font:inherit;padding:.35rem .6rem;border:1px solid var(--line);border-radius:8px;background:#fff}
.hn-fcount{margin-left:auto;color:var(--muted);font-size:.85rem;font-weight:600}
.hn-collection{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:1rem}
.hn-collcard{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:14px;overflow:hidden;
  background:var(--card);text-decoration:none;color:inherit;box-shadow:0 1px 2px rgba(0,0,0,.04);
  transition:border-color .15s,box-shadow .15s,transform .15s}
.hn-collcard:hover{border-color:var(--brand);box-shadow:0 6px 18px rgba(138,90,43,.14);transform:translateY(-2px)}
.cc-thumb{position:relative;aspect-ratio:4/3;background:#f0ece5;overflow:hidden}
.cc-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.cc-noimg{display:flex;align-items:center;justify-content:center;height:100%;font-size:2.4rem;opacity:.5}
.cc-typebadge{position:absolute;top:.55rem;left:.55rem;box-shadow:0 1px 4px rgba(0,0,0,.25)}
.cc-body{display:flex;flex-direction:column;gap:.4rem;padding:.7rem .8rem .8rem}
.cc-name{font-weight:700;font-size:.98rem;line-height:1.35;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.cc-tags{display:flex;flex-wrap:wrap;align-items:center;gap:.3rem}
.cc-photos{font-size:.75rem;color:var(--muted)}
.cc-rate{min-height:1.1rem}
.cc-beercount{font-size:.85rem;font-weight:700;color:#2b5a8a}
.cc-foot{display:flex;justify-content:space-between;align-items:center;margin-top:.1rem}
.cc-date{font-size:.75rem;color:var(--muted);font-variant-numeric:tabular-nums}
@media(max-width:520px){.hn-collection{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:.7rem}
  .cc-name{font-size:.9rem}.hn-fcount{margin-left:0}}

/* ---- 記録 詳細（閲覧専用） ---- */
.hn-back{display:inline-block;font-size:.88rem;margin-bottom:.6rem;text-decoration:none}
.detail-head{margin-bottom:1rem}
.detail-badges{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;margin-bottom:.4rem}
.hn-detail h1{margin:.2rem 0}
.detail-rate{margin-top:.3rem}
.detail-hero{margin:0 0 1.2rem}
.detail-hero img{width:100%;max-height:440px;object-fit:cover;border-radius:14px;border:1px solid var(--line)}
.detail-meta{grid-template-columns:7em 1fr}
.detail-h2{font-size:1.1rem;margin:1.4rem 0 .5rem;padding-bottom:.25rem;border-bottom:2px solid var(--line)}
.detail-beers{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.7rem}
.detail-beers li{border:1px solid var(--line);border-radius:10px;padding:.6rem .8rem;background:#fcfbf9}
.detail-beers .db-top{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;font-size:1rem}
.detail-beers .db-sub{color:var(--muted);font-size:.85rem;margin-top:.15rem}
.detail-beers .db-note{margin-top:.3rem}
.detail-foods{margin:.3rem 0;padding-left:1.1rem}
.detail-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:.6rem}
.detail-gallery img{width:100%;height:110px;object-fit:cover;border-radius:8px;border:1px solid var(--line)}

/* ---- 詳細ページ 前後ナビ ---- */
.detail-topnav{display:flex;justify-content:space-between;align-items:center;gap:1rem;flex-wrap:wrap;margin-bottom:.4rem}
.detail-nav{display:flex;gap:.5rem}
.detail-topnav .dn{font-size:.85rem;padding:.3rem .7rem;border:1px solid var(--line);border-radius:999px;text-decoration:none;color:var(--brand);background:#fff;white-space:nowrap}
.detail-topnav .dn-off{color:#ccc;border-color:#eee;pointer-events:none}
.detail-nav-bottom{display:grid;grid-template-columns:1fr 1fr;gap:.7rem;margin:1.4rem 0 .4rem}
.detail-nav-bottom .dn{display:flex;flex-direction:column;gap:.15rem;padding:.6rem .9rem;border:1px solid var(--line);border-radius:10px;
  text-decoration:none;color:inherit;background:var(--card);transition:border-color .15s,box-shadow .15s}
.detail-nav-bottom .dn:hover{border-color:var(--brand);box-shadow:0 2px 8px rgba(0,0,0,.06)}
.detail-nav-bottom .dn small{color:var(--muted);font-weight:600}
.detail-nav-bottom .dn span{font-weight:700;font-size:.95rem;
  display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}
.detail-nav-bottom .dn-next{text-align:right}
.detail-nav-bottom .dn-off{border:1px dashed transparent}

/* ---- コレクション統計 ---- */
.hn-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:.8rem;margin:.4rem 0 1rem}
.hn-stats .stat{border:1px solid var(--line);border-radius:12px;background:linear-gradient(180deg,#fff, #fbf8f3);
  padding:.9rem 1rem;text-align:center}
.hn-stats .stat-n{font-size:1.7rem;font-weight:800;color:var(--brand);line-height:1.1;font-variant-numeric:tabular-nums}
.hn-stats .stat-l{font-size:.8rem;color:var(--muted);font-weight:700;margin-top:.15rem}
.hn-stats .stat-sub{font-size:.75rem;color:var(--muted);margin-top:.3rem}
.hn-stats .stat-sub .hn-stars{font-size:.85rem}
.hn-dist{border:1px solid var(--line);border-radius:12px;background:var(--bg);padding:.8rem 1rem;margin-bottom:1.1rem}
.hn-dist-title{font-weight:700;font-size:.9rem;margin-bottom:.5rem}
.hn-dist-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.35rem}
.hn-dist-list li{display:grid;grid-template-columns:8.5em 1fr 2em;align-items:center;gap:.6rem;font-size:.85rem}
.dist-label{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dist-track{background:#eee5d8;border-radius:999px;height:.7rem;overflow:hidden}
.dist-bar{display:block;height:100%;background:var(--accent);border-radius:999px;min-width:3px}
.dist-n{text-align:right;font-variant-numeric:tabular-nums;color:var(--muted);font-weight:700}
@media(max-width:520px){.hn-stats{grid-template-columns:repeat(2,1fr)}.hn-dist-list li{grid-template-columns:6.5em 1fr 1.6em}}

/* ---- コレクション ゲーム化（最高評価カード・制覇ゲージ） ---- */
.hn-game{display:grid;grid-template-columns:1fr 1.3fr;gap:1rem;margin-bottom:1.1rem}
.hn-topbeer{display:flex;gap:.8rem;align-items:center;border:1px solid var(--line);border-radius:14px;overflow:hidden;
  background:linear-gradient(135deg,#fff7ea,#fdeecf);text-decoration:none;color:inherit;padding:.6rem;
  box-shadow:0 1px 2px rgba(0,0,0,.04);transition:box-shadow .15s,transform .15s}
.hn-topbeer:hover{box-shadow:0 6px 16px rgba(200,121,47,.18);transform:translateY(-2px)}
.hn-topbeer img{width:88px;height:88px;object-fit:cover;border-radius:10px;flex:none}
.hn-topbeer .tb-noimg{width:88px;height:88px;display:flex;align-items:center;justify-content:center;font-size:2rem;background:#f0ece5;border-radius:10px;flex:none}
.tb-label{font-size:.75rem;font-weight:800;color:#b5791f}
.tb-name{font-weight:800;font-size:1.02rem;line-height:1.3;margin:.1rem 0}
.tb-brew{font-size:.82rem;color:var(--muted)}
.tb-rate{margin-top:.25rem}
.hn-conquer{border:1px solid var(--line);border-radius:14px;background:var(--card);padding:.8rem 1rem}
.conquer-head{font-weight:700;font-size:.92rem}
.conquer-head strong{color:var(--brand);font-size:1.05rem;font-variant-numeric:tabular-nums;margin-left:.3em}
.conquer-track{height:.75rem;background:#eee5d8;border-radius:999px;overflow:hidden;margin:.5rem 0 .6rem}
.conquer-bar{display:block;height:100%;background:linear-gradient(90deg,var(--accent),var(--brand));border-radius:999px;transition:width .4s}
.conquer-chips{display:flex;flex-wrap:wrap;gap:.3rem}
.conquer-chips .ch{font-size:.72rem;font-weight:700;border-radius:999px;padding:.12rem .5rem;border:1px solid transparent}
.conquer-chips .ch.got{background:var(--brand);color:#fff}
.conquer-chips .ch.yet{background:#f1ece4;color:#bbb2a4}
@media(max-width:560px){.hn-game{grid-template-columns:1fr}}

/* ---- 制覇メッセージ・次に挑戦・ブルワリーコレクション ---- */
.conquer-msg{font-size:.85rem;color:var(--brand);font-weight:700;margin-top:.6rem}
.conquer-next{font-size:.8rem;color:var(--muted);font-weight:600;margin-top:.4rem;display:flex;flex-wrap:wrap;align-items:center;gap:.3rem}
.conquer-chips .ch.next{background:#fff;border:1px dashed var(--accent);color:var(--accent)}

/* ---- 生成待機スピナー ---- */
.hn-generating{display:flex;align-items:center;gap:.5rem}
.hn-spinner{display:inline-block;width:1.05em;height:1.05em;border:2px solid #e6d8c4;border-top-color:var(--brand);
  border-radius:50%;animation:hn-spin .8s linear infinite;flex:none}
@keyframes hn-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.hn-spinner{animation-duration:2s}}

/* ---- 空状態（初回・0件） ---- */
.hn-empty{text-align:center;padding:2rem 1rem 1.5rem}
.hn-empty-icon{font-size:3rem;line-height:1}
.hn-empty-title{font-size:1.3rem;font-weight:800;margin:.6rem 0 .2rem}
.hn-empty-sub{color:var(--muted);margin:.2rem auto .9rem;max-width:30rem;line-height:1.7}
.hn-empty-actions{display:flex;gap:.7rem;justify-content:center;flex-wrap:wrap}
.hn-empty-note{color:var(--muted);font-size:.82rem;margin-top:1.1rem}

/* ---- 記録タイプ切替（フォーム上部・常時表示） ---- */
.hn-typeswitch{display:inline-flex;gap:.25rem;padding:.25rem;border:1px solid var(--line);border-radius:999px;
  background:var(--bg);margin-bottom:1rem}
.hn-typeswitch a{text-decoration:none;color:var(--muted);font-weight:700;font-size:.92rem;
  padding:.4rem 1rem;border-radius:999px;white-space:nowrap;transition:background .12s,color .12s}
.hn-typeswitch a:hover{color:var(--ink)}
.hn-typeswitch a.active{background:var(--brand);color:#fff}
@media(max-width:420px){.hn-typeswitch{display:flex;width:100%}.hn-typeswitch a{flex:1;text-align:center;padding:.4rem .5rem}}

/* ---- ヘッダー: スマホ幅で崩れない（PCは維持） ---- */
@media(max-width:560px){
  .hn-topbar{flex-wrap:wrap;gap:.35rem .7rem;padding:.5rem .7rem}
  .hn-brand{font-size:1rem}
  .hn-nav{width:100%;gap:.5rem .9rem;justify-content:flex-start;font-size:.9rem}
  .hn-userbox{flex-direction:row;flex-wrap:wrap;align-items:baseline;gap:.15rem .4rem;text-align:left}
  .hn-userbox small{font-size:.66rem}
}
/* 訪問記事: Rairee 修正依頼パネル */
.hn-revise{border:1px solid var(--line);border-radius:12px;background:#fbfaf8;padding:1rem 1.1rem;margin:1.2rem 0}
.hn-revise textarea{width:100%;min-height:5rem;resize:vertical;font:inherit;padding:.6rem .7rem;border:1px solid var(--line);border-radius:8px;background:#fff}
.hn-revise-submit{display:flex;align-items:center;gap:.8rem;margin-top:.6rem;flex-wrap:wrap}
.hn-revise-pending{border:1px solid #d8cdb0;background:#fff;border-radius:10px;padding:.8rem 1rem;margin-bottom:1rem}
.hn-revise-actions{display:flex;gap:.6rem;flex-wrap:wrap;margin-top:.6rem}
.hn-revise-history{margin-top:.8rem}
.hn-revise-history ol{margin:.4rem 0;padding-left:1.4rem}
.hn-badge.ok{background:#e6f6e6;color:#2f7d32}
