@import url("https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&display=swap");

/* Public pages only. Admin and account settings retain their own legacy stylesheet. */
:root {
  color-scheme: dark;
  --canvas: #171717;
  --surface: #262626;
  --surface-raised: #2c2c2c;
  --border: #353233;
  --text: #f7f7f7;
  --muted: #b2b2b2;
  --subtle: #858585;
  --accent: #ff557d;
  --radius-card: 20px;
  --radius-control: 999px;
  --page-gutter: 16px;
  --header-height: 80px;
  font-family: "Geist", "PingFang SC", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--canvas); color: var(--text); -webkit-font-smoothing: antialiased; }
body.is-login-open { overflow: hidden; }
body.prompt-detail-page { height: 100vh; height: 100dvh; overflow: hidden; }
.prompt-detail-page .page-shell { display: flex; height: 100%; min-height: 0; flex-direction: column; overflow: hidden; }
.prompt-detail-page .site-header { flex: 0 0 auto; border-bottom: 0; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.container { width: min(1440px, calc(100% - var(--page-gutter) * 2)); margin-inline: auto; }

/* Header: one quiet navigation line, as on the reference site. */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(23, 23, 23, .94); border-bottom: 1px solid rgba(255,255,255,.045); backdrop-filter: blur(18px); }
.header-inner { min-height: var(--header-height); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.brand { display: inline-flex; width: max-content; align-items: center; gap: 9px; }
.brand-logo { width: 27px; height: 30px; filter: invert(1); }
.brand-name { font-size: 20px; font-weight: 600; letter-spacing: -.045em; }
.main-nav { display: inline-flex; justify-self: center; align-items: center; gap: clamp(22px, 3vw, 44px); }
.main-nav__link { padding-block: 10px; color: var(--muted); font-size: 14px; transition: color .18s ease; white-space: nowrap; }
.main-nav__link:hover, .main-nav__link--active { color: var(--text); }
.main-nav__link--active { font-weight: 600; }
.account-entry { position: relative; justify-self: end; }
.login-button { min-width: 120px; min-height: 42px; padding: 10px 22px; border: 1px solid var(--border); border-radius: var(--radius-control); background: transparent; color: var(--text); font-size: 14px; transition: background .18s ease, border-color .18s ease; }
.login-button:hover { background: var(--surface); border-color: #575757; }
.login-button.is-logged-in { position: relative; width: 42px; min-width: 42px; height: 42px; min-height: 42px; padding: 0; overflow: hidden; background: #343434; }
.login-button__fallback { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text); font-size: 17px; font-weight: 600; line-height: 1; }
.login-button__avatar { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.account-membership-badge { position: absolute; z-index: 1; right: -7px; bottom: -5px; display: inline-flex; min-width: 30px; height: 18px; align-items: center; justify-content: center; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #211318; box-shadow: 0 0 0 2px var(--canvas); font-size: 9px; font-weight: 700; letter-spacing: .04em; line-height: 1; pointer-events: none; }
.account-membership-badge[hidden], .account-dropdown__membership[hidden] { display: none; }
.account-dropdown { position: absolute; z-index: 30; top: calc(100% + 12px); right: 0; width: min(280px, calc(100vw - 32px)); }
.account-dropdown__panel { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); box-shadow: 0 20px 60px #0008; }
.account-dropdown__profile { display: flex; align-items: center; gap: 12px; padding: 18px; }
.account-dropdown__avatar-shell { position: relative; display: grid; width: 44px; height: 44px; flex: 0 0 44px; place-items: center; overflow: hidden; border-radius: 50%; background: #383838; }
.account-dropdown__avatar-fallback { color: var(--text); font-size: 18px; font-weight: 600; line-height: 1; }
.account-dropdown__avatar { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.account-dropdown__meta { min-width: 0; flex: 1; }
.account-dropdown__name, .account-dropdown__phone { margin: 0; }
.account-dropdown__name { overflow: hidden; color: var(--text); font-size: 15px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.account-dropdown__phone { overflow: hidden; margin-top: 3px; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.account-dropdown__membership { display: inline-flex; margin-top: 9px; padding: 5px 8px; border-radius: 999px; background: #343434; color: var(--muted); font-size: 11px; font-weight: 600; line-height: 1; }
.account-dropdown__membership.is-pro { background: #ff557d22; color: #ff9ab1; }
.account-dropdown__divider { height: 1px; background: var(--border); }
.account-dropdown__action { display: flex; width: 100%; align-items: center; gap: 11px; padding: 13px 18px; border: 0; background: transparent; color: var(--text); text-align: left; font-size: 14px; }
.account-dropdown__action:hover { background: #383838; }
.account-dropdown__action svg, .account-dropdown__action-icon { width: 20px; height: 20px; filter: grayscale(1) brightness(2); }

.hero-section { padding: 60px 0 74px; }
.hero-content { min-height: 280px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 34px; text-align: center; }
.hero-copy { display: grid; justify-items: center; gap: 22px; }
.hero-copy::before { content: "为创作者精选 · 持续更新"; width: fit-content; padding: 8px 14px; border-radius: var(--radius-control); background: #222; color: #d8d8d8; font-size: 12px; line-height: 1; }
.hero-copy h1 { max-width: 820px; margin: 0; font-size: clamp(42px, 4.2vw, 56px); font-weight: 500; line-height: 1.05; letter-spacing: -.06em; }
.hero-copy p { max-width: 560px; margin: 0; color: #d0d0d0; font-size: clamp(15px, 1.5vw, 18px); line-height: 1.6; }
.hero-actions { display: flex; justify-content: center; }
.hero-cta { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 10px; padding: 0 24px; border: 1px solid var(--border); border-radius: var(--radius-control); background: #111; color: var(--text); font-size: 14px; box-shadow: 0 8px 18px #0003; transition: transform .2s ease, border-color .2s ease, background .2s ease; }
.hero-cta:hover { transform: translateY(-2px); border-color: #686868; background: var(--surface); }
.hero-cta svg { width: 18px; height: 18px; }

/* Library: compact controls, image-first cards, four columns on wide screens. */
.prompt-library-section { scroll-margin-top: calc(var(--header-height) + 18px); padding: 18px 0 120px; }
.library-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.membership-heading { display: grid; gap: 10px; }
.section-kicker { width: fit-content; margin: 0 0 7px; padding: 7px 11px; border: 1px solid var(--border); border-radius: var(--radius-control); color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .08em; }
.membership-heading > p:last-child { max-width: 60ch; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.search-box { display: flex; width: min(320px, 100%); height: 42px; flex: 0 0 auto; align-items: center; gap: 10px; padding: 0 16px; border: 1px solid var(--border); border-radius: var(--radius-control); background: #202020; color: var(--muted); transition: border-color .18s ease; }
.search-box:focus-within { border-color: var(--accent); }
.search-box svg { width: 18px; height: 18px; flex: 0 0 18px; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 13px; }
.search-box input::placeholder { color: var(--subtle); }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.filter-chip { min-height: 38px; padding: 8px 16px; border: 0; border-radius: var(--radius-control); background: transparent; color: var(--muted); font-size: 13px; transition: background .18s ease, color .18s ease; }
.filter-chip:hover { background: #292929; color: var(--text); }
.filter-chip.is-active { background: #353233; color: var(--text); }
.prompt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 8px; align-items: start; gap: 8px 16px; }
.prompt-card { min-width: 0; animation: card-in .45s cubic-bezier(.2,.75,.2,1) both; }
.prompt-visual { --card-badge-inset: 12px; position: relative; isolation: isolate; overflow: hidden; margin: 0; border-radius: var(--radius-card); background: var(--surface); cursor: pointer; }
.prompt-open { position: absolute; inset: 0; z-index: 2; width: 100%; border: 0; border-radius: inherit; background: transparent; }
.prompt-media, .prompt-card[data-shape] .prompt-media { display: block; width: 100%; height: auto; object-fit: contain; background: #242424; }
.prompt-overlay { position: absolute; inset: 0; z-index: 3; display: flex; align-items: end; padding: 12px; opacity: 0; pointer-events: none; transition: opacity .18s ease; }
.prompt-card:hover .prompt-overlay, .prompt-visual:focus-within .prompt-overlay { opacity: 1; }
.prompt-overlay__content { display: flex; width: 100%; justify-content: flex-end; }
.prompt-copy { position: relative; z-index: 4; display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border: 1px solid #ffffff55; border-radius: 10px; background: #171717e8; color: var(--text); pointer-events: auto; }
.prompt-copy:hover, .prompt-copy.is-copied { background: var(--accent); border-color: var(--accent); }
.prompt-copy svg { width: 17px; height: 17px; }
.prompt-copy::before { content: "已复制"; position: absolute; right: 0; bottom: calc(100% + 7px); padding: 5px 8px; border-radius: 7px; background: #171717; color: #fff; font-size: 11px; white-space: nowrap; opacity: 0; pointer-events: none; }
.prompt-copy.is-copied::before { opacity: 1; }
.prompt-card__caption { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; }
.prompt-card__info { min-width: 0; flex: 1 1 auto; }
.prompt-title { overflow: hidden; margin: 0; font-size: 14px; font-weight: 500; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.prompt-card__access { position: absolute; z-index: 4; top: var(--card-badge-inset); right: var(--card-badge-inset); display: inline-flex; min-height: 24px; align-items: center; padding: 0 9px; border: 1px solid #ffffff80; border-radius: calc(var(--radius-card) - var(--card-badge-inset)); background: #efefefc9; color: #343434; font-size: 10px; font-weight: 600; letter-spacing: .06em; line-height: 1; pointer-events: none; }
.prompt-card__access--pro { width: 30px; height: 30px; justify-content: center; padding: 0; border-color: #fff4f7a6; background: #f7e8ed; color: #62313f; }
.membership-crown { display: block; width: 20px; height: 20px; background: currentColor; -webkit-mask: url("./assets/membership-crown.svg") center / contain no-repeat; mask: url("./assets/membership-crown.svg") center / contain no-repeat; }
.prompt-card__reactions, .detail-page__reactions { display: flex; align-items: center; gap: 8px; }
.prompt-card__reactions { flex: 0 0 auto; justify-content: flex-end; gap: 6px; }
.prompt-card__views { display: inline-flex; min-height: 40px; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; }
.prompt-card__views svg { display: block; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.prompt-card__views-count { font-variant-numeric: tabular-nums; }
.prompt-card__reactions .reaction-button { min-width: 40px; min-height: 40px; justify-content: center; padding: 0 9px; border-width: 0; }
.prompt-card__reactions .reaction-button:hover, .prompt-card__reactions .reaction-button.is-active { background: transparent; }
.prompt-card__reactions .reaction-button:active { transform: scale(.96); }
.detail-page__reactions { margin-top: 4px; }
.reaction-button { display: inline-flex; min-height: 36px; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 11px; cursor: pointer; transition: border-color .18s ease, color .18s ease, background .18s ease, transform .18s ease; }
.reaction-button svg { display: block; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.reaction-button:hover, .reaction-button:focus-visible { border-color: #747474; color: var(--text); outline: none; }
.reaction-button:focus-visible { box-shadow: 0 0 0 3px #ff557d55; }
.reaction-button.is-active { border-color: #ff557d66; background: #ff557d16; color: #ff8ba7; }
.reaction-button.is-active svg { fill: #ff557d55; }
.reaction-button:disabled { opacity: .55; cursor: wait; }
.reaction-button__count { min-width: 1ch; font-variant-numeric: tabular-nums; }
.reaction-toast { position: fixed; z-index: 70; right: 20px; bottom: 20px; max-width: min(360px, calc(100vw - 40px)); margin: 0; padding: 12px 16px; border: 1px solid #69414a; border-radius: 10px; background: #292124; color: #ffe3e9; box-shadow: 0 12px 36px #0008; font-size: 13px; }
.empty-state { padding: 40px 0; color: var(--muted); text-align: center; }

/* Pricing carries the same dark surfaces and reserved accent. */
.pricing-section { min-height: calc(100vh - var(--header-height)); padding: clamp(76px, 9vw, 128px) 0 120px; }
.membership-layout { display: grid; gap: 56px; }
.membership-heading { max-width: 760px; }
.pricing-section .membership-heading { width: min(100%, 760px); margin-inline: auto; justify-items: center; text-align: center; }
.membership-heading h1 { margin: 0; font-size: clamp(48px, 6vw, 76px); font-weight: 500; line-height: 1; letter-spacing: -.06em; }
.membership-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.membership-plan { display: flex; min-height: 354px; flex-direction: column; gap: 26px; padding: clamp(26px, 3vw, 42px); border: 1px solid var(--border); border-radius: 18px; background: #202020; }
.membership-plan--pro { border-color: #534248; background: var(--surface); }
.membership-plan__topline { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.membership-plan__name { margin: 0; font-size: 25px; font-weight: 500; }
.membership-plan__status { padding: 7px 11px; border: 1px solid #ff557d66; border-radius: var(--radius-control); color: #ff9db3; font-size: 11px; white-space: nowrap; }
.membership-plan__status--open { border-color: var(--border); color: var(--muted); }
.pricing-plan__price { margin: 0; font-size: clamp(40px, 4vw, 56px); font-weight: 500; letter-spacing: -.06em; }
.pricing-plan__price span { color: var(--muted); font-size: 14px; font-weight: 400; letter-spacing: 0; }
.pricing-billing { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-block: 1px solid var(--border); }
.pricing-billing__term { min-width: 0; padding: 18px 0; }
.pricing-billing__term + .pricing-billing__term { padding-left: 24px; border-left: 1px solid var(--border); }
.pricing-billing__term h3 { margin: 0 0 10px; color: var(--muted); font-size: 13px; font-weight: 500; }
.pricing-billing__term .pricing-plan__price { font-size: clamp(34px, 3.5vw, 48px); white-space: nowrap; }
.pricing-billing__note { margin: 8px 0 0; color: var(--subtle); font-size: 12px; line-height: 1.4; }
.membership-plan ul { display: grid; gap: 13px; margin: 0; padding: 0; list-style: none; }
.membership-plan li { color: var(--muted); font-size: 14px; }
.membership-plan li::before { content: "✓"; margin-right: 12px; color: var(--accent); }
.membership-secondary { display: inline-flex; width: fit-content; min-height: 44px; align-items: center; margin-top: auto; padding: 9px 18px; border: 1px solid var(--border); border-radius: var(--radius-control); background: #171717; font-size: 13px; }
.membership-secondary:hover { background: #323232; }
.pricing-plan__availability { margin: auto 0 0; padding-top: 18px; border-top: 1px solid var(--border); color: var(--subtle); font-size: 12px; line-height: 1.6; }

/* Footer is a dark continuation of the gallery, not a separate light slab. */
.site-footer { border-top: 1px solid var(--border); background: #141414; }
.footer-inner { min-height: 196px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 28px; }
.footer-brand-block { display: grid; gap: 8px; }
.footer-brand-title, .footer-brand-subtitle, .footer-copyright { margin: 0; }
.footer-brand-title { font-size: 17px; font-weight: 600; }
.footer-brand-subtitle { color: var(--subtle); font-size: 13px; line-height: 1.5; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; }
.footer-nav__link { color: var(--muted); font-size: 13px; }
.footer-nav__link:hover { color: var(--text); }
.footer-copyright { justify-self: end; color: var(--subtle); font-size: 12px; white-space: nowrap; }

/* Shared authentication dialog for public pages. */
.login-modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; }
.login-modal__backdrop { position: absolute; inset: 0; background: #000b; backdrop-filter: blur(12px); }
.login-modal__dialog { position: relative; width: min(520px, 100%); max-height: calc(100dvh - 40px); overflow-y: auto; border: 1px solid #343434; border-radius: 20px; background: #1c1c1c; box-shadow: 0 28px 90px #000a; }
.login-modal__close { position: absolute; top: 18px; right: 18px; display: grid; width: 44px; height: 44px; place-items: center; border: 1px solid var(--border); border-radius: 50%; background: transparent; color: var(--muted); transition: background .18s ease, color .18s ease; }
.login-modal__close:hover { background: #333; color: var(--text); }
.login-modal__close svg { width: 18px; height: 18px; }
.login-modal__body { padding: 48px 42px 34px; }
.login-form { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr); gap: 0; }
.login-form__title { margin: 0; font-size: 30px; font-weight: 600; line-height: 1.25; letter-spacing: -.025em; text-align: center; }
.login-form__description { margin: 12px 0 0; color: var(--muted); font-size: 14px; line-height: 1.65; text-align: center; }
.login-form__panel { min-width: 0; }
.login-form__panel#login-panel-google { margin-top: 38px; }
.login-form__google { display: flex; width: 100%; min-width: 0; min-height: 44px; justify-content: center; }
.login-form__google > div { width: min(400px, 100%); max-width: 100%; height: 44px; overflow: hidden; border-radius: 999px; background: #292929; }
.login-form__google > div:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.login-form__divider { display: flex; align-items: center; gap: 16px; margin: 28px 0 26px; color: #b2b2b2; font-size: 13px; }
.login-form__divider::before, .login-form__divider::after { content: ""; flex: 1; border-top: 1px solid #3a3a3a; }
.login-form__phone { display: grid; grid-template-columns: 1fr; gap: 12px; }
.login-form__phone-heading { display: flex; align-items: center; justify-content: space-between; }
.login-form__label { color: var(--text); font-size: 13px; font-weight: 500; }
.login-form__soon { padding: 3px 8px; border: 1px solid #414141; border-radius: 999px; color: #a7a7a7; font-size: 11px; }
.login-form__phone-field, .login-form__code-field { display: flex; min-height: 52px; align-items: center; border: 1px solid #3e3e3e; border-radius: 999px; background: #2a2a2a; }
.login-form__phone-field:focus-within, .login-form__code-field:focus-within { border-color: #929292; }
.login-form__country { padding: 0 14px; border-right: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.login-form__phone input, .login-form__code-field input { width: 100%; min-width: 0; padding: 12px 14px; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 14px; }
.login-form__phone input::placeholder { color: #aaa; }
.login-form__phone input:disabled { opacity: .7; cursor: not-allowed; }
.login-form__send-code { flex: 0 0 auto; min-height: 38px; margin-right: 7px; padding: 0 14px; border: 0; border-radius: 999px; background: #3a3a3a; color: var(--text); font-size: 12px; }
.login-form__send-code:disabled { color: #888; cursor: not-allowed; }
.login-form__submit { min-height: 52px; margin-top: 8px; border: 0; border-radius: 999px; background: #fb4665; color: #fff; font-size: 14px; font-weight: 600; }
.login-form__submit:disabled { background: #333; color: #898989; cursor: not-allowed; }
.login-form__phone-note { margin: 0; color: var(--subtle); font-size: 12px; line-height: 1.5; text-align: center; }
.login-form__feedback { margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.login-form__feedback.is-error { color: #ff889e; }
.login-form__feedback.is-success { color: #b9dfb5; }
.login-form__footnote { margin: 24px 0 0; color: #929292; font-size: 12px; line-height: 1.55; text-align: center; }
@media (max-width: 520px) { .login-modal { padding: 12px; } .login-modal__dialog { max-height: calc(100dvh - 24px); } .login-modal__body { padding: 42px 22px 28px; } .login-form__title { font-size: 25px; } .login-form__description { padding: 0 12px; } .login-form__panel#login-panel-google { margin-top: 30px; } }

.detail-page { display: flex; min-height: 0; flex: 1 1 auto; overflow: hidden; padding: 24px 0; }
.detail-page > .container { display: flex; min-height: 0; flex-direction: column; }
.detail-page__topline { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 20px; border: 0; }
.detail-page__back { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13px; transition: color .18s ease; }
.detail-page__back:hover { color: var(--text); }
.detail-page__back span { font-size: 19px; line-height: 1; }
.detail-page__topline-label { color: var(--subtle); font-size: 10px; font-weight: 600; letter-spacing: .13em; }
.detail-page__share { min-height: 36px; padding: 6px 13px; border: 1px solid var(--border); border-radius: var(--radius-control); background: transparent; color: var(--text); font-size: 12px; }
.detail-page__share:hover, .detail-page__share.is-copied { background: #303030; }
.detail-page__layout { display: grid; min-height: 0; flex: 1 1 auto; grid-template-columns: minmax(0, 2fr) minmax(400px, 1fr); align-items: stretch; gap: clamp(28px, 4vw, 64px); overflow: hidden; padding-top: 24px; }
.detail-page__preview-column { min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.detail-page__preview-column::-webkit-scrollbar, .detail-prompt-card__body::-webkit-scrollbar, .detail-styles::-webkit-scrollbar { display: none; }
.detail-page__preview-heading { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; color: var(--muted); font-size: 12px; }
.detail-page__preview-heading span:last-child { color: var(--subtle); font-size: 10px; font-weight: 600; letter-spacing: .13em; }
.detail-page__preview-surface { --preview-scale: 1; --preview-canvas-height: 696px; display: grid; width: 100%; height: max(360px, calc(100vh - var(--header-height) - 180px)); height: max(360px, calc(100dvh - var(--header-height) - 180px)); place-items: center; overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: #101010; }
.detail-page__preview-surface.is-image { display: block; height: auto; aspect-ratio: auto; }
.detail-page__preview-stage { display: grid; width: calc(1040px * var(--preview-scale)); height: calc(var(--preview-canvas-height) * var(--preview-scale)); place-items: center; flex: 0 0 auto; }
.detail-page__preview-surface.is-image .detail-page__preview-stage { display: block; width: 100%; height: auto; }
.detail-page__preview-viewport { width: 1040px; height: var(--preview-canvas-height); overflow: hidden; border-radius: 4px; background: #f9f9f9; transform: scale(var(--preview-scale)); transform-origin: top left; }
.detail-page__preview-surface.is-image .detail-page__preview-viewport { width: 100%; height: auto; overflow: visible; transform: none; }
.detail-page__preview-viewport::-webkit-scrollbar { display: none; }
.detail-page__preview-image { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; background: #eceef2; }
.detail-page__preview-surface.is-image .detail-page__preview-image { height: auto; }
.detail-page__preview-image[hidden] { display: none; }
.detail-page__preview-frame { width: 100%; height: 100%; border: 0; background: #f9f9f9; pointer-events: none; }
.detail-page__preview-note { max-width: 65ch; margin: 16px 0 0; color: var(--subtle); font-size: 11px; line-height: 1.55; }
.detail-page__content { display: flex; min-width: 0; min-height: 0; flex-direction: column; gap: 22px; overflow: hidden; }
.detail-page__header { display: grid; gap: 12px; margin-top: 32px; }
.detail-page__title { margin: 0; font-size: clamp(30px, 2.8vw, 40px); font-weight: 500; line-height: 1.14; letter-spacing: -.045em; text-wrap: balance; }
.detail-page__intro { max-width: 70ch; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.75; text-wrap: pretty; }
.detail-page__status { min-height: 0; flex: 1 1 auto; overflow-y: auto; padding-block: 96px; color: var(--muted); font-size: 14px; }
.detail-page__status h1 { margin: 0 0 12px; color: var(--text); font-size: clamp(32px, 4vw, 52px); font-weight: 500; }
.detail-page__status p { margin: 0 0 24px; }
.detail-page__status a { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }
.detail-prompt-meta, .detail-prompt-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.detail-prompt-meta { min-height: 28px; }
.detail-prompt-meta h2 { display: inline-flex; align-items: baseline; gap: 8px; margin: 0; font-size: 18px; font-weight: 550; letter-spacing: -.02em; }
.detail-prompt-meta h2 span { color: var(--subtle); font-size: 10px; font-weight: 600; letter-spacing: .12em; }
.detail-verified-at { margin: 0; color: var(--subtle); font-size: 11px; }
.detail-tag-list { display: flex; flex-wrap: wrap; gap: 7px; }
.detail-tag { display: inline-flex; min-height: 30px; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid var(--border); border-radius: var(--radius-control); background: #232323; color: #ddd; font-size: 11px; }
.detail-tag__icon, .detail-tag__icon svg { display: inline-flex; width: 15px; height: 15px; }
.detail-char-count { flex: 0 0 auto; margin: 0; color: var(--subtle); font-size: 11px; }
.detail-view-switcher { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: var(--radius-control); background: #202020; }
.detail-view-switcher__button { min-height: 40px; padding: 5px 8px; border: 0; border-radius: var(--radius-control); background: transparent; color: var(--muted); font-size: 12px; white-space: nowrap; transition: background .18s ease, color .18s ease; }
.detail-view-switcher__button:hover { color: var(--text); }
.detail-view-switcher__button.is-active { background: #434343; color: var(--text); }
/* Shared style-guide system for every case. */
.detail-styles {
  --guide-space-sm: 8px;
  --guide-space-md: 16px;
  --guide-space-lg: 24px;
  --guide-radius: 12px;
  --guide-control-radius: 8px;
  --guide-body-size: 14px;
  --guide-label-size: 12px;
  min-height: 0; flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: none; border: 0; border-radius: var(--guide-radius); background: var(--canvas);
}
.detail-styles__header, .detail-styles__section-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--guide-space-md); }
.detail-styles__header { padding: var(--guide-space-lg) var(--guide-space-md) var(--guide-space-md); }
.detail-styles__eyebrow, .detail-styles__section-heading span { display: block; margin: 0 0 var(--guide-space-sm); color: var(--subtle); font-size: 11px; font-weight: 500; letter-spacing: .1em; }
.detail-styles__header h2 { margin: 0; font-size: 24px; font-weight: 500; letter-spacing: -.03em; }
.detail-styles__section-heading h3 { margin: 0; color: var(--text); font-size: 20px; font-weight: 500; letter-spacing: -.02em; }
.detail-styles__action { min-height: 44px; padding: var(--guide-space-sm) var(--guide-space-md); border: 1px solid var(--border); border-radius: var(--guide-control-radius); background: var(--surface); color: var(--text); font-size: var(--guide-label-size); white-space: nowrap; transition: background .18s ease, border-color .18s ease; }
.detail-styles__action:hover, .detail-styles__action.is-copied { border-color: var(--subtle); background: var(--surface-raised); }
.detail-styles :is(button, summary):focus-visible { outline: 2px solid var(--text); outline-offset: 4px; }
.detail-styles__source, .detail-styles__empty { margin: 0; padding: 0 var(--guide-space-md) var(--guide-space-md); color: var(--subtle); font-size: var(--guide-label-size); line-height: 1.6; }
.detail-styles__section, .detail-styles__note { display: grid; gap: var(--guide-space-lg); padding: var(--guide-space-lg) var(--guide-space-md); }
.detail-styles__section-heading small { color: var(--subtle); font-size: var(--guide-label-size); font-variant-numeric: tabular-nums; }
.detail-styles__palette { display: grid; grid-template-columns: repeat(8,minmax(0,1fr)); gap: var(--guide-space-md); }
.detail-styles__swatch { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: var(--guide-space-sm); align-content: start; min-width: 0; padding: 0; border: 0; background: transparent; color: var(--text); text-align: left; cursor: copy; }
.detail-styles__swatch-color { display: block; width: 100%; height: 64px; border: 1px solid var(--border); border-radius: var(--guide-control-radius); transition: border-color .18s ease; }
.detail-styles__swatch:hover .detail-styles__swatch-color, .detail-styles__swatch.is-copied .detail-styles__swatch-color { border-color: var(--text); }
.detail-styles__swatch-name { color: var(--muted); font-size: var(--guide-label-size); line-height: 1.5; overflow-wrap: anywhere; }
.detail-styles__swatch-value { color: var(--subtle); font-family: ui-monospace, SFMono-Regular, monospace; font-size: var(--guide-label-size); font-variant-numeric: tabular-nums; }
.detail-styles__actions { display: flex; flex-wrap: wrap; gap: var(--guide-space-sm); }
.detail-styles__type-card { display: grid; gap: var(--guide-space-md); }
.detail-styles__type-card small { color: var(--subtle); font-size: var(--guide-label-size); line-height: 1.6; }
#detail-styles-typography { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--guide-space-md); }
.spec-font-card { display: grid; grid-row: span 6; grid-template-rows: subgrid; row-gap: 0; min-width: 0; padding: var(--guide-space-lg); border-radius: var(--guide-radius); background: var(--surface); }
.spec-font-card h4, .detail-spec-row h4 { margin: 0; color: var(--muted); font-size: var(--guide-label-size); font-weight: 500; line-height: 1.6; }
.spec-font-name { display: block; margin-top: var(--guide-space-sm); font-size: 20px; font-weight: 500; }
.spec-font-preview { margin: var(--guide-space-lg) 0; color: var(--text); font-size: clamp(24px,3vw,36px); line-height: 1.25; }
.spec-font-code { margin: 0 0 var(--guide-space-md); padding: var(--guide-space-md); background: var(--canvas); border-radius: var(--guide-control-radius); color: var(--muted); font-size: var(--guide-label-size); line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.spec-font-card > button { justify-self: start; align-self: start; margin: 0 0 var(--guide-space-md); }
.detail-spec-row { display: grid; grid-template-columns: minmax(120px,.23fr) minmax(0,1fr); gap: var(--guide-space-lg); padding: var(--guide-space-md) 0; align-items: baseline; }
#detail-styles-typography > .detail-spec-row { grid-column: 1 / -1; }
.detail-spec-row > p, .spec-description p { margin: var(--guide-space-sm) 0 0; white-space: pre-line; color: var(--muted); font-size: var(--guide-body-size); line-height: 1.8; overflow-wrap: anywhere; }
.detail-spec-row > p { margin: 0; }
.spec-description { min-width: 0; }
.spec-description summary { display: flex; align-items: baseline; gap: var(--guide-space-md); padding: 0; list-style: none; cursor: pointer; color: var(--muted); font-size: var(--guide-body-size); font-weight: 400; line-height: 1.8; overflow-wrap: anywhere; }
.spec-description summary::-webkit-details-marker { display: none; }
.spec-description summary::after { content: "+"; margin-left: auto; flex-shrink: 0; color: var(--subtle); }
.spec-description[open] summary { color: var(--text); }
.spec-description[open] summary::after { content: "−"; }
@media(max-width:900px) { .detail-styles__palette { grid-template-columns: repeat(4,minmax(0,1fr)); } }
@media(max-width:700px) {
  #detail-styles-typography { grid-template-columns: minmax(0,1fr); }
  .spec-font-card { padding: var(--guide-space-md); }
  .detail-spec-row { grid-template-columns: minmax(0,1fr); gap: var(--guide-space-sm); }
  .detail-styles__swatch-color { height: 56px; }
}
.detail-membership-note { padding: 13px; border: 1px solid #ff557d55; border-radius: 12px; background: #ff557d0e; font-size: 12px; }
.detail-membership-note p { margin: 7px 0; color: var(--muted); line-height: 1.5; }
.detail-membership-note a { color: #ffa2b7; text-decoration: underline; }
.detail-prompt-card { display: flex; min-height: 0; flex: 1 1 auto; flex-direction: column; overflow: hidden; border: 0; border-radius: 12px; background: #202020; }
.detail-prompt-card__head { padding: 11px 13px; border: 0; }
.detail-prompt-card__file { display: inline-flex; min-width: 0; flex: 1 1 auto; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.detail-prompt-card__file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-prompt-card__file svg { width: 16px; height: 16px; flex: 0 0 auto; }
.detail-prompt-card__actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.detail-copy-full, .detail-download-md { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 6px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: #2c2c2c; color: var(--text); font-size: 11px; white-space: nowrap; }
.detail-copy-full:hover, .detail-copy-full.is-copied, .detail-download-md:hover { background: #383838; }
.detail-copy-full svg { width: 16px; height: 16px; }
.detail-prompt-card__body { min-height: 0; flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; padding: 16px; }
.detail-prompt-card__content { margin: 0; color: #dedede; font-family: "SFMono-Regular", ui-monospace, monospace; font-size: 12px; line-height: 1.75; white-space: pre-wrap; word-break: break-word; user-select: text; }

@keyframes card-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 960px) {
  .prompt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-page__layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 44fr) minmax(0, 56fr); gap: 16px; }
  .detail-page__preview-surface { height: auto; aspect-ratio: 1040 / 696; }
  .detail-page__content { width: 100%; }
  .footer-inner { grid-template-columns: 1fr auto; }
  .footer-nav { justify-content: flex-end; }
  .footer-copyright { grid-column: 1 / -1; justify-self: start; padding-bottom: 20px; }
}
@media (max-width: 640px) {
  :root { --header-height: 64px; }
  .header-inner { grid-template-columns: auto 1fr auto; gap: 14px; }
  .brand-logo { width: 22px; height: 25px; }
  .brand-name { font-size: 16px; }
  .main-nav { justify-self: end; gap: 14px; }
  .main-nav__link { font-size: 12px; }
  .login-button { min-width: 58px; min-height: 34px; padding: 7px 12px; font-size: 12px; }
  .hero-section { padding: 50px 0 30px; }
  .hero-content { min-height: 300px; gap: 28px; }
  .hero-copy h1 { font-size: clamp(38px, 10vw, 56px); }
  .hero-copy p { font-size: 14px; }
  .library-toolbar { flex-direction: column-reverse; align-items: stretch; gap: 20px; }
  .search-box { width: 100%; }
  .filter-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .filter-row::-webkit-scrollbar { display: none; }
  .filter-chip { flex: 0 0 auto; }
  .prompt-grid { display: flex; flex-direction: column; align-items: stretch; gap: 17px; }
  .membership-compare { grid-template-columns: 1fr; }
  .membership-plan { min-height: 310px; }
  .pricing-billing__term + .pricing-billing__term { padding-left: 16px; }
  .footer-inner { grid-template-columns: 1fr; align-items: start; gap: 20px; padding-block: 36px; }
  .footer-nav { justify-content: flex-start; }
  .footer-copyright { grid-column: auto; padding: 0; }
  .detail-page { padding: 16px 0; }
  .detail-page__topline { padding-bottom: 16px; }
  .detail-page__topline-label { display: none; }
  .detail-page__layout { gap: 16px; padding-top: 16px; }
  .detail-page__content { gap: 12px; }
  .detail-prompt-card__head { flex-wrap: wrap; }
  .detail-prompt-card__file { flex-basis: 100%; }
  .detail-prompt-card__actions { width: 100%; justify-content: flex-end; }
  .detail-page__title { font-size: clamp(30px, 8vw, 42px); }
  .detail-prompt-meta { align-items: flex-start; }
  .detail-char-count { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* Primary search lives in the hero, in place of the browse CTA. */
.hero-actions { width: min(520px, 100%); }
.hero-actions .search-box { width: 100%; height: 54px; padding-inline: 20px; text-align: left; }
.hero-actions .search-box input { min-width: 0; font-size: 14px; }
@media (max-width: 600px) { .hero-actions .search-box { height: 50px; padding-inline: 16px; } }

.verified-demo-actions { display:flex; gap:16px; flex-wrap:wrap; margin:16px 0; font-size:13px; }
.verified-demo-actions a { padding-block:10px; text-decoration:underline; text-underline-offset:4px; }
.detail-page__preview-frame.is-interactive { pointer-events: auto; }
/* User-supplied membership crown, tinted with the surrounding label. */
.main-nav__link[href="./pricing.html"],
#pro-plan-title,
.account-membership-badge,
.account-dropdown__membership.is-pro {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.main-nav__link[href="./pricing.html"]::before,
#pro-plan-title::before,
.account-membership-badge::before,
.account-dropdown__membership.is-pro::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  background: currentColor;
  -webkit-mask: url("./assets/membership-crown.svg") center / contain no-repeat;
  mask: url("./assets/membership-crown.svg") center / contain no-repeat;
}
#pro-plan-title::before { width: 24px; height: 24px; }
.account-membership-badge::before { width: 12px; height: 12px; }
.account-dropdown__membership.is-pro::before { width: 14px; height: 14px; }
@media (max-width: 960px) {
  body.prompt-detail-page.has-verified-demo { height: auto; overflow: visible; }
  .has-verified-demo .page-shell { height: auto; overflow: visible; }
  .has-verified-demo .detail-page { display: block; overflow: visible; }
  .has-verified-demo .detail-page__layout { grid-template-rows: auto auto; overflow: visible; gap: 32px; }
  .has-verified-demo .detail-page__preview-column { overflow: visible; }
  .has-verified-demo .detail-prompt-card__body { max-height: 70dvh; }
}

/* Live reference retains the card link and copy control above the preview. */
.prompt-live-preview { position: absolute; top: 0; left: 0; z-index: 1; width: 1200px; height: 900px; border: 0; transform-origin: top left; pointer-events: none; }

/* Detail reading order: preview first, prompt tools underneath. */
body.prompt-detail-page { height: auto; overflow: visible; }
.prompt-detail-page .page-shell { height: auto; min-height: 100dvh; overflow: visible; }
.prompt-detail-page .detail-page { display: block; overflow: visible; padding-bottom: 48px; }
.prompt-detail-page .detail-page__layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; gap: 40px; overflow: visible; }
.prompt-detail-page .detail-page__preview-column { overflow: visible; }
.prompt-detail-page .detail-page__content { overflow: visible; }
.prompt-detail-page .detail-prompt-card { flex: none; }
.prompt-detail-page .detail-prompt-card__body { flex: none; max-height: 70dvh; overflow-y: auto; }
.prompt-detail-page .detail-styles { flex: none; max-height: none; overflow: visible; }
@media (max-width: 640px) {
  .prompt-detail-page .detail-page__layout { gap: 28px; }
}
.prompt-detail-page .detail-page__preview-surface:not(.is-image) { max-width: 1040px; margin-inline: auto; height: auto; aspect-ratio: 1040 / 696; }

/* Keep case actions alongside the title. */
.detail-page__header { grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 24px; }
.detail-page__header .detail-page__reactions { justify-self: end; margin-top: 0; white-space: nowrap; }
.detail-page__header .detail-page__intro, .detail-page__header .detail-verified-at { grid-column: 1 / -1; }
@media (max-width: 520px) {
  .detail-page__header { column-gap: 12px; }
  .detail-page__header .detail-page__title { font-size: 24px; }
  .detail-page__header .detail-page__reactions { gap: 6px; }
  .detail-page__header .reaction-button { padding-inline: 8px; }
}

.pricing-plan__name { display: inline-flex; align-items: center; gap: 8px; }
.pricing-plan__name#pro-plan-title::before { content: none; }
.pricing-plan__name .membership-crown { flex: 0 0 auto; }
.pricing-launch-note { margin: -20px 0 0; color: var(--subtle); text-align: center; font-size: 12px; line-height: 1.6; }

/* Preview wrappers must not add a visible perimeter. */
.detail-page__preview-surface { border: 0; }
.detail-page__preview-viewport { border-radius: 0; }

/* AuthCard-style shell, backed by the existing authentication methods. */
.login-modal {
  --auth-padding: 32px;
  --auth-gap: 8px;
  --auth-radius: 24px;
  --auth-control-height: 44px;
  --auth-button-height: 40px;
  --auth-button-radius: 999px;
}
.login-modal__dialog { width: min(400px, 100%); border: 1px solid var(--border); border-radius: var(--auth-radius); background: var(--canvas); box-shadow: 0 24px 64px #0005; }
.login-modal__backdrop { background: #0009; backdrop-filter: blur(6px); }
.login-modal__body { padding: var(--auth-padding); }
.login-modal__close { top: calc(var(--auth-padding) - 10px); right: calc(var(--auth-padding) - 10px); width: var(--auth-control-height); height: var(--auth-control-height); border: 0; border-radius: 8px; color: var(--subtle); }
.login-form__brand { margin: 0 48px 32px 0; color: var(--text); font-size: 20px; line-height: 24px; font-weight: 700; letter-spacing: -.8px; }
.login-form__title { text-align: left; font-size: 24px; line-height: 32px; font-weight: 500; letter-spacing: -.025em; }
.login-form__description { margin: 8px 0 0; padding: 0; text-align: left; color: var(--muted); font-size: 14px; line-height: 1.6; }
.login-form__panel { width: 100%; min-width: 0; }
.login-form__panel#login-panel-phone { margin-top: 24px; }
.login-form__panel#login-panel-google { margin-top: 32px; }
.login-form__divider:not([hidden]) + #login-panel-google { margin-top: 0; }
.login-form__divider { margin: 20px 0; font-size: 12px; color: var(--subtle); }
.login-form__divider::before, .login-form__divider::after { border-color: var(--border); }
.login-form__google { display: flex; align-items: center; width: 100%; min-height: var(--auth-button-height); height: var(--auth-button-height); padding: 0; border-radius: var(--auth-button-radius); background: transparent; }
.login-form__google > div { width: 100%; min-height: var(--auth-button-height); height: var(--auth-button-height); border-radius: var(--auth-button-radius); background: transparent; }
.login-form__google:has(> div:focus-within) { outline: 2px solid var(--text); outline-offset: 4px; }
.login-form__phone-field, .login-form__code-field { min-height: 44px; border-radius: 8px; background: var(--surface); border-color: var(--border); }
.login-form__submit { min-height: var(--auth-button-height); border-radius: var(--auth-button-radius); background: var(--text); color: var(--canvas); font-weight: 500; }
.login-form__send-code { border-radius: 6px; font-variant-numeric: tabular-nums; }
.login-form__browse-note { justify-self: stretch; min-height: var(--auth-button-height); margin: 12px 0 0; padding: var(--auth-gap); border: 1px solid var(--border); border-radius: var(--auth-button-radius); background: transparent; color: var(--muted); font-size: 14px; line-height: 20px; transition: color .18s ease, background .18s ease; }
.login-form__browse-note:hover { color: var(--text); background: var(--surface); }
.login-form__feedback { padding: 12px; border-radius: 8px; background: var(--surface); }
.login-form__footnote { margin-top: 16px; }
.login-modal :is(button, input):focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.login-form__google > div:focus-within { outline-color: var(--text); }
@media(max-width:520px) { .login-modal { --auth-padding: 24px; } .login-form__title { font-size: 24px; line-height: 32px; } }
@media(prefers-reduced-motion:reduce) { .login-modal button { transition: none; } }

/* Membership questions share the page's quiet editorial layout. */
.pricing-faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(32px, 6vw, 88px); margin-top: 40px; padding-top: 64px; border-top: 1px solid var(--border); }
.pricing-faq__heading h2 { margin: 0; font-size: clamp(26px, 3vw, 36px); font-weight: 500; letter-spacing: -.04em; }
.pricing-faq__heading > p:last-child { margin: 16px 0 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.pricing-faq__item { border-bottom: 1px solid var(--border); }
.pricing-faq__item:first-child { border-top: 1px solid var(--border); }
.pricing-faq__item summary { display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 76px; padding: 24px 4px; color: var(--text); font-size: 16px; line-height: 1.6; cursor: pointer; list-style: none; }
.pricing-faq__item summary::-webkit-details-marker { display: none; }
.pricing-faq__item summary:hover { color: var(--muted); }
.pricing-faq__item summary > span { position: relative; flex: 0 0 16px; height: 16px; }
.pricing-faq__item summary > span::before, .pricing-faq__item summary > span::after { content: ""; position: absolute; background: currentColor; }
.pricing-faq__item summary > span::before { top: 7px; left: 1px; width: 14px; height: 1px; }
.pricing-faq__item summary > span::after { top: 1px; left: 7px; width: 1px; height: 14px; }
.pricing-faq__item[open] summary > span::after { display: none; }
.pricing-faq__item > p { max-width: 66ch; margin: 0; padding: 0 36px 24px 4px; color: var(--muted); font-size: 14px; line-height: 1.9; }
@media (max-width: 700px) {
  .pricing-faq { grid-template-columns: minmax(0, 1fr); gap: 32px; margin-top: 8px; padding-top: 40px; }
  .pricing-faq__item summary { gap: 16px; min-height: 68px; padding-block: 20px; font-size: 15px; }
  .pricing-faq__item > p { padding-right: 24px; }
}

/* Full-width live previews use their real viewport, including native fullscreen. */
.prompt-detail-page .detail-page__preview-surface:not(.is-image) { position: relative; width: 100vw; max-width: none; margin-inline: calc(50% - 50vw); height: max(420px, calc(100dvh - 184px)); aspect-ratio: auto; border-radius: 0; }
.has-verified-demo .detail-page__preview-stage, .has-verified-demo .detail-page__preview-viewport { width: 100%; height: 100%; transform: none; }
.detail-preview-fullscreen { position: absolute; top: 16px; right: 16px; z-index: 5; min-height: 40px; padding: 8px 14px; border: 1px solid #ffffff40; border-radius: 999px; color: #f7f7f7; background: #171717dd; font: inherit; font-size: 12px; }
.detail-preview-fullscreen:hover { background: #343434; }
.prompt-detail-page .detail-page__preview-surface:fullscreen, .prompt-detail-page .detail-page__preview-surface.is-fullscreen { width: 100vw; max-width: none; height: 100dvh; margin: 0; border-radius: 0; }
.detail-page__preview-surface.is-fullscreen { position: fixed !important; inset: 0; z-index: 100; }
body.is-preview-fullscreen { overflow: hidden; }
.detail-page__preview-surface.is-image { position: relative; }
.detail-page__preview-surface.is-image:fullscreen .detail-page__preview-stage, .detail-page__preview-surface.is-image.is-fullscreen .detail-page__preview-stage { height: 100%; }
.detail-page__preview-surface.is-image:fullscreen .detail-page__preview-viewport, .detail-page__preview-surface.is-image.is-fullscreen .detail-page__preview-viewport { height: 100%; }
.detail-page__preview-surface.is-image:fullscreen .detail-page__preview-image, .detail-page__preview-surface.is-image.is-fullscreen .detail-page__preview-image { height: 100%; object-fit: contain; }

/* Preview follows the primary navigation without a second toolbar. */
.prompt-detail-page .detail-page { padding-top: 0; }
.prompt-detail-page .detail-page__layout { padding-top: 0; }
.detail-brand-nav { display: flex; align-items: center; gap: 24px; min-width: 0; }
.detail-brand-nav .detail-page__back { min-width: 44px; min-height: 44px; justify-content: center; gap: 6px; }
.detail-brand-nav .detail-back-label { font-size: 12px; }
.prompt-detail-page .detail-page__preview-surface:not(.is-image) { height: max(420px, calc(100dvh - var(--header-height))); }
.detail-preview-fullscreen { top: auto; bottom: 16px; right: 16px; }
.detail-page__preview-surface:fullscreen .detail-preview-fullscreen, .detail-page__preview-surface.is-fullscreen .detail-preview-fullscreen { top: 16px; bottom: auto; }
.prompt-detail-page .detail-page__preview-surface:fullscreen, .prompt-detail-page .detail-page__preview-surface.is-fullscreen { height: 100dvh; }
@media (max-width: 640px) {
  .detail-brand-nav { gap: 4px; }
  .detail-brand-nav .detail-back-label { display: none; }
  .detail-page__header { grid-template-columns: minmax(0, 1fr); }
  .detail-page__header .detail-page__reactions { justify-self: start; }
}

/* Detail actions use matching icons with comfortable hit targets. */
.detail-page__reactions .reaction-button, .detail-page__reactions .detail-page__share { display: inline-flex; flex: 0 0 44px; width: 44px; height: 44px; min-height: 44px; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); }
.detail-page__reactions button svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.detail-page__reactions button:hover { background: var(--surface); color: var(--text); }
.detail-page__reactions .reaction-button.is-active, .detail-page__reactions .detail-page__share.is-copied { background: #ff557d16; color: #ff8ba7; }
.detail-page__reactions .reaction-button.is-active svg { fill: #ff557d33; }



/* Case previews keep the gallery context and expose only prompt actions. */
body.is-prompt-dialog-open { overflow: hidden; }
.prompt-dialog { position: fixed; inset: 0; width: min(1240px, calc(100vw - 40px)); height: min(920px, calc(100dvh - 40px)); max-width: none; max-height: none; margin: auto; padding: 0; overflow: hidden; border: 0; border-radius: 20px; background: var(--canvas); color: var(--text); box-shadow: 0 32px 100px #0009; }
.prompt-dialog::backdrop { background: #000b; backdrop-filter: blur(8px); }
.prompt-dialog__bar { height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px 0 24px; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.prompt-dialog__bar button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--text); font-size: 28px; cursor: pointer; }
.prompt-dialog__bar button:hover { background: var(--surface); }
.prompt-dialog__bar button:focus-visible { outline: 2px solid var(--text); outline-offset: -2px; }
.prompt-dialog > iframe { display: block; width: 100%; height: calc(100% - 52px); border: 0; background: var(--canvas); }
.is-embedded-detail .site-header { display: none; }
.is-embedded-detail .page-shell { min-height: 0; }
.is-embedded-detail .detail-page { padding-bottom: 0; }
.is-embedded-detail .detail-page > .container { width: 100%; padding: 20px; }
.is-embedded-detail .detail-page__layout { gap: 20px; }
.is-embedded-detail .detail-page__preview-surface:not(.is-image) { width: 100%; height: max(260px, calc(100dvh - 220px)); margin: 0; border-radius: 12px; }
.is-embedded-detail .detail-page__preview-surface.is-image { max-height: max(260px, calc(100dvh - 220px)); overflow: auto; border-radius: 12px; }
.is-embedded-detail .detail-page__header { margin-top: 18px; gap: 8px; }
.is-embedded-detail .detail-page__title { font-size: clamp(22px, 2.5vw, 28px); }
.detail-prompt-card { border: 0; background: transparent; }
.detail-prompt-card__head { padding: 0; border: 0; }
.detail-prompt-card__actions { width: 100%; justify-content: flex-end; }
.detail-prompt-card__actions button { min-height: 44px; }
@media (max-width: 640px) {
  .prompt-dialog { width: calc(100vw - 16px); height: calc(100dvh - 16px); border-radius: 16px; }
  .prompt-dialog__bar { height: 52px; padding-left: 16px; padding-right: 8px; }
  .prompt-dialog > iframe { height: calc(100% - 52px); }
  .is-embedded-detail .detail-page > .container { padding: 16px; }
  .detail-prompt-card__actions button { flex: 1; justify-content: center; }
}

/* Compact controls share one row, leaving the case preview as the main content. */
.is-embedded-detail .detail-page__content { display: grid; grid-template-columns: minmax(0, 280px) 1fr; gap: 16px; align-items: start; }
.is-embedded-detail .detail-view-switcher { padding: 3px; }
.is-embedded-detail .detail-view-switcher__button { min-height: 40px; }
.is-embedded-detail .detail-prompt-card { grid-column: 2; grid-row: 1; }
.is-embedded-detail .detail-styles,
.is-embedded-detail .detail-membership-note,
.is-embedded-detail #detail-quota-note { grid-column: 1 / -1; }
.is-embedded-detail #detail-quota-note:not([hidden]) ~ .detail-prompt-card { grid-row: 2; }
@media (max-width: 640px) {
  .is-embedded-detail .detail-page__preview-surface:not(.is-image) { height: max(240px, calc(100dvh - 340px)); }
  .is-embedded-detail .detail-page__preview-surface.is-image { max-height: max(240px, calc(100dvh - 340px)); }
  .is-embedded-detail .detail-page__content { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .is-embedded-detail .detail-prompt-card,
  .is-embedded-detail #detail-quota-note:not([hidden]) ~ .detail-prompt-card { grid-column: 1; grid-row: auto; }
}

/* Prompt actions sit immediately before fullscreen inside the preview. */
.detail-preview-toolbar { position: absolute; bottom: 16px; right: 16px; z-index: 5; display: flex; align-items: center; gap: 8px; max-width: calc(100% - 32px); }
.detail-preview-toolbar .detail-prompt-card { flex: 0 1 auto; margin: 0; overflow: visible; }
.detail-preview-toolbar .detail-prompt-card__actions { width: auto; gap: 8px; flex-wrap: nowrap; }
.detail-page__preview-surface .detail-preview-toolbar .detail-preview-fullscreen { position: static; flex: 0 0 auto; }
.detail-preview-toolbar .detail-prompt-card__actions button,
.detail-preview-toolbar .detail-preview-fullscreen { flex: 0 0 auto; min-height: 40px; padding: 8px 14px; border: 1px solid #ffffff40; border-radius: 999px; background: #171717e6; color: #f7f7f7; font-size: 12px; white-space: nowrap; }
.detail-preview-toolbar button:hover { background: #343434; }
.detail-preview-toolbar button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.detail-page__preview-surface:fullscreen .detail-preview-toolbar,
.detail-page__preview-surface.is-fullscreen .detail-preview-toolbar { top: 16px; bottom: auto; }
.detail-page__content:not(:has(> :not([hidden]))) { display: none; }
@media (max-width: 640px) {
  .detail-preview-toolbar { right: 8px; bottom: 8px; gap: 6px; max-width: calc(100% - 16px); }
  .detail-preview-toolbar .detail-prompt-card__actions { gap: 6px; }
  .detail-preview-toolbar .detail-prompt-card__actions button,
  .detail-preview-toolbar .detail-preview-fullscreen { padding-inline: 9px; font-size: 11px; }
}

/* Let the preview occupy space left after the actual case description. */
.is-embedded-detail .detail-page__layout { display: flex; flex-direction: column; min-height: calc(100dvh - 40px); gap: 16px; }
.is-embedded-detail .detail-page__preview-column { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.is-embedded-detail .detail-page__preview-surface:not(.is-image):not(.is-fullscreen):not(:fullscreen) { flex: 1; height: auto; min-height: 260px; }
.is-embedded-detail .detail-page__header { flex: 0 0 auto; }
.is-embedded-detail .detail-page__content { flex: 0 0 auto; }
@media (max-width: 640px) {
  .is-embedded-detail .detail-page__layout { min-height: calc(100dvh - 32px); gap: 12px; }
  .is-embedded-detail .detail-page__preview-surface:not(.is-image):not(.is-fullscreen):not(:fullscreen) { min-height: 240px; }
}

/* Only the Quizlet screenshot study fits its full 1440×900 composition in a desktop dialog. */
@media(min-width:701px){
.is-embedded-detail.has-quizlet-demo .detail-page__preview-surface:not(.is-fullscreen):not(:fullscreen){background:#f6f7fb;display:flex;justify-content:center;align-items:center}
.is-embedded-detail.has-quizlet-demo .detail-page__preview-surface:not(.is-fullscreen):not(:fullscreen) .detail-page__preview-stage{width:calc(1440px * var(--quizlet-fit-scale));height:calc(900px * var(--quizlet-fit-scale));display:block;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}
.is-embedded-detail.has-quizlet-demo .detail-page__preview-surface:not(.is-fullscreen):not(:fullscreen) .detail-page__preview-viewport{width:1440px;height:900px;position:absolute;left:0;top:0;margin:0;transform:scale(var(--quizlet-fit-scale));transform-origin:top left}
}
