:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #29242b;
  background: #ffffff;
  color-scheme: light;
  font-synthesis: none;
  --ink: #29242b;
  --ink-strong: #000000;
  --muted: #575159;
  --muted-soft: #6d6870;
  --page: #ffffff;
  --surface: #ffffff;
  --pink: #ffe1ec;
  --pink-strong: #7d294c;
  --blue: #def2ff;
  --blue-strong: #245c78;
  --yellow: #fff1b8;
  --yellow-strong: #695200;
  --mint: #dff5ea;
  --mint-strong: #246244;
  --lilac: #eee5ff;
  --berry: #29242b;
  --berry-dark: #000000;
  --border: #e5e5e5;
  --action-bad-bg: #f8f4f5;
  --action-bad-ink: #5f3443;
  --action-bad-border: #cbb8bf;
  --action-skip-bg: #f2f3f4;
  --action-skip-ink: #45494f;
  --action-skip-border: #c7cacf;
}

* { box-sizing: border-box; }

html { background: var(--page); }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  overflow-x: hidden;
}

button { font: inherit; }

a,
button { -webkit-tap-highlight-color: transparent; }

a:focus-visible,
button:focus-visible {
  outline: 3px solid #70438b;
  outline-offset: 3px;
}

.app-shell {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 20px 16px 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 4px 2px;
}

.brand {
  display: inline-block;
  padding: 6px 9px;
  color: var(--ink-strong);
  background: var(--yellow);
  border: 1px solid #ead781;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .1em;
}

.tagline {
  margin: 5px 0 0 3px;
  color: var(--muted);
  font-size: 11px;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.top-guide-link {
  padding: 5px 7px;
  color: var(--pink-strong);
  background: var(--pink);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.top-guide-link:hover,
.top-guide-link:focus-visible { color: var(--ink-strong); }

.panel {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 5px 0 rgba(119, 49, 83, .06);
}

.gate {
  margin-top: 10vh;
  border-top: 7px solid #f2a9c5;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  padding: 4px 8px;
  color: var(--pink-strong);
  background: var(--pink);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

h1 {
  margin: 0 0 10px;
  color: var(--ink-strong);
  font-size: 26px;
  line-height: 1.2;
}

h2 {
  margin: 3px 0 6px;
  color: var(--ink-strong);
  font-size: 20px;
  line-height: 1.35;
}

p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.hidden { display: none !important; }

.btn {
  width: 100%;
  margin-top: 10px;
  padding: 14px 16px;
  appearance: none;
  border: 1px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.primary {
  color: #fff;
  background: var(--berry);
  box-shadow: 0 3px 0 var(--berry-dark);
}

.ghost {
  color: var(--blue-strong);
  background: var(--blue);
  border-color: #b7dcef;
}

.btn:hover { filter: brightness(.97); }
.btn:active { box-shadow: none; transform: translateY(2px); }

.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 18px 0 12px;
}

.mode {
  padding: 13px 4px 11px;
  color: var(--muted);
  background: var(--surface);
  border: 2px solid transparent;
  border-radius: 14px;
  cursor: pointer;
}

.mode:nth-child(1) { background: var(--pink); }
.mode:nth-child(2) { background: var(--blue); }
.mode:nth-child(3) { background: var(--yellow); }

.mode strong {
  display: block;
  color: var(--ink-strong);
  font-size: 23px;
}

.mode span {
  display: block;
  margin-top: 2px;
  font-size: 10px;
}

.mode.selected {
  color: var(--ink-strong);
  border-color: var(--berry);
  box-shadow: 0 3px 0 rgba(119, 49, 83, .16);
}

.small-note,
.muted {
  margin-top: 12px;
  color: var(--muted-soft);
  font-size: 11px;
  text-align: center;
}

.progress-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 2px 2px 8px;
  color: var(--muted);
  font-size: 12px;
}

.progress {
  height: 4px;
  overflow: hidden;
  flex: 1;
  background: var(--blue);
  border-radius: 999px;
}

.progress i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--berry);
  transition: width .2s ease;
}

.swipe-stage {
  position: relative;
  isolation: isolate;
}

.work-card {
  position: relative;
  z-index: 2;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 6px 0 rgba(77, 51, 68, .07);
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  will-change: transform;
  transition: transform .18s ease, opacity .16s ease;
}

.work-card.dragging {
  cursor: grabbing;
  transition: none;
}

.work-card:focus-visible {
  outline: 3px solid #70438b;
  outline-offset: 3px;
}

.cover {
  display: grid;
  width: 100%;
  height: min(68svh, calc(100svh - 190px), 680px);
  min-height: 0;
  place-items: center;
  overflow: hidden;
  background: var(--lilac);
}

.cover-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.lens-mark {
  color: var(--muted-soft);
  font-size: 64px;
  line-height: 1;
}

.preference-cover {
  position: relative;
  overflow: hidden;
  background: var(--blue);
  background-image: none !important;
}

.preference-cover::before,
.preference-cover::after {
  position: absolute;
  content: "";
  border-radius: 50%;
}

.preference-cover::before {
  top: -36px;
  left: -22px;
  width: 130px;
  height: 130px;
  background: var(--pink);
}

.preference-cover::after {
  right: -28px;
  bottom: -46px;
  width: 150px;
  height: 150px;
  background: var(--yellow);
}

.preference-cover .lens-mark {
  position: relative;
  z-index: 1;
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  color: var(--berry);
  background: rgba(255, 254, 253, .94);
  border: 2px solid rgba(119, 49, 83, .28);
  border-radius: 50%;
  font-size: 30px;
  font-weight: 800;
}

.swipe-feedback {
  position: absolute;
  z-index: 3;
  padding: 7px 10px;
  opacity: 0;
  border: 2px solid currentColor;
  border-radius: 9px;
  background: rgba(255, 254, 253, .96);
  font-size: 17px;
  font-weight: 800;
  pointer-events: none;
  transition: opacity .1s ease;
}

.feedback-bad {
  top: 18px;
  left: 14px;
  color: var(--action-bad-ink);
  transform: rotate(-7deg);
}

.feedback-like {
  top: 18px;
  right: 14px;
  color: var(--ink-strong);
  transform: rotate(7deg);
}

.feedback-skip {
  top: 12px;
  left: 50%;
  color: var(--action-skip-ink);
  transform: translateX(-50%);
}

.swipe-stage[data-intent="bad"] .feedback-bad,
.swipe-stage[data-intent="skip"] .feedback-skip,
.swipe-stage[data-intent="like"] .feedback-like { opacity: 1; }

.swipe-help {
  margin: 7px 0 8px;
  color: var(--muted-soft);
  font-size: 10px;
  text-align: center;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: 7px;
  margin-bottom: 10px;
}

.action {
  min-height: 44px;
  padding: 7px 4px;
  color: var(--ink);
  border: 2px solid transparent;
  border-radius: 13px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.action.bad {
  color: var(--action-bad-ink);
  background: var(--action-bad-bg);
  border-color: var(--action-bad-border);
}

.action.skip {
  color: var(--action-skip-ink);
  background: var(--action-skip-bg);
  border-color: var(--action-skip-border);
}

.action.like {
  color: #ffffff;
  background: var(--ink-strong);
  border-color: var(--ink-strong);
}

.action:disabled {
  cursor: wait;
  opacity: .45;
}

.action:hover:not(:disabled),
.action:focus-visible:not(:disabled) { border-color: currentColor; }

.result-section { margin-top: 18px; }

.result-section > h2 {
  margin: 0 0 4px;
  font-size: 16px;
}

.result-section > p {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 11px;
}

.answered-section {
  padding: 13px;
  background: var(--mint);
  border: 1px solid #b9dfcb;
  border-radius: 16px;
}

.result-list {
  display: grid;
  gap: 10px;
  margin: 10px 0 16px;
}

.result {
  padding: 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
}

.result:nth-child(3n + 1) { background: var(--yellow); }
.result:nth-child(3n + 2) { background: var(--blue); }
.result:nth-child(3n) { background: var(--pink); }
.answered-result { background: var(--surface) !important; }

.result-summary {
  display: grid;
  grid-template-columns: 30px 58px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
}

.answered-result .result-summary {
  grid-template-columns: 58px minmax(0, 1fr);
}

.result-summary-link {
  color: inherit;
  border-radius: 10px;
  text-decoration: none;
}

.result-summary-link:hover { background: rgba(255, 254, 253, .42); }
.result-summary-link:focus-visible { outline: 3px solid rgba(36, 92, 120, .35); outline-offset: 3px; }

.rank {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--berry);
  background: rgba(255, 254, 253, .72);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.result-cover {
  width: 58px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--lilac);
  border: 1px solid rgba(77, 51, 68, .12);
  border-radius: 8px;
}

.result-cover-placeholder {
  display: grid;
  place-items: center;
  color: var(--berry);
  font-size: 19px;
  font-weight: 800;
}

.result-copy { min-width: 0; }

.result-heading {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  justify-content: space-between;
}

.result h3 {
  margin: 0 0 3px;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.result p { margin: 0; color: var(--muted); font-size: 11px; }

.match-label {
  flex: 0 0 auto;
  padding: 4px 6px;
  color: var(--berry);
  background: rgba(255, 254, 253, .8);
  border: 1px solid rgba(119, 49, 83, .18);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.reason { margin-top: 5px !important; color: var(--muted); font-size: 10px !important; }

.reason-list {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.reason-list li {
  padding: 3px 6px;
  color: var(--muted);
  background: rgba(255, 254, 253, .7);
  border-radius: 999px;
  font-size: 10px;
}

.result-detail-hint {
  display: inline-block;
  margin-top: 7px;
  color: var(--blue-strong);
  font-size: 11px;
  font-weight: 800;
}

.result-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 9px;
}

.result-link {
  display: grid;
  min-height: 44px;
  padding: 6px 8px;
  place-items: center;
  color: var(--blue-strong);
  background: rgba(255, 254, 253, .84);
  border: 1px solid rgba(36, 92, 120, .2);
  border-radius: 9px;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.outbound-link {
  width: 100%;
  height: 100%;
  color: var(--berry);
  border-color: rgba(119, 49, 83, .22);
  cursor: pointer;
}

.result-feedback {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 6px;
  align-items: center;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid rgba(77, 51, 68, .12);
}

.result-feedback > span { color: var(--muted); font-size: 11px; font-weight: 700; }

.feedback-choice {
  min-height: 44px;
  padding: 5px 9px;
  color: var(--ink);
  background: rgba(255, 254, 253, .82);
  border: 1px solid rgba(77, 51, 68, .2);
  border-radius: 9px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.feedback-choice.fit { color: var(--mint-strong); }
.feedback-choice.not-fit { color: var(--pink-strong); }
.feedback-choice[aria-pressed="true"] { color: #fff; background: var(--berry); border-color: var(--berry); }
.feedback-choice:disabled { cursor: default; opacity: .62; }
.feedback-saved .feedback-choice[aria-pressed="true"] { opacity: 1; }

.feedback-status {
  min-height: 14px;
  margin-top: 4px !important;
  color: var(--muted) !important;
  font-size: 10px !important;
  text-align: right;
}

.result-empty {
  padding: 14px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 12px;
  text-align: center;
}

.result-next {
  margin: 16px 0 4px;
  padding: 15px;
  background: var(--mint);
  border: 1px solid #b9dfcb;
  border-radius: 13px;
}

.result-next strong { font-size: 13px; }
.result-next p { margin: 4px 0 8px; font-size: 12px; }
.result-next a { color: var(--mint-strong); font-size: 12px; font-weight: 800; }

.content-overview {
  margin-top: 18px;
  padding: 20px;
  background: var(--blue);
  border: 1px solid #bddff1;
  border-radius: 20px;
  box-shadow: 0 5px 0 rgba(36, 92, 120, .07);
}

.content-overview h2 { font-size: 18px; }
.content-overview > p { margin-bottom: 14px; font-size: 13px; }

.guide-preview-list {
  display: grid;
  gap: 7px;
}

.guide-preview-list a {
  display: grid;
  gap: 2px;
  padding: 11px 12px;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid transparent;
  border-radius: 11px;
  text-decoration: none;
}

.guide-preview-list strong { font-size: 12px; }
.guide-preview-list span { color: var(--muted); font-size: 10px; }
.guide-preview-list a:nth-child(1) { border-left-color: #e77ca5; }
.guide-preview-list a:nth-child(2) { border-left-color: #68afd3; }
.guide-preview-list a:nth-child(3) { border-left-color: #d6b52d; }
.guide-preview-list a:hover,
.guide-preview-list a:focus-visible { border-color: var(--berry); }

.all-guides-link {
  display: inline-block;
  margin-top: 13px;
  color: var(--blue-strong);
  font-size: 12px;
  font-weight: 800;
}

footer {
  margin-top: 22px;
  color: var(--muted-soft);
  font-size: 10px;
  text-align: center;
}

.site-footer { display: grid; gap: 10px; }
.diagnosis-active .site-footer { display: none; }
.diagnosis-active .content-overview { display: none; }
.diagnosis-active .app-shell { padding-bottom: 14px; }

.site-footer nav {
  display: flex;
  gap: 8px 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.site-footer a,
.back-link {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible,
.back-link:hover,
.back-link:focus-visible { color: var(--berry); }

.brand-link { color: var(--ink-strong); text-decoration: none; }
.back-link { font-size: 12px; font-weight: 700; }

.page-nav {
  display: flex;
  gap: 13px;
  align-items: center;
}

.page-nav a {
  padding: 5px 7px;
  color: var(--muted);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.page-nav a[aria-current="page"],
.page-nav a:hover,
.page-nav a:focus-visible {
  color: var(--berry);
  background: var(--pink);
}

.legal-shell { width: min(100%, 680px); }
.legal-panel { padding: 26px; }
.legal-panel h2 { margin: 24px 0 7px; font-size: 17px; }
.legal-panel p { margin-bottom: 13px; }
.legal-list { margin: 20px 0 0; }

.legal-list div {
  padding: 13px 0;
  border-top: 1px solid var(--border);
}

.legal-list dt {
  color: var(--pink-strong);
  font-size: 11px;
  font-weight: 700;
}

.legal-list dd {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.7;
}

.contact-card {
  padding: 16px;
  overflow-wrap: anywhere;
  color: var(--ink);
  background: var(--yellow);
  border: 1px solid #e5d276;
  border-radius: 12px;
  line-height: 1.7;
}

.legal-note,
.updated-at { color: var(--muted-soft); font-size: 11px; }
.updated-at { margin-top: 26px; margin-bottom: 0; }

.content-shell {
  width: min(100%, 780px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 16px 32px;
}

.content-panel { padding: 24px; }

.content-panel,
.legal-panel { border-top: 7px solid #f2a9c5; }

.breadcrumbs {
  display: flex;
  gap: 7px;
  align-items: center;
  margin-bottom: 20px;
  color: var(--muted-soft);
  font-size: 10px;
}

.breadcrumbs a { color: var(--blue-strong); }

.content-lead {
  max-width: 65ch;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 14px;
}

.guide-grid {
  display: grid;
  gap: 10px;
}

.guide-card {
  position: relative;
  display: block;
  padding: 17px;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid transparent;
  border-radius: 15px;
  text-decoration: none;
}

.guide-card:nth-child(5n + 1) { background: var(--pink); }
.guide-card:nth-child(5n + 2) { background: var(--blue); }
.guide-card:nth-child(5n + 3) { background: var(--yellow); }
.guide-card:nth-child(5n + 4) { background: var(--mint); }
.guide-card:nth-child(5n) { background: var(--lilac); }

.guide-card:hover,
.guide-card:focus-visible { border-color: var(--berry); }
.guide-card h2 { margin: 7px 0 6px; font-size: 16px; }
.guide-card p { margin: 0 0 11px; font-size: 12px; }
.guide-read { color: var(--muted); font-size: 10px; font-weight: 700; }
.guide-open { color: var(--berry); font-size: 11px; font-weight: 800; }

.guide-section {
  padding: 23px 0 2px;
  border-top: 1px solid var(--border);
}

.guide-section h2 { margin: 0 0 10px; font-size: 18px; }
.guide-section p { color: var(--ink); font-size: 14px; line-height: 1.9; }

.check-list {
  display: grid;
  gap: 8px;
  margin: 2px 0 18px;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding: 10px 12px 10px 34px;
  color: var(--ink);
  background: var(--blue);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.65;
}

.check-list li:nth-child(3n + 2) { background: var(--pink); }
.check-list li:nth-child(3n) { background: var(--yellow); }

.check-list li::before {
  position: absolute;
  top: 10px;
  left: 12px;
  content: "✓";
  color: var(--berry);
  font-weight: 800;
}

.article-note {
  margin-top: 25px;
  padding: 15px;
  background: var(--mint);
  border: 1px solid #b9dfcb;
  border-radius: 12px;
}

.article-note strong { font-size: 12px; }
.article-note p { margin: 5px 0 0; font-size: 12px; }

.related-guides {
  margin-top: 27px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.related-guides h2 { font-size: 16px; }
.related-guides ul { display: grid; gap: 8px; margin: 10px 0 0; padding-left: 20px; }
.related-guides a { color: var(--berry); font-size: 13px; font-weight: 700; }

.work-detail-layout {
  display: grid;
  grid-template-areas:
    "intro"
    "visual"
    "details";
  gap: 20px;
  align-items: start;
}

.work-detail-intro { grid-area: intro; }
.work-detail-visual { grid-area: visual; text-align: center; }
.work-detail-details { grid-area: details; }

.work-detail-cover,
.work-detail-cover-placeholder {
  width: min(100%, 340px);
  aspect-ratio: 3 / 4;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(77, 51, 68, .12);
}

.work-detail-cover { display: block; margin: 0 auto; object-fit: contain; background: var(--lilac); }

.work-detail-cover-placeholder {
  display: grid;
  margin: 0 auto;
  place-items: center;
  color: var(--berry);
  background: var(--lilac);
  font-weight: 900;
}

.work-detail-intro h1 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: clamp(22px, 5vw, 32px);
  line-height: 1.35;
}

.work-detail-headline {
  margin: 10px 0 0;
  color: var(--berry);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.65;
}

.work-detail-fanza {
  margin-top: 16px;
  padding: 14px;
  background: var(--yellow);
  border: 2px solid #e2c95f;
  border-radius: 16px;
}

.work-detail-fanza-label {
  display: block;
  color: var(--yellow-strong);
  font-size: 12px;
  font-weight: 900;
}

.work-detail-fanza p {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.55;
}

.work-detail-fanza .work-detail-action {
  width: 100%;
  min-height: 56px;
  margin-top: 10px;
  font-size: 15px;
  cursor: pointer;
}

.work-detail-meta {
  display: grid;
  gap: 7px;
  margin: 18px 0 0;
}

.work-detail-meta > div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 9px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--border);
}

.work-detail-meta dt { color: var(--muted); font-size: 11px; font-weight: 800; }
.work-detail-meta dd { margin: 0; overflow-wrap: anywhere; font-size: 13px; }
.p1-official-content { margin-block: 1rem; }
.p1-official-content h3 { font-size: 1.1rem; margin-bottom: .75rem; }
.p1-official-content .work-detail-meta dt { font-size: .875rem; }
.p1-official-content .work-detail-meta dd { font-size: 1rem; }

.work-detail-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 15px 0 0;
  padding: 0;
  list-style: none;
}

.work-detail-tags li {
  padding: 5px 8px;
  color: var(--muted);
  background: var(--blue);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.work-detail-actions {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

.work-detail-action {
  display: grid;
  min-height: 48px;
  padding: 9px 14px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

.work-detail-action.primary { color: #fff; background: var(--berry); }
.work-detail-action.secondary { color: var(--blue-strong); background: var(--blue); border-color: #b9d7e6; }
.work-detail-action:hover,
.work-detail-action:focus-visible { filter: brightness(.96); outline: 3px solid rgba(36, 92, 120, .25); outline-offset: 2px; }

.work-detail-review,
.work-detail-cautions {
  margin-top: 22px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.work-detail-review:nth-of-type(2) { background: var(--pink); }
.work-detail-review h2,
.work-detail-cautions h2 { margin: 0 0 8px; font-size: 16px; }
.work-detail-review p { margin: 0; white-space: pre-wrap; font-size: 13px; line-height: 1.85; }
.work-detail-spoiler { margin-bottom: 8px !important; color: var(--pink-strong); font-size: 11px !important; font-weight: 800; }
.work-detail-cautions { background: var(--yellow); }
.work-detail-cautions ul { margin: 0; padding-left: 20px; font-size: 12px; line-height: 1.75; }
.work-detail-note { margin: 18px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 380px) {
  .result-summary { grid-template-columns: 28px 50px minmax(0, 1fr); gap: 7px; }
  .answered-result .result-summary { grid-template-columns: 50px minmax(0, 1fr); }
  .result-cover { width: 50px; }
  .result-heading { display: block; }
  .match-label { display: inline-block; margin: 2px 0 4px; }
  .result-feedback { grid-template-columns: 1fr 1fr; }
  .result-feedback > span { grid-column: 1 / -1; }
}

@media (min-width: 700px) {
  .app-shell { padding-top: 30px; }
  .legal-panel { padding: 32px; }
  .content-shell { padding-top: 30px; }
  .content-panel { padding: 36px 42px; }
  .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-detail-layout {
    grid-template-areas:
      "visual intro"
      "visual details";
    grid-template-columns: minmax(210px, 260px) minmax(0, 1fr);
    gap: 0 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}

/* Editorial catalog refresh: neutral interface, artwork-led cards. */
.app-shell {
  width: min(100%, 1180px);
  padding: 20px clamp(16px, 3vw, 32px) 40px;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  min-height: 64px;
  margin: 0 0 32px;
  padding: 14px 0;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.brand {
  padding: 0;
  color: var(--ink-strong);
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: clamp(21px, 2.4vw, 28px);
  font-weight: 800;
  letter-spacing: .035em;
}

.topbar-actions,
.page-nav {
  gap: clamp(12px, 2vw, 24px);
}

.top-diagnosis-link,
.top-guide-link,
.page-nav a {
  padding: 6px 0;
  color: var(--ink-strong);
  background: transparent;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.top-diagnosis-link[aria-current="page"],
.page-nav a[aria-current="page"],
.top-diagnosis-link:hover,
.top-guide-link:hover,
.page-nav a:hover {
  color: var(--ink-strong);
  background: transparent;
  border-bottom-color: var(--ink-strong);
}

.status {
  gap: 7px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border-radius: 0;
  font-size: 13px;
}

.status-dot { width: 6px; height: 6px; }

h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.15; }
h2 { font-size: clamp(21px, 2.6vw, 28px); line-height: 1.25; }
p { font-size: 16px; line-height: 1.7; }

.panel {
  padding: clamp(24px, 5vw, 40px);
  border-color: var(--border);
  border-radius: 10px;
  box-shadow: none;
}

#ageGate,
#home {
  width: min(100%, 560px);
  margin-inline: auto;
}

#ageGate { margin-top: clamp(36px, 8vh, 88px); }
#home { margin-top: clamp(24px, 5vh, 56px); }

.gate,
.content-panel,
.legal-panel { border-top: 2px solid var(--ink-strong); }

.eyebrow {
  margin-bottom: 12px;
  padding: 0 0 5px;
  color: var(--ink-strong);
  background: transparent;
  border-bottom: 2px solid var(--ink-strong);
  border-radius: 0;
  font-size: 13px;
  letter-spacing: .04em;
}

.btn {
  min-height: 50px;
  padding: 13px 16px;
  border-radius: 7px;
  font-size: 16px;
}

.primary {
  color: #ffffff;
  background: var(--ink-strong);
  box-shadow: none;
}

.ghost {
  color: var(--ink-strong);
  background: var(--surface);
  border-color: var(--ink-strong);
}

.btn:active { transform: translateY(1px); }

.mode { border: 1px solid transparent; border-radius: 7px; }
.mode.selected { border-color: var(--ink-strong); box-shadow: none; }
.mode span { font-size: 12px; }

#diagnosis {
  width: min(100%, 520px);
  margin: 0 auto;
}

.progress-row {
  margin: 0 0 12px;
  color: var(--ink-strong);
  font-size: 16px;
  font-weight: 700;
}

.progress {
  height: 2px;
  background: var(--border);
  border-radius: 0;
}

.progress i { background: var(--ink-strong); }

.actions { gap: 8px; margin-bottom: 12px; }

.action {
  min-height: 50px;
  border-width: 1px;
  border-radius: 7px;
  font-size: 15px;
}

.action.bad:hover:not(:disabled),
.action.bad:focus-visible:not(:disabled) { border-color: var(--action-bad-ink); }

.action.skip:hover:not(:disabled),
.action.skip:focus-visible:not(:disabled) { border-color: var(--action-skip-ink); }

.action.like:hover:not(:disabled),
.action.like:focus-visible:not(:disabled) {
  color: #ffffff;
  background: #242424;
  border-color: #242424;
}

.work-card {
  background: var(--surface);
  border-color: #cfcfcf;
  border-radius: 10px;
  box-shadow: none;
}

.cover { background-color: #f7f7f7; }

.preference-cover::before,
.preference-cover::after { display: none; }

.preference-cover .lens-mark {
  color: var(--ink-strong);
  background: var(--surface);
  border: 1px solid var(--ink-strong);
  box-shadow: none;
}

.swipe-feedback {
  border-width: 1px;
  border-radius: 5px;
  background: rgba(255, 255, 255, .96);
  font-size: 16px;
}

#results { width: 100%; }

#resultsTitle { margin-bottom: 4px; }

.result-section { margin-top: 24px; }

.result-list {
  gap: 24px;
  margin: 14px 0 24px;
}

.result-empty { grid-column: 1 / -1; }

.result {
  position: relative;
  overflow: hidden;
  padding: 0 0 16px;
  background: var(--surface) !important;
  border-color: #d9d9d9;
  border-radius: 9px;
}

.result-summary,
.answered-result .result-summary {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.result-summary-link { border-radius: 0; }
.result-summary-link:hover { background: transparent; }
.result-summary-link:hover .result-cover { opacity: .9; }

.rank { display: none; }

.result-cover {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  background: #f7f7f7;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  transition: opacity .15s ease;
}

.result-cover-placeholder { display: grid; }

.result-copy { padding: 16px 16px 4px; }

.result-heading { gap: 10px; }

.result h3 {
  margin-bottom: 6px;
  color: var(--ink-strong);
  font-size: 16px;
  line-height: 1.45;
}

.result p { font-size: 13px; line-height: 1.55; }

.result .result-series {
  margin-top: 5px;
  color: var(--ink-strong);
  font-size: 12px;
  font-weight: 700;
}

.match-label {
  padding: 3px 5px;
  color: var(--ink-strong);
  background: var(--surface);
  border-color: #bdbdbd;
  border-radius: 4px;
  font-size: 12px;
}

.reason { margin-top: 8px !important; font-size: 13px !important; }

.reason-list {
  gap: 4px 10px;
  margin-top: 10px;
}

.reason-list li {
  padding: 0;
  color: var(--muted);
  background: transparent;
  border-radius: 0;
  font-size: 13px;
}

.reason-list li + li::before { margin-right: 10px; content: "·"; }

.result-detail-hint {
  margin-top: 10px;
  color: var(--ink-strong);
  border-bottom: 1px solid var(--ink-strong);
  font-size: 13px;
}

.result-links {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin: 12px 16px 0;
}

.result-link {
  min-height: 48px;
  padding: 9px 12px;
  color: var(--ink-strong);
  background: var(--surface);
  border-color: var(--ink-strong);
  border-radius: 6px;
  font-size: 14px;
}

.outbound-link { color: var(--ink-strong); border-color: var(--ink-strong); }

.result-feedback {
  margin: 16px 16px 0;
  padding-top: 14px;
  border-top-color: var(--border);
}

.result-feedback > span { font-size: 13px; }

.feedback-choice {
  min-height: 44px;
  border-radius: 6px;
  font-size: 13px;
}

.feedback-status { margin-inline: 16px !important; font-size: 12px !important; }

.answered-section {
  margin-top: 44px;
  padding: 28px 0 0;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--ink-strong);
  border-radius: 0;
}

.series-section {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--ink-strong);
}

.series-section > h2 { font-size: clamp(20px, 2.4vw, 26px); }
.series-result .match-label { border-color: var(--ink-strong); }

.answered-section > h2 { font-size: clamp(20px, 2.4vw, 26px); }

.answered-result-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.answered-result { padding-bottom: 10px; }
.answered-result .result-copy { padding: 11px 10px 2px; }
.answered-result .result-heading { display: block; }
.answered-result h3 { font-size: 14px; }
.answered-result p { font-size: 12px; }
.answered-result .result-detail-hint { font-size: 12px; }
.answered-result .result-links { margin: 10px 10px 0; }
.answered-result .result-link { min-height: 44px; padding: 7px; font-size: 12px; }

.result-next {
  background: var(--surface);
  border-color: var(--ink-strong);
  border-radius: 8px;
}

#againBtn {
  display: block;
  width: min(100%, 320px);
  margin: 28px auto 0;
}

.content-overview {
  width: min(100%, 880px);
  margin: 56px auto 0;
  padding: 28px 0;
  background: var(--surface);
  border: 0;
  border-top: 1px solid var(--ink-strong);
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
}

.content-overview h2 { font-size: 22px; }
.content-overview > p { font-size: 15px; }

.guide-preview-list a,
.guide-card {
  color: var(--ink);
  background: var(--surface) !important;
  border: 1px solid var(--border);
  border-radius: 7px;
}

.guide-preview-list strong,
.all-guides-link { font-size: 14px; }
.guide-preview-list span { font-size: 12px; }
.guide-preview-list a:hover,
.guide-preview-list a:focus-visible,
.guide-card:hover,
.guide-card:focus-visible { border-color: var(--ink-strong); }

.all-guides-link,
.breadcrumbs a,
.related-guides a { color: var(--ink-strong); }

footer {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 12px;
}

.content-shell { width: min(100%, 1040px); }
.content-panel { border-radius: 8px; }
.content-lead,
.guide-section p { font-size: 16px; }

.work-detail-cover,
.work-detail-cover-placeholder {
  border-color: #d0d0d0;
  border-radius: 8px;
  box-shadow: none;
}

.work-detail-fanza {
  background: var(--yellow);
  border: 1px solid var(--ink-strong);
  border-radius: 8px;
}

.work-detail-fanza-label { color: var(--ink-strong); font-size: 14px; }
.work-detail-fanza p { font-size: 14px; }
.work-detail-action { border-radius: 6px; font-size: 14px; }
.work-detail-action.primary { background: var(--ink-strong); }

.work-detail-tags li {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 12px;
}

.work-detail-review,
.work-detail-cautions {
  border-radius: 8px;
  box-shadow: none;
}

@media (min-width: 480px) {
  .result-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .answered-result .result-links { grid-template-columns: minmax(0, 1fr); }
}

@media (min-width: 800px) {
  .app-shell { padding-top: 28px; }
  #resultList,
  .series-result-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .answered-result-list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .guide-preview-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .work-detail-layout {
    grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
    gap: 0 44px;
  }
}

@media (max-width: 560px) {
  .topbar { margin-bottom: 22px; }
  .topbar-actions { gap: 12px; }
  .status { font-size: 12px; }
  .panel { padding: 24px 20px; }
  .result-heading { display: block; }
  .match-label { display: inline-block; margin-top: 3px; }
}
.catalog-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.catalog-list li { padding: 20px; border: 1px solid #e7e7e5; border-radius: 16px; overflow-wrap: anywhere; }
.catalog-list h2 { font-size: 1.1rem; margin: 0 0 8px; line-height: 1.6; }
.catalog-list p { margin: 4px 0; font-size: 1rem; }
.catalog-pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin: 28px 0; }
.catalog-pager a { padding: 12px 16px; }
.catalog-age-note, .catalog-diagnosis { padding: 24px 0; margin-top: 24px; border-top: 1px solid #e7e7e5; }
.catalog-diagnosis h2 { margin: 0 0 8px; font-size: 20px; line-height: 1.5; }
.catalog-diagnosis p { margin: 0 0 16px; font-size: 15px; }
.catalog-diagnosis-top { display: flex; align-items: center; gap: 24px; margin: 24px 0; padding: 20px; border: 1px solid var(--border); border-radius: 8px; background: #f7f7f5; }
.catalog-diagnosis-top > div { flex: 1; min-width: 0; }
.catalog-diagnosis-top p { margin: 0; }
.catalog-diagnosis-top .work-detail-action { flex-shrink: 0; }
#ageGate { margin-top: clamp(20px, 4vh, 40px); }
#ageGate h1, #home h1 { line-height: 1.5; font-size: clamp(25px, 4vw, 32px); }
.entry-steps { display: flex; flex-wrap: wrap; gap: 8px 24px; padding-left: 22px; margin: 20px 0; font-size: 14px; line-height: 1.7; }
.entry-steps li { padding-right: 12px; }
.age-question { margin: 24px 0 8px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 21px; }
#ageGateNotice { font-size: 14px; }
.entry-destination { font-size: 14px; font-weight: 700; }
.entry-mode-label { margin: 24px 0 8px; font-size: 14px; font-weight: 700; }
.page-nav { flex-wrap: wrap; }
.topbar-actions { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) {
  .catalog-list { grid-template-columns: 1fr; }
  .catalog-list li { padding: 16px; }
  .catalog-diagnosis-top { display: block; padding: 16px; }
  .catalog-diagnosis-top .work-detail-action { display: flex; margin-top: 16px; }
}

.catalog-pager [aria-current="page"] { font-weight: 700; padding: 12px 16px; border-bottom: 2px solid currentColor; }
.catalog-page-count { flex-basis: 100%; text-align: center; font-size: 13px; }

/* Mobile public layout: full-width header, compact breadcrumbs, collapsible category tags. */
.topbar {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

.breadcrumbs {
  width: 100%;
  min-width: 0;
  flex-wrap: nowrap;
  overflow: hidden;
  white-space: nowrap;
}

.breadcrumbs > span {
  min-width: 0;
  flex: 0 0 auto;
}

.breadcrumbs > span[itemprop="itemListElement"]:last-child {
  flex: 1 1 auto;
  overflow: hidden;
}

.breadcrumbs > span[itemprop="itemListElement"]:last-child > a,
.breadcrumbs > span[itemprop="itemListElement"]:last-child > a > span[itemprop="name"] {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-detail-category-row dd { min-width: 0; }
.work-detail-category-primary { display: inline-block; margin-bottom: 8px; }
.work-detail-tag-collapsible {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  min-width: 0;
}
.work-detail-tag-collapsible .work-detail-tags {
  display: flex;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  flex-wrap: nowrap;
  overflow: hidden;
}
.work-detail-tag-collapsible .work-detail-tags li {
  flex: 0 0 auto;
  white-space: nowrap;
}
.work-detail-tag-collapsible.is-open .work-detail-tags {
  flex-wrap: wrap;
  overflow: visible;
}
.work-detail-tag-toggle {
  width: auto;
  min-width: 44px;
  min-height: 44px;
  justify-self: end;
  margin: 1px 0 0;
  padding: 4px 8px;
  appearance: none;
  color: var(--ink-strong);
  background: transparent;
  border: 0;
  border-bottom: 1px solid currentColor;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.work-detail-tag-toggle[hidden] { display: none; }
.work-detail-tag-collapsible.is-open .work-detail-tags li {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
.catalog-rediagnosis > .work-detail-action { width: 100%; }


/* Keep public directory links visible on both the diagnosis and content shells. */
.topbar > .brand { flex-shrink: 0; white-space: nowrap; }
.topbar > nav > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 44px;
  min-height: 44px;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding-top: 8px;
    padding-bottom: 4px;
  }
  .topbar > .brand { align-self: flex-start; }
  .topbar-actions,
  .page-nav {
    width: 100%;
    min-width: 0;
    gap: 8px;
    justify-content: space-between;
    flex-wrap: nowrap;
  }
}
[hidden] { display: none !important; }
