/* RO World Manager — styles. Light theme by default, dark via [data-theme="dark"]. */
:root {
  --bg: #f4f6fb;
  --bg-2: #eef1f7;
  --surface: #ffffff;
  --surface-2: #f3f5fa;
  --line: #dfe3ec;
  --line-2: #cfd5e1;
  --text: #182033;
  --muted: #5f6b82;
  --accent: #f59e0b;
  --accent-ink: #231500;
  --accent-text: #b45309;
  --accent-soft: #fff4dc;
  --ok: #15803d;
  --bad: #dc2626;
  --warn: #b45309;
  --info: #2563eb;
  --premium: #7c3aed;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 20px 50px rgba(16, 24, 40, 0.18);
  --c-amber: #d97706; --c-red: #dc2626; --c-blue: #2563eb; --c-green: #16a34a;
  --c-purple: #7c3aed; --c-pink: #db2777; --c-gray: #64748b;
  --radius: 14px;
  --font: "Kanit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0e131d;
  --bg-2: #141a26;
  --surface: #182030;
  --surface-2: #1f293b;
  --line: #2a3448;
  --line-2: #38445c;
  --text: #edf1f7;
  --muted: #9aa6bb;
  --accent: #f5a524;
  --accent-ink: #1b1100;
  --accent-text: #fbbf4b;
  --accent-soft: #2e2512;
  --ok: #4ade80;
  --bad: #f87171;
  --warn: #fbbf24;
  --info: #60a5fa;
  --premium: #c4a1ff;
  --shadow: none;
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
  --c-amber: #fbbf24; --c-red: #f87171; --c-blue: #60a5fa; --c-green: #4ade80;
  --c-purple: #c084fc; --c-pink: #f472b6; --c-gray: #94a3b8;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 300;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3 { font-weight: 600; line-height: 1.2; margin: 0 0 0.5em; }
p { margin: 0 0 0.75em; }
strong { font-weight: 600; }
.mono { font-family: var(--mono); font-size: 0.9em; }
.muted { color: var(--muted); }
.center { text-align: center; padding: 48px 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.boot { display: grid; place-content: center; justify-items: center; gap: 6px; min-height: 100vh; color: var(--muted); text-align: center; padding: 0 16px; }
.boot h1 { margin: 0; font-size: 12px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; }
.boot p { margin: 0; max-width: 44ch; font-size: 12px; opacity: .7; }
code { font-family: var(--mono); background: var(--bg-2); padding: 1px 6px; border-radius: 5px; font-size: 0.9em; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 20px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: 0.01em; }
.brand-logo { display: inline-flex; width: 34px; height: 34px; flex: none; color: var(--text); }
.brand-logo svg { width: 100%; height: 100%; display: block; }
.bl-body { fill: currentColor; }
.bl-cut { fill: none; stroke: var(--surface); stroke-width: 4; }
.bl-gem { fill: var(--accent); }
.brand-name { font-family: "Barlow Condensed", var(--font); font-weight: 700; font-size: 22px; letter-spacing: 0.1em; line-height: 1; text-transform: uppercase; }
.brand-name .brand-sub { color: var(--accent-text); }
.topnav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.nav-link { text-decoration: none; color: var(--muted); font-weight: 400; }
.nav-link:hover { color: var(--text); }
.lang select { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 14px; }
.theme-toggle { width: 34px; height: 34px; padding: 0; border-radius: 8px; }
.user-chip { display: inline-flex; }
.avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.avatar-fallback { display: inline-grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }

/* ---------- layout ---------- */
.main { max-width: 760px; margin: 0 auto; padding: 32px 16px 80px; }
.main-wide { max-width: 1100px; }
.main-full { max-width: 1480px; }
.page-title { font-size: clamp(26px, 4vw, 34px); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-top: 20px; box-shadow: var(--shadow); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 500;
  text-decoration: none; cursor: pointer; transition: transform 0.08s, background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--muted); background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, white); border-color: var(--accent); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { border-color: var(--line); }
.btn-danger { background: transparent; color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.btn-danger:hover { background: color-mix(in srgb, var(--bad) 10%, transparent); border-color: var(--bad); }
.btn-sm { padding: 6px 11px; font-size: 14px; }
.btn-xs { padding: 2px 8px; font-size: 13px; border-radius: 7px; }
.btn-lg { padding: 13px 24px; font-size: 17px; }
.link-btn { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: 0; margin-bottom: 12px; }
.link-btn:hover { color: var(--text); }

/* ---------- landing ---------- */
.hero { padding: 56px 0 32px; max-width: 760px; }
.eyebrow { color: var(--accent-text); font-weight: 500; letter-spacing: 0.03em; font-size: 14px; margin-bottom: 4px; }
.hero h1 { font-size: clamp(34px, 6vw, 58px); font-weight: 700; letter-spacing: -0.01em; }
.lead { font-size: clamp(17px, 2.2vw, 20px); color: var(--muted); max-width: 640px; }
.hero-cta { margin-top: 28px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-top: 28px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.feature h3 { font-size: 18px; color: var(--accent-text); }
.feature p { color: var(--muted); margin: 0; }
.pricing-note { margin-top: 28px; color: var(--muted); border-top: 1px dashed var(--line-2); padding-top: 20px; }

/* ---------- notices ---------- */
.notice { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); padding: 10px 14px; border-radius: 10px; }
.error { color: var(--bad); }
.soon { color: var(--muted); font-size: 14px; margin-top: 12px; }
.soon::before { content: "◷ "; color: var(--accent-text); }
.soon-card { text-align: center; padding: 48px 22px; }
.warn-text { color: var(--warn); font-size: 14px; }

/* ---------- badges & tags ---------- */
.badge {
  display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 500;
  border: 1px solid var(--line-2); background: var(--surface-2); white-space: nowrap; color: var(--text);
}
.badge-owner { color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 50%, transparent); background: var(--accent-soft); }
.badge-admin { color: var(--info); border-color: color-mix(in srgb, var(--info) 40%, transparent); }
.badge-free { color: var(--muted); }
.badge-premium { color: var(--premium); border-color: color-mix(in srgb, var(--premium) 45%, transparent); }
.badge-expired { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.badge-field-main { color: var(--c-amber); }
.badge-field-sub { color: var(--c-blue); }
.badge-style-atk { color: var(--c-red); }
.badge-style-def { color: var(--c-green); }
.badge-style-flex { color: var(--c-purple); }
.tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 1px 9px; border-radius: 6px; font-size: 12.5px; font-weight: 500;
  border: 1px solid currentColor; background: color-mix(in srgb, currentColor 10%, transparent);
}
.tag-amber { color: var(--c-amber); } .tag-red { color: var(--c-red); } .tag-green { color: var(--c-green); }
.tag-blue { color: var(--c-blue); } .tag-purple { color: var(--c-purple); } .tag-pink { color: var(--c-pink); } .tag-gray { color: var(--c-gray); }
.tag-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-picker .tag { cursor: pointer; padding: 6px 10px; }
.tag-picker input { accent-color: currentColor; }
.tag-editor { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; }
.tag-editor li { display: flex; justify-content: space-between; align-items: center; }
.tag-add { display: grid; grid-template-columns: 1fr 120px auto; gap: 8px; }

/* ---------- dashboard ---------- */
.guild-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.guild-card {
  display: block; text-decoration: none; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; transition: border-color 0.15s, transform 0.15s; box-shadow: var(--shadow);
}
.guild-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.guild-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.guild-card h3 { font-size: 19px; margin: 0; overflow-wrap: anywhere; }
.guild-card p { margin: 6px 0 12px; }

/* ---------- forms ---------- */
.create-card h2 { font-size: 20px; }
.field { display: grid; gap: 6px; margin: 0 0 16px; border: 0; padding: 0; min-width: 0; }
.field > span { font-weight: 500; font-size: 15px; }
input:not([type]), input[type="text"], input[type="search"], input[type="email"], input[type="url"], select, textarea {
  width: 100%; background: var(--surface); color: var(--text); border: 1px solid var(--line-2);
  border-radius: 10px; padding: 10px 12px; font: inherit; font-weight: 400;
}
textarea { resize: vertical; min-height: 64px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
input:disabled { opacity: 0.6; background: var(--surface-2); }
.slug-input { display: flex; align-items: stretch; }
.slug-prefix {
  display: grid; place-items: center; padding: 0 10px; background: var(--surface-2); border: 1px solid var(--line-2);
  border-right: 0; border-radius: 10px 0 0 10px; color: var(--muted); font-family: var(--mono); font-size: 14px;
}
.slug-input input { border-radius: 0 10px 10px 0; font-family: var(--mono); }
.help { color: var(--muted); font-size: 13px; }
.help-ok { color: var(--ok); }
.help-bad { color: var(--bad); }
.segmented { display: flex; gap: 8px; flex-wrap: wrap; }
.segmented label {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; font-weight: 400;
}
.segmented label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.segmented input { accent-color: var(--accent); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 400; margin: 4px 0 8px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.check.readonly { cursor: default; opacity: 0.85; }
.narrow { max-width: 420px; margin-left: auto; margin-right: auto; }

/* ---------- guild workspace ---------- */
.back { text-decoration: none; font-size: 14px; display: inline-block; margin-bottom: 10px; }
.guild-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tabs { display: flex; gap: 4px; margin-top: 20px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tab { padding: 10px 16px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 400; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent-text); border-bottom-color: var(--accent); font-weight: 500; }
.member-list { list-style: none; padding: 0; margin: 0; }
.member-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.member-list li:last-child { border-bottom: 0; }
.member-row { display: flex; align-items: center; gap: 12px; }
.member-info { display: grid; flex: 1; min-width: 0; }
.member-info span { font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 14px; margin: 10px 0 0 48px; font-size: 14px; }
.member-actions { display: flex; gap: 8px; margin: 6px 0 0 48px; }
.invite-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.invite-link { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 12px; }
.invite-link input { font-size: 13px; }
.invite-card h1 { font-size: clamp(26px, 5vw, 38px); }
.danger-card { border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.danger-card h2 { color: var(--bad); }

/* ---------- modal & toast ---------- */
.modal {
  width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); overflow: auto;
  background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 16px;
  padding: 24px 22px 20px; box-shadow: var(--shadow-lg);
}
.modal-wide { width: min(800px, calc(100vw - 24px)); }
.modal::backdrop { background: rgba(10, 14, 22, 0.55); backdrop-filter: blur(2px); }
.modal h2 { font-size: 20px; padding-right: 28px; }
.modal-close {
  position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 8px;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); font-size: 20px; cursor: pointer; line-height: 1;
}
.modal-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 16px; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px; z-index: 100;
  transition: opacity 0.2s, transform 0.2s; box-shadow: var(--shadow-lg); max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-bad { background: var(--bad); color: #fff; }

/* ---------- roster ---------- */
.roster-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin: 20px 0 12px; }
.roster-head h2 { margin: 0; }
.roster-head p { margin: 2px 0 0; }
.roster-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.filters { display: grid; grid-template-columns: 2fr repeat(6, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.filters input, .filters select { padding: 8px 10px; font-size: 14px; }
.roster-summary { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; margin: 6px 2px 10px; }
.roster-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.roster-row {
  display: grid; grid-template-columns: minmax(150px, 1.2fr) minmax(140px, 1.6fr) minmax(0, 2fr) auto; gap: 10px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; box-shadow: var(--shadow);
}
.roster-row.inactive { opacity: 0.55; }
.roster-list .empty { padding: 24px; text-align: center; }
.r-main { display: grid; min-width: 0; }
.r-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-cls { color: var(--accent-text); font-size: 14px; }
.r-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.r-contact { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; min-width: 0; }
.r-note { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

/* ---------- member self-service ---------- */
.self-head { margin-bottom: 18px; }
.action-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.action-card {
  display: grid; gap: 6px; text-align: left; padding: 18px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); color: var(--text); font: inherit; cursor: pointer;
  transition: border-color 0.15s, transform 0.15s; box-shadow: var(--shadow);
}
.action-card:hover:not(:disabled):not(.disabled) { border-color: var(--accent); transform: translateY(-2px); }
.action-card:disabled, .action-card.disabled { opacity: 0.5; cursor: default; }
.action-card strong { font-size: 17px; }
.action-icon { font-size: 24px; }
.pick-list { list-style: none; padding: 0; margin: 12px 0 0; max-height: 55vh; overflow: auto; display: grid; gap: 6px; }
.pick-list button {
  width: 100%; text-align: left; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font: inherit; cursor: pointer;
}
.pick-list button:hover { border-color: var(--accent); }
.pin-input { font-family: var(--mono); font-size: 26px; letter-spacing: 0.4em; text-align: center; }
.big-check { font-size: 44px; color: var(--ok); margin: 0; }
.guild-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.link-discord { border-color: #5865f2; color: #5865f2; } .link-line { border-color: #06c755; color: #06a64a; }
.link-facebook { border-color: #1877f2; color: #1877f2; } .link-website { border-color: var(--accent); color: var(--accent-text); }
.lineup-section { margin-top: 28px; }
.lineup-section h2 { font-size: 22px; }
.view-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.view-head input { flex: 1; min-width: 180px; padding: 9px 12px; }

/* ---------- tactical board ---------- */
.board-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 18px 0 10px; }
.board-stats { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.board-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.board-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pub-status { font-size: 13px; font-weight: 500; }
.pub-ok { color: var(--ok); }
.pub-dirty { color: var(--warn); }
.mode-tabs { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 3px; }
.mode-tabs button { border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 500; padding: 7px 16px; border-radius: 9px; cursor: pointer; }
.mode-tabs button.active { background: var(--accent); color: var(--accent-ink); }

.board-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 14px; align-items: start; }
.board-layout:has(> .raids:only-child) { grid-template-columns: 1fr; }
.pool {
  position: sticky; top: 64px; max-height: calc(100vh - 80px); display: flex; flex-direction: column; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow);
}
.pool-h { display: flex; justify-content: space-between; }
.pool input, .pool select { padding: 7px 9px; font-size: 13.5px; }
.pool-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pool-list { overflow: auto; display: grid; gap: 5px; align-content: start; min-height: 80px; }
.pool-empty { padding: 12px 4px; font-size: 14px; }
.pool-item.selected .chip { outline: 2px solid var(--accent); }
.raids { display: grid; gap: 14px; min-width: 0; }
.add-raid-row { display: flex; justify-content: center; }

.chip {
  display: grid; gap: 0; min-width: 0; width: 100%; padding: 4px 7px 4px 8px; border-radius: 7px;
  background: var(--cls-bg); border: 1px solid var(--cls-bd); border-left: 4px solid var(--cls);
  cursor: pointer; user-select: none; -webkit-user-select: none; color: var(--text);
}
/* --cls-bg / --cls-bd are set inline as #rrggbbaa so image export (html2canvas) can read them */
.chip[draggable="true"] { cursor: grab; }
.chip-inactive { opacity: 0.5; }
.chip-hl { outline: 3px solid var(--accent); outline-offset: 1px; }
.chip-name { font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.35; }
.chip-flags { font-size: 11px; }
.chip-meta { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }

.raid {
  --raid: var(--accent); --raid-soft: rgba(245, 158, 11, 0.10); --raid-line: rgba(245, 158, 11, 0.40);
  container-type: inline-size;
  background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--raid);
  border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); min-width: 0;
}
.raid-amber { --raid: var(--c-amber); --raid-soft: rgba(245, 158, 11, 0.10); --raid-line: rgba(245, 158, 11, 0.40); }
.raid-red { --raid: var(--c-red); --raid-soft: rgba(239, 68, 68, 0.09); --raid-line: rgba(239, 68, 68, 0.38); }
.raid-blue { --raid: var(--c-blue); --raid-soft: rgba(59, 130, 246, 0.09); --raid-line: rgba(59, 130, 246, 0.38); }
.raid-green { --raid: var(--c-green); --raid-soft: rgba(34, 197, 94, 0.09); --raid-line: rgba(34, 197, 94, 0.38); }
.raid-purple { --raid: var(--c-purple); --raid-soft: rgba(139, 92, 246, 0.09); --raid-line: rgba(139, 92, 246, 0.38); }
.raid-pink { --raid: var(--c-pink); --raid-soft: rgba(236, 72, 153, 0.09); --raid-line: rgba(236, 72, 153, 0.38); }
.raid-gray { --raid: var(--c-gray); --raid-soft: rgba(100, 116, 139, 0.10); --raid-line: rgba(100, 116, 139, 0.38); }
.raid-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.raid-collapse { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 15px; padding: 0 2px; }
.raid-title { display: grid; line-height: 1.2; margin-right: 4px; }
.raid-guild { font-size: 11px; color: var(--muted); letter-spacing: 0.02em; }
.raid-title strong { color: var(--raid); font-size: 19px; }
.raid-tools { margin-left: auto; display: flex; gap: 6px; }
.raid-note {
  background: var(--raid-soft); border: 1px solid var(--raid-line);
  border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; font-size: 14px; line-height: 1.5;
}
.raid-note-h { display: block; font-weight: 600; font-size: 12px; color: var(--raid); margin-bottom: 2px; }
.raid-note-add { margin: 0 0 10px; font-size: 14px; color: var(--accent-text); }
.parties { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
@container (min-width: 560px) { .parties { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@container (min-width: 1000px) { .parties { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
.party { display: grid; gap: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 5px; align-content: start; min-width: 0; }
.party-h { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--muted); font-weight: 500; padding: 0 2px; }
.party-warn { color: var(--warn); }
.slot {
  position: relative; display: flex; align-items: center; gap: 2px; min-height: 38px; border-radius: 7px;
  border: 1px dashed var(--line-2); padding: 1px; cursor: pointer; transition: border-color 0.12s, background 0.12s; min-width: 0;
}
.slot:hover { border-color: var(--muted); }
.slot.filled { border-style: solid; border-color: transparent; }
.slot.selected .chip { outline: 2px solid var(--accent); }
.slot-lead { background: var(--raid-soft); }
.slot-role { font-size: 11px; width: 14px; text-align: center; flex-shrink: 0; }
.slot-empty { color: var(--muted); font-size: 11px; padding-left: 4px; }
.slot .chip { flex: 1; }
.slot-x {
  position: absolute; top: -6px; right: -6px; width: 19px; height: 19px; border-radius: 50%; z-index: 1;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); font-size: 12px; line-height: 1;
  cursor: pointer; display: none;
}
.slot:hover .slot-x, .slot.selected .slot-x { display: block; }
.is-exporting .slot-x, .is-exporting .slot-empty { display: none !important; }
.pick-bar {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 50;
  display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 16px; border-radius: 999px;
  background: var(--surface); border: 2px solid var(--accent); box-shadow: var(--shadow-lg); max-width: calc(100vw - 24px);
}
.pick-bar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.color-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { cursor: pointer; position: relative; }
.swatch input { position: absolute; opacity: 0; }
.swatch span { display: block; width: 30px; height: 30px; border-radius: 8px; background: var(--raid); border: 3px solid transparent; }
.swatch input:checked + span { border-color: var(--text); }
.tpl-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.tpl-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.tpl-list li > div:first-child { display: grid; min-width: 0; }
.imp-list { max-height: 46vh; overflow-y: auto; gap: 6px; }
.imp-list li { padding: 8px 10px; }
.tpl-list .muted { font-size: 13px; }
.tpl-actions { display: flex; gap: 6px; flex-shrink: 0; }
.more-list { display: grid; gap: 8px; }
.more-list .btn { justify-content: flex-start; }

/* ---------- history ---------- */
.log-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 20px 0 12px; }
.log-head h2 { margin: 0; }
.log-head select { width: auto; }
.log-day { font-size: 13px; color: var(--muted); font-weight: 500; margin: 16px 0 6px; }
.log-list { list-style: none; padding: 0; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.log-list li { display: grid; grid-template-columns: 52px 22px minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 9px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.log-list li:last-child { border-bottom: 0; }
.log-time { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.log-actor { font-weight: 500; }
.log-member { color: var(--info); }

@media (max-width: 1000px) {
  .board-layout { grid-template-columns: 200px minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .board-layout { grid-template-columns: 1fr; }
  .pool { position: static; max-height: 40vh; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters input[type="search"] { grid-column: 1 / -1; }
  .roster-row { grid-template-columns: 1fr auto; }
  .r-badges, .r-contact { grid-column: 1 / -1; }
  .roster-row .r-edit { grid-row: 1; grid-column: 2; }
}
@media (max-width: 560px) {
  .topbar { padding: 8px 12px; }
  .brand span:last-child { display: none; }
  .topnav { flex-wrap: nowrap; gap: 6px; }
  .topnav .nav-link { display: none; }
  .lang select { max-width: 104px; }
  .main { padding-top: 22px; padding-left: 12px; padding-right: 12px; }
  .hero { padding-top: 30px; }
  .card { padding: 16px; }
  .grid-2 { grid-template-columns: 1fr; }
  .perm-grid, .member-actions { margin-left: 0; }
  .tag-add { grid-template-columns: 1fr 100px auto; }
  .raid { padding: 8px; }
  .slot { min-height: 34px; }
  .slot.filled .slot-x { display: block; }
  .action-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .action-card { padding: 12px 8px; text-align: center; justify-items: center; gap: 4px; }
  .action-card strong { font-size: 13.5px; line-height: 1.25; }
  .action-card .muted { display: none; }
  .action-icon { font-size: 22px; }
  .log-list li { grid-template-columns: 44px 18px minmax(0, 1fr); padding: 8px 10px; }
}

/* guild workspace: same page width on every tab so the header and tabs never jump */
.tab-body-narrow { max-width: none; }

/* inline raid editing */
.raid .raid-name-input {
  font: inherit; font-size: 19px; font-weight: 600; color: var(--raid); background: transparent;
  border: 1px solid transparent; border-radius: 7px; padding: 0 6px; margin-left: -7px; width: auto; min-width: 6ch; max-width: 100%;
}
.raid .raid-name-input:hover { border-color: var(--line-2); }
.raid .raid-name-input:focus { border-color: var(--raid); outline: none; background: var(--surface); }
.raid-name-text { display: none; }
.raid-parties-select { width: auto; padding: 3px 8px; font-size: 13px; border-radius: 999px; }
.raid-note.editable { cursor: text; }
.raid-note.editable:hover { border-color: var(--raid); }
.raid-note-editor { display: grid; gap: 6px; margin-bottom: 10px; }
.raid-note-editor textarea { min-height: 70px; }
.raid-note-editor .board-actions { justify-content: flex-end; }
.is-exporting .raid-name-input, .is-exporting .raid-parties-select, .is-exporting .raid-note-add { display: none !important; }
.is-exporting .raid-name-text { display: inline; }

/* leave */
.chip-leave { opacity: 0.55; background-image: repeating-linear-gradient(-45deg, transparent 0 6px, rgba(100, 116, 139, 0.14) 6px 12px); }
.chip-leave .chip-name { text-decoration: line-through; text-decoration-color: var(--muted); }
.war-date { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.war-date input { width: auto; padding: 5px 8px; font-size: 14px; }
.pool-sep { font-size: 12px; color: var(--muted); font-weight: 500; margin: 6px 2px 0; }
.leave-days { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin: 12px 0; }
.leave-day {
  flex-shrink: 0; display: grid; justify-items: center; gap: 0; min-width: 64px; padding: 6px 10px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; cursor: pointer;
}
.leave-day small { color: var(--muted); font-size: 11px; }
.leave-day strong { font-size: 18px; }
.leave-day.active { border-color: var(--accent); background: var(--accent-soft); }
.leave-day .leave-n { font-size: 12px; color: var(--warn); font-weight: 500; }
.leave-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.leave-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.leave-list .grow { flex: 1; min-width: 0; display: grid; }
.leave-add { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) auto; gap: 8px; margin-top: 12px; }
.discord-events { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.status-ok { color: var(--ok); font-weight: 500; }
@media (max-width: 560px) { .leave-add { grid-template-columns: 1fr; } }

/* reminders */
.reminder-list { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 10px; }
.reminder { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.reminder-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.reminder-top .check { margin: 0; }
.reminder-top input[type="time"] { width: auto; padding: 6px 8px; font: inherit; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--text); }
.reminder-top .rem-del { margin-left: auto; }
.reminder-days { display: flex; gap: 6px; flex-wrap: wrap; }
.day-chip { position: relative; cursor: pointer; }
.day-chip input { position: absolute; opacity: 0; }
.day-chip span { display: inline-block; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-size: 13px; }
.day-chip input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 500; }
.app-foot { text-align: center; font-size: 12px; padding: 24px 16px 32px; opacity: .7; }

/* ---------- roster selection / bulk ---------- */
.roster-list.selectable .roster-row { grid-template-columns: 26px minmax(150px, 1.2fr) minmax(140px, 1.6fr) minmax(0, 2fr) auto; }
.r-sel { display: grid; place-items: center; width: 26px; height: 26px; cursor: pointer; }
.r-sel input, .bulk-all input { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.roster-row.selected { border-color: var(--accent); background: var(--accent-soft); opacity: 1; }
.bulk-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 14px; margin: 0 0 8px; min-height: 40px; border-radius: 12px; }
.bulk-bar .check { margin: 0; }
.bulk-bar.active {
  position: sticky; top: 8px; z-index: 5; background: var(--surface); border: 1px solid var(--accent); box-shadow: var(--shadow);
}
.bulk-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.bulk-actions[hidden] { display: none; }
.bulk-actions strong { margin-right: 4px; font-size: 14px; }
.bulk-tag { padding: 5px 8px; font-size: 13px; width: auto; }
.trash-bulk { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.trash-bulk .check { margin: 0; }
.trash-bulk-actions { display: flex; gap: 6px; }
.imp-steps { margin: 4px 0 10px; padding-left: 20px; display: grid; gap: 10px; }
.imp-steps li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.imp-steps li > span:first-child { min-width: 200px; flex: 1; }
.file-btn { position: relative; overflow: hidden; cursor: pointer; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.imp-more { margin: 4px 0 6px; }
.imp-more summary { cursor: pointer; color: var(--muted); font-size: 14px; }
@media (max-width: 860px) {
  .roster-list.selectable .roster-row { grid-template-columns: 26px 1fr auto; }
  .roster-list.selectable .r-badges, .roster-list.selectable .r-contact { grid-column: 2 / -1; }
  .roster-list.selectable .roster-row .r-edit { grid-row: 1; grid-column: 3; }
  .bulk-actions { margin-left: 0; }
}
.imp-sf { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 12px; margin: 0 0 10px; border: 1px dashed var(--accent); border-radius: 10px; }
.imp-sf > span { flex: 1; min-width: 200px; }

/* ---------- class picker ---------- */
.cls-picker { display: grid; gap: 8px; }
.cls-current {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; min-height: 48px; text-align: left;
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; cursor: pointer;
}
.cls-current:hover, .cls-picker.open .cls-current { border-color: var(--accent); }
.cls-name { flex: 1; font-weight: 500; }
.cls-caret { color: var(--muted); font-size: 12px; }
.cls-ico {
  display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 10px;
  font-size: 12px; font-weight: 700; letter-spacing: .02em; color: #fff; background: var(--c, #94a3b8);
}
.cls-ico-empty { background: var(--line); color: var(--muted); }
.cls-panel { display: none; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.cls-picker.open .cls-panel { display: grid; }
.cls-search { padding: 9px 12px; font-size: 15px; }
.cls-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; max-height: 300px; overflow-y: auto; padding: 2px; }
.cls-opt {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px; min-height: 44px; text-align: left;
  font: inherit; font-size: 14px; line-height: 1.2; color: var(--text);
  background: var(--c-bg); border: 1px solid var(--c-bd); border-radius: 10px; cursor: pointer;
  transition: transform .08s ease, box-shadow .12s ease;
}
.cls-opt .cls-ico { width: 28px; height: 28px; font-size: 11px; border-radius: 8px; }
.cls-opt:hover { box-shadow: 0 0 0 2px var(--c-bd); }
.cls-opt:active { transform: scale(.97); }
.cls-opt.on { background: var(--c); border-color: var(--c); color: #fff; font-weight: 600; }
.cls-opt.on .cls-ico { background: rgba(255, 255, 255, .25); }
.cls-opt[hidden] { display: none; }
.cls-other { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.cls-other input { padding: 8px 10px; font-size: 15px; }
@media (max-width: 560px) {
  .cls-grid { grid-template-columns: 1fr 1fr; max-height: 46vh; }
}

/* ---------- super admin ---------- */
.nav-admin { color: var(--accent-text); font-weight: 600; }
.badge-ghost { color: #fff; background: #475569; border-color: #475569; }
.notice-ghost { background: color-mix(in srgb, #64748b 14%, var(--surface)); border-color: #94a3b8; margin: 0 0 10px; }
.notice-bad { background: color-mix(in srgb, #dc2626 10%, var(--surface)); border-color: color-mix(in srgb, #dc2626 45%, transparent); margin: 0 0 10px; }
.badge-bad { color: #dc2626; border-color: color-mix(in srgb, #dc2626 45%, transparent); }
.badge-warn { color: #b45309; border-color: color-mix(in srgb, #f59e0b 55%, transparent); background: color-mix(in srgb, #f59e0b 12%, transparent); }
.admin-head { margin: 8px 0 4px; }
.admin-head p { margin: 2px 0 8px; }
.sa-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 18px 0 14px; }
.sa-stat { display: grid; gap: 4px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.sa-stat span { font-size: 13px; color: var(--muted); }
.sa-stat strong { font-size: 26px; line-height: 1.1; }
.sa-filters { grid-template-columns: 2fr 1fr; }
.sa-row { grid-template-columns: minmax(160px, 1.2fr) minmax(180px, 1.6fr) minmax(0, 2fr) auto; }
.sa-row .r-main span { font-size: 13px; }
.sa-plan-premium { color: var(--accent-text); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.sa-plan-pro { color: #fff; background: #7c3aed; border-color: #7c3aed; }
.sa-info { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 8px 0 12px; font-size: 14px; }
.sa-info dt { color: var(--muted); }
.sa-info dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.sa-links { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.sa-extend, .sa-setplan { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 6px 0; }
.sa-extend select, .sa-setplan select, .sa-setplan input { width: auto; padding: 6px 10px; font-size: 14px; }
.sa-setplan input[type="date"] { font: inherit; font-size: 14px; border: 1px solid var(--line-2, var(--line)); border-radius: 8px; background: var(--surface); color: var(--text); }
.sa-danger { margin-top: 14px; }
.sa-danger summary { cursor: pointer; color: #dc2626; font-weight: 500; }
@media (max-width: 860px) {
  .sa-row { grid-template-columns: 1fr auto; }
  .sa-row .r-badges, .sa-row .r-contact { grid-column: 1 / -1; }
  .sa-row .sa-manage { grid-row: 1; grid-column: 2; }
}

/* ---------- super admin entry points ---------- */
@media (max-width: 560px) {
  .topnav .nav-link.nav-admin { display: inline; font-size: 20px; }
  .topnav .nav-admin .nav-label { display: none; }
}
.sa-banner {
  display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; padding: 12px 16px; border-radius: 12px;
  text-decoration: none; color: var(--text); background: var(--accent-soft); border: 1px solid var(--accent);
}
.sa-banner span { flex: 1; }

/* ---------- guild look ---------- */
.title-emblem, .card-emblem { font-size: .9em; }
.guild-card { border-top: 3px solid var(--g-accent, var(--accent)); }
.guild-banner {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; margin: 4px 0 16px; border-radius: 14px; color: #fff;
  background: linear-gradient(135deg, var(--g-accent), color-mix(in srgb, var(--g-accent) 55%, #111827));
}
.guild-banner strong { display: block; font-size: 20px; }
.guild-emblem { display: grid; place-items: center; width: 52px; height: 52px; font-size: 30px; border-radius: 14px; background: rgba(255, 255, 255, .18); }
.guild-server { display: inline-block; margin-top: 2px; font-size: 13px; opacity: .9; }
.emblem-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.emblem-opt, .accent-opt { position: relative; cursor: pointer; }
.emblem-opt input, .accent-opt input { position: absolute; opacity: 0; pointer-events: none; }
.emblem-opt span {
  display: grid; place-items: center; height: 44px; font-size: 22px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
}
.emblem-opt input:checked + span { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); background: var(--accent-soft); }
.accent-row { display: flex; flex-wrap: wrap; gap: 8px; }
.accent-opt span { display: block; width: 32px; height: 32px; border-radius: 50%; background: var(--c); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.accent-opt input:checked + span { box-shadow: 0 0 0 2px var(--c); }
.emblem-opt input:disabled + span, .accent-opt input:disabled + span { cursor: default; opacity: .7; }

/* ---------- settings layout ---------- */
.settings-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 16px; }
.settings-nav { position: sticky; top: 72px; display: grid; gap: 2px; }
.settings-nav a { display: flex; gap: 8px; padding: 9px 12px; border-radius: 10px; text-decoration: none; color: var(--muted); font-size: 15px; }
.settings-nav a:hover { background: var(--surface); color: var(--text); }
.settings-nav a.active { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.settings-main { display: grid; gap: 16px; min-width: 0; }
.settings-main > section, .settings-main section > .card { scroll-margin-top: 120px; margin: 0; }
.settings-main .card { margin: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.quota { font-size: 13px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.quota-full { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 50%, transparent); background: color-mix(in srgb, var(--warn) 10%, transparent); }
.set-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.set-row:first-of-type { margin-top: 14px; }
.set-row p { margin: 2px 0 0; }
.set-row-col { display: grid; justify-content: stretch; }
.switch { position: relative; flex: none; width: 46px; height: 26px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line); transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:disabled + span { opacity: .6; }
@media (max-width: 860px) {
  .settings-layout { grid-template-columns: 1fr; gap: 12px; }
  .settings-nav { position: sticky; top: 52px; z-index: 6; display: flex; overflow-x: auto; gap: 6px; padding: 8px 0; background: var(--bg); scrollbar-width: none; }
  .settings-nav a { flex: none; padding: 7px 12px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; }
}

/* ---------- member page hero ---------- */
.self-hero { position: relative; padding: 22px 20px; border-radius: 16px; color: #fff;
  background: linear-gradient(135deg, var(--g-accent), color-mix(in srgb, var(--g-accent) 50%, #111827)); }
.self-hero .eyebrow, .self-hero .page-title { color: #fff; }
.self-hero .eyebrow { opacity: .85; }
.hero-emblem { float: right; display: grid; place-items: center; width: 60px; height: 60px; font-size: 34px; border-radius: 16px; background: rgba(255,255,255,.18); }
.welcome-box { display: flex; gap: 8px; margin: 12px 0 4px; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.16); white-space: pre-line; line-height: 1.5; }
.self-hero .guild-links { margin-top: 12px; }
.self-hero .guild-links .btn { background: rgba(255,255,255,.92); color: #111827; border-color: transparent; }

#s-member .invite-link { grid-template-columns: 1fr auto auto; }
@media (max-width: 560px) { #s-member .invite-link { grid-template-columns: 1fr auto; } #s-member .invite-link a { grid-column: 1 / -1; } }

/* ---------- game server picker ---------- */
.server-picker { display: grid; gap: 6px; }
.server-picker input[hidden] { display: none; }
.guild-card-server { margin: 0 0 6px; font-size: 13px; }
.sa-servers { margin-top: 16px; }
.sa-servers textarea { font-size: 14px; line-height: 1.6; margin: 8px 0; }

/* ---------- billing ---------- */
.notice-ok { background: color-mix(in srgb, var(--ok) 12%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.bill-current { margin-top: 16px; }
.bill-until { font-size: 17px; font-weight: 500; margin: 10px 0 4px; }
.bill-usage { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 14px; }
.bill-usage > div { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: center; font-size: 14px; }
.bill-usage .meter { grid-column: 1 / -1; }
.meter { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.bill-cur { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin: 18px 0 10px; flex-wrap: wrap; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.plan-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 22px 18px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.plan-card.featured { border: 2px solid var(--accent); }
.plan-card.current { background: var(--accent-soft); }
.plan-card h3 { margin: 0; font-size: 20px; }
.plan-price { margin: 0; font-size: 28px; font-weight: 700; }
.plan-price small { font-size: 14px; font-weight: 400; color: var(--muted); }
.plan-features { list-style: none; padding: 0; margin: 4px 0 10px; display: grid; gap: 6px; font-size: 14px; flex: 1; }
.plan-flag { position: absolute; top: -11px; left: 16px; padding: 2px 10px; font-size: 12px; font-weight: 600; border-radius: 999px; background: var(--accent); color: #111827; }
.plan-flag-bonus { background: #22c55e; color: #fff; }
.bill-history { list-style: none; padding: 0; margin: 0; }
.bill-history li { display: grid; grid-template-columns: 170px 1fr auto; gap: 6px 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.bill-history li:first-child { border-top: 0; }
.bill-history li > .muted:last-child { grid-column: 1 / -1; font-size: 12px; }
@media (max-width: 560px) { .bill-history li { grid-template-columns: 1fr auto; } .bill-history li > span:first-child { grid-column: 1 / -1; color: var(--muted); } }
.sa-loglist li { grid-template-columns: 150px minmax(0, 1fr) !important; }
@media (max-width: 560px) { .sa-loglist li { grid-template-columns: 1fr !important; } }
.plan-save { margin: -4px 0 0; font-size: 13px; color: var(--ok); font-weight: 500; }
.save-chip { margin-left: 4px; padding: 1px 7px; font-size: 11px; font-weight: 600; border-radius: 999px; background: #22c55e; color: #fff; }
.bill-cur { justify-content: space-between; }
.bill-cur .muted { margin-left: auto; }
.pending-pay { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 16px 0 0; }
.pending-pay .countdown { font-variant-numeric: tabular-nums; font-size: 18px; }
.over-limit { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }

/* ---------- guild header: member page shortcut ---------- */
.guild-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.member-page-box { display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.member-page-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.member-page-actions { display: flex; gap: 6px; }
.btn-member { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
@media (max-width: 560px) { .member-page-box { width: 100%; grid-template-columns: auto 1fr; align-items: center; } .member-page-actions { justify-content: flex-end; } }

/* ---------- publish bar ---------- */
.publish-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: 0 0 12px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow);
}
.publish-info { display: flex; align-items: center; gap: 12px; min-width: 0; }
.publish-info strong { display: block; }
.publish-info .muted { font-size: 13px; }
.publish-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--muted); }
.publish-live .publish-dot { background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .2); }
.publish-dirty { border-color: var(--accent); background: var(--accent-soft); }
.publish-dirty .publish-dot { background: var(--accent); animation: pulse-dot 1.4s ease-in-out infinite; }
.publish-none { border-style: dashed; }
.btn-publish { font-size: 16px; padding: 10px 20px; border-radius: 12px; box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 40%, transparent); }
.publish-dirty .btn-publish, .publish-none .btn-publish { animation: glow-btn 2s ease-in-out infinite; }
@keyframes pulse-dot { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 50% { box-shadow: 0 0 0 7px transparent; } }
@keyframes glow-btn { 0%, 100% { box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent); } 50% { box-shadow: 0 4px 24px color-mix(in srgb, var(--accent) 75%, transparent); } }
@media (max-width: 560px) { .btn-publish { width: 100%; } }
.pub-summary { font-weight: 500; }
.pub-choice { display: grid; gap: 8px; margin: 12px 0; }
.radio-card { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.radio-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.radio-card input { margin-top: 3px; accent-color: var(--accent); }
.radio-card span { display: grid; gap: 2px; }
.radio-card small { color: var(--muted); font-size: 13px; }
.pub-done-icon { font-size: 44px; margin-top: 6px; }
.pub-done-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 14px 0 4px; }

/* ---------- member page: official lineup ---------- */
.official-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 12px; }
.official-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  font-weight: 700; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: #fff;
  background: linear-gradient(90deg, #16a34a, #22c55e);
  animation: official-breathe 2.4s ease-in-out infinite;
}
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #fff; animation: live-blink 1.2s ease-in-out infinite; }
.official-time { font-size: 13px; color: var(--muted); }
@keyframes official-breathe {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, .55), 0 0 18px rgba(34, 197, 94, .55); }
  50% { opacity: .78; box-shadow: 0 0 0 6px rgba(34, 197, 94, 0), 0 0 4px rgba(34, 197, 94, .2); }
}
@keyframes live-blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) {
  .official-badge, .live-dot, .publish-dirty .publish-dot, .btn-publish { animation: none !important; }
}

/* ---------- PromptPay QR page ---------- */
.pay-methods { display: grid; gap: 10px; margin-top: 12px; }
.pay-method { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; text-align: left; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; cursor: pointer; position: relative; }
.pay-method:hover { border-color: var(--accent); background: var(--accent-soft); }
.pay-method span:nth-child(2) { display: grid; gap: 2px; flex: 1; }
.pay-method small { color: var(--muted); font-size: 13px; }
.pay-ico { font-size: 26px; }
.pay-tag { padding: 2px 9px; font-size: 11px; font-weight: 700; border-radius: 999px; background: #22c55e; color: #fff; }
.qr-pay { display: grid; justify-items: center; gap: 6px; text-align: center; max-width: 380px; margin: 0 auto; }
.qr-head { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.qr-amount { margin: 4px 0 0; font-size: 34px; font-weight: 800; }
.qr-plan { margin: 0; font-size: 13px; }
.qr-frame { padding: 12px; margin: 8px 0 4px; background: #fff; border-radius: 16px; border: 2px solid #003d6a; }
.qr-frame img { display: block; width: 230px; height: 230px; image-rendering: pixelated; }
.qr-timer { width: 100%; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 12px;
  background: var(--accent-soft); border: 1px solid var(--accent); }
.qr-timer span { text-align: left; font-weight: 500; }
.qr-timer strong { font-size: 26px; font-variant-numeric: tabular-nums; }
.qr-bar { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: rgba(0, 0, 0, .08); overflow: hidden; }
.qr-bar span { display: block; height: 100%; width: 100%; background: var(--accent); transition: width 1s linear; }
.qr-hurry .qr-timer { background: color-mix(in srgb, #dc2626 12%, var(--surface)); border-color: #dc2626; animation: hurry 1s ease-in-out infinite; }
.qr-hurry .qr-timer strong { color: #dc2626; }
.qr-hurry .qr-bar span { background: #dc2626; }
@keyframes hurry { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.02); } }
.qr-urgent { margin: 2px 0; font-size: 13px; color: var(--accent-text); font-weight: 500; }
.qr-steps { text-align: left; margin: 6px 0; padding-left: 20px; font-size: 14px; display: grid; gap: 4px; }
.qr-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.qr-status { margin: 6px 0 0; font-size: 14px; }
@media (prefers-reduced-motion: reduce) { .qr-hurry .qr-timer { animation: none; } }
.foot-support { font-size: 12px; color: inherit; text-decoration: underline; }
.sup-filter { margin: 4px 0 8px; }
.sup-list { display: grid; gap: 10px; }
.sup-ticket { margin: 0; display: grid; gap: 6px; }
.sup-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.sup-msg { margin: 0; white-space: pre-wrap; }
.sup-from { margin: 0; font-size: 13px; }
.sup-actions { display: flex; gap: 6px; }
.promo-card { display: flex; align-items: center; gap: 14px; margin: 26px 0 8px; padding: 16px 18px; border-radius: 16px; text-decoration: none; color: var(--text);
  background: linear-gradient(135deg, var(--accent-soft), var(--surface)); border: 1px dashed var(--accent); }
.promo-card:hover { border-style: solid; }
.promo-ico { font-size: 30px; }
.promo-text { display: grid; gap: 2px; flex: 1; }
.promo-text small { color: var(--muted); font-size: 13px; }
@media (max-width: 560px) { .promo-card { flex-wrap: wrap; } .promo-card .btn { width: 100%; text-align: center; } }
.ntf-list { display: grid; gap: 10px; margin-top: 10px; }
.ntf-row { margin: 0; }
.ntf-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.ntf-row .help { margin: 4px 0 8px; }

/* ---------- icons (Lucide + brand marks) ---------- */
.ic { width: 1.1em; height: 1.1em; display: inline-block; vertical-align: -0.18em; flex-shrink: 0; }
.btn .ic, .badge .ic, .notice .ic { vertical-align: -0.2em; }
h1 .ic, h2 .ic, h3 .ic { color: var(--accent-text); width: 0.95em; height: 0.95em; vertical-align: -0.12em; }
.btn-primary .ic, .btn-danger .ic { color: inherit; }
.ic-discord { color: #5865f2; }
.ic-line { color: #06c755; }
.ic-facebook { color: #1877f2; }
.btn.link-discord, .btn.link-line, .btn.link-facebook { gap: 7px; }
.link-facebook { border-color: #1877f2; color: #1877f2; }
.theme-toggle .ic { width: 18px; height: 18px; vertical-align: 0; }
.action-icon .ic, .pay-ico .ic { width: 26px; height: 26px; color: var(--accent-text); }
.promo-ico .ic { width: 30px; height: 30px; color: var(--accent-text); }
.pub-done-icon .ic { width: 52px; height: 52px; color: var(--ok); }
.big-check .ic { width: 48px; height: 48px; }
.slot-role .ic { width: 12px; height: 12px; vertical-align: -1px; }
.slot-role .ic { color: #d97706; }
.settings-nav a .ic { width: 18px; height: 18px; margin-top: 1px; }
.settings-nav a.active .ic { color: var(--accent-text); }
.sa-stat .ic, .ntf-head .ic { color: var(--accent-text); }
.nav-admin .ic { width: 18px; height: 18px; }

/* =====================================================================
   v2 layout: workspace header, gutters, landing, dashboard, roster table,
   settings status, member page. One system: cards r=14, chips r=999,
   accent = gold brand, guild colour (--g-accent) only on guild identity.
   ===================================================================== */
:root { --ws-max: 1360px; --gutter: clamp(16px, 3.2vw, 44px); --topbar-h: 56px; --tabbar-h: 48px; }
.topbar { height: var(--topbar-h); padding-top: 0; padding-bottom: 0; }
.hide-sm { display: inline; }
@media (max-width: 560px) { .hide-sm { display: none; } }

/* ---------- guild avatar ---------- */
.g-avatar {
  --av: 48px; display: inline-grid; place-items: center; flex: none; width: var(--av); height: var(--av);
  border-radius: calc(var(--av) * .26); overflow: hidden; background: var(--g-accent, var(--accent));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}
.g-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-avatar-emoji { font-size: calc(var(--av) * .52); line-height: 1;
  background: linear-gradient(140deg, var(--g-accent), color-mix(in srgb, var(--g-accent) 55%, #0f172a)); }

/* ---------- page containers ---------- */
.main-full { max-width: var(--ws-max); padding-left: var(--gutter); padding-right: var(--gutter); }
.main-ws { max-width: none; padding: 0 0 72px; }
.main-landing { max-width: none; padding: 0; }

/* ---------- workspace header ---------- */
.ws-inner { max-width: var(--ws-max); margin: 0 auto; padding: 0 var(--gutter); }
.ws-band { position: relative; background: var(--surface); }
.ws-band::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--g-accent); }
.ws-back { display: inline-block; padding-top: 16px; font-size: 13px; color: var(--muted); text-decoration: none; }
.ws-back:hover { color: var(--text); }
.ws-id { display: flex; align-items: center; gap: 16px; padding: 10px 0 16px; flex-wrap: wrap; }
.ws-title { flex: 1; min-width: 200px; }
.ws-title h1 { font-size: clamp(22px, 3vw, 30px); margin: 0 0 6px; overflow-wrap: anywhere; }
.ws-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.ws-meta-item { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.ws-member { display: grid; gap: 6px; justify-items: end; }
.ws-member-label { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.ws-member-actions { display: flex; gap: 6px; }
.ws-tabbar {
  position: sticky; top: var(--topbar-h); z-index: 15; background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 var(--line);
}
.ws-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.ws-tabs::-webkit-scrollbar { display: none; }
.ws-tab {
  position: relative; display: inline-flex; align-items: center; gap: 7px; height: var(--tabbar-h); padding: 0 14px;
  color: var(--muted); text-decoration: none; white-space: nowrap; font-weight: 400; font-size: 15px;
}
.ws-tab .ic { width: 17px; height: 17px; }
.ws-tab:hover { color: var(--text); }
.ws-tab.active { color: var(--text); font-weight: 500; }
.ws-tab.active .ic { color: var(--accent-text); }
.ws-tab.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }
.ws-body { max-width: var(--ws-max); margin: 0 auto; padding: 18px var(--gutter) 0; }
.ws-body > .notice { margin: 0 0 12px; }
.tab-body > :first-child { margin-top: 0; }
@media (max-width: 720px) {
  .ws-id { gap: 12px; padding-bottom: 12px; }
  .ws-avatar { --av: 48px !important; }
  .ws-member { width: 100%; grid-template-columns: auto 1fr; align-items: center; justify-items: start; }
  .ws-member-actions { justify-self: end; }
  .ws-tab { padding: 0 11px; font-size: 14px; }
}

/* board inside the workspace */
.tab-board .board-top { margin-top: 0; }
.board-layout { grid-template-columns: 200px minmax(0, 1fr); }
.pool { top: calc(var(--topbar-h) + var(--tabbar-h) + 10px); max-height: calc(100vh - var(--topbar-h) - var(--tabbar-h) - 24px); }
@container (min-width: 860px) { .parties { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
@media (max-width: 1000px) { .board-layout { grid-template-columns: 180px minmax(0, 1fr); } }
@media (max-width: 860px) { .board-layout { grid-template-columns: 1fr; } }
.publish-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (max-width: 560px) { .publish-actions { width: 100%; } .publish-actions .btn-ghost { order: 2; } }
.war-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 13.5px;
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); color: var(--text);
}
.war-chip .ic { color: var(--accent-text); }
.war-chip.other { background: var(--surface-2); border-color: var(--line); }
.war-live { color: var(--bad); font-weight: 600; }
.unpub-preview, .editing-banner {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; margin: 10px 0;
  background: var(--surface-2); border: 1px dashed var(--line-2);
}
.unpub-preview span, .editing-banner span { display: grid; gap: 2px; }
.unpub-preview small, .editing-banner small { color: var(--muted); font-size: 13px; }
.editing-banner { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); }
.editing-banner > .ic { color: var(--accent-text); margin-top: 3px; }
.lineup-empty { display: flex; gap: 14px; align-items: center; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px dashed var(--line-2); }
.lineup-empty > .ic { width: 30px; height: 30px; color: var(--muted); }
.lineup-empty p { margin: 2px 0 0; }
.lineup-drafting { border-color: color-mix(in srgb, var(--accent) 50%, transparent); background: var(--accent-soft); }
.lineup-drafting > .ic { color: var(--accent-text); animation: spin-slow 3s linear infinite; }
@keyframes spin-slow { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .lineup-drafting > .ic { animation: none; } }

/* ---------- dashboard ---------- */
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.dash-head .page-title { margin-bottom: 2px; }
.dash-head p { margin: 0; }
.gcard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.gcard {
  position: relative; display: flex; flex-direction: column; text-decoration: none; color: var(--text); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s;
}
.gcard:hover { border-color: color-mix(in srgb, var(--g-accent) 60%, var(--line)); box-shadow: 0 8px 24px rgba(16, 24, 40, .08); }
.gcard-cover { height: 54px; background: linear-gradient(120deg, var(--g-accent), color-mix(in srgb, var(--g-accent) 40%, #0f172a)); }
.gcard-body { display: grid; gap: 10px; padding: 0 18px 16px; }
.gcard-avatar { margin-top: -28px; box-shadow: 0 0 0 4px var(--surface); }
.gcard-title h3 { margin: 0; font-size: 19px; overflow-wrap: anywhere; }
.gcard-link { font-size: 13px; color: var(--muted); }
.gcard-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.gcard-server { display: inline-flex; gap: 4px; align-items: center; font-size: 13px; color: var(--muted); }
.gcard-usage { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.gcard-go { display: flex; justify-content: flex-end; align-items: center; gap: 4px; padding: 10px 18px; margin-top: auto;
  border-top: 1px solid var(--line); font-size: 14px; color: var(--accent-text); font-weight: 500; }
.gcard-new { align-items: center; justify-content: center; gap: 8px; min-height: 220px; font: inherit; color: var(--muted); cursor: pointer;
  border: 1.5px dashed var(--line-2); background: transparent; box-shadow: none; }
.gcard-new .ic { width: 28px; height: 28px; }
.gcard-new:hover { color: var(--accent-text); border-color: var(--accent); }
.create-card { scroll-margin-top: 80px; }
.create-empty { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.create-empty > .ic { width: 44px; height: 44px; padding: 10px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-text); }
.create-empty h2 { margin: 0 0 2px; }
.create-empty p { margin: 0; }
.slug-prefix { font-size: 13px; }
.slug-explain { display: grid; gap: 6px; margin: -6px 0 16px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 13.5px; }
.slug-explain p { margin: 0; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.slug-explain .ic { color: var(--muted); }
.slug-explain code { background: var(--surface); }

/* ---------- settings: status + logo + schedule ---------- */
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 12px; }
.st-tile {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px;
  text-decoration: none; color: var(--text); background: var(--surface-2); border: 1px solid var(--line);
}
.st-tile:hover { border-color: var(--muted); }
.st-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--surface); color: var(--muted); border: 1px solid var(--line); }
.st-tile.on .st-ico { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.st-text { display: grid; min-width: 0; }
.st-text strong { font-size: 14px; font-weight: 500; }
.st-text span { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-pill, .st-badge { font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); white-space: nowrap; }
.st-tile.on .st-pill, .st-badge.on { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.st-badge { display: inline-flex; align-items: center; gap: 5px; }
.st-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .8; }
.conn-line { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ok); }
.conn-line .mono { color: var(--muted); }
.logo-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.logo-actions { display: grid; gap: 6px; justify-items: start; }
.logo-actions .help { margin: 0; }
.guild-banner .g-avatar { box-shadow: 0 0 0 2px rgba(255, 255, 255, .35); }
.sched-list { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.sched-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 120px auto; gap: 8px; align-items: center; }
.sched-row input[type="time"] { padding: 9px 10px; font: inherit; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--text); }
@media (max-width: 560px) { .sched-row { grid-template-columns: 1fr 1fr; } }
.settings-nav { top: calc(var(--topbar-h) + var(--tabbar-h) + 14px); }
.settings-main > section { scroll-margin-top: calc(var(--topbar-h) + var(--tabbar-h) + 14px); }
@media (max-width: 860px) { .settings-nav { top: calc(var(--topbar-h) + var(--tabbar-h)); } }

/* ---------- roster: insights + table ---------- */
.insights { display: grid; gap: 12px; margin-bottom: 14px; }
.ins-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ins-kpi { display: grid; gap: 6px; align-content: start; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); min-width: 0; }
.ins-kpi > span { font-size: 12.5px; color: var(--muted); }
.ins-kpi strong { font-size: 28px; line-height: 1; font-variant-numeric: tabular-nums; }
.ins-kpi small { font-size: 12px; color: var(--muted); }
.ins-small p { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; }
.ins-small .ic { color: var(--muted); }
.ins-split { display: flex; height: 10px; border-radius: 999px; overflow: hidden; gap: 2px; background: var(--line); }
.ins-split span { background: var(--c); min-width: 2px; }
.ins-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; }
.ins-legend li { display: inline-flex; align-items: center; gap: 5px; }
.ins-legend i { width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.ins-cls { padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.ins-cls-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; font-size: 14px; }
.ins-cls-head .link-btn { margin: 0 0 0 auto; font-size: 13px; }
.ins-bars { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2px 18px; }
.ins-bars button {
  width: 100%; display: grid; grid-template-columns: minmax(90px, 140px) 1fr 28px; align-items: center; gap: 8px; padding: 4px 6px;
  border: 0; background: none; color: var(--text); font: inherit; font-size: 13px; cursor: pointer; border-radius: 7px; text-align: left;
}
.ins-bars button:hover, .ins-bars button.on { background: var(--surface-2); }
.ins-bars button.on { box-shadow: inset 0 0 0 1px var(--c); }
.bar-label { display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-label i { flex: none; width: 9px; height: 9px; border-radius: 3px; background: var(--c); }
.bar-track { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar-track span { display: block; height: 100%; border-radius: inherit; background: var(--c); }
.bar-n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
@media (max-width: 900px) { .ins-kpis { grid-template-columns: 1fr 1fr; } }

.rtable-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.rtable { width: 100%; border-collapse: collapse; font-size: 14px; }
.rtable th { position: sticky; top: calc(var(--topbar-h) + var(--tabbar-h)); z-index: 2; background: var(--surface-2); text-align: left;
  font-weight: 500; font-size: 12.5px; color: var(--muted); padding: 0 10px; height: 38px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.th-sort { border: 0; background: none; color: inherit; font: inherit; cursor: pointer; padding: 0; display: inline-flex; gap: 4px; align-items: center; }
.th-sort.on { color: var(--text); }
.sort-ind { font-size: 9px; }
.rtable td { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.rtable tbody tr:last-child td { border-bottom: 0; }
.rtable tbody tr.roster-row { box-shadow: inset 3px 0 0 var(--c); }
.rtable tbody tr.roster-row:hover { background: var(--surface-2); }
.rtable tr.roster-row.selected { background: var(--accent-soft); }
.rtable tr.roster-row.inactive td { opacity: .55; }
.rtable tr.empty td { text-align: center; padding: 28px; }
.c-sel { width: 40px; }
.c-edit { width: 1%; text-align: right; }
.r-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.r-name strong { font-weight: 500; }
.r-lead .ic { color: #d97706; width: 14px; height: 14px; }
.rtable .r-note { display: block; max-width: 260px; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rtable .r-cls { display: inline-flex; align-items: center; gap: 7px; color: var(--text); font-size: 14px; white-space: nowrap; }
.rtable .r-cls i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 500; border: 1px solid currentColor; white-space: nowrap; }
.pill-field-main { color: var(--c-amber); } .pill-field-sub { color: var(--c-blue); } .pill-field-any { color: var(--c-gray); }
.pill-style-atk { color: var(--c-red); } .pill-style-def { color: var(--c-green); } .pill-style-flex { color: var(--c-purple); }
.r-noen { font-size: 11px; color: var(--warn); white-space: nowrap; }
.c-tags .tag { margin: 1px 2px 1px 0; }
.c-contact { white-space: nowrap; }
.r-ct { display: inline-flex; align-items: center; gap: 4px; margin-right: 8px; font-size: 12.5px; color: var(--muted); max-width: 150px; }
.r-ct span { overflow: hidden; text-overflow: ellipsis; }
.roster-summary { margin: 4px 2px 8px; }
@media (max-width: 1100px) { .rtable .c-contact span { display: none; } .rtable .c-tags { display: none; } }
@media (max-width: 760px) {
  .rtable thead { display: none; }
  .rtable, .rtable tbody { display: block; }
  .rtable tr.roster-row { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); align-items: center; }
  .rtable:not(.selectable) tr.roster-row { grid-template-columns: 1fr auto; }
  .rtable tr.roster-row td { padding: 0; border: 0; display: block; }
  .rtable .c-sel { grid-row: 1 / span 2; width: auto; }
  .rtable .c-name { grid-column: 2; }
  .rtable .c-edit { grid-row: 1 / span 2; grid-column: 3; }
  .rtable:not(.selectable) .c-name, .rtable:not(.selectable) .c-cls, .rtable:not(.selectable) .c-field { grid-column: 1; }
  .rtable .c-cls, .rtable .c-field, .rtable .c-style, .rtable .c-lang { display: inline-block !important; grid-column: 2; }
  .rtable .c-cls { font-size: 13px; }
  .rtable .c-field, .rtable .c-style, .rtable .c-lang, .rtable .c-contact, .rtable .c-tags { display: none !important; }
  .rtable tr.empty { display: block; }
}

/* ---------- history (compact) ---------- */
.chip-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.chip-tabs button { border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: inherit; font-size: 13px; padding: 4px 12px; border-radius: 999px; cursor: pointer; }
.chip-tabs button.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.log-compact li { grid-template-columns: 44px 18px minmax(0, 1fr); gap: 8px; padding: 6px 14px; font-size: 13.5px; align-items: center; }
.log-compact .log-ico .ic { width: 15px; height: 15px; color: var(--muted); }
.log-compact .log-cat-board .log-ico .ic { color: var(--c-amber); }
.log-compact .log-cat-roster .log-ico .ic { color: var(--c-blue); }
.log-compact .log-cat-team .log-ico .ic { color: var(--c-purple); }
.log-compact .log-text { line-height: 1.4; }
.log-compact .log-sep { display: block; position: sticky; top: calc(var(--topbar-h) + var(--tabbar-h)); z-index: 1; padding: 5px 14px; font-size: 12px; font-weight: 500;
  color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.log-compact .log-sep:first-child { border-radius: var(--radius) var(--radius) 0 0; }

/* ---------- member page ---------- */
.mp-hero { position: relative; padding: 24px 22px 20px; border-radius: 20px; color: #fff; overflow: hidden;
  background: linear-gradient(135deg, var(--g-accent), color-mix(in srgb, var(--g-accent) 45%, #0f172a)); }
.mp-hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .18), transparent 70%); pointer-events: none; }
.mp-hero-inner { display: flex; align-items: center; gap: 16px; }
.mp-avatar { box-shadow: 0 0 0 3px rgba(255, 255, 255, .35), 0 10px 24px rgba(0, 0, 0, .25); }
.mp-hero-text { min-width: 0; }
.mp-kicker { margin: 0; font-size: 13.5px; opacity: .85; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.mp-hero h1 { margin: 2px 0 2px; font-size: clamp(26px, 6vw, 38px); overflow-wrap: anywhere; }
.mp-sub { margin: 0; font-size: 14px; opacity: .9; display: flex; align-items: center; gap: 5px; }
.mp-hero .guild-links { margin-top: 14px; }
.mp-hero .guild-links .btn { background: rgba(255, 255, 255, .94); color: #111827; border-color: transparent; }
.mp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 14px 0; }
.mp-card { display: grid; gap: 6px; align-content: start; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.mp-card-label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 500; }
.mp-card-label .ic { color: var(--accent-text); }
.mp-war-mode { font-size: 24px; line-height: 1.1; }
.mp-war-when { font-size: 14px; }
.mp-war-count { font-size: 14px; color: var(--muted); }
.mp-war-count b { font-size: 22px; color: var(--text); font-variant-numeric: tabular-nums; }
.mp-me p { margin: 0; font-size: 14px; }
.mp-me select { margin-top: 4px; }
.mp-me-who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mp-me-who i { width: 12px; height: 12px; border-radius: 4px; background: var(--c); }
.mp-me-who .link-btn { margin: 0 0 0 auto; font-size: 13px; text-decoration: underline; }
.mp-spots { list-style: none; margin: 4px 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.mp-spots .ic { color: #d97706; }
.mp-me .btn { justify-self: start; }
.mp-roster { margin-top: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 4px 16px; box-shadow: var(--shadow); }
.mp-roster summary { cursor: pointer; padding: 12px 0; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.mp-roster summary .muted { margin-left: auto; font-weight: 400; }
.mp-cls { margin-bottom: 12px; }
.cls-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; gap: 2px; }
.cls-bar span { background: var(--c); }
.cls-legend { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; }
.cls-legend li { display: inline-flex; align-items: center; gap: 5px; }
.cls-legend i { width: 9px; height: 9px; border-radius: 3px; background: var(--c); }
.mp-names { list-style: none; padding: 0; margin: 0 0 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px; }
.mp-names li { display: grid; padding: 6px 10px; border-radius: 9px; background: var(--surface-2); border-left: 3px solid var(--c); font-size: 13px; }
.mp-names li span { color: var(--muted); font-size: 12px; }
#selfBody .action-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
#selfBody .action-card { grid-template-columns: auto 1fr; align-items: center; column-gap: 12px; padding: 14px 16px; }
#selfBody .action-card .action-icon { grid-row: span 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); }
#selfBody .action-card .action-icon .ic { width: 22px; height: 22px; }
#selfBody .action-card strong { font-size: 15.5px; }
#selfBody .action-card .muted { font-size: 13px; }
@media (max-width: 560px) {
  .mp-hero { padding: 18px 16px; border-radius: 16px; }
  .mp-avatar { --av: 64px !important; }
  #selfBody .action-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #selfBody .action-card { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 12px 6px; }
  #selfBody .action-card .action-icon { grid-row: auto; width: 40px; height: 40px; }
  #selfBody .action-card strong { font-size: 13px; }
}
.lock-avatar { display: flex; justify-content: center; margin-bottom: 10px; }

/* ---------- landing ---------- */
.lp-wrap { max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.lp-hero { padding: clamp(36px, 6vw, 72px) 0 clamp(28px, 5vw, 56px); overflow: hidden;
  background:
    radial-gradient(600px 300px at 85% 20%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%),
    linear-gradient(var(--bg), var(--bg)); }
.lp-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.lp-hero h1 { font-size: clamp(34px, 5.2vw, 60px); font-weight: 700; line-height: 1.08; letter-spacing: -0.015em; margin: 0 0 16px; }
.lp-lead { font-size: clamp(16px, 1.8vw, 19px); color: var(--muted); max-width: 34em; margin: 0 0 22px; }
.lp-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.lp-note { margin: 14px 0 0; font-size: 13.5px; color: var(--muted); }
.lp-stage { position: relative; padding: 0 0 36px 0; }
.lp-stage .dev-laptop { width: 100%; }
.lp-stage .dev-phone { position: absolute; right: 0; bottom: 0; width: 27%; min-width: 120px; }
.lp-section { padding: clamp(40px, 6vw, 80px) 0; }
.lp-section + .lp-section { border-top: 1px solid var(--line); }
.lp-h2 { font-size: clamp(26px, 3.4vw, 38px); margin: 0 0 28px; letter-spacing: -0.01em; }
.lp-show { display: grid; gap: clamp(36px, 6vw, 72px); }
.lp-feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(20px, 4vw, 56px); align-items: center; }
.lp-feature.flip .lp-feature-text { order: 2; }
.lp-feature h3 { font-size: clamp(21px, 2.4vw, 27px); margin: 0 0 10px; }
.lp-feature p { color: var(--muted); font-size: 16px; }
.lp-feature ul, .lp-plan ul { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 7px; }
.lp-feature li, .lp-plan li { display: flex; gap: 8px; align-items: baseline; font-size: 15px; }
.lp-feature li .ic, .lp-plan li .ic { color: var(--ok); flex: none; }
.lp-feature-media { display: flex; justify-content: center; }
.lp-media-phone .dev-phone { width: min(260px, 70%); }
.lp-media-laptop .dev-laptop { width: 100%; }
.lp-steps-sec { background: var(--surface); }
.lp-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.lp-steps li { padding: 20px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg); }
.lp-step-n { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-weight: 700; margin-bottom: 12px; }
.lp-steps h3 { font-size: 18px; margin: 0 0 6px; }
.lp-steps p { margin: 0; color: var(--muted); font-size: 15px; }
.lp-price-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.lp-price-head .lp-h2 { margin: 0; }
.lp-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.lp-plan { padding: 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.lp-plan-hot { border: 2px solid var(--accent); }
.lp-plan h3 { margin: 0 0 4px; font-size: 19px; }
.lp-price { margin: 0; font-size: 32px; font-weight: 700; }
.lp-price small { font-size: 14px; font-weight: 400; color: var(--muted); }
.lp-price-alt { margin: 2px 0 0; font-size: 13.5px; color: var(--ok); }
.lp-fine { margin: 16px 0 0; font-size: 13.5px; color: var(--muted); }
.lp-faq-wrap { max-width: 820px; }
.lp-faq details { border-bottom: 1px solid var(--line); }
.lp-faq summary { cursor: pointer; padding: 16px 0; font-weight: 500; font-size: 16.5px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: "+"; color: var(--muted); font-size: 20px; line-height: 1; }
.lp-faq details[open] summary::after { content: "−"; }
.lp-faq p { margin: 0 0 16px; color: var(--muted); }
.lp-final { padding: clamp(44px, 6vw, 80px) 0; text-align: center; background: var(--accent-soft); border-top: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.lp-final h2 { font-size: clamp(26px, 3.4vw, 38px); margin: 0 0 8px; }
.lp-final p { color: var(--muted); margin: 0 0 22px; }
.lp-final .lp-cta { justify-content: center; }
@media (max-width: 900px) {
  .lp-hero-grid, .lp-feature { grid-template-columns: 1fr; }
  .lp-feature.flip .lp-feature-text { order: 0; }
  .lp-stage { max-width: 620px; }
  .lp-steps, .lp-plans { grid-template-columns: 1fr; }
}

/* device frames */
.dev { position: relative; }
.dev-screen { position: relative; overflow: hidden; background: var(--bg); }
.dev-screen img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.dev-laptop .dev-lid { padding: 10px 10px 12px; border-radius: 16px 16px 4px 4px; background: #1f2633; box-shadow: 0 30px 60px rgba(16, 24, 40, .22); }
.dev-laptop .dev-screen { aspect-ratio: 16 / 10; border-radius: 6px; }
.dev-laptop .dev-base { height: 12px; margin: 0 -5%; border-radius: 0 0 14px 14px; background: linear-gradient(#cdd3de, #9aa3b2); }
[data-theme="dark"] .dev-laptop .dev-base { background: linear-gradient(#475066, #2a3142); }
.dev-phone { padding: 7px; border-radius: 30px; background: #1f2633; box-shadow: 0 24px 48px rgba(16, 24, 40, .28); }
.dev-phone .dev-screen { aspect-ratio: 9 / 19; border-radius: 24px; }

/* drawn previews */
.sk { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 5px; padding: 6px; font-size: 0; background: var(--bg); }
.sk i { display: block; border-radius: 2px; background: color-mix(in srgb, var(--c) 30%, var(--surface)); border-left: 2px solid var(--c); }
.sk i.sk-empty { background: none; border: 1px dashed var(--line-2); }
.sk-bar { display: inline-block; height: 5px; border-radius: 3px; background: var(--line-2); }
.sk-bar.light { background: rgba(255, 255, 255, .55); }
.w10 { width: 10%; } .w20 { width: 20%; } .w30 { width: 30%; } .w35 { width: 35%; } .w40 { width: 40%; } .w45 { width: 45%; }
.w50 { width: 50%; } .w55 { width: 55%; } .w60 { width: 60%; } .w62 { width: 62%; } .w70 { width: 70%; }
.sk-top { display: flex; align-items: center; gap: 5px; height: 12px; padding: 0 4px; background: var(--surface); border-radius: 3px; }
.sk-dot { width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }
.sk-bar.right { margin-left: auto; }
.sk-tabs { display: flex; gap: 6px; padding: 0 4px; }
.sk-tabs span { width: 22px; height: 4px; border-radius: 2px; background: var(--line); }
.sk-tabs span.on { background: var(--accent); }
.sk-body { flex: 1; display: grid; grid-template-columns: 15% 1fr; gap: 5px; min-height: 0; }
.sk-pool { display: grid; gap: 3px; align-content: start; padding: 4px; border-radius: 4px; background: var(--surface); }
.sk-pool i { height: 9px; }
.sk-raids { display: grid; gap: 5px; align-content: start; }
.sk-raid { padding: 4px; border-radius: 4px; background: var(--surface); border-top: 2px solid var(--rc); }
.sk-raid b { display: block; width: 18%; height: 4px; border-radius: 2px; background: var(--rc); margin-bottom: 4px; }
.sk-parties { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; }
.sk-parties-2 { grid-template-columns: repeat(2, 1fr); }
.sk-party { display: grid; gap: 2px; padding: 2px; border-radius: 3px; background: var(--surface-2); }
.sk-party i { height: 8px; }
.sk-phone { padding: 0; gap: 6px; }
.sk-hero { display: grid; gap: 5px; padding: 18px 10px 12px; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 45%, #0f172a)); }
.sk-emblem { width: 26px; height: 26px; border-radius: 8px; background: rgba(255, 255, 255, .35); }
.sk-war, .sk-live, .sk-row { margin: 0 8px; }
.sk-war { display: flex; justify-content: space-between; align-items: center; padding: 7px 8px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); }
.sk-war strong { font-size: 11px; color: var(--text); font-variant-numeric: tabular-nums; }
.sk-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin: 0 8px; }
.sk-actions span { height: 26px; border-radius: 7px; background: var(--surface); border: 1px solid var(--line); }
.sk-live span { display: block; width: 46%; height: 10px; border-radius: 999px; background: #22c55e; }
.sk-raid-sm { margin: 0 8px; }
.sk-days { display: flex; gap: 4px; padding: 14px 8px 4px; }
.sk-days span { flex: 1; display: grid; place-items: center; height: 32px; border-radius: 7px; background: var(--surface); border: 1px solid var(--line); }
.sk-days span b { font-size: 10px; color: var(--muted); }
.sk-days span.on { border-color: var(--accent); background: var(--accent-soft); }
.sk-row { display: flex; align-items: center; gap: 6px; padding: 8px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); }
.sk-row i { width: 14px; height: 14px; border-radius: 4px; }
.sk-chat { padding: 10px; gap: 10px; background: #313338; }
.sk-msg { display: flex; gap: 8px; }
.sk-msg > div { flex: 1; display: grid; gap: 4px; }
.sk-ava { width: 18px; height: 18px; border-radius: 50%; background: var(--c); flex: none; }
.sk-chat .sk-bar { background: #4e5058; }
.sk-embed { display: grid; gap: 4px; padding: 7px 8px; border-radius: 4px; background: #2b2d31; border-left: 3px solid var(--c); }
/* table rows: undo the older card-style .roster-row rules */
.rtable tr.roster-row { display: table-row; grid-template-columns: none; padding: 0; border: 0; border-radius: 0; background: transparent; opacity: 1; }
.rtable tr.roster-row.selected { background: var(--accent-soft); border: 0; }
.rtable-wrap { overflow: clip; }
.lp-media-phone .dev-phone { width: min(230px, 62%); }
.lp-hero, .lp-section, .lp-final { overflow-x: clip; }
@media (max-width: 760px) {
  .rtable tr.roster-row { display: grid; }
}
@media (max-width: 760px) {
  .rtable tbody tr.roster-row {
    display: grid; width: 100%; grid-template-columns: 30px minmax(0, 1fr) auto; grid-template-areas: "sel name edit" "sel cls edit";
    gap: 2px 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); align-items: center;
  }
  .rtable:not(.selectable) tbody tr.roster-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name edit" "cls edit"; }
  .rtable tbody tr.roster-row > td { display: none !important; padding: 0; border: 0; }
  .rtable tbody tr.roster-row > td.c-sel { display: block !important; grid-area: sel; }
  .rtable tbody tr.roster-row > td.c-name { display: block !important; grid-area: name; }
  .rtable tbody tr.roster-row > td.c-cls { display: block !important; grid-area: cls; }
  .rtable tbody tr.roster-row > td.c-edit { display: block !important; grid-area: edit; }
  .rtable tbody tr.roster-row:last-child { border-bottom: 0; }
}
.st-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.st-tile { grid-template-columns: 34px minmax(0, 1fr) auto; grid-template-areas: "ico text pill"; align-items: center; }
.st-ico { grid-area: ico; } .st-text { grid-area: text; } .st-pill { grid-area: pill; align-self: start; }
.st-text strong { line-height: 1.3; }
.log-compact li { padding: 5px 14px; }

/* =====================================================================
   v2.1: mobile board, themes, event alerts, news, week calendar
   ===================================================================== */
.ws-tabs { overflow-y: hidden; touch-action: pan-x; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.ws-tabbar { touch-action: pan-x; }

/* delete guild: quiet, folded */
.danger-quiet { margin-top: 8px; padding: 6px 2px; opacity: .65; font-size: 13.5px; }
.danger-quiet:hover, .danger-quiet[open] { opacity: 1; }
.danger-quiet summary { cursor: pointer; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; list-style: none; }
.danger-quiet summary::-webkit-details-marker { display: none; }
.danger-quiet p { margin: 8px 0; font-size: 13px; }

/* board: raid header */
.raid-h { flex-wrap: nowrap; align-items: flex-start; }
.raid-h-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; flex: 1; }
.raid-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.raid-tools { display: flex; align-items: center; gap: 4px; flex: none; }
.btn-icon { width: 32px; height: 32px; padding: 0; }
.raid-del:hover { color: var(--bad); }
.raid-name-wrap { position: relative; display: inline-flex; align-items: center; gap: 2px; cursor: text; }
.raid-name-pen { display: inline-flex; color: var(--muted); opacity: .55; }
.raid-name-pen .ic { width: 14px; height: 14px; }
.raid-name-wrap:hover .raid-name-pen { opacity: 1; color: var(--raid); }
.raid-name-wrap:focus-within .raid-name-pen { display: none; }
.is-exporting .raid-name-pen { display: none !important; }
.note-add {
  display: flex; align-items: center; gap: 6px; width: 100%; margin: 0 0 10px; padding: 8px 12px; border-radius: 10px;
  border: 1.5px dashed var(--raid-line); background: var(--raid-soft); color: var(--raid); font: inherit; font-size: 14px; cursor: pointer; text-align: left;
}
.note-add:hover { border-style: solid; }
.raid-note.editable { position: relative; }
.raid-note.editable::after { content: "✎"; position: absolute; top: 6px; right: 10px; color: var(--raid); opacity: .6; }
.slot-plus { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: var(--muted); font-size: 15px; line-height: 1; opacity: .55; }
.slot:hover .slot-plus { opacity: 1; color: var(--accent-text); }
@media (max-width: 560px) {
  .raid-h { flex-wrap: wrap; }
  .raid-h-main { flex-basis: 100%; }
  .raid-tools { width: 100%; justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 6px; margin-top: 2px; }
  .raid-tools .raid-parties-select { margin-right: auto; }
  .raid .raid-name-input { border-bottom: 1.5px dashed var(--raid-line); border-radius: 0; }
  .raid-name-pen { opacity: .9; }
  .slot-plus { opacity: .8; }
}

/* leave chip */
.leave-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; }
.leave-chip.has { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); background: color-mix(in srgb, var(--warn) 8%, var(--surface)); }
.leave-pop { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 8px; }
.leave-pop li { display: grid; grid-template-columns: minmax(0, 170px) 1fr auto; gap: 10px; align-items: center; }
.leave-pop-info { display: grid; font-size: 13.5px; }
@media (max-width: 560px) { .leave-pop li { grid-template-columns: 1fr auto; } .leave-pop-info { grid-column: 1 / -1; } }

/* pool: folds on phones */
.pool-h { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; color: var(--text); font: inherit; padding: 0; cursor: default; text-align: left; }
.pool-n { margin-left: auto; color: var(--muted); }
.pool-hint, .pool-caret { display: none; }
@media (max-width: 860px) {
  .pool { position: sticky; top: calc(var(--topbar-h) + var(--tabbar-h)); z-index: 6; max-height: none; padding: 8px 12px; }
  .pool-h { cursor: pointer; flex-wrap: wrap; row-gap: 0; }
  .pool-n { margin-left: 0; padding: 0 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
  .pool-hint { display: block; flex-basis: 100%; order: 3; font-size: 12px; color: var(--muted); }
  .pool-caret { display: inline-flex; margin-left: auto; color: var(--muted); transition: transform .15s; }
  .pool.open .pool-caret { transform: rotate(90deg); }
  .pool:not(.open) > :not(.pool-h) { display: none; }
  .pool.open .pool-list { max-height: 45vh; }
}

/* slot picker sheet */
.modal-sheet { padding: 16px 16px 12px; width: min(560px, calc(100vw - 16px)); }
@media (max-width: 560px) {
  .modal-sheet { margin: auto 0 0; width: 100vw; max-width: 100vw; max-height: 85vh; border-radius: 18px 18px 0 0; }
}
.picker { display: grid; gap: 10px; }
.picker-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-right: 36px; }
.picker-head > div { display: grid; }
.picker-head .muted { font-size: 13px; }
.pick-cls { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.pick-cls button { flex: none; }
.pick-list-wrap { display: grid; gap: 5px; max-height: 52vh; overflow-y: auto; }
.pick-sec { font-size: 12px; font-weight: 500; color: var(--muted); margin: 6px 2px 0; display: flex; align-items: center; gap: 4px; }
.pick-row { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; }
.pick-row .chip { padding: 7px 10px 7px 10px; }
.pick-row .chip-name { font-size: 14.5px; }
.pick-row .chip-meta { font-size: 12px; }

/* member page: name search */
.me-search { position: relative; }
.me-results { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 4px; max-height: 240px; overflow-y: auto; }
.me-results:empty { display: none; }
.me-results button { width: 100%; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.me-results button i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.me-results button span { margin-left: auto; color: var(--muted); font-size: 12.5px; }
.me-results li.muted { padding: 6px 4px; font-size: 13px; }

/* history range */
.log-head { align-items: flex-end; }
.log-range { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-left: auto; font-size: 13px; color: var(--muted); }
.log-range label { display: inline-flex; align-items: center; gap: 6px; }
.log-range input { width: auto; padding: 5px 8px; font-size: 13.5px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--text); font-family: inherit; }
.log-head .chip-tabs { flex-basis: 100%; }

/* upsell + plan pill */
.upsell { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 10px 0; border-radius: 12px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--premium) 12%, var(--surface)), var(--accent-soft)); border: 1px solid color-mix(in srgb, var(--premium) 35%, transparent); }
.upsell > .ic { width: 26px; height: 26px; color: var(--premium); flex: none; }
.upsell > div { display: grid; gap: 2px; flex: 1; min-width: 0; font-size: 14px; }
.upsell > div span { color: var(--muted); font-size: 13px; }
.upsell .btn { flex: none; }
.upsell[hidden] { display: none; }
.plan-pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  color: var(--premium); border: 1px solid color-mix(in srgb, var(--premium) 45%, transparent); background: color-mix(in srgb, var(--premium) 8%, var(--surface)); }
@media (max-width: 560px) { .upsell { flex-wrap: wrap; } .upsell .btn { width: 100%; } }

/* event alerts card */
.ev-h { font-size: 15px; margin: 18px 0 8px; display: flex; gap: 8px; align-items: baseline; }
.ev-h .muted { font-size: 12.5px; font-weight: 400; }
.ev-war { display: grid; grid-template-columns: minmax(180px, 1.4fr) auto auto; gap: 8px 16px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); margin-bottom: 8px; }
.ev-war .check { margin: 0; }
.ev-war-name { display: flex; gap: 10px; align-items: center; min-width: 0; }
.ev-war-name > div { display: grid; }
.ev-war-name .muted { font-size: 12.5px; }
.ev-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--accent-text); flex: none; }
.ev-before { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; white-space: nowrap; }
.ev-before select, .ev-flex-opts select { width: auto; padding: 6px 8px; font-size: 14px; }
.ev-days { display: grid; gap: 2px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ev-day { display: grid; grid-template-columns: 110px 1fr; gap: 2px 12px; padding: 9px 12px; border-bottom: 1px solid var(--line); align-items: start; }
.ev-day:last-child { border-bottom: 0; }
.ev-day > :not(.ev-day-name) { grid-column: 2; }
.ev-day-name { grid-row: span 9; font-weight: 500; font-size: 14px; padding-top: 2px; }
.ev-item.check { margin: 2px 0; font-size: 14px; flex-wrap: wrap; row-gap: 0; }
.ev-item strong { font-weight: 500; }
.ev-item .muted { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.ev-tag { font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); }
.ev-none { font-size: 13px; padding-top: 2px; }
.ev-flex .check { margin: 2px 0; font-size: 14px; }
.ev-flex-opts { display: flex; gap: 12px; flex-wrap: wrap; margin: 4px 0 4px 28px; font-size: 13.5px; color: var(--muted); }
.ev-flex-opts label { display: inline-flex; gap: 6px; align-items: center; }
.ev-everyone { margin-top: 14px; }
.ev-locked form { opacity: .62; pointer-events: none; user-select: none; }
@media (max-width: 640px) {
  .ev-war { grid-template-columns: 1fr auto; }
  .ev-war-name { grid-column: 1 / -1; }
  .ev-day { grid-template-columns: 1fr; }
  .ev-day > :not(.ev-day-name) { grid-column: 1; }
  .ev-day-name { grid-row: auto; color: var(--accent-text); }
}

/* news */
.news-layout { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 18px; align-items: start; }
.news-layout:not(:has(.news-compose)) { grid-template-columns: 1fr; }
.news-compose { margin: 0; position: sticky; top: calc(var(--topbar-h) + var(--tabbar-h) + 14px); }
.news-indent { margin-left: 28px !important; }
.news-feed { display: grid; gap: 10px; }
.news-feed-h { margin: 0 0 4px; font-size: 20px; display: flex; gap: 8px; align-items: baseline; }
.news-post { padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.news-post.pinned { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: linear-gradient(var(--accent-soft), var(--surface) 60%); }
.news-post header { display: grid; gap: 2px; margin-bottom: 6px; }
.news-post h3 { margin: 0; font-size: 17px; }
.news-post header .muted { font-size: 12.5px; }
.news-post p { margin: 0; white-space: normal; line-height: 1.6; }
.news-pin { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--accent-text); }
.news-pin .ic { width: 13px; height: 13px; }
.news-actions { display: flex; gap: 6px; margin-top: 8px; justify-content: flex-end; }
@media (max-width: 860px) { .news-layout { grid-template-columns: 1fr; } .news-compose { position: static; } }
.mp-news { margin-top: 24px; }
.mp-news h2 { font-size: 22px; }
.mp-news #newsList { display: grid; gap: 10px; }
.mp-news .btn { justify-self: start; }

/* member page: week calendar */
.mp-week { margin-top: 26px; }
.mp-week h2 { font-size: 22px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.mp-week h2 .muted { font-size: 13px; font-weight: 400; }
.wk-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.wk-days button { display: grid; justify-items: center; gap: 0; padding: 7px 2px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.wk-days button span { font-size: 12.5px; color: var(--muted); }
.wk-days button b { font-size: 17px; font-weight: 600; }
.wk-days button.today span { color: var(--accent-text); font-weight: 600; }
.wk-days button.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.wk-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.wk-list li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.wk-list li.wk-war { border-left: 4px solid var(--accent); }
.wk-time { display: grid; min-width: 46px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.wk-time small { font-weight: 400; color: var(--muted); font-size: 12px; }
.wk-name { display: grid; flex: 1; min-width: 0; }
.wk-name strong { font-weight: 500; }
.wk-name small { color: var(--muted); font-size: 12.5px; }
.wk-st { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.wk-st.live { color: #fff; background: #16a34a; }
.wk-st.done { color: var(--muted); background: var(--surface-2); }
.wk-st.soon { color: var(--accent-text); background: var(--accent-soft); }
.wk-empty { justify-content: center; }
.mp-war-mode small { font-size: 14px; font-weight: 500; color: var(--muted); }

/* billing: subscription */
.sub-box { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 12px 0 4px; border-radius: 12px; background: color-mix(in srgb, var(--ok) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); }
.sub-box > .ic { color: var(--ok); width: 22px; height: 22px; flex: none; }
.sub-box.off { background: var(--surface-2); border-color: var(--line); }
.sub-box.off > .ic { color: var(--muted); }
.sub-box > div { display: grid; flex: 1; font-size: 14px; }
.sub-box .muted { font-size: 13px; }
@media (max-width: 560px) { .sub-box { flex-wrap: wrap; } }

/* ---------- guild banner themes (with --g-accent) ---------- */
.gt { color: #fff; position: relative; isolation: isolate; }
.gt-classic { background: linear-gradient(135deg, var(--g-accent), color-mix(in srgb, var(--g-accent) 45%, #0f172a)); }
.gt-midnight { background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--g-accent) 55%, transparent), transparent 55%), linear-gradient(160deg, #0b1220, #151d33); }
.gt-aurora { background: radial-gradient(80% 120% at 10% 0%, color-mix(in srgb, var(--g-accent) 85%, transparent), transparent 60%), radial-gradient(70% 120% at 90% 100%, rgba(45, 212, 191, .75), transparent 60%), linear-gradient(135deg, #1e1b4b, #312e81); }
.gt-sunset { background: linear-gradient(120deg, var(--g-accent), #f43f5e 55%, #fb923c); }
.gt-steel { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .04) 0 2px, transparent 2px 10px), linear-gradient(135deg, #374151, #111827); box-shadow: inset 6px 0 0 var(--g-accent); }
.gt-royal { background: repeating-linear-gradient(45deg, rgba(250, 204, 21, .10) 0 1px, transparent 1px 16px), linear-gradient(135deg, color-mix(in srgb, var(--g-accent) 50%, #3b0764), #1e0a3c); }
.gt-ember { background: radial-gradient(90% 130% at 85% 110%, color-mix(in srgb, var(--g-accent) 80%, #ef4444), transparent 60%), linear-gradient(160deg, #1c0a0a, #3f1010); }
.gt-forest { background: radial-gradient(90% 140% at 0% 0%, color-mix(in srgb, var(--g-accent) 45%, transparent), transparent 60%), linear-gradient(140deg, #064e3b, #052e1f); }
.gt-neon { background: linear-gradient(transparent 95%, color-mix(in srgb, var(--g-accent) 40%, transparent) 95%) 0 0 / 100% 22px, linear-gradient(90deg, transparent 95%, color-mix(in srgb, var(--g-accent) 40%, transparent) 95%) 0 0 / 22px 100%, #0a0a14; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--g-accent) 60%, transparent); }
.gt-frost { background: radial-gradient(100% 140% at 100% 0%, color-mix(in srgb, var(--g-accent) 30%, transparent), transparent 60%), linear-gradient(135deg, #f8fafc, #e0f2fe); color: #0f172a; }
.gt-frost .welcome-box { background: rgba(15, 23, 42, .06); }
.gt-frost .mp-kicker, .gt-frost .mp-sub { color: #334155; opacity: 1; }
.gt-light .g-avatar { box-shadow: 0 0 0 3px rgba(255, 255, 255, .9), 0 6px 16px rgba(15, 23, 42, .15); }
.gt-light.guild-banner, .gt-light.mp-hero { border: 1px solid var(--line); }
.mp-hero.gt::after { z-index: -1; }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.theme-opt { position: relative; display: grid; gap: 4px; cursor: pointer; }
.theme-opt input { position: absolute; opacity: 0; pointer-events: none; }
.theme-swatch { display: flex; align-items: flex-end; height: 58px; padding: 8px; border-radius: 10px; border: 2px solid transparent; overflow: hidden; }
.theme-swatch b { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.theme-opt small { font-size: 12.5px; color: var(--muted); text-align: center; }
.theme-opt input:checked + .theme-swatch { border-color: var(--text); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.theme-opt input:disabled + .theme-swatch { cursor: default; }
.accent-row { gap: 7px; }
.accent-opt span { width: 28px; height: 28px; }
/* phones: keep the board close to the top */
@media (max-width: 560px) {
  .tab-board .board-top { gap: 8px; margin-bottom: 8px; }
  .tab-board .war-chip { font-size: 12.5px; padding: 4px 10px; }
  .tab-board .board-stats { gap: 8px; font-size: 14px; }
  .tab-board .war-date { font-size: 13px; }
  .publish-bar { padding: 10px 12px; gap: 8px; flex-wrap: nowrap; }
  .publish-info { gap: 8px; }
  .publish-info .muted { display: none; }
  .publish-info strong { font-size: 14px; line-height: 1.3; }
  .publish-actions { width: auto; flex-wrap: nowrap; }
  .publish-actions .btn-ghost span, .publish-actions #unpublishBtn { padding: 0 6px; }
  .btn-publish { width: auto; font-size: 14px; padding: 8px 12px; }
  .board-toolbar { margin-bottom: 8px; }
}
/* v2.2 fixes */
body { overflow-x: clip; }
.main, .ws-body, .ws-inner { min-width: 0; max-width: 100%; }
.ws-body, .ws-inner { max-width: var(--ws-max); }
.gcard-avatar { position: relative; z-index: 1; }
.danger-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--bad) 35%, transparent); background: color-mix(in srgb, var(--bad) 5%, var(--surface)); }
.danger-row > div { display: grid; gap: 2px; }
.danger-row strong { display: inline-flex; align-items: center; gap: 6px; color: var(--bad); font-size: 15px; font-weight: 500; }
.danger-row span { font-size: 13px; color: var(--muted); }
.hook-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 12px; margin-bottom: 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; }
.hook-row > span { display: inline-flex; align-items: center; gap: 6px; }
/* appearance: compact controls */
.look-uploads { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.look-up { display: grid; gap: 6px; align-content: start; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.look-label { font-weight: 500; font-size: 15px; }
.look-up .help { margin: 0; }
.logo-row { gap: 12px; }
.logo-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.banner-thumb { display: grid; place-items: center; width: 120px; height: 40px; border-radius: 8px; overflow: hidden; background: var(--surface); border: 1px dashed var(--line-2); color: var(--muted); flex: none; }
.banner-thumb img { width: 100%; height: 100%; object-fit: cover; }
.look-style .accent-row { gap: 6px; }
.look-style .accent-opt span { width: 24px; height: 24px; border-width: 2px; }
.theme-grid { grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 6px; }
.theme-swatch { height: 34px; padding: 0; border-radius: 8px; }
.theme-opt small { font-size: 11.5px; }
.theme-grid.is-off { opacity: .45; }
.look-emblem { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.look-emblem summary { cursor: pointer; font-weight: 500; font-size: 15px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.look-emblem .emblem-grid { margin-top: 8px; grid-template-columns: repeat(auto-fill, minmax(36px, 1fr)); gap: 4px; }
.look-emblem .emblem-opt span { height: 36px; font-size: 18px; }
.emblem-now { font-size: 18px; }
.has-img { color: #fff !important; }
.has-img .mp-kicker, .has-img .mp-sub { color: #fff !important; opacity: .92; }
.mp-hero.has-img .mp-avatar { box-shadow: 0 0 0 3px rgba(255, 255, 255, .85), 0 10px 28px rgba(0, 0, 0, .55); }
.mp-hero.has-img h1 { text-shadow: 0 2px 12px rgba(0, 0, 0, .55); }
.mp-hero.has-img .welcome-box { background: rgba(10, 14, 22, .45); backdrop-filter: blur(4px); }
.mp-hero.has-img { min-height: 210px; display: flex; flex-direction: column; justify-content: flex-end; }
.guild-banner.has-img { min-height: 110px; align-items: flex-end; }
.guild-banner.has-img .g-avatar, .gcard-cover.has-img + .gcard-body .gcard-avatar { box-shadow: 0 0 0 3px rgba(255, 255, 255, .85), 0 6px 18px rgba(0, 0, 0, .45); }
.gcard-cover.has-img { height: 72px; }
@media (max-width: 640px) { .look-uploads { grid-template-columns: 1fr; } }
/* member page: weekly calendar grid */
.cal-scroll { overflow-x: auto; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); -webkit-overflow-scrolling: touch; }
.cal { width: 100%; min-width: 760px; border-collapse: separate; border-spacing: 4px; table-layout: fixed; }
.cal thead th { font-size: 13px; font-weight: 600; color: var(--muted); padding: 8px 2px; border-radius: 8px; background: var(--surface-2); }
.cal thead th:first-child { background: none; width: 52px; }
.cal thead th.today { background: var(--accent); color: var(--accent-ink); }
.cal tbody th { position: sticky; left: 0; z-index: 1; background: var(--surface); font-size: 12.5px; font-weight: 600; color: var(--accent-text); font-variant-numeric: tabular-nums; text-align: right; padding-right: 6px; }
.cal td { vertical-align: top; padding: 0; background: var(--surface-2); border-radius: 8px; height: 44px; }
.cal td.today { background: color-mix(in srgb, var(--accent) 9%, var(--surface-2)); }
.cal-ev { display: grid; gap: 1px; width: 100%; padding: 6px 7px; border: 1px solid color-mix(in srgb, var(--info) 30%, var(--line)); border-radius: 8px; background: color-mix(in srgb, var(--info) 10%, var(--surface)); color: var(--text); font: inherit; text-align: left; cursor: pointer; position: relative; }
.cal-ev + .cal-ev { margin-top: 3px; }
.cal-ev strong { font-size: 12px; font-weight: 600; line-height: 1.25; }
.cal-ev span { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cal-ev.war { border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: var(--accent-soft); }
.cal-ev.war strong { color: var(--accent-text); }
.cal-ev.live { box-shadow: 0 0 0 2px #16a34a; }
.cal-ev.done { opacity: .5; }
.cal-ev.off { opacity: .45; border-style: dashed; }
.cal-ev.on { box-shadow: 0 0 0 2px var(--text); }
.cal-live, .cal-nth { font-style: normal; font-size: 10px; font-weight: 700; padding: 0 6px; border-radius: 999px; justify-self: start; }
.cal-live { background: #16a34a; color: #fff; }
.cal-nth { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.cal-detail { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; }
.cal-detail strong { flex-basis: 100%; font-size: 16px; }
.cal-tip { margin: 8px 2px 0; font-size: 13px; }
.ev-tag-gray { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.live-note { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 60; display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px; border: 0; background: var(--text); color: var(--bg); font: inherit; font-weight: 500; box-shadow: var(--shadow-lg); cursor: pointer; }
.info-btn { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 4px; padding: 0; border-radius: 50%; vertical-align: 2px;
  border: 1.5px solid var(--line-2); background: var(--surface); color: var(--muted); font: italic 700 11px/1 Georgia, "Times New Roman", serif; cursor: pointer; flex: none; }
.info-btn:hover { border-color: var(--accent); color: var(--accent-text); }
.info-btn.static { width: 24px; height: 24px; font-size: 14px; border-color: var(--accent); color: var(--accent-text); cursor: default; }
.help-pop h2 { display: flex; align-items: center; gap: 8px; }
.help-pop p { line-height: 1.65; }
/* polls */
.news-switch { margin-bottom: 14px; }
.news-switch button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; font-size: 14px; }
.poll-list { display: grid; gap: 12px; }
.poll-compose { margin: 0 0 16px; }
.poll-kind { margin-bottom: 12px; }
.poll-fill { margin: 0 0 0 8px; font-size: 13px; color: var(--accent-text); text-decoration: underline; }
.poll-card { padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.poll-card header { display: grid; gap: 2px; margin-bottom: 8px; }
.poll-card h3 { margin: 0; font-size: 17px; }
.poll-card header .muted { font-size: 12.5px; }
.poll-card.closed { opacity: .92; }
.poll-st { justify-self: start; font-size: 11.5px; font-weight: 700; padding: 1px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.poll-st.open { background: #16a34a; color: #fff; border-color: #16a34a; }
.poll-group { font-size: 13.5px; font-weight: 600; margin: 10px 0 6px; }
.poll-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.poll-bars li { display: grid; grid-template-columns: minmax(90px, 200px) 1fr 30px; gap: 8px; align-items: center; font-size: 14px; }
.poll-bars .pb-label { display: flex; align-items: center; gap: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poll-bars .pb-label img, .poll-opt img { width: 26px; height: 26px; border-radius: 6px; object-fit: cover; }
.poll-bars .pb-label i .ic { width: 14px; height: 14px; color: var(--ok); }
.poll-bars .pb-track { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.poll-bars .pb-track span { display: block; height: 100%; background: var(--line-2); border-radius: inherit; }
.poll-bars li.top .pb-track span { background: var(--accent); }
.poll-bars li.top .pb-label { font-weight: 600; }
.poll-bars b { text-align: right; font-variant-numeric: tabular-nums; }
.poll-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.poll-opt { position: relative; cursor: pointer; }
.poll-opt input { position: absolute; opacity: 0; pointer-events: none; }
.poll-opt span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); font-size: 14.5px; }
.poll-opt span b { font-size: 12px; font-weight: 600; color: var(--muted); padding: 0 6px; border-radius: 999px; background: var(--surface-2); }
.poll-opt input:checked + span { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); font-weight: 500; }
.poll-pin { width: 120px; margin-top: 10px; text-align: center; letter-spacing: .3em; }
.poll-foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.poll-foot .muted { font-size: 13px; }
.poll-who { margin-top: 8px; font-size: 13px; }
.poll-who summary { cursor: pointer; color: var(--muted); }
.poll-who p { margin: 4px 0 0; }
.mp-polls { margin-top: 24px; }
/* legal / changelog */
.legal { max-width: 760px; }
.legal h2 { font-size: 19px; margin-top: 26px; }
.legal p { line-height: 1.75; }
.legal-updated { margin-top: -8px; font-size: 13.5px; }
.legal-links { margin-top: 30px; font-size: 14px; }
.cl-item { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.cl-item h2 { font-size: 17px; margin: 0 0 6px; }
.cl-item h2 .muted { font-weight: 400; font-size: 13px; }
.cl-item ul { margin: 0; padding-left: 20px; line-height: 1.7; }
.app-foot a { color: inherit; }
.check.accept { align-items: flex-start; font-size: 14px; margin: 6px 0 12px; }
.check.accept input { margin-top: 3px; flex: none; }
.check.accept a { color: var(--accent-text); }
.pay-method:disabled { opacity: .5; cursor: not-allowed; }
.ev-war { grid-template-columns: minmax(170px, 240px) 1fr; align-items: center; }
.ev-war-opts { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center; }
.ev-war-opts .check { margin: 0; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.ev-war-opts select { width: auto; padding: 4px 8px; font-size: 14px; }
.ev-preview { grid-column: 1 / -1; margin: 0; font-size: 13px; color: var(--accent-text); }
.ev-preview span { display: block; }
.ev-channel { display: grid; gap: 6px; padding: 12px 14px; margin-bottom: 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.ev-channel-h { display: flex; align-items: center; gap: 6px; font-weight: 500; }
.radio-line { display: flex; align-items: center; gap: 8px; font-size: 14px; flex-wrap: wrap; cursor: pointer; }
.radio-line input { accent-color: var(--accent); }
.ev-channel .help { margin: 0; }
@media (max-width: 640px) { .ev-war { grid-template-columns: 1fr; } }

/* ---- v1.21: game export import ---- */
.imp-game { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 10px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft, rgba(99,102,241,.08)); font-size: 13px; }
.imp-game > svg { flex: none; margin-top: 2px; color: var(--accent-text); }
.imp-game div { display: grid; gap: 2px; }
.imp-game span { color: var(--muted); }
.imp-warn { margin: 6px 0; padding: 8px 10px; border-radius: 8px; background: rgba(245,158,11,.12); color: #b45309; font-size: 13px; }
.imp-cls { max-width: 46%; font-size: 13px; padding: 4px 6px; }
.imp-list li { gap: 8px; }

/* ---- v1.21: calendar settings ---- */
.calc-days { display: grid; gap: 8px; margin-bottom: 14px; }
.calc-day { display: grid; grid-template-columns: 110px 1fr; gap: 8px; align-items: start; }
.calc-day-name { font-weight: 600; font-size: 13px; padding-top: 6px; }
.calc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.calc-chip { display: inline-flex; cursor: pointer; }
.calc-chip input { position: absolute; opacity: 0; pointer-events: none; }
.calc-chip span { padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13px; color: var(--muted); text-decoration: line-through; background: var(--surface); }
.calc-chip small { opacity: .7; margin-left: 2px; }
.calc-chip input:checked + span { color: var(--text, inherit); text-decoration: none; border-color: var(--accent); background: var(--accent-soft); }
.calc-chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.calc-row { display: grid; grid-template-columns: minmax(140px, 1fr) 130px auto auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.calc-time { display: inline-flex; align-items: center; gap: 4px; }
.calc-time input { width: 104px; }
.calc-empty { margin: 4px 0 10px; }
@media (max-width: 640px) {
  .calc-day { grid-template-columns: 1fr; gap: 4px; }
  .calc-day-name { padding-top: 0; }
  .calc-row { grid-template-columns: 1fr auto; padding: 8px; border: 1px solid var(--line); border-radius: 10px; }
  .calc-row input[name=title] { grid-column: 1 / -1; }
  .calc-row select { grid-column: 1; }
  .calc-time { grid-column: 1; }
  .calc-del { grid-column: 2; grid-row: 2 / 4; }
}

/* ---- v1.21: member page week, one box per day ---- */
#weekCal { display: grid; gap: 6px; }
.wk-day { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.wk-day.today { border-color: var(--g-accent, var(--accent)); box-shadow: 0 0 0 1px var(--g-accent, var(--accent)) inset; }
.wk-day summary { display: flex; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer; list-style: none; font-size: 14px; }
.wk-day summary::-webkit-details-marker { display: none; }
.wk-day summary > svg { width: 16px; height: 16px; color: var(--muted); transition: transform .15s; }
.wk-day[open] summary > svg { transform: rotate(90deg); }
.wk-dname { flex: 1; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.wk-today { font-style: normal; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--g-accent, var(--accent)); color: #fff; }
.wk-count { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.wk-dot { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,.2); }
.wk-day ul { list-style: none; margin: 0; padding: 0 12px 10px; display: grid; gap: 4px; }
.wk-row { display: grid; grid-template-columns: 96px 1fr auto; gap: 8px; align-items: center; padding: 7px 10px; border-radius: 8px; background: var(--surface-2); font-size: 13px; border-left: 3px solid transparent; }
.wk-row.war { border-left-color: #dc2626; }
.wk-row.own { border-left-color: var(--g-accent, var(--accent)); }
.wk-row.done, .wk-row.off { opacity: .5; }
.wk-row.live { background: rgba(22,163,74,.12); }
.wk-time { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }
.wk-name { font-weight: 600; min-width: 0; }
.wk-name small { font-weight: 400; color: var(--muted); }
.wk-tags { display: inline-flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.wk-tags i { font-style: normal; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.wk-tags i.live { background: #16a34a; color: #fff; border-color: #16a34a; }
.wk-tags i.own { color: var(--accent-text); }
@media (max-width: 480px) { .wk-row { grid-template-columns: 82px 1fr; } .wk-tags { grid-column: 1 / -1; justify-content: flex-start; } .wk-tags:empty { display: none; } }

/* ---- v1.21: tap-to-vote tiles ---- */
.vt { display: grid; gap: 14px; margin-top: 10px; }
.vt-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; font-size: 14px; }
.vt-count { font-size: 12px; font-weight: 600; color: var(--muted); padding: 2px 9px; border-radius: 999px; background: var(--surface-2); font-variant-numeric: tabular-nums; }
.vt-count.full { background: var(--accent); color: #fff; }
.vt-count:empty { display: none; }
.vt-grid { display: grid; gap: 8px; }
.vt-grid.boss { grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); }
.vt-grid.choice { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.vt-tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px 6px; min-height: 48px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--surface); color: inherit; font: inherit; cursor: pointer; transition: transform .08s, border-color .12s, opacity .12s; -webkit-tap-highlight-color: transparent; }
.vt-tile:active { transform: scale(.96); }
.vt-tile.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.vt-tile.dim { opacity: .45; }
.vt-grid.choice .vt-tile { font-size: 15px; font-weight: 600; }
.vt-pic { width: 58px; height: 58px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: var(--surface-2); }
.vt-pic img { width: 100%; height: 100%; object-fit: cover; }
.vt-letters { background: linear-gradient(140deg, hsl(var(--h) 55% 42%), hsl(calc(var(--h) + 40) 60% 28%)); color: #fff; font-weight: 800; font-size: 20px; letter-spacing: .5px; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.vt-name { font-size: 12.5px; font-weight: 600; line-height: 1.2; text-align: center; word-break: break-word; }
.vt-check { position: absolute; top: -7px; right: -7px; width: 22px; height: 22px; border-radius: 50%; display: none; place-items: center; background: var(--accent); color: #fff; font-style: normal; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.vt-check svg { width: 14px; height: 14px; }
.vt-tile.on .vt-check { display: grid; }
.vt-pin { display: inline-flex; align-items: center; gap: 6px; }
.vt-pin input { width: 110px; }
.vt-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; position: sticky; bottom: 8px; z-index: 2; padding: 8px; margin: 0 -8px; border-radius: 12px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(6px); }
.vt-foot .btn-primary { min-width: 140px; }
.vt-done { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 0; padding: 8px 12px; border-radius: 10px; background: rgba(22,163,74,.1); color: #15803d; font-size: 13.5px; font-weight: 500; }
.vt-done span { flex: 1; }
.poll-names { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.poll-names span { padding: 2px 8px; border-radius: 999px; background: var(--surface-2); font-size: 12px; }
.pb-build { display: grid; grid-template-columns: 110px 1fr; gap: 8px; align-items: start; margin-top: 8px; }
.pb-build-name { font-size: 13px; font-weight: 600; padding-top: 5px; }
.pb-tools { float: right; font-size: 12px; }
.pb-more { margin: 8px 0; }
.pb-more summary { cursor: pointer; font-size: 13px; color: var(--accent-text); }
.pb-limits { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 8px 0; font-size: 13.5px; }
.pb-limits input[type=number] { width: 64px; margin-left: 4px; }
@media (max-width: 640px) { .pb-build { grid-template-columns: 1fr; gap: 4px; } .pb-build-name { padding-top: 0; } .pb-tools { float: none; display: block; } }
.calc-chip.pick span { text-decoration: none; }
.calc-chip.pick input:checked + span::before { content: "✓ "; font-weight: 700; color: var(--accent-text); }

/* ---- v1.22: boss tiles like the game (picture fills the tile, names on a fixed 2-line band) ---- */
.vt-grid.boss { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.vt-grid.boss .vt-tile { justify-content: flex-start; padding: 5px 5px 6px; gap: 5px; }
.vt-grid.boss .vt-pic { width: 100%; height: auto; aspect-ratio: 1; border-radius: 9px; background: linear-gradient(160deg, #c9d2df, #9eabbd); }
.vt-grid.boss .vt-letters { font-size: clamp(18px, 4vw, 26px); }
.vt-grid.boss .vt-name { width: 100%; min-height: 2.5em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12px; line-height: 1.25; word-break: normal; overflow-wrap: break-word; hyphens: auto; }
.vt-guide { font-size: 12.5px; display: inline-flex; align-items: center; gap: 4px; margin-left: auto; margin-right: 8px; }
.vt-head { flex-wrap: wrap; }
.pb-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; margin-top: 8px; }
.pb-tile { position: relative; cursor: pointer; }
.pb-tile input { position: absolute; opacity: 0; pointer-events: none; }
.pb-tile span { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px; border-radius: 10px; border: 1.5px solid var(--line-2); background: var(--surface); opacity: .55; transition: opacity .12s, border-color .12s; }
.pb-tile img { width: 100%; aspect-ratio: 1; border-radius: 7px; object-fit: cover; background: #b8c3d2; }
.pb-tile b { font-size: 11px; font-weight: 600; line-height: 1.2; min-height: 2.4em; text-align: center; }
.pb-tile input:checked + span { opacity: 1; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: var(--accent-soft); }
.pb-tile input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.guide-note { margin-top: -4px; font-size: 13px; }
.guide-list { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 8px; }
.guide-list li { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; padding: 8px; border-radius: 12px; background: var(--surface-2); }
.guide-list .vt-pic { width: 56px; height: 56px; }
.guide-list li > div { display: grid; gap: 3px; font-size: 13px; }
.guide-build { justify-self: start; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); }
.guide-build.b-matk { background: rgba(124,58,237,.12); color: #7c3aed; }
.guide-build.b-def { background: rgba(37,99,235,.12); color: #2563eb; }
.guide-build.b-both { background: rgba(13,148,136,.12); color: #0f766e; }

/* ---- v1.22: week board — day columns left → right ---- */
.mp-week > summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.mp-week > summary::-webkit-details-marker { display: none; }
.mp-week > summary h2 { margin: 0; flex: 1; }
.wk-fold { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface); color: var(--muted); transition: transform .15s; }
.mp-week[open] .wk-fold { transform: rotate(90deg); }
#weekCal { display: block; margin-top: 12px; }
.wb-scroll { overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 2px 4px 8px; scrollbar-width: thin; }
.wb { display: grid; grid-template-columns: repeat(7, minmax(148px, 1fr)); gap: 8px; min-width: min-content; }
.wb-col { scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 14px; background: var(--surface-2); border: 1px solid transparent; min-height: 120px; }
.wb-col.today { background: color-mix(in srgb, var(--g-accent, var(--accent)) 10%, var(--surface)); border-color: var(--g-accent, var(--accent)); box-shadow: 0 4px 16px color-mix(in srgb, var(--g-accent, var(--accent)) 18%, transparent); }
.wb-col.past { opacity: .62; }
.wb-head { display: flex; align-items: baseline; gap: 6px; padding: 2px 4px 6px; border-bottom: 1px solid var(--line); }
.wb-head span { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; }
.wb-head b { font-size: 20px; font-weight: 700; line-height: 1; }
.wb-head i { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--g-accent, var(--accent)); color: #fff; }
.wb-col.today .wb-head span { color: var(--g-accent, var(--accent-text)); }
.wb-list { display: grid; gap: 6px; }
.wb-ev { display: grid; gap: 2px; padding: 8px 9px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid #94a3b8; font-size: 12.5px; line-height: 1.3; }
.wb-ev strong { font-size: 13px; font-weight: 600; }
.wb-ev strong small { font-weight: 400; color: var(--muted); }
.wb-ev.war { border-left-color: #dc2626; }
.wb-ev.own { border-left-color: var(--g-accent, var(--accent)); }
.wb-ev.flex { border-left-color: #7c3aed; }
.wb-ev.done, .wb-ev.off { opacity: .45; }
.wb-ev.live { border-color: #16a34a; border-left-color: #16a34a; background: rgba(22,163,74,.1); box-shadow: 0 0 0 1px #16a34a inset; }
.wb-ev.soon { border-color: #f59e0b; }
.wb-time { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wb-time i { font-style: normal; font-size: 10.5px; font-weight: 700; padding: 0 6px; border-radius: 999px; color: #fff; }
.wb-live { background: #16a34a; animation: wbPulse 1.6s ease-in-out infinite; }
.wb-soon { background: #f59e0b; }
@keyframes wbPulse { 50% { opacity: .55; } }
.wb-tag { justify-self: start; font-size: 10.5px; padding: 0 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.wb-tag.own { color: var(--accent-text); }
.wb-empty { margin: 8px 4px; font-size: 12px; color: var(--muted); }
.wb-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.wb-legend .lg { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: -4px; background: #94a3b8; }
.wb-legend .lg.war { background: #dc2626; } .wb-legend .lg.own { background: var(--g-accent, var(--accent)); }
@media (max-width: 640px) { .wb { grid-template-columns: repeat(7, 72vw); } }
@media (min-width: 641px) and (max-width: 1100px) { .wb { grid-template-columns: repeat(7, 168px); } }
@media (prefers-reduced-motion: reduce) { .wb-live { animation: none; } }

/* calendar settings: room between "Add event" and Save */
#calAdd { margin: 2px 0 18px; border-style: dashed; }
#calForm .board-actions { padding-top: 14px; border-top: 1px solid var(--line); }
.ev-langs { border: 0; padding: 0; margin: 16px 0 0; display: grid; gap: 6px; }

/* ---- v1.22: forgotten PIN ---- */
.forgot { margin-top: 14px; display: grid; gap: 8px; }
.forgot-form { display: grid; gap: 8px; padding: 10px; border-radius: 10px; background: var(--surface-2); }
.forgot-form .btn { justify-self: start; }
.forgot-done { margin: 0; color: #15803d; font-size: 14px; display: flex; gap: 6px; align-items: center; }
.pinreq { margin: 10px 0 14px; border: 1px solid #fdba74; background: #fff7ed; border-radius: 12px; padding: 10px 12px; }
:root[data-theme="dark"] .pinreq { background: rgba(249,115,22,.1); border-color: rgba(249,115,22,.45); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pinreq { background: rgba(249,115,22,.1); border-color: rgba(249,115,22,.45); } }
.pinreq-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; color: #c2410c; }
.pinreq-head .muted { flex-basis: 100%; font-size: 12.5px; }
.pinreq ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.pinreq li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface); }
.pinreq-note { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.pinreq-act { display: flex; gap: 6px; }
.pin-big { font-size: 40px; font-weight: 700; letter-spacing: 10px; text-align: center; margin: 8px 0; }
.pin-msg { width: 100%; font: inherit; font-size: 13px; }

/* ---- v1.22: guild support (donations → credit) ---- */
.mp-support { margin-top: 26px; }
.mp-support h2 { font-size: 22px; display: flex; align-items: center; gap: 8px; }
.sup-card { display: grid; gap: 14px; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: linear-gradient(135deg, color-mix(in srgb, var(--g-accent, var(--accent)) 9%, var(--surface)), var(--surface)); }
.sup-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: space-between; }
.sup-top p { margin: 0; flex: 1 1 260px; color: var(--muted); font-size: 14px; }
.sup-meter { display: grid; gap: 6px; font-size: 13px; font-weight: 500; }
.sup-bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.sup-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--g-accent, var(--accent)), #f59e0b); }
.sup-thanks { font-size: 13px; font-weight: 600; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.sup-donors ol { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.sup-donors li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px 4px 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; }
.sup-donors li b { min-width: 20px; text-align: center; font-size: 12px; color: var(--muted); }
.sup-donors li.top { font-weight: 600; border-color: color-mix(in srgb, #f59e0b 50%, var(--line)); }
.sup-donors li.top b { font-size: 15px; }
.don-method { margin: 10px 0; }
.don-cur { display: flex; gap: 6px; margin-bottom: 8px; }
.don-amounts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.don-amt { padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--surface); font: inherit; font-weight: 600; cursor: pointer; color: inherit; }
.don-amt.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.don-custom { display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; border-radius: 12px; border: 1.5px solid var(--line-2); }
.don-custom input { width: 90px; border: 0; background: transparent; font: inherit; padding: 9px 2px; }
.don-who { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 12px 0 6px; font-size: 14px; }
.don-accept { margin-top: 8px; font-size: 13.5px; }
.don-thanks { text-align: center; padding: 10px; }
.don-thanks > svg { width: 44px; height: 44px; color: var(--accent); }
.don-balance { font-size: 14px; color: var(--muted); }
.don-balance b { font-size: 20px; color: inherit; margin-left: 4px; }
.don-spend { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.don-history summary { cursor: pointer; font-weight: 600; margin-top: 6px; }
.don-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13.5px; }
.don-table th, .don-table td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.don-table .badge { margin-left: 6px; }
.wb { align-items: start; }
.wb-col { min-height: 0; }
@media (max-width: 640px) { .wb { grid-template-columns: repeat(7, minmax(158px, 46vw)); } }

/* ---- v1.23: boss pictures — crisp, framed like collectible cards ---- */
.vt-grid.boss .vt-pic, .pb-tile img, .guide-list .vt-pic { position: relative; border-radius: 14px; box-shadow: 0 0 0 2px var(--ring, #cbd5e1), 0 4px 12px rgba(15,23,42,.18); background: radial-gradient(120% 90% at 50% 15%, #f8fafc, #cbd5e1); }
.vt-grid.boss .vt-pic::after, .guide-list .vt-pic::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(160deg, rgba(255,255,255,.28), transparent 42%); pointer-events: none; }
.vt-grid.boss .vt-pic img { image-rendering: auto; filter: saturate(1.05) contrast(1.03); }
.vt-tile[data-g="mvp"], .pb-tile.mvp { --ring: #f5b544; }
.vt-tile[data-g="mini"], .pb-tile.mini { --ring: #93a8c6; }
.vt-tile[data-g="mvp"] .vt-pic { background: radial-gradient(120% 90% at 50% 10%, #fff7e0, #f2c46b); }
.vt-tile.on .vt-pic { box-shadow: 0 0 0 3px var(--accent), 0 6px 16px color-mix(in srgb, var(--accent) 35%, transparent); }
.vt-grid.boss .vt-tile { border-radius: 16px; }
.pb-tile img { border-radius: 10px; box-shadow: 0 0 0 1.5px var(--ring, #cbd5e1); }
.pb-group + .pb-group { margin-top: 10px; }
/* class picker: a colour dot instead of letter initials */
.cls-picker .cls-ico:not(.cls-ico-empty) { width: 10px; height: 10px; min-width: 10px; padding: 0; border-radius: 50%; background: var(--c); border: 0; font-size: 0; box-shadow: 0 0 0 3px var(--c-bg); }

/* ---- v1.23: member → team messages ---- */
.action-grid-2 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 10px; }
.fb-kinds { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.fb-done > svg { width: 40px; height: 40px; color: #16a34a; }
.tab-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 999px; background: #dc2626; color: #fff; font-size: 11px; font-weight: 700; }
.fb-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.fb-list li { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.fb-list li.unread { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.fb-list p { margin: 6px 0; white-space: normal; overflow-wrap: anywhere; }
.fb-kind { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); }
.fb-kind.k-problem { color: #b91c1c; background: rgba(220,38,38,.1); }
.fb-kind.k-praise { color: #15803d; background: rgba(22,163,74,.1); }
.fb-kind.k-idea { color: #7c3aed; background: rgba(124,58,237,.1); }
.fb-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 13px; }
.fb-acts { margin-left: auto; display: flex; gap: 4px; }
.transfer-list { margin: 8px 0 12px; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }

/* ---- v1.24: tidy phone layout (workspace header, board top, topbar) ---- */
.show-sm { display: none; }
@media (max-width: 560px) {
  .show-sm { display: inline; }
  .topnav { gap: 4px; }
  .lang select { max-width: 70px; padding: 5px 4px; font-size: 13px; }
  #signOutBtn { padding: 6px 8px; }
  #signOutBtn .ic { width: 18px; height: 18px; }
  /* workspace header: avatar | name, badges, member-page buttons */
  .ws-back { padding-top: 10px; font-size: 12.5px; }
  .ws-id { display: grid; grid-template-columns: 44px 1fr; column-gap: 12px; row-gap: 8px; align-items: center; padding: 6px 0 12px; }
  .ws-avatar { --av: 44px !important; }
  .ws-title { min-width: 0; }
  .ws-title h1 { font-size: 20px; margin-bottom: 4px; line-height: 1.2; }
  .ws-meta { gap: 5px; font-size: 12px; }
  .ws-meta .badge { font-size: 11.5px; padding: 1px 8px; }
  .ws-member { grid-column: 2; width: auto; display: flex; justify-content: flex-start; }
  .ws-member-label { display: none; }
  .ws-member-actions .btn { padding: 5px 10px; font-size: 13px; }
  .ws-tab { padding: 0 10px; font-size: 13.5px; gap: 5px; }
  .ws-body { padding-top: 12px; }
  /* board top: tabs, next war, one tidy stats card */
  .tab-board .board-top { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-bottom: 8px; }
  .tab-board .mode-tabs { display: grid; grid-template-columns: 1fr 1fr; }
  .tab-board .mode-tabs button { padding: 8px 6px; }
  .tab-board .war-chip { grid-column: 1 / -1; font-size: 12.5px; padding: 6px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; justify-content: flex-start; }
  .tab-board .board-stats { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 13px; }
  .tab-board .board-stats .bs-placed { font-size: 14px; }
  .tab-board .board-stats .bs-lang { justify-self: start; }
  .tab-board .board-stats .warn-text { grid-column: 1 / -1; font-size: 12.5px; }
  .tab-board .war-date { grid-column: 1 / 3; font-size: 12.5px; gap: 4px; }
  .tab-board .war-date input { padding: 4px 6px; font-size: 13px; max-width: 150px; }
  .tab-board .leave-chip { justify-self: end; font-size: 12.5px; padding: 3px 9px; }
  /* publish bar: status + one button */
  .publish-bar { padding: 10px 12px; gap: 10px; flex-wrap: nowrap; }
  .publish-info { gap: 8px; }
  .publish-info .muted { display: none; }
  .publish-info strong { font-size: 14px; }
  .btn-publish { width: auto; font-size: 14px; padding: 9px 14px; white-space: nowrap; }
  .board-toolbar { margin-bottom: 10px; }
  .board-toolbar .btn { padding: 7px 11px; }
}
/* smaller boss cards when voting */
.vt-grid.boss { grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 7px; }
.vt-grid.boss .vt-tile { padding: 4px 4px 5px; gap: 3px; border-radius: 12px; }
.vt-grid.boss .vt-pic { border-radius: 10px; box-shadow: 0 0 0 1.5px var(--ring, #cbd5e1), 0 2px 6px rgba(15,23,42,.14); }
.vt-grid.boss .vt-name { font-size: 10.5px; min-height: 2.5em; }
.vt-grid.boss .vt-check { width: 18px; height: 18px; top: -6px; right: -6px; }
.vt-grid.boss .vt-check svg { width: 12px; height: 12px; }
@media (min-width: 900px) { .vt-grid.boss { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); } }
.pin-reset-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 12px; margin: 4px 0 10px; border-radius: 10px; background: var(--surface-2); font-size: 13.5px; }
.forgot-note { margin-top: 14px; display: flex; gap: 6px; align-items: flex-start; }
.don-why { margin: 10px 0 12px; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); font-size: 13.5px; }
.don-why ul { margin: 6px 0 8px; padding-left: 20px; display: grid; gap: 4px; }
.don-why summary { cursor: pointer; font-weight: 600; color: var(--accent-text); }
.don-announce { width: 100%; margin: 8px 0; font: inherit; font-size: 13px; }
.don-cap { display: grid; gap: 6px; margin: 4px 0 10px; font-size: 12.5px; color: var(--muted); }
.don-table td.neg { color: #b91c1c; } .don-table td.pos { color: #15803d; }
.pay-credit { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); }
.pay-credit span { display: grid; gap: 2px; } .pay-credit small { color: var(--muted); font-size: 12px; }
.qr-credit { margin: -4px 0 6px; font-size: 13px; color: #15803d; }

/* ---- v1.24: landing additions ---- */
.lp-kicker { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 12px; padding: 4px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-size: 13px; font-weight: 600; }
.lp-new { display: inline-block; margin-right: 8px; padding: 2px 8px; border-radius: 999px; background: #16a34a; color: #fff; font-size: 11px; font-weight: 700; vertical-align: middle; letter-spacing: .3px; }
.lp-sub { margin: -6px 0 18px; color: var(--muted); }
.lp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.lp-tile { display: flex; gap: 12px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.lp-tile-ico { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.lp-tile strong { display: block; font-size: 15px; }
.lp-tile p { margin: 3px 0 0; font-size: 13.5px; color: var(--muted); }
.lp-prem { display: inline-flex; align-items: center; gap: 3px; margin-left: 4px; padding: 0 7px; border-radius: 999px; font-size: 10.5px; font-weight: 600; color: #7c3aed; background: rgba(124,58,237,.1); vertical-align: middle; }
.lp-prem .ic { width: 11px; height: 11px; }
/* sketches */
.sk-vote { padding: 10px; display: grid; gap: 8px; align-content: start; }
.sk-vote-h { display: flex; justify-content: space-between; align-items: center; }
.sk-vote-h em { font-style: normal; font-size: 10px; font-weight: 700; color: #fff; background: var(--accent); padding: 1px 6px; border-radius: 999px; }
.sk-vote-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sk-vote-grid span { position: relative; border-radius: 8px; overflow: hidden; box-shadow: 0 0 0 1.5px #f5b544; opacity: .5; }
.sk-vote-grid span.on { opacity: 1; box-shadow: 0 0 0 2.5px var(--accent); }
.sk-vote-grid img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.sk-vote-btn { height: 18px; border-radius: 6px; background: var(--accent); width: 60%; }
.sk-week { padding: 8px; }
.sk-week-cols { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 8px; align-items: start; }
.sk-week-cols > div { display: grid; gap: 4px; padding: 4px; border-radius: 6px; background: var(--surface-2); }
.sk-week-cols > div.on { background: var(--accent-soft); box-shadow: 0 0 0 1.5px var(--accent); }
.sk-week-cols b { height: 6px; border-radius: 3px; background: var(--line-2); width: 60%; }
.sk-week-cols i { height: 16px; border-radius: 4px; background: var(--surface); border-left: 3px solid #94a3b8; }
.sk-week-cols i.war { border-left-color: #dc2626; } .sk-week-cols i.own { border-left-color: var(--accent); }
/* member page quick-jump chips */
.mp-jump { position: sticky; top: calc(var(--topbar-h) + 6px); z-index: 12; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 12px -4px 4px; padding: 6px 4px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); }
.mp-jump::-webkit-scrollbar { display: none; }
.mp-jump a { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: inherit; text-decoration: none; font-size: 13px; font-weight: 500; white-space: nowrap; }
.mp-jump a .ic { width: 15px; height: 15px; color: var(--accent-text); }
#meCard, #secLineup, #secPolls, #secNews, #weekBox, #supportBox { scroll-margin-top: calc(var(--topbar-h) + 60px); }
@media (max-width: 560px) {
  .bill-cur { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .bill-cur > .muted { display: none; }
  .bill-cur .segmented { display: grid; grid-template-columns: 1fr 1fr; }
  .bill-cur .segmented label { justify-content: center; padding: 8px 6px; font-size: 14px; }
}
.team-count { font-size: 13px; font-weight: 500; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); vertical-align: middle; } .team-count.full { background: rgba(245,158,11,.15); color: #b45309; }
/* first-purchase gift box */
.gift-box { position: relative; display: flex; align-items: center; gap: 12px; margin: 10px 0 12px; padding: 12px 14px; border-radius: 14px; background: linear-gradient(120deg, #fff7e6, #ffe4e6); border: 1.5px dashed #f59e0b; overflow: hidden; }
.gift-box::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.65) 50%, transparent 70%); transform: translateX(-100%); animation: giftShine 3.2s ease-in-out infinite; pointer-events: none; }
.gift-box div { display: grid; gap: 2px; }
.gift-box strong { font-size: 15.5px; color: #b91c1c; }
.gift-box span { font-size: 12.5px; color: #92400e; }
.gift-ico { flex: none; animation: giftBob 2.4s ease-in-out infinite; transform-origin: 50% 80%; }
@keyframes giftBob { 0%, 100% { transform: rotate(0) } 20% { transform: rotate(-8deg) scale(1.05) } 40% { transform: rotate(6deg) } 60% { transform: rotate(0) } }
@keyframes giftShine { 60%, 100% { transform: translateX(100%); } }
:root[data-theme="dark"] .gift-box { background: linear-gradient(120deg, rgba(245,158,11,.16), rgba(244,63,94,.14)); }
:root[data-theme="dark"] .gift-box strong { color: #fda4af; } :root[data-theme="dark"] .gift-box span { color: #fcd34d; }
@media (prefers-reduced-motion: reduce) { .gift-ico, .gift-box::after { animation: none; } }

/* ---- v1.25: super admin ---- */
.sa-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
.sa-tabs::-webkit-scrollbar { display: none; }
.sa-tabs .tab { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex: none; }
.sa-tabs .tab .ic { width: 15px; height: 15px; }
.sa-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 6px 0 14px; }
.sa-kpi { display: grid; gap: 4px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.sa-kpi span { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.sa-kpi strong { font-size: 24px; line-height: 1.1; }
.sa-kpi small { font-size: 12px; color: var(--muted); }
.sa-ov-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.sa-ov-grid .card { margin: 0; }
.sa-ov-grid h2 { font-size: 16px; display: flex; align-items: center; gap: 6px; }
.sa-mini { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; font-size: 13.5px; }
.sa-mini li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 9px; background: var(--surface-2); }
.sa-mini li .badge { margin-left: auto; }
.sa-pay-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 10px; font-size: 13px; }
.sa-paylist li { display: grid; grid-template-columns: auto auto 1fr; gap: 8px; align-items: baseline; }
.sa-paylist li.is-test { opacity: .7; }
.sa-paylist .check { margin: 0; }
.sa-cl { display: grid; gap: 10px; margin-top: 10px; }
.sa-cl-item.is-hidden { opacity: .55; }
.sa-cl-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; }
.sa-cl-head input[name=v] { width: 110px; } .sa-cl-head input[type=date] { width: 160px; }

/* ---- v1.25: landing — real screenshots, dark hero, communication story ---- */
.lx-hero, .lx-final { position: relative; overflow: hidden; background: radial-gradient(1200px 600px at 75% -10%, #3b2a7a 0%, transparent 60%), radial-gradient(900px 500px at -10% 110%, #7a3b12 0%, transparent 55%), #0d1222; color: #eef2ff; }
.lx-hero { padding: clamp(40px, 7vw, 96px) 0 clamp(56px, 8vw, 110px); }
.lx-glow { position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse at 60% 30%, #000 30%, transparent 75%); }
.lx-hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
.lx-hero h1 { font-size: clamp(34px, 5vw, 62px); line-height: 1.08; margin: 0 0 16px; letter-spacing: -.5px; background: linear-gradient(100deg, #fff 30%, #fcd34d 70%, #fb923c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lx-lead { font-size: clamp(16px, 1.7vw, 19px); color: #c7cde3; margin: 0 0 22px; max-width: 34em; }
.lx-hero .lp-kicker { background: rgba(245,158,11,.16); color: #fcd34d; }
.lx-ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.22); }
.lx-ghost:hover { background: rgba(255,255,255,.14); }
.lx-note { margin: 14px 0 0; font-size: 13.5px; color: #98a0bd; }
.lx-stage { position: relative; padding: 10px 40px 60px 0; }
.lx-stage > .lx-browser { transform: perspective(1600px) rotateY(-9deg) rotateX(3deg); box-shadow: 0 40px 90px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.08); }
.lx-hero-phone { position: absolute !important; right: 0; bottom: 0; width: 30% !important; transform: rotate(3deg); box-shadow: 0 30px 70px rgba(0,0,0,.6); }
.lx-toast { position: absolute; display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 14px; background: rgba(23,27,45,.86); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(10px); box-shadow: 0 16px 40px rgba(0,0,0,.45); color: #fff; font-size: 13px; animation: lxFloat 6s ease-in-out infinite; max-width: 260px; }
.lx-toast span { font-size: 20px; }
.lx-toast div { display: grid; gap: 1px; }
.lx-toast small { color: #a5adc8; font-size: 11.5px; }
.lx-toast.t1 { left: -6%; top: 6%; }
.lx-toast.t2 { left: 4%; bottom: 8%; animation-delay: -2s; }
.lx-toast.t3 { right: 22%; top: -4%; animation-delay: -4s; }
@keyframes lxFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.lx-browser { position: relative; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 24px 60px rgba(15,23,42,.22), 0 0 0 1px rgba(15,23,42,.08); }
.lx-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: #eef1f6; border-bottom: 1px solid #dfe3ec; }
.lx-bar i { width: 10px; height: 10px; border-radius: 50%; background: #f87171; } .lx-bar i:nth-child(2) { background: #fbbf24; } .lx-bar i:nth-child(3) { background: #34d399; }
.lx-bar span { margin-left: 10px; padding: 3px 12px; border-radius: 8px; background: #fff; font-size: 11.5px; color: #64748b; flex: 1; max-width: 260px; }
.lx-browser img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
/* Phone frame: thin titanium edge + slim black bezel, a real status bar with a small Dynamic Island above the screenshot */
.lx-phone { position: relative; width: min(260px, 76%); padding: 5px; border-radius: 46px; background: #0b0d12;
  box-shadow: 0 0 0 1.5px #9aa1ae, 0 0 0 3px #d9dde4, 0 0 0 3.5px rgba(15,23,42,.25), 0 34px 70px -18px rgba(15,23,42,.45), 0 12px 24px -10px rgba(15,23,42,.25); }
.lx-phone::before, .lx-phone::after { content: ""; position: absolute; width: 3px; border-radius: 2px; background: linear-gradient(90deg, #b9bec8, #e6e9ee); }
.lx-phone::before { left: -6px; top: 19%; height: 7%; box-shadow: 0 46px 0 #c9cdd5; }
.lx-phone::after { right: -6px; top: 26%; height: 13%; }
.lx-screen { position: relative; border-radius: 41px; overflow: hidden; background: #fff; isolation: isolate; }
.lx-screen::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(125deg, rgba(255,255,255,.18), transparent 32%); }
.lx-status { position: relative; display: flex; align-items: center; justify-content: space-between; height: 34px; padding: 0 22px 0 26px; background: #fff; color: #0b0d12; font-size: 11.5px; }
.lx-status b { font-weight: 600; letter-spacing: .01em; }
.lx-island { position: absolute; left: 50%; top: 8px; width: 31%; max-width: 86px; height: 20px; transform: translateX(-50%); border-radius: 999px; background: #000; }
.lx-sys { display: inline-flex; align-items: center; gap: 4px; }
.lx-sig { width: 14px; height: 9px; background: linear-gradient(90deg, #0b0d12 0 2.5px, transparent 2.5px 4px, #0b0d12 4px 6.5px, transparent 6.5px 8px, #0b0d12 8px 10.5px, transparent 10.5px 12px, #0b0d12 12px 14px);
  -webkit-mask: linear-gradient(to top right, #000 50%, transparent 50%); mask: linear-gradient(to top right, #000 50%, transparent 50%); }
.lx-bat { position: relative; width: 20px; height: 9.5px; border-radius: 3px; border: 1.2px solid rgba(11,13,18,.45); box-sizing: border-box; }
.lx-bat::before { content: ""; position: absolute; inset: 1.2px; right: 4px; border-radius: 1.5px; background: #0b0d12; }
.lx-bat::after { content: ""; position: absolute; right: -3px; top: 2.3px; width: 1.6px; height: 3.5px; border-radius: 0 1px 1px 0; background: rgba(11,13,18,.45); }
.lx-phone img { display: block; width: 100%; aspect-ratio: 9 / 18; object-fit: cover; background: #f4f6fb; }
.lx-center { text-align: center; }
.lx-sub { color: var(--muted); max-width: 720px; margin: -12px auto 28px; font-size: 16.5px; }
.lx-why { background: linear-gradient(180deg, var(--bg), var(--surface)); }
.lx-vs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; }
.lx-vs-card { padding: 22px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); }
.lx-vs-card h3 { margin: 0 0 12px; font-size: 19px; }
.lx-vs-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lx-vs-card li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.lx-vs-card li > span { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 700; }
.lx-vs-card.bad { background: color-mix(in srgb, #ef4444 5%, var(--surface)); }
.lx-vs-card.bad li > span { background: rgba(239,68,68,.14); color: #dc2626; }
.lx-vs-card.good { border-color: color-mix(in srgb, #16a34a 40%, var(--line)); background: color-mix(in srgb, #16a34a 6%, var(--surface)); box-shadow: 0 18px 40px rgba(22,163,74,.12); }
.lx-vs-card.good li > span { background: #16a34a; color: #fff; } .lx-vs-card.good li > span .ic { width: 13px; height: 13px; }
.lx-vs-arrow { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 40%, transparent); }
.lx-media { position: relative; }
.lx-stack { width: 100%; }
.lx-duo { position: relative; display: flex; justify-content: center; width: 100%; padding-right: 18%; }
.lx-duo .lx-phone { width: min(250px, 58%); z-index: 2; }
.lx-duo .lx-back { position: absolute !important; right: 4%; top: 12%; width: min(220px, 50%); z-index: 1; transform: rotate(5deg); opacity: .96; }
.lx-card-shot .lx-phone img { aspect-ratio: 9 / 15; }
.dc { display: grid; grid-template-columns: 56px 1fr; width: 100%; border-radius: 14px; overflow: hidden; background: #313338; color: #dbdee1; box-shadow: 0 24px 60px rgba(15,23,42,.3); font-size: 13.5px; }
.dc-side { background: #1e1f22; display: grid; align-content: start; gap: 8px; padding: 12px 8px; justify-items: center; }
.dc-srv { width: 40px; height: 40px; border-radius: 50%; background: #2b2d31; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; }
.dc-srv.on { border-radius: 14px; background: #f59e0b; }
.dc-main { padding: 0 14px 14px; display: grid; gap: 14px; align-content: start; }
.dc-head { padding: 12px 0; border-bottom: 1px solid #26272b; font-weight: 600; color: #f2f3f5; }
.dc-msg { display: grid; grid-template-columns: 40px 1fr; gap: 12px; }
.dc-ava { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #f59e0b; color: #fff; }
.dc-name { font-weight: 600; color: #f2f3f5; display: flex; align-items: center; gap: 6px; }
.dc-name em { font-style: normal; font-size: 10px; padding: 1px 5px; border-radius: 4px; background: #5865f2; color: #fff; }
.dc-name span { font-weight: 400; font-size: 11.5px; color: #949ba4; }
.dc-embed { margin-top: 4px; padding: 10px 12px; border-radius: 6px; background: #2b2d31; border-left: 4px solid var(--c); display: grid; gap: 4px; }
.dc-embed strong { color: #f2f3f5; } .dc-embed p { margin: 0; color: #b5bac1; font-size: 13px; }
.lx-final { padding: clamp(56px, 7vw, 96px) 0; text-align: center; }
.lx-final h2 { position: relative; font-size: clamp(28px, 3.6vw, 42px); margin: 0 0 8px; color: #fff; }
.lx-final p { position: relative; color: #c7cde3; margin: 0 0 22px; }
.lx-final .lp-cta { position: relative; justify-content: center; }
@media (max-width: 900px) {
  .lx-hero-grid { grid-template-columns: 1fr; }
  .lx-stage { padding: 10px 24px 50px 0; }
  .lx-toast.t1 { left: 0; } .lx-toast.t3 { display: none; }
  .lx-vs { grid-template-columns: 1fr; } .lx-vs-arrow { justify-self: center; transform: rotate(90deg); }
}
@media (max-width: 560px) { .lx-toast { font-size: 12px; padding: 8px 10px; max-width: 210px; } .lx-toast.t2 { bottom: 2%; } }
@media (prefers-reduced-motion: reduce) { .lx-toast { animation: none; } }
.lx-browser.natural img { aspect-ratio: auto; height: auto; }
/* gift box is a button: tap to claim (opens the Premium checkout / sign-in) */
button.gift-box { width: 100%; font: inherit; text-align: left; cursor: pointer; flex-wrap: wrap; transition: transform .12s, box-shadow .12s; }
button.gift-box:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(245,158,11,.25); }
button.gift-box:active { transform: scale(.99); }
button.gift-box > div { flex: 1; min-width: 150px; }
.gift-cta { font-style: normal; font-weight: 700; font-size: 13.5px; color: #fff; background: linear-gradient(90deg, #f59e0b, #ef4444); padding: 7px 14px; border-radius: 999px; white-space: nowrap; box-shadow: 0 4px 12px rgba(239,68,68,.3); }

/* "How it works" — 3 numbered steps + the answer loop back to the leaders */
.lx-how-title { margin: 44px 0 18px; font-size: 22px; }
.lx-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; counter-reset: none; }
.lx-step { position: relative; display: grid; gap: 8px; align-content: start; padding: 22px 20px 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.lx-step + .lx-step::before { content: "→"; position: absolute; left: -27px; top: 50%; transform: translateY(-50%); font-size: 22px; font-weight: 700; color: var(--accent); }
.lx-step.hub { background: linear-gradient(150deg, #1d2440, #0d1222); color: #fff; border-color: transparent; box-shadow: 0 18px 40px rgba(13,18,34,.3); }
.lx-step-n { position: absolute; top: -14px; left: 18px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 700; box-shadow: 0 4px 10px rgba(0,0,0,.15); }
.lx-step-who { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.lx-step-who span { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.lx-step-who svg { width: 18px; height: 18px; }
.lx-step.hub .lx-step-who { color: #a5adc8; } .lx-step.hub .lx-step-who span { background: var(--accent); color: #fff; }
.lx-step strong { font-size: 18px; line-height: 1.3; }
.lx-step p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; } .lx-step.hub p { color: #c3c9de; }
.lx-step-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.lx-step-tags em { font-style: normal; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); }
.lx-step.hub .lx-step-tags em { background: rgba(255,255,255,.1); color: #fde8c4; }
.lx-loopback { display: flex; align-items: center; gap: 12px; margin-top: 20px; padding: 14px 18px; border-radius: 14px; background: rgba(22,163,74,.09); border: 1px dashed rgba(22,163,74,.45); color: #15803d; font-weight: 600; font-size: 14.5px; line-height: 1.5; }
.lx-loopback span { font-size: 24px; line-height: 1; flex: none; }
:root[data-theme="dark"] .lx-loopback { color: #4ade80; }
@media (max-width: 760px) {
  .lx-steps { grid-template-columns: 1fr; gap: 30px; }
  .lx-step + .lx-step::before { content: "↓"; left: 50%; top: -29px; transform: translateX(-50%); }
  .lx-how-title { font-size: 19px; margin-top: 34px; }
}
/* System bars (status.js): announcement, busy, maintenance-for-admins, new version */
#sysbar:empty { display: none; }
#sysbar { position: relative; z-index: 60; }
.sysbar { display: flex; align-items: center; gap: 10px; padding: 9px 16px; font-size: 14px; line-height: 1.45; border-bottom: 1px solid var(--line); }
.sysbar > svg { flex: none; width: 18px; height: 18px; }
.sysbar > span { flex: 1; min-width: 0; }
.sysbar.info { background: #e8f1ff; color: #1e3a8a; }
.sysbar.warn { background: #fff4d6; color: #7a4b00; }
.sysbar-x { flex: none; border: 0; background: transparent; color: inherit; cursor: pointer; padding: 4px; border-radius: 8px; display: grid; place-items: center; opacity: .7; }
.sysbar-x:hover { opacity: 1; background: rgba(0,0,0,.06); }
.sysbar.new { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 32px); border-radius: 999px; border: 0; padding: 8px 8px 8px 16px; background: #1d2440; color: #fff; box-shadow: 0 12px 30px rgba(13,18,34,.35); }
.sysbar.new .btn { background: var(--accent); color: #fff; border-color: transparent; border-radius: 999px; }
:root[data-theme="dark"] .sysbar.info { background: #1b2a4a; color: #cfe0ff; }
:root[data-theme="dark"] .sysbar.warn { background: #3a2e12; color: #ffe2a3; }
.closed-page { max-width: 520px; margin: 48px auto; text-align: center; display: grid; justify-items: center; gap: 10px; padding: 36px 24px; }
.closed-page h1 { margin: 6px 0 0; font-size: 24px; }
.closed-page p { margin: 0; color: var(--muted); line-height: 1.6; }
.closed-page .closed-msg { color: var(--text); font-weight: 500; padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); }
.closed-page .btn { margin-top: 8px; }
.closed-ico { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.closed-ico svg { width: 32px; height: 32px; }
/* Super admin → System */
.st-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.st-card h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.st-card textarea { width: 100%; }
.st-close.is-closed { border-color: #f59e0b; box-shadow: 0 0 0 2px rgba(245,158,11,.25); }
.st-now { margin: 0 0 8px; }
.status-bad { color: #c2410c; font-weight: 600; }
.st-switch { font-size: 15px; }
.st-actions { grid-column: 1 / -1; margin: 0; }
@media (max-width: 760px) { .st-grid { grid-template-columns: 1fr; } }

/* ===== Pricing (plans.js) — landing #pricing and the guild Plan tab ===== */
.pc-intro { text-align: center; max-width: 640px; margin: 0 auto 8px; }
.pc-kicker { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); background: var(--accent-soft); padding: 4px 12px; border-radius: 999px; }
.pc-intro .lp-h2 { margin: 12px 0 6px; }
.pc-wrap { display: grid; gap: 22px; margin: 8px 0 26px; }
.pc-bar { display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap; }
.pc-seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.pc-seg button { border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 500; font-size: 15px; padding: 8px 18px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: background .15s, color .15s, box-shadow .15s; }
.pc-seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(16,24,40,.08), 0 2px 8px rgba(16,24,40,.08); }
.pc-seg button em { font-style: normal; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #dcfce7; color: #15803d; }
.pc-seg-sm button { font-size: 13.5px; padding: 6px 12px; }
:root[data-theme="dark"] .pc-seg button em { background: rgba(74,222,128,.15); color: #4ade80; }

.pc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.pc { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 26px 24px 24px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.05); transition: transform .18s, box-shadow .18s; min-width: 0; }
.pc:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(16,24,40,.05), 0 18px 40px rgba(16,24,40,.10); }
.pc-head { display: flex; align-items: center; gap: 12px; }
.pc-head h3 { margin: 0; font-size: 21px; line-height: 1.2; }
.pc-head p { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.4; }
.pc-ico { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.pc-ico svg { width: 22px; height: 22px; }
.pc-pro .pc-ico { background: #f3e8ff; color: #7c3aed; }
:root[data-theme="dark"] .pc-pro .pc-ico { background: rgba(124,58,237,.18); color: #c4b5fd; }
.pc-now { margin-left: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: #dcfce7; color: #15803d; white-space: nowrap; }
.pc-now svg { width: 14px; height: 14px; }
.pc-price { display: flex; align-items: baseline; gap: 4px; margin-top: 4px; min-height: 56px; }
.pc-cur { font-size: 24px; font-weight: 600; align-self: flex-start; margin-top: 8px; }
.pc-amt { font-size: 50px; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.pc-per { font-size: 15px; color: var(--muted); margin-left: 4px; }
.pc-soon { display: inline-flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 600; color: #7c3aed; }
.pc-sub { margin: -6px 0 0; font-size: 14px; color: var(--muted); min-height: 21px; }
.pc-btn { width: 100%; justify-content: center; padding: 13px 18px; font-size: 16px; border-radius: 14px; }
.pc-btn svg { width: 18px; height: 18px; }
.pc-stats { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.pc-stats div { display: grid; justify-items: center; gap: 2px; padding: 10px 4px; text-align: center; }
.pc-stats div + div { border-left: 1px solid var(--line); }
.pc-stats b { font-size: 20px; line-height: 1.1; }
.pc-stats span { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.pc-inc { margin: 4px 0 -4px; font-size: 13.5px; font-weight: 600; color: var(--text); }
.pc-feats { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pc-feats li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; font-size: 14.5px; line-height: 1.5; }
.pc-feats li svg { margin-top: 2px; padding: 2px; border-radius: 50%; background: #dcfce7; color: #15803d; box-sizing: content-box; width: 14px; height: 14px; }
:root[data-theme="dark"] .pc-feats li svg, :root[data-theme="dark"] .pc-now { background: rgba(74,222,128,.15); color: #4ade80; }
.pc-current:not(.pc-hot) { border-color: #86efac; box-shadow: 0 0 0 3px rgba(34,197,94,.12); }

/* Premium: the dark, glowing hero card */
.pc-hot { background: radial-gradient(120% 70% at 50% 0%, #2a3360 0%, #161c33 55%, #0d1222 100%); color: #fff; border: 1px solid rgba(245,158,11,.55);
  box-shadow: 0 0 0 1px rgba(245,158,11,.25), 0 24px 60px rgba(13,18,34,.45), 0 0 80px rgba(245,158,11,.18); transform: translateY(-10px); }
.pc-hot:hover { transform: translateY(-13px); box-shadow: 0 0 0 1px rgba(245,158,11,.35), 0 30px 70px rgba(13,18,34,.5), 0 0 90px rgba(245,158,11,.25); }
.pc-hot .pc-head p, .pc-hot .pc-per, .pc-hot .pc-sub, .pc-hot .pc-stats span { color: #b6bfdc; }
.pc-hot .pc-ico { background: linear-gradient(140deg, #fbbf24, #f59e0b); color: #fff; box-shadow: 0 6px 18px rgba(245,158,11,.4); }
.pc-hot .pc-amt { background: linear-gradient(180deg, #fff 30%, #fde68a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pc-hot .pc-stats { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.04); }
.pc-hot .pc-stats div + div { border-color: rgba(255,255,255,.12); }
.pc-hot .pc-inc { color: #fde68a; }
.pc-hot .pc-feats li svg { background: rgba(245,158,11,.2); color: #fbbf24; }
.pc-hot .pc-btn.btn-primary { background: linear-gradient(135deg, #fbbf24, #f59e0b 55%, #ea580c); border: 0; color: #1b1100; font-weight: 600; box-shadow: 0 10px 24px rgba(245,158,11,.35); }
.pc-hot .pc-btn.btn-primary:hover { filter: brightness(1.05); box-shadow: 0 14px 30px rgba(245,158,11,.45); }
.pc-hot .pc-now { background: rgba(74,222,128,.16); color: #86efac; }
.pc-ribbon { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; color: #1b1100; background: linear-gradient(135deg, #fde68a, #fbbf24 50%, #f59e0b); box-shadow: 0 6px 16px rgba(245,158,11,.4); }
.pc-ribbon svg { width: 14px; height: 14px; }
.pc-hot .gift-box { margin: 0; background: rgba(255,255,255,.06); border-color: rgba(251,191,36,.7); }
.pc-hot .gift-box strong { color: #fde68a; } .pc-hot .gift-box span { color: #cbd2ea; }
.pc-hot .gift-box::after { background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.12) 50%, transparent 70%); }
.pc-hot .gift-cta { background: linear-gradient(135deg, #f97316, #e11d48); color: #fff; }

.pc-trust { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; font-size: 13.5px; color: var(--muted); }
.pc-trust li { display: inline-flex; align-items: center; gap: 7px; }
.pc-trust svg { width: 16px; height: 16px; color: var(--ok); }

@media (max-width: 960px) {
  .pc-grid { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; width: 100%; gap: 28px; }
  .pc-hot { order: -1; transform: none; margin-top: 8px; }
  .pc-hot:hover { transform: translateY(-3px); }
}
@media (max-width: 420px) {
  .pc { padding: 24px 18px 20px; }
  .pc-amt { font-size: 44px; }
  .pc-seg button { padding: 8px 13px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .pc, .pc-hot { transition: none; } }
/* Feature list fold (phones) */
.pc-more { display: none; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 9px 12px; border: 1px dashed var(--line-2); border-radius: 12px; background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.pc-more svg { width: 16px; height: 16px; transition: transform .2s; }
.pc-more-hide { display: none; }
.pc-open .pc-more-show { display: none; } .pc-open .pc-more-hide { display: inline; } .pc-open .pc-more svg { transform: rotate(180deg); }
.pc-hot .pc-more { border-color: rgba(255,255,255,.18); color: #cbd2ea; }
.pc-detail { display: grid; gap: 14px; }
@media (max-width: 960px) {
  .pc-more { display: inline-flex; }
  .pc:not(.pc-open) .pc-detail { display: none; }
}
@media (max-width: 640px) {
  .pc-grid { gap: 22px; }
  .pc { padding: 20px 16px 16px; gap: 11px; border-radius: 18px; }
  .pc-hot { margin-top: 6px; }
  .pc-ico { width: 38px; height: 38px; border-radius: 12px; } .pc-ico svg { width: 19px; height: 19px; }
  .pc-head h3 { font-size: 18px; } .pc-head p { font-size: 12.5px; }
  .pc-price { min-height: 0; margin-top: 0; }
  .pc-amt { font-size: 38px; } .pc-cur { font-size: 19px; margin-top: 5px; } .pc-per { font-size: 13.5px; }
  .pc-soon { font-size: 18px; }
  .pc-sub { margin-top: -4px; font-size: 13px; min-height: 0; }
  .pc-btn { padding: 11px 14px; font-size: 15px; }
  .pc:not(.pc-hot) .pc-btn[disabled] { display: none; }
  .pc-stats div { padding: 7px 4px; } .pc-stats b { font-size: 17px; } .pc-stats span { font-size: 11px; }
  .pc-feats { gap: 8px; } .pc-feats li { font-size: 13.5px; }
  .pc .gift-box { padding: 9px 12px; gap: 10px; } .pc .gift-ico svg { width: 34px; height: 34px; }
  .pc-trust { display: grid; gap: 8px; font-size: 12.5px; justify-content: start; padding: 0 4px; }
  .pc-bar { gap: 8px; }
}
/* Super admin → payments: refund */
.sa-paylist li { grid-template-columns: 24px 150px minmax(0, 1fr) auto !important; align-items: center; }
@media (max-width: 640px) { .sa-paylist li { grid-template-columns: 24px minmax(0, 1fr) auto !important; } .sa-paylist li .log-time { grid-column: 2 / -1; } .sa-paylist li > span:not(.log-time) { grid-column: 2; } }
.sa-refund { margin-left: auto; flex: none; }
.sa-refund svg, .sa-paylist .badge svg { width: 14px; height: 14px; }
.sa-refund-form { display: grid; gap: 6px; }
.sa-refund-form input[name=amount] { max-width: 220px; font-size: 18px; }
.ev-hook { display: flex; gap: 8px; align-items: center; }
.ev-hook input { flex: 1; min-width: 0; }
.ev-hook .btn { flex: none; white-space: nowrap; }
.ev-hook[hidden] { display: none; }
/* Settings → member page section order */
.po-list { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; gap: 6px; max-width: 420px; counter-reset: po; }
.po-list li { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); counter-increment: po; }
.po-list li::before { content: counter(po); width: 20px; text-align: center; font-weight: 600; color: var(--muted); font-size: 13px; }
.po-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.po-ico svg { width: 16px; height: 16px; }
.po-name { flex: 1; font-weight: 500; }
.po-list .btn { padding: 4px 8px; }
/* Import: members in the app but not in the game's member export */
.imp-left { margin: 12px 0; padding: 12px 14px; border-radius: 14px; border: 1px solid #fecaca; background: #fff5f5; display: grid; gap: 8px; }
.imp-left.ok { display: flex; align-items: center; gap: 8px; border-color: #bbf7d0; background: #f0fdf4; color: #15803d; font-weight: 500; }
.imp-left-head { display: flex; align-items: center; gap: 8px; color: #b91c1c; }
.imp-left .help { margin: 0; }
.imp-left-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2px 12px; max-height: 220px; overflow: auto; }
.imp-left-list .check { margin: 2px 0; }
.imp-left-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
:root[data-theme="dark"] .imp-left { background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.35); }
:root[data-theme="dark"] .imp-left.ok { background: rgba(34,197,94,.08); border-color: rgba(34,197,94,.35); color: #4ade80; }
:root[data-theme="dark"] .imp-left-head { color: #fca5a5; }
/* Event alerts → channel picker: two option cards + the same webhook row as the main Discord card */
.ev-channel { gap: 10px; }
.ch-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ch-opt { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.ch-opt:hover { border-color: var(--line-2); }
.ch-opt.on { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.ch-opt input { position: absolute; opacity: 0; pointer-events: none; }
.ch-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.ch-ico { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: 18px; background: #eef0ff; color: #5865f2; }
.ch-opt.on .ch-ico { background: #5865f2; color: #fff; }
:root[data-theme="dark"] .ch-ico { background: rgba(88,101,242,.18); color: #a5b0ff; }
.ch-text { display: grid; gap: 2px; min-width: 0; }
.ch-text strong { font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.ch-text small { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); }
.ch-text small svg { width: 14px; height: 14px; color: var(--ok); }
.ch-opt[aria-disabled="true"], .ch-opt:has(input:disabled) { cursor: default; opacity: .75; }
.ch-own { display: grid; gap: 8px; }
.ch-own .hook-row { margin: 0; background: var(--surface); }
.hook-actions { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.ch-field { margin: 0; }
@media (max-width: 640px) { .ch-opts { grid-template-columns: 1fr; } }

/* ---- v1.30: member page UX ---- */
/* sticky jump chips: flush under the topbar, solid full-bleed strip (no see-through gap) */
.mp-jump { top: var(--topbar-h); margin: 12px calc(var(--gutter, 16px) * -1) 4px; padding: 8px var(--gutter, 16px); background: var(--bg); backdrop-filter: none; border-bottom: 1px solid var(--line); }
#meCard, #secLineup, #secPolls, #secNews, #weekBox, #supportBox, #selfBody { scroll-margin-top: calc(var(--topbar-h) + 64px); }
/* "My spot" card */
.me-spot { display: grid; gap: 6px; margin: 8px 0 2px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--g-accent, var(--accent)) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--g-accent, var(--accent)) 35%, var(--line)); }
.me-spot .badge { justify-self: start; }
.me-spot-where { font-size: 19px; line-height: 1.25; }
.me-role { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: #b45309; }
.me-role .ic { width: 15px; height: 15px; }
.me-mates { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 2px; font-size: 13px; }
.me-mates > .muted { width: 100%; font-size: 12px; }
.me-mate { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 7px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.me-mate i { width: 8px; height: 8px; border-radius: 3px; background: var(--c); }
.me-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.me-actions .btn { display: inline-flex; align-items: center; gap: 6px; }
.me-links { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); }
.me-links .link-btn { font-size: 13.5px; text-decoration: underline; }
@media (max-width: 640px) {
  .me-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .me-actions #meLeave { grid-column: 1 / -1; }
  .me-actions .btn { justify-content: center; }
}
/* week: a vertical agenda on phones (today onward, empty days as one line) */
@media (max-width: 640px) {
  .wb-scroll { overflow: visible; margin: 0; padding: 0; }
  .wb { grid-template-columns: 1fr; min-width: 0; gap: 6px; }
  .wb-col.past { display: none; }
  .wb-col { min-height: 0; padding: 8px 10px; }
  .wb-col:has(.wb-empty) { flex-direction: row; align-items: center; padding: 6px 10px; background: transparent; border: 1px dashed var(--line); }
  .wb-col:has(.wb-empty) .wb-head { border: 0; padding: 0; }
  .wb-col:has(.wb-empty) .wb-head b { font-size: 15px; }
  .wb-col:has(.wb-empty) .wb-empty { margin: 0 0 0 auto; }
  .wb-list { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
/* lineup: raids fold to their header on phones */
.raid-h-fold { cursor: pointer; user-select: none; margin-bottom: 0; }
.raid-fold-ic { margin-left: auto; display: inline-flex; transition: transform .15s; }
.raid-h-fold[aria-expanded="true"] .raid-fold-ic { transform: rotate(180deg); }
.raid:not(.raid-folded) .raid-h-fold { margin-bottom: 8px; }
.raid-folded .parties, .raid-folded .raid-note { display: none; }
.is-exporting .raid-folded .parties { display: grid; }
.is-exporting .raid-folded .raid-note { display: block; }
.raid-fold-hint { display: flex; align-items: center; gap: 4px; margin: 4px 0 8px; font-size: 12.5px; color: var(--muted); }
.raid-fold-hint .ic { width: 14px; height: 14px; }
/* vote footer: a clear bar instead of a see-through float */
.vt-foot { background: var(--surface); backdrop-filter: none; border: 1px solid var(--line); box-shadow: 0 -6px 18px rgba(15, 23, 42, .12); margin: 6px 0 0; }
.vt-foot:not(.is-ready) { position: static; background: transparent; border-color: transparent; box-shadow: none; padding: 0; margin-top: 12px; }
.vt-hint { font-size: 13px; }
@media (max-width: 640px) { .vt-foot.is-ready .btn-primary { flex: 1; } }
.me-show { justify-self: start; display: inline-flex; align-items: center; gap: 5px; margin-top: 2px; font-size: 13.5px; font-weight: 600; color: var(--accent-text); }
.me-show .ic { width: 15px; height: 15px; }
.me-actions .btn { justify-self: stretch; }

/* ---- v1.31: board undo / redo + one-button pool filter ---- */
.undo-group { display: inline-flex; gap: 2px; padding: 2px; border-radius: 10px; background: var(--surface-2); }
.undo-group .btn { border-color: transparent; background: transparent; }
.undo-group .btn:not(:disabled):hover { background: var(--surface); }
.undo-group .btn:disabled { opacity: .35; }
.pool-search { display: flex; gap: 6px; }
.pool-search input { flex: 1; min-width: 0; }
.pool-filter-btn { flex: none; display: inline-flex; align-items: center; gap: 4px; }
.pool-filter-btn.on { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }
.pool-filter-btn b { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 11px; display: inline-grid; place-items: center; }
.pf-panel { display: grid; gap: 8px; padding: 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); max-height: 52vh; overflow: auto; }
.pf-row { display: grid; gap: 4px; }
.pf-label { font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; }
.pf-chips, .pf-active { display: flex; flex-wrap: wrap; gap: 4px; }
.pf-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: inherit; font: inherit; font-size: 12.5px; cursor: pointer; }
.pf-chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pf-chip .ic { width: 12px; height: 12px; }
.pf-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 2px; }
.pf-foot .link-btn:disabled { opacity: .4; }
.pf-foot { position: sticky; bottom: -10px; margin: 0 -10px -10px; padding: 8px 10px; background: var(--surface-2); border-top: 1px solid var(--line); }
/* member page: news reads as a post from a person on the guild team, not a system notice */
.mp-post { background: var(--surface); }
.mp-post.pinned { background: var(--surface); border-color: var(--line); box-shadow: inset 3px 0 0 var(--g-accent, var(--accent)), var(--shadow); }
.mp-post-by { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.mp-post-by > div { display: grid; gap: 1px; min-width: 0; }
.mp-post-by strong { font-size: 15px; line-height: 1.2; }
.mp-post-by .muted { font-size: 12.5px; }
.mp-post-av { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; background: var(--g-accent, var(--accent)); }
.mp-post-by .news-pin { margin-left: auto; align-self: flex-start; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); }
.mp-post h3 { margin: 0 0 4px; font-size: 17px; }
.mp-post p a { color: var(--accent-text); word-break: break-all; }
.mp-post-by .news-pin { white-space: nowrap; } .mp-post-av .ic { width: 18px; height: 18px; }
.news-count { display: flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; } .news-count .ic { width: 14px; height: 14px; } .news-count.near { color: #b45309; font-weight: 600; }

/* ---- v1.31.3: changelog page ---- */
.changelog { max-width: 680px; margin: 0 auto; padding: 8px 0 40px; }
.cl-head { text-align: center; margin: 12px 0 28px; }
.cl-head-ico { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--accent-soft); color: var(--accent-text); margin-bottom: 10px; }
.cl-head-ico .ic { width: 26px; height: 26px; }
.cl-head h1 { margin: 0 0 4px; font-size: clamp(26px, 5vw, 34px); }
.cl-head p { margin: 0; }
.cl-list { list-style: none; margin: 0; padding: 0 0 0 22px; position: relative; display: grid; gap: 14px; }
.cl-list::before { content: ""; position: absolute; left: 6px; top: 10px; bottom: 10px; width: 2px; border-radius: 2px; background: var(--line); }
.cl-entry { position: relative; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.cl-entry::before { content: ""; position: absolute; left: -22px; top: 19px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-2, var(--muted)); }
.cl-entry.latest { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: var(--shadow); }
.cl-entry.latest::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.cl-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.cl-v { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13.5px; padding: 2px 9px; border-radius: 8px; background: var(--surface-2); }
.cl-entry.latest .cl-v { background: var(--accent); color: var(--accent-ink); }
.cl-new { font-size: 11.5px; font-weight: 600; color: var(--accent-text); }
.cl-meta time { margin-left: auto; font-size: 13px; color: var(--muted); }
.cl-entry ul { margin: 0; padding-left: 18px; line-height: 1.65; font-size: 14.5px; }
.cl-entry li + li { margin-top: 3px; }
.cl-more { text-align: center; margin-top: 18px; }
@media (max-width: 560px) { .cl-list { padding-left: 18px; } .cl-entry::before { left: -18px; } .cl-list::before { left: 4px; } .cl-entry { padding: 12px 13px; } }

/* ---- v1.32: lineup history + copy dialog ---- */
.saved-tabs { margin-bottom: 12px; }
.saved-tabs button { display: inline-flex; align-items: center; gap: 6px; }
.hist-usage { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13.5px; margin: 0 0 10px; }
.hist-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hist-list > li { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface); }
.hist-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between; }
.hist-row > div:first-child { display: grid; gap: 1px; min-width: 0; }
.hist-row .muted { font-size: 12.5px; }
.hist-other { font-size: 12.5px; margin-top: 10px; }
.copy-opts { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 10px; }
.copy-extra { display: flex; gap: 12px; flex-wrap: wrap; }
.copy-extra .check { margin: 0; }
.copy-opts select { max-width: 100%; }
.copy-preview { margin: 0; max-height: 46vh; overflow: auto; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-family: inherit; font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.hist-preview { margin-top: 8px; max-height: 260px; }

/* ---- v1.33: guild parties ---- */
.gp-btn { position: relative; }
.gp-btn .tab-count { margin-left: 4px; }
.chip-gp .ic { color: var(--accent-text); }
.pool-group { display: grid; gap: 4px; padding: 6px; border-radius: 10px; border: 1px dashed color-mix(in srgb, var(--accent) 55%, var(--line)); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.pool-group-h { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--accent-text); padding: 0 2px; }
.pool-group-h .ic { width: 13px; height: 13px; }
.pool-group-h span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pool-group-h b { margin-left: auto; font-weight: 600; }
.gp-solo { margin: 0; font-size: 13px; }
.gp-modal { max-width: 980px; }
.gp-intro { margin: 0 0 14px; max-width: 70ch; }
.gp-reqs { margin-bottom: 14px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); }
.gp-reqs h3 { margin: 0 0 6px; font-size: 14px; }
.gp-reqs ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.gp-reqs li { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.gp-name { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; }
.gp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 10px; }
.gp-card { border: 1px solid var(--line); border-radius: 14px; padding: 10px; background: var(--surface); display: grid; gap: 8px; }
.gp-card header { display: flex; align-items: center; gap: 6px; }
.gp-card header input { flex: 1; min-width: 0; font-weight: 600; border: 1px solid transparent; background: transparent; padding: 4px 6px; border-radius: 8px; }
.gp-card header input:hover, .gp-card header input:focus { border-color: var(--line); background: var(--surface-2); }
.gp-slots { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.gp-slot { position: relative; min-height: 64px; border-radius: 12px; display: grid; place-items: center; text-align: center; }
.gp-empty { border: 1px dashed var(--line); }
.gp-add { border: 1px dashed var(--line); background: var(--surface-2); color: var(--muted); font-size: 22px; cursor: pointer; }
.gp-add:hover { border-color: var(--accent); color: var(--accent-text); }
.gp-member { align-content: center; gap: 1px; padding: 14px 4px 6px; background: color-mix(in srgb, var(--c) 16%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 50%, transparent); }
.gp-member strong { font-size: 12.5px; line-height: 1.2; word-break: break-word; }
.gp-member small { font-size: 10.5px; color: var(--muted); line-height: 1.2; }
.gp-lead, .gp-mk { position: absolute; top: 2px; left: 4px; display: inline-flex; color: #d97706; }
.gp-lead .ic, .gp-mk .ic { width: 13px; height: 13px; }
.gp-mk { border: 0; background: none; padding: 0; cursor: pointer; opacity: .25; color: var(--muted); }
.gp-mk:hover { opacity: 1; color: #d97706; }
.gp-x { position: absolute; top: 0; right: 2px; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 2px 4px; }
.gp-new { place-items: center; align-content: center; min-height: 110px; color: var(--accent-text); border-style: dashed; cursor: pointer; font: inherit; font-weight: 600; }
.gp-new .ic { width: 22px; height: 22px; }
.gp-new:disabled { color: var(--muted); cursor: not-allowed; }
.gp-new small { font-weight: 400; color: var(--muted); }
.gp-usage { margin: 10px 0 0; font-size: 13px; }
.gp-pick { max-height: 55vh; overflow: auto; margin-top: 8px; }
.buddy-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.buddy-chips:empty { display: none; }
.buddy-x { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 0 0 2px; font-size: 14px; line-height: 1; }
@media (max-width: 560px) { .gp-slot { min-height: 58px; } .gp-member strong { font-size: 11.5px; } }

/* ---- v1.33.1: PIN window + compact profile form ---- */
.pin-modal { max-width: 380px; }
.pin-sheet { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 6px 4px 2px; }
.pin-sheet h2 { margin: 4px 0 0; font-size: 20px; }
.pin-sheet > .muted { margin: 0; font-size: 13.5px; }
.pin-av { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 20px; color: #fff; background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 22%, transparent); }
.pin-label { margin: 12px 0 2px; font-size: 13px; font-weight: 600; color: var(--muted); }
.pin-boxes { position: relative; display: flex; gap: 8px; justify-content: center; cursor: text; }
.pin-boxes input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; font-size: 16px; caret-color: transparent; }
.pin-box { width: 40px; height: 48px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface-2); display: grid; place-items: center; transition: border-color .12s, background .12s; }
.pin-box.opt { border-style: dashed; }
.pin-box.on { background: var(--surface); border-color: var(--accent); border-style: solid; }
.pin-box.on::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--text); }
.pin-box.cur { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pin-sheet .btn-primary { width: 100%; margin-top: 10px; justify-content: center; }
.pin-sheet .error { margin: 6px 0 0; }
.pin-sheet .forgot-note { margin: 8px 0 0; font-size: 12.5px; }
.form-card { max-width: 620px; margin-left: auto; margin-right: auto; }
.form-card h2 { font-size: 20px; }
.form-card .field { margin-bottom: 12px; }
.form-card .segmented label { padding: 6px 12px; font-size: 14px; }
.form-card textarea { min-height: 56px; }
.pin-change { margin: 4px 0 14px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.pin-change summary { cursor: pointer; display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; list-style: none; }
.pin-change summary::-webkit-details-marker { display: none; }
.pin-change summary .ic { width: 15px; height: 15px; color: var(--muted); }
.pin-change[open] summary { margin-bottom: 6px; }
.pin-change .pin-boxes { justify-content: flex-start; }
@media (max-width: 380px) { .pin-box { width: 36px; height: 44px; } .pin-boxes { gap: 6px; } }
.me-gp { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; margin-top: 6px; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); font-size: 13.5px; }
.me-gp .ic { width: 14px; height: 14px; color: var(--accent-text); }
.me-gp > span:first-of-type { color: var(--muted); }

/* ---- v1.35: invite a guild ---- */
.ref-card h2 { display: flex; align-items: center; gap: 8px; }
.ref-link { display: flex; gap: 8px; margin: 10px 0; }
.ref-link input { flex: 1; min-width: 0; font-variant-numeric: tabular-nums; background: var(--surface-2); }
.ref-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 4px 0 8px; }
.ref-stats div { display: grid; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); }
.ref-stats b { font-size: 22px; font-variant-numeric: tabular-nums; }
.ref-stats span { font-size: 12.5px; color: var(--muted); }
.ref-welcome { display: flex; align-items: center; gap: 8px; }
@media (max-width: 480px) { .ref-link { flex-direction: column; } }
.sa-limits { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 12px; }
.sa-limits .field { margin: 0; }
.sa-limits .help { font-size: 12px; }
.sa-lim-actions { grid-column: 1 / -1; margin-top: 0; }
.sa-limits input { width: 100%; min-width: 0; box-sizing: border-box; } .sa-limits { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

/* ---- v1.37: gift code loot reveal ---- */
.loot { --r1: #fbbf24; --r2: #f59e0b; --rg: rgba(251, 191, 36, .55); position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 50% 45%, #2b1d4d 0%, #120a24 55%, #05030b 100%); color: #fff; animation: lootIn .3s ease both; }
.loot-vip { --r1: #c084fc; --r2: #a855f7; --rg: rgba(192, 132, 252, .6); }
.loot-out { animation: lootOut .25s ease both; }
.loot-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.loot-rays { position: absolute; left: 50%; top: 46%; width: 1100px; height: 1100px; margin: -550px 0 0 -550px; border-radius: 50%; opacity: 0; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, var(--rg) 0deg 6deg, transparent 6deg 20deg);
  -webkit-mask: radial-gradient(circle, #000 0%, transparent 62%); mask: radial-gradient(circle, #000 0%, transparent 62%);
  animation: lootRaysIn .6s ease 1.7s forwards, lootSpin 18s linear 1.7s infinite; }
.loot-stage { position: relative; display: grid; justify-items: center; width: min(360px, 90vw); min-height: 460px; text-align: center; }
.loot-kicker { margin: 0 0 6px; font-size: 14px; letter-spacing: .06em; color: #d6c8ff; opacity: .85; animation: lootFade .4s ease .2s both; }
.loot-chest { width: 170px; height: 150px; margin-top: 70px; filter: drop-shadow(0 18px 30px rgba(0,0,0,.6)) drop-shadow(0 0 22px var(--rg));
  animation: lootDrop .55s cubic-bezier(.2, 1.4, .4, 1) both, lootShake .9s ease .6s both, lootSink .5s ease 1.75s forwards; }
.loot-lid { transform-box: fill-box; transform-origin: 50% 100%; animation: lootLid .45s cubic-bezier(.3, 1.6, .5, 1) 1.6s forwards; }
.loot-flash { position: absolute; left: 50%; top: 175px; width: 40px; height: 40px; margin: -20px; border-radius: 50%; background: #fff; opacity: 0; pointer-events: none;
  box-shadow: 0 0 80px 40px #fff, 0 0 160px 90px var(--r1); animation: lootFlash .7s ease 1.62s both; }
.loot-card { position: absolute; top: 60px; left: 50%; width: 200px; margin-left: -100px; padding: 22px 16px 18px; border-radius: 18px; display: grid; justify-items: center; gap: 4px;
  background: linear-gradient(160deg, rgba(255,255,255,.14), rgba(255,255,255,.04)), #1b1233; border: 2px solid var(--r1);
  box-shadow: 0 0 0 4px rgba(0,0,0,.35), 0 0 40px var(--rg), inset 0 0 30px rgba(255,255,255,.06);
  opacity: 0; transform: translateY(120px) scale(.3); animation: lootRise .7s cubic-bezier(.2, 1.5, .4, 1) 1.75s forwards; }
.loot-rarity { font-size: 11px; font-weight: 700; letter-spacing: .3em; padding: 3px 10px; border-radius: 999px; color: #1b1233; background: linear-gradient(90deg, var(--r1), #fff, var(--r1)); background-size: 200% 100%; animation: lootShine 2.4s linear 2.4s infinite; }
.loot-icon { display: grid; place-items: center; width: 74px; height: 74px; margin: 8px 0 2px; border-radius: 20px; color: #1b1233;
  background: radial-gradient(circle at 35% 30%, #fff, var(--r1) 45%, var(--r2)); box-shadow: 0 0 30px var(--rg); }
.loot-icon .ic { width: 40px; height: 40px; }
.loot-name { font-size: 26px; letter-spacing: .02em; }
.loot-days { font-size: 18px; font-weight: 600; color: var(--r1); }
.loot-after { position: absolute; top: 330px; left: 0; right: 0; display: grid; justify-items: center; gap: 6px; opacity: 0; animation: lootFade .5s ease 2.5s forwards; }
.loot-title { margin: 0; font-size: 22px; font-weight: 700; text-shadow: 0 0 18px var(--rg); }
.loot-until { margin: 0; color: #d6c8ff; font-size: 14px; }
.loot-claim { margin-top: 10px; min-width: 180px; justify-content: center; font-size: 16px; padding: 12px 22px; box-shadow: 0 0 24px var(--rg); }
.loot-done .loot-rays { animation: lootSpin 18s linear infinite; opacity: 1; }
.loot-done .loot-chest { animation: none; opacity: 0; }
.loot-done .loot-lid, .loot-done .loot-flash { animation: none; }
.loot-done .loot-card { animation: none; opacity: 1; transform: none; }
.loot-done .loot-after, .loot-done .loot-kicker { animation: none; opacity: 1; }
@keyframes lootIn { from { opacity: 0 } }
@keyframes lootOut { to { opacity: 0 } }
@keyframes lootFade { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }
@keyframes lootDrop { from { transform: translateY(-260px) } }
@keyframes lootShake { 0%, 100% { transform: rotate(0) } 15% { transform: rotate(-5deg) scale(1.02) } 30% { transform: rotate(5deg) } 45% { transform: rotate(-6deg) scale(1.04) } 60% { transform: rotate(6deg) } 75% { transform: rotate(-3deg) scale(1.06) } }
@keyframes lootLid { to { transform: translateY(-46px) rotate(-28deg); opacity: 0 } }
@keyframes lootSink { to { transform: translateY(60px) scale(.8); opacity: 0 } }
@keyframes lootFlash { 0% { opacity: 0; transform: scale(.2) } 25% { opacity: 1 } 100% { opacity: 0; transform: scale(3) } }
@keyframes lootRise { to { opacity: 1; transform: none } }
@keyframes lootRaysIn { to { opacity: 1 } }
@keyframes lootSpin { to { transform: rotate(360deg) } }
@keyframes lootShine { from { background-position: 200% 0 } to { background-position: -200% 0 } }
/* gift code box on the Plan page */
.code-redeem { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.code-redeem input { flex: 1 1 220px; min-width: 0; text-transform: uppercase; letter-spacing: .12em; font-weight: 600; font-variant-numeric: tabular-nums; }
/* super admin: codes */
.code-made { margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--accent-soft); display: grid; gap: 6px; justify-items: start; }
.code-made pre { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: .08em; }
.code-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.code-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; }
.code-row.code-off, .code-row.code-used { opacity: .6; }
.code-chip { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-weight: 700; letter-spacing: .08em; padding: 4px 10px; border-radius: 8px; border: 1px dashed var(--accent); background: var(--accent-soft); color: inherit; cursor: pointer; }
.code-chip .ic { width: 14px; height: 14px; }
.code-uses b { font-size: 16px; }
.code-st { font-size: 12.5px; font-weight: 600; }
.code-ok .code-st { color: #16a34a; }
.code-meta { font-size: 12.5px; flex: 1 1 160px; min-width: 0; }
.code-act { margin-left: auto; display: flex; gap: 4px; }
.code-who { flex-basis: 100%; font-size: 13px; }
.code-who ul { margin: 4px 0 0; padding-left: 18px; }
@media (prefers-reduced-motion: reduce) { .loot-rays { animation: none; opacity: 1; } }
.code-studio input[type="number"], .code-studio input[type="date"], .sa-limits input[type="number"] {
  width: 100%; background: var(--surface); color: var(--text); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; font: inherit; font-weight: 400; }

/* ---- v1.38: gift code studio ---- */
.code-studio { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; }
@media (max-width: 860px) { .code-studio { grid-template-columns: 1fr; } }
.code-build h2 { margin-top: 0; }
#codeForm { display: grid; gap: 16px; }
.cs-label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; }
.cs-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cs-plan input { position: absolute; opacity: 0; pointer-events: none; }
.cs-plan > span { display: grid; justify-items: center; gap: 2px; padding: 14px 10px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); cursor: pointer; transition: border-color .12s, box-shadow .12s, transform .12s; }
.cs-plan > span .ic { width: 28px; height: 28px; }
.cs-plan b { font-size: 17px; }
.cs-plan small { font-size: 10.5px; font-weight: 700; letter-spacing: .25em; color: var(--muted); }
.cs-epic > span .ic { color: #d97706; }
.cs-vip > span .ic { color: #9333ea; }
.cs-epic input:checked + span { border-color: #f59e0b; box-shadow: 0 0 0 4px rgba(245, 158, 11, .18), 0 10px 24px rgba(245, 158, 11, .18); transform: translateY(-1px); }
.cs-vip input:checked + span { border-color: #a855f7; box-shadow: 0 0 0 4px rgba(168, 85, 247, .18), 0 10px 24px rgba(168, 85, 247, .2); transform: translateY(-1px); }
.cs-plan input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.cs-days { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cs-day { min-width: 52px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font: inherit; font-weight: 600; cursor: pointer; font-variant-numeric: tabular-nums; }
.cs-day.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.cs-days input { width: 90px !important; }
.cs-stepper { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cs-stepper button { width: 38px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 18px; cursor: pointer; }
.cs-stepper input { width: 80px !important; text-align: center; font-weight: 700; }
.cs-stepper .help { flex-basis: 100%; margin: 2px 0 0; }
.cs-note { margin: 0; }
.cs-more summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--accent-text); }
.cs-more-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 12px; margin-top: 10px; }
.cs-more-grid .field { margin: 0; }
.cs-go { justify-self: start; padding: 12px 22px; font-size: 16px; }
.code-preview { display: grid; align-content: start; gap: 10px; padding: 18px; border-radius: 16px; background:
  radial-gradient(circle at 30% 20%, rgba(255,255,255,.08), transparent 60%), linear-gradient(160deg, #1d1433, #0d0819); }
.code-preview .cs-label { color: #b9a9e6; }
/* the gift ticket */
.gift-ticket { --r1: #fbbf24; --r2: #f59e0b; --rg: rgba(251, 191, 36, .45); display: grid; grid-template-columns: 1fr; border-radius: 16px; overflow: hidden; color: #fff;
  background: #1b1233; border: 2px solid var(--r1); box-shadow: 0 0 30px var(--rg); }
.gift-ticket.gt-vip { --r1: #c084fc; --r2: #a855f7; --rg: rgba(192, 132, 252, .5); }
.gift-ticket.is-made { animation: gtPop .5s cubic-bezier(.2, 1.5, .4, 1); }
@keyframes gtPop { from { transform: scale(.9); opacity: .4 } }
.gt-main { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 4px 14px; align-items: center; padding: 16px 18px;
  background: linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,255,255,.02)); }
.gt-rarity { grid-column: 1 / -1; justify-self: start; font-size: 10.5px; font-weight: 800; letter-spacing: .3em; padding: 3px 10px; border-radius: 999px; color: #1b1233; background: linear-gradient(90deg, var(--r1), #fff, var(--r1)); }
.gt-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; color: #1b1233; background: radial-gradient(circle at 35% 30%, #fff, var(--r1) 45%, var(--r2)); }
.gt-icon .ic { width: 30px; height: 30px; }
.gt-what { display: grid; }
.gt-what strong { font-size: 24px; line-height: 1.1; }
.gt-what span { color: var(--r1); font-weight: 600; font-size: 17px; }
.gt-stub { position: relative; display: grid; gap: 3px; padding: 14px 18px 16px; border-top: 2px dashed rgba(255,255,255,.25); }
.gt-stub::before, .gt-stub::after { content: ""; position: absolute; top: -11px; width: 20px; height: 20px; border-radius: 50%; background: #120b23; }
.gt-stub::before { left: -12px; } .gt-stub::after { right: -12px; }
.gt-label { font-size: 11px; letter-spacing: .2em; color: #b9a9e6; text-transform: uppercase; }
.gt-code { font-size: 22px; font-weight: 800; letter-spacing: .12em; font-variant-numeric: tabular-nums; word-break: break-all; }
.gt-meta, .gt-note { font-size: 12.5px; color: #d6c8ff; }
.code-made { padding: 12px; border-radius: 12px; background: rgba(255,255,255,.08); color: #fff; display: grid; gap: 8px; }
.code-made pre { margin: 0; font-size: 14px; letter-spacing: .08em; white-space: pre-wrap; }
.code-made-btns { display: flex; flex-wrap: wrap; gap: 6px; }
/* code list */
.code-row { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(120px, 160px) auto; gap: 8px 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; }
.cr-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: #fff; background: linear-gradient(135deg, #fbbf24, #d97706); }
.code-row.gt-vip .cr-icon { background: linear-gradient(135deg, #c084fc, #7e22ce); }
.cr-icon .ic { width: 20px; height: 20px; }
.cr-main { display: grid; gap: 3px; min-width: 0; }
.cr-main .code-chip { justify-self: start; }
.cr-what { font-size: 13px; }
.cr-uses { display: grid; gap: 3px; font-size: 13px; }
.cr-uses b { font-size: 16px; }
.cr-bar { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.cr-bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.code-row .code-who { grid-column: 2 / -1; }
@media (max-width: 640px) { .code-row { grid-template-columns: auto minmax(0, 1fr); } .cr-uses, .code-row .code-act { grid-column: 2; } .code-row .code-act { margin-left: 0; } }

/* ---- v1.38: support threads ---- */
.sup-modal { max-width: 720px; }
.sup-list-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sup-list-head h2 { margin: 0; }
.sup-mine { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.sup-mine button { width: 100%; text-align: left; display: grid; gap: 6px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: inherit; font: inherit; cursor: pointer; }
.sup-mine button:hover { border-color: var(--accent); }
.sup-mine button.unread { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.sup-mine-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sup-mine-top time { margin-left: auto; font-size: 12px; color: var(--muted); }
.sup-mine-msg { font-size: 14px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sup-mine-n { font-size: 12.5px; display: inline-flex; align-items: center; gap: 4px; }
.sup-st { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.sup-st-open { background: rgba(245, 158, 11, .15); color: #b45309; }
.sup-st-answered { background: rgba(37, 99, 235, .12); color: #1d4ed8; }
.sup-st-closed { background: rgba(22, 163, 74, .12); color: #15803d; }
:root[data-theme="dark"] .sup-st-open { color: #fbbf24; } :root[data-theme="dark"] .sup-st-answered { color: #93c5fd; } :root[data-theme="dark"] .sup-st-closed { color: #86efac; }
.sup-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.sup-thread { display: grid; gap: 12px; }
.sup-thread-head { display: grid; gap: 6px; }
.sup-thread-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sup-msgs { display: grid; gap: 10px; max-height: 55vh; overflow: auto; padding-right: 2px; }
.sup-msg-card { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.sup-msg-card.is-team { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); box-shadow: inset 3px 0 0 var(--accent); }
.sup-msg-card header { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 4px; }
.sup-who { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
.sup-who .ic { width: 14px; height: 14px; }
.sup-msg-card time { margin-left: auto; font-size: 12px; color: var(--muted); }
.sup-msg-card p { margin: 0; line-height: 1.6; white-space: normal; word-break: break-word; }
.sup-pics { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sup-pic { width: 92px; height: 92px; padding: 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); cursor: zoom-in; display: grid; place-items: center; }
.sup-pic img { width: 100%; height: 100%; object-fit: cover; }
.sup-pic-ph .ic { color: var(--muted); }
.sup-pic-bad { opacity: .4; cursor: default; }
.sup-viewer { max-width: min(1100px, 96vw); }
.sup-full { display: block; max-width: 100%; max-height: 82vh; margin: 0 auto; border-radius: 8px; }
.sup-reply { display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.sup-reply .error { margin: 0; }
.sup-reply-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.sup-closed { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: rgba(22, 163, 74, .1); }
.sup-closed .btn { margin-left: auto; }
.att { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.att-list { display: contents; }
.att-item { position: relative; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.att-item img { width: 100%; height: 100%; object-fit: cover; }
.att-item button { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; line-height: 1; cursor: pointer; }
.att-add { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; border: 1px dashed var(--line-2, var(--line)); color: var(--muted); font-size: 13.5px; cursor: pointer; }
.att-add:hover { border-color: var(--accent); color: var(--accent-text); }
.att-add .ic { width: 16px; height: 16px; }
button.sup-ticket { display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
button.sup-ticket:hover { border-color: var(--accent); }
.sup-ticket-closed { opacity: .65; }
.sup-time { margin-left: auto; }
.foot-support[data-unread]:not([data-unread=""])::after { content: attr(data-unread); display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 5px; padding: 0 5px; border-radius: 999px; background: #dc2626; color: #fff; font-size: 11px; font-weight: 700; }

/* ---- v1.38.1: "the team replied" ---- */
.nav-bell { position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--accent-text); cursor: pointer; animation: bellRing 1.2s ease 2; }
.nav-bell .ic { width: 18px; height: 18px; }
.nav-bell b { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #dc2626; color: #fff; font-size: 11px; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface); }
.reply-card { position: fixed; z-index: 900; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: min(380px, calc(100vw - 32px));
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 12px; padding: 14px 16px; border-radius: 16px;
  background: var(--surface); border: 1px solid color-mix(in srgb, var(--accent) 50%, var(--line)); box-shadow: 0 14px 40px rgba(15, 23, 42, .22);
  transform: translateY(20px); opacity: 0; transition: transform .25s ease, opacity .25s ease; }
.reply-card.show { transform: none; opacity: 1; }
.reply-card-ico { grid-row: span 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); }
.reply-card > div { display: grid; gap: 1px; min-width: 0; }
.reply-card > div span { font-size: 13px; color: var(--muted); }
.reply-card .btn { grid-column: 2; justify-self: start; }
.reply-card-x { position: absolute; top: 6px; right: 8px; border: 0; background: none; color: var(--muted); font-size: 18px; cursor: pointer; }
@keyframes bellRing { 0%, 100% { transform: none } 15% { transform: rotate(-14deg) } 30% { transform: rotate(12deg) } 45% { transform: rotate(-8deg) } 60% { transform: rotate(5deg) } }
@media (prefers-reduced-motion: reduce) { .nav-bell { animation: none; } .reply-card { transition: none; } }

/* ---------- Job badges (game job icons, or a coloured round badge for custom classes) ---------- */
.jb { width: var(--s); height: var(--s); display: inline-grid; place-items: center; flex: none; position: relative; }
.jb img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(15, 23, 42, .22)); }
.jb-x { border-radius: 50%; color: #fff; font-weight: 700; font-size: calc(var(--s) * .36); letter-spacing: .02em;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 55%, #fff), var(--c) 70%);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), 0 2px 5px rgba(0, 0, 0, .2); }
.chip.has-job { grid-template-columns: 22px minmax(0, 1fr); column-gap: 6px; padding-left: 5px; }
.chip.has-job .chip-job { grid-row: span 2; width: 22px; height: 22px; align-self: center; object-fit: contain; }
/* classic member page: badges instead of colour dots */
.mp-me-who .jb { margin-right: 2px; }
.me-results button .jb, .me-mate .jb { margin: -2px 0; }
.mp-names li { display: flex; align-items: center; gap: 8px; }
.mp-names li > div { display: grid; min-width: 0; }
.pin-jb { margin: 0 auto 4px; }
.pin-sheet .jb { display: grid; }

/* ---------- Member page skins ---------- */
body[data-skin="hall"] { background: linear-gradient(180deg, #d9edff 0, #edf6ff 360px, var(--bg) 980px) no-repeat, var(--bg); }
:root[data-theme="dark"] body[data-skin="hall"] { background: linear-gradient(180deg, #13223d 0, var(--bg) 640px) no-repeat, var(--bg); }
body[data-skin="night"] {
  --bg: #0d0e24; --bg-2: #14153a; --surface: #1a1b3c; --surface-2: #23244b; --line: #34366b; --line-2: #45488c;
  --text: #eef0ff; --muted: #a6a9d8; --accent: #e2b450; --accent-ink: #1d1300; --accent-text: #f3cf7a; --accent-soft: rgba(226, 180, 80, .14);
  --shadow: 0 10px 26px rgba(0, 0, 0, .45); color-scheme: dark; color: var(--text);
  background: radial-gradient(120% 60% at 50% -10%, #3a2a7a 0%, #16173a 45%, #0d0e24 100%) no-repeat, #0d0e24;
}
.hall { --h-gold: #f5b52e; --h-gold2: #fde7a8; --h-acc: #3b82f6; --h-acc-text: #1d4ed8;
  max-width: 1180px; margin: 0 auto; padding-bottom: 92px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.hall-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 900px) { .hall-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
#selfBody:empty { display: none; }
:root[data-theme="dark"] .hall { --h-acc: #60a5fa; --h-acc-text: #93c5fd; --h-gold2: rgba(245, 181, 46, .3); }
.hall-night { --h-gold: #e2b450; --h-gold2: rgba(226, 180, 80, .3); --h-acc: #8b5cf6; --h-acc-text: #c4b5fd; }
.hall > section, .hall > details, .hall > a.promo-card { margin-top: 0; }

/* banner */
.hall .mp-hero.hh { padding: 16px; border-radius: 24px; display: grid; grid-template-columns: minmax(0, 1fr); justify-content: stretch; align-content: start; gap: 12px; min-height: 0; box-shadow: 0 10px 26px rgba(30, 64, 175, .18); }
.hall-night .mp-hero.hh { box-shadow: 0 0 0 1px rgba(226, 180, 80, .35), 0 12px 30px rgba(0, 0, 0, .45); }
.hh-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.hh-top .mp-avatar { box-shadow: 0 0 0 3px var(--h-gold), 0 6px 16px rgba(0, 0, 0, .25); }
.hh-name { min-width: 0; }
.hall .hh h1 { margin: 0; font-size: clamp(22px, 5.4vw, 30px); line-height: 1.15; }
.hall .hh .mp-sub { font-size: 13.5px; margin-top: 2px; flex-wrap: wrap; }
.hall .hh .guild-links { margin: 0; gap: 6px; }
.hh-link { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 999px; font-size: 13px; font-weight: 500;
  color: inherit; text-decoration: none; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .25); }
.hh-link:hover { background: rgba(255, 255, 255, .28); }
.gt-light .hh-link { background: rgba(15, 23, 42, .06); border-color: rgba(15, 23, 42, .1); }
.hall .hh .welcome-box { margin: 0; }
.hh-war { display: grid; gap: 8px; padding: 12px; border-radius: 18px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .22); backdrop-filter: blur(6px); }
.gt-light .hh-war { background: rgba(255, 255, 255, .7); border-color: rgba(15, 23, 42, .08); }
.hh-war-l { font-size: 14px; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.hh-war-l small { opacity: .85; }
.hh-cd { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hh-cd span { display: grid; justify-items: center; padding: 6px 4px 5px; border-radius: 13px; background: #fff; color: #1e2a44; font-size: 12px;
  box-shadow: 0 3px 0 rgba(15, 23, 42, .14); }
.hh-cd b { font-weight: 700; font-size: 28px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.hh-cd .war-live { grid-column: 1 / -1; text-align: center; font-size: 20px; padding: 8px; border-radius: 13px; background: #fff; color: #dc2626; }
.hall-night .hh-cd span { background: #0d0e24; color: var(--h-gold); border: 1.5px solid var(--h-gold); box-shadow: 0 0 12px rgba(226, 180, 80, .25); }
.hall-night .hh-cd span { color: #f3cf7a; }
.hh-war-when { font-size: 12.5px; opacity: .9; }

/* my card */
.hc { display: grid; gap: 12px; padding: 16px; border-radius: 22px; background: var(--surface);
  border: 1.5px solid color-mix(in srgb, var(--h-gold) 50%, transparent); box-shadow: 0 8px 22px rgba(59, 130, 246, .12); }
.hall-night .hc { box-shadow: 0 0 0 1px rgba(226, 180, 80, .15), 0 12px 30px rgba(0, 0, 0, .4); }
.hc-top { display: flex; align-items: center; gap: 12px; }
.hc .jb.big img { filter: drop-shadow(0 0 6px rgba(245, 181, 46, .65)) drop-shadow(0 4px 8px rgba(0, 0, 0, .2)); }
.hc-name { display: grid; min-width: 0; }
.hc-name strong { font-size: 22px; line-height: 1.2; overflow-wrap: anywhere; }
.hc-name > span { color: var(--muted); font-size: 13.5px; }
.hc-tag { justify-self: start; margin-top: 5px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-style: normal;
  font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); }
.hall .me-gp.hc-tag { margin-top: 5px; }
.hc-switch { margin-left: auto; align-self: flex-start; display: grid; justify-items: center; gap: 1px; padding: 6px 9px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: inherit; font-size: 11px; cursor: pointer; }
.hc-switch .ic { width: 17px; height: 17px; }
.hc-switch:hover { color: var(--text); border-color: var(--line-2); }
.hc-spot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; padding: 10px 13px; border-radius: 14px; background: var(--surface-2); }
.hc-spot-l { font-size: 12.5px; color: var(--muted); }
.hc-spot .me-spot-where { color: var(--h-acc-text); font-size: 17px; }
.hc-spot .me-role { width: 100%; font-size: 12.5px; color: var(--muted); display: flex; gap: 4px; align-items: center; }
.hc-spot .me-role .ic { color: var(--h-gold); }
.hc-party { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; padding-top: 4px; }
.hall .hc-pm.me-mate { position: relative; display: grid; justify-items: center; gap: 4px; padding: 0; border: 0; border-radius: 0; background: none; min-width: 0; }
.hc-pm b { font-size: 12.5px; font-weight: 500; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-pm.me .jb { border-radius: 50%; box-shadow: 0 0 0 3px var(--h-acc), 0 0 0 7px color-mix(in srgb, var(--h-acc) 22%, transparent); }
.hc-pm.me b { color: var(--h-acc-text); font-weight: 700; }
.hc-crown { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); z-index: 1; color: var(--h-gold); line-height: 0; }
.hc-crown .ic { width: 15px; height: 15px; fill: currentColor; }
.hc-none { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 6px; }
.hc .mp-spots { margin: 0; }
.hc-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hc-acts .btn { justify-content: center; border-radius: 13px; min-height: 42px; }
.hall .hc-acts .btn-primary, .hall .hpk .btn-primary { background: linear-gradient(180deg, #fcd34d, #f59e0b); color: #3b2300; border-color: #e3940b; box-shadow: 0 3px 0 #c2780a; }
@media (min-width: 560px) { .hc-acts { grid-template-columns: 1.3fr 1fr 1fr 1fr; } }

/* first visit: pick your character */
.hpk { text-align: center; display: grid; gap: 2px; }
.hpk-w { margin: 0; color: var(--muted); font-size: 14px; }
.hpk h2 { margin: 0 0 6px; font-size: 26px; }
.hpk-q { margin: 0 0 8px; font-weight: 600; }
.hpk-search { display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); }
.hpk-search input { flex: 1; border: 0; background: none; padding: 11px 0; outline: none; box-shadow: none; min-width: 0; }
.hpk-search:focus-within { border-color: var(--h-acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--h-acc) 20%, transparent); }
.hpk-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
@media (min-width: 560px) { .hpk-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.hpk-grid > .muted { grid-column: 1 / -1; }
.hpk-c { display: grid; justify-items: center; gap: 3px; padding: 11px 4px 9px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface);
  color: var(--text); font: inherit; cursor: pointer; min-width: 0; transition: border-color .15s, transform .15s, background .15s; }
.hpk-c b { font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hpk-c small { color: var(--muted); font-size: 11.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hpk-c:hover { border-color: var(--h-gold); background: color-mix(in srgb, var(--h-gold) 9%, var(--surface)); transform: translateY(-1px); }
.hpk-more { margin: 8px 0 0; font-size: 13px; }
.hpk-more:empty { display: none; }
.hall .hall-quick { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.hall .hall-quick .action-card { grid-template-columns: auto 1fr; align-items: center; gap: 2px 10px; padding: 11px 13px; border-radius: 14px; }
.hall .hall-quick .action-card .action-icon { grid-row: span 2; }
.hall .hall-quick .action-card strong { font-size: 14.5px; }
.hall .hall-quick .action-card .muted { font-size: 12px; }

/* guild activity */
.hfeed { padding: 14px 16px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.hfeed h3 { margin: 0 0 4px; font-size: 16px; display: flex; align-items: center; gap: 6px; }
.hfeed ul { list-style: none; margin: 0; padding: 0; }
.hfeed li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px dashed var(--line); }
.hfeed li:first-child { border-top: 0; }
.hfeed li > div { flex: 1; min-width: 0; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.hfeed small { display: block; color: var(--muted); font-size: 12px; }
.hf-ico { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.hf-ico.poll { background: color-mix(in srgb, var(--h-acc) 14%, transparent); color: var(--h-acc-text); }
.hf-ico.news { background: color-mix(in srgb, var(--h-gold) 18%, transparent); color: #b45309; }
.hall-night .hf-ico.news { color: #f3cf7a; }
.hf-go { flex: none; border: 0; border-radius: 999px; padding: 6px 14px; background: var(--h-acc); color: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.hf-go.ghost { background: none; color: var(--muted); padding: 6px; }

/* bottom bar */
.hnav { position: fixed; z-index: 40; left: 50%; bottom: max(10px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(560px, calc(100% - 20px));
  display: flex; gap: 2px; padding: 6px; border-radius: 20px; background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(15, 23, 42, .18); backdrop-filter: blur(12px); }
.hall-night .hnav { border-color: rgba(226, 180, 80, .35); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.hnav a { flex: 1; min-width: 0; position: relative; display: grid; justify-items: center; gap: 1px; padding: 6px 2px 5px; border-radius: 14px;
  color: var(--muted); text-decoration: none; font-size: 11.5px; }
.hnav a b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.hnav a .ic { width: 21px; height: 21px; }
.hnav a.on, .hnav a:hover { color: var(--h-acc-text); background: color-mix(in srgb, var(--h-acc) 12%, transparent); }
.hnav-dot { position: absolute; top: 1px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #ef4444; color: #fff;
  font-style: normal; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }
body[data-skin="hall"] .live-note, body[data-skin="night"] .live-note { bottom: 92px; }
.hall #meCard, .hall section[id], .hall details[id] { scroll-margin-top: calc(var(--topbar-h) + 10px); }

/* settings: member page skin picker */
.skin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.skin-opt { position: relative; display: grid; gap: 4px; padding: 10px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; }
.skin-opt input { position: absolute; opacity: 0; pointer-events: none; }
.skin-opt:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.skin-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.skin-opt.locked { cursor: not-allowed; opacity: .72; }
.skin-opt small { color: var(--muted); font-size: 12px; }
.skin-vip { font-style: normal; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: rgba(124, 58, 237, .12); color: var(--premium); display: inline-flex; align-items: center; gap: 3px; vertical-align: 1px; }
.skin-prev { display: grid; grid-template-rows: 18px 1fr 8px; gap: 4px; height: 74px; padding: 6px; border-radius: 10px; }
.skin-prev i { border-radius: 5px; }
.skin-prev-hall { background: linear-gradient(180deg, #d9edff, #f4f9ff); }
.skin-prev-hall i:nth-child(1) { background: linear-gradient(135deg, #3b82f6, #93c5fd); }
.skin-prev-hall i:nth-child(2) { background: #fff; box-shadow: inset 0 0 0 1.5px #f5d27a; }
.skin-prev-hall i:nth-child(3) { background: #fff; border: 1px solid #d7e6f7; }
.skin-prev-classic { background: var(--bg); border: 1px solid var(--line); }
.skin-prev-classic i:nth-child(1) { background: linear-gradient(135deg, #f59e0b, #92400e); }
.skin-prev-classic i:nth-child(2) { background: var(--surface); border: 1px solid var(--line); }
.skin-prev-classic i:nth-child(3) { background: var(--surface-2); }
.skin-prev-night { background: radial-gradient(120% 80% at 50% 0%, #3a2a7a, #0d0e24); }
.skin-prev-night i:nth-child(1) { background: linear-gradient(135deg, #2c1e66, #4c1d95); box-shadow: inset 0 0 0 1px #e2b450; }
.skin-prev-night i:nth-child(2) { background: #1a1b3c; box-shadow: inset 0 0 0 1.5px #e2b450; }
.skin-prev-night i:nth-child(3) { background: #12132e; border: 1px solid #34366b; }
body[data-skin="hall"] .app-foot, body[data-skin="night"] .app-foot { padding-bottom: 96px; }

/* ---------- Refine simulator (mini game) ---------- */
body.rf-open { overflow: hidden; }
.rf { position: fixed; inset: 0; z-index: 200; overflow-y: auto; color: #eef4ff; font-family: var(--font);
  background: radial-gradient(90% 60% at 50% 30%, #3a4a7a 0%, #1d2140 45%, #120f1f 100%); animation: rf-in .2s ease-out; }
@keyframes rf-in { from { opacity: 0; } }
.rf-top { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: linear-gradient(180deg, rgba(10, 12, 28, .85), rgba(10, 12, 28, 0)); }
.rf-x, .rf-sound { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.08); color: #fff; cursor: pointer; }
.rf-x .ic, .rf-sound .ic { width: 20px; height: 20px; }
.rf-title { flex: 1; display: grid; line-height: 1.2; }
.rf-title strong { font-size: 18px; letter-spacing: .02em; }
.rf-title span { font-size: 12px; color: #b6c3e6; }
.rf-body { max-width: 980px; margin: 0 auto; padding: 0 14px 28px; display: grid; gap: 14px; }
@media (min-width: 820px) { .rf-body { grid-template-columns: 1fr 1fr; align-items: center; min-height: calc(100vh - 70px); } }

/* stage: arch + item + effects */
.rf-stage { position: relative; height: 330px; display: grid; place-items: center; isolation: isolate; }
@media (min-width: 820px) { .rf-stage { height: 460px; } }
.rf-arch { position: absolute; height: 100%; max-width: 92%; filter: drop-shadow(0 0 10px rgba(125, 196, 255, .55)); }
.rf-glow { transform-origin: 110px 160px; animation: rf-breathe 2.6s ease-in-out infinite; }
@keyframes rf-breathe { 50% { opacity: .55; transform: scale(.96); } }
.rf-item { position: relative; z-index: 2; margin-top: 30px; }
.rf-card { position: relative; display: grid; place-items: center; width: 92px; height: 92px; border-radius: 16px;
  background: linear-gradient(160deg, #6b8cff, #2f4fb8); border: 3px solid #e0f2ff; box-shadow: 0 0 22px rgba(125, 196, 255, .8), inset 0 0 12px rgba(255,255,255,.35); }
.rf-stage[data-tier="2"] .rf-card { background: linear-gradient(160deg, #b37bff, #5b21b6); }
.rf-stage[data-tier="3"] .rf-card { background: linear-gradient(160deg, #ffd56b, #c2410c); border-color: #fff6d6; box-shadow: 0 0 26px rgba(255, 196, 90, .9), inset 0 0 12px rgba(255,255,255,.4); }
.rf-sword { width: 64px; height: 64px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
.rf-card b { position: absolute; left: 6px; bottom: 3px; font-size: 15px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px #000, 0 0 4px #000; }
.rf-burst { position: absolute; z-index: 1; width: 240px; height: 240px; border-radius: 50%; opacity: 0; pointer-events: none;
  background: radial-gradient(circle, rgba(255,255,255,.95) 0%, rgba(160, 215, 255, .7) 22%, rgba(96, 165, 250, 0) 62%); }
.rf-big { position: absolute; z-index: 4; top: 66%; left: 0; right: 0; text-align: center; font-size: clamp(38px, 11vw, 54px); font-weight: 800; letter-spacing: .06em;
  opacity: 0; pointer-events: none; color: #eaf6ff; -webkit-text-stroke: 1.5px #3b82f6; text-shadow: 0 0 14px rgba(125, 196, 255, .95), 0 0 34px rgba(59, 130, 246, .8); }
.rf-strip { position: absolute; z-index: 3; top: 16%; left: 0; right: 0; padding: 7px 0; text-align: center; font-size: 15px; font-weight: 600; opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(30, 41, 90, .92) 20%, rgba(30, 41, 90, .92) 80%, transparent); pointer-events: none; }
.rf-floats { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.rf-float { position: absolute; left: 50%; top: 48%; transform: translate(-50%, 0); font-size: 44px; font-weight: 800; animation: rf-float 1.25s ease-out forwards;
  text-shadow: 0 2px 0 rgba(0,0,0,.35), 0 0 14px currentColor; }
.rf-float.up { color: #4ade80; } .rf-float.down { color: #f87171; } .rf-float.same { color: #e2e8f0; }
@keyframes rf-float { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.6); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.15); }
  70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -120px) scale(1); } }
.rf-stage.is-charge .rf-card { animation: rf-shake .5s linear; }
.rf-stage.is-charge .rf-burst { animation: rf-charge .5s ease-in forwards; }
@keyframes rf-shake { 20%, 60% { transform: translate(-2px, 1px) rotate(-2deg); } 40%, 80% { transform: translate(2px, -1px) rotate(2deg); } }
@keyframes rf-charge { from { opacity: 0; transform: scale(.3); } to { opacity: .8; transform: scale(.75); } }
.rf-stage.is-up .rf-burst, .rf-stage.is-down .rf-burst, .rf-stage.is-same .rf-burst { animation: rf-pop .7s ease-out forwards; }
@keyframes rf-pop { from { opacity: 1; transform: scale(.7); } to { opacity: 0; transform: scale(1.6); } }
.rf-stage.is-up .rf-big, .rf-stage.is-down .rf-big, .rf-stage.is-same .rf-big { animation: rf-bigin 1.4s ease-out forwards; }
.rf-stage.is-up .rf-big { color: #fff8dc; -webkit-text-stroke-color: #d97706; text-shadow: 0 0 14px rgba(255, 214, 102, .95), 0 0 36px rgba(245, 158, 11, .85); }
@keyframes rf-bigin { 0% { opacity: 0; transform: scale(1.6); } 18% { opacity: 1; transform: scale(1); } 75% { opacity: 1; } 100% { opacity: 0; } }
.rf-stage.is-up .rf-strip, .rf-stage.is-down .rf-strip, .rf-stage.is-same .rf-strip { animation: rf-strip 1.6s ease-out forwards; }
@keyframes rf-strip { 0% { opacity: 0; transform: scaleX(.4); } 15% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; } }
.rf-stage.is-up .rf-card { animation: rf-glowup .9s ease-out; }
@keyframes rf-glowup { 30% { box-shadow: 0 0 48px rgba(255, 230, 140, 1), inset 0 0 18px #fff; transform: scale(1.08); } }
.rf-stage.is-down .rf-card { animation: rf-shake .35s linear 2; }

/* panel: like the game's white card */
.rf-panel { display: grid; gap: 10px; padding: 16px; border-radius: 22px; color: #1e2a44; background: linear-gradient(180deg, #ffffff, #eef1fb);
  border: 3px solid #c9d3f5; box-shadow: 0 16px 40px rgba(0, 0, 0, .4); }
.rf-name { margin: 0; text-align: center; color: #e0425a; font-size: 20px; }
.rf-step { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 8px; border-radius: 12px; background: #e6eaf7; font-size: 17px; }
.rf-step span { color: #475569; font-weight: 600; }
.rf-step .ic { color: #3b82f6; }
.rf-step .up { color: #16a34a; }
.rf-warn { text-align: center; padding: 7px 10px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: #fff; background: linear-gradient(90deg, #22a06b, #34c38f); }
.rf-warn.danger { background: linear-gradient(90deg, #f59e0b, #f97316); }
.rf-mats { display: flex; justify-content: center; gap: 10px; }
.rf-mat { position: relative; display: grid; place-items: center; width: 62px; height: 62px; border-radius: 12px; background: linear-gradient(160deg, #5b8def, #2747a8); border: 2px solid #c7d7ff; }
.rf-mat img { width: 46px; height: 46px; object-fit: contain; }
.rf-mat small { position: absolute; right: 3px; bottom: 1px; font-size: 11.5px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px #000; }
.rf-rate { text-align: center; font-size: 14px; color: #92400e; }
.rf-rate b { font-size: 17px; color: #ea580c; }
.rf-rate em { font-style: normal; color: #16a34a; font-weight: 600; }
.rf-drop { color: #dc2626; }
.rf-go { justify-self: center; min-width: 210px; padding: 12px 24px; border: 0; border-radius: 999px; font: inherit; font-size: 20px; font-weight: 700; color: #fff; cursor: pointer;
  background: linear-gradient(180deg, #6d8cff, #3d5bdb); box-shadow: 0 4px 0 #2a3fa8, 0 8px 18px rgba(61, 91, 219, .45); transition: transform .08s; }
.rf-go:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #2a3fa8; }
.rf-go:disabled { filter: grayscale(.5); opacity: .6; cursor: default; }
.rf-auto, .rf-row { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.rf-auto select, .rf-row select { width: auto; padding: 5px 8px; border-radius: 9px; border: 1px solid #c7d0ea; background: #fff; color: #1e2a44; font: inherit; }
.rf-panel .btn { color: #1e2a44; background: #fff; border-color: #c7d0ea; }
.rf-panel .btn-ghost { background: transparent; }
.rf-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; padding-top: 8px; border-top: 1px dashed #c7d0ea; font-size: 13px; color: #475569; }
.rf-stats b { color: #1e2a44; }
.rf-used { display: inline-flex; align-items: center; gap: 3px; }
.rf-used img { width: 18px; height: 18px; }
.rf-log { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; min-height: 24px; }
.rf-chip { font-style: normal; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #e2e8f0; color: #475569; }
.rf-chip.up { background: #dcfce7; color: #15803d; } .rf-chip.down { background: #fee2e2; color: #b91c1c; }
.rf-panel #rfShare { justify-self: center; }
.rf-credit { margin: 0; text-align: center; font-size: 11.5px; color: #64748b; }
.rf-credit a { color: #3b5bdb; }
@media (prefers-reduced-motion: reduce) { .rf *, .rf { animation-duration: .01ms !important; } }

/* member page entries */
.hf-ico.toy { background: rgba(124, 58, 237, .12); color: #7c3aed; }
.hall-night .hf-ico.toy { color: #c4b5fd; }
.toy-link { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 18px 0 0; padding: 10px 14px; width: 100%; border-radius: 14px; border: 1px dashed var(--line-2);
  background: transparent; color: var(--text); font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.toy-link small { color: var(--muted); }
.toy-link:hover { border-style: solid; }

/* ---------- Member page skin: "legend" (VIP) — full game UI: gold-framed panels, bevelled game buttons ---------- */
body[data-skin="legend"] {
  --bg: #0e141d; --bg-2: #141c28; --surface: #1b2534; --surface-2: #243149; --line: #3d4e6b; --line-2: #55698f;
  --text: #f5efdf; --muted: #bdb5a0; --accent: #e8b64c; --accent-ink: #1d1300; --accent-text: #f3cf7a; --accent-soft: rgba(232, 182, 76, .14);
  --shadow: 0 10px 26px rgba(0, 0, 0, .5); color-scheme: dark; color: var(--text);
  background:
    radial-gradient(70% 40% at 50% 0%, rgba(232, 160, 70, .22), transparent 70%),
    repeating-linear-gradient(45deg, rgba(232, 182, 76, .035) 0 2px, transparent 2px 22px),
    repeating-linear-gradient(-45deg, rgba(232, 182, 76, .035) 0 2px, transparent 2px 22px),
    radial-gradient(120% 80% at 50% 100%, #0a0e15, #121a26) fixed;
}
.hall-legend { --h-gold: #e8b64c; --h-gold2: rgba(232, 182, 76, .3); --h-acc: #5b8cff; --h-acc-text: #a9c6ff; }
/* framed panels: gold line, dark inner rim, thin gold inner line, diamond on top */
.hall-legend .hc, .hall-legend .hfeed, .hall-legend .mp-hero.hh, .hall-legend > section:not(.hfeed), .hall-legend > details {
  position: relative; border: 2px solid #c9993d; border-radius: 18px;
  box-shadow: inset 0 0 0 3px #121a27, inset 0 0 0 4px rgba(232, 182, 76, .45), 0 12px 28px rgba(0, 0, 0, .55); }
.hall-legend .hc, .hall-legend .hfeed { background: linear-gradient(180deg, #24324c, #172030); }
.hall-legend .hc::before, .hall-legend .hfeed::before, .hall-legend .mp-hero.hh::before {
  content: ""; position: absolute; top: -8px; left: 50%; width: 14px; height: 14px; transform: translateX(-50%) rotate(45deg); z-index: 2;
  background: linear-gradient(135deg, #fff1c2, #e8b64c 55%, #9a6a17); box-shadow: 0 0 10px rgba(232, 182, 76, .8); }
.hall-legend > section:not(.hfeed), .hall-legend > details { padding: 14px 16px; background: linear-gradient(180deg, rgba(36, 50, 76, .85), rgba(23, 32, 48, .85)); }
.hall-legend > details.mp-week, .hall-legend > details.mp-roster { padding: 6px 16px; }
.hall-legend .mp-hero.hh { overflow: visible; }
.hall-legend .mp-hero.hh::after { display: none; }
.hall-legend h2, .hall-legend .hfeed h3 { color: #f3cf7a; text-shadow: 0 2px 0 #000, 0 0 12px rgba(232, 182, 76, .35); letter-spacing: .02em; }
.hall-legend h2 .ic, .hall-legend .hfeed h3 .ic { color: #f3cf7a; }
/* countdown: game counters */
.hall-legend .hh-war { background: rgba(10, 14, 22, .55); border: 1.5px solid rgba(232, 182, 76, .55); }
.hall-legend .hh-cd span { background: linear-gradient(180deg, #2c3d60, #121a2a); border: 1.5px solid #e8b64c; color: #e9dcb8; box-shadow: inset 0 0 10px rgba(0, 0, 0, .6), 0 0 10px rgba(232, 182, 76, .25); }
.hall-legend .hh-cd b { background: linear-gradient(180deg, #fff6d6, #f3cf7a 45%, #c9892a); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .6)); }
.hall-legend .hh-top .mp-avatar { box-shadow: 0 0 0 3px #e8b64c, 0 0 0 6px #121a27, 0 0 0 7px rgba(232, 182, 76, .6), 0 8px 18px rgba(0, 0, 0, .5); }
/* my card */
.hall-legend .hc-spot { background: rgba(10, 14, 22, .45); border: 1px solid rgba(232, 182, 76, .35); }
.hall-legend .hc-spot .me-spot-where { color: #f3cf7a; }
.hall-legend .hc-pm.me .jb { box-shadow: 0 0 0 3px #e8b64c, 0 0 16px rgba(232, 182, 76, .8); }
.hall-legend .hc-pm.me b { color: #f3cf7a; }
.hall-legend .hc-tag, .hall-legend .hc-switch { background: rgba(10, 14, 22, .5); border-color: rgba(232, 182, 76, .45); color: #e9dcb8; }
/* game buttons */
.hall-legend .hc-acts .btn, .hall-legend .hf-go:not(.ghost) { border-radius: 12px; border: 1.5px solid rgba(232, 182, 76, .6); color: #f5efdf;
  background: linear-gradient(180deg, #34476b, #1f2b42); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 3px 0 #0b111b; }
.hall-legend .hc-acts .btn-primary, .hall-legend .hpk .btn-primary, .hall-legend .hf-go:not(.ghost) { border: 0; color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, .35);
  background: linear-gradient(180deg, #7b98ff, #3d5bdb); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 4px 0 #2a3fa8, 0 8px 16px rgba(61, 91, 219, .4); }
.hall-legend .hf-ico { background: rgba(232, 182, 76, .14); color: #f3cf7a; border: 1px solid rgba(232, 182, 76, .35); }
.hall-legend .hfeed li { border-top-color: rgba(232, 182, 76, .2); }
.hall-legend .hpk-c { background: linear-gradient(180deg, #24324c, #172030); border-color: rgba(232, 182, 76, .4); }
.hall-legend .hpk-c:hover { border-color: #e8b64c; box-shadow: 0 0 14px rgba(232, 182, 76, .35); }
/* bottom HUD */
.hall-legend .hnav { background: linear-gradient(180deg, rgba(36, 50, 76, .96), rgba(16, 22, 33, .96)); border: 2px solid #c9993d;
  box-shadow: inset 0 0 0 3px #121a27, inset 0 0 0 4px rgba(232, 182, 76, .35), 0 10px 30px rgba(0, 0, 0, .6); }
.hall-legend .hnav a { color: #bdb5a0; }
.hall-legend .hnav a.on, .hall-legend .hnav a:hover { color: #f3cf7a; background: radial-gradient(80% 90% at 50% 100%, rgba(232, 182, 76, .28), transparent 70%); }
.hall-legend .hnav a.on .ic { filter: drop-shadow(0 0 6px rgba(232, 182, 76, .9)); }
/* lineup chips sit on dark panels */
.hall-legend .raid { background: rgba(10, 14, 22, .35); }
.skin-prev-legend { background: radial-gradient(90% 60% at 50% 0%, #5b3a1a, #121a26); }
.skin-prev-legend i:nth-child(1) { background: linear-gradient(135deg, #24324c, #172030); box-shadow: inset 0 0 0 1.5px #e8b64c; }
.skin-prev-legend i:nth-child(2) { background: #1b2534; box-shadow: inset 0 0 0 1.5px #e8b64c, inset 0 0 0 3px #121a27; }
.skin-prev-legend i:nth-child(3) { background: linear-gradient(90deg, #3d5bdb, #7b98ff); }

/* ---------- Getting-started checklist (new owners) ---------- */
#onbHost:empty { display: none; }
.onb { margin: 0 0 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.onb > summary { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none;
  background: linear-gradient(90deg, var(--accent-soft), transparent 70%); }
.onb > summary::-webkit-details-marker { display: none; }
.onb-ring { --p: 0; flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; font-size: 13px; font-weight: 700;
  background: radial-gradient(closest-side, var(--surface) 76%, transparent 78%), conic-gradient(var(--accent) calc(var(--p) * 1%), var(--line) 0); }
.onb-h { flex: 1; display: grid; min-width: 0; }
.onb-h strong { font-size: 16px; }
.onb-h small { color: var(--muted); font-size: 13px; }
.onb-fold { color: var(--muted); transition: transform .2s; }
.onb[open] .onb-fold { transform: rotate(180deg); }
.onb-list { list-style: none; margin: 0; padding: 4px 14px 2px; display: grid; }
.onb-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.onb-list li:first-child { border-top: 0; }
.onb-list li > div { flex: 1; display: grid; min-width: 0; }
.onb-list li strong { font-size: 14.5px; }
.onb-list li small { color: var(--muted); font-size: 12.5px; }
.onb-check { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--surface-2); color: var(--muted); }
.onb-list li.done .onb-check { background: rgba(22, 163, 74, .14); color: var(--ok); }
.onb-list li.done strong { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 50%, transparent); }
.onb-list li.next .onb-check { background: var(--accent-soft); color: var(--accent-text); }
.onb-list .btn { flex: none; }
.onb-foot { margin: 0; padding: 4px 14px 12px; text-align: right; font-size: 13px; }

/* member page news: small post cards, long ones fold with "read more" */
.np-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.mp-news .np { margin: 0; padding: 12px 14px; display: grid; gap: 6px; align-content: start; }
.mp-news .np h3 { margin: 0; font-size: 15.5px; line-height: 1.35; }
.np .mp-post-by { margin: 0; }
.np-body { margin: 0; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.np-body.clamp:not(.open) { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.np-more { justify-self: start; font-size: 13px; font-weight: 600; color: var(--accent-text); }
.mp-news #newsList { display: grid; gap: 10px; }

/* hall menu: folded into a corner button; the section list opens above it */
.hnav, .hall-night .hnav, .hall-legend .hnav { left: auto; right: 14px; bottom: max(14px, env(safe-area-inset-bottom)); transform: none; width: auto;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; backdrop-filter: none; }
.hnav-fab { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 11px 17px; border-radius: 999px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent); color: var(--text); font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .22); backdrop-filter: blur(10px); }
.hnav-fab .ic { width: 19px; height: 19px; }
.hnav-fab .hnav-dot { top: -6px; left: auto; right: -5px; }
.hnav.open .hnav-fab { background: var(--h-acc); color: #fff; border-color: transparent; }
.hnav-items { display: none; flex-direction: column; gap: 2px; min-width: 200px; padding: 6px; border-radius: 18px; background: var(--surface);
  border: 1px solid var(--line); box-shadow: 0 14px 36px rgba(15, 23, 42, .25); }
.hnav.open .hnav-items { display: flex; animation: hnav-in .16s ease-out; }
@keyframes hnav-in { from { opacity: 0; transform: translateY(8px) scale(.97); } }
.hnav .hnav-items a { flex: none; display: flex; align-items: center; justify-content: flex-start; gap: 10px; padding: 10px 12px; font-size: 15px; }
.hnav .hnav-items a b { font-weight: 500; }
.hnav .hnav-items a .hnav-dot { position: static; margin-left: auto; }
.hall-night .hnav-fab, .hall-night .hnav-items { border-color: rgba(226, 180, 80, .35); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.hall-legend .hnav-fab, .hall-legend .hnav-items { background: linear-gradient(180deg, #2a3a58, #172030); border: 2px solid #c9993d; color: #f5efdf;
  box-shadow: inset 0 0 0 2px #121a27, 0 10px 30px rgba(0, 0, 0, .6); }
.hall-legend .hnav.open .hnav-fab { background: linear-gradient(180deg, #7b98ff, #3d5bdb); }
.np .mp-post-av { width: 30px; height: 30px; font-size: 12px; }
body[data-skin="hall"] .live-note, body[data-skin="night"] .live-note, body[data-skin="legend"] .live-note { bottom: 80px; }
@media (max-width: 640px) {
  .np-grid { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 84%; overflow-x: auto; scroll-snap-type: x mandatory;
    padding: 2px 2px 8px; margin: 0 -2px; scrollbar-width: none; }
  .np-grid::-webkit-scrollbar { display: none; }
  .np-grid .np { scroll-snap-align: start; }
}

/* my card never grows past its column: one shrinkable track, buttons wrap to a second row when the labels are long */
.hc { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.hc > * { min-width: 0; }
.hc-acts, .hc-acts { grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
@media (min-width: 560px) { .hc-acts { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }
.hc-acts .btn { min-width: 0; white-space: normal; text-align: center; line-height: 1.2; }
.hc-spot .me-spot-where { overflow-wrap: anywhere; }
.hh-top, .hh-name h1 { min-width: 0; overflow-wrap: anywhere; }
.pub-msg { display: grid; gap: 8px; margin: 14px 0 4px; padding: 12px; border-radius: 14px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); text-align: left; }
.pub-msg textarea { font-size: 14.5px; line-height: 1.5; resize: vertical; }
.pub-msg .btn { justify-self: stretch; }
.pub-done-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.pub-done-head { padding: 8px 8px 0; }
/* Team tab: display name shown to members / Discord */
.alias-row { display: flex; flex-wrap: wrap; align-items: end; gap: 6px 10px; margin: 10px 0 0 48px; }
.alias-row label { display: grid; gap: 4px; flex: 1 1 220px; font-size: 13px; }
.alias-row label span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.alias-row input { width: 100%; max-width: 320px; }
.alias-row small { flex-basis: 100%; font-size: 12px; }
@media (max-width: 560px) { .alias-row { margin-left: 0; } }
/* Leave reported after publishing: shown on the published lineup and the member's own card */
.away-banner {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 12px; margin: 10px 0;
  background: color-mix(in srgb, #0ea5e9 10%, var(--surface)); border: 1px solid color-mix(in srgb, #0ea5e9 35%, transparent);
}
.away-banner > .ic { color: #0284c7; margin-top: 2px; flex: none; }
.away-banner span { display: grid; gap: 2px; min-width: 0; }
.away-banner small { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.raid-away { display: inline-flex; align-items: center; gap: 2px; vertical-align: middle; font-size: 12.5px; font-weight: 600;
  color: #0369a1; background: color-mix(in srgb, #0ea5e9 14%, transparent); padding: 1px 7px 1px 5px; border-radius: 999px; }
.raid-away .ic { width: 13px; height: 13px; }
.me-away { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: #0369a1;
  background: color-mix(in srgb, #0ea5e9 13%, transparent); padding: 3px 9px; border-radius: 999px; }
.hc-spot .me-away { margin-top: 2px; }
.me-away .ic { width: 14px; height: 14px; }
.hc-pm.away .jb, .me-mate.away .jb { opacity: .45; filter: grayscale(.7); }
.hc-pm.away b { text-decoration: line-through; color: var(--muted); }
.me-mate.away { color: var(--muted); }
.me-mate.away .ic { width: 13px; height: 13px; color: #0284c7; }
.hc-away { position: absolute; top: 18px; right: 50%; transform: translateX(26px); z-index: 1; line-height: 0;
  background: #0284c7; color: #fff; border-radius: 50%; padding: 3px; box-shadow: 0 0 0 2px var(--surface); }
.hc-away .ic { width: 12px; height: 12px; }
:root[data-theme="dark"] .away-banner > .ic, :root[data-theme="dark"] .me-away, :root[data-theme="dark"] .raid-away { color: #7dd3fc; }
body[data-skin="night"] .me-away, body[data-skin="legend"] .me-away, body[data-skin="night"] .raid-away, body[data-skin="legend"] .raid-away { color: #7dd3fc; }

/* ---------- Partner Program ---------- */
/* pay dialog: partner code */
.partner-code { margin: 6px 0 12px; padding: 12px; border: 1px dashed var(--line-2); border-radius: 12px; background: var(--surface-2); }
.partner-code > label { display: flex; align-items: center; gap: 6px; font-weight: 500; margin-bottom: 8px; }
.pc-row { display: flex; gap: 8px; }
.pc-row input { flex: 1; min-width: 0; font-family: var(--mono); text-transform: uppercase; }
.pc-msg { margin: 8px 0 0; font-size: 13px; min-height: 1em; }
.pc-msg:empty { display: none; }
.pc-msg.ok { color: var(--ok); }
.pc-msg.bad { color: var(--bad); }
#payPrice s { color: var(--muted); font-weight: 400; margin-right: 4px; }

/* states shared by the partner page and the admin tab (blue / amber / green / red differ in lightness too) */
.pt-chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.pt-st-pending { --st: #b45309; }
.pt-st-ready { --st: #1d4ed8; }
.pt-st-paid { --st: #15803d; }
.pt-st-void { --st: #b91c1c; }
:root[data-theme="dark"] .pt-st-pending { --st: #fbbf24; }
:root[data-theme="dark"] .pt-st-ready { --st: #7cc4ff; }
:root[data-theme="dark"] .pt-st-paid { --st: #4ade80; }
:root[data-theme="dark"] .pt-st-void { --st: #fca5a5; }
.pt-chip.pt-st-pending, .pt-chip.pt-st-ready, .pt-chip.pt-st-paid, .pt-chip.pt-st-void { color: var(--st); background: color-mix(in srgb, var(--st) 14%, transparent); }
.neg { color: var(--bad); }

/* agreement */
.pt-terms { max-height: 46vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--surface-2); margin: 12px 0; font-size: 14px; line-height: 1.65; }
.pt-terms h3 { margin: 0 0 8px; font-size: 17px; }
.pt-terms h4 { margin: 14px 0 4px; font-size: 15px; }
.pt-terms p { margin: 0 0 4px; }
.pt-accept { align-items: flex-start; margin: 4px 0 14px; }
.pt-accept input { margin-top: 3px; flex: none; }

/* /partner/join and /partner */
.pt-join { max-width: 720px; margin: 24px auto; }
.pt-join h1 { margin: 4px 0 6px; }
.pt-code-mini { margin: 10px 0 14px; font-size: 15px; }
.pt-code-mini b { font-family: var(--mono); color: var(--accent-text); font-size: 17px; }
.pt-none { max-width: 560px; margin: 32px auto; }
.pt-none > .ic { width: 40px; height: 40px; color: var(--accent-text); }
.pt-page { max-width: 760px; margin: 0 auto; padding-bottom: 32px; }
.pt-head { margin: 20px 0 4px; }
.pt-head h1 { margin: 2px 0; }
.pt-code { border-color: var(--accent); display: grid; gap: 10px; }
.pt-code-big { font-family: var(--mono); font-size: 32px; letter-spacing: 1px; color: var(--accent-text); line-height: 1.1; }
.pt-link input { width: 100%; font-size: 14px; color: var(--muted); }
.pt-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.pt-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.pt-total { padding: 14px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); display: grid; gap: 2px; }
.pt-total span { font-size: 12.5px; color: var(--muted); }
.pt-total strong { font-size: 22px; color: var(--st); }
.pt-next { margin: 8px 2px 0; }
.pt-rows { list-style: none; margin: 0; padding: 0; }
.pt-rows li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pt-rows li:last-child { border-bottom: 0; }
.pt-rows li > div:first-child { min-width: 0; }
.pt-rows .muted { display: block; font-size: 13px; }
.pt-amt { display: grid; justify-items: end; gap: 4px; flex: none; }
.pt-account { font-size: 15px; }
.pt-payout-form { margin-top: 12px; }
.pt-method { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 12px; }
.pt-method label { display: flex; align-items: center; gap: 6px; cursor: pointer; min-height: 32px; }
.pt-method input { width: 18px; height: 18px; accent-color: var(--accent); }
.pt-rules summary { cursor: pointer; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.pt-rules ul { margin: 12px 0; padding-left: 20px; line-height: 1.7; }
.pt-slip { display: block; max-width: 100%; max-height: 70vh; margin: 8px auto 0; border-radius: 10px; border: 1px solid var(--line); }
@media (max-width: 560px) {
  .pt-totals { grid-template-columns: 1fr; }
  .pt-code-big { font-size: 26px; }
}

/* super admin → Partners */
.pt-req { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin: 0 0 12px; }
.pt-req p { margin: 4px 0 0; }
.pt-sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.pt-sec-head h2 { margin: 0; }
.pt-sec-head select { max-width: 100%; }
.pt-pay-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.pt-pay { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 10px; background: var(--surface-2); }
.pt-pay-top { display: flex; justify-content: space-between; gap: 10px; }
.pt-pay-top p { margin: 4px 0 0; font-size: 13px; }
.pt-pay-sum { text-align: right; flex: none; }
.pt-pay-sum b { display: block; font-size: 22px; }
.pt-pay-sum small { color: var(--muted); }
.pt-mini { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
.pt-mini li { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; }
.pt-two { display: flex; flex-wrap: wrap; gap: 0 16px; align-items: flex-start; }
.pt-list { flex: 999 1 560px; min-width: 0; }
.pt-add { flex: 1 1 300px; }
.pt-table-wrap { overflow-x: auto; }
.pt-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pt-table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12.5px; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.pt-table td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.pt-actions { white-space: nowrap; }
.pt-status-active { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.pt-status-invited { background: var(--accent-soft); color: var(--accent-text); }
.pt-status-ended { background: color-mix(in srgb, var(--muted) 16%, transparent); color: var(--muted); }
.pt-fs { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px 0; margin: 0 0 16px; }
.pt-fs legend { padding: 0 6px; font-weight: 500; }
.pt-pay-form input[type="date"], .pt-pay-form input[type="file"] { font: inherit; padding: 9px 10px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--text); }
/* Landing opened inside a chat app (Facebook / Messenger / LINE…): readable on the dark hero */
.inapp-card { margin: 0 0 18px; padding: 14px 16px 16px; border-radius: 16px; max-width: 34em;
  background: linear-gradient(160deg, rgba(251,191,36,.16), rgba(251,146,60,.08)); border: 1px solid rgba(251,191,36,.45);
  color: #f8fafc; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.inapp-top { display: flex; gap: 12px; align-items: flex-start; }
.inapp-top > div { display: grid; gap: 3px; min-width: 0; }
.inapp-top strong { font-size: 16.5px; color: #fff; }
.inapp-top span { font-size: 14px; color: #e2e8f0; line-height: 1.45; }
.inapp-ic { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: #f59e0b; color: #1a1205; }
.inapp-ic .ic { width: 20px; height: 20px; }
.inapp-steps { margin: 12px 0 12px 4px; padding-left: 22px; display: grid; gap: 4px; font-size: 14.5px; color: #f1f5f9; }
.inapp-steps b { color: #fcd34d; }
.inapp-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.inapp-acts .btn { min-height: 42px; }
.inapp-go { background: #f59e0b; color: #1a1205; border-color: #f59e0b; font-weight: 700; }
.inapp-copy { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.3); }
.inapp-acts .btn.done { background: #16a34a; border-color: #16a34a; color: #fff; }
.lx-hero .notice { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.22); color: #f1f5f9; }

/* ---- Super admin polish (v1.48.3): calmer header, compact numbers, guild avatars, folded modal sections ---- */
.admin-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin: 4px 0 2px; }
.admin-head .page-title { margin: 0; font-size: 22px; }
.admin-head p { margin: 0; font-size: 13px; }
.sa-tabs { margin-top: 10px; gap: 2px; }
.sa-tabs .tab { padding: 9px 12px; font-size: 14px; }
.sa-stats { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin: 14px 0 12px; }
.sa-stat { gap: 2px; padding: 9px 12px; border-radius: 10px; box-shadow: none; }
.sa-stat span { display: flex; align-items: center; gap: 5px; font-size: 12px; }
.sa-stat strong { font-size: 20px; }
.sa-kpis { gap: 8px; }
.sa-kpi { padding: 11px 13px; border-radius: 12px; }
.sa-kpi strong { font-size: 21px; }
.sa-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sa-name { display: grid; min-width: 0; }
.sa-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sa-av {
  flex: none; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; font-size: 19px; font-weight: 600;
  background: color-mix(in srgb, var(--c, var(--accent)) 18%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c, var(--accent)) 45%, transparent);
}
.sa-row { padding: 9px 12px; }
.sa-fold { margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.sa-fold > summary { display: flex; align-items: center; gap: 8px; padding: 10px 14px; cursor: pointer; font-weight: 500; list-style: none; }
.sa-fold > summary::-webkit-details-marker { display: none; }
.sa-fold > summary::after { content: "+"; margin-left: auto; color: var(--muted); font-size: 18px; line-height: 1; }
.sa-fold[open] > summary::after { content: "−"; }
.sa-fold > summary .ic { width: 16px; height: 16px; color: var(--accent-text); }
.sa-fold > :not(summary) { margin-left: 14px; margin-right: 14px; }
.sa-fold > :last-child { margin-bottom: 14px; }
.sa-info { margin: 12px 0 10px; }

/* Super admin ready-made (v1.48.4) */
a.sa-kpi-link{text-decoration:none;color:inherit;cursor:pointer;transition:border-color .15s,transform .15s}
a.sa-kpi-link:hover,a.sa-kpi-link:focus-visible{border-color:var(--accent,#f59e0b);transform:translateY(-1px)}
.sa-bar{display:flex;gap:8px;align-items:center;margin-bottom:8px}
.sa-bar input{flex:1;min-width:0}
.sa-total{display:inline-flex;gap:4px;align-items:center;white-space:nowrap}
.sa-chips{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}
.sa-chip{display:inline-flex;gap:5px;align-items:center;padding:5px 10px;border-radius:999px;border:1px solid var(--border,#3a3a4a);background:transparent;color:inherit;font:inherit;font-size:.85rem;cursor:pointer}
.sa-chip b{font-weight:700}
.sa-chip.active{background:var(--accent,#f59e0b);border-color:var(--accent,#f59e0b);color:#111}
.sa-sum-head{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:10px}
.sa-sum-head h2{margin:0}
.sa-sum-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:8px;margin-bottom:8px}
.sa-sum-grid>div{border:1px solid var(--border,#3a3a4a);border-radius:10px;padding:8px 10px;display:flex;flex-direction:column;gap:2px}
.sa-sum-grid span{font-size:.75rem;opacity:.7}
.sa-sum-grid strong{font-size:1.05rem}
.sa-sum-grid small{opacity:.7}
.sa-sum-owner{margin:4px 0 10px;word-break:break-all}
.sa-quick{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px}
.sa-pick{display:flex;flex-direction:column;gap:8px}
/* Staging only (beta.roworldmanager.com) */
.beta-ribbon { position: fixed; left: 10px; bottom: 10px; z-index: 9999; pointer-events: none; padding: 4px 10px; border-radius: 999px;
  background: #7c3aed; color: #fff; font: 700 12px/1.4 system-ui, sans-serif; letter-spacing: .5px; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
