/* Elyndris main site and operators' panel. The game's palette: lantern light on slate.
   lantern = the way in / you, verdigris = good news, blood = harm, crystal = information, bone = text. */
:root {
  --night: #151b26;
  --stone: #1e2633;
  --stone-hi: #2a3444;
  --edge: #3a4658;
  --bone: #e9e0c9;
  --ash: #9097a3;
  --parchment: #d9c79a;
  --lantern: #f2b04e;
  --verdigris: #5fae98;
  --blood: #c0453b;
  --crystal: #7fd6e8;
  --display: "IM Fell English", Georgia, "Times New Roman", serif;
  --ui: "Alegreya Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--night); color: var(--bone); font: 17px/1.55 var(--ui); -webkit-font-smoothing: antialiased; }
a { color: var(--lantern); text-underline-offset: 3px; }
a:hover { color: #ffd08a; }
.hidden { display: none !important; }
.muted { color: var(--ash); }
h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; line-height: 1.1; }
:focus-visible { outline: 2px solid var(--lantern); outline-offset: 2px; }

button, input, select, textarea { font: 500 1rem var(--ui); color: var(--bone); border-radius: 3px; }
input, select, textarea { background: #10151e; border: 1px solid var(--edge); padding: 9px 11px; min-height: 42px; width: 100%;
  box-shadow: inset 0 2px 4px rgba(0,0,0,.5); }
textarea { min-height: 72px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #6c7380; }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; min-height: 42px;
  padding: 8px 16px; border: 1px solid #485569; background: linear-gradient(#2e394a, #222b38); color: var(--bone);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 2px 0 #0a0d13; text-decoration: none; font-weight: 600; }
button:hover:not(:disabled), .button:hover { background: linear-gradient(#36435a, #28323f); color: var(--bone); }
button.primary, .button.primary { color: #2a1a06; border-color: #c88a2e; background: linear-gradient(#f6c46c, #e0982f);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 2px 0 #6e4512; }
button.primary:hover:not(:disabled), .button.primary:hover { background: linear-gradient(#fbd083, #e8a33c); color: #2a1a06; }
button.danger { color: #fff; border-color: #8d2c24; background: linear-gradient(#cf5448, #a6352c); }
button.quiet { background: none; border: none; box-shadow: none; color: var(--ash); padding: 4px 0; min-height: 0; font-weight: 500;
  text-decoration: underline; text-underline-offset: 3px; }
button.quiet:hover:not(:disabled) { background: none; color: var(--bone); }
button.small, .button.small { min-height: 32px; padding: 4px 10px; font-size: .9rem; }
button:disabled { opacity: .4; cursor: default; }
label { display: block; color: var(--ash); font-size: .95rem; margin: 0 0 14px; }
label > input, label > select, label > textarea { display: block; margin-top: 4px; }
.check { display: flex; align-items: center; gap: 8px; color: var(--bone); }
.check input { width: auto; min-height: 0; }
.msg { min-height: 1.4em; margin: .4em 0 0; color: #ef8a7f; }
.msg.good { color: #8fd3bd; }

/* ---------- the top bar ---------- */
.bar { position: relative; z-index: 2; display: flex; align-items: center; gap: 20px; padding: 16px max(16px, 5vw); }
.bar .mark { font-family: var(--display); font-size: 1.7rem; color: var(--lantern); text-decoration: none; text-shadow: 0 2px 0 #000; }
.bar nav { margin-left: auto; display: flex; gap: 18px; align-items: center; }
.bar nav a { color: var(--bone); text-decoration: none; }
.bar nav a:hover { color: var(--lantern); }
.bar nav [data-account] { display: flex; gap: 18px; align-items: center; }
.bar nav .button { color: #2a1a06; }

/* ---------- home: the cave behind the title ---------- */
.home-hero { position: relative; min-height: 88vh; display: flex; flex-direction: column; overflow: hidden; }
.home-hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.home-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(21,27,38,.92) 0%, rgba(21,27,38,.55) 45%, rgba(21,27,38,0) 75%),
              linear-gradient(0deg, var(--night) 0%, rgba(21,27,38,0) 30%); }
.home-hero .bar, .home-hero .pitch { position: relative; z-index: 1; }
.pitch { margin: auto 0; padding: 0 max(16px, 8vw) 10vh; max-width: 760px; }
.pitch h1 { font-size: clamp(3.6rem, 11vw, 7.5rem); color: var(--lantern); line-height: .9;
  text-shadow: 0 0 30px rgba(242,176,78,.35), 0 3px 0 #000; }
.pitch .tagline { font: italic 1.45rem/1.35 var(--display); color: var(--parchment); margin: .8rem 0 1.6rem; max-width: 30ch; text-shadow: 0 1px 2px #000; }
.pitch .row { display: flex; gap: 12px; flex-wrap: wrap; }

.page { width: min(1060px, calc(100% - 32px)); margin: 0 auto; }
.section { padding: 56px 0; border-top: 1px solid rgba(58,70,88,.6); }
.section > h2 { font-size: 2.3rem; margin-bottom: 1.4rem; }

/* what the game is: a run of short entries down two columns, each led by a pixel glyph */
.pillars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 48px; }
.pillar { display: grid; grid-template-columns: 40px 1fr; gap: 0 16px; }
.pillar svg { width: 40px; height: 40px; image-rendering: pixelated; shape-rendering: crispEdges; }
.pillar h3 { font-size: 1.4rem; color: var(--parchment); margin-bottom: .25rem; }
.pillar p { margin: 0; color: #cfc6ae; max-width: 46ch; }

/* realms: the game servers, with live status */
.realms { list-style: none; padding: 0; margin: 0; }
.realm { display: grid; grid-template-columns: 14px 1fr auto; gap: 4px 16px; align-items: center; padding: 16px 0;
  border-bottom: 1px solid rgba(58,70,88,.6); }
.realm .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ash); }
.realm .dot.up { background: var(--verdigris); box-shadow: 0 0 10px rgba(95,174,152,.7); }
.realm .dot.closed { background: var(--lantern); }
.realm h3 { font-size: 1.5rem; }
.realm .meta { grid-column: 2; color: var(--ash); font-size: .95rem; }
.realm .button { grid-column: 3; grid-row: 1 / span 2; }
.tag { display: inline-block; font: 600 .78rem var(--ui); padding: 1px 8px; border-radius: 10px; border: 1px solid var(--edge);
  color: var(--ash); vertical-align: middle; margin-left: 6px; }
.tag.gold { color: var(--lantern); border-color: #8a6a2e; }
.tag.good { color: #0f241d; background: var(--verdigris); border-color: var(--verdigris); }
.tag.bad { color: #fff; background: var(--blood); border-color: var(--blood); }

footer { padding: 40px 0 60px; color: var(--ash); font-size: .9rem; }

/* ---------- sign in, account: one panel on the dark ---------- */
.panel { width: min(460px, calc(100% - 32px)); margin: 6vh auto 40px; padding: 24px 26px; background: rgba(21,27,38,.94);
  border: 1px solid var(--edge); border-top: 2px solid var(--lantern); box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.panel.wide { width: min(720px, calc(100% - 32px)); }
.panel h1 { font-size: 2.2rem; margin-bottom: .4rem; }
.panel h2 { font-size: 1.5rem; margin: 1.6rem 0 .6rem; color: var(--parchment); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--edge); margin: 0 0 18px; }
.tabs button { flex: 1; background: none; border: none; box-shadow: none; border-bottom: 2px solid transparent; border-radius: 0;
  color: var(--ash); margin-bottom: -1px; }
.tabs button:hover:not(:disabled) { background: none; color: var(--bone); }
.tabs button[aria-selected="true"] { color: var(--lantern); border-bottom-color: var(--lantern); }
.perm-list { display: flex; flex-wrap: wrap; gap: 6px; }
.notice { padding: 10px 14px; border-left: 3px solid var(--lantern); background: rgba(242,176,78,.08); margin: 0 0 16px; }

@media (max-width: 760px) {
  .pillars { grid-template-columns: 1fr; }
  .bar nav { gap: 12px; }
  .realm { grid-template-columns: 14px 1fr; }
  .realm .button { grid-column: 2; grid-row: auto; justify-self: start; margin-top: 6px; }
}

/* ---------- Chrono: crystal blue for the currency itself, lantern for the way to pay ---------- */
.chrono-page { padding-bottom: 60px; }
.chrono-head { display: grid; grid-template-columns: 64px 1fr auto; gap: 20px; align-items: center; padding: 30px 0 34px;
  border-bottom: 1px solid rgba(58,70,88,.6); }
.hourglass svg { width: 64px; height: 86px; image-rendering: pixelated; shape-rendering: crispEdges; filter: drop-shadow(0 0 14px rgba(127,214,232,.35)); }
.chrono-head h1 { font-size: 3.2rem; color: var(--crystal); }
.chrono-head .lede { margin: .5rem 0 0; color: #cfc6ae; max-width: 56ch; }
.balance { display: flex; flex-direction: column; align-items: flex-end; }
.balance strong { font: 700 2.4rem/1 var(--ui); color: var(--crystal); font-variant-numeric: lining-nums tabular-nums; }
.section-title { font-size: 1.8rem; margin: 34px 0 14px; }
.offers { list-style: none; padding: 0; margin: 0; }
.offer { display: grid; grid-template-columns: 170px 1fr auto; gap: 18px; align-items: center; padding: 18px 0;
  border-bottom: 1px solid rgba(58,70,88,.6); }
.offer .amount strong { display: block; font: 700 2rem/1 var(--ui); color: var(--crystal); font-variant-numeric: lining-nums; }
.offer .amount span { color: var(--ash); font-size: .9rem; }
.offer h3 { font-size: 1.35rem; color: var(--parchment); }
.offer .price { font-size: 1.15rem; font-weight: 700; }
.offer .pay { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.small-print { font-size: .9rem; margin-top: 18px; }
.order-status { margin: 24px 0 0; padding: 16px 20px; border: 1px solid var(--edge); border-left-width: 4px; background: rgba(30,38,51,.6); }
.order-status h2 { font-size: 1.6rem; margin-bottom: .3rem; }
.order-status p { margin: .3rem 0; }
.order-status.paid { border-left-color: var(--verdigris); }
.order-status.pending { border-left-color: var(--crystal); }
.order-status.cancelled { border-left-color: var(--ash); }
.order-status.failed { border-left-color: var(--blood); }
.ledger td.num { text-align: right; font-variant-numeric: tabular-nums; }
.ledger .plus { color: #8fd3bd; }
.ledger .minus { color: #ef8a7f; }
.panel table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.panel th { text-align: left; font-weight: 600; color: var(--ash); font-size: .85rem; padding: 6px 8px; border-bottom: 1px solid var(--edge); }
.panel td { padding: 8px; border-bottom: 1px solid rgba(58,70,88,.5); }
@media (max-width: 760px) {
  .chrono-head { grid-template-columns: 48px 1fr; }
  .chrono-head .balance { grid-column: 1 / -1; align-items: flex-start; }
  .hourglass svg { width: 48px; height: 64px; }
  .offer { grid-template-columns: 1fr; gap: 6px; }
  .offer .pay { justify-content: flex-start; }
}
.chrono-inline { font: 700 1.5rem var(--ui); font-variant-numeric: lining-nums tabular-nums; color: var(--crystal); }

/* signed in already: who, and the way to switch */
.already { border: 1px solid var(--edge); border-left: 3px solid var(--lantern); padding: 12px 16px; margin-bottom: 18px; background: rgba(13,17,24,.5); }
.already p { margin: 0 0 10px; }
.already .row { display: flex; gap: 8px; flex-wrap: wrap; }
td.manage { white-space: nowrap; text-align: right; }
td.manage .small + .small { margin-left: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#gate .row { display: flex; gap: 8px; flex-wrap: wrap; }
