/* Extend the original red/navy identity and article layout. */
:root { --gray-light: #686868; --primary: #c62828; }
::selection { background: #f7d7d6; color: #431b1b; }
:focus-visible { outline: 3px solid #c62828; outline-offset: 4px; }
html { scroll-padding-top: 76px; }
a { text-underline-offset: 4px; }
.header-top .container { justify-content: space-between; color: #dedee5; }
.header-top a { color: #fff; }
.header-nav a { white-space: nowrap; }
.mobile-toggle svg { width: 24px; height: 24px; }
.parser-panel .btn-parse { background: var(--primary); }
.parser-panel .btn-parse:disabled { opacity: .65; cursor: wait; }
.parser-panel input::placeholder { color: #686868; }
.parser-preview { min-height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 20px; color: #c8cbd6; text-align: center; }
.parser-preview svg { width: 64px; height: 64px; margin-bottom: 10px; }
.parser-preview p { line-height: 1.8; }
.libretv-entry-block { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 26px 0; border-top: 1px solid #d4d4d4; }
.libretv-entry-block h2 { font-size: 22px; font-weight: 700; color: var(--dark); margin-bottom: 8px; }
.libretv-entry-block p { color: #555; font-size: 15px; line-height: 1.8; }
.entry-button { display: inline-flex; align-items: center; justify-content: center; padding: 12px 22px; min-height: 48px; background: var(--primary); color: #fff; border-radius: 6px; font-weight: 700; }
.entry-button:hover { background: #a51f1f; color: #fff; }
.libretv-entry-block .entry-button { flex-shrink: 0; }
.gateway-dialog { position: fixed; inset: 0; margin: auto; width: min(520px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 36px 30px 28px; border: 0; border-radius: 12px; background: #fff; color: #333; box-shadow: 0 20px 60px rgba(0,0,0,.3); overflow-y: auto; }
.gateway-dialog::backdrop { background: rgba(0,0,0,.7); }
.gateway-dialog[open] { animation: dialog-arrive .2s cubic-bezier(.16,1,.3,1); }
.gateway-dialog h2 { font-size: 24px; font-weight: 700; line-height: 1.5; margin: 4px 30px 16px 0; color: var(--primary); }
.gateway-dialog p { font-size: 16px; line-height: 1.9; margin: 12px 0; }
.gateway-dialog .dialog-detail { color: #616161; font-size: 14px; }
.dialog-close { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: transparent; border-radius: 6px; color: #555; cursor: pointer; }
.dialog-close:hover { background: #f4eeee; }
.dialog-close svg { width: 22px; height: 22px; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 26px 0 18px; }
.dialog-secondary { min-height: 48px; padding: 12px; background: #f3eeee; color: #822020; border: 0; border-radius: 6px; cursor: pointer; font: inherit; font-weight: 700; }
.dialog-secondary:hover { background: #eadfdf; }
.dialog-help { font-size: 14px; color: #943030; text-decoration: underline; }
@keyframes dialog-arrive { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
.content-section { padding: 38px 0; }
.content-section .container { max-width: 920px; }
.content-section h2 { font-size: 24px; color: var(--dark); font-weight: 700; margin-bottom: 12px; }
.plain-list { margin-top: 18px; }
.plain-list li { padding: 18px 0; border-bottom: 1px solid #dcdcdc; }
.plain-list h2, .plain-list h3 { font-size: 18px; margin-bottom: 6px; font-weight: 700; line-height: 1.6; }
.plain-list a:hover { color: var(--primary); text-decoration: underline; }
.plain-list p { color: #555; font-size: 15px; }
.plain-list time { display: block; color: #686868; font-size: 13px; margin-top: 8px; }
.section-link { display: inline-block; margin-top: 24px; color: #a51f1f; font-weight: 700; }
.reading-shell { max-width: 1000px; margin: 0 auto; padding-bottom: 40px; }
.reading-shell .article-detail { max-width: 820px; }
.article-detail h1 { overflow-wrap: anywhere; }
.article-detail h2 { border-left: 0; padding-left: 0; }
.article-detail p { text-indent: 0; }
.main-content { padding-bottom: 40px; }
.sidebar-widget p { color: #555; font-size: 14px; line-height: 1.9; margin-bottom: 14px; }
.site-footer { color: #e3e3ec; }
.site-footer p { color: inherit; }
.site-footer a { color: #fff; }
.site-footer .footer-col p { color: #c8c8d4; }
.footer-banner { display: block; width: 100%; max-width: 600px; height: auto; max-height: 60px; object-fit: cover; opacity: .6; margin: 16px auto 0; }
.simple-page { padding-top: 24px; }
@media (max-width: 599px) {
  .libretv-entry-block { align-items: stretch; flex-direction: column; gap: 18px; }
  .gateway-dialog { padding: 30px 22px 24px; }
  .gateway-dialog h2 { font-size: 22px; }
  .dialog-actions { grid-template-columns: 1fr; }
  .content-section { padding: 28px 0; }
}
@media (min-width: 600px) { .parser-preview { min-height: 280px; } }
@media (min-width: 900px) { .parser-preview { min-height: 360px; } }
@media (min-width: 1200px) { .parser-preview { min-height: 400px; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
