/* 夫の髭を剃る 攻略図鑑 — colours taken from the game itself: the washroom's off-white tiles (#e9e6de),
   the dark tool buttons (#262320) and the one red button, 終わる (#8f1d1d). Everything else is neutral. */
:root {
  --bg: #f4f2ec;
  --paper: #fffefb;
  --ink: #262320;
  --mute: #66615a;
  --line: #ddd8cd;
  --tile: #e9e6de;
  --red: #8f1d1d;
  --red-soft: #f6e9e6;
  --ok: #3d6b4f;
  --sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.8 var(--sans); }
a { color: var(--red); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
main.wrap { padding-bottom: 48px; }

/* header */
.top { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top .wrap { display: flex; align-items: center; gap: 20px; min-height: 56px; }
.mark { font: 600 19px/1.2 var(--serif); color: var(--ink); text-decoration: none; letter-spacing: .06em; white-space: nowrap; }
.mark span { font: 500 12px var(--sans); color: var(--mute); margin-left: 8px; letter-spacing: 0; }
.nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; margin-left: auto; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--ink); text-decoration: none; font-size: 14px; padding: 6px 10px; border-radius: 4px; white-space: nowrap; transition: background .15s; }
.nav a:hover { background: var(--tile); }
.nav a[aria-current] { background: var(--ink); color: #fff; }
.crumbs { font-size: 13px; color: var(--mute); margin: 18px 0 0; }
.crumbs a { color: var(--mute); }

h1 { font: 600 30px/1.4 var(--serif); letter-spacing: .02em; margin: 28px 0 12px; }
h1 small { display: block; font: 500 16px/1.6 var(--sans); color: var(--mute); margin-top: 4px; letter-spacing: 0; }
h2 { font-size: 22px; line-height: 1.5; margin: 44px 0 12px; padding-top: 4px; }
h3 { font-size: 18px; margin: 28px 0 8px; }
p, ul, ol { margin: 0 0 14px; }
.lead { font-size: 17px; max-width: 46em; }
.meta, .fine { font-size: 13px; color: var(--mute); }
section { max-width: 820px; }

/* figures */
.shot { margin: 18px 0; }
.shot img { border-radius: 6px; border: 1px solid var(--line); background: var(--tile); }
.shot figcaption { font-size: 13px; color: var(--mute); margin-top: 6px; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.two .shot { margin: 0; }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 32px; align-items: center; max-width: none; padding: 8px 0 4px; }
.hero h1 { font-size: 36px; margin: 20px 0 6px; }
.sub1 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.sub1 small { display: block; font-size: 13px; font-weight: 400; color: var(--mute); margin-top: 6px; }
.hero-shot { margin: 20px 0 0; }
.hero-shot img { aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 30%; }

/* 図鑑チェッカー */
.zukan { max-width: 820px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px 12px; margin-top: 22px; }
.zk-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.zk-head h2 { margin: 0; font-size: 20px; }
.zk-count { margin: 0; color: var(--mute); }
.zk-count b { font-size: 22px; color: var(--ink); font-variant-numeric: tabular-nums; }
.tabs { display: flex; gap: 6px; margin: 14px 0 6px; flex-wrap: wrap; }
.tabs button { font: inherit; font-size: 15px; padding: 7px 16px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 999px; cursor: pointer; transition: background .15s, color .15s; }
.tabs button[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.list { list-style: none; padding: 0; margin: 0; }
.row { display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: start; border-top: 1px solid var(--line); padding: 10px 0; transition: background .2s; }
.row:first-child { border-top: 0; }
.row.has-thumb { grid-template-columns: 36px 64px minmax(0, 1fr); column-gap: 12px; }
.row .thumb { margin: 0; }
.row .thumb img { width: 64px; height: 80px; object-fit: cover; object-position: 50% 60%; border-radius: 4px; }
.tick { display: flex; justify-content: center; padding-top: 4px; cursor: pointer; }
.tick input, .got input { width: 20px; height: 20px; accent-color: var(--ok); cursor: pointer; margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.rb { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 12px; }
.nm { font-weight: 600; font-size: 17px; color: var(--ink); text-decoration: none; }
a.nm:hover { color: var(--red); text-decoration: underline; }
.sub { font-size: 14px; color: var(--mute); flex: 1 1 280px; }
.tag { font-size: 12px; color: var(--red); border: 1px solid var(--red); border-radius: 3px; padding: 0 6px; line-height: 1.6; white-space: nowrap; }
.row.got { background: #eef4ef; }
.row.got .nm { color: var(--ok); }
.more { font-size: 14px; }

/* 証拠カード */
.evsec { max-width: none; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sec-head h2 { margin-bottom: 4px; }
.evgrid { list-style: none; padding: 0; margin: 16px 0 8px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.evc { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; transition: border-color .2s, box-shadow .2s; }
.evc:hover { border-color: #bdb6a8; }
.evc .shot { margin: 0; }
.evc .shot img { border: 0; border-radius: 0; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.evc#mark img { object-position: 85% 92%; }
.evc#hair img { object-position: 62% 40%; }
.evc#negoto img { object-position: 50% 40%; }
.evc#deny img { object-position: 35% 55%; }
.evc#scent img { object-position: 30% 45%; }
.evb { padding: 10px 12px 12px; display: flex; flex-direction: column; flex: 1; }
.evn { font-size: 12px; color: var(--red); font-weight: 600; margin: 0; }
.evb h3 { font: 600 17px/1.4 var(--serif); margin: 2px 0 6px; }
.spot { font-size: 14px; line-height: 1.65; margin: 0 0 6px; }
.gh { font-size: 12.5px; color: var(--mute); line-height: 1.6; margin: 0 0 10px; }
.got { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; align-self: flex-start; padding: 4px 10px 4px 6px; border: 1px solid var(--line); border-radius: 999px; transition: background .2s, border-color .2s; }
.got:hover { border-color: var(--ok); }
.evc.got { border-color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok); }
.evc.got .got { background: #eef4ef; border-color: var(--ok); color: var(--ok); }
.free-h { font-size: 18px; margin-top: 26px; }
.evsec > p, .evsec > .steps, .evsec > h3 { max-width: 820px; }

/* locked + wall */
.locked.open { border-left: 3px solid var(--ok); padding-left: 14px; }
.locked.open .lockline { display: none; }
.wall { background: var(--red-soft); border: 1px solid #e5cbc5; border-radius: 8px; padding: 18px 20px; margin: 18px 0; max-width: 820px; scroll-margin-top: 80px; }
.wall-h { font: 600 19px/1.5 var(--serif); margin-bottom: 4px; }
.wall-price { margin-bottom: 12px; font-size: 14px; color: var(--mute); }
.wall-price b { font-size: 22px; color: var(--red); margin-right: 2px; font-variant-numeric: tabular-nums; }
.wall-list { display: grid; grid-template-columns: 11em minmax(0, 1fr); gap: 6px 14px; font-size: 14px; margin: 0 0 16px; }
.wall-list dt { font-weight: 600; }
.wall-list dd { margin: 0; color: #4a453f; }
.lockline { font-size: 14px; color: var(--mute); border: 1px dashed #d8c3bd; border-radius: 6px; padding: 8px 12px; background: var(--paper); }
.buy { font: inherit; font-weight: 600; font-size: 17px; background: var(--red); color: #fff; border: 0; border-radius: 6px; padding: 10px 26px; cursor: pointer; transition: transform .1s, background .15s; }
.buy:hover { background: #7a1717; }
.buy:active { transform: translateY(1px); }
.buy:disabled { opacity: .7; cursor: wait; }
.restore { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed #e0c4bd; }
.restore input { font: inherit; font-size: 14px; flex: 1 1 200px; padding: 9px 10px; border: 1px solid #8f877b; border-radius: 4px; background: #fff; }
.restore button { font: inherit; font-size: 14px; padding: 9px 12px; border: 1px solid var(--ink); background: var(--paper); border-radius: 4px; cursor: pointer; }
.restore [data-restore-msg] { flex-basis: 100%; margin: 0; }
.restore [data-restore-msg]:empty { display: none; }

/* lists, steps */
.steps { padding-left: 1.4em; }
.steps li { margin-bottom: 8px; }
.steps li::marker { color: var(--red); font-weight: 600; }
.hint { color: var(--mute); font-size: 15px; }
.talk { font-size: 14px; color: var(--mute); border-left: 2px solid var(--line); padding-left: 10px; }
.toc { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 12px 18px; margin: 18px 0; font-size: 15px; max-width: 820px; }
.toc ol { margin: 6px 0 0; }
.ev { border-top: 1px solid var(--line); margin-top: 32px; }
.ev h2 { margin-top: 24px; }
.dlg { list-style: none; padding: 0; }
.dlg li { padding: 6px 0; border-bottom: 1px dotted var(--line); }
.kv { display: grid; grid-template-columns: 6em minmax(0, 1fr); gap: 10px 18px; margin: 0; }
.kv dt { font-weight: 600; }
.kv dd { margin: 0; }
.formula { font-weight: 600; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 12px 16px; }

/* tables */
.tablewrap { overflow-x: auto; margin: 14px 0 18px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--line); }
th { background: var(--tile); font-size: 13px; font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td small, td .q { display: block; font-size: 13px; color: var(--mute); }
.rep { display: block; margin-bottom: 4px; }
.pill { font-size: 11px; border-radius: 3px; padding: 0 5px; margin-left: 6px; vertical-align: 1px; }
.pill.kind { background: #e3eee7; color: var(--ok); }
.pill.cold { background: #ece8e1; color: var(--mute); }
.ends tr:target, .ends tr:target td { background: var(--red-soft); }
.next { max-width: none; border-top: 1px solid var(--line); margin-top: 48px; }
.next h2 { font-size: 18px; }

/* cards (home guides) */
.guides { max-width: none; }
.cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.cards a { display: block; text-decoration: none; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; height: 100%; transition: border-color .15s, transform .15s; }
.cards a:hover { border-color: var(--ink); transform: translateY(-2px); }
.cards .shot { margin: 0; }
.cards .shot img { border: 0; border-radius: 0; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.cards b { display: block; padding: 10px 12px 2px; }
.cards span { display: block; padding: 0 12px 12px; font-size: 13px; color: var(--mute); line-height: 1.6; }

/* styles grid */
.styles { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; max-width: 820px; }
.styles li { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.styles .thumb { margin: 0; }
.styles .thumb img { aspect-ratio: 3 / 4; object-fit: cover; width: 100%; }
.styles b { display: block; padding: 8px 10px 0; }
.styles span { display: block; padding: 0 10px 10px; font-size: 13px; color: var(--mute); }

/* calc */
.calc { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 16px 20px 18px; margin-top: 18px; }
.calc h2 { margin: 0 0 4px; font-size: 20px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 12px 0; }
.grid label { font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.grid input[type=number], .grid select { font: inherit; padding: 6px 8px; border: 1px solid #8f877b; border-radius: 4px; background: #fff; }
.grid .ck { flex-direction: row; align-items: center; gap: 8px; grid-column: span 2; }
.out { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.o-title { font: 600 22px var(--serif); color: var(--red); }
.o-score { font-weight: 600; font-variant-numeric: tabular-nums; }
.o-why { flex-basis: 100%; font-size: 14px; color: var(--mute); }

/* footer */
.foot { border-top: 1px solid var(--line); background: var(--paper); font-size: 13px; color: var(--mute); padding: 20px 0 28px; }
.foot p { max-width: 60em; }
.foot a { color: var(--mute); }

@media (max-width: 760px) {
  body { font-size: 15.5px; }
  .top .wrap { flex-wrap: wrap; gap: 0; padding-top: 8px; }
  .nav { margin: 4px -20px 0; padding: 0 14px 8px; width: calc(100% + 40px); }
  .hero { grid-template-columns: 1fr; gap: 0; }
  .hero h1 { font-size: 27px; }
  .hero-shot { display: none; }
  h1 { font-size: 25px; }
  .two { grid-template-columns: 1fr; }
  .zukan { padding: 14px 12px 8px; margin-left: -8px; margin-right: -8px; }
  .row.has-thumb { grid-template-columns: 32px 52px minmax(0, 1fr); column-gap: 10px; }
  .row .thumb img { width: 52px; height: 66px; }
  .hero h1 { margin-top: 14px; }
  .sub1 { font-size: 16px; margin-bottom: 4px; }
  .evsec .sec-head { flex-wrap: nowrap; }
  .evsec .sec-head h2 { margin-top: 22px; font-size: 20px; }
  .evsec .zk-count { white-space: nowrap; font-size: 14px; }
  .evintro { font-size: 14.5px; line-height: 1.7; margin-bottom: 0; }
  .evgrid { grid-template-columns: 1fr; gap: 10px; margin-top: 12px; }
  .evc { flex-direction: row; }
  .evc .shot { flex: 0 0 112px; }
  .evc .shot img { height: 100%; min-height: 140px; aspect-ratio: auto; }
  .evb { padding: 8px 12px 10px; }
  .evb h3 { font-size: 16px; margin-bottom: 4px; }
  .spot { font-size: 13.5px; }
  .gh { margin-bottom: 8px; }
  .wall { padding: 16px 14px; margin-left: -6px; margin-right: -6px; }
  .wall-list { grid-template-columns: 1fr; gap: 0; }
  .wall-list dd { margin-bottom: 8px; }
  .buy { width: 100%; }
  .talk-t thead { display: none; }
  .talk-t tr, .talk-t td { display: block; }
  .talk-t tr { border-bottom: 1px solid var(--line); padding: 6px 0; }
  .talk-t td { border: 0; padding: 4px 12px; }
  .tools-t td:nth-child(2) { display: none; }
  .tools-t th:nth-child(2) { display: none; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 10px; }
  .grid .ck { grid-column: auto; }
}
.ev .shot { max-width: 440px; }
.styles { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 760px) { .styles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .styles b { font-size: 14px; } .styles span { font-size: 12px; } }
.evtab td:first-child { white-space: nowrap; }
@media (max-width: 760px) { .evtab th:nth-child(3), .evtab td:nth-child(3) { display: none; } .evtab td:first-child { white-space: normal; min-width: 7.5em; } }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.wall-buy { display: flex; align-items: center; gap: 14px 18px; flex-wrap: wrap; margin: 10px 0 16px; }
.wall-buy .wall-price { margin: 0; line-height: 1.5; }
.restore-box { margin-top: 10px; font-size: 14px; }
.restore-box summary { cursor: pointer; color: var(--mute); }
@media (max-width: 760px) {
  .nav { flex-wrap: wrap; overflow: visible; gap: 2px 0; }
  .nav a { padding: 4px 8px; font-size: 13.5px; }
  .sub1 small { display: none; }
  .wall-buy { flex-direction: column; align-items: stretch; }
}
@media (max-width: 760px) { .top { position: static; } }
