/* Approved platform typography: Body 16 CSS px; ratios 11/13, 1, 15/13, 18/13, 22/13. */
:root {
  --font-caption: 13.538462px;
  --font-body: 16px;
  --font-subtitle: 18.461538px;
  --font-title: 22.153846px;
  --font-display: 27.076923px;
}
body { font-size: var(--font-body); --sea-type-font: var(--font-body); --sea-type-min: 12px; }
/* Seaofprime portal v4 — dock-wood portal in the classic browser-MMO layout.
   Single dark theme by design. Geometry of the landing page is driven by the
   --top-h / --banner-* tokens so the banner, plate, video and columns align. */
:root {
  color-scheme: dark;
  --ink: #0c0907;
  --wood-0: #140d08;
  --wood-1: #22160d;
  --wood-3: #5b3c1e;
  --brass: #c9973f;
  --brass-hi: #f3d27a;
  --brass-lo: #6e4e20;
  --ember: #e0591e;
  --ember-hi: #ff9a3c;
  --parch: #efe2c4;
  --text: #d8c9ab;
  --muted: #a8957a;
  --red: #ff6a55;
  --green: #86d47a;
  --line: rgba(201, 151, 63, 0.32);
  --line-soft: rgba(239, 226, 196, 0.08);

  --f-display: "Cinzel", "Trajan Pro", Georgia, serif;
  --f-body: "Alegreya Sans", "Trebuchet MS", Arial, sans-serif;
  --f-serif: "Alegreya", Georgia, "Times New Roman", serif;

  --stage: 1000px;
  --top-h: 140px;
  --banner-x: 22px;
  --banner-w: 340px;
  --col-gap: 28px;
  --gutter: 12px;
  --pane-h: 540px;
  --hero-img: url("assets/hero.jpg");
  --header-img: url("assets/header.jpg");
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
/* Always reserve the scrollbar's space so nothing shifts sideways when the
   page grows or shrinks. */
html { background: var(--ink); overflow-y: auto; scrollbar-gutter: stable; }
body {
  margin: 0;
  display: flow-root;
  min-height: 100vh;
  position: relative;
  padding-inline: var(--gutter);
  color: var(--text);
  --sea-type-font: var(--font-body, 16px);
  --sea-type-min: 12px;
  --sea-type-scale: 1;
  font: 400 var(--font-body, 16px)/1.45 var(--f-body);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 170, 80, 0.06), transparent 60%),
    linear-gradient(90deg, rgba(0,0,0,0.75), rgba(0,0,0,0.15) 18%, rgba(0,0,0,0.15) 82%, rgba(0,0,0,0.75)),
    url("assets/wood.jpg") center top / 520px auto repeat,
    var(--wood-0);
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: var(--brass-hi); }
h1, h2, h3 { margin: 0; font-family: var(--f-display); color: var(--parch); text-wrap: balance; }
p { margin: 0; }
sup { --sea-type-font: 0.6em; --sea-type-min: 12px; --sea-type-scale: 1; font-size: 0.6em; line-height: 0; position: relative; top: -0.5em; vertical-align: baseline; }
kbd { padding: 1px 5px; border: 1px solid var(--brass-lo); border-radius: 3px; background: #0b0806; color: var(--brass-hi); --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font: 600 var(--font-caption, 13.538462px)/1.4 ui-monospace, Menlo, Consolas, monospace; white-space: nowrap; }
:focus-visible { outline: 2px solid var(--brass-hi); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Shared controls ─────────────────────────────── */
.inp {
  width: 100%;
  height: 28px;
  padding: 0 8px;
  border: 1px solid #000;
  border-radius: 2px;
  background: linear-gradient(180deg, #d9d2c4, #f4efe4);
  color: #1b130b;
  --sea-type-font: var(--font-caption, 13.538462px);
  --sea-type-min: 10.153846px;
  --sea-type-scale: 1;
  font: 500 var(--font-caption, 13.538462px) var(--f-body);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.45), 0 1px 0 rgba(255,255,255,0.08);
}
.inp:focus { outline: none; box-shadow: 0 0 0 2px var(--brass), inset 0 1px 2px rgba(0,0,0,0.4); }
.inp::placeholder { color: #5c4d3a; }
.inp[aria-invalid="true"] { box-shadow: 0 0 0 2px var(--red), inset 0 1px 2px rgba(0,0,0,0.4); }

.check { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font-size: var(--font-caption, 13.538462px); cursor: pointer; }
.check input {
  appearance: none;
  flex-shrink: 0;
  width: 15px; height: 15px;
  margin: 0;
  display: grid; place-items: center;
  border: 1px solid #000; border-radius: 2px;
  background: linear-gradient(#2a2119, #15100b);
  box-shadow: inset 0 0 0 1px var(--brass-lo);
  cursor: pointer;
}
.check input:checked { background: linear-gradient(#f3d27a, #b98a2e); }
.check input:checked::after { content: ""; width: 4px; height: 8px; border: solid #1d1309; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.check-block { display: grid; grid-template-columns: 15px 1fr; align-items: start; gap: 8px; line-height: 1.35; }
.check-block input { margin-top: 1px; }
.check a { color: var(--parch); font-weight: 700; }
.check .plain-term { color: var(--parch); font-weight: 700; }

.tiny-link { --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font-size: var(--font-caption, 13.538462px); color: var(--muted); }
.tiny-link:hover { color: var(--parch); }
.linklike { padding: 0; border: 0; background: none; font-family: inherit; text-decoration: underline; cursor: pointer; }

.btn-metal {
  min-width: 118px;
  height: 28px;
  padding: 0 16px;
  border: 1px solid #000;
  border-radius: 3px;
  background: linear-gradient(180deg, #4c4a47, #1c1b1a 55%, #0d0d0c);
  color: #f2ede4;
  --sea-type-font: var(--font-body, 16px);
  --sea-type-min: 12px;
  --sea-type-scale: 1;
  font: 700 var(--font-body, 16px)/1 var(--f-display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 2px 4px rgba(0,0,0,0.6);
}
.btn-metal:hover { background: linear-gradient(180deg, #5d5a55, #262422 55%, #121110); color: var(--brass-hi); }
.btn-metal:disabled, .btn-gold:disabled { opacity: 0.6; cursor: progress; }

.btn-gold {
  display: grid;
  justify-items: center;
  width: 100%;
  max-width: 250px;
  margin: 4px auto 0;
  padding: 10px 16px 12px;
  border: 2px solid #3a2608;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff1b8, #e8bd4e 22%, #a8761d 60%, #d9a53c);
  box-shadow: 0 0 0 3px #16100a, 0 0 0 4px #8a6427, 0 8px 18px rgba(0,0,0,0.6), inset 0 2px 0 rgba(255,255,255,0.6);
  color: #20150a;
  font-family: var(--f-display);
  text-transform: uppercase;
  cursor: pointer;
  line-height: 1;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.btn-gold small { --sea-type-font: var(--font-subtitle, 18.461538px); --sea-type-min: 12px; --sea-type-scale: 1; font-size: var(--font-subtitle, 18.461538px); font-weight: 700; letter-spacing: 0.06em; }
.btn-gold strong { --sea-type-font: var(--font-display, 27.076923px); --sea-type-min: 12px; --sea-type-scale: 1; font-size: var(--font-display, 27.076923px); font-weight: 900; letter-spacing: 0.08em; margin-top: 4px; }
.btn-gold:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }

.btn-small-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 22px;
  border: 1px solid #3a2608;
  border-radius: 5px;
  background: linear-gradient(180deg, #f3d27a, #b98a2e 60%, #d5a444);
  color: #1d1309;
  --sea-type-font: var(--font-subtitle, 18.461538px);
  --sea-type-min: 12px;
  --sea-type-scale: 1;
  font: 700 var(--font-subtitle, 18.461538px) var(--f-body);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55), 0 2px 6px rgba(0,0,0,0.6);
}
.btn-small-gold:hover { filter: brightness(1.08); }

.panel {
  position: relative;
  padding: 16px 20px;
  border: 1px solid #000;
  background: linear-gradient(180deg, rgba(10, 7, 5, 0.92), rgba(18, 12, 8, 0.94));
  box-shadow: inset 0 0 0 1px var(--brass-lo), inset 0 0 0 3px #0b0806, inset 0 0 0 4px rgba(201, 151, 63, 0.2), 0 6px 18px rgba(0,0,0,0.55);
}
.plate-title {
  --sea-type-font: var(--font-subtitle, 18.461538px);
  --sea-type-min: 12px;
  --sea-type-scale: 1;
  font-size: var(--font-subtitle, 18.461538px);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--parch);
  text-shadow: 0 2px 2px #000;
  margin: 18px 0 8px;
}

.live-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); vertical-align: 1px; }

/* ── Pre-login ─────────────────────────────── */
.outside, .inside { position: relative; z-index: 1; }
/* The landing art bleeds to the viewport edges; clip it here, not on the
   viewport, so no browser can scroll sideways. */
.outside { margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); overflow-x: clip; }
.stage { width: 100%; max-width: var(--stage); margin-inline: auto; }

.topstrip {
  position: relative;
  isolation: isolate;
  height: var(--top-h);
  display: flex;
  justify-content: flex-end;
  padding: 10px 16px 10px calc(var(--banner-x) + var(--banner-w) + 20px);
}
/* full-bleed wood header band */
.topstrip::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0; bottom: 0; left: 50%;
  width: calc(100% + 2 * max(0px, (100vw - var(--stage)) / 2) + 2 * var(--gutter));
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(0,0,0,0.25), rgba(0,0,0,0.6)), url("assets/wood.jpg") center top / 520px auto;
  border-bottom: 3px solid #0b0705;
  box-shadow: 0 1px 0 var(--brass-lo), 0 6px 14px rgba(0,0,0,0.6);
}
.topstrip-right { display: grid; gap: 7px; justify-items: end; align-content: start; width: min(100%, 460px); }
.toplinks { display: flex; align-items: center; gap: 12px; }
.forum-tab, .lang {
  display: inline-flex; align-items: center; gap: 8px;
  height: 22px; padding: 0 14px;
  border: 1px solid #000; border-radius: 3px;
  background: linear-gradient(180deg, #3b3835, #141312);
  color: var(--parch);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}
.forum-tab { --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font: 700 var(--font-caption, 13.538462px) var(--f-display); letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; }
.forum-tab:hover { color: var(--brass-hi); }
.lang { --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font-size: var(--font-caption, 13.538462px); font-weight: 700; }

/* Language picker (landing top bar + portal footer) */
.lang-pick { position: relative; }
.lang-btn { cursor: pointer; font-family: var(--f-body); }
.lang-btn:hover { color: var(--brass-hi); }
.lang-flag { width: 21px; height: 15px; box-shadow: 0 0 0 1px rgba(0,0,0,0.6); }
.caret { width: 10px; height: 6px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0.8; }
.lang-btn[aria-expanded="true"] .caret { transform: rotate(180deg); }
.lang-menu {
  position: fixed;
  z-index: 100;
  width: 430px;
  max-height: min(480px, calc(100vh - 80px));
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid #000;
  border-radius: 6px;
  background: #150e08;
  box-shadow: inset 0 0 0 1px var(--brass-lo), 0 14px 30px rgba(0, 0, 0, 0.8);
  scrollbar-width: thin;
  scrollbar-color: #8a6427 #0e0a07;
}
.lang-menu button {
  display: flex; align-items: center; gap: 9px;
  width: 100%;
  padding: 6px 8px;
  border: 0; border-radius: 4px;
  background: none;
  color: var(--text);
  --sea-type-font: var(--font-body, 16px);
  --sea-type-min: 12px;
  --sea-type-scale: 1;
  font: 500 var(--font-body, 16px) var(--f-body);
  text-align: left;
  cursor: pointer;
}
.lang-menu button:hover, .lang-menu button:focus-visible { background: rgba(201, 151, 63, 0.16); color: var(--parch); outline: none; }
.lang-menu button[aria-checked="true"] { background: rgba(201, 151, 63, 0.28); color: var(--brass-hi); font-weight: 700; }
.lang-menu img { width: 21px; height: 15px; flex-shrink: 0; box-shadow: 0 0 0 1px rgba(0,0,0,0.6); }
/* Keep initial source copy hidden until the selected language resolves. */
html.i18n-loading #outside, html.i18n-loading #inside,
html.i18n-loading .ck-bar, html.i18n-loading .ci { visibility: hidden; }
.lang-status { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 1200; width: max-content; max-width: calc(100vw - 32px); margin: 0; padding: 12px 18px; color: #f4e6c6; background: #2b1205; border: 1px solid #d4af37; border-radius: 4px; }
.lang-status[hidden] { display: none; }
.login { display: grid; gap: 6px; width: 100%; }
.login-row { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.login-row .inp { width: 160px; }
.login-row-end { min-height: 18px; }
.login-msg { --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font-size: var(--font-caption, 13.538462px); color: var(--red); text-align: right; }
.forgot-note { justify-self: end; max-width: 330px; --sea-type-font: var(--font-body, 16px); --sea-type-min: 12px; --sea-type-scale: 1; font-size: var(--font-body, 16px); color: var(--text); text-align: right; }
.topstrip-right { position: relative; z-index: 30; }
/* The top strip has a fixed height and is drawn BEHIND the next section; a card that overflows the strip is not visible.
   So it overlaps the login fields inside the strip (the language selector stays on top). */
.forgot-note {
  display: grid; gap: 8px;
  position: absolute; top: 30px; right: 0; z-index: 40;
  width: min(360px, 100%); padding: 10px 14px 12px; justify-self: auto;
  background: rgba(20, 13, 8, .98); border: 1px solid var(--brass-lo); border-radius: 6px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .6);
}
.forgot-close {
  position: absolute; top: 2px; right: 6px; padding: 0 6px;
  background: none; border: 0; color: var(--muted); --sea-type-font: initial; font: 700 18px/1.4 inherit; cursor: pointer;
}
.forgot-close:hover { color: var(--parch); }
.forgot-intro { margin: 0; padding-right: 16px; }
.forgot-note .login-row { justify-content: space-between; }
.forgot-note .login-row { flex-wrap: nowrap; gap: 8px; }
.forgot-note .login-row .inp { width: auto; flex: 1 1 0; min-width: 0; }
.forgot-note .login-row .btn-metal { flex: none; padding-left: 12px; padding-right: 12px; }
.forgot-note .login-msg { color: var(--green); text-align: left; padding-right: 16px; margin: 0; }
.forgot-note.has-msg .forgot-intro { display: none; }
.forgot-note.is-done .login-row { display: none; }
.forgot-note:not(.is-done) .login-msg { color: var(--red); }

.hero {
  position: relative;
  isolation: isolate;
  display: flow-root;
  min-height: 540px;
}
/* hero art bleeds past the stage and melts into the wood on all sides */
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 -140px;
  background: var(--hero-img) 62% 30% / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 140px, #000 calc(100% - 140px), transparent), linear-gradient(180deg, #000 72%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent, #000 140px, #000 calc(100% - 140px), transparent), linear-gradient(180deg, #000 72%, transparent);
  mask-composite: intersect;
}
/* In flow (pulled up under the top strip) so the hero grows with the banner
   when the captcha widget appears, instead of the banner overlapping the content below. */
.banner {
  position: relative;
  left: var(--banner-x);
  margin: calc(-1 * var(--top-h)) 0 30px;
  width: var(--banner-w);
  z-index: 3;
  padding: 0 10px 18px;
  /* hanging dark sail cloth with rope edges */
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.018) 0 2px, transparent 2px 5px),
    linear-gradient(180deg, #17120e, #0c0907 70%, #0a0806);
  border-inline: 6px double #5a4122;
  box-shadow: 0 0 0 1px #000, 10px 0 30px rgba(0,0,0,0.7), -10px 0 30px rgba(0,0,0,0.7);
}
/* V-shaped trimmed tail */
.banner::after {
  content: "";
  position: absolute;
  left: -7px; right: -7px; top: 100%;
  height: 28px;
  filter: drop-shadow(0 10px 8px rgba(0,0,0,0.6));
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 354 28' preserveAspectRatio='none'%3E%3Cpath d='M0 0H354V3L177 27L0 3Z' fill='%230b0806'/%3E%3Cpath d='M1 1.5L177 25.5L353 1.5' fill='none' stroke='%235a4122' stroke-width='2'/%3E%3Cpath d='M7 1L177 20L347 1' fill='none' stroke='%235a4122' stroke-width='1.5' opacity='.7'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
}
.banner-inner { display: grid; justify-items: center; gap: 8px; }
.banner-h1 { margin: 0; }
.banner-logo { width: 230px; height: auto; margin-top: 4px; filter: drop-shadow(0 6px 10px #000); }
.ribbon {
  display: grid; justify-items: center;
  margin-top: -18px;
  padding: 6px 28px 7px;
  background: linear-gradient(180deg, #e3cb96, #a58548);
  color: #2a1b0a;
  --sea-type-font: var(--font-caption, 13.538462px);
  --sea-type-min: 10.153846px;
  --sea-type-scale: 1;
  font: 700 var(--font-caption, 13.538462px)/1.15 var(--f-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  clip-path: polygon(0 0, 100% 0, 94% 50%, 100% 100%, 0 100%, 6% 50%);
  filter: drop-shadow(0 3px 5px rgba(0,0,0,0.6));
}
.reg { display: grid; gap: 7px; width: 100%; padding: 14px 10px 0; }
.reg-row { display: grid; grid-template-columns: 104px 1fr; align-items: center; gap: 8px; }
.reg-row label { --sea-type-font: var(--font-body, 16px); --sea-type-min: 12px; --sea-type-scale: 1; font-size: var(--font-body, 16px); color: var(--text); }
.reg-hint { margin: -3px 0 2px 112px; --sea-type-font: var(--font-body, 16px); --sea-type-min: 12px; --sea-type-scale: 1; font-size: var(--font-body, 16px); color: var(--muted); }
.reg-msg { min-height: 1.3em; --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font-size: var(--font-caption, 13.538462px); color: var(--muted); text-align: center; }
.reg-msg:focus { outline: none; }
.reg-msg.is-error { color: var(--red); }
.reg-msg.is-ok { color: var(--green); }

.hero-plate {
  position: absolute;
  right: 22px;
  top: 18px;
  display: flex;
  gap: 18px;
  padding: 8px 14px;
  border: 1px solid #000;
  border-radius: 4px;
  background: rgba(10, 7, 5, 0.82);
  box-shadow: inset 0 0 0 1px var(--brass-lo);
  --sea-type-font: var(--font-caption, 13.538462px);
  --sea-type-min: 10.153846px;
  --sea-type-scale: 1;
  font-size: var(--font-caption, 13.538462px);
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.hero-plate strong { color: var(--brass-hi); margin-left: 4px; }

/* Trailer: a thick dark-wood bezel with a brass lip, corner rivets and a nameplate. */
.video-frame {
  --rivet: radial-gradient(circle at 45% 40%, #fff1c8 0 1.5px, #d9b56a 2.5px, #8a6427 4px, #2a1c0c 5px, transparent 6px);
  position: absolute;
  right: 22px;
  bottom: 44px;
  width: min(470px, calc(100% - var(--banner-x) - var(--banner-w) - 70px));
  margin: 0;
  padding: 18px 18px 22px;
  border-radius: 10px;
  background:
    var(--rivet) 3px 3px / 18px 18px no-repeat,
    var(--rivet) calc(100% - 3px) 3px / 18px 18px no-repeat,
    var(--rivet) 3px calc(100% - 3px) / 18px 18px no-repeat,
    var(--rivet) calc(100% - 3px) calc(100% - 3px) / 18px 18px no-repeat,
    linear-gradient(180deg, rgba(70, 48, 26, 0.55), rgba(10, 6, 3, 0.7)),
    url("assets/wood.jpg") center / 180px auto,
    #1d140c;
  box-shadow:
    0 0 0 1px #000,
    inset 0 1px 0 rgba(255, 228, 170, 0.3),
    inset 0 0 0 1px rgba(201, 151, 63, 0.6),
    inset 0 0 0 5px rgba(12, 8, 4, 0.85),
    inset 0 0 0 6px rgba(201, 151, 63, 0.3),
    0 22px 48px rgba(0, 0, 0, 0.8);
}
.screen {
  position: relative;
  aspect-ratio: 16 / 9;
  max-width: 100%;
  overflow: hidden;
  border-radius: 3px;
  background: #000;
  box-shadow: 0 0 0 1px #000, 0 0 0 3px #b8893a, 0 0 0 4px #3a2608, 0 0 0 5px #000;
}
.screen::after {
  /* soft inner vignette, like looking through the glass */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.55);
}
.screen.is-playing::after { display: none; }
.screen video { width: 100%; height: 100%; object-fit: cover; }
.screen-play {
  position: absolute; inset: 0; z-index: 1; margin: auto;
  width: 68px; height: 68px;
  display: grid; place-items: center;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(22, 14, 8, 0.9) 58%, transparent 60%), conic-gradient(from 200deg, #f7e2a8, #a8792c, #f3d27a, #7a5520, #f7e2a8);
  box-shadow: 0 0 0 1px #000, 0 6px 16px rgba(0, 0, 0, 0.7), 0 0 22px rgba(243, 190, 90, 0.25);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.screen-play svg { margin-left: 4px; filter: drop-shadow(0 1px 1px #000); }
.screen-play:hover { transform: scale(1.06); box-shadow: 0 0 0 1px #000, 0 6px 16px rgba(0, 0, 0, 0.7), 0 0 30px rgba(243, 190, 90, 0.45); }
.screen.is-playing .screen-play { display: none; }
.video-caption {
  position: absolute;
  left: 50%;
  bottom: -12px;
  z-index: 2;
  transform: translateX(-50%);
  max-width: calc(100% - 40px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 5px 16px 6px;
  border-radius: 3px;
  background: linear-gradient(180deg, #ecd6a2, #b28f4f 60%, #9a773a);
  box-shadow: 0 0 0 1px #000, inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 3px 8px rgba(0, 0, 0, 0.65);
  color: #2a1b0a;
  --sea-type-font: var(--font-caption, 13.538462px);
  --sea-type-min: 10.153846px;
  --sea-type-scale: 1;
  font: 700 var(--font-caption, 13.538462px)/1 var(--f-display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lower {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--col-gap);
  padding: 8px var(--banner-x) 0;
}
.col { display: flex; flex-direction: column; min-width: 0; }
.col .panel { flex: 1 1 auto; }
.news-feed { display: grid; align-content: start; padding: 6px 20px; }
.news-item { display: grid; gap: 3px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.news-item:last-child { border-bottom: 0; }
.news-item time { --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font-size: var(--font-caption, 13.538462px); color: var(--brass); font-variant-numeric: tabular-nums; }
.news-item h3 { --sea-type-font: var(--font-subtitle, 18.461538px); --sea-type-min: 12px; --sea-type-scale: 1; font: 700 var(--font-subtitle, 18.461538px)/1.3 var(--f-body); color: var(--parch); }
.news-item p { --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font-size: var(--font-caption, 13.538462px); color: var(--muted); }
.news-item ul { margin: 0; padding-left: 18px; --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font-size: var(--font-caption, 13.538462px); color: var(--text); display: grid; gap: 4px; }
.news-item ul li::marker { color: var(--brass); }
.story { display: grid; align-content: center; gap: 12px; padding: 20px; }
.story h3 { --sea-type-font: var(--font-title, 22.153846px); --sea-type-min: 12px; --sea-type-scale: 1; font: 700 var(--font-title, 22.153846px)/1.25 var(--f-body); color: var(--brass-hi); }
.story p { color: var(--muted); }
.story-list { margin: 0; padding-left: 18px; color: var(--text); display: grid; gap: 8px; line-height: 1.45; }
.story-list li::marker { color: var(--brass); }
.story-list strong { color: var(--brass-hi); font-weight: 700; }
.story .story-sub { --sea-type-font: var(--font-body, 16px); --sea-type-min: 12px; --sea-type-scale: 1; font: 700 var(--font-body, 16px)/1.35 var(--f-body); color: var(--parch); }
.story .story-cta { font-weight: 800; color: var(--parch); --sea-type-font: var(--font-body, 16px); --sea-type-min: 12px; --sea-type-scale: 1; font-size: var(--font-body, 16px); }

.ranking { list-style: none; margin: 0; padding: 0; display: grid; }
.ranking li {
  display: grid;
  grid-template-columns: 28px 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line-soft);
  font-variant-numeric: tabular-nums;
}
.ranking li:last-child { border-bottom: 0; }
.rk-pos { --sea-type-font: var(--font-body, 16px); --sea-type-min: 12px; --sea-type-scale: 1; font: 700 var(--font-body, 16px) var(--f-display); color: var(--muted); text-align: center; }
.ranking li:nth-child(1) .rk-pos { color: #f3d27a; }
.ranking li:nth-child(2) .rk-pos { color: #d7dde2; }
.ranking li:nth-child(3) .rk-pos { color: #d08a4e; }
.rk-icon { width: 26px; height: 26px; object-fit: contain; }
.rk-name { color: var(--parch); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-fleet-tag { color: var(--brass-hi); }
.rk-score { color: var(--brass-hi); --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font-size: var(--font-caption, 13.538462px); }
.ranking li.empty { display: block; color: var(--muted); --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font-size: var(--font-caption, 13.538462px); padding: 6px 0; }

/* Fleet (guild) rankings: swap the ship-icon column for a text tag badge. */
.ranking--fleet li { grid-template-columns: 28px minmax(0, 1fr) auto; }

.site-foot {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 30px 16px 22px;
  --sea-type-font: var(--font-caption, 13.538462px);
  --sea-type-min: 10.153846px;
  --sea-type-scale: 1;
  font-size: var(--font-caption, 13.538462px);
  color: var(--muted);
  text-align: center;
}
.foot-brand { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; --sea-type-font: initial; font: 700 16px var(--f-display); color: var(--parch); letter-spacing: 0.08em; }
.foot-brand-logo { display: block; border-radius: 4px; }
/* The footer has three regions: an empty balancer on the left, text in the middle, social
   icons + language on the right. Since both side regions are `flex: 1`, the middle block
   stays in the true centre of the page INDEPENDENT of the width of the content
   on the right (it used to look centred with space-between but drift). */
.foot-row { display: flex; align-items: center; gap: 12px; width: 100%; }
.foot-row-side { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 12px; }
.foot-row-end { justify-content: flex-end; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 8px; flex: 0 1 auto; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--parch); text-decoration: underline; }
/* Separators come from CSS: a "·" is placed BEFORE each item, so the desired
   "· © 2026 … · All rights reserved · Terms of Use · …" format is preserved
   on its own even if the link list changes from the server
   (no need to add separators to the markup by hand, including the leading dot). */
.foot-links > *::before { content: "·"; margin-right: 8px; color: var(--muted); opacity: .7; }
/* The separator must not underline the link. */
.foot-links > a { text-underline-offset: 2px; }
/* Social media icons — flow as a continuation of the footer links.
   The icons are inline SVG and use `currentColor`, so colour/hover come from
   the same rules as the neighbouring text links. text-decoration is reset here
   so they are not underlined. */
.foot-social { display: inline-flex; align-items: center; gap: 10px; }
.foot-social-link { display: inline-flex; color: var(--muted); text-decoration: none; }
.foot-social-link svg { width: 17px; height: 17px; display: block; fill: currentColor; }
.foot-social-link:hover,
.foot-social-link:focus-visible { color: var(--parch); text-decoration: none; }
.foot-social-link:focus-visible { outline: 2px solid var(--brass-hi, #f3d27a); outline-offset: 3px; border-radius: 3px; }

/* ── Post-login portal ─────────────────────────── */
/* Card is scaled up (never down) by fitPortalToViewport() in app.js so tall
   viewports don't leave empty space below it; transform-origin keeps the
   top edge anchored while it grows, and app.js compensates with an inline
   margin-bottom so the extra visual height still reserves scroll space. */
.portal {
  position: relative;
  width: 100%;
  max-width: 1300px;
  margin: 16px auto 0;
  padding: 12px 12px 0;
  border: 1px solid #000;
  transform-origin: top center;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.55)),
    url("assets/wood.jpg") center top / 300px auto;
  box-shadow:
    inset 0 0 0 1px var(--wood-3),
    inset 0 0 0 5px #120b06,
    inset 0 0 0 6px rgba(201,151,63,0.25),
    0 20px 60px rgba(0,0,0,0.85);
}
/* corner bolts */
.portal::before, .portal::after {
  content: "";
  position: absolute;
  top: 2px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #d9c9a8, #6d5a3c 60%, #2a2016);
  box-shadow: 0 1px 2px #000;
}
.portal::before { left: 2px; }
.portal::after { right: 2px; }

.p-head {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 210px;
  align-items: stretch;
  min-height: 118px;
  border: 1px solid #000;
  background:
    linear-gradient(90deg, rgba(10,7,5,0.88) 0%, rgba(10,7,5,0.2) 28%, rgba(10,7,5,0.2) 62%, rgba(10,7,5,0.9) 80%),
    var(--header-img) center 55% / cover;
  box-shadow: inset 0 0 0 1px var(--brass-lo);
}
.p-logo { display: grid; place-items: center; }
.p-logo img { width: 118px; height: auto; filter: drop-shadow(0 4px 8px #000); }
/* Two buttons (download Unity client + live game) side by side. gap/wrap: on a narrow
   screen they stack (each is already width: min(100%, 250px)). */
.p-actions { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 10px; }
/* .btn-ember-dl is DELIBERATELY unstyled: the "Unity client / Download" button looks
   exactly the same as the live game button. If a rule is added it must be written AFTER
   .btn-ember, because at the same specificity the earlier-written one is overridden. */
.btn-ember {
  display: grid;
  justify-items: center;
  align-content: center;
  width: min(100%, 250px);
  height: 66px;
  border: 0;
  border-radius: 6px;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(255, 210, 120, 0.25), transparent 65%),
    linear-gradient(180deg, #d9621f, #b83c0c 45%, #7a2407);
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 180, 0.7),
    inset 0 -3px 6px rgba(90, 20, 0, 0.6),
    0 0 0 2px #2a1206, 0 0 0 4px #b8893a, 0 0 0 5px #3a2608,
    0 0 22px rgba(255, 120, 30, 0.45), 0 6px 12px rgba(0,0,0,0.7);
  color: #fff6e6;
  --sea-type-font: var(--font-display, 27.076923px);
  --sea-type-min: 12px;
  --sea-type-scale: 1;
  font: 900 var(--font-display, 27.076923px)/1 var(--f-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  text-shadow: 0 2px 3px #5a1a03;
  transition: filter 0.15s ease;
}
.btn-ember small { --sea-type-font: var(--font-body, 16px); --sea-type-min: 12px; --sea-type-scale: 1; font-size: var(--font-body, 16px); font-weight: 700; letter-spacing: 0.2em; margin-bottom: 5px; color: #fff; text-shadow: 0 1px 2px #6a2206; }
.btn-ember:hover { filter: brightness(1.12) saturate(1.1); }
/* Uzun ceviriler (fr "Telecharger", nl "Downloaden"…): app.js applyI18n is-long verir. */
.btn-ember > span.is-long { --sea-type-font: var(--font-title, 22.153846px); --sea-type-min: 12px; --sea-type-scale: 1; font-size: var(--font-title, 22.153846px); letter-spacing: 0.03em; }
.p-account {
  margin: 4px 4px 4px 0;
  padding: 2px 4px;
  border: 18px solid transparent;
  border-image: url("assets/frame.webp") 70 / 18px / 0 stretch;
  background: rgba(8, 6, 4, 0.9);
  --sea-type-font: var(--font-body, 16px);
  --sea-type-min: 12px;
  --sea-type-scale: 1;
  font-size: var(--font-body, 16px);
  display: grid;
  align-content: center;
  gap: 3px;
}
.p-account dl { margin: 0; display: grid; gap: 2px; }
.p-account dl div { display: flex; justify-content: space-between; gap: 8px; }
.p-account dt { color: var(--text); }
.p-account dd { margin: 0; color: var(--brass-hi); font-weight: 700; font-variant-numeric: tabular-nums; }
.p-account dd a { color: inherit; }
.acc-name { font-weight: 800; color: var(--parch); --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font-size: var(--font-caption, 13.538462px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.p-cur {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 6px;
  border: 1px solid #000;
  background: linear-gradient(180deg, #221710, #120c08);
  box-shadow: inset 0 0 0 1px var(--wood-3);
}
.cur {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 36px; padding: 0 8px;
  --sea-type-font: var(--font-caption, 13.538462px);
  --sea-type-min: 10.153846px;
  --sea-type-scale: 1;
  font-size: var(--font-caption, 13.538462px); color: var(--parch);
  font-variant-numeric: tabular-nums;
}
.cur + .cur { border-left: 1px solid rgba(0,0,0,0.7); box-shadow: -1px 0 0 rgba(201,151,63,0.15); }
.cur img, .cur svg { width: 22px; height: auto; flex-shrink: 0; }
.cur-label { font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.cur-label.gold { color: #e9b949; }
.cur-label.pearl { color: #8fc3ea; }
.cur-label.crystal { color: #ff6b57; }
.cur-val { font-weight: 700; }

/* ── Server selection (third cell of the balance strip) ──────────────────
   Dark burgundy background + large gold uppercase text + globe icon on the left. The dropdown
   is positioned relative to .portal (the portal is scaled with transform, so position:fixed
   cannot be used). Content comes from the app.js → SERVERS array. */
.cur-server { position: relative; padding: 0; }
.srv-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-width: 0;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  background: linear-gradient(180deg, rgba(99, 24, 18, 0.92), rgba(55, 13, 12, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 210, 150, 0.14), inset 0 0 0 1px rgba(201, 151, 63, 0.3);
  color: var(--brass-hi);
  --sea-type-font: var(--font-body, 16px);
  --sea-type-min: 12px;
  --sea-type-scale: 1;
  font: 700 var(--font-body, 16px)/1 var(--f-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
  cursor: pointer;
}
.srv-btn:hover, .srv-btn[aria-expanded="true"] {
  background: linear-gradient(180deg, rgba(126, 32, 23, 0.95), rgba(70, 17, 15, 0.98));
  color: #ffe8bc;
}
.cur-server .srv-globe { width: 26px; height: 26px; flex-shrink: 0; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.6)); }
/* line-height 1.35 REQUIRED: the button's own `font: ... 13px/1` line box was clipping the accents
   in the gold text (the breve on a capital Ğ, the háček on Czech/Slovak "ZMĚNIT")
   from the top with overflow:hidden. Ellipsis is needed in long languages. */
.srv-label { min-width: 0; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cur-server .caret { width: 10px; height: 6px; flex-shrink: 0; }
.srv-btn[aria-expanded="true"] .caret { transform: rotate(180deg); }
.srv-menu {
  position: absolute;
  z-index: 90;
  top: calc(100% + 6px);
  left: 0;
  min-width: 100%;
  max-width: calc(100vw - 24px);
  max-height: min(320px, 60vh);
  overflow: auto;
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid #000;
  border-radius: 6px;
  background: #150e08;
  box-shadow: inset 0 0 0 1px var(--brass-lo), 0 14px 30px rgba(0, 0, 0, 0.8);
  scrollbar-width: thin;
  scrollbar-color: #8a6427 #0e0a07;
}
.srv-menu button {
  display: flex; align-items: center; gap: 9px;
  width: 100%;
  padding: 7px 9px;
  border: 0; border-radius: 4px;
  background: none;
  color: var(--text);
  --sea-type-font: var(--font-body, 16px);
  --sea-type-min: 12px;
  --sea-type-scale: 1;
  font: 500 var(--font-body, 16px) var(--f-body);
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}
.srv-menu button:hover, .srv-menu button:focus-visible { background: rgba(201, 151, 63, 0.16); color: var(--parch); outline: none; }
.srv-menu button[aria-checked="true"] { background: rgba(201, 151, 63, 0.28); color: var(--brass-hi); font-weight: 700; }
/* The tick takes up space in every row but is visible only on the selected one: even with a single server
   the list stays aligned, and rows do not shift when a server is added. */
.srv-check { width: 14px; height: 14px; flex-shrink: 0; fill: none; stroke: var(--brass-hi); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.srv-menu button[aria-checked="true"] .srv-check { opacity: 1; }

/* Portal menu: engraved brass buttons with icons. Active = lit gold. */
.p-nav {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  padding: 6px;
  border: 1px solid #000;
  border-radius: 4px;
  background: linear-gradient(180deg, #1c150f, #0d0a07);
  box-shadow: inset 0 1px 0 rgba(255, 220, 160, 0.08), inset 0 0 0 1px rgba(201, 151, 63, 0.18);
}
.nav-btn {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #000;
  border-radius: 5px;
  background: linear-gradient(180deg, #3b2a1a 0%, #24180e 55%, #1a110a 100%);
  box-shadow: inset 0 1px 0 rgba(255, 222, 160, 0.16), inset 0 0 0 1px rgba(201, 151, 63, 0.28), 0 2px 3px rgba(0, 0, 0, 0.6);
  color: #dcc08a;
  --sea-type-font: var(--font-body, 16px);
  --sea-type-min: 12px;
  --sea-type-scale: 1;
  font: 700 var(--font-body, 16px)/1 var(--f-display);
  letter-spacing: 0.05em;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
/* Long labels (e.g. ru/el/fi) shrink a little, and wrap only as a last resort. */
.nav-btn > span { min-width: 0; overflow-wrap: break-word; hyphens: auto; }
.nav-btn > span.is-long { --sea-type-font: var(--font-body, 16px); --sea-type-min: 12px; --sea-type-scale: 1; font-size: var(--font-body, 16px); letter-spacing: 0.02em; }
.nav-ico {
  width: 18px; height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--brass);
  transition: color 0.15s ease;
}
.nav-btn:hover {
  color: #fff1d0;
  filter: brightness(1.18);
  box-shadow: inset 0 1px 0 rgba(255, 222, 160, 0.22), inset 0 0 0 1px rgba(243, 210, 122, 0.55), 0 2px 3px rgba(0, 0, 0, 0.6);
}
.nav-btn:hover .nav-ico { color: var(--brass-hi); }
.nav-btn[aria-current="page"] {
  color: #1d1309;
  filter: none;
  background: linear-gradient(180deg, #fbe3a0 0%, #e0b458 42%, #b0842f 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), inset 0 -2px 0 rgba(110, 78, 32, 0.6), 0 0 14px rgba(243, 190, 90, 0.35);
  text-shadow: 0 1px 0 rgba(255, 240, 200, 0.5);
}
.nav-btn[aria-current="page"] .nav-ico { color: #3a2608; }
.nav-exit {
  flex: 0 0 auto;
  background: linear-gradient(180deg, #3a1a14, #22100b 55%, #180a07);
  box-shadow: inset 0 1px 0 rgba(255, 190, 170, 0.14), inset 0 0 0 1px rgba(200, 90, 60, 0.35), 0 2px 3px rgba(0, 0, 0, 0.6);
  color: #e8b3a2;
}
.nav-exit .nav-ico { color: #e07a5f; }
.nav-exit:hover { color: #fff; box-shadow: inset 0 1px 0 rgba(255, 190, 170, 0.2), inset 0 0 0 1px rgba(255, 130, 100, 0.6), 0 2px 3px rgba(0, 0, 0, 0.6); }
.nav-exit:hover .nav-ico { color: #ff9a80; }

/* Fixed content window: every tab renders inside the same frame, so
   switching tabs never changes the page height or shifts anything. */
.p-body {
  position: relative;
  height: var(--pane-h);
  margin: 10px 0 12px;
}
.view { height: 100%; }
.view:not([hidden]) { animation: view-in 0.16s ease-out; }
@keyframes view-in { from { opacity: 0; } to { opacity: 1; } }

.status-bar {
  margin: -4px 0 10px;
  padding: 6px 12px;
  border: 1px solid #000;
  border-radius: 4px;
  background: linear-gradient(#2a1d10, #150e08);
  box-shadow: inset 0 0 0 1px var(--brass-lo);
  --sea-type-font: var(--font-body, 16px);
  --sea-type-min: 12px;
  --sea-type-scale: 1;
  font-size: var(--font-body, 16px);
  color: var(--brass-hi);
  text-align: center;
}

/* Home view: featured slider + captain card on top, three tiles below,
   on a 3-column grid so every edge lines up. */
.view-home {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr) 204px;
  gap: 10px;
}
.slider {
  grid-column: span 2;
  position: relative;
  overflow: hidden;
  border: 1px solid #000;
  border-radius: 4px;
  background: #000;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
}
.slider::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(0deg, rgba(8, 5, 3, 0.94) 0%, rgba(8, 5, 3, 0.6) 34%, transparent 62%),
    linear-gradient(90deg, rgba(8, 5, 3, 0.45), transparent 55%);
  box-shadow: inset 0 0 0 1px var(--brass-lo);
}
.slide-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.35s ease; }
.slide-caption {
  position: absolute;
  z-index: 2;
  left: 26px;
  right: 190px;
  bottom: 22px;
  display: grid;
  justify-items: start;
  gap: 8px;
}
.slide-count { --sea-type-font: var(--font-body, 16px); --sea-type-min: 12px; --sea-type-scale: 1; font: 700 var(--font-body, 16px) var(--f-body); letter-spacing: 0.18em; text-transform: uppercase; color: var(--brass-hi); min-height: 1em; }
.slide-caption h2 { --sea-type-font: var(--font-display, 27.076923px); --sea-type-min: 12px; --sea-type-scale: 1; font-size: var(--font-display, 27.076923px); line-height: 1.1; color: #fff; text-shadow: 0 2px 8px #000; }
.slide-body {
  max-width: 48ch;
  min-height: 2.9em;
  --sea-type-font: var(--font-caption, 13.538462px);
  --sea-type-min: 10.153846px;
  --sea-type-scale: 1;
  font-size: var(--font-caption, 13.538462px);
  line-height: 1.45;
  color: #eadfc6;
  text-shadow: 0 1px 3px #000;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.slide-caption .btn-small-gold { margin-top: 4px; }
.slide-arrow {
  position: absolute;
  z-index: 3;
  top: 42%;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid rgba(243, 210, 122, 0.45);
  border-radius: 50%;
  background: rgba(10, 7, 5, 0.62);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}
.slide-arrow.prev { left: 12px; }
.slide-arrow.next { right: 12px; }
.slider:hover .slide-arrow, .slide-arrow:focus-visible { opacity: 1; }
.slide-arrow:hover { background: rgba(10, 7, 5, 0.85); }
.slide-arrow svg { width: 18px; height: 18px; fill: none; stroke: var(--brass-hi); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.slider .slider-dots { position: absolute; z-index: 3; right: 18px; bottom: 22px; display: flex; gap: 6px; }
.slider-dots button { width: 22px; height: 22px; padding: 8px 0; border: 0; background: none; cursor: pointer; }
.slider-dots button::before {
  content: ""; display: block; height: 6px;
  border-radius: 3px;
  background: rgba(239, 226, 196, 0.35);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  transition: background-color 0.2s ease;
}
.slider-dots button:hover::before { background: rgba(239, 226, 196, 0.65); }
.slider-dots button[aria-pressed="true"]::before { background: linear-gradient(90deg, #ffd27a, #e0591e); box-shadow: 0 0 8px rgba(255, 140, 40, 0.6); }

.captain {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  padding: 16px;
  border: 1px solid #000;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(38, 25, 14, 0.97), rgba(14, 10, 7, 0.97));
  box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 220, 160, 0.08);
}
.cc-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.cc-rank { width: 52px; height: 52px; flex-shrink: 0; object-fit: contain; filter: drop-shadow(0 2px 4px #000); }
.cc-id { min-width: 0; display: grid; gap: 2px; }
.cc-kicker { --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font: 700 var(--font-caption, 13.538462px) var(--f-body); letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.cc-name { --sea-type-font: var(--font-subtitle, 18.461538px); --sea-type-min: 12px; --sea-type-scale: 1; font: 700 var(--font-subtitle, 18.461538px)/1.15 var(--f-display); color: var(--parch); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-rank-label { --sea-type-font: var(--font-body, 16px); --sea-type-min: 12px; --sea-type-scale: 1; font-size: var(--font-body, 16px); color: var(--brass-hi); }
.cc-stats { margin: 0; display: grid; }
.cc-stats > div { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 8px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font-size: var(--font-caption, 13.538462px); }
.cc-stats > div:last-child { border-bottom: 0; }
.cc-stats dt { color: var(--muted); }
.cc-stats dd { margin: 0; color: var(--parch); font-weight: 700; font-variant-numeric: tabular-nums; }
.meter { flex-basis: 100%; height: 6px; border-radius: 3px; background: #0a0705; box-shadow: inset 0 0 0 1px rgba(201, 151, 63, 0.3); overflow: hidden; }
.meter span { display: block; width: 0; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #b0842f, #f3d27a); transition: width 0.5s ease; }
.chip { display: inline-block; padding: 2px 9px; border-radius: 99px; --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font-size: var(--font-caption, 13.538462px); font-weight: 700; background: #2a1f16; color: var(--muted); box-shadow: inset 0 0 0 1px rgba(201, 151, 63, 0.25); }
.chip.on { background: linear-gradient(180deg, #f3d27a, #c9973f); color: #1d1309; box-shadow: none; }

.tile {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 12px 14px;
  border: 1px solid #000;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(14, 10, 7, 0.95), rgba(26, 17, 11, 0.95));
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}
.tile-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding-bottom: 7px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.tile-head h3 { --sea-type-font: var(--font-subtitle, 18.461538px); --sea-type-min: 12px; --sea-type-scale: 1; font-size: var(--font-subtitle, 18.461538px); letter-spacing: 0.1em; text-transform: uppercase; color: var(--brass-hi); }
.tile-head a { --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font-size: var(--font-caption, 13.538462px); color: var(--muted); }
.tile-head a:hover { color: var(--parch); }
.ranking-sm li { grid-template-columns: 20px 22px minmax(0, 1fr) auto; gap: 6px; padding: 4px 0; --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font-size: var(--font-caption, 13.538462px); }
.ranking-sm .rk-icon { width: 22px; height: 22px; }
.ranking-sm .rk-score { --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font-size: var(--font-caption, 13.538462px); }
.ranking-sm.ranking--fleet li { grid-template-columns: 20px minmax(0, 1fr) auto; }
.latest-news { display: grid; gap: 4px; padding-top: 4px; }
.latest-news time { --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font-size: var(--font-caption, 13.538462px); color: var(--brass); font-variant-numeric: tabular-nums; }
.latest-news h4 { margin: 0; --sea-type-font: var(--font-body, 16px); --sea-type-min: 12px; --sea-type-scale: 1; font: 700 var(--font-body, 16px)/1.3 var(--f-body); color: var(--parch); }
.latest-news p { --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font-size: var(--font-caption, 13.538462px); color: var(--muted); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.muted { color: var(--muted); --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font-size: var(--font-caption, 13.538462px); }

/* Cabin + table pages */
.cabin-layout { height: 100%; display: grid; grid-template-columns: 215px minmax(0, 1fr); gap: 10px; align-items: stretch; }
.cabin {
  position: relative;
  display: flex;
  padding: 44px 8px 8px;
  border: 1px solid #000;
  background: linear-gradient(180deg, #120c08, #0a0705);
  box-shadow: inset 0 0 0 1px var(--brass-lo);
}
.cabin-img { width: 100%; height: 100%; min-height: 0; border: 1px solid #000; object-fit: cover; object-position: 50% 30%; }
.cabin-plaque {
  position: absolute;
  z-index: 1;
  top: 6px; left: -6px; right: -6px;
  padding: 7px 0 8px;
  background: linear-gradient(180deg, #e3cb96, #9c7b3f);
  color: #2a1b0a;
  --sea-type-font: var(--font-title, 22.153846px);
  --sea-type-min: 12px;
  --sea-type-scale: 1;
  font: 700 var(--font-title, 22.153846px)/1 var(--f-display);
  text-align: center;
  letter-spacing: 0.06em;
  clip-path: polygon(0 0, 100% 0, 97% 50%, 100% 100%, 0 100%, 3% 50%);
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.7));
}
.sheet {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border: 1px solid #000;
  background: linear-gradient(180deg, rgba(12, 8, 5, 0.94), rgba(20, 13, 8, 0.96));
  box-shadow: inset 0 0 0 1px var(--brass-lo);
}
.sheet-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 32px;
  padding: 4px 10px;
  background: linear-gradient(180deg, #3a3835, #131211);
  border-bottom: 1px solid #000;
}
.sheet-head h2 { --sea-type-font: var(--font-subtitle, 18.461538px); --sea-type-min: 12px; --sea-type-scale: 1; font-size: var(--font-subtitle, 18.461538px); letter-spacing: 0.08em; text-transform: uppercase; color: #fff; }
.sheet-head-sub { margin-top: auto; border-top: 1px solid #000; }
.sheet-filter select {
  height: 24px;
  padding: 0 6px;
  border: 1px solid #000;
  border-radius: 2px;
  background: #1a1510;
  color: var(--brass-hi);
  --sea-type-font: var(--font-caption, 13.538462px);
  --sea-type-min: 10.153846px;
  --sea-type-scale: 1;
  font: 700 var(--font-caption, 13.538462px) var(--f-body);
}
.pager { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; }
.pager-group { display: inline-flex; gap: 4px; }
.pager button {
  width: 24px; height: 24px;
  border: 1px solid #000; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #4b4945, #111);
  color: var(--parch); --sea-type-font: var(--font-body, 16px); --sea-type-min: 12px; --sea-type-scale: 1; font-size: var(--font-body, 16px); line-height: 1; cursor: pointer;
}
.pager button:disabled { opacity: 0.35; cursor: default; }
.pager-info { --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font-size: var(--font-caption, 13.538462px); color: var(--muted); font-variant-numeric: tabular-nums; }
.table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  margin: 0 10px 10px;
  border: 1px solid #000;
  scrollbar-width: thin;
  scrollbar-color: #8a6427 #0e0a07;
}
.table-wrap[aria-busy="true"] { opacity: 0.55; transition: opacity 0.2s ease 0.15s; }
.grid { width: 100%; border-collapse: collapse; --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font-size: var(--font-caption, 13.538462px); }
.grid th {
  position: sticky; top: 0;
  padding: 5px 8px;
  text-align: left;
  background: linear-gradient(180deg, #2d2b29, #0e0d0c);
  color: #fff;
  font-weight: 700;
  border-right: 1px solid #000;
}
.grid .col-date { width: 138px; }
.grid .col-reward { width: 150px; }
.grid .col-who { width: 150px; }
.grid td {
  padding: 6px 8px;
  vertical-align: top;
  border-right: 1px solid rgba(0,0,0,0.6);
  color: #cdb58a;
  font-variant-numeric: tabular-nums;
}
.grid tbody tr:nth-child(odd) td { background: rgba(88, 55, 26, 0.45); }
.grid tbody tr:nth-child(even) td { background: rgba(60, 37, 18, 0.45); }
.grid td strong { color: var(--parch); display: block; }
.grid td.reward { color: var(--green); font-weight: 700; }
.grid td.reward.none { color: var(--muted); font-weight: 400; }
.grid tbody tr.empty-row td { text-align: center; color: var(--muted); padding: 28px 8px; background: transparent; }
.sheet-tabs { display: grid; grid-template-columns: 1fr 1fr; background: linear-gradient(180deg, #3a3835, #131211); border-bottom: 1px solid #000; margin-bottom: 10px; }
.sheet-tabs button {
  min-height: 32px; border: 0; background: none; cursor: pointer;
  color: #b3a180; --sea-type-font: var(--font-subtitle, 18.461538px); --sea-type-min: 12px; --sea-type-scale: 1; font: 700 var(--font-subtitle, 18.461538px) var(--f-display); letter-spacing: 0.08em; text-transform: uppercase;
}
.sheet-tabs button:hover { color: var(--parch); }
.sheet-tabs button[aria-selected="true"] { color: #fff; background: rgba(0,0,0,0.35); box-shadow: inset 0 -2px 0 var(--ember); }
.compose-note { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 10px; }
.compose-note p { color: var(--muted); --sea-type-font: var(--font-body, 16px); --sea-type-min: 12px; --sea-type-scale: 1; font-size: var(--font-body, 16px); max-width: 52ch; line-height: 1.6; }

/* News: Pirate Gazette */
.gazette { height: 100%; display: flex; flex-direction: column; border: 1px solid #000; background: #17120e; box-shadow: inset 0 0 0 1px #3a2a1a; }
.gazette-head {
  display: grid; justify-items: center; gap: 4px;
  padding: 30px 16px 18px;
  background: linear-gradient(180deg, rgba(23,18,14,0.3), #17120e), url("assets/promo/kraken.jpg") center 40% / cover;
  text-align: center;
}
.gazette-kicker { --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font: 700 var(--font-caption, 13.538462px) var(--f-display); letter-spacing: 0.3em; padding-left: 0.3em; text-transform: uppercase; color: var(--brass); }
.gazette-head h2 { --sea-type-font: var(--font-display, 27.076923px); --sea-type-min: 12px; --sea-type-scale: 1; font-size: var(--font-display, 27.076923px); letter-spacing: 0.12em; padding-left: 0.12em; color: #d7b878; text-shadow: 0 3px 8px #000; }
.gazette-sub { --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font: italic 400 var(--font-caption, 13.538462px) var(--f-serif); color: #c3b08d; letter-spacing: 0.04em; }
.gazette-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; padding: 0 3px; }
.gazette-tabs button {
  position: relative;
  min-height: 32px; border: 0; cursor: pointer;
  background: #2a2119; color: #e6d5ae;
  --sea-type-font: var(--font-subtitle, 18.461538px);
  --sea-type-min: 12px;
  --sea-type-scale: 1;
  font: 700 var(--font-subtitle, 18.461538px) var(--f-serif);
}
.gazette-tabs button:hover { background: #3a2d20; }
.gazette-tabs button[aria-selected="true"] { background: #b8955a; color: #1a130a; }
.gazette-tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 50%; bottom: -6px; border: 6px solid transparent; border-top-color: #b8955a; border-bottom: 0; transform: translateX(-50%); }
.gazette-body { flex: 1 1 auto; min-height: 0; overflow: auto; scrollbar-width: thin; scrollbar-color: #8a6427 #0e0a07; padding: 26px 16px 30px; display: grid; align-content: start; gap: 26px; color: #ddd3bf; font-family: var(--f-serif); }
.gazette-body:focus { outline: none; }
.g-article { display: grid; gap: 10px; width: 100%; max-width: 62ch; margin-inline: auto; }
.g-article h3 { --sea-type-font: var(--font-display, 27.076923px); --sea-type-min: 12px; --sea-type-scale: 1; font: 700 var(--font-display, 27.076923px)/1.25 var(--f-serif); color: #d7b878; letter-spacing: 0.02em; text-align: center; }
.g-article time { --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font-size: var(--font-caption, 13.538462px); color: #a39478; text-align: center; letter-spacing: 0.1em; text-transform: uppercase; font-family: var(--f-body); }
.g-article p { --sea-type-font: var(--font-body, 16px); --sea-type-min: 12px; --sea-type-scale: 1; font-size: var(--font-body, 16px); line-height: 1.65; }
.g-article p.center { text-align: center; }
.g-article ul { margin: 0; padding-left: 22px; display: grid; gap: 6px; --sea-type-font: var(--font-body, 16px); --sea-type-min: 12px; --sea-type-scale: 1; font-size: var(--font-body, 16px); line-height: 1.55; }
.g-article li::marker { color: #b8955a; }
.g-rule { position: relative; height: 1px; width: 160px; margin: 0 auto; background: linear-gradient(90deg, transparent, #b8955a, transparent); }
.g-rule::after { content: ""; position: absolute; left: 50%; top: -3px; width: 7px; height: 7px; background: #b8955a; transform: translateX(-50%) rotate(45deg); }

/* Client download (#indir): newspaper frame + two columns (download/setup | requirements).
   On desktop the body scrolls inside the fixed .p-body; at ≤900px it returns to normal flow. */
.dl { height: 100%; display: flex; flex-direction: column; border: 1px solid #000; background: #17120e; box-shadow: inset 0 0 0 1px #3a2a1a; }
.dl-head {
  display: grid; justify-items: center; gap: 4px;
  padding: 14px 16px 12px;
  background: linear-gradient(180deg, rgba(23,18,14,0.35), #17120e), url("assets/promo/fleet.jpg") center 45% / cover;
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.dl-kicker { --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font: 700 var(--font-caption, 13.538462px) var(--f-display); letter-spacing: 0.3em; padding-left: 0.3em; color: var(--brass); }
.dl-head h2 { --sea-type-font: var(--font-display, 27.076923px); --sea-type-min: 12px; --sea-type-scale: 1; font-size: var(--font-display, 27.076923px); letter-spacing: 0.1em; padding-left: 0.1em; color: #d7b878; text-shadow: 0 3px 8px #000; }
.dl-lead { max-width: 70ch; --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font: italic 400 var(--font-caption, 13.538462px)/1.45 var(--f-serif); color: #c3b08d; text-shadow: 0 1px 3px #000; }
.dl-body {
  flex: 1 1 auto; min-height: 0; overflow: auto;
  scrollbar-width: thin; scrollbar-color: #8a6427 #0e0a07;
  display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); align-items: start; gap: 22px;
  padding: 14px 18px 16px;
}
.dl-get { display: grid; justify-items: center; gap: 8px; }
.dl-cta { margin-top: 6px; }
/* "DOWNLOAD THE LAUNCHER" and its translations ("Telecharger le launcher", "Launcher
   herunterladen") are longer than the single word "Download": the button stretches to the column width
   (<=300px), the text shrinks and wraps to two lines if needed. The specificity of .btn-ember.dl-cta
   beats the .btn-ember (including the <=600px media) and span.is-long rules. */
.btn-ember.dl-cta { width: 100%; height: auto; min-height: 66px; padding: 9px 12px; }
.btn-ember.dl-cta > span[data-i18n] { --sea-type-font: var(--font-title, 22.153846px); --sea-type-min: 12px; --sea-type-scale: 1; font-size: var(--font-title, 22.153846px); line-height: 1.12; letter-spacing: 0.03em; text-align: center; overflow-wrap: anywhere; }
.dl-file { display: grid; justify-items: center; gap: 2px; --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font-size: var(--font-caption, 13.538462px); color: var(--muted); text-align: center; }
.dl-file-name { font-weight: 700; color: var(--parch); overflow-wrap: anywhere; }
.dl-note { --sea-type-font: var(--font-body, 16px); --sea-type-min: 12px; --sea-type-scale: 1; font-size: var(--font-body, 16px); line-height: 1.5; color: var(--muted); text-align: center; }
.dl-sub { justify-self: stretch; padding-bottom: 6px; border-bottom: 1px solid var(--line); --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font-size: var(--font-caption, 13.538462px); letter-spacing: 0.1em; text-transform: uppercase; color: var(--brass-hi); }
.dl-steps { justify-self: stretch; margin: 0; padding-left: 22px; display: grid; gap: 4px; --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font-size: var(--font-caption, 13.538462px); line-height: 1.45; color: var(--text); }
.dl-steps li::marker { color: var(--brass); font-weight: 700; }
.dl-warn {
  justify-self: stretch;
  padding: 8px 10px;
  border-left: 3px solid var(--ember);
  border-radius: 2px;
  background: rgba(224, 89, 30, 0.1);
  --sea-type-font: var(--font-caption, 13.538462px);
  --sea-type-min: 10.153846px;
  --sea-type-scale: 1;
  font-size: var(--font-caption, 13.538462px); line-height: 1.5; color: #e8cfa8;
}
.dl-req { display: grid; gap: 10px; min-width: 0; }
.dl-table { width: 100%; border-collapse: collapse; border: 1px solid #000; --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font-size: var(--font-caption, 13.538462px); }
.dl-table thead th {
  padding: 5px 8px; text-align: left;
  background: linear-gradient(180deg, #2d2b29, #0e0d0c);
  color: #fff; font-weight: 700; border-right: 1px solid #000;
}
.dl-table thead th:first-child { width: 128px; }
.dl-table tbody th { padding: 7px 8px; text-align: left; vertical-align: top; color: var(--brass-hi); font-weight: 700; border-right: 1px solid rgba(0,0,0,0.6); }
.dl-table td { padding: 7px 8px; vertical-align: top; color: #cdb58a; border-right: 1px solid rgba(0,0,0,0.6); line-height: 1.4; }
.dl-table tbody tr:nth-child(odd) > * { background: rgba(88, 55, 26, 0.45); }
.dl-table tbody tr:nth-child(even) > * { background: rgba(60, 37, 18, 0.45); }
.dl-tag { display: none; }
.dl-soon { --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font: italic 400 var(--font-caption, 13.538462px) var(--f-serif); color: #a39478; text-align: center; }
@media (max-width: 900px) {
  .dl { height: auto; }
  .dl-body { overflow: visible; grid-template-columns: minmax(0, 1fr); }
  .dl-get { max-width: 460px; width: 100%; justify-self: center; }
}
@media (max-width: 600px) {
  .dl-head h2 { --sea-type-font: var(--font-display, 27.076923px); --sea-type-min: 12px; --sea-type-scale: 1; font-size: var(--font-display, 27.076923px); }
  .dl-body { padding: 14px 10px 16px; }
  .dl-table thead { display: none; }
  .dl-table, .dl-table tbody { display: block; }
  .dl-table tr { display: grid; gap: 4px; padding: 8px 10px; border-bottom: 1px solid #000; }
  .dl-table tbody tr:nth-child(odd) { background: rgba(88, 55, 26, 0.45); }
  .dl-table tbody tr:nth-child(even) { background: rgba(60, 37, 18, 0.45); }
  .dl-table tbody tr > * { display: block; padding: 0; border: 0; background: none !important; }
  .dl-tag { display: block; --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font-size: var(--font-caption, 13.538462px); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
}

.p-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 16px;
  padding: 10px 8px 12px;
  border-top: 1px solid #000;
  box-shadow: 0 -1px 0 var(--brass-lo);
  --sea-type-font: var(--font-caption, 13.538462px);
  --sea-type-min: 10.153846px;
  --sea-type-scale: 1;
  font-size: var(--font-caption, 13.538462px); color: var(--muted);
}

/* ── Responsive ─────────────────────────────── */
@media (max-width: 1060px) {
  .topstrip { padding-left: calc(var(--banner-x) + var(--banner-w) + 12px); padding-right: 8px; }
  .login-row .inp { width: 140px; }
}
@media (max-width: 900px) {
  .topstrip { height: auto; padding: 10px 4px; justify-content: center; }
  .topstrip-right { justify-items: center; width: 100%; }
  .login-row, .login-row-end { justify-content: center; flex-wrap: wrap; }
  .login-msg, .forgot-note { text-align: center; justify-self: center; }
  .hero { min-height: 0; display: grid; gap: 16px; padding: 0 0 16px; }
  .hero::before {
    inset: 0 calc(-1 * var(--gutter)) auto;
    height: 360px;
    background-position: 60% 0;
    -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent);
    mask-image: linear-gradient(180deg, #000 70%, transparent);
  }
  .banner { position: relative; left: auto; top: auto; width: min(100%, 380px); margin: 180px auto 0; }
  .banner::after { display: none; }
  .hero-plate { position: static; justify-self: center; flex-wrap: wrap; justify-content: center; }
  .video-frame { position: relative; right: auto; bottom: auto; width: min(100%, 520px); justify-self: center; }
  .video-frame { margin-bottom: 12px; }
  .lower { grid-template-columns: minmax(0, 1fr); padding-inline: 0; }
  .p-head { grid-template-columns: 110px minmax(0, 1fr); }
  .p-account { grid-column: 1 / -1; margin: 0 6px 6px; }
  .p-logo img { width: 86px; }
  .p-cur { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cur:nth-child(3) { border-left: 0; box-shadow: none; }
  .cur:nth-child(n + 3) { border-top: 1px solid rgba(0,0,0,0.7); }
  .cur-server { grid-column: 1 / -1; }
  .srv-menu { left: 0; right: 0; max-width: none; }
  .p-nav { gap: 4px; padding: 4px; }
  .nav-btn { flex-direction: column; gap: 4px; height: 58px; padding: 0 3px; --sea-type-font: var(--font-body, 16px); --sea-type-min: 12px; --sea-type-scale: 1; font-size: var(--font-body, 16px); line-height: 1.1; letter-spacing: 0.02em; white-space: normal; text-align: center; }
  .nav-exit { flex: 1 1 0; }
  .nav-ico { width: 20px; height: 20px; }
  .p-body { height: auto; }
  .view { height: auto; }
  .view-home { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .slider { grid-column: auto; aspect-ratio: 16 / 11; max-width: 100%; }
  .slide-caption { left: 16px; right: 16px; bottom: 44px; }
  .slide-caption h2 { --sea-type-font: var(--font-display, 27.076923px); --sea-type-min: 12px; --sea-type-scale: 1; font-size: var(--font-display, 27.076923px); }
  .slider .slider-dots { left: 16px; right: auto; bottom: 12px; }
  .slide-arrow { display: none; }
  .tile { min-height: 0; }
  .gazette-body { overflow: visible; }
  .cabin-layout { grid-template-columns: minmax(0, 1fr); }
  .cabin { display: none; }
  .table-wrap { max-height: none; }
  .compose-note { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 600px) {
  .lang-menu { left: 12px; right: 12px; top: 64px; bottom: auto; width: auto; max-height: 70vh; }
  .grid thead { display: none; }
  .grid, .grid tbody { display: block; }
  .grid tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 9px 10px; border-bottom: 1px solid #000; }
  .grid tbody tr:nth-child(odd) { background: rgba(88, 55, 26, 0.45); }
  .grid tbody tr:nth-child(even) { background: rgba(60, 37, 18, 0.45); }
  .grid td, .grid tbody tr:nth-child(n) td { display: block; padding: 0; border: 0; background: none; }
  .grid td.cell-date { grid-column: 1 / -1; order: -1; --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font-size: var(--font-caption, 13.538462px); color: var(--muted); }
  .grid td.reward { text-align: right; --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font-size: var(--font-caption, 13.538462px); }
  .grid tr.mail-row td.cell-who { grid-column: 1 / -1; }
  .grid tr.empty-row { display: block; background: transparent; }
}
@media (max-width: 480px) {
  :root { --gutter: 8px; }
  .hero::before { inset: 0 -8px auto; }
  .login-row:first-child .inp { flex: 1 1 0; width: auto; min-width: 0; }
  .banner { margin-top: 110px; }
  .banner-logo { width: 160px; }
  .reg-row { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .reg-hint { margin-left: 0; }
  .btn-ember { --sea-type-font: var(--font-title, 22.153846px); --sea-type-min: 12px; --sea-type-scale: 1; font-size: var(--font-title, 22.153846px); height: 58px; }
  .gazette-head h2 { --sea-type-font: var(--font-display, 27.076923px); --sea-type-min: 12px; --sea-type-scale: 1; font-size: var(--font-display, 27.076923px); }
}
@media (pointer: coarse) {
  .pager button { width: 36px; height: 36px; }
  .sheet-filter select { height: 36px; }
  .p-account dd a { display: inline-block; min-width: 32px; padding: 6px 0; text-align: right; }
}
@media (prefers-reduced-motion: reduce) {
  .slide-img, .btn-gold, .screen-play, .table-wrap[aria-busy="true"], .meter span { transition: none; }
  .view:not([hidden]) { animation: none; }
}

/* ── My account panel (post-login home page, to the right of the slider) ──
   The card sits in a fixed-height row: tight layout + scrolls INSIDE the card if it overflows. */
.captain { gap: 6px; padding: 12px 14px; overflow-y: auto; }
.captain .cc-head { padding-bottom: 8px; }
.captain .cc-stats > div { padding: 5px 0; --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font-size: var(--font-caption, 13.538462px); }
.captain .cc-elite .meter { margin-top: 2px; }
.cc-mail dd { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 6px; min-width: 0; }
.cc-mail-addr { min-width: 0; overflow-wrap: anywhere; font-weight: 600; --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font-size: var(--font-caption, 13.538462px); }
.chip.ok { color: var(--green); }
.chip.warn { color: var(--ember-hi); }
.acct-pending { margin: 8px 0 0; --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font-size: var(--font-caption, 13.538462px); color: var(--ember-hi); overflow-wrap: anywhere; }
.acct-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.acct-actions .btn-small { flex: 1 1 120px; }
.btn-small {
  padding: 7px 10px; border: 1px solid var(--brass-lo); border-radius: 4px; cursor: pointer;
  background: linear-gradient(180deg, #2c2118, #17110b); color: var(--parch); --sea-type-font: var(--font-body, 16px); --sea-type-min: 12px; --sea-type-scale: 1; font: 700 var(--font-body, 16px) var(--f-body);
}
.btn-small:hover { color: var(--brass-hi); border-color: var(--brass); }
.acct-dialog {
  width: min(420px, calc(100vw - 24px)); padding: 0; border: 1px solid var(--brass-lo); border-radius: 8px;
  background: #140d08; color: var(--text); box-shadow: 0 24px 60px rgba(0, 0, 0, .75);
}
.acct-dialog::backdrop { background: rgba(0, 0, 0, .68); }
.acct-dialog form { display: grid; gap: 12px; padding: 20px 22px 18px; }
.acct-dialog h3 { margin: 0; --sea-type-font: var(--font-title, 22.153846px); --sea-type-min: 12px; --sea-type-scale: 1; font: 700 var(--font-title, 22.153846px) var(--f-head, var(--f-body)); color: var(--brass-hi); }
.acct-hint { margin: 0; --sea-type-font: var(--font-body, 16px); --sea-type-min: 12px; --sea-type-scale: 1; font-size: var(--font-body, 16px); color: var(--muted); }
.acct-field { display: grid; gap: 5px; --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font-size: var(--font-caption, 13.538462px); color: var(--muted); }
.acct-field .inp { width: 100%; }
.acct-field[hidden] { display: none; }
.acct-msg { margin: 0; --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font-size: var(--font-caption, 13.538462px); color: var(--red); }
.acct-msg.is-ok { color: var(--green); }
.acct-buttons { display: flex; justify-content: flex-end; gap: 10px; }

/* ── Legal text window (legal.js) ───────────────
   Terms of Use / Privacy Policy open in a nearly full-screen, scrollable
   <dialog>. Parchment background + brass frame: for readability the
   body text uses --f-serif and line length is limited to 72ch. */
.legal-dialog {
  width: min(900px, calc(100vw - 20px));
  max-width: none;
  max-height: min(88vh, 900px);
  padding: 0;
  border: 1px solid var(--brass);
  border-radius: 8px;
  background: linear-gradient(180deg, #1b1208, #120c07);
  color: var(--text);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .8), inset 0 0 0 1px rgba(239, 226, 196, .06);
  overflow: hidden;
}
.legal-dialog[open] { display: flex; flex-direction: column; }
.legal-dialog::backdrop { background: rgba(0, 0, 0, .78); }
/* Do not let the background page scroll (on iOS it slides under the backdrop). */
html.legal-open, html.legal-open body { overflow: hidden; }

.legal-head {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(91, 60, 30, .35), rgba(0, 0, 0, 0));
  flex: 0 0 auto;
}
.legal-head-text { min-width: 0; }
.legal-title { font: 700 clamp(19px, 2.4vw, 26px)/1.15 var(--f-display); color: var(--brass-hi); }
.legal-meta { margin-top: 4px; --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font-size: var(--font-caption, 13.538462px); color: var(--muted); }
.legal-close {
  flex: 0 0 auto; width: 30px; height: 30px; margin-left: auto;
  border: 1px solid var(--brass-lo); border-radius: 4px; cursor: pointer;
  background: linear-gradient(180deg, #2c2118, #17110b); color: var(--parch);
  --sea-type-font: initial;
  font: 400 20px/1 var(--f-body);
}
.legal-close:hover { color: var(--brass-hi); border-color: var(--brass); }

.legal-body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 16px 20px 22px;
  font-family: var(--f-serif); --sea-type-font: var(--font-body, 16px); --sea-type-min: 12px; --sea-type-scale: 1; font-size: var(--font-body, 16px); line-height: 1.6;
  scrollbar-gutter: stable;
}
.legal-body > * { max-width: 72ch; }
.legal-body p { margin: 0 0 10px; }
.legal-body ul { margin: 0 0 12px; padding-left: 20px; }
.legal-body li { margin: 0 0 6px; }
.legal-body strong { color: var(--parch); }

.legal-note {
  padding: 8px 12px; border-left: 3px solid var(--brass);
  background: rgba(201, 151, 63, .08);
  font-family: var(--f-body); --sea-type-font: var(--font-body, 16px); --sea-type-min: 12px; --sea-type-scale: 1; font-size: var(--font-body, 16px); color: var(--muted);
}
.legal-intro { margin-top: 14px; }
.legal-intro p:first-child { color: var(--parch); }

.legal-toc {
  margin: 6px 0 20px; padding: 12px 14px;
  border: 1px solid var(--line-soft); border-radius: 6px;
  background: rgba(0, 0, 0, .28);
  font-family: var(--f-body);
}
.legal-toc-h {
  margin: 0 0 8px !important;
  --sea-type-font: var(--font-caption, 13.538462px);
  --sea-type-min: 10.153846px;
  --sea-type-scale: 1;
  font: 700 var(--font-caption, 13.538462px)/1 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--brass);
}
.legal-toc ol { margin: 0; padding: 0; list-style: none; columns: 2; column-gap: 24px; }
.legal-toc li { margin: 0 0 4px; break-inside: avoid; }
.legal-toc-link {
  padding: 0; border: 0; background: none; cursor: pointer; text-align: left;
  --sea-type-font: var(--font-caption, 13.538462px);
  --sea-type-min: 10.153846px;
  --sea-type-scale: 1;
  font: 400 var(--font-caption, 13.538462px)/1.35 var(--f-body); color: var(--brass-hi);
}
.legal-toc-link:hover { color: var(--parch); text-decoration: underline; }

.legal-sections section { margin-bottom: 22px; scroll-margin-top: 8px; }

/* Imprint identity table. Rows with an empty value are already dropped in legal.js. */
.legal-dl {
  display: grid; grid-template-columns: minmax(140px, 15em) 1fr;
  gap: 4px 16px; margin: 0 0 12px;
  font-family: var(--f-body); --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font-size: var(--font-caption, 13.538462px);
}
.legal-dl dt { color: var(--muted); }
.legal-dl dd { margin: 0; color: var(--parch); }
@media (max-width: 520px) {
  .legal-dl { grid-template-columns: 1fr; gap: 0 0; }
  .legal-dl dt { margin-top: 8px; --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font-size: var(--font-caption, 13.538462px); }
}
.legal-sections h3 {
  margin: 0 0 8px;
  --sea-type-font: var(--font-title, 22.153846px);
  --sea-type-min: 12px;
  --sea-type-scale: 1;
  font: 700 var(--font-title, 22.153846px)/1.25 var(--f-display); color: var(--brass-hi);
  border-bottom: 1px solid var(--line-soft); padding-bottom: 5px;
}

.legal-foot {
  flex: 0 0 auto; display: flex; justify-content: flex-end; gap: 10px;
  padding: 10px 18px 12px; border-top: 1px solid var(--line);
  background: linear-gradient(0deg, rgba(0, 0, 0, .35), rgba(0, 0, 0, 0));
}

/* Links that open the legal text: the consent row in the registration form and the footer. */
.legal-trigger {
  padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; color: var(--brass-hi); text-decoration: underline;
  text-underline-offset: 2px;
}
.legal-trigger:hover { color: var(--parch); }
.check .legal-trigger { font-weight: 700; }

@media (max-width: 640px) {
  .legal-dialog { width: 100vw; max-width: 100vw; max-height: 100vh; height: 100vh; border-radius: 0; border-left: 0; border-right: 0; }
  .legal-toc ol { columns: 1; }
  .legal-body { padding: 14px 16px 20px; --sea-type-font: var(--font-caption, 13.538462px); --sea-type-min: 10.153846px; --sea-type-scale: 1; font-size: var(--font-caption, 13.538462px); }
}

/* Print: only the legal text is printed, entirely in black and white.
   Since printing with "printBackground" off is the normal case for players,
   light-coloured text (--parch, --brass-hi) becomes unreadable on white paper;
   that is why ALL descendant elements are turned black one by one. */
@media print {
  html.legal-open, html.legal-open body { background: #fff !important; overflow: visible; }
  html.legal-open body > *:not(.legal-dialog) { display: none !important; }
  .legal-dialog {
    position: static; max-height: none; height: auto; width: auto; border: 0;
    box-shadow: none; display: block !important;
  }
  .legal-dialog, .legal-dialog * { color: #000 !important; background: #fff !important; }
  .legal-dialog::backdrop { display: none; }
  .legal-head { border-bottom: 1px solid #000; }
  .legal-body { overflow: visible; max-height: none; }
  .legal-body > * { max-width: none; }
  .legal-note { border-left: 2px solid #000; }
  .legal-toc { border: 1px solid #888; }
  .legal-toc-link { text-decoration: none; }
  .legal-sections h3 { border-bottom: 1px solid #888; }
  .legal-sections section { break-inside: auto; }
  .legal-sections h3 { break-after: avoid; }
  .legal-close, .legal-foot { display: none !important; }
}

/* Footer — narrow screen: the three-region row collapses to a single column, the empty left
   balancer is removed and the right block (social + language) is centred. Otherwise
   the `flex: 1` side regions squeezed the middle text on phones. */
@media (max-width: 760px) {
  .foot-row { flex-wrap: wrap; justify-content: center; gap: 10px; }
  .foot-row-side { flex: 0 0 auto; }
  .foot-row-side:not(.foot-row-end) { display: none; }
  .foot-row-end { justify-content: center; width: 100%; }
  .foot-links { order: -1; width: 100%; }
}
