/* explore.png layout; existing warm paper, native type, and supplied artwork. */
.phone.discover-surface { height: var(--preview-height); background: var(--paper); }
.discover-surface .home-indicator { height: 12px; background: var(--surface); }
.discover-surface .page-scroll > .discover-page { padding: var(--space-4) var(--page-gutter) var(--space-7); }
.discover-page [hidden] { display: none !important; }
.discover-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.discover-page h1 { font-size: var(--text-3xl); line-height: var(--leading-3xl); letter-spacing: 0; }
.discover-search { display: flex; gap: 10px; align-items: center; margin-bottom: 24px; }
.discover-search-field { min-width: 0; display: flex; align-items: center; flex: 1; gap: 9px; height: var(--control-height); padding: 0 12px; border-radius: var(--input-radius); background: var(--input-bg); color: var(--muted); }
.discover-search-field > .icon { width: 18px; height: 18px; }
.discover-search input { flex: 1; min-width: 0; width: 100%; height: 44px; padding: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: var(--weight-regular) var(--text-sm)/var(--leading-sm) var(--font-body); caret-color: var(--accent); }
.discover-search input::placeholder { color: var(--muted); opacity: 1; }
.discover-search input::-webkit-search-cancel-button { display: none; }
.discover-search-field:focus-within { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
.discover-search-submit { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; padding: 0; border-radius: 50%; color: #fff; background: var(--accent); }
.discover-search-submit .icon { width: 23px; height: 23px; stroke-width: 1.8; }
.discover-search-submit:hover { background: var(--button-primary-hover-bg); }
.discover-clear { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; margin-right: -12px; padding: 0; border-radius: 10px; }
.discover-clear .icon { width: 16px; height: 16px; }
.discover-section + .discover-section { margin-top: 26px; }
.discover-section-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-height: 44px; margin-bottom: var(--space-2); }
.discover-section-heading h2 { font: var(--weight-semibold) var(--text-lg)/var(--leading-lg) var(--font-body); }
.discover-section-heading > a { display: inline-flex; align-items: center; justify-content: flex-end; gap: 3px; flex-shrink: 0; min-width: var(--control-height); min-height: var(--control-height); font-size: var(--text-xs); line-height: var(--leading-xs); color: var(--muted); }
.discover-section-heading > a .icon { width: 14px; height: 14px; }
.discover-section-heading > a:hover { color: var(--accent-strong); }
.discover-scene-track { display: flex; gap: 10px; margin: 0 calc(-1 * var(--page-gutter)); padding: 0 var(--page-gutter) 4px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--page-gutter); scrollbar-width: none; }
.discover-scene-track::-webkit-scrollbar { display: none; }
.discover-scene { flex: 0 0 148px; min-width: 0; min-height: 192px; padding: 12px; border-radius: var(--card-radius); background: #f8e7dd; scroll-snap-align: start; text-align: left; }
.discover-scene.scene-submitted { background: #f7ecd9; }
.discover-scene.scene-gathering { background: #f2e3df; }
.discover-scene.scene-screen { background: #f9e8d9; }
.discover-scene.scene-arrived { background: #f4e5d5; }
.discover-scene.scene-important { background: #f8e2da; }
.discover-scene-art { display: grid; place-items: center; height: 108px; margin-bottom: 12px; }
.discover-scene-art > img { width: 100%; height: 100%; object-fit: contain; }
.discover-scene-art .artwork { width: 74px; height: 88px; }
.discover-scene h3 { margin: 0; font: var(--weight-medium) var(--text-sm)/var(--leading-sm) var(--font-body); }
.discover-scene p { margin-top: 6px; color: var(--muted); font-size: var(--text-xs); line-height: var(--leading-xs); }
.discover-scene:hover { box-shadow: inset 0 0 0 1px #d4ac92; }
.discover-method-row { display: flex; align-items: center; gap: 14px; position: relative; width: 100%; min-height: 124px; padding: 14px; border-radius: var(--method-card-radius); background: var(--method-card-bg); text-align: left; box-shadow: var(--method-row-shadow); }
.discover-method-art { display: grid; place-items: center; flex: 0 0 90px; height: 96px; border-radius: 9px; background: #fcf6ec; }
.discover-method-art .artwork { width: 86px; height: 86px; }
.discover-method-copy { display: flex; flex-direction: column; align-self: stretch; justify-content: center; flex: 1; min-width: 0; }
.discover-method-copy > strong { font-size: var(--text-lg); line-height: var(--leading-lg); font-weight: var(--weight-semibold); }
.discover-method-summary { display: block; margin-top: var(--space-1); color: var(--muted); font-size: var(--text-sm); line-height: var(--leading-sm); }
.discover-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px; color: var(--muted); font-size: var(--text-xs); line-height: var(--leading-xs); }
.discover-method-copy > .discover-meta { margin-top: 12px; padding-right: 20px; }
/* Directory cards are scan-first summaries, rather than reading body copy. */
.phone[data-screen="discoverMethods"] .discover-method-copy > strong { font-size: var(--text-md); line-height: var(--leading-md); font-weight: var(--weight-semibold); }
.phone[data-screen="discoverMethods"] .discover-method-summary { color: color-mix(in srgb, var(--muted) 95%, var(--method-card-bg)); line-height: 20px; font-weight: var(--weight-regular); }
.phone[data-screen="discoverMethods"] .discover-method-copy > .discover-meta { line-height: var(--leading-meta); font-weight: var(--weight-regular); }
.discover-method-arrow { position: absolute; right: 14px; bottom: 16px; width: 20px; height: 20px; color: var(--accent); }
.discover-method-row:hover { background: #fff8f0; }
.discover-article-list, .discover-method-list { display: grid; gap: 12px; }
.discover-article-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 86px; padding: 16px; border-radius: var(--card-radius); background: var(--article-card-bg); }
.discover-article-row > span { min-width: 0; }
.discover-article-copy { flex: 1; }
.discover-article-row h3 { margin: 0 0 6px; font: var(--weight-semibold) var(--text-md)/var(--leading-md) var(--font-body); }
.discover-refresh { gap: 8px; margin-top: 16px; }
.discover-refresh .icon { width: 18px; height: 18px; }


.discover-refresh-status { top: 0; left: 0; }
.discover-article-row > .icon { width: 18px; height: 18px; color: var(--accent-strong); }
.discover-article-row:hover { background: #fff8f0; }
.discover-intro { margin: var(--space-2) 0 var(--space-6); font-size: var(--text-sm); line-height: var(--leading-sm); color: var(--muted); }
.discover-scene-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.discover-scene.is-compact { padding: 16px 12px; }
.discover-scene.is-compact h3 { font-size: var(--text-md); line-height: var(--leading-md); font-weight: var(--weight-semibold); }
.discover-scenes-library > h1 { margin-bottom: 24px; }
.discover-filters { display: flex; gap: 8px; margin: 0 0 20px; }
.discover-filters button { flex: 1; min-width: 0; min-height: 44px; padding: 8px; font-size: var(--text-sm); line-height: var(--leading-sm); border-radius: var(--card-radius); background: #f5efe7; }
.discover-filters button[aria-pressed="true"] { color: var(--accent-strong); background: #fce9dd; box-shadow: inset 0 0 0 1px #eab296; }
.discover-result-count { margin: 0 0 var(--space-5); color: var(--muted); font-size: var(--text-sm); line-height: var(--leading-sm); }
.discover-result-group + .discover-result-group { margin-top: 26px; }
.discover-result-group > h2, .discover-scene-detail > h2 { margin: 0 0 12px; font-size: var(--text-lg); line-height: var(--leading-lg); font-weight: var(--weight-semibold); }
.discover-empty { padding: 32px 0; text-align: center; }
.discover-empty h2 { font-size: var(--text-xl); }
.discover-empty p { margin-top: 12px; color: var(--muted); font-size: var(--text-sm); }
.discover-empty .button { margin-top: 20px; }
/* situation.png: large scene illustration above a rounded reading surface. */
.discover-surface .page-scroll > .discover-page.discover-scene-detail { padding: 0; }
.discover-detail-art { display: grid; place-items: center; aspect-ratio: 4 / 3; padding: 12px 20px 28px; background: #f8eddf; }
.discover-detail-art > img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.scene-detail-content { position: relative; margin-top: -16px; padding: 24px var(--page-gutter) 32px; border-radius: 24px 24px 0 0; background: var(--paper); }
.scene-detail-subtitle { margin-top: 4px; color: var(--accent-strong); font-size: var(--text-md); line-height: var(--leading-md); }
.scene-detail-narrative { margin-top: 16px; font-size: var(--text-md); line-height: 28px; }
.scene-understanding { margin-top: 16px; padding: 16px; border-radius: var(--card-radius); background: #f8eee4; }
.scene-understanding h2 { font-size: var(--text-md); line-height: var(--leading-md); font-weight: var(--weight-medium); }
.scene-understanding p { margin-top: 8px; color: var(--muted); font-size: var(--text-sm); line-height: var(--leading-md); }
.scene-attempts { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.scene-attempts > h2 { font-size: var(--text-lg); line-height: var(--leading-lg); font-weight: var(--weight-semibold); }
.scene-attempt-list { display: grid; gap: 16px; margin-top: 16px; }
.scene-attempt { min-width: 0; padding: 16px; border-radius: var(--card-radius); background: var(--method-card-bg); box-shadow: var(--method-row-shadow); }
.scene-attempt.is-preferred { background: var(--accent-light); box-shadow: none; }
.scene-attempt-direction { margin-bottom: var(--space-3); font-size: var(--text-lg); line-height: var(--leading-lg); font-weight: var(--weight-semibold); }
.scene-attempt-heading { display: flex; align-items: center; gap: 14px; }
.scene-attempt-heading > div:last-child { min-width: 0; }
.scene-attempt-method { font-size: var(--text-md); line-height: var(--leading-md); font-weight: var(--weight-medium); }
.scene-attempt-heading .discover-meta { margin-top: 6px; }
.scene-attempt-art { display: grid; place-items: center; flex: 0 0 72px; height: 72px; border-radius: var(--card-radius); background: #fcf1e5; color: var(--accent); }
.scene-attempt-art .artwork { width: 68px; height: 68px; }
.scene-attempt-art > .icon { width: 28px; height: 28px; }
.scene-attempt-description { margin-top: var(--space-3); color: var(--muted); font-size: var(--text-sm); line-height: var(--leading-sm); }
.scene-attempt-action { display: flex; justify-content: flex-end; margin-top: 8px; }
.scene-attempt-action button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 0 8px 12px; color: var(--accent-strong); border-radius: var(--radius-control); }
.scene-attempt-action button:hover { text-decoration: underline; text-underline-offset: 4px; }
.scene-attempt-action .icon { width: 18px; height: 18px; }
.discover-reading h1 { font-size: var(--text-2xl); line-height: var(--leading-2xl); text-wrap: pretty; }
.discover-reading-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; color: var(--muted); font-size: var(--text-xs); line-height: var(--leading-xs); }
.discover-author { margin-top: 8px; color: var(--muted); font-size: var(--text-xs); line-height: var(--leading-xs); }
.discover-reading-body { margin-top: 28px; font-size: var(--text-md); line-height: 29px; }
.discover-reading-body p { line-height: inherit; }
.discover-reading-body p + p { margin-top: 20px; }
.discover-reading-action { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.discover-reading-action h2 { font-size: var(--text-lg); line-height: var(--leading-lg); font-weight: var(--weight-semibold); }
.discover-reading-action p { margin-top: 10px; color: var(--muted); font-size: var(--text-sm); line-height: var(--leading-md); }
.discover-reading-action .button { margin-top: 20px; }
.discover-reading-sources { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.discover-reading-sources h2 { font-size: var(--text-md); line-height: var(--leading-md); font-weight: var(--weight-semibold); }
.discover-reading-sources a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; margin-top: 8px; color: var(--accent-strong); font-size: var(--text-sm); line-height: var(--leading-sm); }
.discover-reading-sources a .icon { width: 16px; height: 16px; }
.discover-reading-sources a:hover { text-decoration: underline; }
.discover-reading-sources p { color: var(--muted); font-size: var(--text-xs); line-height: var(--leading-xs); overflow-wrap: anywhere; }
.discover-reading-sources .discover-source-note { margin-top: 16px; }
.phone.discover-surface[data-screen="article"] .home-indicator,
.phone.discover-surface[data-screen="scene"] .home-indicator { background: var(--paper); }
@media (max-width: 760px) {
  .phone.discover-surface { height: 100dvh; min-height: 0; max-width: 430px; padding-top: var(--safe-top); }
  .discover-surface .topbar { height: var(--header-mobile-height); }
  .discover-surface .home-indicator { height: var(--safe-bottom); }
  .discover-surface .home-indicator::after { display: none; }
}
@media (max-width: 360px) {
  .discover-surface .page-scroll > .discover-page { padding-left: var(--page-gutter); padding-right: var(--page-gutter); }
  .discover-section-heading h2 { font-size: var(--text-lg); line-height: var(--leading-lg); }
  .discover-section-heading > a { font-size: var(--text-xs); gap: 0; }
  .discover-search { gap: 8px; }
  .discover-search-field { gap: 6px; padding-left: 10px; }

  .discover-scene { flex-basis: 138px; }
  .discover-method-row { gap: 10px; padding: 12px; }
  .discover-method-art { flex-basis: 72px; height: 90px; }
  .discover-method-art .artwork { width: 70px; height: 78px; }
  .discover-method-copy > strong { font-size: var(--text-md); line-height: var(--leading-md); }
  .discover-meta { gap: 4px; }
}
