/* category pages (large / middle / small). Loaded after common.css. */

/* ===== main visual (the breadcrumb above it is in common.css) ===== */
/* the photo keeps its own colours: nothing is laid over it. The copy sits on a navy panel cut diagonally, with a gold edge.
   No repeating pattern on this panel or on .box-navy: the client avoids dense patterns on wide faces (thin bars such as headings keep the seigaiha).
   The panel has two wide bands of light instead (chosen 2026-10-13) */
.cat-mv,.box-navy{--navy-face:linear-gradient(160deg,#1c0f92 0%,#100169 46%,#09004d 100%)}
.cat-mv{position:relative;width:min(var(--w),100% - 80px);margin:14px auto 36px;border-radius:var(--r);overflow:hidden;border:3px solid transparent;background:var(--navy) padding-box,var(--gold-grad) border-box;box-shadow:0 14px 30px -18px rgba(18,20,46,.35);isolation:isolate}
.cat-mv>img{position:absolute;right:0;top:0;width:54%;height:100%;object-fit:cover;z-index:-2}
.cat-mv::before{content:"";position:absolute;left:0;top:0;bottom:0;width:calc(54% + 7px);background:var(--gold-grad);clip-path:polygon(0 0,100% 0,86% 100%,0 100%);z-index:-1}
.cat-mv-in{position:relative;width:54%;min-height:400px;padding:42px 9% 40px 40px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;color:#fff;background:linear-gradient(112deg,transparent 0 30%,rgba(255,255,255,.07) 30% 44%,transparent 44% 52%,rgba(255,255,255,.04) 52% 57%,transparent 57%),var(--navy-face);clip-path:polygon(0 0,100% 0,86% 100%,0 100%)}
.cat-mv .lab{display:inline-flex;align-items:center;gap:8px;font-size:14px;font-weight:900;letter-spacing:.12em;color:#fff;background:var(--accent);padding:6px 18px;line-height:1.5;margin-bottom:16px;transform:skewX(-8deg);box-shadow:3px 3px 0 rgba(0,0,0,.25)}
.cat-mv .lab::before{content:"＼"}
.cat-mv .lab::after{content:"／"}
.cat-mv h1{font-size:clamp(30px,3.6vw,46px);font-weight:900;line-height:1.25;letter-spacing:.05em;text-shadow:0 2px 0 rgba(0,0,0,.25)}
.cat-mv h1 small{display:block;font-size:.4em;font-weight:700;letter-spacing:.12em;margin-bottom:8px;color:#e9d48a}
.cat-mv .catch{font-size:clamp(16px,1.7vw,20px);font-weight:700;line-height:1.6;margin-top:16px;color:#ffe27a}
.cat-mv .sub{font-size:13.5px;line-height:1.8;margin-top:6px;max-width:30em}
.cat-mv .free{display:flex;flex-wrap:wrap;gap:8px;margin-top:22px}
.cat-mv .free li{font-size:13px;font-weight:700;background:#fff;color:var(--navy);border-radius:4px;padding:4px 12px;line-height:1.6;border-bottom:3px solid var(--gold)}
.cat-mv .free b{color:var(--accent);font-size:1.3em;font-weight:900;margin-left:4px}

/* ===== intro ===== */
.cat-intro{background:var(--paper);border-radius:var(--r);padding:32px 36px 34px;border-top:4px solid var(--navy)}
.cat-intro h2{font-size:22px;font-weight:700;line-height:1.5;letter-spacing:.05em;margin-bottom:14px}
.cat-intro p{font-size:14.5px;line-height:2}

/* ===== featured (three child categories flagged in the CMS) ===== */
.feats{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.feat{position:relative;display:flex;flex-direction:column;align-items:center;text-align:center;background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:26px 16px 20px;transition:box-shadow .2s,transform .2s}
.feat:hover{box-shadow:0 10px 28px rgba(16,1,105,.14);transform:translateY(-2px)}
.feat .tag{position:absolute;top:0;left:0;font-size:11.5px;font-weight:700;letter-spacing:.1em;color:#fff;background:var(--accent);padding:3px 12px;border-radius:var(--r) 0 var(--r) 0;line-height:1.7}
.feat img{width:132px;height:132px;object-fit:contain}
.feat>div{display:flex;flex-direction:column;align-items:center}
.feat b{font-size:17px;font-weight:700;line-height:1.5;margin-top:10px}
.feat small{font-size:12.5px;color:var(--muted);line-height:1.7;margin-top:4px}
.feat .go{margin-top:12px;font-size:13px;font-weight:700;color:var(--navy);border-bottom:1px solid currentColor;line-height:1.5}

/* ===== market rate (gold only) ===== */
.rate{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:18px;align-items:start}
.rate-box{background:#fff;border:1px solid var(--line);border-radius:var(--r);overflow:hidden}
.rate-box h3{font-size:15px;font-weight:700;letter-spacing:.06em;color:#fff;background:var(--navy);padding:11px 18px;display:flex;justify-content:space-between;align-items:baseline;gap:10px;word-break:auto-phrase}
.rate-box h3 time{font-size:12px;font-weight:500;opacity:.85;white-space:nowrap}
.rate-table{width:100%;border-collapse:collapse;font-size:14px}
.rate-table th,.rate-table td{padding:9px 16px;border-top:1px solid var(--line);text-align:left;line-height:1.6}
.rate-table tr:first-child :is(th,td){border-top:0}
.rate-table th{font-weight:700;white-space:nowrap}
.rate-table th small{font-weight:500;color:var(--muted);margin-left:6px;font-size:12px}
.rate-table td{text-align:right;font-weight:700;font-size:18px;white-space:nowrap}
.rate-table td small{font-size:12px;font-weight:500;margin-left:2px}
.rate-table td i{font-style:normal;font-size:12px;font-weight:700;color:var(--accent);margin-left:10px}
.rate-table td i::before{content:"▲"}
.rate-table td i.dn{color:var(--blue)}
.rate-table td i.dn::before{content:"▼"}
.rate-table td i.eq{color:var(--muted)}.rate-table td i.eq::before{content:none}
.rate-table .grp th{background:var(--paper);font-size:12.5px;letter-spacing:.1em;padding-block:6px}
.rate-chart{padding:16px 16px 10px}
.rate-chart svg{display:block;width:100%;height:auto}
.rate-chart p{font-size:12px;color:var(--muted);line-height:1.7;margin-top:6px}
.calc{padding:18px}
.calc-row{display:grid;grid-template-columns:1fr auto 1fr;gap:10px;align-items:end}
.calc label{display:block;font-size:12.5px;font-weight:700;margin-bottom:4px}
.calc select,.calc input{width:100%;font:inherit;font-size:16px;color:var(--ink);border:1px solid #b9bbcb;border-radius:4px;padding:8px 10px;background:#fff}
.calc-row>span{font-weight:700;padding-bottom:10px}
.calc-out{margin-top:14px;background:var(--paper);border-radius:4px;padding:12px 16px;display:flex;justify-content:space-between;align-items:baseline;gap:10px;font-size:13px;font-weight:700}
.calc-out b{font-size:26px;font-weight:900;color:var(--accent);white-space:nowrap}
.calc-out b small{font-size:13px;margin-left:2px}
.rate-side{display:grid;gap:18px}

/* ===== reference prices (from the reference-price master) ===== */
.ref-tabs{display:flex;justify-content:center;margin-bottom:22px}
/* tabs that do not fit on one line become a select (js/category.js, ISSUE-216); the same look as the post lists' select */
.ref-select{width:min(100%,420px);height:48px;padding:0 40px 0 14px;font:inherit;font-size:16px;font-weight:700;color:var(--navy);border:2px solid var(--navy);border-radius:0;background:#fff url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%23100169%27 stroke-width=%272.5%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M6 9l6 6 6-6%27/%3E%3C/svg%3E") right 12px center/18px no-repeat;appearance:none;cursor:pointer}
.ref-select[hidden],.ref-tabs .tabs[hidden]{display:none}
.refs{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
/* same gold frame as the result cards, so they stand out from the patterned page background */
.ref{position:relative;display:flex;flex-direction:column;border-radius:6px;border:3px solid transparent;background:linear-gradient(#fff,#fff) padding-box,var(--gold-grad) border-box;box-shadow:0 14px 30px -18px rgba(18,20,46,.25);overflow:hidden}
.ref[hidden]{display:none}
.ref .ph{aspect-ratio:1;background:#fff;border-bottom:1px solid var(--line);display:grid;place-items:center}
/* the photo fills the square, so a landscape snapshot sits as well as a square cut-out (ISSUE-147) */
.ref .ph img{width:100%;height:100%;object-fit:cover}
.ref .bd{padding:12px 14px 14px;display:flex;flex-direction:column;flex:1}
.ref .cat{position:absolute;left:0;top:0;background:var(--navy);color:#fff;font-size:11.5px;font-weight:700;letter-spacing:.08em;line-height:1;padding:8px 12px;border-bottom:2px solid var(--gold)}
.ref .name{font-size:14px;font-weight:700;line-height:1.6;color:var(--navy);flex:1;word-break:auto-phrase}
.ref .lab{align-self:flex-start;font-size:11px;font-weight:700;background:var(--navy);color:#fff;border-radius:3px;padding:1px 8px;margin-top:8px;line-height:1.7}
.ref .price{font-size:23px;font-weight:900;color:var(--accent);line-height:1.3;letter-spacing:.01em;line-break:strict}
.ref .price small{font-size:12px;margin-left:2px}
.ref .asof{margin-top:2px;font-size:11px;font-weight:500;line-height:1.4;color:var(--muted)}
.sub-head{font-size:19px;font-weight:700;letter-spacing:.06em;text-align:center;margin:44px 0 20px;display:flex;align-items:center;gap:16px}
.sub-head::before,.sub-head::after{content:"";flex:1;height:1px;background:var(--line)}

/* ===== poor condition welcome: one navy panel holding white cards, so it reads differently from the gold-framed cards above and below ===== */
.box-navy{background:var(--navy-face);border-radius:var(--r);border:3px solid transparent;background-clip:padding-box;box-shadow:0 0 0 3px #c9a94e;padding:44px 28px 30px;margin:3px}
.box-navy .head{margin-bottom:30px}
.box-navy .head :is(h2){color:#fff}
.box-navy .head :is(h2) i{color:#ffe27a}
.box-navy .head p{color:#e6e7f5}
.box-navy .head-wm{color:#fff;opacity:.06}
.box-navy .eyebrow{background:#fff;color:var(--navy)}
.box-navy .cond{border:0}
.conds{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.cond{position:relative;background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:14px 14px 16px;text-align:center}
.cond .ph{aspect-ratio:4/3;background:var(--paper);border-radius:4px;display:grid;place-items:center;margin-bottom:12px}
.cond .ph img{width:100%;height:100%;object-fit:cover;border-radius:4px}
.cond .ok{position:absolute;top:6px;left:6px;width:54px;height:54px;border-radius:50%;background:var(--accent);color:#fff;font-size:12px;font-weight:900;line-height:1.25;display:grid;place-items:center;transform:rotate(-10deg);box-shadow:0 2px 6px rgba(0,0,0,.18)}
.cond h3{font-size:15px;font-weight:700;line-height:1.5}
.cond p{font-size:12.5px;line-height:1.75;color:#444;margin-top:6px;text-align:left;text-wrap:pretty}

/* ===== what the shop does not buy: optional, one small note (ISSUE-194). A box with its own heading right
   after "welcome" read as negative, so it is the foot of the welcome box, or a line alone in its place. ===== */
.rejects-note{margin:0;font-size:12.5px;line-height:1.75;color:var(--muted);text-wrap:pretty}
.box-navy .rejects-note{margin-top:18px;color:#d6d8ef}
.sec-rejects{padding:0}
.sec:has(+ .sec-rejects){padding-bottom:24px}

/* ===== purity guide (gold only) ===== */
.guide{width:100%;border-collapse:collapse;background:#fff;font-size:13.5px;border:1px solid var(--line)}
.guide th,.guide td{padding:11px 14px;border-top:1px solid var(--line);text-align:left;vertical-align:top;line-height:1.75}
.guide thead th{background:var(--navy);color:#fff;font-size:13px;letter-spacing:.06em;border-top:0;white-space:nowrap}
.guide tbody th{font-weight:900;font-size:16px;white-space:nowrap;background:var(--paper)}
.guide td:nth-child(2){white-space:nowrap;font-weight:700}
.guide-wrap{overflow-x:auto}

/* the reason cards carry appraisal points here, so the photo is shorter than on the TOP page */
.points .reason .photo{aspect-ratio:16/10}
/* five reasons stack as wide rows here, photo alternating sides (the TOP page keeps three in a row) */
@media (min-width:901px){
  .points .reasons{grid-template-columns:1fr;gap:20px}
  .points .reason{grid-template-columns:2fr 3fr;grid-template-rows:none}
  .points .reason:nth-child(even){grid-template-columns:3fr 2fr}
  .points .reason:nth-child(even) .photo{order:2}
  .points .reason .photo{aspect-ratio:auto;min-height:220px}
  .points .reason .body{justify-content:center;padding:28px 32px}
}

@media (max-width:1100px){
  .refs{grid-template-columns:repeat(3,1fr)}
  /* 2, not 3: the cards come 4 or 8, so every row stays full (ISSUE-143); photo on the left as on the phone, so 2 per row stays short */
  .conds{grid-template-columns:repeat(2,minmax(0,1fr))}
  .cond{display:grid;grid-template-columns:120px minmax(0,1fr);column-gap:14px;align-items:center;text-align:left}
  .cond .ph{grid-row:1/3;margin-bottom:0;aspect-ratio:1}
  .cond h3{align-self:end}
  .cond p{align-self:start;margin-top:4px}
}
@media (max-width:900px){
  .cat-mv{width:min(var(--w),100% - 40px)}
  .cat-mv{margin-bottom:8px}
  .cat-mv>img{position:static;width:100%;height:auto;aspect-ratio:16/9}
  .cat-mv::before{position:static;display:block;width:auto;height:4px;clip-path:none}
  .cat-mv-in{width:auto;min-height:0;padding:24px 20px 26px;clip-path:none}
  .cat-intro{padding:24px 20px 26px}
  .cat-intro h2{font-size:19px}
  .feats{grid-template-columns:1fr;gap:10px}
  .feat{flex-direction:row;text-align:left;align-items:center;gap:14px;padding:18px 16px 14px;flex-wrap:wrap}
  .feat img{width:84px;height:84px}
  .feat>div{flex:1;min-width:0;display:flex;flex-direction:column;align-items:flex-start}
  .feat b{margin-top:0}
  .rate{grid-template-columns:1fr}
  .refs{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  /* one per row with the photo on the left: two per row leaves lines too short for Japanese */
  .conds{grid-template-columns:1fr;gap:10px}
  .box-navy{padding:30px 14px 16px}
  .cond{display:grid;grid-template-columns:104px minmax(0,1fr);column-gap:14px;align-items:center;text-align:left;padding:12px 14px}
  .cond .ph{grid-row:1/3;margin-bottom:0;aspect-ratio:1}
  .cond .ok{width:44px;height:44px;font-size:10.5px;top:4px;left:4px}
  .cond h3{align-self:end}
  .cond p{align-self:start;margin-top:4px}
  .ref .price{font-size:20px}
  .sub-head{font-size:17px;margin:32px 0 16px}
  .box-navy .rejects-note{margin-top:14px}
}

/* ---------- sidebar: middle / child categories of this large category (PC only, like the rest of the sidebar) ---------- */
.side-cat h2 a{color:inherit}
.side-cat li+li{border-top:1px solid var(--line)}
.side-cat .row{display:flex;align-items:stretch}
.side-cat .side-body a{flex:1;display:flex;align-items:center;gap:10px;min-height:56px;padding:6px 10px;font-weight:700;line-height:1.4;color:var(--navy);transition:background .2s}
.side-cat .side-body a:hover{background:var(--paper)}
.side-cat .side-body a[aria-current]{background:#f5efdc}
.side-cat img{flex:none;width:44px;height:44px;object-fit:contain}
.side-cat button{flex:none;width:44px;border:0;border-left:1px solid var(--line);background:none}
.side-cat button::before{content:"";display:block;width:8px;height:8px;margin:0 auto;border-right:2px solid var(--navy);border-bottom:2px solid var(--navy);transform:translateY(-2px) rotate(45deg);transition:transform .2s}
.side-cat button[aria-expanded="true"]::before{transform:translateY(2px) rotate(225deg)}
.side-cat ul ul{border-top:1px solid var(--line);background:#f6f6fa}
.side-cat .side-body ul a{min-height:48px;padding-left:24px;font-size:13px}
.side-cat ul ul img{width:36px;height:36px}
