:root {
  --bg: #0d0a0b;
  --bg-2: #141011;
  --ink: #f3ecec;
  --muted: #9a8b8d;
  --rouge: #8a1c2a;
  --blush: #e0a3ad;
  --line: rgba(255, 255, 255, 0.1);
  --tabbar-inner: 56px;
  --tabbar-h: 0px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans JP", sans-serif;
  -webkit-font-smoothing: antialiased;
}

html.is-work,
html.is-work body {
  overscroll-behavior-x: none;
}

html.is-work.is-from-feed,
html.is-work.is-from-feed body {
  touch-action: pan-y;
}

html.is-feed,
html.is-feed body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font-family: inherit; }
[hidden] { display: none !important; }

.logo {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #fff 0%, var(--blush) 52%, var(--rouge) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(13, 10, 11, 0.92);
}

.site-nav {
  display: flex;
  gap: 22px;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

.site-nav a:hover,
.site-footer a:hover { color: var(--blush); }

.wrap { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }

.kicker {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blush);
  margin-bottom: 10px;
}

.h1 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
}

.btn {
  appearance: none;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  padding: 14px 18px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: linear-gradient(135deg, #a52638, var(--rouge));
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus-visible { opacity: 0.92; outline: none; }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}

.btn-ghost:hover,
.btn-ghost:focus-visible { color: var(--ink); outline: none; }

.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

.site-footer {
  margin-top: 64px;
  padding: 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.8;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 12px;
}

.js-blur {
  transition: filter 0.45s ease;
}

html:not(.is-adult) .js-blur {
  filter: blur(22px) saturate(0.85);
}

.cover {
  background-color: #1a1214;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

/* Age gate */
#age-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 40%, rgba(138, 28, 42, 0.28), transparent 55%),
    rgba(8, 6, 7, 0.94);
}

.age-panel {
  width: min(420px, 100%);
  text-align: center;
  padding: 42px 28px 36px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.age-brand {
  font-family: "Cormorant Garamond", serif;
  font-size: 2.2rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #ffffff 0%, var(--blush) 50%, var(--rouge) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}

.age-kana {
  font-size: 0.82rem;
  font-weight: 300;
  letter-spacing: 0.18em;
  color: var(--blush);
  margin-bottom: 14px;
}

.age-sub {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 28px;
}

.age-title {
  font-size: 1.05rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.age-text {
  font-size: 0.85rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 28px;
}

.age-actions { display: flex; flex-direction: column; gap: 10px; }

.blocked {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.8;
}

.blocked strong {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--ink);
  margin-bottom: 12px;
}

/* Home */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: end;
  padding: 56px 0 40px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  margin: 10px 0 16px;
}

.hero-brand {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #ffffff 0%, var(--blush) 52%, var(--rouge) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 8px 0 6px;
}

.hero-kana {
  font-size: 0.9rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  color: var(--blush);
  margin-bottom: 22px;
}

.hero p { color: var(--muted); font-weight: 300; line-height: 1.9; max-width: 36em; }
.hero p.hero-kana {
  color: var(--blush);
  max-width: none;
}

.block { padding: 48px 0 8px; }
.block-tight { padding: 12px 0 0; }

.block-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.block-head .h2 { margin-bottom: 0; }

.more-link {
  color: var(--blush);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.updated {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

.home-tools { margin-bottom: 14px; }

.chip-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.chip-row::-webkit-scrollbar { display: none; }

.chip {
  appearance: none;
  flex: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  padding: 8px 12px;
  cursor: pointer;
  text-decoration: none;
}

.chip:hover,
.chip.is-on {
  color: var(--ink);
  border-color: var(--blush);
}

.rank-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  padding: 4px 8px;
  background: rgba(13, 10, 11, 0.72);
  color: var(--blush);
}

.work-tile-visual,
.work-card .thumb { position: relative; }

.text-link { color: var(--blush); }

.text-link:hover { text-decoration: underline; text-underline-offset: 0.2em; }

.pickup { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; }
.pickup-side { display: grid; gap: 14px; align-content: start; }

.work-tile {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-align: left;
  color: inherit;
  border: 1px solid var(--line);
  cursor: pointer;
  background: var(--bg-2);
}

.work-tile-visual {
  line-height: 0;
  background: #100c0e;
}

.work-tile-visual .cover-img {
  position: static;
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.work-tile .cap {
  position: relative;
  z-index: 1;
  padding: 14px 16px 16px;
}

.work-tile small {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: var(--blush);
  margin-bottom: 6px;
}

.work-tile b {
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.45;
}

.rail { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

.work-card {
  text-align: left;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
}

.work-card .thumb {
  margin-bottom: 10px;
  overflow: hidden;
  line-height: 0;
  background: #100c0e;
}

.work-card .thumb .cover-img {
  position: static;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.work-card em {
  font-style: normal;
  font-size: 0.7rem;
  color: var(--blush);
  letter-spacing: 0.12em;
}

.work-card b { display: block; font-weight: 500; margin: 4px 0; line-height: 1.45; }
.work-card span { color: var(--muted); font-size: 0.78rem; font-weight: 300; }

.veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13, 10, 11, 0.88) 0%, rgba(13, 10, 11, 0.15) 42%, transparent 62%);
  pointer-events: none;
}

.status {
  color: var(--muted);
  font-weight: 300;
  padding: 48px 0;
}

/* Feed */
.feed-app {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  height: 100dvh;
  height: calc(100dvh - var(--tabbar-h));
}

.feed-topbar {
  position: relative;
  z-index: 20;
  flex: none;
  padding: max(12px, env(safe-area-inset-top)) 18px 10px;
  background: var(--bg);
}

.feed-topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.feed-chips {
  margin-top: 10px;
}

.feed-topbar .links {
  display: flex;
  gap: 14px;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
}

.feed {
  flex: 1;
  min-height: 0;
  height: auto;
  touch-action: pan-x pan-y;
}

.feed .swiper-wrapper,
.feed .swiper-slide {
  width: 100%;
  height: 100%;
}

.stage {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.stage-visual {
  flex: none;
  width: 100%;
  line-height: 0;
  background: #100c0e;
}

.stage-visual .cover-img {
  position: static;
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}

.stage-meta {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 18px max(20px, env(safe-area-inset-bottom));
}

.stage-meta .kicker,
.stage-title,
.caption-link,
.swipe-cue {
  flex: none;
}

.stage-meta .kicker {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 8px;
}

.stage-title {
  font-size: 1.12rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  margin-bottom: 8px;
}

.stage-cast {
  flex: 1;
  min-height: 0;
  font-size: 0.88rem;
  font-weight: 300;
  line-height: 1.6;
  color: rgba(243, 236, 236, 0.78);
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
}

.swipe-cue {
  margin-top: 12px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
}

.caption-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--blush);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

/* Work detail */
.work-hero {
  position: relative;
  line-height: 0;
  background: #100c0e;
}

.work-hero .cover-img {
  position: static;
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.work-back {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  left: 16px;
  z-index: 6;
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(13, 10, 11, 0.45);
  color: var(--ink);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  padding: 10px 14px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.work-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 32px;
  padding: 24px 0 12px;
}

.work-page {
  padding: 0 0 8px;
  touch-action: pan-y;
}

.work-layout {
  display: grid;
  grid-template-columns: minmax(220px, 380px) minmax(0, 1fr);
  grid-template-areas:
    "back back"
    "jacket intro"
    "jacket aside"
    "samples samples";
  gap: 16px 36px;
  align-items: start;
}

.work-back-row {
  grid-area: back;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.work-back-link {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  padding: 2px 0 6px;
}

.work-back-row .swipe-cue {
  margin: 0;
  text-align: right;
}

.work-back-link:hover,
.work-back-link:focus-visible {
  color: var(--blush);
}

.work-jacket {
  grid-area: jacket;
  line-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #100c0e;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.work-jacket .cover-img {
  position: static;
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.work-intro {
  grid-area: intro;
  min-width: 0;
}

.work-layout .aside { grid-area: aside; }
.work-layout .samples {
  grid-area: samples;
  margin-top: 8px;
}

.work-intro .cta-row { margin-top: 8px; margin-bottom: 22px; }

.work-page.is-from-feed .work-jacket {
  transform-origin: top center;
  animation: work-jacket-in 0.55s ease;
}

.work-page.is-from-feed .work-back-row,
.work-page.is-from-feed .work-intro {
  animation: work-intro-in 0.5s ease 0.08s both;
}

@keyframes work-jacket-in {
  from {
    opacity: 0.35;
    transform: scale(1.12);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes work-intro-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .work-page.is-from-feed .work-jacket,
  .work-page.is-from-feed .work-back-row,
  .work-page.is-from-feed .work-intro {
    animation: none;
  }
}

.work-title {
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.45;
  margin: 0;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  color: var(--muted);
  font-size: 0.82rem;
  margin: 12px 0 18px;
}

.work-copy {
  font-weight: 300;
  line-height: 1.9;
  color: rgba(243, 236, 236, 0.86);
  margin-bottom: 24px;
  overflow: visible;
  white-space: normal;
}

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 28px; }

.tags span,
.tags a {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 8px 12px;
}

.tags a:hover { color: var(--ink); border-color: var(--blush); }

.related {
  padding: 12px 0 40px;
}

.aside {
  border: 1px solid var(--line);
  padding: 20px;
  background: var(--bg-2);
  height: fit-content;
}

.aside dt {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blush);
  margin-top: 14px;
}

.aside dt:first-child { margin-top: 0; }

.aside dd {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 300;
  margin-top: 6px;
  line-height: 1.7;
}

.samples {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 28px;
}

.samples .thumb {
  position: relative;
  line-height: 0;
  overflow: hidden;
}

.samples .thumb .cover-img {
  position: static;
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.doc { padding: 48px 0 24px; }
.doc h1 { font-size: 2.4rem; margin-bottom: 16px; }
.doc h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.5rem;
  margin: 36px 0 12px;
}
.doc p, .doc li {
  font-weight: 300;
  line-height: 1.9;
  color: rgba(243, 236, 236, 0.82);
}
.doc ul { padding-left: 1.2em; margin-bottom: 12px; }
.doc a {
  color: var(--blush);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.contact-form {
  display: grid;
  gap: 12px;
  max-width: 640px;
  margin: 18px 0 16px;
}

.contact-form label {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--blush);
}

.contact-form textarea {
  width: 100%;
  min-height: 180px;
  padding: 14px 16px;
  resize: vertical;
  font-weight: 300;
  line-height: 1.8;
  color: var(--ink);
  background: var(--bg-2);
  border: 1px solid var(--line);
}

.contact-form textarea:focus {
  outline: none;
  border-color: var(--blush);
}

.contact-form .btn { justify-self: start; }
.contact-form .btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.contact-hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.contact-status { color: var(--blush); }
.contact-thanks { margin-top: 18px; }

@media (max-width: 900px) {
  .hero, .pickup, .work-grid { grid-template-columns: 1fr; }
  .rail, .samples { grid-template-columns: repeat(2, 1fr); }
  .site-header { padding: 14px 16px; }
  .work-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "back"
      "jacket"
      "intro"
      "samples"
      "aside";
    gap: 14px;
  }
  .work-jacket {
    width: min(72%, 320px);
    justify-self: center;
  }
  .work-intro .cta-row { margin-bottom: 16px; }
  .work-copy { margin-bottom: 14px; }
  .tags { margin: 10px 0 8px; }
}

.app-tabbar {
  display: none;
}

@media (max-width: 768px) {
  :root {
    --tabbar-h: calc(var(--tabbar-inner) + env(safe-area-inset-bottom, 0px));
  }

  html:not(.is-feed) body {
    padding-bottom: var(--tabbar-h);
  }

  body:has(#blocked:not([hidden])) {
    padding-bottom: 0;
  }

  body:has(#blocked:not([hidden])) .app-tabbar {
    display: none;
  }

  .site-nav,
  .feed-topbar .links {
    display: none;
  }

  .stage-meta {
    padding-bottom: 20px;
  }

  .app-tabbar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    height: var(--tabbar-h);
    padding: 0 8px env(safe-area-inset-bottom, 0px);
    align-items: stretch;
    justify-content: space-around;
    border-top: 1px solid var(--line);
    background: rgba(13, 10, 11, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .app-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: var(--tabbar-inner);
    color: var(--muted);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .app-tab svg {
    width: 22px;
    height: 22px;
    display: block;
  }

  .app-tab span {
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    line-height: 1;
  }

  .app-tab.is-active {
    color: var(--blush);
  }

  .app-tab:active {
    opacity: 0.7;
  }
}

.banner-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin-top: 28px;
}

@media (min-width: 900px) {
  .banner-grid { grid-template-columns: 1fr 1fr; }
}

.banner-note {
  color: var(--blush);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.banner-slot {
  overflow: hidden;
  max-width: 100%;
  border: 1px solid var(--line);
  background: var(--bg-2);
  padding: 12px;
}

.banner-frame {
  display: block;
  width: 100%;
  height: auto;
  border: 0;
  background: transparent;
}

.banner-slot img,
.banner-slot object {
  max-width: 100%;
  height: auto;
  display: block;
}

.cms-panel {
  border: 1px solid var(--line);
  background: var(--bg-2);
  padding: 20px;
  margin: 24px 0;
}

.cms-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 28px 0 12px;
}

.cms-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--blush);
  margin: 14px 0 8px;
}

.cms-label:first-child { margin-top: 0; }

.cms-input {
  width: 100%;
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(13, 10, 11, 0.6);
  color: var(--ink);
  font-size: 0.88rem;
  padding: 12px 14px;
}

.cms-textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
}

.cms-status {
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--blush);
}

.cms-status.is-error { color: #e0a3ad; }

.cms-item {
  border: 1px solid var(--line);
  padding: 14px;
  margin-bottom: 10px;
}

.cms-item.is-off { opacity: 0.55; }

.cms-item-main {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.cms-item-main code {
  color: var(--blush);
  font-size: 0.82rem;
}

.cms-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cms-item-actions .btn { padding: 10px 12px; font-size: 0.78rem; }

body.is-cms .app-tabbar,
body.is-studio .app-tabbar { display: none; }

/* —— Studio —— */
.studio .h2 {
  margin-top: 28px;
  font-size: 1.45rem;
}

.studio-key-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.studio-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 28px 32px;
  align-items: start;
}

.studio-personas {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 10px;
  margin: 8px 0 12px;
}

.studio-persona {
  appearance: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  color: inherit;
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 14px 14px 16px;
}

.studio-persona b {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.studio-persona span {
  display: block;
  font-size: 0.75rem;
  line-height: 1.55;
  color: var(--muted);
  font-weight: 300;
}

.studio-persona.is-on {
  border-color: var(--blush);
  box-shadow: inset 0 0 0 1px var(--blush);
}

.studio-prompt {
  font-family: inherit;
  font-size: 0.88rem;
  min-height: 120px;
}

.studio-opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

.studio-preview {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: 14px 0 8px;
  padding: 10px;
  border: 1px solid var(--line);
  background: rgba(13, 10, 11, 0.45);
}

.studio-preview-art {
  position: relative;
  width: 72px;
  height: 96px;
  overflow: hidden;
  background: #1a1214;
}

.studio-preview em,
.studio-preview span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
  letter-spacing: 0.04em;
}

.studio-preview b {
  display: block;
  margin: 4px 0;
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.45;
}

.studio-result-col {
  position: sticky;
  top: 16px;
}

.studio-output {
  min-height: 320px;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.85;
  white-space: pre-wrap;
}

.studio-count {
  margin: 8px 0 0;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.studio-history-item {
  appearance: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  color: inherit;
  background: transparent;
  border: 1px solid var(--line);
  padding: 12px 14px;
  margin-bottom: 8px;
}

.studio-history-item b {
  display: block;
  color: var(--blush);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  font-weight: 400;
  margin-bottom: 4px;
}

.studio-history-item span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 900px) {
  .studio-layout,
  .studio-key-row,
  .studio-opts {
    grid-template-columns: 1fr;
  }

  .studio-result-col {
    position: static;
  }

  .studio-key-row .btn {
    justify-self: start;
  }
}

/* —— Quiz —— */
.quiz-page {
  padding-bottom: 32px;
}

.quiz-page .quiz-lead {
  max-width: 36rem;
  margin-bottom: 14px;
}

.quiz-toolbar {
  margin: 0 0 22px;
}

.quiz-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.quiz-toolbar-note {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.quiz-score-badge {
  display: inline-block;
  margin-right: 4px;
  padding: 1px 6px;
  border: 1px solid var(--line);
  color: var(--blush);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.quiz-promo {
  padding: 18px 0 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.quiz-promo .block-head {
  margin-bottom: 8px;
}

.quiz-promo .kicker {
  letter-spacing: 0.12em;
}

.quiz-promo-copy {
  max-width: 36rem;
  margin: 0 0 4px;
  color: var(--muted);
}

.quiz-promo .cta-row {
  margin-top: 14px;
}

.quiz-result-next {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.quiz-review {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: left;
}

.quiz-review-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 14px;
}

.quiz-review-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.quiz-review-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px 14px;
  align-items: start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.quiz-review-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.quiz-review-thumb {
  position: relative;
  display: block;
  width: 72px;
  height: 108px;
  overflow: hidden;
  background: #1a1214;
  border: 1px solid var(--line);
  flex: 0 0 auto;
}

.quiz-review-thumb .cover-img,
.quiz-review-thumb .quiz-review-img {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center;
}

.quiz-review-mark {
  margin: 0 0 4px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.quiz-review-item.is-correct .quiz-review-mark { color: #9dca9d; }
.quiz-review-item.is-wrong .quiz-review-mark { color: var(--blush); }

.quiz-review-title-link {
  display: block;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
  line-height: 1.45;
  margin-bottom: 6px;
}

.quiz-review-title-link:hover {
  color: var(--blush);
}

.quiz-review-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  font-size: 0.8rem;
}

.quiz-score {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 16px;
  margin: 0 0 14px;
  padding: 10px 0;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  line-height: 1.4;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.quiz-score span {
  white-space: nowrap;
}

.quiz-card {
  max-width: 820px;
  margin: 0 auto;
  padding-bottom: 24px;
}

.quiz-body {
  display: grid;
  grid-template-columns: minmax(200px, 280px) minmax(0, 1fr);
  gap: 28px 36px;
  align-items: start;
}

.quiz-side {
  min-width: 0;
  display: grid;
  gap: 14px;
  align-content: start;
}

.quiz-q {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.35;
  margin: 0;
  text-align: left;
}

.quiz-media {
  margin: 0;
  width: 100%;
  max-width: 280px;
  justify-self: center;
  background: #1a1214;
  border: 1px solid var(--line);
  overflow: hidden;
}

.quiz-media .cover-img,
.quiz-sample {
  position: static;
  inset: auto;
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(420px, 56vh);
  margin: 0 auto;
  object-fit: contain;
  object-position: center;
}

.quiz-choices {
  display: grid;
  gap: 10px;
}

.quiz-choice {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.quiz-choice:hover:not(:disabled),
.quiz-choice:focus-visible:not(:disabled) {
  border-color: rgba(224, 163, 173, 0.55);
  outline: none;
}

.quiz-choice:disabled {
  cursor: default;
}

.quiz-choice-index {
  flex: 0 0 auto;
  width: 1.6rem;
  height: 1.6rem;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--blush);
  border: 1px solid var(--line);
}

.quiz-choice-label {
  font-size: 0.95rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.quiz-choice.is-correct {
  border-color: rgba(120, 180, 120, 0.7);
  background: rgba(80, 140, 80, 0.18);
}

.quiz-choice.is-wrong {
  border-color: rgba(180, 80, 90, 0.7);
  background: rgba(138, 28, 42, 0.22);
}

.quiz-feedback {
  margin: 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
}

.quiz-feedback-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.quiz-feedback.is-correct .quiz-feedback-title { color: #9dca9d; }
.quiz-feedback.is-wrong .quiz-feedback-title { color: var(--blush); }

.quiz-feedback p {
  margin-bottom: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.quiz-feedback strong { color: var(--ink); font-weight: 500; }

.quiz-result {
  text-align: left;
  padding-top: 12px;
  max-width: 720px;
}

.quiz-result-score {
  font-size: 1.05rem;
  margin: 8px 0 18px;
  color: var(--muted);
}

.quiz-rank-label {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 0 0 6px;
}

.quiz-rank-title {
  margin-bottom: 4px;
  line-height: 1.35;
}

.quiz-result--doctor .quiz-rank-title { color: #d4af37; }
.quiz-result--collector .quiz-rank-title { color: #c43a4d; }
.quiz-result--sommelier .quiz-rank-title { color: #e0a3ad; }
.quiz-result--rookie .quiz-rank-title { color: var(--muted); }

.quiz-result--doctor .quiz-rank-title {
  text-shadow: 0 0 24px rgba(212, 175, 55, 0.25);
}

.quiz-cert-wrap {
  margin: 0 0 12px;
  border: 1px solid var(--line);
  background: #0d0a0b;
  overflow: hidden;
}

.quiz-cert-canvas {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
}

.quiz-cert-hint {
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 16px;
}

.quiz-result-actions {
  margin-top: 4px;
}

@media (max-width: 768px) {
  .quiz-card {
    max-width: none;
  }

  .quiz-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .quiz-side {
    display: contents;
  }

  .quiz-q {
    order: 1;
    text-align: center;
    font-size: 1.1rem;
  }

  .quiz-media {
    order: 2;
    margin: 0 auto;
    width: fit-content;
    max-width: min(240px, 72vw);
  }

  .quiz-choices {
    order: 3;
  }

  .quiz-feedback {
    order: 4;
  }

  .quiz-media .cover-img,
  .quiz-sample {
    max-width: min(240px, 72vw);
    max-height: min(300px, 36vh);
  }

  .quiz-score {
    font-size: 0.78rem;
    letter-spacing: 0;
    gap: 6px 12px;
  }

  .quiz-result {
    max-width: none;
  }

  .quiz-rank-title {
    font-size: 1.55rem;
  }
}

