/* ============================================
   BINDSTONE - the server's sign-in (/bindstone)
   The scene and the knock box have their own styles, inline in bindstone.html (generated by
   tools/bindstone). This file only dresses what the box now holds: the ways in, the email form,
   the game account's name and password, the hearth's account card, and the war / how to play / commands under it. Everything
   borrows the knock's own voice: .gate-ask for questions, .key-input and .key-btn for fields
   and the gold button, .gate-swap for quiet links, .gate-msg for replies.
   ============================================ */

/* ---------- the ways in: Discord first, Google second ---------- */
.bs-ways { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 4px auto 0; }
.bs-discord, .bs-google {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  width: min(360px, 100%); cursor: pointer; border-radius: 12px;
  font-family: var(--font-body); font-weight: 600; letter-spacing: 0.3px;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
.bs-discord {
  min-height: 50px; padding: 12px 22px; border: 0;
  background: #5865f2; color: #fff; font-size: 1.12rem;
  box-shadow: 0 0 22px rgba(88, 101, 242, 0.35);
}
.bs-discord:hover:not(:disabled) { background: #4752c4; box-shadow: 0 0 30px rgba(88, 101, 242, 0.5); transform: translateY(-1px); }
.bs-google {
  min-height: 46px; padding: 10px 22px; border: 1px solid #dadce0;
  background: #f5f5f5; color: #1f1f1f; font-size: 1.02rem;
}
.bs-google:hover:not(:disabled) { background: #fff; transform: translateY(-1px); }
.bs-discord:focus-visible, .bs-google:focus-visible { outline: 2px solid var(--gold-pale); outline-offset: 3px; }
.bs-discord:disabled, .bs-google:disabled { opacity: 0.6; cursor: default; }
.bs-discord-logo { width: 24px; height: 24px; flex: 0 0 auto; }
.bs-google-logo { width: 20px; height: 20px; flex: 0 0 auto; }

/* ---------- email, the quiet fallback ---------- */
.bs-email-form { display: grid; gap: 10px; width: min(420px, 100%); margin: 10px auto 0; }
.bs-email-form .key-input { width: 100%; border-radius: 12px; letter-spacing: 0.5px; }
.bs-email-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: stretch; margin-top: 4px; }
.bs-email-row .key-btn { border-radius: 12px; padding: 12px 22px; }
.bs-quiet-btn {
  background: transparent; border: 1px solid var(--dark-border); border-radius: 12px; cursor: pointer;
  color: var(--text-secondary); font-family: var(--font-heading); font-size: 0.78rem;
  letter-spacing: 2px; text-transform: uppercase; padding: 11px 18px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.bs-quiet-btn:hover:not(:disabled) { color: var(--gold-pale); border-color: rgba(212, 175, 55, 0.5); }
.bs-quiet-btn:disabled, .key-btn:disabled { opacity: 0.55; cursor: default; }

/* ---------- the account (in the knock box) ---------- */
.bs-account { margin-top: 2px; }
.bs-who {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 6px 14px;
  font-family: var(--font-body); font-size: 0.92rem; color: var(--text-dim); margin-bottom: 14px;
}
.bs-who strong { color: var(--gold-pale); font-weight: 600; word-break: break-all; }
.bs-link {
  background: none; border: none; padding: 2px 0; cursor: pointer;
  font-family: var(--font-body); font-size: 0.88rem; color: var(--text-dim); text-decoration: underline;
}
.bs-link:hover { color: var(--gold-pale); }
.bs-code { font-family: var(--font-mono); color: #fff; background: rgba(10, 12, 16, 0.85); padding: 1px 8px; border-radius: 6px; word-break: break-all; }

/* ---------- the hearth (#shell): the inside page, past the stone ----------
   The cards, the greeting line and the buttons are the scene's own (.feed-card, .hello,
   .feed-btn, inline in bindstone.html). This only lays out what is inside them: the account row,
   the steps, the war (realm cards, the field feed, rank-ups), the tips and the command grid. */
#shell { padding-bottom: 40px; }
#shell .feed-card { padding: 22px 24px; margin-bottom: 18px; }
#shell .feed-card h2 { font-size: 1.02rem; letter-spacing: 2.6px; margin-bottom: 14px; }
.bs-line { font-family: var(--font-body); color: var(--text-primary); margin: 0 0 10px; }
#shell .feed-row { margin-bottom: 8px; }
.bs-hello-ways { display: inline-flex; gap: 16px; flex-wrap: wrap; }
#shell a.feed-btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
#shell .bs-code { font-size: 0.88rem; word-break: normal; overflow-wrap: anywhere; white-space: nowrap; }
@media (max-width: 640px) { #shell .bs-code { white-space: normal; } }

/* the account: name and how on the left, the one download on the right; stacked on a phone */
.bs-account-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; }
.bs-name-line { font-size: 1.08rem; margin-bottom: 6px; }
#shell .bs-account-how { margin: 0; font-size: 0.95rem; line-height: 1.55; color: var(--text-secondary); }
#shell .bs-account-how .bs-link { font-size: 0.95rem; color: var(--gold); text-underline-offset: 3px; margin-left: 4px; }
#shell .bs-account-how .bs-link:hover { color: var(--gold-pale); }

/* getting in: the four steps, then the fine print */
.bs-steps, .bs-tips { padding-left: 22px; font-family: var(--font-body); color: var(--text-secondary); line-height: 1.65; margin: 0; }
.bs-steps li, .bs-tips li { margin-bottom: 8px; }
.bs-steps li::marker { color: var(--gold); font-family: var(--font-heading); }
.bs-steps b, .bs-tips b { color: var(--gold-pale); font-weight: 600; }
.bs-steps a { color: var(--gold-pale); }
#shell .bs-fine { margin-top: 12px; line-height: 1.55; }

/* the war: the status line, one card per realm, then the feed and the rank-ups */
.bs-status-line { display: flex; align-items: center; gap: 10px; font-family: var(--font-body); font-size: 1.05rem; color: var(--text-primary); }
.bs-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--text-dim); flex: 0 0 auto; }
.bs-dot.bs-on { background: #5cb87a; box-shadow: 0 0 10px rgba(92, 184, 122, 0.65); }
/* "Wake the Bindstone": the knock box's gold button under the status line, when the realm sleeps. */
.bs-wake { margin: 12px 0 2px; }
#shell .bs-wake .key-btn { border-radius: 10px; padding: 11px 18px; font-size: 0.78rem; letter-spacing: 1.5px; white-space: nowrap; }
#shell .bs-wake .gate-msg { margin: 8px 0 0; }
/* Bindstone's tagline under a box's title, the first-visit welcome and the fan-server disclaimer. */
.bs-tagline { margin: -6px 0 14px; font-family: var(--font-body); font-size: 0.92rem; color: var(--text-dim, #9a9382); text-align: center; letter-spacing: 0.02em; }
.bs-tagline .bs-link { font-size: inherit; }
.bs-welcome-list { margin: 6px 0 16px; padding-left: 1.1em; display: grid; gap: 9px; font-family: var(--font-body); font-size: 1rem; line-height: 1.5; text-align: left; }
.bs-welcome-list b { color: var(--gold-pale); font-weight: 600; }
.bs-welcome-go { justify-content: center; }
.bs-disclaimer { margin: 16px 0 0; font-family: var(--font-body); font-size: 0.78rem; line-height: 1.45; color: var(--text-dim, #9a9382); text-align: center; }

/* The awakening (the knock box, right after a sign-in while the realm sleeps): a gold bar that fills
   as the server boots and the world loads, with a slow shimmer so a long load still looks alive. */
.bs-awaken { margin: 6px 0 4px; }
.bs-awaken-title { margin-bottom: 14px; }
.bs-awaken-bar {
  position: relative; height: 10px; border-radius: 6px; overflow: hidden;
  background: rgba(10, 12, 16, 0.7); border: 1px solid var(--dark-border);
}
.bs-awaken-fill {
  position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 6px;
  background: linear-gradient(90deg, #8a6a2a, var(--gold), var(--gold-pale));
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.55);
  transition: width 1.2s ease;
}
.bs-awaken-fill::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: translateX(-100%); animation: bs-shimmer 2.2s ease-in-out infinite;
}
.bs-awaken.bs-done .bs-awaken-fill { background: linear-gradient(90deg, #3f8a5a, #5cb87a, #a9e8bf); box-shadow: 0 0 12px rgba(92, 184, 122, 0.6); }
.bs-awaken.bs-done .bs-awaken-fill::after, .bs-awaken.bs-failed .bs-awaken-fill::after { animation: none; }
.bs-awaken-step { margin: 10px 0 8px; min-height: 1.4em; }
#bs-awaken-again { margin-top: 10px; }
@keyframes bs-shimmer { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) {
  .bs-awaken-fill { transition: none; }
  .bs-awaken-fill::after { animation: none; }
}
.bs-realms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.bs-realm { border: 1px solid var(--dark-border); border-radius: 8px; padding: 12px 14px; background: rgba(10, 12, 16, 0.55); min-width: 0; }
#shell .bs-realm h3 { margin: 0 0 8px; font-size: 0.82rem; letter-spacing: 2px; }
.bs-realm dl {
  margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px;
  font-family: var(--font-body); font-size: 0.95rem; font-variant-numeric: tabular-nums;
}
.bs-realm dt { color: var(--text-dim); }
.bs-realm dd { margin: 0; text-align: right; color: var(--text-primary); }
#shell .bs-sub-h { margin: 20px 0 8px; font-size: 0.72rem; letter-spacing: 2.4px; color: var(--text-dim); }
.bs-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-family: var(--font-body); }
.bs-feed li { display: grid; grid-template-columns: 5.2em minmax(0, 1fr); gap: 10px; font-size: 0.98rem; line-height: 1.4; color: var(--text-secondary); }
.bs-feed time { color: var(--text-dim); font-size: 0.85rem; font-variant-numeric: tabular-nums; padding-top: 2px; white-space: nowrap; }
.bs-rr { color: var(--gold-pale); }
#shell .bs-checked { margin-top: 16px; }
#shell .bs-alb h3, .bs-feed .bs-alb { color: #f87171; }
#shell .bs-mid h3, .bs-feed .bs-mid { color: #60a5fa; }
#shell .bs-hib h3, .bs-feed .bs-hib { color: #5cb87a; }

/* the commands: two columns of command and meaning, grouped; one column on a phone */
.bs-cmds { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 0 28px; }
#shell .bs-cmd-group { grid-column: 1 / -1; margin: 14px 0 4px; font-size: 0.72rem; letter-spacing: 2.4px; color: var(--text-dim); }
#shell .bs-cmd-group:first-child { margin-top: 0; }
.bs-cmd {
  display: grid; grid-template-columns: 13em minmax(0, 1fr); gap: 12px; padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05); font-family: var(--font-body); font-size: 0.98rem; color: var(--text-secondary);
}
.bs-cmd code { font-family: var(--font-mono); font-size: 0.86rem; color: var(--gold-pale); overflow-wrap: anywhere; }
#shell .bs-app-note { margin-top: 14px; }

.key-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }
.key-btn:focus-visible { outline: 2px solid var(--gold-pale); outline-offset: 3px; }

/* ---------- the game account: a name and a password of the player's own ----------
   The create step in the knock box and the hearth's "Change game password", both in the knock's
   own fields (.key-input), gold button (.key-btn), reply line (.gate-msg) and note (.key-note),
   stacked in one column. A field the rules refuse wears the reply line's red edge. */
.bs-create-grid, .bs-pass-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.bs-create-grid { width: min(420px, 100%); margin: 4px auto 0; }
.bs-create-grid .key-input, .bs-pass-form .key-input { width: 100%; letter-spacing: 0.5px; }
.bs-create-grid .key-btn, .bs-pass-form .key-btn { padding: 13px 20px; border-radius: 12px; }
.knock-modal .bs-create .key-note { width: min(420px, 100%); margin-left: auto; margin-right: auto; }
.key-input[aria-invalid="true"] { border-color: #d98f8f; }
.key-input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(217, 143, 143, 0.18); }

/* the hearth's password change: quiet until its link is pressed */
#shell .bs-pass-form { width: 100%; max-width: 420px; margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--dark-border); }
#shell .bs-pass-form .key-input { border-radius: 10px; font-size: 0.98rem; padding: 10px 12px; }
#shell .bs-pass-form .key-btn { border-radius: 10px; font-size: 0.78rem; }
#shell .bs-pass-form .key-note { margin: 0; }
#shell .bs-pass-section .gate-msg { margin: 6px 0 0; }
#shell .bs-pass-section .gate-msg:empty { min-height: 0; margin: 0; }

@media (max-width: 640px) {
  #shell .feed-card { padding: 18px 16px; }
  #shell .feed-btn { white-space: normal; max-width: 100%; }
  .bs-account-row { grid-template-columns: 1fr; gap: 12px; }
  #shell .bs-download { width: 100%; }
  .bs-realms { grid-template-columns: 1fr; gap: 10px; }
  .bs-realm dl { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; gap: 3px 10px; }
  .bs-realm dd { padding-right: 6px; }
  .bs-cmd { grid-template-columns: 8.5em minmax(0, 1fr); }
  .bs-feed li { grid-template-columns: 4.8em minmax(0, 1fr); }
}

/* On a phone the inscription runs the full width of the box, under the corner X; it keeps clear of it. */
@media (max-width: 760px) { .knock-modal .inscription { padding: 0 22px; } }

/* ---------- the hearth's war room (owner's mock, 2026-10-16) ----------
   How to: one card with four tabs. The war: the war ground with its lock, each realm's keep order and raid
   under its card. Realm points this week: the board with its All / Players / Bots switch, your own row lit. */
.bs-visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.bs-tabs, .bs-toggle { display: flex; flex-wrap: wrap; gap: 8px; }
.bs-tabs { margin: 0 0 16px; }
.bs-tab {
  padding: 8px 18px; border: 1px solid rgba(212, 175, 55, 0.35); border-radius: 0; background: transparent; cursor: pointer;
  font-family: var(--font-heading); font-size: 0.72rem; letter-spacing: 2.4px; text-transform: uppercase; color: var(--text-secondary);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.bs-tab:hover { color: var(--text-primary); }
.bs-tab:focus-visible { outline: 2px solid var(--gold-pale); outline-offset: 2px; }
.bs-tab.bs-tab-on { border-color: var(--gold); color: var(--gold-pale); background: #17120a; }
.bs-panel[hidden] { display: none; }
#shell .bs-panel-lead { margin: 0 0 10px; }
.bs-helper { display: grid; gap: 0; }
.bs-hrow {
  display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 12px; padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05); font-family: var(--font-body); font-size: 0.98rem; line-height: 1.5; color: var(--text-secondary);
}
.bs-hrow > b { font-family: var(--font-heading); font-size: 0.8rem; letter-spacing: 1.5px; color: var(--gold-pale); font-weight: 600; padding-top: 2px; }
.bs-hrow span b { color: var(--text-primary); font-weight: 600; }
.bs-night-steps { margin-bottom: 4px; }

/* the war ground: where the war is, who called it and when it may move again */
.bs-ground {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 18px;
  margin: 16px 0 0; padding: 12px 14px; border: 1px solid rgba(212, 175, 55, 0.4); border-radius: 8px; background: rgba(10, 12, 16, 0.55);
}
.bs-ground[hidden] { display: none; }
.bs-ground-big { font-family: var(--font-heading); letter-spacing: 1.8px; font-size: 1rem; color: var(--gold-pale); }
.bs-ground-big b { color: var(--gold); font-weight: 600; }
.bs-ground-lock { font-family: var(--font-body); color: var(--text-dim); font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.bs-order { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, 0.06); font-family: var(--font-body); font-size: 0.95rem; line-height: 1.45; color: var(--text-primary); }
.bs-order + .bs-order { border-top: 0; padding-top: 0; }
.bs-order b { color: var(--gold-pale); font-weight: 600; }
.bs-order .bs-quiet { color: var(--text-dim); }

/* realm points this week */
.bs-board-top { display: flex; justify-content: space-between; align-items: center; gap: 10px 12px; flex-wrap: wrap; margin-bottom: 10px; }
#shell .bs-week-since { margin: 0; }
.bs-toggle { gap: 6px; }
.bs-toggle .bs-tab { padding: 5px 12px; font-size: 0.66rem; }
.bs-board-wrap { overflow-x: auto; }
.bs-board { width: 100%; border-collapse: collapse; font-family: var(--font-body); font-size: 0.98rem; font-variant-numeric: tabular-nums; color: var(--text-primary); }
.bs-board th {
  text-align: left; font-family: var(--font-heading); font-weight: 400; letter-spacing: 2px; text-transform: uppercase;
  font-size: 0.66rem; color: var(--text-dim); padding: 6px 8px; border-bottom: 1px solid var(--dark-border); white-space: nowrap;
}
.bs-board td { padding: 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.bs-board .bs-num { text-align: right; }
.bs-board tr[hidden] { display: none; }
.bs-board tr.bs-me td { background: #17120a; color: var(--gold-pale); }
.bs-board .bs-alb { color: #f87171; }
.bs-board .bs-mid { color: #60a5fa; }
.bs-board .bs-hib { color: #5cb87a; }
.bs-tag { font-family: var(--font-heading); letter-spacing: 1.4px; text-transform: uppercase; font-size: 0.6rem; padding: 2px 7px; border: 1px solid; border-radius: 3px; white-space: nowrap; }
.bs-tag-player { color: var(--gold-pale); border-color: rgba(212, 175, 55, 0.5); }
.bs-tag-gamebot { color: var(--text-secondary); border-color: #3a4150; }
.bs-tag-crew { color: #5cb87a; border-color: #2f6b52; }
#shell .bs-week-empty, #shell .bs-week-last { margin: 10px 0 0; }
.bs-week-last .bs-alb { color: #f87171; } .bs-week-last .bs-mid { color: #60a5fa; } .bs-week-last .bs-hib { color: #5cb87a; }

@media (max-width: 640px) {
  .bs-hrow { grid-template-columns: 1fr; gap: 2px; }
  .bs-tab { padding: 8px 12px; letter-spacing: 1.6px; }
  .bs-board { font-size: 0.88rem; }
  .bs-board th, .bs-board td { padding: 6px 2px; }
  .bs-board th { letter-spacing: 0.5px; font-size: 0.6rem; white-space: normal; }
  .bs-tag { letter-spacing: 0.5px; padding: 1px 4px; font-size: 0.56rem; }
}
