/* Just Roleplay — public website. Shared layout, type and spacing. */
:root {
  color-scheme: dark;
  --base: #0c1012;
  --panel: #141b1e;
  --surface: #101719;
  --ink: #f3f5f4;
  --muted: #adb8bc;
  --accent: #08d1d8;
  --line: #2b363a;
  --body: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --shell: min(74rem, calc(100% - 4rem));
  --space: clamp(2rem, 5vw, 4rem);
}
* { box-sizing: border-box; }
html { scroll-padding-top: 7rem; }
body { margin: 0; background: var(--base); color: var(--ink); font: 1rem/1.65 var(--body); -webkit-font-smoothing: antialiased; overflow-wrap: anywhere; }
[hidden] { display: none !important; }
h1,h2,h3,p,figure { margin: 0; }
h1,h2,h3 { color: var(--ink); font-weight: 650; letter-spacing: -.025em; line-height: 1.2; text-wrap: pretty; }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 2.5vw, 1.8rem); }
h3 { font-size: 1.15rem; }
p + p { margin-top: 1rem; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .25em; }
a:hover { color: var(--accent); }
button,input,textarea,select { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: default; opacity: .55; }
button,a,input,textarea,select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
img,video { display: block; max-width: 100%; }
svg { flex-shrink: 0; }
.shell { width: var(--shell); margin-inline: auto; }
.skip { position: fixed; z-index: 60; top: 1rem; left: 1rem; background: var(--accent); color: #051415; padding: .65rem 1rem; transform: translateY(-200%); }
.skip:focus { transform: none; }
.eyebrow { color: var(--accent); font-size: .875rem; font-weight: 600; letter-spacing: .025em; }
.lead { color: var(--muted); font-size: 1.0625rem; line-height: 1.75; max-width: 62ch; }
.text-link { display: inline-block; font-size: .9375rem; font-weight: 600; text-decoration-color: #647278; }
.actions,.journey-links { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.action { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .7rem 1.25rem; border: 1px solid #435156; border-radius: 4px; background: transparent; color: var(--ink); font-size: .9375rem; font-weight: 600; line-height: 1.4; text-decoration: none; transition: background-color 130ms ease, border-color 130ms ease; }
.action:hover { background: #202b2f; border-color: #829297; color: var(--ink); }
.action.primary { background: var(--accent); border-color: var(--accent); color: #031719; }
.action.primary:hover { background: #65e7eb; border-color: #65e7eb; }
/* Navigation */
.header { position: sticky; top: 0; z-index: 40; background: #0c1012; border-bottom: 1px solid var(--line); }
.header-layout { display: flex; align-items: center; justify-content: space-between; gap: 2rem; min-height: 90px; }
.brand { display: inline-flex; align-items: center; gap: .85rem; flex-shrink: 0; color: var(--ink); text-decoration: none; white-space: nowrap; font-size: 1.125rem; font-weight: 650; }
.brand img { width: 66px; height: 62px; object-fit: contain; }
.header nav { display: flex; align-items: center; gap: 1.5rem; }
.header nav a { display: inline-flex; align-items: center; position: relative; min-height: 48px; color: #b9c1c4; font-size: .9375rem; font-weight: 500; text-decoration: none; white-space: nowrap; }
.header nav a:hover,.header nav a[aria-current] { color: var(--ink); }
.header nav a[aria-current]::after { content: ""; position: absolute; bottom: 3px; left: 0; right: 0; height: 2px; background: var(--accent); }
.header nav .dashboard-link { margin-left: .25rem; padding: .6rem 1rem; min-height: 44px; border: 1px solid #435156; border-radius: 4px; color: var(--ink); }
.header nav .dashboard-link:hover { border-color: var(--accent); }
.menu { display: none; background: var(--panel); border: 1px solid #435156; border-radius: 4px; min-width: 76px; min-height: 46px; padding: .6rem .85rem; font-size: .9375rem; }
.menu span { margin-left: .4rem; }
/* Homepage: one masthead and one connection area. */
.home-page { padding-block: 2.5rem 1rem; }
.welcome { overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.welcome-art { display: block; background: #091114; border-bottom: 1px solid var(--line); }
.welcome-art img { display: block; width: 100%; height: auto; aspect-ratio: 1865/200; }
.welcome-content { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(18rem, .9fr); gap: clamp(2rem, 5vw, 4.5rem); padding: clamp(1.5rem, 3.5vw, 3rem); }
.welcome-intro { padding-block: .25rem; }
.welcome-intro h1 { margin-top: .85rem; max-width: 13ch; font-size: clamp(2.25rem, 3.7vw, 3.125rem); line-height: 1.12; font-weight: 650; letter-spacing: -.035em; }
.welcome-intro .lead { margin-top: 1.25rem; max-width: 49ch; }
.welcome-intro .text-link { margin-top: 1.3rem; }
.home-tagline { margin-top: 1rem; font-size: 1.125rem; font-weight: 600; }
.connection { min-width: 0; border-left: 1px solid #344147; padding-left: clamp(1.5rem, 3.2vw, 3rem); }
.connection h2 { font-size: 1.25rem; }
.connection-status { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem 1rem; margin: .85rem 0 1.25rem; font-size: .875rem; }
.connection-status strong,.status strong { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; }
[data-state]::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #91a1a8; flex-shrink: 0; }
[data-state="online"]::before { background: #73df9b; }
[data-state="offline"]::before { background: #f29898; }
[data-state="maintenance"]::before { background: #e4ba70; }
[data-players] { color: var(--muted); }
[data-players]:empty { display: none; }
.connection-actions { display: grid; gap: .65rem; }
.connection-actions .action { width: 100%; }
.connection-address { margin-top: 1.25rem; }
.connection-address > span:first-child { display: block; margin-bottom: .35rem; color: var(--muted); font-size: .875rem; }
.connection-address > div { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.connection-address code { font-size: .875rem; line-height: 1.5; overflow-wrap: anywhere; }
.connection-address button { min-height: 44px; padding: .45rem .7rem; background: transparent; border: 1px solid #435156; border-radius: 4px; font-size: .875rem; }
.connection-address button:hover { border-color: var(--accent); }
.copy-feedback { display: block; font-size: .875rem; color: var(--muted); }
.copy-feedback:empty { display: none; }
.connection-help { margin-top: 1rem; color: var(--muted); font-size: .875rem; line-height: 1.65; }
.connection-help a { color: var(--ink); }
.server-guide { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 2.5rem; padding-block: 2.75rem 3rem; }
.server-guide article { min-width: 0; }
.server-guide h2 { font-size: 1.25rem; margin-bottom: .65rem; }
.server-guide p { color: var(--muted); font-size: 1rem; line-height: 1.7; }
.server-guide .text-link { margin-top: 1rem; }
.home-published { border-top: 1px solid var(--line); padding-block: 2.5rem; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.5rem; }
.section-heading .eyebrow { margin-bottom: .45rem; }
.home-notices { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,22rem),1fr)); gap: 3rem; border-top: 1px solid var(--line); padding-block: 2.5rem; }
/* Public page layouts */
.inside { min-height: 55vh; padding-block: var(--space); }
.page-title { max-width: 50rem; margin-bottom: 2.5rem; }
.page-title .eyebrow { margin-bottom: .65rem; }
.page-title .lead { margin-top: 1rem; }
.inside > .action { margin-bottom: 1.5rem; }
.city-entry { display: grid; gap: 1.5rem; grid-template-columns: minmax(0,1fr); padding-block: 1.75rem; border-top: 1px solid var(--line); }
.city-entry:has(.city-photo) { grid-template-columns: minmax(0,.8fr) minmax(0,1fr); align-items: start; }
.city-entry > div { max-width: 46rem; }
.city-entry h2 { margin-bottom: .6rem; font-size: 1.5rem; }
.city-entry p { color: var(--muted); }
.city-entry .action { margin-top: 1.25rem; }
.city-photo img { width: 100%; height: auto; max-height: 34rem; object-fit: cover; border-radius: 4px; }
.city-photo figcaption { color: var(--muted); margin-top: .65rem; font-size: .875rem; }
.detail-page > .action { margin-bottom: 1.75rem; }
.detail-layout { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1fr); gap: 2.5rem; align-items: start; }
.detail-layout .city-photo { grid-column: 1/-1; }
.detail-layout:not(:has(.department-apply)):not(.has-photo) { display: block; }
.detail-layout:not(:has(.department-apply)) .detail-copy { max-width: 48rem; }
.detail-copy { max-width: 54rem; }
.detail-copy h2 { margin-bottom: 1rem; font-size: 1.5rem; }
.detail-copy p,.about-story p,.about-person p { color: var(--muted); }
.detail-copy .action { margin-top: 1.5rem; }
.department-apply,.recruitment-entry { padding: 1.5rem; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; }
.department-apply h2,.recruitment-entry h2 { margin-bottom: .7rem; font-size: 1.4rem; }
.department-apply .action,.recruitment-entry .action { margin-top: 1.25rem; }
.department-apply > p:not(.recruitment),.recruitment-entry > p:not(.recruitment) { color: var(--muted); }
.recruitment-entry + .recruitment-entry { margin-top: 1.5rem; }
.recruitment { display: block; color: var(--accent); margin-block: .75rem; font-size: .9375rem; font-weight: 600; }
/* About */
.about-masthead { width: var(--shell); margin-inline: auto; padding-top: var(--space); }
.about-masthead .shell { width: 100%; }
.about-masthead h1 { margin-block: .65rem 1rem; }
.about-masthead .lead { max-width: 64ch; }
.about-body { padding-block: 2.5rem var(--space); }
.about-highlights { display: flex; flex-wrap: wrap; gap: .75rem; padding-bottom: 2rem; }
.about-highlights a { display: inline-flex; padding: .65rem 1rem; border: 1px solid var(--line); border-radius: 4px; text-decoration: none; background: var(--panel); }
.about-highlights strong { display: block; font-size: .9375rem; font-weight: 600; }
.about-highlights small { display: block; color: var(--muted); font-size: .875rem; }
.about-story { max-width: 48rem; }
.about-story h2,.about-section > h2 { margin-bottom: 1rem; }
.about-story .city-photo { margin-top: 1.5rem; }
.about-section { margin-top: 3rem; }
.about-team,.about-features { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1.5rem 2rem; }
.about-person { border-top: 1px solid var(--line); padding-top: 1.25rem; }
.about-person img,.about-avatar { width: 64px; height: 64px; object-fit: cover; border-radius: 4px; margin-bottom: 1rem; }
.about-avatar { display: grid; place-items: center; background: var(--panel); color: var(--accent); font-size: 1.25rem; }
.about-person .about-role { margin-block: .45rem; color: var(--accent); font-size: .875rem; }
.about-features a { padding-block: 1.25rem; border-top: 1px solid var(--line); text-decoration: none; }
.about-features h3 { margin-bottom: .5rem; }
.about-features p { color: var(--muted); }
/* Rules and getting connected */
.rule-index { padding: 1.5rem; margin-bottom: 2rem; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; }
.rule-index h2 { font-size: 1.125rem; }
.rule-index summary { cursor: pointer; font-weight: 600; min-height: 44px; padding-block: .4rem; }
.rule-index ol { margin-bottom: 0; padding-left: 1.5rem; columns: 2; column-gap: 2.5rem; }
.rule-index li { break-inside: avoid; }
.rule-index a { display: inline-block; padding-block: .25rem; }
.rule-list .story > div { max-width: 76ch; }
.rule-list h3 { font-size: 1.0625rem; margin: 2rem 0 .75rem; line-height: 1.5; scroll-margin-top: 7rem; }
.rule-list ul { color: var(--muted); padding-left: 1.25rem; margin: .75rem 0 1rem; }
.rule-list li + li { margin-top: .35rem; }
.rules-back { display: inline-block; margin-top: 1.5rem; color: var(--muted); font-size: .875rem; }
.story { border-top: 1px solid var(--line); padding-block: 1.5rem; max-width: 54rem; }
.story h2 { margin-bottom: .75rem; font-size: 1.4rem; }
.story p { color: var(--muted); }
.index { display: none; }
.steps { max-width: 54rem; padding-left: 1.5rem; margin: 2rem 0 0; }
.steps > li { padding: .5rem 0 1.75rem 1rem; }
.steps > li::marker { color: var(--muted); font-size: 1rem; }
.steps h2 { margin-bottom: .7rem; font-size: 1.4rem; }
.steps p { color: var(--muted); }
.steps .action { margin-top: 1rem; }
.steps .actions,.steps .journey-links { margin-top: 1rem; }
.steps .actions .action,.steps .journey-links .action { margin-top: 0; }
.join-requirements { margin-top: 1rem; padding: 1.25rem; border-left: 2px solid var(--accent); background: var(--panel); }
.join-requirements h2 { font-size: 1.125rem; }
.status { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; max-width: 54rem; padding: 1rem 1.25rem; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; }
.status .eyebrow { color: var(--muted); }
.status a { margin-left: auto; font-size: .9375rem; }
.status svg { display: none; }
.empty,.note { padding: 1.5rem; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 4px; max-width: 54rem; margin-block: 1rem; }
.maintenance { border-left: 3px solid #e4ba70; border-radius: 4px; padding: 1.5rem; background: #242118; margin-block: 1.5rem; }
.maintenance h2 { margin-block: .5rem .8rem; font-size: 1.35rem; }
.maintenance .eyebrow { color: #f2ce91; }
.community-sections { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 3rem; }
.community-sections h2 { margin-bottom: .75rem; }
.community-sections p { color: var(--muted); }
.community-discord { margin-top: 1.5rem; }
/* News and media */
.post-card { border-bottom: 1px solid var(--line); padding-block: 1.5rem; max-width: 54rem; }
.post-card h2,.post-card h3 { margin-block: .45rem .75rem; }
.post-card h2 { font-size: 1.5rem; }
.post-card a { text-decoration: none; }
.post-card a:hover { text-decoration: underline; }
.post-card time,.post-detail > time { color: var(--muted); font-size: .875rem; }
.post-card p { color: var(--muted); }
.post-detail { max-width: 54rem; }
.post-detail .page-title { margin-top: 2rem; margin-bottom: 1.5rem; }
.post-detail .detail-copy { margin-top: 1.5rem; }
.gallery-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.gallery-filters button { min-height: 44px; padding: .5rem .9rem; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; font-size: .9375rem; }
.gallery-filters button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.gallery-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.5rem; }
.gallery-item { min-width: 0; padding: 0; border: 0; background: transparent; text-align: left; }
.gallery-item img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 4px; }
.gallery-item > span:last-child { display: block; padding-top: .7rem; font-size: .9375rem; color: var(--ink); }
.gallery-item:hover > span:last-child { color: var(--accent); }
.gallery-video > span::after { content: " · Video"; color: var(--muted); }
.lightbox { width: min(92vw,72rem); max-height: 94vh; padding: 1rem; color: var(--ink); background: var(--base); border: 1px solid #56666d; border-radius: 6px; }
.lightbox::backdrop { background: #000d; }
.viewer-bar { display: flex; justify-content: flex-end; gap: .5rem; margin-bottom: 1rem; }
.viewer-bar button { min-width: 44px; min-height: 44px; border: 1px solid #435156; border-radius: 4px; padding: .5rem .8rem; background: var(--panel); }
.lightbox img,.lightbox video { max-height: 72vh; max-width: 100%; object-fit: contain; margin: auto; }
.lightbox figcaption { padding-top: .75rem; color: var(--muted); font-size: .9375rem; }
/* Footer */
.public-footer { border-top: 1px solid var(--line); margin-top: 1rem; background: #0a0e10; }
.footer { display: grid; grid-template-columns: 1.3fr repeat(3,minmax(0,1fr)); gap: 2rem; padding-block: 2.5rem; }
.footer > div img { width: 64px; height: 60px; object-fit: contain; margin-bottom: .75rem; }
.footer strong { display: block; font-size: .9375rem; font-weight: 600; margin-bottom: .65rem; }
.footer p { color: var(--muted); font-size: .875rem; }
.footer nav { display: flex; flex-direction: column; align-items: flex-start; }
.footer a { display: inline-flex; align-items: center; min-height: 40px; font-size: .875rem; text-decoration: none; color: var(--muted); }
.footer a:hover,.footer a[aria-current] { color: var(--ink); text-decoration: underline; }
/* Public content editor retains its usable native controls. */
.cms form { display: grid; gap: .75rem; margin-block: 1.5rem; }
.cms label { display: grid; gap: .35rem; }
.cms input,.cms textarea,.cms select { width: 100%; max-width: 100%; padding: .7rem; border: 1px solid #435156; border-radius: 4px; color: var(--ink); background: var(--panel); }
.cms textarea { min-height: 12rem; }
.cms fieldset { min-width: 0; border: 1px solid var(--line); padding: 1rem; }
.cms figure { max-width: 28rem; }
.cms output { display: block; color: var(--accent); }
@media (max-width: 64rem) {
  :root { --shell: calc(100% - 3rem); }
  .header-layout { min-height: 78px; flex-wrap: wrap; gap: 0; padding-block: .5rem; }
  .brand img { width: 58px; height: 54px; }
  .menu:not([hidden]) { display: inline-flex; align-items: center; justify-content: center; }
  .header nav { width: 100%; flex-wrap: wrap; gap: .25rem 1.5rem; padding-block: .75rem; }
  .header nav a { font-size: 1rem; }
  .header nav .dashboard-link { margin-left: 0; }
  .welcome-content { gap: 2rem; }
  .connection { padding-left: 1.75rem; }
  .welcome-intro .lead { font-size: 1rem; }
  .server-guide { gap: 1.5rem; }
}
@media (max-width: 48rem) {
  .welcome-content { grid-template-columns: 1fr; padding: 1.75rem; gap: 2rem; }
  .welcome-intro h1 { max-width: 20ch; font-size: 2.25rem; }
  .connection { padding: 1.5rem 0 0; border-left: 0; border-top: 1px solid #344147; }
  .connection-actions { grid-template-columns: 1fr 1fr; }
  .connection-address > div { justify-content: flex-start; gap: 1rem; }
  .server-guide { grid-template-columns: 1fr; padding-block: 2rem; gap: 1.75rem; }
  .server-guide article + article { padding-top: 1.5rem; border-top: 1px solid var(--line); }
  .server-guide .text-link { margin-top: .75rem; }
  .city-entry:has(.city-photo),.detail-layout,.community-sections { grid-template-columns: 1fr; gap: 1.5rem; }
  .about-team,.about-features { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .footer { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.5rem; }
}
@media (max-width: 40rem) {
  .rule-index ol { columns: 1; }
  :root { --shell: calc(100% - 2rem); }
  .home-page { padding-top: 1.25rem; }
  .brand { gap: .65rem; font-size: 1rem; }
  .brand img { width: 52px; height: 50px; }
  .header nav { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem 1rem; }
  .header nav a { min-height: 46px; }
  .header nav a[aria-current]::after { right: auto; width: 24px; }
  .welcome-art { padding: .75rem; }
  .welcome-art img { width: 124px; height: 108px; aspect-ratio: auto; object-fit: contain; margin: auto; }
  .welcome-content { padding: 1.5rem; }
  .welcome-intro h1 { font-size: 2rem; max-width: 16ch; }
  .welcome-intro .lead { margin-top: 1rem; }
  .connection-actions { grid-template-columns: 1fr; }
  .connection-address > div { justify-content: space-between; gap: .5rem; }
  .connection-address code { font-size: .875rem; }
  .connection-help { font-size: .875rem; }
  .section-heading { flex-wrap: wrap; align-items: flex-start; }
  .gallery-grid,.about-team,.about-features { grid-template-columns: 1fr; }
  .status { gap: .5rem 1rem; }
  .status a { margin-left: 0; }
  .steps { padding-left: 1.1rem; }
  .steps > li { padding-left: .6rem; }
  .footer-brand { grid-column: 1/-1; display: flex; align-items: center; gap: .85rem; }
  .footer > .footer-brand img { width: 54px; height: 54px; margin: 0; flex-shrink: 0; }
}
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
