/* Shared, quiet presentation for choosing a story before entering play. */
[hidden] { display: none !important; }
body.discovery-page,body.discovery-detail { background: linear-gradient(145deg,color-mix(in srgb,var(--bg-start) 25%,#fffdf9),color-mix(in srgb,var(--bg-end) 25%,#fffdf9)); }
body.discovery-page::before,body.discovery-detail::before { opacity: .25; }
body.discovery-page::after,body.discovery-detail::after { opacity: .2; }
.discovery-page .hero { text-align: left; margin: 10px 0 30px; padding: 26px 0 24px; border-bottom: 1px solid var(--border); }
.discovery-eyebrow { display: block; color: var(--accent-dark); font-size: 11px; letter-spacing: 3px; margin-bottom: 12px; }
.discovery-page .hero h1 { color: var(--ink); background: none; -webkit-text-fill-color: currentColor; font-size: 34px; letter-spacing: 2px; line-height: 1.5; }
.discovery-page .plaza-layout { grid-template-columns: 158px minmax(0,1fr); gap: 30px; }
.plaza-main { min-width: 0; }
.discovery-page .category-sidebar { box-shadow: none; padding: 18px 12px; }
.discovery-page .category-list button.chip { font-family: inherit; text-align: left; cursor: pointer; }
.discovery-page .category-list button.chip:focus-visible,.story-card a:focus-visible,.story-card button:focus-visible,.discovery-detail :focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 4px; }
.discovery-page .search-input { width: 100%; }
.discovery-page .sort-bar { flex-wrap: wrap; gap: 6px; }
.clear-search { color: var(--accent-dark); border: 0; background: transparent; font: inherit; cursor: pointer; text-decoration: underline; padding: 4px; }
.discovery-page .grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; }
.discovery-page .story-card { padding: 0; gap: 0; animation: none; cursor: pointer; box-shadow: 0 3px 16px #49323d08; }
.discovery-page .story-card::before { content: none; }
.discovery-page .story-card:hover { transform: translateY(-3px); }
.discovery-page .story-card .cover { aspect-ratio: 3/4; margin: 0; border-radius: 13px 13px 0 0; max-height: none; background: color-mix(in srgb,var(--accent) 8%,#f8f1ec); display: block; text-decoration: none; }
.discovery-page .story-card .cover img { width: 100%; height: 100%; object-fit: contain; }
.discovery-page .story-card:hover .cover img { transform: none; }
.discovery-page .story-card .cover.cover-letter { display: flex; }
.cover-letter { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 12px; color: var(--accent-dark); background: radial-gradient(ellipse at 30% 10%,#ffffffb0,transparent 70%),linear-gradient(135deg,#f8f1ec,color-mix(in srgb,var(--accent) 18%,#f8f1ec)); }
.cover-letter b { font: 36px/1.4 var(--font-story); font-weight: 400; letter-spacing: 6px; }
.cover-letter span { font: 10px/1.5 inherit; letter-spacing: 5px; opacity: .7; }
.story-card-body { padding: 20px 18px 16px; flex: 1; display: flex; flex-direction: column; min-width: 0; }
.discovery-page .story-card .title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; color: var(--ink); text-decoration: none; font-size: 18px; line-height: 1.65; min-height: 3.3em; margin-bottom: 8px; }
.discovery-page .story-card .title:hover { color: var(--accent-dark); }
.discovery-page .story-card .desc { flex: none; font-size: 13px; line-height: 1.85; height: 5.55em; min-height: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 12px; overflow-wrap: anywhere; }
.discovery-page .story-card .tags { gap: 5px; margin-bottom: 14px; }
.discovery-page .story-card .tags .chip { background: color-mix(in srgb,var(--accent) 6%,transparent); padding: 2px 8px; border-color: transparent; color: var(--ink-light); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.discovery-page .story-card .meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; }
.story-card .card-author { color: var(--ink-light); text-decoration: none; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.card-share { font: inherit; color: var(--ink-light); background: transparent; border: 0; cursor: pointer; padding: 4px 0 4px 8px; flex-shrink: 0; }
.card-stats { display: flex; gap: 12px; color: var(--ink-light); font-size: 11px; margin-top: 10px; }
.discovery-page .empty { grid-column: 1/-1; line-height: 1.9; }
.discovery-page .empty button { margin-top: 12px; }
.discovery-detail .detail-wrap { max-width: 1100px; padding: 26px 28px 70px; position: relative; z-index: 1; }
.back-to-plaza { display: inline-block; margin-bottom: 22px; color: var(--ink-light); text-decoration: none; font-size: 13px; }
.back-to-plaza:hover { color: var(--accent-dark); }
.discovery-detail .detail-hero { display: grid; grid-template-columns: 235px minmax(0,1fr); padding: 28px; gap: 30px; border-radius: 18px; box-shadow: var(--shadow-sm); margin-bottom: 24px; }
.discovery-detail #cover-box { max-height: none; aspect-ratio: 2/3; border-radius: 10px; overflow: hidden; align-self: start; background: color-mix(in srgb,var(--accent) 8%,#f8f1ec); }
.discovery-detail .detail-cover { height: 100%; width: 100%; object-fit: contain; }
.detail-hero-content { min-width: 0; display: flex; flex-direction: column; }
.discovery-detail .detail-head { padding: 4px 0 0; }
.discovery-detail .detail-title { font-size: 29px; line-height: 1.55; margin-bottom: 10px; overflow-wrap: anywhere; }
.discovery-detail .detail-author { font-size: 13px; }
.discovery-detail .detail-author .author-link { max-width: 100%; overflow-wrap: anywhere; }
.discovery-detail .detail-tags .chip { max-width: 100%; overflow-wrap: anywhere; }
.detail-lead { font-size: 14px; line-height: 1.95; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-light); margin: 16px 0; }
.discovery-detail .detail-stats { padding: 12px 0 0; gap: 16px; flex-wrap: wrap; font-size: 12px; margin-top: auto; }
.discovery-detail .detail-stats b { font: inherit; font-weight: 600; }
.discovery-detail .detail-actions { margin: 18px 0 0; gap: 8px; }
.discovery-detail .btn-play { flex: initial; min-width: 180px; font-size: 15px; box-shadow: none; }
.discovery-detail .social-btn { padding: 9px 12px; font-size: 13px; }
.detail-entry-note { margin-top: 10px; font-size: 12px; line-height: 1.8; color: var(--ink-light); }
.discovery-detail .detail-section { padding: 26px 28px; margin-bottom: 20px; box-shadow: none; border-radius: 16px; }
.discovery-detail .detail-section h3 { font-size: 20px; color: var(--ink); margin-bottom: 14px; }
.discovery-detail .detail-section h3::before { content: none; }
.preview-heading { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.preview-number { color: var(--accent-dark); font: 26px/1.4 var(--font-story); opacity: .7; }
.preview-heading h3 { margin-bottom: 4px !important; }
.discovery-detail .preview-heading p { color: var(--ink-light); font-size: 12px; }
.discovery-detail .premise-text { font-size: 15px; line-height: 2; }
.preview-role { margin: 20px 0; padding: 16px 20px; border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; background: color-mix(in srgb,var(--accent) 5%,transparent); }
.preview-role h4 { font-size: 13px; color: var(--accent-dark); margin-bottom: 10px; }
.preview-role dl { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 8px 18px; font-size: 14px; line-height: 1.9; }
.preview-role dt { color: var(--ink-light); }
.preview-role dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.preview-fields { display: flex; flex-wrap: wrap; gap: 9px; list-style: none; margin: 16px 0; padding: 0; }
.preview-fields li { border: 1px solid var(--border); background: color-mix(in srgb,var(--accent) 4%,transparent); border-radius: 9px; padding: 10px 14px; font-size: 14px; }
.preview-fields small { display: block; color: var(--ink-light); font-size: 11px; margin-top: 4px; }
.discovery-detail .preview-help { color: var(--ink-light); font-size: 13px; line-height: 1.9; }
.discovery-detail .preview-boundary { margin-top: 12px; color: var(--accent-dark); font-size: 13px; }
.opening-excerpt { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.opening-excerpt summary,.world-background summary { cursor: pointer; color: var(--accent-dark); font-size: 14px; line-height: 1.9; }
.opening-excerpt p,.world-background p { margin-top: 16px !important; }
.discovery-detail .world-background h3 { display: inline; font-size: 15px; }
.discovery-detail .comment-input-row input { min-width: 0; }
.detail-minor-actions { display: flex; gap: 8px; justify-content: flex-end; margin: -6px 0 20px; }
@media(min-width:769px) and (max-width:1100px) { .discovery-page .grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:768px) {
  .discovery-page .container { padding: 16px 16px 65px; }
  .discovery-page .hero { margin: 0 0 20px; padding: 16px 0 22px; }
  .discovery-page .hero h1 { font-size: 27px; letter-spacing: 1px; }
  .discovery-page .plaza-layout { grid-template-columns: minmax(0,1fr); gap: 18px; }
  .discovery-page .category-sidebar { padding: 12px; }
  .discovery-page .category-title { display: none; }
  .discovery-page .category-list { flex-flow: row nowrap; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .discovery-page .category-list .chip { flex-shrink: 0; width: auto; font-size: 12px; padding: 7px 10px; }
  .discovery-page .grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .discovery-page .story-card .cover { aspect-ratio: 3/4; }
  .story-card-body { padding: 12px 11px; }
  .discovery-page .story-card .title { font-size: 15px; }
  .discovery-page .story-card .desc { font-size: 12px; }
  .discovery-page .story-card .tags { gap: 3px; margin-bottom: 9px; }
  .discovery-page .story-card .tags .chip { font-size: 10px; padding: 2px 5px; }
  .card-stats { flex-wrap: wrap; gap: 4px 10px; font-size: 10px; }
  .cover-letter b { font-size: 27px; }
  .cover-letter span { font-size: 9px; letter-spacing: 2px; }
  .discovery-detail .detail-wrap { padding: 18px 16px 65px; }
  .back-to-plaza { margin-bottom: 16px; }
  .discovery-detail .detail-hero { grid-template-columns: 86px minmax(0,1fr); gap: 16px; padding: 18px; }
  .detail-hero-content { display: contents; }
  .discovery-detail .detail-head { padding: 0; }
  .discovery-detail .detail-title { font-size: 21px; line-height: 1.55; }
  .discovery-detail .detail-author { font-size: 12px; margin-bottom: 8px; }
  .discovery-detail .detail-tags { gap: 4px; }
  .discovery-detail .detail-tags .chip { font-size: 10px; padding: 2px 6px; }
  .detail-lead,.discovery-detail .detail-stats,.discovery-detail .detail-actions,.detail-entry-note { grid-column: 1/-1; margin: 0; }
  .discovery-detail .detail-stats { gap: 10px; font-size: 11px; }
  .discovery-detail .btn-play { min-width: 0; flex: 1 0 100%; }
  .discovery-detail .detail-actions .social-btn { flex: 1; justify-content: center; }
  .discovery-detail .detail-section { padding: 22px 18px; }
  .discovery-detail .detail-section h3 { font-size: 18px; }
  .preview-heading { gap: 12px; }
  .preview-role { padding: 12px 14px; }
  .preview-role dl { grid-template-columns: minmax(0,1fr); gap: 2px; }
  .preview-role dd { margin-bottom: 8px; }
  .preview-fields { gap: 8px; }
  .preview-fields li { font-size: 13px; padding: 9px 11px; }
}
@media(prefers-reduced-motion:reduce) { .discovery-page .story-card,.discovery-page .story-card img { transition: none; } .discovery-page .story-card:hover,.discovery-page .story-card:hover img { transform: none; } }
