/* Shared page rhythm, loaded after the existing brand and mobile styles. */
:root {
  --page-width: 1440px;
  --page-gutter: clamp(20px, 4.5vw, 64px);
  --section-space: clamp(48px, 5vw, 72px);
}

.skip-link {
  position: fixed;
  z-index: 10000;
  top: -200px;
  left: 16px;
  padding: 14px 20px;
  color: #24182f;
  background: #f7bbcf;
  border-radius: 4px;
}
.skip-link:focus { top: 10px; }
.skip-link:not(:focus) { clip-path: inset(50%); }
#turinys:focus { outline: none; }

.header, .hero, .chat-section, .portal-section, .portal-shortcuts,
.statbar, .forum-layout, .section-intro, .categories-section,
.server-section, .last-cta, footer {
  max-width: var(--page-width);
  margin-inline: auto;
}
.header, .chat-section, .portal-section, .statbar, .forum-layout,
.section-intro, .categories-section, footer {
  padding-inline: var(--page-gutter);
}
.portal-section { padding-block: var(--section-space); }
.portal-section-head { align-items: start; gap: 28px; margin-bottom: 28px; }
.portal-section-head > p { padding-top: 34px; max-width: 320px; }
.portal-section-head > div { min-width: 0; }
.portal-section h2 { font-size: clamp(38px, 4.2vw, 60px); }
.portal-section h3 { overflow-wrap: anywhere; }
.portal-news-grid, .portal-guide-grid, .portal-gallery-grid { gap: 20px; }
.portal-story-actions, .portal-guide .portal-story-actions { margin-top: auto; }
.portal-story h3 { font-size: clamp(25px, 2.1vw, 30px); }
.portal-faq-intro h2 { opacity: 1; }
.portal-text-link, .cast-copy > a { min-height: 44px; display: inline-flex; align-items: center; gap: 9px; }
.portal-icon-button, .portal-location-tabs button { min-height: 44px; }

/* One content edge for the forum, Discord and community tools. */
.forum-layout { gap: 24px; padding-block: 0 24px; }
.forum-layout::before { inset-inline: 0; }
.forum-main, .side-panel, .portal-members, .portal-poll { min-width: 0; }
.portal-community-grid { align-items: start; gap: 24px; }
.portal-member-tools { flex-wrap: wrap; }
.portal-member-tools > .portal-search { flex: 1 1 220px; }
.side-panel h3 { font-size: clamp(36px, 3.5vw, 48px); line-height: 1.16; }
.community-discord {
  width: calc(100% - var(--page-gutter) * 2);
  max-width: calc(var(--page-width) - var(--page-gutter) * 2);
  margin-block: 0 var(--section-space);
}
.section-intro { padding-block: 32px; }
.section-intro h2 { font-size: clamp(38px, 4.2vw, 60px); }
.categories-section { padding-block: 24px var(--section-space); }
.server-copy { padding: clamp(28px, 4.5vw, 64px); }
.server-copy h2 { font-size: clamp(42px, 5vw, 72px); }
.server-section { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 0; }
.server-visual { min-width: 0; overflow: hidden; }
.roadmap-item > div { min-width: 0; }
.last-cta { padding-block: var(--section-space); }
.last-cta h2 { font-size: clamp(48px, 6vw, 80px); }

/* The locations can use the full row once the cast has its own section. */
.portal-world-layout { grid-template-columns: 210px minmax(0, 1fr); gap: 24px; align-items: stretch; }
.portal-location-tabs { flex-direction: column; flex-wrap: nowrap; gap: 8px; margin: 0; }
.portal-location-tabs button { justify-content: space-between; text-align: left; padding: 13px 16px; font-size: 12px; }
.portal-location-tabs button .ui-icon { width: 16px; height: 16px; flex-shrink: 0; }
.portal-location-feature { min-height: 340px; }
.portal-location-copy { max-width: 720px; padding: 28px; }
.portal-location-copy > a { display: inline-block; padding-block: 8px; }
.portal-timeline { margin-top: 28px; }

/* Official cast: portraits, source links and a small local search. */
.portal-cast { border-top: 1px solid var(--portal-line); }
.cast-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.cast-toolbar p { margin: 0; }
.cast-toolbar .portal-search { flex: 0 1 320px; }
.cast-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.cast-card { min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--portal-line); border-radius: 6px; overflow: hidden; background: #211b30; }
.cast-portrait { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #30243b; }
.cast-portrait img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center 30%; transition: transform .25s; }
[data-character="jason-duval"] img { object-position: center 22%; }
[data-character="lucia-caminos"] img { object-position: center 20%; }
[data-character="cal-hampton"] img { object-position: 65% center; }
.cast-card:hover .cast-portrait img { transform: scale(1.025); }
.cast-confirmed { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border: 1px solid #b8f0dc55; border-radius: 3px; background: #101e20ed; color: #c2f5e1; font-size: 10px; font-weight: 700; }
.cast-confirmed .ui-icon { width: 13px; height: 13px; }
.cast-copy { display: flex; flex-direction: column; flex: 1; padding: 22px; }
.cast-role { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: #f7bbcf; line-height: 1.6; }
.cast-copy h3 { margin: 8px 0 12px; font-size: 30px; line-height: 1.15; }
.cast-copy p { color: var(--portal-muted); font-size: 13px; line-height: 1.7; margin: 0 0 18px; }
.cast-copy > a { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--portal-line); font-size: 11px; }
.cast-grid > .portal-empty { grid-column: 1 / -1; }
.cast-credit { margin: 22px 0 0; color: #bfb1ca; font-size: 11px; }
.cast-credit a { text-decoration: underline; text-underline-offset: 3px; }

@media (min-width: 901px) {
  .header { gap: 20px; }
  .desktop-nav { gap: clamp(13px, 1.6vw, 24px); flex-wrap: wrap; justify-content: center; }
  .desktop-nav a { padding-block: 14px; font-size: 10px; white-space: nowrap; }
  .hero-copy { padding-inline: var(--page-gutter); }
  .hero h1 { font-size: clamp(64px, 7.7vw, 110px); }
  .portal-shortcuts { padding-inline: var(--page-gutter); }
  .portal-shortcuts a { padding-inline: 20px; }
}
@media (min-width: 901px) and (max-width: 1150px) {
  .cast-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-section-head > p { max-width: 260px; }
  .header .brand-image { width: 150px; }
  .header .user-btn { font-size: 10px; padding-inline: 12px; }
  .portal-community-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 900px) {
  :root { --page-gutter: 24px; --section-space: 44px; }
  .portal-section h2 { font-size: clamp(32px, 5vw, 42px); }
  .portal-section-head > p { padding-top: 0; max-width: 600px; }
  .portal-news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .portal-story { grid-template-columns: 72px minmax(0, 1fr); gap: 10px; }
  .portal-story-cover { width: 72px; height: 80px; }
  .portal-story h3 { font-size: 23px; }
  .portal-world-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .portal-location-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .portal-location-tabs button { justify-content: center; text-align: center; padding: 10px 8px; }
  .portal-location-tabs button .ui-icon { display: none; }
  .cast-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .cast-toolbar { align-items: stretch; }
  .cast-toolbar .portal-search { flex-basis: 280px; }
  .cast-copy { padding: 20px; }
  .server-section { grid-template-columns: minmax(0, 1fr); margin-inline: var(--page-gutter); }
  .server-copy { padding: 28px; }
  .portal-community-grid { grid-template-columns: minmax(0, 1fr); }
  .portal-faq { display: block; }
  .portal-faq-intro { margin-bottom: 24px; }
}
@media (max-width: 600px) {
  :root { --page-gutter: 16px; --section-space: 38px; }
  .portal-section h2 { font-size: clamp(30px, 8vw, 38px); }
  .portal-news-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .portal-story { grid-template-columns: 80px minmax(0, 1fr); gap: 12px; }
  .portal-story-cover { width: 80px; }
  .portal-story h3 { font-size: 22px; }
  .portal-location-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-location-feature { min-height: 300px; }
  .portal-location-copy { padding: 20px; }
  .cast-toolbar { flex-direction: column; gap: 12px; margin-bottom: 20px; }
  .cast-toolbar .portal-search { flex-basis: auto; width: 100%; }
  .cast-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .cast-portrait { aspect-ratio: 4 / 3; }
  .cast-copy h3 { font-size: 32px; }
  .cast-copy p { font-size: 14px; }
  .cast-credit { font-size: 11px; }
  .portal-video-playlist { grid-template-columns: minmax(0, 1fr); max-height: 300px; }
  .portal-video-item { min-height: 72px; }
  .portal-video-screen, .portal-video-screen:has(iframe) { min-height: 0; aspect-ratio: 16 / 9; }
  .portal-member-tools > .portal-search { flex-basis: 100%; }
  .server-copy { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .cast-portrait img { transition: none; }
  .cast-card:hover .cast-portrait img { transform: none; }
}
