/* Full-width browsing: equal breathing room beside the sidebar and right edge. */
:root { --page-gutter: clamp(24px, 2.7vw, 56px); }
.workspace > main, .workspace > .topbar, .workspace > .footer { padding-left: var(--page-gutter); padding-right: var(--page-gutter); }
.workspace > main { width: 100%; max-width: none; padding-top: 32px; }
.anime-grid { width: 100%; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 30px 24px; }
.anime-card h3 { font-size: 18px; line-height: 1.5; font-weight: 700; margin: 14px 0 6px; min-height: 54px; -webkit-line-clamp: 3; overflow-wrap: anywhere; }
.card-subtitle { font-size: 14px; line-height: 1.6; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 9px; color: #aaa1b7; }
.card-meta { font-size: 13px; line-height: 1.6; color: #a49ab3; flex-wrap: wrap; }
.poster .language-tag { font-size: 12px; padding: 5px 8px; }
.episode-tag { font-size: 13px; }
.favorite-button { width: 34px; height: 34px; }
.favorite-button svg { width: 17px; height: 17px; }
.page-intro h1 { font-size: clamp(28px, 2vw, 36px); }
.page-intro p, .search-box input { font-size: 15px; }
.eyebrow { font-size: 11px; }
.date-label, .source-note, .source-connection { font-size: 12px; }
.section-heading { flex-wrap: wrap; }
.section-heading h2 { font-size: 25px; }
.section-heading .sub-count, .text-link { font-size: 14px; }
.primary-nav a { font-size: 14px; }
.nav-caption { font-size: 12px; }
.button, .chip, .catalog-toolbar select { font-size: 14px; }
.chip { padding: 10px 16px; }
.footer { font-size: 12px; }
.meta-row, .meta-pill { font-size: 13px; }
.synopsis, .notice { font-size: 14px; }
.feed-summary { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.feed-sentinel { min-height: 120px; padding: 30px 12px; display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; text-align: center; font-size: 14px; line-height: 1.7; color: var(--muted); }
.feed-sentinel [hidden] { display: none; }
.feed-sentinel[data-state="error"] { color: #d9bf8e; }
.feed-sentinel[data-state="done"] { color: #8f829f; }
#feed-provenance .source-note { margin-top: 0; }
.hero-carousel { position: relative; margin: 0 0 28px; border: 1px solid #373043; border-radius: 20px; overflow: hidden; background: #1b1627; }
.hero-track { display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.hero-track::-webkit-scrollbar { display: none; }
.hero-track.dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.hero-slide { position: relative; isolation: isolate; flex: 0 0 100%; min-width: 0; min-height: 420px; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; }
.hero-slide .hero-art { position: absolute; inset: 0 0 0 auto; width: 64%; height: 100%; opacity: .85; z-index: -3; pointer-events: none; }
.hero-slide .hero-art img { object-position: center 25%; }
.hero-slide::before { content: ''; position: absolute; inset: 0; z-index: -2; background: linear-gradient(90deg, #1a1525 0%, #1a1525f5 29%, #1a1525bd 49%, #1a152520 80%), linear-gradient(0deg, #17111deb, transparent 66%); pointer-events: none; }
.hero-slide::after { content: ''; position: absolute; width: 440px; height: 440px; left: -215px; top: -290px; border: 1px solid #ae8df323; border-radius: 50%; z-index: -1; pointer-events: none; }
.hero-slide .hero-content { padding: 40px 44px 94px; max-width: 70%; }
.hero-slide h2 { font: 760 clamp(30px, 2.5vw, 48px)/1.18 system-ui, 'Leelawadee UI', sans-serif; letter-spacing: -.8px; margin: 0 0 16px; max-width: 670px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.hero-slide .thai-title { font-size: 17px; color: #c7bbd4; line-height: 1.7; margin-bottom: 18px; max-width: 620px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-slide .feature-label { font-size: 12px; margin-bottom: 20px; }
.hero-slide .meta-row { font-size: 14px; margin-bottom: 23px; }
.hero-slide .button { min-height: 46px; font-size: 14px; }
.hero-controls { position: absolute; bottom: 20px; left: 32px; right: 32px; display: flex; align-items: center; gap: 10px; z-index: 3; }
.hero-control { width: 42px; height: 42px; display: inline-grid; place-items: center; flex-shrink: 0; border: 1px solid #b5a1dd44; background: #1b152cbd; color: #e2d3f6; border-radius: 50%; font-size: 18px; }
.hero-control:hover { background: #594171; }
.hero-dots { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.hero-dot { display: grid; place-items: center; width: 32px; height: 36px; padding: 0; background: none; border-radius: 6px; }
.hero-dot::after { content: ''; width: 8px; height: 5px; border-radius: 9px; background: #e5cfff55; transition: width .2s, background .2s; }
.hero-dot.active::after { width: 24px; background: var(--accent); }
.hero-counter { font: 500 12px system-ui, sans-serif; color: #d3c4e4; letter-spacing: 2px; white-space: nowrap; }
@media (min-width: 1600px) { .anime-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 34px 26px; } .hero-slide { min-height: 470px; } .hero-slide .hero-content { padding: 46px 52px 100px; } }
@media (max-width: 1000px) { .hero-slide .hero-content { max-width: 86%; padding: 32px 30px 94px; } .hero-slide .hero-art { width: 85%; } .anime-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 28px 20px; } }
@media (max-width: 760px) {
  :root { --page-gutter: 20px; }
  .workspace > main { padding-top: 24px; }
  .anime-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 26px 16px; }
  .anime-card h3 { font-size: 16px; min-height: 48px; }
  .card-subtitle, .card-meta { font-size: 13px; }
  .section-heading h2 { font-size: 22px; }
  .section-heading .text-link { font-size: 13px; }
  .page-intro p, .search-box input { font-size: 14px; }
  .hero-carousel { border-radius: 15px; }
  .hero-slide { min-height: 430px; }
  .hero-slide .hero-art { width: 100%; opacity: .55; }
  .hero-slide .hero-content { max-width: 100%; padding: 30px 24px 88px; }
  .hero-slide h2 { font-size: 32px; }
  .hero-slide .thai-title { font-size: 16px; }
  .hero-controls { bottom: 16px; left: 18px; right: 18px; gap: 7px; }
  .hero-control { width: 36px; height: 36px; }
  .hero-dot { width: 25px; }
  .hero-dot.active::after { width: 19px; }
  .hero-counter { display: none; }
  .button, .chip { font-size: 13px; }
  .source-connection { font-size: 11px; }
  .search-box { min-width: 80px; }
}
@media (max-width: 440px) {
  :root { --page-gutter: 16px; }
  .anime-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 14px; }
  .hero-slide .hero-content { padding: 28px 22px 86px; }
  .hero-slide h2 { font-size: 29px; }
  .hero-slide .actions { gap: 8px; }
  .hero-slide .button { padding: 10px 12px; font-size: 13px; }
  .hero-controls { left: 16px; right: 16px; gap: 5px; }
  .hero-control { width: 34px; height: 34px; }
  .hero-dot { width: 23px; }
  .poster .language-tag { font-size: 11px; padding: 4px 6px; }
}
@media (prefers-reduced-motion: reduce) { .hero-track { scroll-behavior: auto; } .hero-dot::after { transition: none; } }

.primary-nav a[hidden]{display:none}

/* Recovery controls remain usable outside third-party frames. */
#provider-status{display:flex;flex-wrap:wrap;align-items:center;gap:10px}#provider-status .button{font-size:11px;padding:8px 12px}.recovery-actions{justify-content:center}.episode-item.special-episode{grid-column:1/-1;text-align:center;padding:12px;min-width:0}.episode-item.special-episode strong{font-size:13px;overflow-wrap:anywhere}.player-heading h2{overflow-wrap:anywhere;min-width:0}
