:root {
  color-scheme: dark;
  --app-bg: #130e12;
  --app-bg-deep: #090709;
  --surface: #241820;
  --surface-soft: #1c1419;
  --surface-sage: #172019;
  --ink: #f8eedf;
  --muted: #c9bbae;
  --faint: #8f7f75;
  --wine: #c04461;
  --wine-deep: #74142d;
  --gold: #d8aa4d;
  --gold-soft: #f2d58a;
  --line: rgba(216, 170, 77, .2);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --tap: 48px;
  font-family: "Hiragino Sans", "Yu Gothic", "Meiryo", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: #080608;
  font-size: 16px;
  line-height: 1.72;
  overflow-x: hidden;
}

button,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  position: relative;
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background:
    linear-gradient(135deg, rgba(216, 170, 77, .035) 0, transparent 28%),
    linear-gradient(180deg, #1d1016 0%, var(--app-bg) 42%, #0d0a0c 100%);
  border-right: 1px solid rgba(216, 170, 77, .12);
  border-left: 1px solid rgba(216, 170, 77, .12);
}

.skip-link {
  position: fixed;
  top: -5rem;
  left: 1rem;
  z-index: 100;
  padding: .65rem 1rem;
  color: #1b1112;
  background: var(--gold-soft);
  border-radius: var(--radius-md);
}

.skip-link:focus {
  top: 1rem;
}

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

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: .55rem 1.25rem;
  background: rgba(16, 11, 14, .9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.app-brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  min-height: var(--tap);
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  text-align: left;
}

.app-brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--gold-soft);
  background: rgba(216, 170, 77, .08);
  border: 1px solid rgba(216, 170, 77, .3);
  border-radius: 50%;
}

.app-brand-mark svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.35;
}

.app-brand-title,
.app-brand-subtitle {
  display: block;
  line-height: 1.2;
  letter-spacing: 0;
}

.app-brand-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.02rem;
  color: var(--gold-soft);
  font-weight: 600;
}

.app-brand-subtitle {
  margin-top: .15rem;
  color: var(--muted);
  font-size: .68rem;
}

main {
  width: 100%;
  padding: .8rem 1.25rem calc(6.7rem + env(safe-area-inset-bottom));
  outline: none;
}

.tab-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 50%;
  z-index: 50;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(100%, 480px);
  min-height: 76px;
  padding: .45rem .45rem calc(.45rem + env(safe-area-inset-bottom));
  background: rgba(13, 9, 12, .94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(20px);
  transform: translateX(-50%);
}

.tab-item {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 58px;
  padding: .3rem .1rem;
  place-items: center;
  align-content: center;
  gap: .2rem;
  color: var(--faint);
  background: transparent;
  border: 0;
}

.tab-item::before {
  position: absolute;
  top: -.46rem;
  width: 28px;
  height: 2px;
  background: transparent;
  border-radius: 999px;
  content: "";
}

.tab-item svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.55;
}

.tab-item span {
  font-size: .66rem;
  font-weight: 700;
  line-height: 1;
}

.tab-item.is-active {
  color: var(--gold-soft);
}

.tab-item.is-active::before {
  background: var(--gold);
}

.section,
.hero {
  width: 100%;
}

.section {
  padding: .65rem 0 1.5rem;
}

.stack {
  display: grid;
  gap: 1.15rem;
}

.grid,
.cards-grid,
.comparison,
.style-list,
.select-grid {
  display: grid;
  gap: .85rem;
}

.hero {
  display: flex;
  min-height: calc(100dvh - 64px - 7.5rem);
  flex-direction: column;
  gap: .85rem;
  padding: .55rem 0 1rem;
}

.hero-copy {
  gap: .5rem;
}

.eyebrow {
  margin: 0 0 .38rem;
  color: var(--gold);
  font-size: .69rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.38;
  letter-spacing: 0;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", Georgia, serif;
}

h1 {
  font-size: 1.9rem;
  font-weight: 750;
}

h2 {
  font-size: 1.35rem;
  font-weight: 730;
}

h3 {
  font-size: 1.02rem;
  font-weight: 730;
}

p {
  margin: 0;
}

.lead {
  margin-top: .45rem;
  color: var(--muted);
  font-size: .94rem;
}

.hero-question {
  max-width: 12em;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", Georgia, serif;
  font-size: 1.85rem;
  font-weight: 600;
  line-height: 1.55;
  color: #fff7e9;
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
}

.hero-actions {
  margin-top: auto;
}

.hero-actions .primary-button {
  width: 100%;
}

.primary-button,
.secondary-button,
.text-button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: .75rem 1rem;
  border-radius: 20px;
  text-decoration: none;
}

.primary-button {
  color: #fff8ec;
  background: linear-gradient(145deg, #a52645, #5b1025);
  border: 1px solid rgba(242, 213, 138, .58);
  font-weight: 750;
}

.secondary-button {
  color: var(--gold-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  font-weight: 700;
}

.text-button {
  min-height: 44px;
  padding-right: .45rem;
  padding-left: .45rem;
  color: var(--gold-soft);
  background: transparent;
  border: 0;
  font-weight: 700;
}

.diagram-stage {
  position: relative;
  display: grid;
  gap: .55rem;
  width: 100%;
  padding: .65rem 0;
  background:
    linear-gradient(90deg, transparent, rgba(216, 170, 77, .025) 50%, transparent),
    linear-gradient(180deg, transparent, rgba(123, 28, 53, .07) 52%, transparent);
}

.hero-diagram-stage {
  flex: 1 1 auto;
  align-content: center;
}

.diagram-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
  width: 100%;
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.4;
}

.diagram-legend span {
  display: grid;
  min-width: 0;
}

.diagram-legend strong {
  color: var(--gold);
  font-size: .67rem;
  letter-spacing: .08em;
}

.romance-diagram {
  display: block;
  width: 100%;
  height: auto;
  max-width: 420px;
  margin: 0 auto;
  overflow: visible;
}

.diagram-triangle {
  fill: none;
  stroke: rgba(216, 170, 77, .38);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.1;
  vector-effect: non-scaling-stroke;
  transition: stroke .22s ease, stroke-width .22s ease, opacity .22s ease;
}

.triangle-role {
  stroke: rgba(240, 212, 143, .5);
}

.diagram-triangle.is-emphasized,
.romance-diagram:has(.diagram-node[data-group="love"]:hover) .diagram-triangle[data-triangle="love"],
.romance-diagram:has(.diagram-node[data-group="love"]:focus) .diagram-triangle[data-triangle="love"],
.romance-diagram:has(.diagram-node[data-group="role"]:hover) .diagram-triangle[data-triangle="role"],
.romance-diagram:has(.diagram-node[data-group="role"]:focus) .diagram-triangle[data-triangle="role"] {
  stroke: var(--gold-soft);
  stroke-width: 2.6;
}

.diagram-node {
  opacity: .84;
  outline: none;
  transition: opacity .2s ease;
}

.diagram-node .node-hit {
  fill: transparent;
  stroke: none;
  pointer-events: all;
}

.diagram-node .node-disc {
  fill: #171015;
  stroke: var(--style-color);
  stroke-width: 2.1;
  transform-box: fill-box;
  transform-origin: center;
  transition: fill .2s ease, stroke-width .2s ease, transform .2s ease;
}

.diagram-node .node-icon {
  pointer-events: none;
  opacity: .9;
  clip-path: circle(48% at 50% 50%);
}

.diagram-node .node-ring {
  fill: none;
  stroke: var(--style-color);
  stroke-width: 1.2;
  opacity: 0;
  transition: opacity .2s ease;
}

.diagram-node text {
  fill: #fff6e8;
  font-size: 9.8px;
  font-weight: 800;
  pointer-events: none;
}

.diagram-node .node-jp {
  fill: #c9b9a7;
  font-size: 7.8px;
  font-weight: 500;
}

.diagram-node:hover,
.diagram-node:focus,
.diagram-node.is-selected,
.diagram-node.is-route-node {
  opacity: 1;
}

.diagram-node:hover .node-disc,
.diagram-node:focus .node-disc,
.diagram-node.is-selected .node-disc,
.diagram-node.is-route-node .node-disc {
  fill: color-mix(in srgb, var(--style-color) 28%, #120c10);
  stroke-width: 2.8;
  transform: scale(1.08);
}

.diagram-node:hover .node-ring,
.diagram-node:focus .node-ring,
.diagram-node.is-selected .node-ring,
.diagram-node.is-route-node .node-ring {
  opacity: .42;
}

.romance-diagram.has-selection .diagram-node:not(.is-selected) {
  opacity: .48;
}

.diagram-guide,
.result-route-note {
  color: var(--muted);
  font-size: .76rem;
  text-align: center;
}

.style-info {
  display: grid;
  gap: .35rem;
  width: 100%;
  padding: 1rem 1.1rem;
  background: linear-gradient(145deg, rgba(49, 30, 40, .9), rgba(28, 19, 24, .9));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.style-info[hidden] {
  display: none;
}

.style-info-heading {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .4rem;
}

.style-info-heading strong {
  color: var(--gold-soft);
}

.style-info-heading span {
  color: var(--muted);
  font-size: .82rem;
}

.style-info-heading small {
  width: 100%;
  color: var(--faint);
  font-size: .68rem;
}

.style-info-primary {
  font-weight: 750;
}

.panel {
  padding: 1.15rem;
  background: linear-gradient(145deg, rgba(42, 27, 35, .96), rgba(28, 19, 24, .96));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  color: var(--muted);
  font-size: .75rem;
}

.step-indicator {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .4rem;
  margin: .9rem 0 1rem;
}

.step-dot {
  height: 4px;
  background: rgba(216, 170, 77, .15);
  border-radius: 999px;
}

.step-dot.is-active,
.step-dot.is-done {
  background: linear-gradient(90deg, var(--gold), var(--wine));
}

.option-card,
.persona-card,
.style-card,
.relation-row {
  width: 100%;
  color: var(--ink);
  background: color-mix(in srgb, var(--accent, var(--wine)) 8%, var(--surface-soft));
  border: 1px solid rgba(216, 170, 77, .14);
  border-radius: var(--radius-lg);
  text-align: left;
}

.option-card {
  position: relative;
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  min-height: 92px;
  gap: .85rem;
  padding: .85rem 1.15rem .85rem 1.25rem;
  overflow: hidden;
}

.option-card::before {
  position: absolute;
  top: 1rem;
  bottom: 1rem;
  left: 0;
  width: 4px;
  background: var(--accent);
  border-radius: 0 999px 999px 0;
  content: "";
}

.option-card small,
.persona-card small,
.style-card small,
.relation-row small {
  display: block;
  color: var(--muted);
  font-size: .75rem;
}

.option-card strong {
  display: block;
  font-size: .98rem;
  line-height: 1.55;
}

.option-icon {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border: 1px solid rgba(242, 213, 138, .25);
  border-radius: 18px;
  box-shadow: 0 0 24px color-mix(in srgb, var(--accent) 25%, transparent);
}

.result-card {
  display: grid;
  gap: .9rem;
  padding: 1.4rem;
  color: #fff8ea;
  background:
    linear-gradient(135deg, rgba(242, 213, 138, .08), transparent 34%),
    linear-gradient(145deg, #8e1f3d, #3b0b1c);
  border: 1px solid rgba(242, 213, 138, .58);
  border-radius: var(--radius-xl);
}

.persona-visual {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #100b0e;
  border: 1px solid rgba(242, 213, 138, .42);
  border-radius: 22px;
}

.result-persona-visual {
  margin: -.25rem 0 .25rem;
  border-radius: 24px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .34);
}

.result-card .eyebrow {
  color: rgba(255, 255, 255, .72);
}

.result-card .persona-name {
  color: #fff8ea;
  font-size: clamp(2.35rem, 12vw, 3.55rem);
  font-weight: 760;
  line-height: 1.1;
  text-shadow: 0 0 26px rgba(242, 213, 138, .16);
}

.result-card .combo {
  width: fit-content;
  padding: .38rem .72rem;
  color: rgba(255, 248, 234, .76);
  background: rgba(18, 9, 13, .22);
  border: 1px solid rgba(242, 213, 138, .2);
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 800;
  line-height: 1.35;
}

.keyword-row {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.keyword,
.tag {
  display: inline-flex;
  width: fit-content;
  padding: .28rem .58rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
}

.keyword {
  color: #fff6e6;
  background: rgba(18, 9, 13, .28);
  border: 1px solid rgba(242, 213, 138, .26);
}

.catch {
  font-size: 1.04rem;
  font-weight: 750;
  line-height: 1.65;
  white-space: pre-line;
}

.combo-chip,
.modal-combo {
  display: inline-flex;
  width: fit-content;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .02em;
}

.combo-chip {
  padding: .22rem .55rem;
  background: rgba(216, 170, 77, .08);
  border: 1px solid rgba(216, 170, 77, .18);
  border-radius: 999px;
}

.result-diagram-stage {
  padding: 1rem 0 1.25rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.result-route-segment {
  fill: none;
  stroke: var(--gold-soft);
  stroke-linecap: round;
  stroke-width: 3.2;
  vector-effect: non-scaling-stroke;
}

.romance-diagram.is-result .diagram-triangle {
  opacity: .38;
}

.romance-diagram.is-result .diagram-node:not(.is-route-node) {
  opacity: .25;
}

.route-badge circle {
  fill: #74142d;
  stroke: var(--gold-soft);
  stroke-width: 1.8;
}

.route-badge text {
  fill: #fff8ea;
  font-size: 10.5px;
  font-weight: 800;
}

.layer-block {
  position: relative;
  display: grid;
  gap: .35rem;
  padding: .25rem 0 1.1rem 2.9rem;
  border-bottom: 1px solid var(--line);
}

.layer-icon {
  position: absolute;
  top: .15rem;
  left: 0;
  z-index: 1;
  width: 34px;
  height: 34px;
  object-fit: cover;
  border: 1px solid rgba(216, 170, 77, .28);
  border-radius: 50%;
}

.layer-block::before {
  position: absolute;
  top: .2rem;
  left: 0;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--gold);
  background: rgba(216, 170, 77, .1);
  border: 1px solid rgba(216, 170, 77, .25);
  border-radius: 50%;
  content: "";
}

.layer-label {
  color: var(--gold);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
}

.profile-longform {
  display: grid;
  gap: 1rem;
  padding: 1.15rem;
  background:
    linear-gradient(145deg, rgba(216, 170, 77, .06), transparent 32%),
    rgba(12, 7, 11, .46);
  border: 1px solid rgba(216, 170, 77, .2);
  border-radius: var(--radius-lg);
}

.profile-longform-header {
  display: grid;
  gap: .45rem;
}

.profile-longform h3 {
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1.45;
}

.profile-catch {
  color: var(--gold-soft);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.75;
}

.profile-body {
  display: grid;
  gap: 1rem;
}

.profile-body p {
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.95;
}

.profile-detail-page main {
  padding-bottom: 2.4rem;
}

.profile-page-shell {
  min-height: 100vh;
  min-height: 100dvh;
}

.profile-back-link {
  color: var(--ink);
  text-decoration: none;
}

.profile-article-hero {
  margin-top: .25rem;
}

.profile-layer-list {
  display: grid;
  gap: .95rem;
  padding: 1.15rem;
  background: rgba(12, 7, 11, .35);
  border: 1px solid rgba(216, 170, 77, .16);
  border-radius: var(--radius-lg);
}

.profile-layer-block:last-child {
  padding-bottom: .25rem;
  border-bottom: 0;
}

.profile-page-longform h2 {
  color: var(--ink);
  font-size: 1.28rem;
  line-height: 1.45;
}

.profile-page-actions {
  grid-template-columns: 1fr;
}

.profile-page-actions a {
  width: 100%;
}

.persona-card,
.style-card {
  display: grid;
  gap: .55rem;
  padding: 1.15rem;
}

.persona-card {
  position: relative;
  overflow: hidden;
}

.persona-card .persona-visual {
  margin-bottom: .35rem;
}

.persona-card::after {
  position: absolute;
  top: 0;
  right: 0;
  width: 54px;
  height: 4px;
  background: var(--accent);
  border-radius: 0 0 0 999px;
  content: "";
}

.persona-card .button-row,
.style-card .text-button {
  margin-top: .3rem;
}

.pair-summary {
  grid-template-columns: 1fr;
}

.pair-summary > div {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: .25rem .85rem;
  align-items: center;
}

.pair-summary .eyebrow,
.pair-summary h2,
.pair-summary .combo-chip {
  grid-column: 2;
}

.pair-thumb {
  grid-row: 1 / span 3;
  width: 84px;
  height: 84px;
  object-fit: cover;
  border: 1px solid rgba(216, 170, 77, .26);
  border-radius: 20px;
}

.relation-persona-name {
  display: block;
  color: var(--ink);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", Georgia, serif;
  font-size: 1.18rem;
  font-weight: 760;
  line-height: 1.35;
}

.select-grid {
  gap: 1rem;
}

label {
  display: grid;
  gap: .4rem;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 750;
}

select {
  width: 100%;
  min-height: 52px;
  padding: .7rem 2.5rem .7rem .85rem;
  color: var(--ink);
  background: #170f14;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.comparison-row {
  display: grid;
  gap: .65rem;
  padding: 1.15rem;
  background: linear-gradient(145deg, #21151c, #171015);
  border: 1px solid rgba(216, 170, 77, .14);
  border-radius: var(--radius-lg);
}

.pair-values {
  display: grid;
  gap: .5rem;
}

.pair-values div {
  padding: .8rem .9rem;
  background: rgba(8, 6, 8, .35);
  border: 1px solid rgba(216, 170, 77, .1);
  border-radius: var(--radius-md);
}

.pair-values .pair-style-value {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: .75rem;
  border-color: color-mix(in srgb, var(--accent) 30%, rgba(216, 170, 77, .12));
}

.pair-style-value img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, rgba(242, 213, 138, .18));
  border-radius: 16px;
  box-shadow: 0 0 20px color-mix(in srgb, var(--accent) 22%, transparent);
}

.pair-style-value span {
  display: grid;
  gap: .16rem;
  min-width: 0;
}

.pair-style-value strong {
  color: var(--ink);
  font-size: .94rem;
}

.pair-style-value small {
  color: var(--gold-soft);
  font-size: .7rem;
  font-weight: 800;
}

.pair-style-value em {
  color: var(--ink);
  font-style: normal;
  font-size: .9rem;
  line-height: 1.5;
}

.arrow-note {
  color: var(--gold-soft);
  font-size: .9rem;
  font-weight: 700;
}

.relation-row {
  position: relative;
  display: grid;
  min-height: 92px;
  gap: .45rem;
  padding: 1rem 1.1rem 1rem 5.8rem;
}

.relation-thumb {
  position: absolute;
  top: 1rem;
  left: 1rem;
  width: 64px;
  height: 64px;
  object-fit: cover;
  border: 1px solid rgba(216, 170, 77, .22);
  border-radius: 16px;
}

.relation-row strong {
  line-height: 1.55;
}

.style-swatch {
  width: 32px;
  height: 5px;
  background: var(--accent);
  border-radius: 999px;
}

.style-deck {
  display: grid;
  grid-auto-columns: min(82%, 330px);
  grid-auto-flow: column;
  gap: .85rem;
  padding: .15rem 0 .75rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-padding-inline: 0;
  scroll-snap-type: inline mandatory;
  scrollbar-width: none;
}

.style-deck::-webkit-scrollbar {
  display: none;
}

.style-art-card {
  display: grid;
  min-width: 0;
  gap: .25rem;
  padding: 1rem;
  overflow: hidden;
  color: var(--ink);
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  border: 1px solid rgba(242, 213, 138, .42);
  border-radius: var(--radius-xl);
  scroll-snap-align: start;
  text-align: left;
}

.style-icon-frame {
  display: grid;
  width: 108px;
  height: 108px;
  margin: .15rem auto .35rem;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 68%),
    rgba(8, 6, 8, .45);
  border: 1px solid rgba(242, 213, 138, .32);
  border-radius: 34px;
}

.style-icon-frame img,
.style-modal-icon,
.style-icon-hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.style-art-caption {
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .75rem 1rem;
}

.style-art-caption > span:first-child {
  display: flex;
  align-items: baseline;
  gap: .45rem;
}

.style-art-caption strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
}

.style-art-caption small {
  color: var(--muted);
  font-size: .74rem;
}

.style-art-caption > span:last-child {
  color: var(--gold);
  font-size: 1.2rem;
}

.style-detail-screen {
  padding-top: .2rem;
}

.back-button {
  width: fit-content;
  justify-content: flex-start;
}

.style-hero-card {
  width: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(242, 213, 138, .5);
  border-radius: var(--radius-xl);
}

.style-icon-hero {
  display: grid;
  width: min(74vw, 280px);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  place-items: center;
  padding: 1.1rem;
  background:
    radial-gradient(circle, color-mix(in srgb, var(--accent) 28%, transparent), transparent 64%),
    linear-gradient(145deg, #1f151b, #100b0f);
}

.style-modal-icon {
  width: 70px;
  height: 70px;
  border: 1px solid rgba(242, 213, 138, .3);
  border-radius: 22px;
}

.style-detail-copy {
  display: grid;
  gap: .35rem;
}

.style-detail-copy h1 {
  font-family: Georgia, "Times New Roman", "Hiragino Mincho ProN", serif;
  font-size: 2.2rem;
  font-weight: 600;
}

.style-detail-copy h1 span {
  margin-left: .4rem;
  color: var(--muted);
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: .9rem;
  font-weight: 700;
}

.position-list {
  display: grid;
  gap: 1rem;
}

.tag {
  color: var(--gold-soft);
  background: rgba(216, 170, 77, .09);
  border: 1px solid rgba(216, 170, 77, .18);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: end center;
  padding: 0;
  background: rgba(0, 0, 0, .68);
  backdrop-filter: blur(3px);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  position: relative;
  width: min(100%, 480px);
  max-height: 91vh;
  max-height: 91dvh;
  overflow: auto;
  padding: 1rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom));
  background:
    linear-gradient(135deg, rgba(216, 170, 77, .035), transparent 28%),
    var(--app-bg);
  border-top: 1px solid rgba(242, 213, 138, .38);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-close {
  position: sticky;
  top: 0;
  left: 100%;
  z-index: 2;
  display: grid;
  width: 44px;
  height: 44px;
  margin-left: auto;
  place-items: center;
  color: var(--gold-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 1.35rem;
  line-height: 1;
}

.modal-content {
  display: grid;
  gap: 1rem;
}

:focus-visible {
  outline: 3px solid rgba(242, 213, 138, .42);
  outline-offset: 3px;
}

@media (hover: hover) {
  .primary-button:hover {
    background: var(--wine-deep);
  }

  .secondary-button:hover,
  .option-card:hover,
  .persona-card:hover,
  .style-card:hover,
  .style-art-card:hover,
  .relation-row:hover {
    transform: translateY(-2px);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .primary-button,
  .secondary-button,
  .option-card,
  .persona-card,
  .style-card,
  .style-art-card,
  .relation-row,
  .tab-item {
    transition: color .2s ease, background .2s ease, transform .2s ease;
  }

  .result-route-segment {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: draw-result-route .38s ease-out forwards;
  }

  .result-route-segment.route-2 {
    animation-delay: .34s;
  }
}

@keyframes draw-result-route {
  to {
    stroke-dashoffset: 0;
  }
}

@media (max-width: 340px) {
  .app-topbar,
  main {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  h1 {
    font-size: 1.72rem;
  }

  .hero-question {
    font-size: 1.65rem;
  }

  .diagram-node text {
    font-size: 10.5px;
  }

  .diagram-node .node-jp {
    font-size: 8.5px;
  }
}
