/* 判例年次索引 固定ページ専用スタイル（design_handoff_mudashiru/hanrei-index.html を移植） */
.hanrei-page{
  --bg:#FDF8EE; --paper:#FFFFFF; --ink:#1A1818; --ink-soft:#4A4544; --ink-mute:#8A8480;
  --line:#EBE4D3; --line-soft:#F2ECDE;
  --brand:#FF6B35; --brand-deep:#E55321; --brand-soft:#FFE6D8;
  --accent:#2B4C7E; --accent-soft:#DCE5F0;
  --sun:#F4C842; --sun-soft:#FFF3C2;
  --leaf:#5BAA6F; --leaf-soft:#E0F0E4;
  --pink:#F26B8A; --pink-soft:#FCE2E8;
  --brown:#A86C3D; --brown-soft:#EFE2D4;
  --round:'Zen Maru Gothic','Hiragino Maru Gothic ProN',sans-serif;
  --mincho:'Shippori Mincho','Noto Serif JP',serif;
  --gothic:'Zen Kaku Gothic New','Hiragino Kaku Gothic ProN',sans-serif;

  background:var(--bg); color:var(--ink);
  font-family:var(--gothic); line-height:1.95;
  -webkit-font-smoothing:antialiased;
}
.hanrei-page *{box-sizing:border-box;}
.hanrei-page a{color:inherit;}
.hanrei-page .hanrei-wrap{max-width:1040px; margin:0 auto; padding:0 24px;}

/* ---------- Masthead ---------- */
.hanrei-masthead{ padding:30px 0 22px; }
.hanrei-brandbar{ display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.hanrei-logo-mark{ display:inline-flex; align-items:center; gap:12px; text-decoration:none; }
.hanrei-logo-mark .hanrei-face{
  width:50px;height:50px;border-radius:50%;background:var(--brand);
  position:relative; box-shadow:0 4px 0 var(--brand-deep); flex:none;
}
.hanrei-logo-mark .hanrei-face::before,.hanrei-logo-mark .hanrei-face::after{
  content:''; position:absolute; width:7px;height:7px;border-radius:50%; background:#fff; top:19px;
}
.hanrei-logo-mark .hanrei-face::before{ left:13px; }
.hanrei-logo-mark .hanrei-face::after{ right:13px; }
.hanrei-logo-mark .hanrei-smile{ position:absolute; bottom:13px; left:50%; transform:translateX(-50%);
  width:18px;height:9px;border:2px solid #fff;border-top:0;border-radius:0 0 14px 14px; }
.hanrei-logo-mark .hanrei-bulb{ position:absolute; top:-9px; left:50%; transform:translateX(-50%);
  width:13px;height:13px;border-radius:50%; background:var(--sun); }
.hanrei-logo-mark .hanrei-word{ font-family:var(--round); font-weight:900; font-size:30px; letter-spacing:.02em; line-height:1; }
.hanrei-logo-mark .hanrei-dot{ color:var(--brand); }
.hanrei-logo-mark .hanrei-sub{ display:block; font-family:var(--gothic); font-weight:500; font-size:10px; color:var(--ink-mute); letter-spacing:.18em; margin-top:5px; }
.hanrei-crumbs{ font-size:12px; color:var(--ink-mute); }
.hanrei-crumbs a{ text-decoration:none; }
.hanrei-crumbs a:hover{ color:var(--brand); }

/* ---------- Hero ---------- */
.hanrei-hero{ padding:18px 0 28px; border-top:1px solid var(--line); }
.hanrei-hero .hanrei-kicker{ font-family:var(--gothic); font-weight:700; font-size:12px; letter-spacing:.22em;
  color:var(--accent); display:inline-flex; align-items:center; gap:8px; }
.hanrei-hero .hanrei-kicker::before{ content:'§'; font-family:var(--mincho); font-size:16px; }
.hanrei-hero h1{ font-family:var(--round); font-weight:900; font-size:40px; line-height:1.25;
  margin:14px 0 0; letter-spacing:.01em; text-wrap:balance; }
.hanrei-hero h1 .hanrei-dot{ color:var(--brand); }
.hanrei-hero .hanrei-lead{ font-family:var(--mincho); font-weight:700; font-size:17px; color:var(--ink-soft);
  margin:14px 0 0; max-width:62ch; text-wrap:pretty; }
.hanrei-hero .hanrei-note{ font-size:13.5px; color:var(--ink-mute); margin:12px 0 0; max-width:62ch; line-height:1.85; }

/* ---------- Random button ---------- */
.hanrei-randomwrap{ margin:20px 0 0; max-width:62ch; }
.hanrei-random-btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:14px 28px; background:var(--brand); color:#FFFFFF; border:none;
  border-radius:999px; box-shadow:0 4px 0 var(--brand-deep, #E55321);
  font-family:var(--round); font-weight:700; font-size:15px; cursor:pointer;
  transition:transform .1s ease, box-shadow .1s ease;
}
.hanrei-random-btn:hover{ transform:translateY(-1px); }
.hanrei-random-btn:active{ transform:translateY(2px); box-shadow:none; }
.hanrei-random-caption{ font-size:12.5px; color:var(--ink-mute); margin:8px 0 0; max-width:62ch; line-height:1.7; }
.hanrei-random-note{ font-size:12.5px; color:var(--brand); font-weight:700; margin:8px 0 0; }

/* ---------- Stat strip ---------- */
.hanrei-stats{ display:flex; gap:0; flex-wrap:wrap; margin:24px 0 0; background:var(--paper);
  border:1.5px solid var(--line); border-radius:16px; overflow:hidden; }
.hanrei-stat{ flex:1 1 0; min-width:120px; padding:16px 18px; border-right:1px solid var(--line-soft); }
.hanrei-stat:last-child{ border-right:0; }
.hanrei-stat .hanrei-n{ font-family:var(--round); font-weight:900; font-size:26px; line-height:1; }
.hanrei-stat .hanrei-n .hanrei-u{ font-size:13px; font-weight:700; color:var(--ink-mute); margin-left:3px; }
.hanrei-stat .hanrei-l{ font-size:11.5px; color:var(--ink-mute); margin-top:6px; letter-spacing:.04em; }

/* ---------- Toolbar (sticky) ---------- */
.hanrei-toolbar{ position:sticky; top:0; z-index:30; background:rgba(253,248,238,.92);
  backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px);
  border-bottom:1px solid var(--line); margin-top:26px; }
.hanrei-toolbar-inner{ max-width:1040px; margin:0 auto; padding:12px 24px; display:flex; flex-direction:column; gap:10px; }
.hanrei-searchrow{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.hanrei-search{ position:relative; flex:1 1 280px; }
.hanrei-search input{ width:100%; font-family:var(--gothic); font-size:14.5px; color:var(--ink);
  padding:11px 14px 11px 40px; border:1.5px solid var(--line); border-radius:12px; background:var(--paper);
  outline:none; transition:border-color .15s, box-shadow .15s; }
.hanrei-search input:focus{ border-color:var(--brand); box-shadow:0 0 0 3px var(--brand-soft); }
.hanrei-search .hanrei-ic{ position:absolute; left:13px; top:50%; transform:translateY(-50%); width:16px;height:16px;
  border:2px solid var(--ink-mute); border-radius:50%; }
.hanrei-search .hanrei-ic::after{ content:''; position:absolute; right:-5px; bottom:-5px; width:8px;height:2px;
  background:var(--ink-mute); transform:rotate(45deg); border-radius:2px; }
.hanrei-found{ font-size:12.5px; color:var(--ink-mute); white-space:nowrap; }
.hanrei-found b{ font-family:var(--round); font-weight:700; color:var(--ink); }
.hanrei-jump{ margin-left:auto; display:flex; gap:6px; }
.hanrei-jump a{ font-family:var(--round); font-weight:700; font-size:12px; text-decoration:none; color:var(--ink-soft);
  padding:6px 11px; border-radius:999px; border:1.5px solid var(--line); background:var(--paper); transition:.15s; }
.hanrei-jump a:hover{ border-color:var(--accent); color:var(--accent); }

.hanrei-chips{ display:flex; gap:7px; align-items:center; flex-wrap:wrap; }
.hanrei-chips .hanrei-lbl{ font-size:11px; color:var(--ink-mute); letter-spacing:.08em; margin-right:2px; }
.hanrei-chip{ font-family:var(--gothic); font-weight:700; font-size:12.5px; cursor:pointer; user-select:none;
  padding:6px 13px; border-radius:999px; border:1.5px solid var(--line); background:var(--paper);
  color:var(--ink-soft); transition:.15s; display:inline-flex; align-items:center; gap:6px; }
.hanrei-chip .hanrei-dotmark{ width:8px;height:8px;border-radius:50%; }
.hanrei-chip:hover{ border-color:var(--ink-mute); }
.hanrei-chip[aria-pressed="true"]{ background:var(--ink); color:#fff; border-color:var(--ink); }
.hanrei-chip.hanrei-lv[aria-pressed="true"]{ color:#fff; }

/* ---------- Era sections ---------- */
.hanrei-era{ padding:36px 0 4px; scroll-margin-top:120px; }
.hanrei-era > h2{ font-family:var(--round); font-weight:900; font-size:27px; margin:0 0 4px; display:inline-block;
  position:relative; }
.hanrei-era > h2 .hanrei-marker{ position:relative; z-index:1; }
.hanrei-era > h2 .hanrei-marker::after{ content:''; position:absolute; left:-3px; right:-3px; bottom:2px; height:42%;
  background:var(--sun-soft); z-index:-1; transform:rotate(-.5deg); border-radius:2px; }
.hanrei-era .hanrei-yrange{ font-family:var(--mincho); font-weight:700; font-size:14px; color:var(--ink-mute); margin-left:12px; }
.hanrei-era .hanrei-ecount{ font-size:12.5px; color:var(--ink-mute); margin:8px 0 0; }

/* ---------- Year group + rows ---------- */
.hanrei-yrgroup{ display:grid; grid-template-columns:84px 1fr; gap:0; }
.hanrei-yrtag{ position:relative; }
.hanrei-yrtag .hanrei-yr{ position:sticky; top:130px; font-family:var(--round); font-weight:900; font-size:19px; color:var(--accent);
  padding:14px 0 0; }
.hanrei-yrtag .hanrei-yr .hanrei-wa{ display:block; font-size:11px; font-weight:700; color:var(--ink-mute); letter-spacing:.02em; }
.hanrei-yrtag::before{ content:''; position:absolute; left:0; top:0; bottom:0; width:2px; background:var(--line); }
.hanrei-rows{ padding:8px 0 8px; }

.hanrei-row{ display:grid; grid-template-columns:54px 1fr auto; gap:14px; align-items:start;
  padding:13px 16px 13px 20px; margin:0 0 0 -1px; border-left:2px solid transparent;
  border-radius:0 12px 12px 0; text-decoration:none; color:inherit; position:relative;
  transition:background .14s, border-color .14s; }
.hanrei-row::before{ content:''; position:absolute; left:-5px; top:21px; width:9px;height:9px; border-radius:50%;
  background:var(--paper); border:2px solid var(--line); transition:.14s; }
.hanrei-row:hover{ background:var(--paper); border-left-color:var(--brand); }
.hanrei-row:hover::before{ border-color:var(--brand); background:var(--brand); }
.hanrei-row .hanrei-md{ font-family:var(--round); font-weight:700; font-size:14px; color:var(--ink-soft); padding-top:2px; white-space:nowrap; }
.hanrei-row .hanrei-main{ min-width:0; }
.hanrei-row .hanrei-nm{ font-family:var(--gothic); font-weight:700; font-size:15.5px; line-height:1.55; color:var(--ink);
  text-wrap:pretty; }
.hanrei-row:hover .hanrei-nm{ color:var(--brand-deep); }
.hanrei-row .hanrei-meta{ display:flex; gap:9px; align-items:center; flex-wrap:wrap; margin-top:6px; }
.hanrei-badge{ font-family:var(--gothic); font-weight:700; font-size:11px; padding:3px 9px; border-radius:999px;
  display:inline-flex; align-items:center; gap:5px; white-space:nowrap; }
.hanrei-badge .hanrei-d{ width:6px;height:6px;border-radius:50%; }
.hanrei-src{ font-family:var(--mincho); font-weight:700; font-size:12.5px; color:var(--ink-mute); }
.hanrei-row .hanrei-go{ align-self:center; display:flex; align-items:center; gap:7px; white-space:nowrap; }
.hanrei-thumb{ width:36px; height:36px; border-radius:8px; object-fit:cover; flex:none; box-shadow:0 1px 4px rgba(0,0,0,.15); }
.hanrei-status{ font-family:var(--gothic); font-weight:700; font-size:11px; padding:4px 10px; border-radius:999px; }
.hanrei-status.hanrei-soon{ background:var(--line-soft); color:var(--ink-mute); }
.hanrei-status.hanrei-live{ background:var(--brand); color:#fff; }
.hanrei-row .hanrei-arrow{ width:20px;height:20px; border-radius:50%; display:grid; place-items:center; color:var(--ink-mute);
  flex:none; transition:.14s; }
.hanrei-row .hanrei-arrow svg{ width:13px;height:13px; }
.hanrei-row.hanrei-has:hover .hanrei-arrow{ background:var(--brand); color:#fff; transform:translateX(2px); }
.hanrei-row:not(.hanrei-has){ cursor:default; }
.hanrei-row:not(.hanrei-has):hover{ background:var(--paper); border-left-color:var(--line); }
.hanrei-row:not(.hanrei-has):hover::before{ border-color:var(--line); background:var(--paper); }
.hanrei-row:not(.hanrei-has):hover .hanrei-nm{ color:var(--ink); }

/* court level colors */
.hanrei-lv-saiko{ background:var(--accent-soft); color:var(--accent); } .hanrei-lv-saiko .hanrei-d{background:var(--accent);}
.hanrei-lv-daishin{ background:var(--brown-soft); color:var(--brown); } .hanrei-lv-daishin .hanrei-d{background:var(--brown);}
.hanrei-lv-kotou{ background:var(--leaf-soft); color:#3f7a4f; } .hanrei-lv-kotou .hanrei-d{background:var(--leaf);}
.hanrei-lv-chihou{ background:var(--pink-soft); color:#c14668; } .hanrei-lv-chihou .hanrei-d{background:var(--pink);}
.hanrei-lv-other{ background:var(--line-soft); color:var(--ink-mute); } .hanrei-lv-other .hanrei-d{background:var(--ink-mute);}
.hanrei-chip.hanrei-lv[data-lv="saiko"][aria-pressed="true"]{ background:var(--accent); border-color:var(--accent); }
.hanrei-chip.hanrei-lv[data-lv="daishin"][aria-pressed="true"]{ background:var(--brown); border-color:var(--brown); }
.hanrei-chip.hanrei-lv[data-lv="kotou"][aria-pressed="true"]{ background:var(--leaf); border-color:var(--leaf); }
.hanrei-chip.hanrei-lv[data-lv="chihou"][aria-pressed="true"]{ background:var(--pink); border-color:var(--pink); }
.hanrei-chip.hanrei-lv[data-lv="other"][aria-pressed="true"]{ background:var(--ink-mute); border-color:var(--ink-mute); }

/* field checkbox chips */
.hanrei-chips.hanrei-fields{ padding-bottom:2px; }
.hanrei-fchip{ display:inline-flex; align-items:center; gap:7px; cursor:pointer; user-select:none;
  font-family:var(--gothic); font-weight:700; font-size:12.5px; color:var(--ink-soft);
  padding:6px 12px 6px 8px; border-radius:999px; border:1.5px solid var(--line); background:var(--paper); transition:.15s; }
.hanrei-fchip .hanrei-box{ width:16px;height:16px;border-radius:5px; border:1.8px solid #cfc6b4; background:#fff;
  display:grid; place-items:center; flex:none; transition:.15s; }
.hanrei-fchip .hanrei-box svg{ width:10px;height:10px; color:#fff; opacity:0; transition:.1s; }
.hanrei-fchip .hanrei-ct{ font-family:var(--round); font-weight:700; font-size:11px; color:var(--ink-mute); }
.hanrei-fchip:hover{ border-color:var(--c); }
.hanrei-fchip[aria-pressed="true"]{ background:var(--cs); border-color:var(--c); color:var(--c); }
.hanrei-fchip[aria-pressed="true"] .hanrei-box{ background:var(--c); border-color:var(--c); }
.hanrei-fchip[aria-pressed="true"] .hanrei-box svg{ opacity:1; }
.hanrei-fchip[aria-pressed="true"] .hanrei-ct{ color:var(--c); opacity:.7; }
.hanrei-clearbtn{ font-family:var(--gothic); font-weight:700; font-size:12px; cursor:pointer; color:var(--brand-deep);
  background:var(--brand-soft); border:1.5px solid #f6cdb9; border-radius:999px; padding:6px 12px; transition:.15s; }
.hanrei-clearbtn:hover{ background:var(--brand); color:#fff; border-color:var(--brand); }

/* field tag pills on rows */
.hanrei-ftags{ display:inline-flex; gap:5px; flex-wrap:wrap; }
.hanrei-ftag{ font-family:var(--gothic); font-weight:700; font-size:10.5px; line-height:1.5; padding:2px 8px; border-radius:6px;
  background:var(--cs); color:var(--c); white-space:nowrap; }

.hanrei-empty{ text-align:center; padding:60px 20px; color:var(--ink-mute); font-family:var(--mincho); font-weight:700; font-size:16px; display:none; }

/* ---------- Footer note / CTA ---------- */
.hanrei-footnote{ margin:48px 0 0; padding:24px; background:var(--accent-soft); border-radius:18px; }
.hanrei-footnote h3{ font-family:var(--round); font-weight:900; font-size:17px; margin:0 0 6px; color:var(--accent); }
.hanrei-footnote p{ font-size:13.5px; color:var(--ink-soft); margin:0; line-height:1.85; }

.hanrei-backtop{ position:fixed; right:22px; bottom:22px; width:46px;height:46px; border-radius:50%;
  background:var(--ink); color:#fff; border:none; cursor:pointer; display:none; place-items:center; z-index:40;
  box-shadow:0 6px 18px rgba(0,0,0,.18); }
.hanrei-backtop svg{ width:18px;height:18px; }
.hanrei-backtop.hanrei-show{ display:grid; }

@media (max-width:720px){
  .hanrei-wrap,.hanrei-toolbar-inner{ padding-left:16px; padding-right:16px; }
  .hanrei-hero h1{ font-size:30px; }
  .hanrei-yrgroup{ grid-template-columns:60px 1fr; }
  .hanrei-yrtag .hanrei-yr{ font-size:16px; }
  .hanrei-row{ grid-template-columns:1fr; gap:6px; padding:12px 14px; }
  .hanrei-row .hanrei-md{ font-size:13px; }
  .hanrei-row .hanrei-go{ align-self:start; }
  .hanrei-jump{ display:none; }
}
