.base-detail-page { max-width: 1180px; margin: 0 auto; padding-bottom: 36px; color: var(--ink); }
.base-detail-page [hidden], .base-layout-image img[hidden] { display: none !important; }
.base-detail-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 20px; color: var(--muted); font-size: 12px; }
.base-detail-back { color: #955631; font-weight: 650; text-decoration: none; }
.base-detail-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 18px; }
.base-detail-heading > div { min-width: 0; }
.base-detail-heading h1 { margin: 0 0 8px; overflow-wrap: anywhere; font-size: clamp(24px, 3vw, 34px); line-height: 1.2; letter-spacing: -.025em; }
.base-detail-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.base-detail-game { flex-shrink: 0; padding: 12px 17px; border-radius: 10px; color: #fffdf9; background: #995d38; font-size: 13px; font-weight: 700; text-decoration: none; }
.base-preview-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.base-preview-tools button, .base-preview-tools a, .base-detail-actions button, .base-preview-message button { min-height: 42px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--surface); font-size: 12px; font-weight: 600; text-decoration: none; cursor: pointer; }
.base-preview-tools button:disabled { opacity: .4; cursor: default; }
.base-preview-tools output { min-width: 48px; text-align: center; font-size: 12px; font-variant-numeric: tabular-nums; }
.base-preview-tools a { margin-left: auto; color: #995d38; }
.base-preview { position: relative; width: 100%; height: clamp(340px, 68vh, 820px); overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: #e9e3d8; overscroll-behavior: contain; touch-action: pan-x pan-y; }
.base-preview-canvas { width: 100%; height: 100%; min-width: 100%; min-height: 100%; }
.base-preview-canvas img { display: block; width: 100%; height: 100%; object-fit: contain; }
.base-preview-message { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 25px; color: #665846; background: #e9e3d8; text-align: center; font-size: 13px; }
.base-preview-message button { color: #955631; }
.base-preview-hint { margin: 10px 0 22px; color: var(--muted); font-size: 12px; }
.base-detail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.base-detail-actions p { flex-basis: 100%; margin: 3px 0 0; min-height: 18px; color: var(--muted); font-size: 12px; }
.base-layout-info h3 a { text-decoration: none; }
.base-view-link { color: #955631; font-size: 11px; font-weight: 750; text-decoration: none; }
:root[data-theme="dark"] .base-detail-back, :root[data-theme="dark"] .base-preview-tools a, :root[data-theme="dark"] .base-view-link { color: #e3a06a; }
:root[data-theme="dark"] .base-preview, :root[data-theme="dark"] .base-preview-message { color: #e5ded0; background: #282b22; }
@media (max-width: 600px) {
  .base-detail-heading { align-items: stretch; flex-direction: column; gap: 14px; }
  .base-detail-game { text-align: center; }
  .base-preview { height: min(60vh, 620px); min-height: 310px; border-radius: 10px; }
  .base-preview-tools { gap: 6px; }
  .base-preview-tools button, .base-preview-tools a { padding-inline: 10px; }
  .base-preview-tools a { margin-left: 0; }
}
