@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Inter:wght@400;500;600;700&family=Tinos:ital,wght@0,400;0,700;1,400&display=swap');

/* Brand palette and type shared with www.urbansphinx.com (website/css/style.css). */
:root {
  color-scheme: light;
  --onyx: #0B0B0A;
  --onyx-soft: #151412;
  --onyx-2: #1d1b17;
  --onyx-3: #2a261e;
  --gold-brand: #C9A227;
  --gold-bright: #E4C158;
  --parchment: #F1ECE0;
  --parchment-dim: #E7E0CF;
  --charcoal: #2A2723;
  --muted-gold: #8A7648;
  --line-on-dark: rgba(201, 162, 39, 0.35);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ink: #2A2723;
  --muted: #7d7360;
  --gold: #C9A227;
  --gold-light: #f2e3b3;
  --paper: #F1ECE0;
  --panel: #F8F4EA;
  --line: #d9d1bf;
  --green: #477754;
  --red: #a43931;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: #795a18; }
.hidden { display: none !important; }
.site-header { height: 76px; padding: 0 max(24px, calc((100% - 1180px) / 2)); display: flex; justify-content: space-between; align-items: center; background: var(--onyx-soft); color: white; }
.brand { display: inline-flex; gap: 12px; align-items: center; color: white; text-decoration: none; }
.brand img { display: block; }
.brand strong, .brand small { display: block; letter-spacing: .13em; }
.brand strong { font-size: 14px; }
.brand small { margin-top: 3px; color: var(--gold); font-size: 9px; }
.connection-status { color: #dcc782; font-size: 12px; }
main { max-width: 1180px; min-height: calc(100vh - 142px); padding: 46px 24px 64px; margin: 0 auto; }
.auth-shell { min-height: 610px; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 70px; }
.auth-copy { max-width: 580px; padding: 32px 0; }
.eyebrow { margin: 0 0 10px; color: #98701d; font-weight: 800; font-size: 11px; letter-spacing: .17em; }
h1, h2, h3, h4, p { margin-top: 0; }
h1 { font-family: var(--serif); font-size: clamp(40px, 6vw, 64px); line-height: 1.08; letter-spacing: -.035em; margin-bottom: 20px; }
.auth-copy h1 em { color: #ae8127; font-weight: 400; }
.auth-copy > p:not(.eyebrow) { max-width: 470px; color: var(--muted); font-size: 17px; line-height: 1.7; }
.feature-note { margin-top: 45px; color: #5d584c; font-size: 14px; }
.gold-dot { display: inline-block; width: 9px; height: 9px; margin-right: 9px; border-radius: 50%; background: var(--gold); }
.panel { padding: 28px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 35px #48370d0a; }
.auth-form h2 { margin-bottom: 8px; font-family: var(--serif); font-size: 28px; }
.muted { color: var(--muted); }
.auth-form .muted { font-size: 14px; margin-bottom: 26px; }
label { display: block; margin: 0 0 8px; font-size: 13px; font-weight: 700; }
input, textarea, select { width: 100%; padding: 12px 13px; border: 1px solid #d9d3c6; border-radius: 7px; background: white; color: var(--ink); outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px #d5a94522; }
textarea { resize: vertical; }
.phone-entry { display: flex; align-items: center; margin-bottom: 16px; overflow: hidden; border: 1px solid #d9d3c6; border-radius: 7px; background: white; }
.phone-entry span { padding: 0 13px; color: #615a4b; border-right: 1px solid #eee9df; }
.phone-entry input { border: 0; box-shadow: none; }
.consent-copy { margin: 14px 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.checkbox-row { display: flex; align-items: flex-start; gap: 9px; margin: 13px 0; color: #5f5b53; font-size: 12px; font-weight: 500; line-height: 1.5; }
.checkbox-row input { width: 16px; height: 16px; margin: 0; accent-color: #ab7a18; }
.button { display: inline-flex; min-height: 42px; padding: 10px 16px; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 7px; font-size: 13px; font-weight: 750; transition: transform .15s, background .15s; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--onyx-soft); color: white; }
.button-primary:hover { background: #38352e; }
.button-quiet { background: #f3efe5; border-color: #e7e0d1; color: #38342c; }
.full-width { width: 100%; margin-top: 10px; }
.form-message { min-height: 18px; margin: 12px 0 0; color: var(--red); font-size: 13px; }
.form-message.success { color: var(--green); }
.dev-code { margin-top: 8px; padding: 9px; border-radius: 6px; background: #f6efdb; color: #675019; font-size: 12px; }
.text-button { padding: 4px 0; border: 0; background: transparent; color: #795a18; font-size: 12px; font-weight: 700; text-decoration: underline; }
#otpFields { margin-top: 14px; }
#otpInput { letter-spacing: .3em; }
.app-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 28px; }
.app-heading h1 { margin: 0; font-size: clamp(32px, 4vw, 48px); }
.account-tools { display: flex; align-items: center; gap: 15px; color: var(--muted); font-size: 12px; }
.tabs { display: flex; gap: 4px; margin-bottom: 24px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.tab { padding: 13px 17px; white-space: nowrap; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-weight: 700; }
.tab.active { border-bottom-color: var(--gold); color: var(--ink); }
.section-heading { display: flex; justify-content: space-between; align-items: center; margin: 34px 0 18px; }
.section-heading h2 { margin: 0; font-family: var(--serif); font-size: 31px; }
.event-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.create-hunt-card {
  display: flex;
  min-height: 245px;
  padding: 25px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  border: 1px dashed #b49b66;
  border-radius: 12px;
  background: linear-gradient(145deg, #fffdf7, #f5f0e3);
  color: #59471e;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.create-hunt-card:hover { transform: translateY(-3px); border-color: #987324; box-shadow: 0 14px 28px #49391114; }
.create-hunt-plus { display: grid; width: 64px; height: 64px; place-items: center; border: 1px solid #d7c69d; border-radius: 50%; background: #fff; color: #9c7627; font-size: 42px; font-weight: 300; line-height: 1; }
.create-hunt-title { font-family: var(--serif); font-size: 20px; font-weight: 700; }
.event-card { overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); text-align: left; color: var(--ink); }
.event-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.event-image { height: 155px; display: grid; place-items: center; background: linear-gradient(135deg, var(--onyx-3), #4c412a); color: #d9b65d; font-family: var(--serif); font-size: 24px; }
.event-image img { width: 100%; height: 100%; object-fit: cover; }
.event-card-body { padding: 17px; }
.event-card h3 { margin: 0 0 8px; font-family: var(--serif); font-size: 20px; }
.event-card p { margin: 4px 0; color: var(--muted); font-size: 12px; }
.empty-message, .empty-state { color: var(--muted); }
.empty-message { padding: 22px 0; }
.event-detail { margin-top: 24px; }
.event-detail h2 { margin: 16px 0 7px; font-family: var(--serif); font-size: 30px; }
.event-detail p { color: #5f5b53; line-height: 1.65; }
.join-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 14px; align-items: end; margin: 25px 0 9px; padding-top: 20px; border-top: 1px solid var(--line); }
.small { font-size: 12px; }
.token-pill { padding: 8px 13px; border: 1px solid #e4d199; border-radius: 30px; background: var(--gold-light); color: #5c4514; font-size: 13px; font-weight: 800; }
.hunt-card { max-width: 780px; }
.hunt-card .trial-counter { color: #96701f; font-size: 12px; font-weight: 800; letter-spacing: .1em; }
.hunt-card h3 { margin: 14px 0; font-family: var(--serif); font-size: 27px; }
.hunt-card .challenge { margin-bottom: 22px; white-space: pre-wrap; line-height: 1.7; }
.challenge-image { display: block; width: 100%; height: 100%; object-fit: cover; }
.challenge-audio { display: block; width: min(100%, 520px); margin: 0 0 18px; }
.hunt-answer { display: flex; gap: 10px; }
.hunt-answer input { flex: 1; }
.hint-box { margin: 15px 0; padding: 13px; border-left: 3px solid var(--gold); background: #faf5e7; line-height: 1.5; }
.winner-banner { padding: 17px; margin-bottom: 15px; background: var(--gold-light); border-radius: 8px; font-family: var(--serif); font-size: 19px; }
.team-header { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.team-header h3 { font-family: var(--serif); font-size: 26px; }
.team-code { padding: 10px 14px; border-radius: 7px; background: #f5efdE; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 800; letter-spacing: .15em; }
.member-list { padding-left: 18px; line-height: 1.9; }
.organizer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.form-stack { display: flex; flex-direction: column; gap: 12px; }
.form-stack h3, .form-stack h4 { margin: 0; font-family: var(--serif); }
.form-stack h3 { font-size: 22px; }
.form-stack h4 { margin-top: 7px; font-size: 18px; }
.form-stack label { margin: 0; }
.form-stack label input, .form-stack label textarea, .form-stack label select { display: block; margin-top: 6px; }
.form-stack .checkbox-row { display: flex; }
.two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
fieldset { display: flex; flex-wrap: wrap; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 7px; }
fieldset legend { padding: 0 5px; color: var(--muted); font-size: 12px; }
fieldset .checkbox-row { margin: 0; }
.divider { height: 1px; margin: 5px 0; background: var(--line); }
.issued-code { padding: 15px; border-radius: 8px; background: #f5efde; color: #554112; font-family: ui-monospace, monospace; font-size: 21px; font-weight: 800; letter-spacing: .2em; }
.issued-code small { display: block; margin-top: 7px; font: 12px/1.4 system-ui; letter-spacing: 0; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-live { margin-top: 18px; overflow-x: auto; }
.broadcast-form { display: flex; gap: 14px; align-items: end; margin-top: 16px; }
.broadcast-form label { flex: 1; }
.broadcast-form textarea { display: block; margin-top: 6px; }
.planned-trials-control { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fbf8f0; color: #65532d; font-size: 13px; }
.planned-trials-control strong { color: var(--ink); font-size: 17px; }
.planned-trials-dialog { width: min(440px, calc(100% - 28px)); padding: 26px; border: 1px solid #d8ceb6; border-radius: 13px; background: var(--panel); color: var(--ink); box-shadow: 0 24px 80px #18160e44; }
.planned-trials-dialog::backdrop { background: #17161299; backdrop-filter: blur(2px); }
.planned-trials-dialog h3 { font-family: var(--serif); font-size: 24px; }
.planned-trials-dialog .muted { font-size: 13px; line-height: 1.55; }
.team-management { margin-top: 20px; }
.team-management-tools { display: grid; grid-template-columns: minmax(240px, .7fr) 1fr; gap: 20px; align-items: end; }
.team-management .table-scroll { overflow-x: auto; }
.team-management .data-table { min-width: 620px; }
#createTrialForm { padding-top: 6px; }
#trialEditorEmpty { padding: 12px 0; font-size: 13px; }
.form-stack > .muted { margin: 0; font-size: 13px; line-height: 1.5; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th, .data-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.data-table th { color: #716b5d; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.data-table .own-row { background: #faf4e3; }
.status-good { color: var(--green); font-weight: 700; }
.status-bad { color: var(--red); font-weight: 700; }
.global-message { padding: 12px 15px; margin-bottom: 16px; border: 1px solid #d9c785; border-radius: 7px; background: #fbf3d9; color: #554112; font-size: 13px; }
.global-message.error { border-color: #e2bcb9; background: #fff1ef; color: var(--red); }
.reconnecting { color: var(--red); }
footer { min-height: 66px; display: flex; justify-content: space-between; align-items: center; padding: 0 max(24px, calc((100% - 1180px) / 2)); background: var(--onyx-soft); color: #9c988d; font-size: 11px; }
footer span:first-child { color: #dcc782; font-weight: 800; letter-spacing: .12em; }

@media (max-width: 800px) {
  main { padding-top: 28px; }
  .auth-shell { grid-template-columns: 1fr; gap: 6px; }
  .auth-copy { padding: 10px 0; }
  .auth-copy h1 { font-size: 48px; }
  .feature-note { margin-top: 20px; }
  .event-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .organizer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .site-header { height: 64px; padding: 0 16px; }
  .site-header .brand img { width: 36px; height: 36px; }
  main { padding: 22px 16px 42px; }
  .auth-copy h1 { font-size: 42px; }
  .auth-copy > p:not(.eyebrow) { font-size: 15px; }
  .panel { padding: 20px; }
  .app-heading { align-items: flex-start; flex-direction: column; }
  .account-tools { width: 100%; flex-wrap: wrap; }
  .event-grid { grid-template-columns: 1fr; }
  .event-image { height: 145px; }
  .join-form { grid-template-columns: 1fr; }
  .team-header { flex-direction: column; }
  .hunt-answer { flex-direction: column; }
  .broadcast-form { flex-direction: column; align-items: stretch; }
  .two-fields { grid-template-columns: 1fr; }
  footer { padding: 15px 16px; gap: 8px; flex-direction: column; align-items: flex-start; }
}

/* Editorial field-guide theme */
:root {
  --ink: var(--onyx-2);
  --muted: #777166;
  --gold: #e3b84f;
  --gold-light: #f6e8c3;
  --paper: #f2efe7;
  --panel: #fffdf7;
  --line: #e5dece;
  --green: #3b7757;
  --red: #a43931;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 88% 8%, #e6d8b638, transparent 33rem),
    radial-gradient(ellipse at 4% 42%, #d5c7a526, transparent 30rem),
    var(--paper);
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image: radial-gradient(#70644812 .7px, transparent .7px);
  background-size: 6px 6px;
  content: "";
  pointer-events: none;
}

.site-header {
  position: relative;
  z-index: 2;
  height: 72px;
  background: linear-gradient(110deg, var(--onyx-soft), var(--onyx-3) 72%, #30291a);
  box-shadow: 0 5px 24px #100e0a26;
}

.site-header::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #d5a945, #f3dc99, #d5a945, transparent);
  content: "";
}

.brand { gap: 13px; }
.brand img { filter: drop-shadow(0 0 9px #ddb74d2b); }
.brand strong { letter-spacing: .18em; }
.connection-status {
  padding: 7px 11px;
  border: 1px solid #d5a94536;
  border-radius: 99px;
  background: #ffffff08;
  color: #ead59b;
  font-size: 11px;
  letter-spacing: .06em;
}

main { max-width: 1280px; }
.auth-shell { gap: clamp(40px, 8vw, 112px); }
.auth-copy { position: relative; }
.auth-copy::before {
  display: block;
  width: 70px;
  height: 3px;
  margin-bottom: 22px;
  background: linear-gradient(90deg, #9e741f, #e8c260);
  content: "";
}
.auth-copy .eyebrow { color: #87641b; }
.auth-copy h1 { font-size: clamp(48px, 6.3vw, 76px); }
.auth-copy h1 em { color: #a47821; }
.auth-copy > p:not(.eyebrow) { max-width: 430px; }
.feature-note {
  display: inline-flex;
  align-items: center;
  padding: 12px 15px;
  border: 1px solid #d8cba8;
  border-radius: 7px;
  background: #fffaf0a8;
  box-shadow: 0 6px 20px #76612c0b;
  font-size: 12px;
}
.gold-dot { box-shadow: 0 0 0 4px #d5a94526; }
.auth-form {
  position: relative;
  overflow: hidden;
  padding: 34px;
  border: 1px solid #ded5c0;
  border-radius: 15px;
  background: linear-gradient(145deg, #fffefa, #fffdf6);
  box-shadow: 0 24px 70px #49391117, 0 3px 10px #49391108;
}
.auth-form::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, #9b6d15, #e6c66d, #9b6d15);
  content: "";
}
.auth-form .eyebrow { margin-top: 4px; }
.auth-form h2 { font-size: 30px; }
.button-google {
  gap: 11px;
  border-color: #d9d4c9;
  background: #fff;
  color: #302e29;
  box-shadow: 0 3px 10px #241e0e0c;
}
.button-google:hover { background: #fbfaf7; }
.button-google span { color: #4285f4; font-size: 17px; font-weight: 850; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 15px; color: #898171; font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.auth-divider::before, .auth-divider::after { height: 1px; flex: 1; background: var(--line); content: ""; }
#localLoginFields > .muted { margin: 0 0 18px; font-size: 12px; }
input, textarea, select {
  border-color: #dcd5c7;
  border-radius: 8px;
  background-color: #fffefa;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
input:hover, textarea:hover, select:hover { border-color: #c9b77f; }
input:focus, textarea:focus, select:focus { border-color: #ba8b27; box-shadow: 0 0 0 4px #d5a94524; }
.button { min-height: 44px; border-radius: 8px; }
.button-primary {
  border-color: var(--onyx-2);
  background: linear-gradient(135deg, var(--onyx-3), var(--onyx-soft));
  box-shadow: 0 5px 12px #1d1a1122;
}
.button-primary:hover { background: linear-gradient(135deg, #47402e, var(--onyx-3)); }
.button:disabled { cursor: wait; opacity: .72; transform: none; }

.dashboard-banner {
  position: relative;
  min-height: 216px;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 32px clamp(25px, 5vw, 58px);
  margin: 0 0 31px;
  border: 1px solid #5d4b25;
  border-radius: 15px;
  background:
    radial-gradient(ellipse at 78% 28%, #b3934633, transparent 34%),
    linear-gradient(112deg, var(--onyx-soft), var(--onyx-3) 63%, #342b1b);
  box-shadow: 0 16px 42px #382b101f;
  color: #fffdf7;
}
.dashboard-banner::before, .dashboard-banner::after {
  position: absolute;
  width: 280px;
  height: 280px;
  border: 1px solid #d1aa5140;
  border-radius: 50%;
  content: "";
  pointer-events: none;
}
.dashboard-banner::before { top: -155px; right: 130px; }
.dashboard-banner::after { top: -128px; right: 157px; width: 226px; height: 226px; border-color: #d1aa512e; }
.dashboard-banner > div:first-child { position: relative; z-index: 1; }
.dashboard-banner .eyebrow { color: #e3c46f; }
.dashboard-banner h2 { margin: 0 0 11px; font-family: var(--serif); font-size: clamp(27px, 4vw, 40px); line-height: 1.12; letter-spacing: -.02em; }
.dashboard-banner h2 em { color: #e5bf5d; font-weight: 400; }
.dashboard-banner p:last-child { max-width: 470px; margin: 0; color: #d0cabb; font-size: 13px; line-height: 1.6; }
.banner-seal {
  position: absolute;
  top: 50%;
  right: 15%;
  width: 105px;
  height: 105px;
  display: grid;
  align-content: center;
  justify-items: center;
  border: 1px solid #e3bc5b8a;
  border-radius: 50%;
  color: #e7c567;
  transform: translateY(-50%) rotate(-9deg);
  box-shadow: 0 0 0 7px #d7b24a0b, inset 0 0 0 4px #d7b24a12;
}
.banner-seal span { font-family: var(--serif); font-size: 32px; line-height: 1; }
.banner-seal small { margin-top: 5px; font-size: 7px; letter-spacing: .18em; text-align: center; }
.banner-coordinates { position: absolute; right: 26px; bottom: 18px; color: #c8b985; font: 9px/1.6 ui-monospace, monospace; letter-spacing: .1em; text-align: right; }
.app-heading { margin: 0 0 20px; align-items: end; }
.app-heading h1 { font-family: var(--serif); font-size: clamp(30px, 4vw, 43px); }
.app-heading .eyebrow { margin-bottom: 7px; }
.account-tools { padding: 8px 11px; border: 1px solid #dfd8c9; border-radius: 9px; background: #fffdf8c9; }
.account-tools #userLabel { color: #49453c; font-weight: 650; }
.tabs {
  gap: 5px;
  padding: 5px;
  margin-bottom: 22px;
  border: 1px solid #e3dccd;
  border-radius: 10px;
  background: #eae6dc;
}
.tab { padding: 10px 16px; border: 0; border-radius: 7px; font-size: 12px; transition: background .15s, color .15s, box-shadow .15s; }
.tab:hover { background: #ffffff80; color: var(--ink); }
.tab.active { background: #fffdf8; color: #5e4613; box-shadow: 0 2px 7px #352c1916; }
.section-heading { margin: 28px 0 16px; }
.section-heading h2 { font-size: 33px; }
.panel {
  border-color: #e1daca;
  border-radius: 13px;
  background: linear-gradient(145deg, #fffefa, #fffdf7);
  box-shadow: 0 10px 30px #3f32120b, 0 2px 5px #3f321208;
}
.event-card {
  border-color: #e1daca;
  border-radius: 13px;
  box-shadow: 0 6px 18px #382d130b;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.event-card:hover { border-color: #c9a448; box-shadow: 0 14px 28px #382d1318; }
.event-image { position: relative; background: radial-gradient(circle at 70% 25%, #bd985447, transparent 34%), linear-gradient(140deg, var(--onyx-3), #413820 75%, #725d2d); }
.event-image::after {
  position: absolute;
  inset: 12px;
  border: 1px solid #e4c46842;
  border-radius: 4px;
  content: "";
}
.event-card-body { padding: 18px; }
.event-card h3 { font-size: 22px; }
.event-card p { font-size: 13px; }
.form-stack { gap: 14px; }
.form-stack h3 { font-size: 24px; }
.form-stack h4 { margin-top: 8px; color: #755819; font-size: 17px; }
.form-stack label { color: #514b3f; font-size: 12px; }
.form-stack input, .form-stack textarea, .form-stack select { font-size: 13px; font-weight: 450; }
.organizer-grid { gap: 20px; }
.organizer-grid > .panel { position: relative; overflow: hidden; }
.organizer-grid > .panel::before {
  position: absolute;
  top: 0;
  left: 28px;
  width: 42px;
  height: 3px;
  background: #c59a39;
  content: "";
}
.admin-live h3 { font-family: var(--serif); }
.data-table th { padding-top: 12px; padding-bottom: 12px; }
.data-table tbody tr:hover { background: #fbf7ed; }
.global-message { position: sticky; top: 10px; z-index: 3; box-shadow: 0 6px 18px #33270c14; }
footer { min-height: 72px; border-top: 2px solid #a07a2d; background: var(--onyx-soft); }

@media (max-width: 800px) {
  .auth-copy h1 { font-size: 58px; }
  .dashboard-banner { min-height: 195px; }
  .banner-seal { right: 7%; width: 85px; height: 85px; }
  .team-management-tools { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .site-header { height: 64px; }
  .connection-status { padding: 6px 8px; font-size: 10px; }
  .auth-copy h1 { font-size: 46px; }
  .auth-form { padding: 26px 22px; }
  .dashboard-banner { min-height: 184px; padding: 25px 21px; margin-bottom: 22px; }
  .dashboard-banner h2 { max-width: 280px; font-size: 29px; }
  .dashboard-banner p:last-child { max-width: 250px; font-size: 11px; }
  .banner-seal { top: 22px; right: 18px; width: 53px; height: 53px; transform: rotate(-9deg); }
  .banner-seal span { font-size: 20px; }
  .banner-seal small, .banner-coordinates { display: none; }
  .app-heading { gap: 13px; }
  .app-heading h1 { font-size: 32px; }
  .account-tools { gap: 9px; }
  .tabs { margin-right: -3px; margin-left: -3px; }
  .tab { padding: 10px 12px; }
  .section-heading h2 { font-size: 29px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.empty-event-card {
  grid-column: 1 / -1;
  padding: 38px;
  border: 1px dashed #cfc4a9;
  border-radius: 13px;
  background: #fffdf7b8;
  text-align: center;
}
.empty-seal { color: #b28b35; font-size: 29px; }
.empty-event-card h3 { margin: 12px 0 7px; font-family: var(--serif); font-size: 24px; }
.empty-event-card p { margin: 0; color: var(--muted); font-size: 13px; }
.event-card-body { position: relative; }
.event-state { display: inline-block; margin-bottom: 11px; color: #987426; font-size: 9px; font-weight: 850; letter-spacing: .14em; }
.event-state-live { color: #32734d; }
.event-card-cta { display: flex; justify-content: space-between; align-items: center; padding-top: 13px; margin-top: 14px; border-top: 1px solid var(--line); color: #69501a; font-size: 12px; font-weight: 750; }
.event-card-cta span { font-size: 17px; }
.event-workspace { padding-top: 8px; scroll-margin-top: 24px; }
.back-link { margin-bottom: 14px; text-decoration: none; }
.event-overview {
  display: block;
}
.event-detail {
  display: grid;
  grid-template-columns: 1fr minmax(220px, .36fr);
  gap: 25px;
  align-items: stretch;
  overflow: hidden;
  padding: clamp(23px, 4vw, 40px);
  border: 1px solid #55451f;
  border-radius: 14px;
  background:
    radial-gradient(ellipse at 80% 0%, #d4ad4e20, transparent 32%),
    linear-gradient(120deg, var(--onyx-2), #30291d);
  color: #fffdf6;
  box-shadow: 0 15px 36px #342a151b;
  margin: 0;
}
.event-detail-copy { align-self: center; }
.event-detail-copy .eyebrow { color: #dfbd61; }
.event-detail h2 { margin: 0 0 12px; font-family: var(--serif); font-size: clamp(30px, 4vw, 44px); line-height: 1.08; }
.event-detail-copy > p:not(.eyebrow) { max-width: 640px; margin-bottom: 20px; color: #d5d0c4; font-size: 14px; line-height: 1.65; }
.event-facts { display: flex; flex-wrap: wrap; gap: 22px; }
.event-facts span { min-width: 110px; display: grid; gap: 4px; }
.event-facts small { color: #c9ae68; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.event-facts strong { color: #f4f0e5; font-size: 12px; font-weight: 650; }
.event-countdown {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 21px;
  border: 1px solid #e2c36b59;
  border-radius: 10px;
  background: #fffdf70a;
  text-align: center;
}
.countdown-kicker { color: #e3c779; font-size: 9px; font-weight: 850; letter-spacing: .14em; }
.event-countdown > strong { margin: 12px 0; color: #fff3cb; font: 700 clamp(24px, 3vw, 34px)/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: -.06em; }
.countdown-footnote { color: #d5d0c2; font-size: 11px; line-height: 1.5; }
.event-countdown-live > strong { color: #b7e0bd; font: 800 22px/1 system-ui, sans-serif; letter-spacing: .12em; }
.live-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-top: 12px; }
.live-toggle { display: inline-flex; align-items: center; gap: 9px; padding: 8px 11px; border: 1px solid #ffffff2b; border-radius: 999px; background: #ffffff0c; color: #f7f1e3; font-size: 11px; font-weight: 750; letter-spacing: .04em; cursor: pointer; }
.live-toggle input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
.toggle-switch { position: relative; width: 34px; height: 19px; flex: 0 0 34px; border-radius: 999px; background: #615d53; transition: background .18s; }
.toggle-switch::after { position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; border-radius: 50%; background: #fff; content: ""; transition: transform .18s; }
.live-toggle input:checked + .toggle-switch { background: #5b9b66; }
.live-toggle input:checked + .toggle-switch::after { transform: translateX(15px); }
.live-toggle input:focus-visible + .toggle-switch { outline: 3px solid #dfbd61; outline-offset: 3px; }
.live-toggle:has(input:disabled) { cursor: not-allowed; opacity: .65; }
.kickstart-control { display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 15px; color: #fff3cb; font-size: 12px; font-weight: 750; cursor: pointer; }
.kickstart-control input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.kickstart-switch { position: relative; width: 38px; height: 22px; border-radius: 99px; background: #797364; transition: background .15s; }
.kickstart-switch::after { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fffdf6; content: ""; transition: transform .15s; }
.kickstart-control input:checked + .kickstart-switch { background: #4f9a68; }
.kickstart-control input:checked + .kickstart-switch::after { transform: translateX(16px); }
.kickstart-control input:focus-visible + .kickstart-switch { outline: 3px solid #e3c779; outline-offset: 3px; }
.kickstart-control input:disabled + .kickstart-switch { opacity: .75; }
.team-progress-banner { display: grid; grid-template-columns: minmax(190px, .7fr) minmax(180px, 1fr) auto; gap: 18px; align-items: center; padding: 14px 18px; margin: 15px 0 3px; border: 1px solid #dfd0a3; border-radius: 10px; background: linear-gradient(100deg, #fffaf0, #fffdf7); box-shadow: 0 5px 15px #382d130b; }
.team-progress-copy { display: grid; gap: 4px; }
.team-progress-copy .eyebrow { margin: 0; color: #8b6a1c; }
.team-progress-copy strong { font-family: var(--serif); font-size: 18px; }
.team-progress-count { color: #736b5c; font-size: 11px; font-weight: 700; text-align: right; }
.team-progress-track { height: 10px; overflow: hidden; border-radius: 99px; background: #eae4d4; }
.team-progress-track > span { display: block; height: 100%; min-width: 0; border-radius: inherit; background: linear-gradient(90deg, #a77b20, #d3aa4f); transition: width .35s ease; }
.leaderboard-list { display: grid; gap: 11px; }
.leaderboard-team { padding: 14px 16px; border: 1px solid var(--line); border-radius: 9px; background: #fffefa; }
.leaderboard-team.own-team { border-color: #d3b45e; background: #fffaf0; }
.leaderboard-team-heading { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 9px; align-items: center; margin-bottom: 10px; }
.leaderboard-team-heading > strong { overflow-wrap: anywhere; font-size: 13px; }
.leaderboard-team-heading > span:last-child { color: #725820; font-size: 11px; font-weight: 750; text-align: right; }
.leaderboard-rank { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 50%; background: #eee8d8; color: #5e4a1e; font-size: 11px; font-weight: 800; }
.leaderboard-team-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 7px; color: #787163; font-size: 10px; }
.join-prompt {
  display: grid;
  grid-template-columns: minmax(210px, .75fr) 1.25fr;
  gap: 25px;
  align-items: center;
  padding: 20px 23px;
  margin: 16px 0;
  border: 1px solid #e3d7b7;
  border-radius: 12px;
  background: linear-gradient(110deg, #fffaf0, #fffdf7);
}
.join-prompt h3 { margin: 0 0 5px; font-family: var(--serif); font-size: 20px; }
.join-prompt p { margin: 0; }
.join-form { grid-template-columns: 1fr 1fr auto; gap: 11px; margin: 0; padding: 0; border: 0; }
.join-form label { margin: 0; font-size: 11px; }
.join-form input { margin-top: 5px; }
.event-tabs { margin: 18px 0 4px; }
.main-tabs { width: fit-content; min-width: 100px; margin: 0 0 21px; }
.main-tabs .tab { min-width: 88px; }
.event-panel > .section-heading { margin-top: 22px; }
.not-started-message { padding: 8px 0; color: #795c21; font-family: var(--serif); font-size: 22px; }
.create-event-dialog { max-height: min(90vh, 900px); overflow-y: auto; }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.dialog-heading h3 { margin: 0; font-family: var(--serif); font-size: 26px; }
.dialog-close { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink); font-size: 23px; line-height: 1; }
.admin-live h3 { margin-bottom: 13px; }

@media (max-width: 800px) {
  .event-detail { grid-template-columns: 1fr; }
  .event-countdown { min-height: 130px; }
  .join-prompt { grid-template-columns: 1fr; }
  .join-form { grid-template-columns: 1fr 1fr; }
  .join-form button { grid-column: 1 / -1; }
  .team-progress-banner { grid-template-columns: 1fr auto; gap: 10px 14px; }
  .team-progress-track { grid-column: 1 / -1; grid-row: 2; }
  .team-progress-count { grid-column: 2; grid-row: 1; }
}
@media (max-width: 560px) {
  .event-detail { gap: 20px; padding: 23px 20px; }
  .event-facts { gap: 13px 19px; }
  .event-facts span { min-width: 100px; }
  .event-countdown { min-height: 106px; padding: 15px; }
  .event-countdown > strong { margin: 9px 0; }
  .join-prompt { padding: 18px; }
  .join-form { grid-template-columns: 1fr; }
  .join-form button { grid-column: auto; }
  .leaderboard-team-heading { grid-template-columns: 27px minmax(0, 1fr); }
  .leaderboard-team-heading > span:last-child { grid-column: 2; text-align: left; }
  .leaderboard-team-foot { flex-direction: column; gap: 3px; }
  .empty-event-card { padding: 30px 20px; }
}

/* ---------- Events, registration and organiser management (Oct 2026) ---------- */
.header-right { display: flex; align-items: center; gap: 16px; }
.header-account:empty { display: none; }
.button-header { min-height: 36px; padding: 7px 15px; border: 1px solid #e3b84f88; background: transparent; color: #f4e2ae; }
.button-header:hover { background: #ffffff12; }
.button-small { min-height: 30px; padding: 5px 11px; font-size: 12px; }
.button-large { min-height: 50px; padding: 13px 26px; font-size: 15px; }
.button[disabled] { cursor: not-allowed; opacity: .55; transform: none; }
.button-accept { background: #2f6b4b; color: #fff; }
.button-reject { background: #fff; border-color: #e2bcb9; color: var(--red); }
.text-button.danger { color: var(--red); }
.field-note { color: var(--muted); font-size: 11px; font-weight: 500; }

/* Status chips: green = live / open, red = not live / not open. The word always accompanies the colour. */
.status-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 750; line-height: 1.2; white-space: nowrap; }
.status-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: currentColor; }
.status-chip.is-good { background: #e3f1e7; color: #276343; }
.status-chip.is-bad { background: #f8e4e1; color: #9b3229; }
.event-facts .status-chip { margin-top: 2px; }

/* Event tiles */
.event-card { display: flex; flex-direction: column; cursor: pointer; transition: transform .15s, border-color .15s, box-shadow .15s; }
.event-card:hover { box-shadow: 0 14px 30px #4939111a; }
.event-card:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.event-card-body { display: flex; flex: 1; flex-direction: column; gap: 4px; }
.tile-category { color: #8f6a1d; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.tile-flag { align-self: flex-start; margin-top: 4px; padding: 2px 7px; border-radius: 5px; background: #eee9dd; color: #625b4c; font-size: 10px; font-weight: 700; }
.event-card .tile-summary { color: #4f4a40; font-size: 13px; line-height: 1.5; }
.event-card .tile-date { margin-top: auto; padding-top: 6px; }
.tile-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.event-image-placeholder { display: grid; place-content: center; gap: 6px; text-align: center; }
.event-image-placeholder span { color: #b4994f; font: 800 10px/1 system-ui, sans-serif; letter-spacing: .3em; }

/* Event pop-up */
.event-dialog { width: min(760px, calc(100% - 28px)); max-height: min(92vh, 1000px); padding: 0; overflow-y: auto; border: 1px solid #d8ceb6; border-radius: 16px; background: var(--panel); color: var(--ink); box-shadow: 0 30px 90px #120f0866; }
.event-dialog::backdrop { background: #16140f8c; backdrop-filter: blur(6px) brightness(.85); -webkit-backdrop-filter: blur(6px) brightness(.85); }
.event-dialog[open] { animation: dialog-in .18s ease-out; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.event-dialog-close { position: sticky; top: 14px; z-index: 2; float: right; margin: 14px 14px -50px 0; box-shadow: 0 4px 14px #0000001f; }
.event-dialog-image { display: block; width: 100%; height: 240px; object-fit: cover; background: linear-gradient(135deg, var(--onyx-3), #4c412a); color: #d9b65d; font-family: var(--serif); font-size: 26px; }
.event-dialog-image.event-image-placeholder { display: grid; }
.event-dialog-content { padding: 26px 30px 30px; }
.event-dialog-content h2 { margin: 0 0 8px; font-family: var(--serif); font-size: clamp(26px, 4vw, 34px); line-height: 1.15; }
.event-dialog-lede { margin: 0 0 4px; color: #4f4a40; font-size: 16px; line-height: 1.55; }
.event-facts-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 22px; margin: 22px 0; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.event-facts-list div { min-width: 0; }
.event-facts-list dt { margin-bottom: 4px; color: #8f6a1d; font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.event-facts-list dd { margin: 0; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.event-facts-list dd a { font-size: 12px; font-weight: 700; white-space: nowrap; }
.event-facts-list .price { font-family: var(--serif); font-size: 20px; font-weight: 700; }
.event-dialog-description { margin-bottom: 24px; color: #4f4a40; line-height: 1.7; white-space: pre-wrap; }
.event-dialog-actions { display: flex; flex-direction: column; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.event-dialog-actions .button-large { width: 100%; }
.registration-note { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; padding: 13px 15px; border: 1px solid #d9c785; border-radius: 9px; background: #fbf3d9; color: #554112; font-size: 14px; line-height: 1.5; }
.registration-note.is-bad { border-color: #e2bcb9; background: #fff1ef; color: var(--red); }
.join-with-code { margin: 14px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
.registration-form { margin-top: 18px; }
.access-reminder { padding: 12px 14px; border-left: 3px solid var(--gold); background: #faf5e7; font-size: 14px; line-height: 1.5; }
.payment-section { display: grid; gap: 12px; padding: 16px; }
.payment-section p { margin: 0; font-size: 14px; }
.upi-qr { display: block; width: min(240px, 100%); height: auto; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.registration-done { padding: 54px 30px; text-align: center; }
.registration-done p { max-width: 460px; margin: 0 auto 22px; color: #4f4a40; line-height: 1.6; }

/* Organiser */
.no-access { max-width: 640px; margin: 40px auto; }
.no-access h2 { font-family: var(--serif); font-size: 28px; }
.organiser-mode .main-tabs { display: none; }
.event-form .event-form-fields { display: flex; flex-direction: column; gap: 12px; }
.schedule-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px; }
.schedule-fields label { margin: 0; }
.upi-preview { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.upi-preview img { width: 90px; height: 90px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.challenge-formats { display: grid; gap: 10px; padding: 14px; }
.challenge-formats label { margin: 0; }
.panel-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.count-pill { padding: 4px 10px; border-radius: 999px; background: var(--gold-light); color: #5c4514; font-size: 12px; font-weight: 800; }
.team-status { display: inline-block; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.team-status.is-pending { background: #fbf0d0; color: #7a5a12; }
.team-status.is-good { background: #e3f1e7; color: #276343; }
.team-status.is-bad { background: #f8e4e1; color: #9b3229; }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.compact-toggle { padding: 4px 9px 4px 4px; border-color: var(--line); background: #f6f2e8; color: var(--ink); }
.compact-toggle .toggle-switch { background: #b9b2a3; }
.team-management .data-table, .leaderboard-management .data-table { min-width: 760px; }
.leaderboard-management { margin-top: 20px; }
.leaderboard-management .table-scroll { overflow-x: auto; }
.lb-input { width: 88px; padding: 8px 9px; }
.leaderboard-table tr[data-dirty] { background: #fbf3d9; }
.add-team { padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: #fbf8f0; }
.add-team summary { cursor: pointer; font-weight: 750; }
.add-team form { margin-top: 14px; }
.team-tools { align-items: center; justify-content: space-between; }
.team-tools .checkbox-row { margin: 0; }
.admin-live h4 { margin: 18px 0 8px; font-family: var(--serif); font-size: 18px; }
.table-scroll { overflow-x: auto; }

@media (max-width: 560px) {
  .header-right { gap: 10px; }
  .connection-status { display: none; }
  .event-dialog { width: 100%; max-width: 100%; max-height: 100%; height: 100%; margin: 0; border-radius: 0; }
  .event-dialog-content { padding: 22px 18px 28px; }
  .event-dialog-image { height: 190px; }
  .event-facts-list { grid-template-columns: 1fr; }
  .schedule-fields { grid-template-columns: 1fr; }
}
.event-facts .status-chip { display: inline-flex; min-width: 0; gap: 6px; }
.event-facts .status-dot { display: block; min-width: 0; }
#eventsView.event-detail-open > .section-heading { display: none; }
.create-event-dialog { width: min(640px, calc(100% - 28px)); }
.schedule-fields { min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.schedule-fields input, .two-fields input, .two-fields select { min-width: 0; }
@media (max-width: 560px) { .schedule-fields { grid-template-columns: 1fr; } }
.event-form-message:empty { display: none; }
.event-form-message { padding: 11px 13px; border: 1px solid #e2bcb9; border-radius: 8px; background: #fff1ef; font-weight: 600; }
.schedule-hint { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

/* ---------- Oct 6: cover images, updates, team page, comms ---------- */
/* The cover sits only in the top band of the tile, like the placeholder. */
.event-card .event-image { position: relative; flex: 0 0 155px; height: 155px; overflow: hidden; }
.event-card .event-image img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.event-card .event-image:has(img)::after { display: none; }
@media (max-width: 560px) { .event-card .event-image { flex-basis: 145px; height: 145px; } }

.cover-preview { display: grid; gap: 10px; margin-top: 10px; }
.cover-frames { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr); gap: 14px; align-items: end; }
.cover-frames figure { margin: 0; }
.cover-frames figcaption { margin-bottom: 6px; color: #8f6a1d; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.cover-frame { position: relative; overflow: hidden; border-radius: 8px; background: var(--onyx-3); cursor: grab; touch-action: none; user-select: none; box-shadow: inset 0 0 0 1px #00000014; }
.cover-frame:active { cursor: grabbing; }
.cover-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.cover-frame-tile { aspect-ratio: 360 / 155; border-radius: 7px; }
.cover-frame-banner { aspect-ratio: 760 / 240; }

.updates-list { display: grid; gap: 14px; }
.update-card { padding: 18px 20px; border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 10px; background: var(--panel); }
.update-card h3 { margin: 6px 0 6px; font-family: var(--serif); font-size: 20px; }
.update-body { color: #4f4a40; line-height: 1.65; white-space: pre-wrap; }
.update-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; }
.update-kind { color: #8f6a1d; font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.update-rules { border-left-color: #a43931; }
.update-rules .update-kind { color: #9b3229; }
.update-instructions { border-left-color: #3b7757; }
.update-instructions .update-kind { color: #276343; }
.update-news { border-left-color: #4b6aa8; }
.update-news .update-kind { color: #3a5590; }

.team-name { margin: 0 0 14px; font-family: var(--serif); font-size: 28px; }
.player-list { display: grid; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.player-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: #fffdf7; }
.player-name { font-weight: 650; }
.captain-badge { padding: 3px 9px; border-radius: 999px; background: var(--gold-light); color: #5c4514; font-size: 11px; font-weight: 800; white-space: nowrap; }
.team-rank { padding-top: 16px; border-top: 1px solid var(--line); }
.team-rank p { margin: 4px 0 0; font-size: 15px; }
.team-rank strong { font-family: var(--serif); font-size: 24px; }

.hunt-progress { margin-bottom: 22px; }
.hunt-progress-label { display: flex; justify-content: space-between; margin-bottom: 8px; color: #5f5b53; font-size: 13px; font-weight: 700; }
.hunt-progress .team-progress-track { height: 10px; }

.team-comms { margin-top: 20px; }
.comms-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: start; }
.comms-grid textarea { font-family: inherit; line-height: 1.5; }
.comms-grid code { padding: 1px 4px; border-radius: 4px; background: #f3efe5; font-size: 11px; }
.updates-admin-list { display: grid; gap: 10px; margin-top: 6px; }
.updates-admin-list .update-card { padding: 12px 14px; }
.updates-admin-list .update-card h3 { font-size: 17px; }
.lb-input:disabled { background: #f3efe5; color: var(--muted); }
@media (max-width: 800px) { .comms-grid { grid-template-columns: 1fr; } .cover-frames { grid-template-columns: 1fr; } }

/* Oct 6: organiser sections stacked and collapsible */
.organizer-stack { display: grid; gap: 20px; }
.collapsible { position: relative; overflow: hidden; }
.collapsible::before { position: absolute; top: 0; left: 28px; width: 42px; height: 3px; background: #c59a39; content: ""; }
.collapsible > summary, .sub-collapsible > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  cursor: pointer; list-style: none; user-select: none;
}
.collapsible > summary::-webkit-details-marker, .sub-collapsible > summary::-webkit-details-marker { display: none; }
.collapsible > summary::after, .sub-collapsible > summary::after {
  flex: none; width: 9px; height: 9px; margin-right: 4px;
  border-right: 2px solid #8a6a22; border-bottom: 2px solid #8a6a22;
  transform: rotate(45deg); transition: transform .15s ease; content: "";
}
.collapsible:not([open]) > summary::after, .sub-collapsible:not([open]) > summary::after { transform: rotate(-45deg); }
.collapsible > summary h3 { margin: 0; font-size: 24px; }
.collapsible > summary:focus-visible, .sub-collapsible > summary:focus-visible { outline: 2px solid #c59a39; outline-offset: 4px; border-radius: 4px; }
.collapsible[open] > summary { margin-bottom: 16px; }
.collapsible > .form-stack { gap: 14px; }
.comms-stack { display: grid; gap: 14px; }
.comms-stack textarea { font-family: inherit; line-height: 1.5; }
.comms-stack code { padding: 1px 4px; border-radius: 4px; background: #f3efe5; font-size: 11px; }
.sub-collapsible { padding: 12px 16px; border: 1px solid var(--line); border-radius: 9px; background: #fbf8f0; }
.sub-collapsible > summary h4 { margin: 0; color: #755819; font-size: 17px; }
.sub-collapsible[open] > summary { margin-bottom: 12px; }

/* Oct 6 (b): tile image sits inside a bezel instead of bleeding to the edges */
.event-card .event-image { margin: 10px 10px 0; border-radius: 7px; }

/* Collapsible panels whose summary holds a panel heading */
.collapsible > summary > .panel-heading { flex: 1; min-width: 0; }
.collapsible > summary .panel-heading h3 { margin: 0; }
.collapsible > .form-stack { display: grid; }
.admin-live-panel .admin-live { margin-top: 0; }

/* Organiser read-only Live view */
#organiserTabs { margin-top: 18px; }
.live-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.live-stats span { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: #fbf8f0; }
.live-stats small { color: #8a7a55; font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.live-stats strong { font-family: var(--serif); font-size: 22px; }
#liveBoardContent .leaderboard-list { display: grid; gap: 10px; }
#liveBoardContent .leaderboard-team-foot { font-size: 11px; }
#liveBoardContent h4 { margin: 20px 0 8px; font-family: var(--serif); font-size: 18px; }
.live-feed { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.live-feed li { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.live-feed li span { color: var(--muted); font-size: 11px; min-width: 110px; }
@media (max-width: 560px) { .live-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Oct 6 (c): player tabs without repeated headings; My Team as three tiles */
.team-tiles { display: grid; gap: 14px; }
.team-tile { padding: 20px 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: 0 6px 18px #33270c0d; }
.team-tile-name { text-align: center; }
.team-tile-name .team-name { margin: 0; }
.team-tile .player-list { margin: 0; }
.team-tile-rank { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.team-tile-label { display: block; color: #8a6a22; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.team-tile-rank p { margin: 4px 0 0; }
.rank-badge { flex: none; min-width: 74px; padding: 12px 16px; border: 1px solid #e3cf9a; border-radius: 10px; background: #f6ecd2; color: #3a2d0f; font-family: var(--serif); font-size: 26px; font-weight: 700; text-align: center; }
.hunt-topline { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.hunt-topline:has(> .hidden) { display: none; }
.event-detail:has(.event-countdown.hidden) { grid-template-columns: 1fr; }
.event-countdown.countdown-done .countdown-kicker, .event-countdown.countdown-done #eventCountdown { display: none; }

/* Oct 6 (d): Event details / Event scheduler tiles, scheduler switches, lifecycle */
.form-tile { display: grid; gap: 14px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 10px; background: #fbf8f0; }
.form-tile + .form-tile { margin-top: 16px; }
.form-tile > h4 { margin: 0; color: #755819; font-family: var(--serif); font-size: 18px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: #fffdf7; cursor: pointer; }
.switch-row > span:first-child { display: grid; gap: 3px; }
.switch-row strong { color: var(--ink); font-size: 14px; }
.switch-row small { color: var(--muted); font-size: 12px; font-weight: 450; }
.switch-row input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); }
.switch-row .toggle-switch { background: #b9b2a3; }
.switch-row input:checked + .toggle-switch { background: #5b9b66; }
.switch-row input:checked + .toggle-switch::after { transform: translateX(15px); }
.switch-row input:focus-visible + .toggle-switch { outline: 3px solid #dfbd61; outline-offset: 3px; }
.switch-row:has(input:disabled) { cursor: not-allowed; opacity: .6; }
.scheduler-auto { border-color: #e3cf9a; background: #f6ecd2; }
.scheduler-controls { display: grid; gap: 10px; }
.token-rules { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 9px; background: #fbf8f0; }
.token-rules .button { justify-self: start; }
.lifecycle-tile { display: grid; gap: 12px; border-color: #e2c3b8; }
.lifecycle-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.lifecycle-row p { margin: 0; max-width: 60ch; }
.button-danger { border: 1px solid #a8452f; background: #a8452f; color: #fff; }
.button-danger:hover:not(:disabled) { background: #8f3824; }
.button-danger:disabled { opacity: .45; cursor: not-allowed; }
.confirm-dialog { max-width: 440px; }
.confirm-dialog #confirmWord { text-transform: lowercase; }

/* Oct 6 (e): lifecycle sections and controls */
.organiser-sections { display: grid; gap: 30px; }
.event-section { display: grid; gap: 8px; }
.event-section > p { margin: 0 0 6px; }
.event-section-heading { display: flex; align-items: center; gap: 10px; }
.event-section-heading h3 { margin: 0; font-family: var(--serif); font-size: 22px; }
.event-card.is-archived { filter: grayscale(.9); opacity: .72; }
.event-card.is-archived:hover { opacity: .9; }
.deleted-section { padding-top: 18px; border-top: 1px dashed var(--line); }
.deleted-row { padding: 12px 16px; border: 1px solid var(--line); border-radius: 9px; background: #fbf8f0; }
.deleted-row summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; cursor: pointer; }
.deleted-body { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; }
.deleted-body p { flex: 1 1 220px; margin: 0; }
.lifecycle-actions { display: grid; gap: 10px; }
.lifecycle-action { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: #fffdf7; }
.lifecycle-action > div { display: grid; gap: 3px; flex: 1 1 260px; }
.lifecycle-action strong { font-size: 14px; }
.lifecycle-action small { color: var(--muted); font-size: 12px; }
#organizerView.read-only .collapsible:not(.lifecycle-tile) { opacity: .85; }
#infoBody p { margin: 0 0 8px; }

/* Oct 6 (f): organiser home: hero, welcome bar, Crafter Control Panel */
.crafter-hero { position: relative; display: flex; align-items: center; gap: clamp(18px, 4vw, 36px); overflow: hidden; margin-bottom: 14px; padding: clamp(22px, 4vw, 36px) clamp(20px, 5vw, 44px); border: 1px solid #55451f; border-radius: 14px; background: radial-gradient(circle at 85% 20%, #bd985433, transparent 40%), linear-gradient(140deg, var(--onyx-soft), var(--onyx-3) 70%, #3d3320); color: #f7f1e3; }
.crafter-hero img { flex: none; width: clamp(84px, 13vw, 132px); height: auto; filter: drop-shadow(0 8px 22px #00000066); }
.crafter-hero h1 { margin: 0 0 10px; color: #e5bf5d; font-family: var(--serif); font-size: clamp(30px, 5.5vw, 54px); letter-spacing: .14em; line-height: 1.05; }
.crafter-hero p { max-width: 640px; margin: 0; color: #d9d2c1; font-size: clamp(14px, 1.6vw, 16px); line-height: 1.6; }
.crafter-welcome { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; margin-bottom: 18px; padding: 10px 12px 10px 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.crafter-welcome > p { margin: 0; font-size: 15px; }
.crafter-welcome strong { font-family: var(--serif); font-size: 18px; }
.crafter-welcome .account-tools { margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
.control-panel { display: grid; gap: 14px; padding: clamp(16px, 3vw, 26px); border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: 0 10px 28px #33270c0f; }
.control-panel-title { margin: 0 0 4px; font-family: var(--serif); font-size: clamp(24px, 3.4vw, 32px); }
.panel-section { padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: #fbf8f0; }
.panel-section > summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.panel-section > summary::-webkit-details-marker { display: none; }
.panel-section > summary::after { width: 9px; height: 9px; margin-left: auto; border-right: 2px solid #8a6a22; border-bottom: 2px solid #8a6a22; transform: rotate(45deg); transition: transform .15s; content: ""; }
.panel-section:not([open]) > summary::after { transform: rotate(-45deg); }
.panel-section-title { font-family: var(--serif); font-size: 20px; font-weight: 700; }
.panel-section > p { margin: 8px 0 12px; }
.panel-section .event-grid { margin-top: 4px; }
.panel-empty { margin: 0; padding: 14px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); font-size: 13px; text-align: center; }
.panel-section .deleted-row + .deleted-row { margin-top: 8px; }
.panel-section.deleted-section { padding-top: 14px; border-top: 1px solid var(--line); }
@media (max-width: 560px) { .crafter-hero { flex-direction: column; text-align: center; } .crafter-hero p { margin: 0 auto; } }

/* ================================================================
   Brand layer (Oct 6): match www.urbansphinx.com: Cormorant Garamond
   headings, Inter body, onyx / gold / parchment, near-square corners.
   ================================================================ */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; letter-spacing: 0; color: var(--charcoal); }
h1 { font-weight: 500; }
.eyebrow { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 1.1rem; letter-spacing: 0; color: var(--muted-gold); text-transform: lowercase; }
.eyebrow::first-letter { text-transform: uppercase; }
a { color: var(--muted-gold); }

/* Buttons: the website's flat gold and outline buttons */
.button { border-radius: 2px; font-family: var(--sans); font-weight: 500; letter-spacing: .01em; }
.button-primary { background: var(--gold-brand); border-color: var(--gold-brand); color: var(--onyx); box-shadow: none; }
.button-primary:hover:not(:disabled) { background: var(--gold-bright); border-color: var(--gold-bright); }
.button-quiet { background: transparent; border: 1px solid var(--charcoal); color: var(--charcoal); }
.button-quiet:hover:not(:disabled) { background: rgba(42, 39, 35, .06); }

/* Corners: every tile rounded (12px), form fields 8px */
.panel, .event-card, .create-hunt-card, .collapsible, .sub-collapsible, .form-tile, .switch-row, .lifecycle-action,
.token-rules, .team-tile, .rank-badge, .update-card, .leaderboard-team, .event-detail, .event-countdown, .crafter-hero,
.crafter-welcome, .control-panel, .panel-section, .deleted-row, .live-stats span, .join-hero, .player-list li, .tabs,
.tab, .cover-frame, .panel-empty, .registration-note, .winner-banner, dialog, .qv-tile, .quickview, .section-banner, .category-tile, .craft-home, .alert-board, .stop-tile, .network-strip, .integrity-box, .chip-box { border-radius: 12px !important; }
input, textarea, select, .phone-entry { border-radius: 8px !important; }
.event-card .event-image, .event-card .event-image img { border-radius: 8px; }

/* ---------- Header: the website's sticky ribbon ---------- */
.site-header { display: block; position: sticky; top: 0; z-index: 50; height: auto; padding: 0; background: rgba(11, 11, 10, .92); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-bottom: 1px solid var(--line-on-dark); }
.header-wrap { display: flex; align-items: center; gap: 28px; width: 100%; max-width: 1180px; height: 76px; margin: 0 auto; padding: 0 24px; }
.site-header .brand { gap: 12px; margin-right: auto; color: var(--parchment); }
.site-header .brand img { width: 46px; height: 46px; border-radius: 50%; }
.brand-name { font-family: var(--serif); font-size: 1.3rem; letter-spacing: .03em; color: var(--parchment); }
.brand-tag { margin-left: 4px; padding: 2px 8px; border: 1px solid var(--line-on-dark); color: var(--gold-bright); font-size: 11px; letter-spacing: .08em; }
.main-nav { display: flex; align-items: center; gap: 34px; }
.main-nav a { position: relative; padding: 4px 0; color: var(--parchment); font-size: .95rem; text-decoration: none; }
.main-nav a:hover, .main-nav a.active { color: var(--gold-bright); }
.main-nav a.active::after { position: absolute; right: 0; bottom: -4px; left: 0; height: 1px; background: var(--gold-brand); content: ""; }
.header-right { gap: 14px; }
.connection-status { display: none; font-size: 12px; }
.connection-status.reconnecting { display: block; color: #f0a39a; }
.button-header { min-height: 34px; padding: 6px 16px; border: 1px solid var(--gold-brand); border-radius: 2px; background: transparent; color: var(--parchment); font-size: .9rem; }
.button-header:hover { background: rgba(201, 162, 39, .12); }
.nav-toggle { display: none; padding: 0 4px; border: 0; background: none; color: var(--parchment); font-size: 1.6rem; }
@media (max-width: 820px) {
  .header-wrap { gap: 14px; }
  .main-nav { position: fixed; top: 76px; right: 0; left: 0; flex-direction: column; align-items: stretch; gap: 0; max-height: 0; overflow: hidden; background: var(--onyx); border-bottom: 1px solid var(--line-on-dark); transition: max-height .3s ease; }
  .main-nav.open { max-height: 340px; }
  .main-nav a { padding: 16px 28px; border-bottom: 1px solid var(--line-on-dark); }
  .main-nav a.active::after { display: none; }
  .nav-toggle { display: block; }
}
@media (max-width: 420px) { .brand-name { font-size: 1.1rem; } .header-wrap { padding: 0 16px; } }

/* ---------- Player events page ---------- */
.join-hero { margin-bottom: 14px; padding: clamp(34px, 6vw, 60px) 24px; border: 1px solid var(--line-on-dark); background: var(--onyx); text-align: center; }
.join-hero h1 { margin: 0; color: var(--parchment); font-size: clamp(2.3rem, 5.5vw, 3.8rem); font-weight: 500; line-height: 1.1; }
#appPanel:has(#eventsView.event-detail-open) .join-hero { display: none; }
.player-account-bar { display: flex; justify-content: flex-end; margin-bottom: 18px; }
.player-account-bar:has(> .hidden) { display: none; }

/* ---------- Dark tiles use the website's onyx and gold ---------- */
.event-detail, .crafter-hero { background: var(--onyx); border-color: var(--line-on-dark); }
.crafter-hero h1 { color: var(--gold-bright); font-weight: 600; }
.event-detail h2 { color: var(--parchment); }
.event-image { background: linear-gradient(140deg, var(--onyx), var(--onyx-3) 75%, #3b3220); }

/* Event tiles: parchment plaques with a gold hover, like the website's tiles */
.event-card { background: var(--parchment); border: 1px solid var(--line); box-shadow: none; }
.event-card:hover { border-color: var(--gold-brand); }
.event-card h3 { color: var(--charcoal); font-weight: 600; }
.tile-category { color: var(--muted-gold); }
.panel { box-shadow: none; }
.control-panel, .panel-section, .form-tile, .token-rules { background: var(--panel); }
.panel-section-title, .control-panel-title { font-weight: 600; }
.count-pill { border-radius: 2px; }

/* Locked "Join with your team code": visible, with a hover note until registration opens */
.text-button.is-locked { color: var(--muted); cursor: not-allowed; text-decoration-style: dotted; }
.has-tooltip { position: relative; }
@media (hover: hover) {
.has-tooltip[data-tip]:hover::after, .has-tooltip[data-tip]:focus-visible::after {
  position: absolute; bottom: calc(100% + 8px); left: 50%; z-index: 5; width: max-content; max-width: 260px;
  padding: 8px 11px; border-radius: 3px; background: var(--onyx); color: var(--parchment);
  font-family: var(--sans); font-size: 12px; font-weight: 500; line-height: 1.45; text-align: center; text-decoration: none;
  white-space: normal; transform: translateX(-50%); box-shadow: 0 6px 18px #00000040; content: attr(data-tip);
}
}
.locked-code-note { margin: 6px auto 0; color: var(--muted); font-size: 13px; text-align: center; }
@media (hover: hover) { .locked-code-note { display: none; } }

/* 7 Oct: organiser tabs, paths, event lock, integrity and the Alert Board */
.organiser-tabs { flex-wrap: wrap; }
.tab-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 6px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 10px; }
.quick-view { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.qv-item { display: grid; gap: 3px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.qv-item small { color: var(--muted-gold); font-size: 10px; letter-spacing: .14em; font-weight: 700; }
.qv-item strong { display: flex; align-items: center; gap: 7px; font-size: 14px; }
.qv-item > span { color: var(--muted); font-size: 12px; }
.qv-alert { color: var(--red); }
@media (max-width: 700px) { .quick-view { grid-template-columns: 1fr; } }
.lock-banner { margin-bottom: 14px; padding: 11px 14px; border: 1px solid #d9c48a; border-radius: 9px; background: #f6ecd2; color: #5e4613; font-size: 13px; }
#organizerView.is-event-locked .lockable { opacity: .55; filter: grayscale(.4); cursor: not-allowed; }
.event-lock-tile { border-color: #d9c48a; }
.bulb { display: inline-block; width: 14px; height: 14px; flex: 0 0 auto; border-radius: 50%; box-shadow: inset 0 -2px 3px #0003; }
.bulb-grey { background: #a9a396; }
.bulb-red { background: #c2392f; box-shadow: 0 0 8px #c2392f99, inset 0 -2px 3px #0003; }
.bulb-orange { background: #df8a1f; box-shadow: 0 0 8px #df8a1f99, inset 0 -2px 3px #0003; }
.bulb-green { background: #3d9a57; box-shadow: 0 0 8px #3d9a5799, inset 0 -2px 3px #0003; }
.paths-tile .switch-row { margin: 0; }
.paths-switches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 700px) { .paths-switches { grid-template-columns: 1fr; } }
.template-picker { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 700px) { .template-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.template-option { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fffdf7; cursor: pointer; }
.template-option input { position: absolute; opacity: 0; pointer-events: none; }
.template-option.is-selected { border-color: var(--gold); background: #f6ecd2; box-shadow: inset 0 0 0 1px var(--gold); }
.template-option:has(input:disabled) { cursor: not-allowed; }
.template-option:has(input:disabled):not(.is-selected) { opacity: .5; }
.template-option:has(input:focus-visible) { outline: 3px solid #dfbd61; outline-offset: 2px; }
.template-label { font-family: var(--serif); font-size: 19px; font-weight: 600; color: var(--ink); }
.template-meta { color: var(--muted); font-size: 12px; }
.path-counts { display: flex; flex-wrap: wrap; gap: 8px; }
.path-counts:empty { display: none; }
.path-count { display: grid; padding: 8px 12px; border-radius: 8px; background: #efe6cf; font-size: 12px; }
.path-count strong { font-size: 13px; }
.path-badge { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: #efe6cf; color: #5e4613; font-weight: 700; font-size: 12px; }
.registration-status-row { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.registration-status-row > label { flex: 0 1 240px; }
.pause-field { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.is-dulled { opacity: .55; cursor: not-allowed; }
button.is-dulled { pointer-events: auto; }
.add-team.is-dulled summary { cursor: not-allowed; }
.alert-controls { display: grid; gap: 14px; margin-bottom: 16px; }
.integrity-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.integrity-row .bulb { width: 20px; height: 20px; }
.auto-live-row { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 12px; align-items: end; }
@media (max-width: 700px) { .auto-live-row { grid-template-columns: 1fr; } }
.alert-board { border-radius: 10px; background: var(--onyx); color: #ddd6c4; font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow: hidden; }
.alert-board-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 9px 12px; border-bottom: 1px solid #ffffff1a; color: var(--gold-bright); letter-spacing: .12em; font-size: 11px; }
.alert-legend { color: #a59e8c; letter-spacing: 0; }
.alert-legend i { display: inline-block; width: 8px; height: 8px; margin: 0 4px 0 10px; border-radius: 50%; }
.lg-new { background: #ef5a4f; } .lg-ack { background: #f0a43a; } .lg-fixed { background: #5bc27a; }
.alert-log { max-height: 340px; overflow-y: auto; padding: 6px 0; }
.alert-line { display: grid; grid-template-columns: 74px 66px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 4px 12px; }
.alert-line + .alert-line { border-top: 1px solid #ffffff0d; }
.alert-time { color: #8d8676; }
.alert-level { font-weight: 700; }
.state-new { color: #ef5a4f; }
.state-ack { color: #f0a43a; }
.state-fixed { color: #5bc27a; }
.alert-ack { padding: 1px 8px; border: 1px solid currentColor; border-radius: 5px; background: transparent; color: inherit; font: inherit; font-size: 11px; }
.alert-state { color: #8d8676; font-size: 11px; }
.alert-empty { margin: 0; padding: 10px 12px; color: #8d8676; }
@media (max-width: 560px) { .alert-line { grid-template-columns: 60px 1fr; } .alert-msg, .alert-ack, .alert-state { grid-column: 1 / -1; } }
.tile-alerts { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 0; font-size: 12px; font-weight: 600; }
.tile-alerts .is-error { color: var(--red); }
.tile-alerts .is-warning { color: #b46b12; }
.tile-alerts.is-clear { color: var(--green); }
.live-control { display: grid; gap: 12px; }
.hunt-answer.is-dulled { opacity: .5; }
.access-paused-note { margin: 6px 0 0; color: var(--red); font-size: 13px; }
@media (hover: hover) { .hunt-answer.is-dulled + .access-paused-note { display: none; } }
.challenge-video { position: relative; margin-top: 14px; padding-top: 56.25%; border-radius: 10px; overflow: hidden; background: #000; }
.challenge-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.trial-image-preview { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.trial-image-preview img { max-width: 180px; max-height: 120px; border-radius: 8px; border: 1px solid var(--line); }
.update-hint { border-left-color: #8a5bb0; }
.update-hint .update-kind { color: #6c3f92; }

/* 7 Oct: players per entry and offer price */
.team-size-field { border: 0; padding: 0; margin: 0; }
.team-size-field legend { padding: 0; margin-bottom: 6px; font-weight: 600; font-size: 13px; }
.team-size-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 560px) { .team-size-options { grid-template-columns: 1fr; } }
.price-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 12px; align-items: end; }
.price-row .offer-field { grid-column: 1 / 2; }
@media (max-width: 560px) { .price-row { grid-template-columns: 1fr; } }
.price-was { color: var(--muted); font-weight: 500; }
.price-offer { color: var(--red); }
.event-image, .event-image-placeholder { position: relative; }
.offer-ribbon { position: absolute; top: 12px; left: 0; z-index: 2; display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 12px 5px 10px; border-radius: 0 4px 4px 0; background: var(--red); color: #fff; font: 600 13px/1.2 var(--sans); box-shadow: 0 3px 10px #0004; letter-spacing: 0; text-transform: none; }
.offer-ribbon .offer-label { font-size: 10px; letter-spacing: .14em; color: #ffe2c2; }
.offer-ribbon s { opacity: .75; font-weight: 500; }
.offer-ribbon strong { font-size: 15px; }

/* 7 Oct (late): Craft Board header, home tiles, welcome pop-up, event tiles */
body.organiser-mode .header-wrap { position: relative; max-width: 1280px; }
body.organiser-mode .site-header .brand { margin-right: 0; }
body.organiser-mode .brand-name { letter-spacing: .12em; font-weight: 600; }
.header-title { position: absolute; left: 50%; transform: translateX(-50%); color: var(--gold-bright); font-family: var(--serif); font-size: 1.45rem; font-weight: 600; letter-spacing: .22em; white-space: nowrap; pointer-events: none; }
body.organiser-mode .header-right { margin-left: auto; }
body.organiser-mode #accountTools { flex-direction: column; align-items: flex-end; gap: 4px; padding: 0; border: 0; background: none; box-shadow: none; }
body.organiser-mode #accountTools #userLabel { color: var(--parchment); font-weight: 500; font-size: 12px; }
body.organiser-mode #accountTools .button { min-height: 26px; padding: 3px 12px; border: 1px solid var(--gold-brand); background: transparent; color: var(--parchment); font-size: 12px; }
body.organiser-mode #accountTools .button:hover { background: rgba(201, 162, 39, .12); }
@media (max-width: 700px) {
  .header-title { font-size: 1rem; letter-spacing: .14em; }
  body.organiser-mode .brand-name { display: none; }
  body.organiser-mode #accountTools #userLabel { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.category-tile { position: relative; display: grid; align-content: start; gap: 8px; min-height: 170px; padding: 22px 20px; border: 1px solid var(--line); border-radius: 3px; background: var(--panel); color: var(--ink); text-align: left; box-shadow: 0 8px 22px #33270c0d; transition: transform .15s, box-shadow .15s, border-color .15s; }
.category-tile:hover, .category-tile:focus-visible { transform: translateY(-2px); border-color: var(--gold); box-shadow: 0 12px 26px #33270c1f; }
.category-title { padding-right: 44px; font-family: var(--serif); font-size: 24px; font-weight: 600; line-height: 1.15; }
.category-note { color: var(--muted); font-size: 13px; line-height: 1.5; }
.category-badge { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; min-width: 32px; height: 32px; padding: 0 9px; border-radius: 16px; background: var(--onyx); color: var(--gold-bright); font-weight: 700; font-size: 14px; }
.category-deleted { background: #f3eee3; }
.category-tile .tile-alerts { margin-top: 4px; }
.craft-section { display: grid; gap: 12px; }
.craft-section .section-heading h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-family: var(--serif); }
.tile-alerts .is-pending, .tile-alerts.is-pending { color: var(--muted-gold); }
.tile-alerts .is-clear { color: var(--green); }
.welcome-dialog { width: min(440px, calc(100% - 32px)); padding: 44px 28px 40px; border: 1px solid var(--line-on-dark); background: var(--onyx); color: var(--parchment); text-align: center; }
.welcome-dialog::backdrop { background: rgba(11, 11, 10, .7); backdrop-filter: blur(2px); }
.welcome-dialog img { display: block; margin: 0 auto 18px; border-radius: 50%; }
.welcome-dialog h2 { margin: 0; color: var(--gold-bright); font-family: var(--serif); font-size: clamp(26px, 5vw, 34px); font-weight: 600; letter-spacing: .04em; }
.welcome-dialog .dialog-close { position: absolute; top: 10px; right: 10px; color: var(--parchment); background: transparent; border-color: var(--line-on-dark); }
.event-card h3, .event-card .tile-summary { text-align: center; }
.tile-meta { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-top: auto; padding-top: 8px; color: var(--muted); font-size: 13px; }
.tile-venue { display: inline-flex; align-items: flex-start; gap: 5px; min-width: 0; text-align: left; }
.tile-venue .pin-icon { flex: none; margin-top: 2px; color: var(--muted-gold); }
.tile-when { flex: none; text-align: right; white-space: nowrap; }
.event-number { margin-left: 10px; padding: 3px 9px; border: 1px solid var(--line-on-dark); border-radius: 3px; color: var(--gold-bright); font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .1em; vertical-align: middle; }
.craft-section > .back-link { justify-self: start; }

/* 7 Oct (night): Craft Board polish */
.welcome-dialog { border: 2px solid var(--gold-brand); box-shadow: 0 0 0 1px #00000080, 0 18px 50px #00000080; }
body.organiser-mode #accountTools { align-items: center; }
.craft-home { padding: clamp(18px, 3vw, 28px); border: 2px solid var(--gold-brand); border-radius: 3px; background: var(--onyx); box-shadow: 0 12px 30px #0000002e; }
.craft-home-title { margin: 0 0 18px; color: var(--gold-bright); font-family: var(--serif); font-size: clamp(24px, 3.2vw, 32px); font-weight: 600; letter-spacing: .08em; }
.craft-home .category-tile { box-shadow: none; }
.category-tile { place-content: center; justify-items: center; text-align: center; min-height: 150px; }
.category-title { padding: 0 34px; text-align: center; }
.category-note { position: absolute; inset: auto 12px 12px; opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s; pointer-events: none; font-size: 12px; text-align: center; }
@media (hover: hover) { .category-tile:hover .category-note, .category-tile:focus-visible .category-note { opacity: 1; transform: none; } .category-tile:hover .category-title, .category-tile:focus-visible .category-title { transform: translateY(-18px); } }
@media (hover: none) { .category-note { display: none; } }
.category-title { transition: transform .15s; }
.section-banner { display: grid; justify-items: center; gap: 6px; padding: 16px 20px; border: 1px solid var(--gold-brand); border-radius: 3px; background: var(--onyx); color: var(--parchment); text-align: center; }
.section-banner h2 { margin: 0; color: var(--gold-bright); font-family: var(--serif); font-size: clamp(20px, 2.6vw, 26px); font-weight: 600; letter-spacing: .14em; }
.section-banner p { margin: 0; max-width: 60ch; color: #d9d2c1; font-size: 13px; }
.section-counts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin: 8px 0 0; }
.section-counts div { display: flex; align-items: baseline; gap: 6px; }
.section-counts dt { color: #bdb49f; font-size: 12px; }
.section-counts dt::after { content: ":"; }
.section-counts dd { margin: 0; color: var(--gold-bright); font-weight: 700; font-size: 15px; }
.tile-alerts.is-passed { color: var(--green); }
.tile-alerts.is-failed { color: var(--red); }
@media (pointer: coarse) { .category-note { display: none; } .category-tile:hover .category-title { transform: none; } }

/* 8 Oct: event tile refresh and category banner */
body.organiser-mode main { padding-top: 16px; }
.section-banner { position: relative; }
.section-banner > .back-link { position: absolute; top: 50%; left: 20px; margin: 0; transform: translateY(-50%); color: var(--gold-bright); }
.section-banner > .back-link:hover { color: var(--parchment); }
@media (max-width: 700px) {
  .section-banner > .back-link { position: static; justify-self: start; transform: none; }
}
.craft-section .event-card { border: 1.5px solid var(--onyx); border-radius: 12px; overflow: hidden; }
.craft-section .event-card .event-image, .craft-section .event-card .event-image img { border-radius: 8px; }
.event-card h3 { margin-bottom: 0; }
.event-card .tile-summary { margin: 0; }
.tile-meta { flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 4px; }
.tile-when { display: inline-flex; align-items: flex-start; gap: 5px; text-align: left; white-space: normal; }
.tile-when .pin-icon { flex: none; margin-top: 2px; color: var(--muted-gold); }
.tile-chips { justify-content: space-between; gap: 8px; }
.chip-box { display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: #fffdf7; }
.integrity-box { display: block; margin-top: 10px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fffdf7; font-size: 12px; }
.integrity-box.is-pending { border-color: #e2cf9f; }
.integrity-box.is-passed { border-color: #b9d8c2; }
.integrity-box.is-failed { border-color: #e6b8b2; }

/* 8 Oct: Event Network Check */
.tab-count { background: var(--onyx); color: #fff; }
.tab.active .tab-count { background: var(--onyx); color: #fff; }
.network-tile { display: grid; gap: 14px; }
.network-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: #fffdf7; }
.network-strip .bulb { width: 20px; height: 20px; }
.check-run + .check-run { border-top: 1px solid #ffffff26; margin-top: 4px; padding-top: 4px; }
.check-run-head { padding: 6px 12px 4px; color: var(--gold-bright); font-size: 11px; letter-spacing: .06em; }
.check-run:not(:first-child) { opacity: .7; }
.alert-line { grid-template-columns: 112px 66px minmax(0, 1fr) auto; }
.alert-line.level-error { color: #ef5a4f; }
.alert-line.level-warning { color: #f0a43a; }
.lg-new { background: #ef5a4f; } .lg-ack { background: #f0a43a; }
@media (max-width: 560px) { .alert-line { grid-template-columns: 1fr auto; } .alert-time { grid-column: 1 / -1; } }
.refusal-dialog { position: fixed; padding: 28px 26px 24px; border: 2px solid var(--red); }
.refusal-dialog::backdrop { background: rgba(11, 11, 10, .55); }
.refusal-dialog h3 { margin: 0 34px 10px 0; color: var(--red); font-family: var(--serif); font-size: 22px; }
.refusal-dialog p { margin: 0; line-height: 1.55; }
.refusal-dialog .dialog-close { position: absolute; top: 10px; right: 10px; }
.live-control .auto-live-row { margin-top: 2px; }
.alert-line { grid-template-columns: 112px 66px minmax(0, 1fr); }
@media (max-width: 560px) { .alert-line { grid-template-columns: 66px 1fr; } }

/* 8 Oct (midday): Quickview, four-colour status, live controls, winner */
.status-chip.is-warn { background: #fbecd6; color: #94570e; }
.status-chip.is-idle { background: #ebe8e1; color: #5f5a50; }
.quickview { display: grid; gap: 12px; }
.qv-tile { padding: 14px clamp(14px, 2.4vw, 22px); border: 2px solid var(--gold-brand); border-radius: 3px; background: var(--onyx); color: var(--parchment); }
.qv-tile h4 { margin: 0 0 6px; color: var(--gold-bright); font-family: var(--sans); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.qv-row { display: grid; grid-template-columns: 18px 190px minmax(0, 1fr) 190px; align-items: center; gap: 10px; min-height: 38px; padding: 7px 0; border-top: 1px solid #ffffff17; font-size: 14px; }
.qv-tile h4 + .qv-row { border-top: 0; }
.qv-key { color: #a59e8c; font-size: 13px; }
.qv-val { color: var(--parchment); }
.qv-meter { display: grid; grid-template-columns: 1fr 42px; align-items: center; gap: 8px; }
.qv-bar { height: 6px; border-radius: 3px; background: #ffffff1f; overflow: hidden; }
.qv-bar span { display: block; height: 100%; background: var(--gold-brand); }
.qv-percent { color: var(--gold-bright); font-weight: 700; font-size: 13px; text-align: right; }
.qv-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; }
.qv-steps { display: flex; align-items: center; gap: 0; margin: 0; padding: 0; list-style: none; flex: 1 1 420px; }
.qv-step { display: flex; align-items: center; gap: 7px; color: #a59e8c; font-size: 13px; white-space: nowrap; }
.qv-step.is-current { color: var(--parchment); font-weight: 700; }
.qv-step.is-current .bulb { width: 16px; height: 16px; }
.qv-step-line { flex: 1 1 24px; min-width: 14px; height: 1px; margin: 0 10px; background: var(--line-on-dark); }
.qv-states { display: flex; gap: 22px; }
.qv-state { display: flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 600; }
.qv-state small { display: block; color: #a59e8c; font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.qv-top .qv-state .bulb { width: 16px; height: 16px; }
.quickview .bulb { width: 12px; height: 12px; }
@media (max-width: 700px) {
  .qv-row { grid-template-columns: 18px minmax(0, 1fr); gap: 2px 10px; }
  .qv-key { grid-column: 2; }
  .qv-val { grid-column: 2; }
  .qv-side { grid-column: 2; }
  .qv-side:empty { display: none; }
  .qv-step span { font-size: 12px; }
  .qv-step-line { margin: 0 5px; }
}
.stop-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 700px) { .stop-controls { grid-template-columns: 1fr; } }
.stop-tile { padding: 14px; }
.end-tile { border-color: #e2c3b8; }
.reset-action { margin-top: 4px; border-color: #e2c3b8; }
.winner-badge { color: #8a6a1d; font-weight: 700; white-space: nowrap; }
.goodie-field.is-dulled input { cursor: not-allowed; }
.goodie-note { display: block; margin-top: 4px; font-size: 11px; font-weight: 450; }
.qv-row > * { min-width: 0; }
.qv-val { overflow-wrap: anywhere; }
.qv-tile { min-width: 0; overflow: hidden; }
@media (max-width: 700px) { .qv-steps { flex-basis: 100%; } .qv-states { flex-wrap: wrap; } }
@media (max-width: 700px) {
  .qv-step { flex-direction: column; gap: 4px; }
  .qv-step span { font-size: 11px; }
  .qv-step-line { min-width: 6px; margin: 0 2px 16px; }
}

/* 8 Oct (evening): event banner redesign */
.banner-v2 .event-detail-copy { display: grid; align-content: center; gap: 8px; }
.banner-v2 .event-detail-copy h2 { margin: 0; }
.banner-v2 .banner-summary { margin: 0 !important; color: #d5d0c4; font-size: 15px; }
.banner-v2 .banner-fact { display: flex; align-items: center; gap: 8px; margin: 0; color: #f4f0e5; font-size: 14px; font-weight: 600; }
.banner-v2 .banner-fact .pin-icon { flex: none; width: 16px; height: 16px; margin: 0; color: var(--gold-bright); }
.banner-v2 .event-countdown { display: grid; justify-items: center; align-content: center; gap: 12px; text-align: center; }
.banner-registration .status-chip { font-size: 12px; padding: 5px 11px; }
.banner-v2 .event-countdown > strong#eventCountdown { margin: 0; }
.banner-live { display: inline-flex; align-items: center; gap: 12px; color: #fff3cb; font: 700 clamp(24px, 3vw, 34px)/1 var(--sans); letter-spacing: .02em; }
.banner-live .bulb { width: clamp(18px, 2.2vw, 24px); height: clamp(18px, 2.2vw, 24px); }
.event-detail.banner-v2:has(.event-countdown.hidden) { grid-template-columns: inherit; }
@media (max-width: 700px) { .banner-v2 .event-countdown { width: 100%; } }
.banner-v2 .event-detail-copy > p { margin: 0 !important; }
.event-number { white-space: nowrap; }
.event-countdown > .banner-live { margin: 0; font: 700 clamp(24px, 3vw, 34px)/1 var(--sans); letter-spacing: .02em; color: #fff3cb; }

/* 8 Oct (evening): player ribbon menu, banner, event tiles */
body:not(.organiser-mode) .player-account-bar { display: none !important; }
body:not(.organiser-mode) main { padding-top: 16px; }
.join-hero { padding: clamp(18px, 3vw, 28px) 24px; }
.join-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: .1em; }
.join-hero p { max-width: 640px; margin: 10px auto 0; color: #d5d0c4; font-size: clamp(13px, 1.5vw, 15px); line-height: 1.6; }
.player-menu { position: relative; }
.person-button { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--gold-brand); border-radius: 50%; background: transparent; color: var(--parchment); }
.person-button:hover, .person-button[aria-expanded="true"] { background: rgba(201, 162, 39, .14); color: var(--gold-bright); }
.player-menu-list { position: absolute; top: calc(100% + 10px); right: 0; z-index: 60; display: grid; min-width: 220px; padding: 8px; border: 1px solid var(--line-on-dark); border-radius: 12px; background: var(--onyx); box-shadow: 0 12px 30px #0006; }
.menu-identity { margin: 4px 8px 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line-on-dark); color: #cfc7b3; font-size: 12px; overflow-wrap: anywhere; }
.menu-item { padding: 9px 10px; border: 0; border-radius: 8px; background: none; color: var(--parchment); text-align: left; font-size: 14px; }
.menu-item:hover { background: #ffffff14; }
.menu-item.danger { color: #f0a39a; }
.event-card { border: 3px solid var(--onyx) !important; border-radius: 14px !important; overflow: hidden; }
.craft-section .event-card { border-width: 3px; }
.status-strip { justify-content: space-between; padding: 8px 10px; border-radius: 10px; background: var(--onyx); }
.integrity-box { border: 1px solid var(--onyx) !important; background: var(--onyx) !important; }
.integrity-box.is-pending { color: #c9c2b0; }
.integrity-box.is-passed { color: #7fd398; }
.integrity-box.is-failed { color: #f08a80; }

/* 8 Oct (night): player tabs inside large black tiles */
.dark-tile { padding: clamp(16px, 3vw, 26px); border: 3px solid var(--onyx); border-radius: 14px !important; background: var(--onyx); color: #f4f0e5; }
.dark-tile.empty-state, .dark-tile .empty-state, .dark-tile > p, .dark-tile .muted { color: #cfc7b3; }
.dark-tile .not-started-message { color: var(--gold-bright); }
.dark-tile-title { margin: 0 0 16px; color: #fff3cb; font-family: var(--serif); font-size: clamp(26px, 3vw, 32px); text-align: center; }
.nested-tile { min-width: 0; padding: 16px 18px; border-radius: 12px !important; background: #fff; color: var(--ink); }
.nested-tile .muted { color: var(--muted); }

/* Event Updates: white update cards inside the black tile */
.dark-tile .updates-list .update-card { border: 0; border-left: 4px solid var(--gold); background: #fff; color: var(--ink); }
.dark-tile .updates-list.empty-state, .dark-tile .updates-list > p { margin: 0; color: #cfc7b3; }

/* My Team: name + position on top, teammates below */
.team-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; }
.team-mates-tile { grid-column: 1 / -1; }
.team-grid .team-tile-label { margin-bottom: 6px; }
.team-name-tile { display: grid; align-content: center; }
.team-name-tile .team-name { margin: 0; overflow-wrap: anywhere; font-size: clamp(24px, 4vw, 30px); line-height: 1.15; }
.team-position-tile { display: grid; align-content: center; justify-items: center; min-width: 120px; text-align: center; }
.position-figure { display: flex; align-items: baseline; font-family: var(--serif); font-weight: 700; color: var(--onyx); }
.position-rank { font-size: clamp(42px, 7vw, 56px); line-height: 1; }
.position-total { margin-left: 2px; color: var(--muted); font-size: clamp(18px, 3vw, 22px); }
.teammate-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: mate; }
.teammate-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fffdf7; counter-increment: mate; }
.teammate-list .player-name { min-width: 0; overflow-wrap: anywhere; }
.teammate-list .player-name::before { content: counter(mate) ". "; color: var(--muted-gold); font-weight: 800; }
@media (max-width: 520px) { .team-position-tile { min-width: 96px; padding: 14px 12px; } }

/* Hunt: small status tile, then the challenge tile */
.hunt-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; padding: 10px 14px; border-radius: 12px; background: var(--onyx); color: #f4f0e5; }
.hunt-status.hidden { display: none; }
.hunt-status-label { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 15px; }
.hunt-status-label small { display: block; color: #a9a396; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.hunt-status .token-pill { border-color: var(--gold-brand); background: transparent; color: var(--gold-bright); }
.hunt-tile .hunt-card { max-width: none; }
.hunt-tile .hunt-progress-label { color: #d5d0c4; }
.hunt-tile .team-progress-track { background: #ffffff26; }
.hunt-tile .hunt-card .trial-counter { color: var(--gold-bright); }
.hunt-tile .hunt-card .trial-counter span { color: #a9a396; }
.hunt-tile .hunt-card h3 { color: #fff3cb; }
.hunt-tile .hunt-card .challenge { color: #fff; }
.hunt-tile .hunt-answer input { border-color: #fff; background: #fff; color: var(--ink); }
.hunt-tile .hunt-answer .button-primary { border-color: #fff; background: #fff; color: var(--onyx); }
.hunt-tile .hunt-answer .button-primary:hover { background: var(--parchment); }
.hunt-tile .hunt-answer.is-dulled { cursor: not-allowed; }
.hunt-tile .hunt-answer.is-dulled > * { pointer-events: none; }
.hunt-tile .has-tooltip[data-tip]:hover::after { background: var(--parchment); color: var(--onyx); }
.hunt-tile .locked-code-note { margin: 8px 0 0; color: #f0a39a; text-align: left; }
.hunt-tile .hint-box { border-left-color: var(--gold-bright); border-radius: 8px; background: #ffffff14; color: #f4f0e5; }
.hunt-tile .button-quiet { border-color: #ffffff59; background: transparent; color: #f4f0e5; }
.hunt-tile .form-message { color: #f0a39a; }
.hunt-tile .form-message.success { color: #7fd398; }
.hunt-tile .winner-banner { color: var(--onyx); }

/* Leaderboard: centred heading and white rows inside the black tile */
.leaderboard-tile .leaderboard-list { padding: 0; border: 0; background: none; }
.leaderboard-tile .leaderboard-team { border: 0; background: #fff; }
.leaderboard-tile .leaderboard-team.own-team { box-shadow: inset 0 0 0 2px var(--gold); background: #fffaf0; }
.leaderboard-tile .leaderboard-list > p { margin: 0; text-align: center; }
.leaderboard-tile .not-started-message { padding: 0 0 4px; }
.leaderboard-tile .leaderboard-team { color: var(--ink); }
.hunt-tile .hunt-answer input, .hunt-tile .hunt-answer .button, .hunt-tile .button-quiet { border-radius: 8px; }
.hunt-tile .hunt-answer.is-dulled { opacity: 1; }
.hunt-tile .hunt-answer.is-dulled > * { opacity: .5; }
.hunt-tile #buyHint { margin-top: 12px; }

/* Hunt top row: status tile (with its note) and a narrow tokens tile */
.hunt-top { display: flex; align-items: stretch; gap: 12px; margin-bottom: 12px; }
.hunt-top:not(:has(> :not(.hidden))) { display: none; }
.hunt-top .hunt-status { flex: 1; min-width: 0; margin: 0; justify-content: flex-start; gap: 14px 18px; flex-wrap: wrap; }
.hunt-status-label { flex: none; }
.hunt-status-note { flex: 1 1 260px; min-width: 0; margin: 0; color: #c9c2b0; font-size: 13px; line-height: 1.45; }
.hunt-tokens { display: grid; flex: none; place-content: center; justify-items: center; min-width: 84px; padding: 8px 14px; border-radius: 12px; background: var(--onyx); text-align: center; }
.hunt-tokens.hidden { display: none; }
.hunt-tokens small { color: #a9a396; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.hunt-tokens strong { color: var(--gold-bright); font-size: 22px; line-height: 1.1; }
.hunt-tile.hidden { display: none; }
@media (max-width: 520px) { .hunt-status-note { flex-basis: 100%; } .hunt-tokens { min-width: 72px; padding: 8px 10px; } }
.hunt-tile #buyHint:disabled { opacity: .45; cursor: not-allowed; }

/* Team changes: player actions in My Team, organiser lock and players dialog */
.teammate-list li { flex-wrap: wrap; }
.teammate-side { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 12px; }
.teammate-side .text-button { font-size: 12px; font-weight: 700; }
.teammate-side .locked-code-note { flex-basis: 100%; margin: 2px 0 0; font-size: 12px; text-align: right; }
.team-lock-note { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.lb-toolbar { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.team-lock-row { max-width: 460px; margin: 0; }
.team-players-dialog { width: min(520px, calc(100vw - 32px)); }
.team-players-list { display: grid; gap: 8px; margin: 12px 0 16px; padding: 0; list-style: none; }
.team-players-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fffdf7; }
.team-players-list .row-actions { display: inline-flex; gap: 12px; }

/* ⓘ menu on teammate rows */
.mate-menu { position: relative; display: inline-flex; }
.mate-info { display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 1.5px solid var(--muted-gold); border-radius: 50%; background: #fff; color: var(--muted-gold); font: italic 700 12px/1 Georgia, serif; cursor: pointer; }
.mate-info:hover, .mate-info[aria-expanded="true"] { border-color: var(--onyx); background: var(--onyx); color: var(--gold-bright); }
.mate-list { position: absolute; top: calc(100% + 6px); right: 0; z-index: 20; display: grid; min-width: 200px; padding: 6px; border-radius: 10px; background: var(--onyx); box-shadow: 0 10px 26px #0005; }
.mate-list.hidden { display: none; }
.mate-item { padding: 8px 10px; border: 0; border-radius: 7px; background: none; color: var(--parchment); font-size: 13px; font-weight: 600; text-align: left; cursor: pointer; }
.mate-item:hover:not(:disabled) { background: #ffffff17; }
.mate-item.danger { color: #f0a39a; }
.mate-item:disabled { opacity: .45; cursor: not-allowed; }
.mate-note { margin: 2px 10px 6px; color: #c9c2b0; font-size: 12px; line-height: 1.4; }
.teammate-list li { flex-wrap: nowrap; }
.team-mates-tile { overflow: visible; }

/* Craft Board: sphinx emblem menu, Settings box, reject pop-up, Registration Management */
#accountTools.organiser-hidden { display: none !important; }
.emblem-button { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.emblem-button img { width: 40px; height: 40px; border-radius: 50%; transition: box-shadow .15s ease; }
.emblem-button:hover img, .emblem-button[aria-expanded="true"] img { box-shadow: 0 0 0 2px #ffffffb3; }
.settings-dialog { width: min(920px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 26px 28px; overflow: auto; }
.settings-dialog h2 { margin: 0 0 18px; font-family: var(--serif); }
.settings-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 24px; }
.settings-tabs { display: grid; align-content: start; gap: 6px; }
.settings-tab { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fffdf7; color: var(--ink); font-weight: 700; text-align: left; cursor: pointer; }
.settings-tab.active { border-color: var(--onyx); background: var(--onyx); color: var(--gold-bright); }
.settings-pane h3 { margin: 0 0 12px; font-family: var(--serif); }
.settings-pane h4 { margin: 14px 0 0; }
.settings-pane .checkbox-row span { display: grid; gap: 2px; }
@media (max-width: 700px) { .settings-layout { grid-template-columns: 1fr; } .settings-tabs { grid-auto-flow: column; overflow-x: auto; } }
.reject-dialog { width: min(460px, calc(100vw - 32px)); }
.registration-controls { display: grid; gap: 14px; }
.auto-email-row span { display: grid; gap: 2px; }
#registrationView.is-event-locked .lockable { opacity: .55; }
/* Eight organiser tabs on one line: share the width evenly; scroll sideways on small screens */
#organiserTabs { flex-wrap: nowrap; }
#organiserTabs .tab { flex: 1 1 auto; padding: 10px 8px; font-size: 12px; text-align: center; }

/* Two-level organiser tabs: 4 main tabs; the active one flows down into its black sub-tab band */
.org-tabs { margin: 18px 0 14px; }
.org-tabs.hidden { display: none; }
.org-main { display: grid; grid-template-columns: repeat(var(--tab-count, 4), 1fr); gap: 4px; padding: 4px; border: 1px solid #e3dccd; border-radius: 12px; background: #eae6dc; }
.org-tab { position: relative; padding: 7px 10px; border: 0; border-radius: 9px !important; background: transparent; color: #6f6656; font-size: 12.5px; font-weight: 800; text-align: center; cursor: pointer; }
.org-tab:hover { color: var(--ink); }
.org-tab.active { background: var(--onyx); color: var(--gold-bright); }
.org-tabs.has-subs .org-tab.active { border-bottom-left-radius: 0 !important; border-bottom-right-radius: 0 !important; }
.org-tabs.has-subs .org-tab.active::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 13px; background: var(--onyx); }
.org-tabs.has-subs .org-tab.active::before { content: ""; position: absolute; z-index: 1; top: calc(100% + 3px); left: -10px; right: -10px; height: 10px;
  background: radial-gradient(circle at 0 0, transparent 9.5px, var(--onyx) 10px) left / 10px 10px no-repeat,
              radial-gradient(circle at 100% 0, transparent 9.5px, var(--onyx) 10px) right / 10px 10px no-repeat; }
.org-tab .tab-count, .org-sub .tab-count { margin-left: 6px; }
.org-subs { min-height: 38px; margin-top: 8px; }
.org-sub-row { display: grid; grid-auto-columns: 1fr; grid-auto-flow: column; gap: 4px; padding: 4px; border-radius: 12px; background: var(--onyx); transform-origin: top center; }
.org-sub-row.hidden { display: none; }
.org-sub-row.dropping { animation: org-drop .26s ease-out; }
@keyframes org-drop { from { clip-path: inset(0 0 100% 0 round 12px); opacity: .4; } to { clip-path: inset(0 0 0 0 round 12px); opacity: 1; } }
.org-sub { padding: 6px 8px; border: 0; border-radius: 8px !important; background: transparent; color: #d8d1c0; font-size: 12.5px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.org-sub:hover { color: #fff; }
.org-sub.active { color: var(--gold-bright); }
.panel-title { margin: 0 0 16px; font-family: var(--serif); font-size: 24px; }
#trialConfigView.is-event-locked .lockable, #storyboardView.is-event-locked .lockable, #registrationView.is-event-locked .lockable { opacity: .55; filter: grayscale(.4); cursor: not-allowed; }
@media (max-width: 700px) {
  .org-main { grid-template-columns: repeat(2, 1fr); }
  .org-sub-row { grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); }
  .org-sub { white-space: normal; }
  .org-tabs.has-subs .org-tab.active::before, .org-tabs.has-subs .org-tab.active::after { display: none; }
  .org-tabs.has-subs .org-tab.active { border-radius: 9px !important; }
}

/* "Updated 7:14 PM ↻" on organiser pages that don't refresh by themselves */
.updated-stamp { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 18px 0 4px; color: var(--muted); font-size: 12px; font-weight: 600; }
.updated-stamp.hidden { display: none; }
.updated-stamp.in-gap { min-height: 38px; margin: 0; }
.refresh-now { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 1px solid var(--line); border-radius: 50% !important; background: #fffdf7; color: var(--ink); font-size: 14px; line-height: 1; cursor: pointer; }
.refresh-now:hover { border-color: var(--onyx); background: var(--onyx); color: var(--gold-bright); }

/* Event configuration: one black tile with white sub-tiles */
.config-panel { padding: 18px !important; border: 0 !important; background: var(--onyx) !important; }
#createEventForm .config-grid, #editEventForm .config-grid { padding: 0; }
#createEventForm { background: var(--onyx); padding: 16px; border-radius: 14px; }
.config-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.cfg-tile { min-width: 0; padding: 14px 16px; border-radius: 12px !important; background: #fff; color: var(--ink); }
.cfg-full { grid-column: 1 / -1; }
.cfg-tile h4 { margin: 0 0 10px; color: #6b5418; font-family: var(--serif); font-size: 16px; }
.cfg-tile h4 .field-note { font-family: var(--sans); font-weight: 500; }
.cfg-tile > input, .cfg-tile > select, .cfg-tile > textarea { width: 100%; }
.cfg-tile .two-fields { margin-top: 8px; }
.venue-row { display: grid; grid-template-columns: minmax(0, 1.1fr) auto minmax(0, 1.5fr); gap: 12px; align-items: center; }
.venue-row .checkbox-row { margin: 0; white-space: nowrap; }
.is-dull { opacity: .45; }
.access-input.is-dull, .offer-field.is-dull input { cursor: not-allowed; }
.size-radios { display: grid; gap: 8px; }
.size-radio { display: flex; align-items: center; gap: 10px; margin: 0; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.size-radio:has(input:checked) { border-color: var(--gold); background: #fbf3dc; }
.size-radio:has(input:disabled) { cursor: not-allowed; opacity: .7; }
.size-radio span { display: grid; gap: 1px; }
.size-radio small { color: var(--muted); font-size: 11px; }
.size-radio.hidden { display: none; }
.price-tile { display: grid; align-content: start; gap: 10px; }
.price-tile label { margin: 0; }
.offer-check { margin: 0; }
.upi-field.is-dull { opacity: .45; }
.upi-field .upi-preview { margin-top: 10px; }
.upi-field .upi-preview img { width: 150px; height: 150px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; }
.uploads-tile { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.uploads-tile > p { grid-column: 1 / -1; margin: 0; }
.uploads-tile .cover-frame { margin-top: 8px; }
.cover-frame.is-fallback { cursor: default; opacity: .7; }
.banner-fallback { margin: 6px 0 0; }
.config-panel .event-form-message { color: #f0a39a; }
@media (max-width: 700px) {
  .config-grid, .uploads-tile { grid-template-columns: 1fr; }
  .venue-row { grid-template-columns: 1fr; }
}
.size-radio { justify-content: flex-start !important; text-align: left; }
.size-radio input { flex: none; width: auto !important; margin: 0; }
.cfg-tile .checkbox-row input { width: auto; }
#createEventForm > .eyebrow, #createEventForm h2, #createEventForm > p { color: #f4f0e5; }
#createEventForm > .eyebrow { color: var(--gold-bright); }
#createEventForm .dialog-heading h3 { color: #f4f0e5; }
#createEventForm .dialog-heading .eyebrow { color: var(--gold-bright); }
#createEventForm .event-form-message { color: #f0a39a; }

/* Network check: one black tile — Lock event on top, online (left) and offline (right) below */
.network-panel { display: grid; gap: 14px; }
.network-panel .cfg-tile { padding: 6px; }
.network-panel .cfg-tile .switch-row { border: 0; background: transparent; }
.net-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.net-online, .net-offline { display: grid; gap: 14px; min-width: 0; }
.network-panel .alert-board { border: 1px solid #ffffff2e; }
.net-run { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 4px; }
.net-run .bulb { width: 22px; height: 22px; }
.net-run-text { margin: 0; padding: 0 12px 10px; color: #a59e8c; font-size: 11px; }
.net-checklist { padding: 14px 16px !important; }
.net-checklist h4 { margin-bottom: 8px; }
.checklist { display: grid; gap: 4px; max-height: 360px; overflow-y: auto; }
.checklist .checkbox-row { margin: 0; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.checklist .checkbox-row:last-child { border-bottom: 0; }
.checklist .checkbox-row input { width: auto; }
.checklist .checkbox-row.is-dull { opacity: .6; cursor: not-allowed; }
.org-sub .tab-dot { width: 9px; height: 9px; margin-left: 7px; vertical-align: middle; box-shadow: none; }
@media (max-width: 760px) { .net-grid { grid-template-columns: 1fr; } }

/* Network check v2: two equal columns, each one tile with a fixed-height scrolling area and its toggle at the bottom */
.net-grid { align-items: stretch; }
.net-col { display: flex; flex-direction: column; min-width: 0; }
.net-scroll { height: 360px; max-height: none; overflow-y: scroll; flex: none; }
.network-panel .net-checklist { padding: 14px 16px !important; }
.net-checklist .checklist { padding-right: 6px; }
.net-foot { margin-top: auto; border: 0 !important; border-top: 1px solid var(--line) !important; border-radius: 0 !important; background: transparent !important; padding: 12px 2px 4px !important; }
.net-foot-dark { border-top-color: #ffffff1f !important; padding: 12px 12px !important; }
.net-foot-dark strong { color: #f4f0e5 !important; }
.net-foot-dark small { color: #a59e8c !important; }
.alert-log.net-scroll { padding: 6px 0; }
.net-col { height: 560px; }
.net-scroll { height: auto; flex: 1 1 0; min-height: 0; }
.net-foot-dark, .net-foot-dark * { font-family: var(--sans); }
.net-foot-dark strong { font-size: 14px; }
.net-foot-dark small { font-size: 12px; }
.net-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .net-grid { grid-template-columns: 1fr; } }

/* Header title: larger CRAFT BOARD */
.header-title { font-size: 1.8rem; }
@media (max-width: 700px) { .header-title { font-size: 1.25rem; } }

/* Tab lights (Pre-event: network checks; Live: event status) */
.org-tab .tab-dot { width: 9px; height: 9px; margin-left: 8px; vertical-align: middle; box-shadow: none; }

/* ⓘ explanation buttons, top right of a tile */
.info-tip { position: absolute; top: 10px; right: 10px; z-index: 5; }
.info-btn { display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 1px solid #c9bfa6; border-radius: 50% !important; background: #fff; color: #6b5418; font: italic 700 12px/1 Georgia, serif; cursor: pointer; }
.dark-tile > .info-tip .info-btn { border-color: #ffffff40; background: transparent; color: var(--gold-bright); }
.info-pop { display: none; position: absolute; top: 26px; right: 0; width: min(280px, 70vw); padding: 10px 12px; border-radius: 9px; background: var(--onyx-2); color: #eee7d5; font-size: 12px; font-weight: 450; line-height: 1.45; text-align: left; box-shadow: 0 10px 28px #0006; }
.info-tip.open .info-pop { display: block; }

/* Live event – Manage: black tiles with white sub-tiles */
.dark-tile { position: relative; display: grid; gap: 14px; padding: 18px !important; border: 0 !important; background: var(--onyx) !important; color: #f4f0e5; }
.dark-title { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0; color: var(--gold-bright); font-family: var(--serif); font-size: 20px; letter-spacing: .14em; text-align: center; }
.dark-title .bulb { width: 16px; height: 16px; }
.dark-tile.collapsible > summary { justify-content: center; position: relative; }
.dark-tile.collapsible > summary::after { position: absolute; right: 40px; border-color: var(--gold-bright); }
.dark-tile.collapsible[open] > summary { margin-bottom: 0; }
.dark-tile.collapsible::before { display: none; }
.dark-tile .cfg-tile { position: relative; }
.start-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 168px; gap: 14px; }
/* Game timer: a square tile on the right of Start the hunt (14 Oct 2026). */
.game-clock { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 2px; }
.game-clock h4 { margin: 0 0 4px; }
.game-clock-time { margin: 0; font: 600 34px/1 ui-monospace, "SFMono-Regular", Menlo, monospace; font-variant-numeric: tabular-nums; color: var(--ink, var(--onyx-2)); }
.game-clock-of { margin: 0; font-size: 14px; color: var(--muted, #7a7262); font-variant-numeric: tabular-nums; }
.game-clock-note { margin: 6px 0 0; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted, #7a7262); }
.game-clock.is-running .game-clock-note { color: #2f7d4f; }
.game-clock.is-over .game-clock-time, .game-clock.is-over .game-clock-note { color: #c0392b; }
.start-sub { display: grid; align-content: start; gap: 12px; padding: 16px !important; text-align: center; }
.start-sub h4 { margin: 0; color: #6b5418; font-family: var(--serif); font-size: 18px; }
.auto-live-line { display: flex; align-items: center; justify-content: center; gap: 14px; }
.auto-live-line input[type="datetime-local"] { width: auto; flex: 0 1 240px; min-width: 0; }
.manual-live-line { display: flex; justify-content: center; align-items: center; min-height: 44px; }
.bare-switch { display: inline-flex; align-items: center; margin: 0; cursor: pointer; }
.bare-switch input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); }
.bare-switch input:disabled + .toggle-switch { opacity: .5; cursor: not-allowed; }
.slim-sub { padding: 2px 40px 2px 4px !important; }
.slim-sub .team-lock-row { max-width: none; border: 0; background: transparent; }
.slim-sub .info-tip { top: 50%; transform: translateY(-50%); }
.dark-tile .update-form { margin: 0; }
.stop-controls { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stop-tile { position: relative; padding: 14px 40px 14px 14px !important; }
.stop-tile .switch-row { border: 0; background: transparent; padding: 6px 4px; }
.reset-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 100%; padding: 0 4px; }
.reset-row strong { color: var(--ink); font-size: 14px; }
.reset-row .button { padding: 8px 14px; }
@media (max-width: 700px) {
  .start-grid, .stop-controls { grid-template-columns: 1fr; }
  .game-clock { aspect-ratio: auto; padding: 18px !important; }
  .auto-live-line { flex-wrap: wrap; }
}
.bare-switch .toggle-switch { width: 40px; height: 22px; flex-basis: 40px; background: #b9b2a3; }
.bare-switch .toggle-switch::after { width: 16px; height: 16px; }
.bare-switch input:checked + .toggle-switch { background: #5b9b66; }
.bare-switch input:checked + .toggle-switch::after { transform: translateX(18px); }
.bare-switch input:focus-visible + .toggle-switch { outline: 3px solid #dfbd61; outline-offset: 3px; }
.leaderboard-management.dark-tile { margin-top: 0; }
details.dark-tile { display: block; }
details.dark-tile > .cfg-tile { margin-top: 14px; }
.dark-tile > .info-tip { top: 22px; right: 14px; }
@media (max-width: 700px) {
  .dark-title { font-size: 16px; letter-spacing: .1em; padding: 0 34px; }
  .dark-tile.collapsible > summary::after { right: 30px; }
}

/* Lifecycle tiles: count on the top left, ⓘ on the top right */
.category-tile { cursor: pointer; }
.category-tile .category-badge { left: 14px; right: auto; }
.category-tile > .info-tip { top: 14px; right: 14px; }
.category-tile .info-pop { text-align: left; }

/* Settings: one fixed large window; only the right side scrolls */
.settings-dialog { width: min(1100px, calc(100vw - 32px)); height: min(85vh, 780px); max-height: none; overflow: hidden; }
.settings-dialog[open] { display: flex; flex-direction: column; }
.settings-dialog .settings-layout { flex: 1 1 auto; min-height: 0; align-items: stretch; }
.settings-dialog .settings-tabs { align-self: start; }
.settings-dialog .settings-pane { min-height: 0; overflow-y: auto; padding-right: 6px; }
.settings-dialog::backdrop, .create-event-dialog::backdrop { background: #16140f8c; backdrop-filter: blur(6px) brightness(.85); -webkit-backdrop-filter: blur(6px) brightness(.85); }
@media (max-width: 700px) {
  .settings-dialog { width: 100vw; height: 100dvh; max-width: none; margin: 0; border-radius: 0 !important; }
}

/* Create an event: as wide as the Event configuration tile */
.create-event-dialog { width: min(1232px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 48px); }
.category-tile .info-pop { width: min(220px, 60vw); right: -4px; }

/* Template choice: plain radio buttons */
.template-picker { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.template-option { display: inline-flex; align-items: center; gap: 8px; padding: 6px 2px; border: 0; background: transparent; box-shadow: none !important; }
.template-option.is-selected { background: transparent; border: 0; }
.template-option input { position: static; opacity: 1; pointer-events: auto; width: auto; margin: 0; accent-color: #8a6a22; }
.template-option .template-label { font-weight: 700; }
.template-option .template-meta { color: var(--muted); font-size: 12px; }
.mapped-status { margin: 8px 0 0; }

/* Registration: state chip, Pause and Resume now */
.reg-state { display: flex; align-items: center; gap: 10px; align-self: center; }
.reg-state-label { font-size: 13px; font-weight: 700; color: var(--ink); }
.registration-status-row { align-items: center; }

/* Map teams with Trials: bottom of Team Management */
.map-strip { display: grid; gap: 10px; margin-top: 6px; }

/* Add a team by hand / Add spot team pop-ups */
.team-form-dialog { width: min(620px, calc(100vw - 28px)); padding: 26px 28px; border: 1px solid #d8ceb6; border-radius: 13px; background: var(--panel); color: var(--ink); }
.team-form-dialog::backdrop { background: #16140f8c; backdrop-filter: blur(6px) brightness(.85); -webkit-backdrop-filter: blur(6px) brightness(.85); }
.team-form-dialog h2 { margin: 0 0 6px; font-family: var(--serif); }
.team-form-dialog .dialog-close { float: right; }
.spot-warning { margin: 4px 0 10px; padding: 8px 12px; border-radius: 8px; background: #fdf0d5; color: #7a4d06; font-size: 13px; }
.spot-summary { margin: 4px 0 12px; font-weight: 700; }
.spot-code-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.spot-code { padding: 10px 18px; border: 2px dashed var(--gold); border-radius: 10px; font: 700 26px/1 ui-monospace, Menlo, monospace; letter-spacing: .12em; user-select: all; }
.lb-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
details.dark-tile > .lb-actions + .cfg-tile { margin-top: 10px; }
.dialog-error { margin: 6px 0 10px; padding: 8px 12px; border-radius: 8px; background: #fbe4e1; color: #8c2a20; font-size: 13px; }
.template-option .template-label { font-family: var(--sans); font-size: 15px; }

/* Registrations Management: black tile with white sub-tiles */
.registrations-panel { display: grid; gap: 14px; }
.reg-top-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; }
.registrations-panel .cfg-tile { position: relative; }
.registrations-panel .cfg-tile > .info-tip { top: 12px; right: 12px; }
.reg-tile h4, .teams-head h4 { margin: 0 0 10px; color: #6b5418; font-family: var(--serif); font-size: 16px; }
.reg-tile .registration-status-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.reg-tile .pause-field { display: flex; align-items: center; gap: 8px; }
.reg-tile .pause-field select { width: auto; min-width: 96px; padding: 6px 28px 6px 10px; }
.reg-tile .auto-email-row { margin: 0; }
.teams-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-right: 30px; }
.teams-head h4 { display: flex; align-items: center; gap: 10px; margin: 0; }
.teams-head .count-pill { font-family: var(--sans); }
.teams-tile .table-scroll { margin-top: 10px; }
.teams-table th { white-space: nowrap; }
.teams-table td { vertical-align: top; }
.teams-table .nowrap, .teams-table .email-cell { white-space: nowrap; }
.teams-table .email-cell .team-status { margin-right: 6px; }
.source-tag { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: #efe7d2; color: #6b5418; font-size: 10.5px; font-weight: 700; text-transform: lowercase; vertical-align: 1px; }
.warn-text { color: #a0521b; }
.teams-foot { display: flex; justify-content: flex-end; margin-top: 10px; }
.teams-empty { margin: 10px 0 0; }
.registrations-panel .map-strip { padding: 4px 40px 4px 6px !important; }
.registrations-panel .map-strip .switch-row { border: 0; background: transparent; gap: 16px; }
.path-counts-inline { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; margin-right: 6px; }
.path-count-chip { padding: 3px 9px; border-radius: 999px; background: #f3ecdb; color: var(--ink); font-size: 12px; }
.registrations-panel .map-strip > .info-tip { top: 50%; transform: translateY(-50%); }
@media (max-width: 700px) {
  .reg-top-grid { grid-template-columns: 1fr; }
  .teams-head { flex-wrap: wrap; }
}
.teams-head .add-team { margin: 0; padding: 0; border: 0; background: transparent; }

/* Info buttons inside table cells sit inline */
.cell-with-info { display: inline-flex; align-items: center; gap: 6px; }
.cell-with-info .info-tip { position: relative; top: auto; right: auto; display: inline-block; }
.cell-with-info .info-btn { width: 17px; height: 17px; font-size: 10.5px; }
.cell-with-info .info-pop { width: max-content; max-width: 260px; }
.plus-button { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--gold); border-radius: 50% !important; background: #fff; color: #6b5418; font-size: 20px; font-weight: 700; line-height: 1; cursor: pointer; }
.plus-button:hover { background: #fbf3dc; }
.teams-table td { vertical-align: middle; }

/* Organiser leaderboards: 10 rows tall, sticky header */
.leaderboard-management .table-scroll thead th { position: sticky; top: 0; z-index: 1; background: #fff; }
#liveBoardContent .leaderboard-list { overflow-y: auto; padding-right: 4px; }

/* Player leaderboard: own team shown as 10th row when outside the top 10 */
.leaderboard-team.detached-row { margin-top: 14px; position: relative; }
.leaderboard-team.detached-row::before { content: "⋯"; position: absolute; top: -16px; left: 50%; transform: translateX(-50%); color: var(--muted); letter-spacing: .3em; }

/* Teams table v3: code and transaction columns, email marks, row menu */
.team-code-cell { font: 700 13px/1 ui-monospace, Menlo, monospace; letter-spacing: .08em; user-select: all; }
.missing-text { color: #b23a2c; font-size: 12px; font-weight: 700; }
.mail-ok { color: #2f8a4d; font-size: 17px; font-weight: 800; }
.mail-bad { margin-right: 8px; color: #c0392b; font-size: 16px; font-weight: 800; }
.menu-cell { width: 36px; text-align: right; }
.row-menu { position: relative; display: inline-block; }
.row-menu-btn { width: 30px; height: 30px; padding: 0; border: 1px solid transparent; border-radius: 8px !important; background: transparent; color: var(--ink); font-size: 18px; line-height: 1; cursor: pointer; }
.row-menu-btn:hover, .row-menu.open .row-menu-btn { border-color: var(--line); background: #f6f1e4; }
.row-menu-list { display: none; position: fixed; z-index: 30; min-width: 120px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 10px 26px #0002; }
.row-menu.open .row-menu-list { display: grid; }
.row-menu-item { padding: 8px 12px; border: 0; border-radius: 6px !important; background: transparent; color: var(--ink); font-size: 13px; text-align: left; cursor: pointer; }
.row-menu-item:hover { background: #f6f1e4; }
.row-menu-item.danger { color: #b23a2c; font-weight: 700; }
.teams-table .col-na { background: #f4f1ea; color: #c2b9a5; }
.teams-table th.col-na { color: #c2b9a5; }

/* ---------- Craft Board type scale (one size per role) ----------
   Page title: 20px serif, spaced capitals (gold on black tiles, dark gold on white panels)
   Tile title: 17px serif, dark gold
   Label:      11px sans, spaced capitals (Quickview labels, table headers)
   Body:       14px sans · Small: 12px sans */
body.organiser-mode {
  --type-page: 20px;
  --type-tile: 17px;
  --type-body: 14px;
  --type-small: 12px;
}
body.organiser-mode .event-panel .panel-title,
body.organiser-mode .event-panel .panel-heading h3,
body.organiser-mode .event-panel .collapsible:not(.dark-tile) > summary h3 {
  margin: 0 0 16px; color: #6b5418; font-family: var(--serif); font-size: var(--type-page); font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
}
body.organiser-mode .event-panel .panel-heading h3 { margin: 0; }
body.organiser-mode .event-panel .dark-title { font-size: var(--type-page); }
body.organiser-mode .event-panel .cfg-tile h4,
body.organiser-mode .event-panel .start-sub h4,
body.organiser-mode .event-panel .reg-tile h4,
body.organiser-mode .event-panel .teams-head h4,
body.organiser-mode .event-panel .form-tile > h4,
body.organiser-mode .event-panel .form-stack h4,
body.organiser-mode .event-panel .admin-live h4,
body.organiser-mode #liveBoardContent h4,
body.organiser-mode .event-panel .sub-collapsible > summary h4,
body.organiser-mode .updates-admin-list .update-card h3 {
  color: #6b5418; font-family: var(--serif); font-size: var(--type-tile); font-weight: 600; letter-spacing: 0; text-transform: none;
}
body.organiser-mode .event-panel .switch-row strong,
body.organiser-mode .event-panel .lifecycle-action strong,
body.organiser-mode .event-panel .reset-row strong { font-size: var(--type-body); }
body.organiser-mode .event-panel .switch-row small,
body.organiser-mode .event-panel .lifecycle-action small,
body.organiser-mode .event-panel .muted.small,
body.organiser-mode .event-panel .field-note { font-size: var(--type-small); }
body.organiser-mode .event-panel .data-table th { font-size: 11px; letter-spacing: .12em; }
body.organiser-mode .event-panel .data-table td { font-size: 13.5px; }
body.organiser-mode .event-panel label { font-size: 13px; }
body.organiser-mode .leaderboard-table .lb-name { color: var(--ink); font-size: var(--type-body); }

/* ---------- Craft Board spacing (one rhythm everywhere) ----------
   Between tiles: 14px · Panel padding: 18px · Sub-tile padding: 14px 16px · Inside a tile: 12px */
body.organiser-mode { --space-tile: 14px; --space-panel: 18px; --space-inner: 12px; }
body.organiser-mode .event-panel .organizer-stack,
body.organiser-mode .event-panel .quickview,
body.organiser-mode .event-panel .lifecycle-actions,
body.organiser-mode .event-panel .config-grid,
body.organiser-mode .event-panel .reg-top-grid,
body.organiser-mode .event-panel .net-grid,
body.organiser-mode .event-panel .start-grid,
body.organiser-mode .event-panel .stop-controls,
body.organiser-mode .event-panel .registrations-panel,
body.organiser-mode .event-panel .network-panel,
body.organiser-mode .event-panel .dark-tile { gap: var(--space-tile); }
body.organiser-mode .event-panel > .panel,
body.organiser-mode .event-panel .organizer-stack > .panel { padding: var(--space-panel) !important; }
body.organiser-mode .event-panel .cfg-tile:not(.slim-sub):not(.map-strip):not(.net-lock) { padding: 14px 16px; }
body.organiser-mode .event-panel .form-stack { gap: var(--space-inner); }
body.organiser-mode .event-panel .lifecycle-action { padding: 12px 16px; }
body.organiser-mode .event-panel .panel-heading { margin-bottom: var(--space-inner); }
body.organiser-mode .event-panel .stop-controls { margin-top: 0; }
body.organiser-mode #updatedStamp { margin-top: var(--space-tile); }

/* Idea 3: remaining pages in the black tile with white sub-tiles */
.trial-panel .trial-stack { gap: var(--space-tile, 14px); }
.trial-panel .cfg-tile.paths-tile { border: 0; }
.trial-panel .planned-trials-control { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; border: 0; background: #fff; }
.trial-panel .challenge-tile { display: grid; gap: 12px; }
.trial-panel .challenge-tile h4 { margin: 0; }
.updates-panel .update-form { margin: 0; }
.updates-panel .cfg-tile h4 { margin: 0 0 10px; }
.lifecycle-tile .dark-title .count-pill { font-family: var(--sans); font-size: 11px; letter-spacing: .06em; }
.lifecycle-tile .lifecycle-action.cfg-tile { border: 0; background: #fff; }
.trial-panel .lock-banner { margin: 0; }
.dark-tile .cfg-tile, .dark-tile .lifecycle-action { color: var(--ink); }
.dark-tile .cfg-tile .muted, .dark-tile .cfg-tile .muted.small, .dark-tile .lifecycle-action small { color: var(--muted); opacity: 1; }

/* ---------- Craft Board buttons: three styles, one shape ----------
   Primary: gold fill · Secondary: dark outline · Danger: red outline (fills red on hover)
   Accept = primary, Reject/Delete = danger. Height 36px (small 30px), radius 8px. */
body.organiser-mode .button { min-height: 36px; padding: 7px 16px; border-radius: 8px !important; font-size: 13px; font-weight: 600; letter-spacing: .01em; box-shadow: none; transform: none; transition: background .15s, border-color .15s, color .15s; }
body.organiser-mode .button:hover { transform: none; }
body.organiser-mode .button-small { min-height: 30px; padding: 4px 12px; font-size: 12px; }
body.organiser-mode .button-primary,
body.organiser-mode .button-accept { border: 1px solid var(--gold-brand); background: var(--gold-brand); color: var(--onyx); }
body.organiser-mode .button-primary:hover:not(:disabled):not([aria-disabled="true"]),
body.organiser-mode .button-accept:hover:not(:disabled):not([aria-disabled="true"]) { border-color: var(--gold-bright); background: var(--gold-bright); }
body.organiser-mode .button-quiet { border: 1px solid #2a2723; background: #fff; color: #2a2723; }
body.organiser-mode .button-quiet:hover:not(:disabled):not([aria-disabled="true"]) { background: #f6f1e4; }
body.organiser-mode .button-danger,
body.organiser-mode .button-reject { border: 1px solid #b23a2c; background: #fff; color: #b23a2c; }
body.organiser-mode .button-danger:hover:not(:disabled):not([aria-disabled="true"]),
body.organiser-mode .button-reject:hover:not(:disabled):not([aria-disabled="true"]) { background: #b23a2c; color: #fff; }
body.organiser-mode .button:disabled,
body.organiser-mode .button[aria-disabled="true"] { opacity: .4; cursor: not-allowed; }
body.organiser-mode .dark-tile > .button-primary, body.organiser-mode .lb-actions .button-primary { box-shadow: none; }

/* ---------- Numbers that line up (tabular figures) ---------- */
body.organiser-mode .data-table td, body.organiser-mode .data-table input,
body.organiser-mode input[type="number"], body.organiser-mode .count-pill,
body.organiser-mode .path-count-chip, body.organiser-mode .qv-row, body.organiser-mode .qv-percent,
body.organiser-mode .planned-trials-control, body.organiser-mode .live-stats strong,
body.organiser-mode .leaderboard-rank, body.organiser-mode .countdown, body.organiser-mode #updatedStamp,
.leaderboard-rank, .token-pill, .countdown, .rank-number { font-variant-numeric: tabular-nums lining-nums; }
body.organiser-mode .data-table td.nowrap { letter-spacing: .02em; }
body.organiser-mode .leaderboard-table input[type="number"] { text-align: center; }

/* ---------- Empty states: faint sphinx emblem + one line ---------- */
.empty-sphinx { display: grid; justify-items: center; gap: 8px; padding: 26px 16px; text-align: center; }
.empty-sphinx img { width: 44px; height: 44px; filter: brightness(0); opacity: .16; }
.empty-sphinx p { max-width: 360px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.dark-tile > .empty-sphinx img, .craft-home .empty-sphinx img { filter: none; opacity: .35; }
.dark-tile > .empty-sphinx p, .craft-home .empty-sphinx p { color: #cfc6b0; }
.empty-sphinx img { width: 52px; height: 52px; filter: grayscale(1); opacity: .22; }
.dark-tile > .empty-sphinx img, .craft-home .empty-sphinx img { filter: none; opacity: .45; }

/* ---------- Skeleton loading ---------- */
@keyframes sk-shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
.skeleton { display: grid; gap: 12px; padding: 14px 4px; }
.skeleton span, .skeleton-tile span { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, #ece6d8 0, #f7f3ea 40%, #ece6d8 80%); background-size: 800px 100%; animation: sk-shimmer 1.3s linear infinite; }
.dark-tile .skeleton span, .skeleton-tiles .skeleton-tile span { background: linear-gradient(90deg, var(--onyx-3) 0, #34302a 40%, var(--onyx-3) 80%); background-size: 800px 100%; }
.skeleton-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.skeleton-tile { display: grid; align-content: end; gap: 10px; min-height: 170px; padding: 18px; border-radius: 12px; background: var(--onyx-soft); }
.skeleton-tile span:first-child { width: 70%; height: 16px; }
.skeleton-tile span:nth-child(2) { width: 90%; }
.skeleton-tile span:nth-child(3) { width: 45%; }
.quickview .skeleton-tiles { grid-template-columns: 1fr; }
.quickview .skeleton-tile { min-height: 110px; }
@media (prefers-reduced-motion: reduce) { .skeleton span, .skeleton-tile span { animation: none; } }

/* ---------- Gentle motion (150–200 ms, no bounce) ---------- */
@keyframes us-fade-up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes us-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes us-pop { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
.event-panel:not(.hidden) { animation: us-fade-up .18s ease-out; }
.org-sub-row:not(.hidden) { animation: us-fade .16s ease-out; }
dialog[open] { animation: us-pop .18s ease-out; }
dialog[open]::backdrop { animation: us-fade .18s ease-out; }
.info-tip.open .info-pop, .row-menu.open .row-menu-list { animation: us-fade .12s ease-out; }
.player-view:not(.hidden), .tab-panel:not(.hidden) { animation: us-fade-up .18s ease-out; }
.category-tile, .event-card, .cfg-tile.reg-tile, .button, .row-menu-btn, .info-btn, .plus-button { transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease; }
.event-card:hover { transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) {
  .event-panel, .org-sub-row, dialog[open], dialog[open]::backdrop, .info-pop, .row-menu-list, .player-view, .tab-panel { animation: none !important; }
  .event-card:hover, .category-tile:hover { transform: none; }
}

/* ---------- Hunt: the challenge as a sealed card ---------- */
.hunt-tile .challenge-card {
  position: relative; margin-top: 46px; padding: 46px 24px 24px; border: 1px solid #c9a227aa; border-radius: 14px !important;
  background:
    radial-gradient(120% 80% at 50% 0%, var(--onyx-3) 0%, var(--onyx-soft) 55%, var(--onyx) 100%),
    repeating-linear-gradient(45deg, #ffffff05 0 2px, transparent 2px 6px);
  background-blend-mode: normal;
  box-shadow: 0 18px 40px #0007, inset 0 0 0 6px var(--onyx), inset 0 0 0 7px #c9a22740;
}
.hunt-tile .challenge-card .trial-seal {
  position: absolute; top: -36px; left: 50%; display: grid; place-content: center; width: 72px; height: 72px; transform: translateX(-50%);
  border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f3d27a, #c9a227 55%, #8a6a17); color: var(--onyx-soft); text-align: center;
  box-shadow: 0 6px 16px #0008, inset 0 0 0 3px #ffffff30, inset 0 0 0 5px #8a6a1766;
}
.hunt-tile .challenge-card .trial-seal small { font-size: 9px; font-weight: 800; letter-spacing: .18em; line-height: 1; }
.hunt-tile .challenge-card .trial-seal strong { font-family: var(--serif); font-size: 28px; line-height: 1; }
.hunt-tile .challenge-card .seal-sub { margin: 0 0 6px; color: #a9a396; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-align: center; text-transform: uppercase; }
.hunt-tile .challenge-card h3 { margin: 4px 0 6px; color: var(--gold-bright); font-family: var(--serif); font-size: 15px; font-weight: 600; letter-spacing: .28em; text-align: center; text-transform: uppercase; }
.hunt-tile .challenge-card .card-ornament { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 18px; color: #c9a227; font-size: 12px; }
.hunt-tile .challenge-card .card-ornament span { width: 54px; height: 1px; background: linear-gradient(90deg, transparent, #c9a227aa); }
.hunt-tile .challenge-card .card-ornament span:last-child { background: linear-gradient(90deg, #c9a227aa, transparent); }
.hunt-tile .challenge-card .challenge { margin-bottom: 22px; color: #f6efdc; font-family: var(--serif); font-size: 19px; line-height: 1.6; text-align: center; }
.hunt-tile .challenge-card .hunt-answer .button-primary { border-color: var(--gold-brand); background: var(--gold-brand); color: var(--onyx); }
.hunt-tile .challenge-card .hunt-answer .button-primary:hover { background: var(--gold-bright); }
.hunt-tile .challenge-card #buyHint { display: block; margin: 14px auto 0; border-color: #c9a22766; color: #e8d9ad; background: transparent; }
.hunt-tile .challenge-card .hint-box { text-align: left; }

.hunt-tile .challenge-card #answerFeedback:empty { display: none; }

/* ---------- Hunt: the moment of success ---------- */
.hunt-tile .challenge-card { overflow: visible; }
.hunt-tile .challenge-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: linear-gradient(105deg, transparent 30%, #f3d27a55 45%, #fff3c888 50%, #f3d27a55 55%, transparent 70%) no-repeat;
  background-size: 250% 100%; background-position: 150% 0;
}
.hunt-tile .challenge-card.cleared::after { animation: us-shimmer 1.1s ease-out forwards; }
.hunt-tile .challenge-card.cleared { animation: us-glow 1.4s ease-out; }
.hunt-tile .challenge-card.cleared .trial-seal { animation: us-seal 0.9s cubic-bezier(.3,1.6,.5,1); }
.hunt-tile .challenge-card #answerFeedback.success { color: var(--gold-bright); font-family: var(--serif); font-size: 16px; letter-spacing: .2em; text-align: center; text-transform: uppercase; animation: us-pop .4s ease-out; }
#huntTokens strong { display: inline-block; font-variant-numeric: tabular-nums; transition: color .3s, transform .3s; }
#huntTokens strong.ticking { color: var(--gold-bright); transform: scale(1.18); }
@keyframes us-shimmer { 0% { opacity: 1; background-position: 150% 0; } 100% { opacity: 1; background-position: -60% 0; } }
@keyframes us-glow { 0% { box-shadow: 0 18px 40px #0007, inset 0 0 0 6px var(--onyx), inset 0 0 0 7px #c9a22740; } 35% { box-shadow: 0 0 46px #c9a22788, inset 0 0 0 6px var(--onyx), inset 0 0 0 7px #f3d27a; } 100% { box-shadow: 0 18px 40px #0007, inset 0 0 0 6px var(--onyx), inset 0 0 0 7px #c9a22740; } }
@keyframes us-seal { 0% { transform: translateX(-50%) scale(1); } 40% { transform: translateX(-50%) scale(1.22) rotate(-8deg); box-shadow: 0 0 30px #f3d27a; } 100% { transform: translateX(-50%) scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .hunt-tile .challenge-card.cleared, .hunt-tile .challenge-card.cleared::after, .hunt-tile .challenge-card.cleared .trial-seal, #huntTokens strong { animation: none; transition: none; }
}

/* ---------- Player leaderboard: leader spotlight and own-team glow ---------- */
#leaderboardContent .leader-spotlight { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 34px 0 8px; padding: 42px 20px 18px; border: 1px solid #c9a227; border-radius: 12px; text-align: center;
  background: radial-gradient(120% 90% at 50% 0%, var(--onyx-3) 0%, var(--onyx-soft) 60%, var(--onyx) 100%); box-shadow: inset 0 0 0 5px var(--onyx), inset 0 0 0 6px #c9a22740; animation: us-fade-up .5s ease-out both; }
#leaderboardContent .leader-seal { position: absolute; top: -28px; left: 50%; display: grid; place-items: center; width: 56px; height: 56px; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f8e19a, #c9a227 55%, #8a6a17); color: var(--onyx-soft); font-family: var(--serif); font-size: 26px; font-weight: 700; box-shadow: 0 6px 16px #0006, 0 0 0 4px var(--onyx), 0 0 0 5px #c9a22788; }
#leaderboardContent .leader-caption { color: #c9b27a; font-size: 10px; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; }
#leaderboardContent .leader-name { max-width: 100%; overflow-wrap: anywhere; color: var(--gold-bright); font-family: var(--serif); font-size: 22px; }
#leaderboardContent .leader-trial { color: #e8d9ad; font-size: 11px; font-weight: 750; }
#leaderboardContent .leader-spotlight .team-progress-track { width: 100%; margin-top: 10px; }
#leaderboardContent .podium-you { padding: 2px 8px; border-radius: 999px; background: var(--gold-brand); color: var(--onyx); font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
#leaderboardContent .leader-spotlight.own-team { box-shadow: inset 0 0 0 5px var(--onyx), inset 0 0 0 6px var(--gold-bright), 0 0 24px #f3d27a77; }
#leaderboardContent .leaderboard-team.own-team { border-color: var(--gold-brand); box-shadow: 0 0 0 1px var(--gold-brand), 0 0 18px #c9a22766; animation: us-own-glow 2.4s ease-in-out 2; }
@keyframes us-own-glow { 50% { box-shadow: 0 0 0 1px var(--gold-bright), 0 0 26px #f3d27aaa; } }
@media (prefers-reduced-motion: reduce) { #leaderboardContent .leader-spotlight, #leaderboardContent .leaderboard-team.own-team { animation: none; } }

/* ---------- Event pop-up: slow zoom on the banner ---------- */
.event-dialog-frame { position: relative; overflow: hidden; }
.event-dialog-frame::after { content: ""; position: absolute; inset: auto 0 0; height: 70px; background: linear-gradient(180deg, transparent, #0b0b0a33); pointer-events: none; }
dialog[open] .event-dialog-frame img.event-dialog-image { animation: us-kenburns 16s cubic-bezier(.25,.1,.25,1) forwards; will-change: transform; }
@keyframes us-kenburns { from { transform: scale(1); } to { transform: scale(1.1); } }
@media (prefers-reduced-motion: reduce) { dialog[open] .event-dialog-frame img.event-dialog-image { animation: none; } }

/* ---------- Event banner: split-flap countdown ---------- */
/* Tiles size themselves to the countdown box: 30px wide at most, smaller when the box is narrow. */
.event-countdown { container-type: inline-size; }
#eventCountdown.flip-countdown { --fd: min(30px, calc(100cqi / 11.4)); display: flex; align-items: flex-start; justify-content: center; gap: calc(var(--fd) * .2); max-width: 100%; margin: 0; font: inherit; letter-spacing: 0; }
.flip-countdown .fc-group { display: grid; justify-items: center; gap: calc(var(--fd) * .2); }
.flip-countdown .fc-group small { color: #c9b27a; font-size: clamp(7px, calc(var(--fd) * .3), 9px); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.flip-countdown .fc-digits { display: flex; gap: calc(var(--fd) * .1); }
.flip-countdown .fc-sep { width: calc(var(--fd) * .4); padding-top: calc(var(--fd) * .27); color: #c9a227; font: 700 calc(var(--fd) * .72)/1 var(--sans); text-align: center; }
.flip-countdown .fd { position: relative; width: var(--fd); height: calc(var(--fd) * 1.47); border-radius: calc(var(--fd) * .2); perspective: calc(var(--fd) * 5.3); box-shadow: 0 4px 10px #0007; font: 700 calc(var(--fd) * .93)/calc(var(--fd) * 1.47) var(--sans); font-variant-numeric: tabular-nums; color: #fff3cb; }
.flip-countdown .fd > span { position: absolute; left: 0; right: 0; height: 50%; overflow: hidden; backface-visibility: hidden; }
.flip-countdown .fd b { display: block; height: calc(var(--fd) * 1.47); text-align: center; font-weight: 700; }
.flip-countdown .fd-upper, .flip-countdown .fd-flap-top { top: 0; border-radius: calc(var(--fd) * .2) calc(var(--fd) * .2) 0 0; background: linear-gradient(180deg, var(--onyx-3), var(--onyx-2)); border-bottom: 1px solid #0008; }
.flip-countdown .fd-lower, .flip-countdown .fd-flap-bottom { bottom: 0; border-radius: 0 0 calc(var(--fd) * .2) calc(var(--fd) * .2); background: linear-gradient(180deg, var(--onyx-soft), var(--onyx)); }
.flip-countdown .fd-lower b, .flip-countdown .fd-flap-bottom b { margin-top: calc(var(--fd) * -.735); }
.flip-countdown .fd-flap-top { transform-origin: 50% 100%; z-index: 2; visibility: hidden; }
.flip-countdown .fd-flap-bottom { transform-origin: 50% 0; z-index: 2; visibility: hidden; transform: rotateX(90deg); }
.flip-countdown .fd.flipping .fd-flap-top { visibility: visible; animation: us-flap-top .3s ease-in forwards; }
.flip-countdown .fd.flipping .fd-flap-bottom { visibility: visible; animation: us-flap-bottom .3s ease-out .3s forwards; }
.flip-countdown .fd::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: #000a; z-index: 3; }
@keyframes us-flap-top { from { transform: rotateX(0); } to { transform: rotateX(-90deg); } }
@keyframes us-flap-bottom { from { transform: rotateX(90deg); } to { transform: rotateX(0); } }
@media (prefers-reduced-motion: reduce) {
  .flip-countdown .fd.flipping .fd-flap-top, .flip-countdown .fd.flipping .fd-flap-bottom { animation: none; visibility: hidden; }
}

/* ---------- Brand icon set ---------- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.us-icon { display: inline-block; width: 1em; height: 1em; vertical-align: -.14em; flex: none; }
.info-btn, .dialog-close, .row-menu-btn { font-size: 0 !important; }
.info-btn::before, .dialog-close::before, .row-menu-btn::before { content: ""; display: block; background: currentColor; -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.info-btn { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12.2' cy='6.4' r='1.75'/%3E%3Cpath d='M9.6 10.2h3.9v7.4h1.6v1.6H9.4v-1.6h1.8v-5.8H9.6z'/%3E%3C/svg%3E"); color: #6b5418; }
.info-btn::before { width: 15px; height: 15px; }
.cell-with-info .info-btn::before { width: 13px; height: 13px; }
.dark-tile > .info-tip .info-btn { color: var(--gold-bright); }
.dialog-close { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 6.5l11 11M17.5 6.5l-11 11' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round'/%3E%3C/svg%3E"); color: var(--ink); }
.dialog-close::before { width: 18px; height: 18px; }
.welcome-dialog .dialog-close { color: var(--parchment); }
.row-menu-btn { display: inline-grid; place-items: center; --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='5.5' r='1.9'/%3E%3Ccircle cx='12' cy='12' r='1.9'/%3E%3Ccircle cx='12' cy='18.5' r='1.9'/%3E%3C/svg%3E"); }
.row-menu-btn::before { width: 18px; height: 18px; }
.mail-ok, .mail-bad { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 13px; vertical-align: middle; }
.mail-ok { background: #2f8a4d; color: #fff; }
.mail-bad { border: 1.5px solid #c0392b; color: #c0392b; font-size: 12px; }
.team-status .us-icon { margin-right: 4px; font-size: 12px; }

/* ---------- Loading mark: boot splash and busy buttons ---------- */
.boot-splash { position: fixed; inset: 0; z-index: 9999; display: grid; place-content: center; justify-items: center; gap: 18px; background: radial-gradient(80% 60% at 50% 40%, var(--onyx-2), var(--onyx)); transition: opacity .45s ease, visibility .45s; }
.boot-splash.done { opacity: 0; visibility: hidden; }
.us-loader { position: relative; display: grid; place-items: center; width: 108px; height: 108px; }
.us-loader img { width: 64px; height: 64px; animation: us-breathe 2.4s ease-in-out infinite; }
.us-loader svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: us-spin 1.6s linear infinite; }
.us-loader circle { fill: none; stroke-width: 2.5; }
.us-loader .track { stroke: #c9a22726; }
.us-loader .arc { stroke: var(--gold-bright); stroke-linecap: round; stroke-dasharray: 72 217; filter: drop-shadow(0 0 4px #f3d27a99); }
.boot-word { margin: 0; color: #c9b27a; font-family: var(--serif); font-size: 13px; letter-spacing: .42em; padding-left: .42em; }
button[aria-busy="true"] { cursor: progress; opacity: .85; }
button[aria-busy="true"]::before { content: ""; display: inline-block; width: .9em; height: .9em; margin-right: .5em; vertical-align: -.12em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: us-spin .8s linear infinite; }
@keyframes us-spin { to { transform: rotate(360deg); } }
@keyframes us-breathe { 50% { transform: scale(1.05); opacity: .85; } }
@media (prefers-reduced-motion: reduce) {
  .us-loader img, .us-loader svg { animation: none; }
  button[aria-busy="true"]::before { animation-duration: 2.4s; }
}

/* ---------- Gold focus rings (keyboard only) ---------- */
:root { --focus-ring: #a87d12; }
.site-header, .dark-tile, .event-detail, .challenge-card, .boot-splash, .leader-spotlight, .welcome-dialog, .org-sub-row, footer { --focus-ring: #f3d27a; }
:where(a, button, summary, select, [tabindex]:not([tabindex="-1"]), input[type="checkbox"], input[type="radio"], input[type="file"]):focus-visible {
  outline: 2px solid var(--focus-ring); outline-offset: 2px; box-shadow: 0 0 0 5px color-mix(in srgb, var(--focus-ring) 22%, transparent);
}
:where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), textarea):focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
:where(a, button, summary, select, input, textarea, [tabindex]):focus:not(:focus-visible) { outline: none; }
.info-btn:focus-visible, .dialog-close:focus-visible, .row-menu-btn:focus-visible, .plus-button:focus-visible { border-radius: 50%; }
.row-menu-btn:focus-visible { border-radius: 8px !important; }

/* ---------- Consistent hover states (mouse and trackpad only) ---------- */
@media (hover: hover) and (pointer: fine) {
  .button:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]),
  body.organiser-mode .button:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]) { transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease; }
  .button:hover:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]),
  body.organiser-mode .button:hover:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]) { transform: translateY(-1px); box-shadow: 0 6px 14px #1a140626; }
  .button:active:not(:disabled), body.organiser-mode .button:active:not(:disabled) { transform: translateY(0); box-shadow: none; }
  .data-table tbody tr, .leaderboard-team, .update-card, .menu-item, .row-menu-item { transition: background-color .15s ease, box-shadow .15s ease; }
  .data-table tbody tr:hover { background: #fbf5e4; }
  .dark-tile .data-table tbody tr:hover { background: #fbf5e4; }
  .leaderboard-team:not(.own-team):hover, .update-card:hover { box-shadow: inset 3px 0 0 var(--gold-brand), 0 4px 12px #1a14060f; }
  a:not(.button):not(.brand):not(.event-card):not(.category-tile), .text-button { text-underline-offset: 3px; transition: text-decoration-color .15s ease, color .15s ease; }
  a:not(.button):not(.brand):not(.event-card):not(.category-tile):not(.main-nav a):hover, .text-button:hover:not(:disabled) { text-decoration-line: underline; text-decoration-color: var(--gold-brand); text-decoration-thickness: 2px; }
  .info-btn:hover { border-color: var(--gold-brand); background: #fbf3dc; }
  .dark-tile > .info-tip .info-btn:hover { background: #ffffff14; }
  .dialog-close:hover { border-color: var(--gold-brand); background: #fbf3dc; }
  .welcome-dialog .dialog-close:hover { background: #ffffff14; }
  .toggle-switch, .tab, .org-tab, .org-sub, .info-btn, .row-menu-btn, .dialog-close, .plus-button { cursor: pointer; }
}

/* ---------- Corner radius: three sizes only ---------- */
:root { --r-sm: 8px; --r-md: 12px; --r-lg: 16px; }
:root:root :is(.button, .button-header, input:not([type="checkbox"]):not([type="radio"]), textarea, select, .phone-entry, .tab, .org-sub, .settings-tab,
  .menu-item, .mate-item, .row-menu-item, .row-menu-btn, .global-message, .lock-banner, .event-form-message, .dev-code, .team-code, .issued-code, .panel-empty,
  .template-option, .size-radio, .path-count, .challenge-image, .cover-frame, .cover-frame-tile, .event-image, .event-image img, .hint-box, .integrity-box, .chip-box,
  .info-pop, .dialog-error, .winner-banner, .registration-note, .upi-qr, .upi-preview img, .trial-image-preview img, .event-number, .tile-flag, .team-status,
  .path-badge, .alert-ack, .has-tooltip::after) { border-radius: var(--r-sm) !important; }
:root:root :is(.cfg-tile, .nested-tile, .leaderboard-team, .update-card, .team-tile, .rank-badge, .form-tile, .switch-row, .token-rules, .deleted-row,
  .lifecycle-action, .panel-section, .qv-item, .qv-tile, .live-stats span, .add-team, .sub-collapsible, .player-list li, .teammate-list li, .team-players-list li,
  .network-strip, .alert-board, .stop-tile, .challenge-video, .hunt-status, .hunt-tokens, .status-strip, .org-main, .account-tools, .tabs,
  .planned-trials-control, .event-countdown, .team-progress-banner, .player-menu-list, .mate-list, .row-menu-list, .section-banner, .category-tile, fieldset,
  .leader-spotlight) { border-radius: var(--r-md) !important; }
:root:root :is(.panel, .dark-tile, .control-panel, .event-card, .event-detail, .challenge-card, dialog, .event-dialog, .planned-trials-dialog, .crafter-hero,
  .craft-home, .quickview, #createEventForm) { border-radius: var(--r-lg) !important; }
@media (max-width: 560px) { :root:root .event-dialog { border-radius: 0 !important; } }

/* ---------- Scroll bars: thin, gold handle ---------- */
:root { --scroll-thumb: #c9a22799; --scroll-thumb-hover: #c9a227; --scroll-track: #efe8d6; }
.dark-tile, .alert-board, .welcome-dialog, .event-detail, .player-menu-list, .mate-list { --scroll-thumb: #c9a227aa; --scroll-thumb-hover: #f3d27a; --scroll-track: #ffffff14; }
.dark-tile .cfg-tile, .dark-tile .nested-tile { --scroll-thumb: #c9a22799; --scroll-thumb-hover: #c9a227; --scroll-track: #efe8d6; }
* { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { border-radius: 8px; background: var(--scroll-track); }
*::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 8px; background: var(--scroll-thumb) padding-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--scroll-thumb-hover) padding-box; }
*::-webkit-scrollbar-corner { background: transparent; }
html { scrollbar-color: var(--scroll-thumb) var(--scroll-track); }
html::-webkit-scrollbar { width: 10px; }

/* ---------- Event banner: the countdown / status box keeps one size ---------- */
.event-detail.banner-v2 { grid-template-columns: minmax(0, 1fr) 300px; }
.banner-v2 .event-countdown { box-sizing: border-box; width: 300px; height: 180px; min-height: 180px; padding: 14px 16px; align-self: center; justify-self: end; overflow: hidden; }
.banner-v2 .event-countdown > .banner-live { font-size: 30px; }
.banner-v2 .event-countdown > .banner-live .bulb { width: 22px; height: 22px; }
@media (max-width: 800px) {
  .event-detail.banner-v2 { grid-template-columns: minmax(0, 1fr); }
  .banner-v2 .event-countdown { width: 100%; justify-self: stretch; }
}

/* ---------- Trial configuration v2: setup tile and challenge tabs ---------- */
.trial-panel .trial-setup-tile { display: grid; gap: 12px; }
.trial-setup-grid { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); gap: 12px; }
.ct-box { position: relative; display: grid; align-content: start; gap: 8px; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); background: #fbf8f0; }
.ct-box > h5 { margin: 0; padding-right: 26px; color: #6b5418; font-family: var(--serif); font-size: 15px; font-weight: 600; }
.ct-box > .info-tip { top: 9px; right: 9px; }
.ct-box textarea, .ct-box input:not([type="checkbox"]):not([type="radio"]) { margin: 0; }
.total-box input { max-width: 120px; font-size: 18px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.template-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; }
.template-row .template-picker { gap: 6px 20px; }
.template-lock { display: inline-flex; align-items: center; gap: 9px; margin: 0; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.template-lock input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); }
.template-lock input:checked + .toggle-switch { background: #5b9b66; }
.template-lock input:checked + .toggle-switch::after { transform: translateX(15px); }
.template-lock input:disabled + .toggle-switch { opacity: .5; }
.template-lock input:focus-visible + .toggle-switch { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.trial-setup-actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.trial-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.trial-tab { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--r-sm, 8px); background: #fffdf7; color: var(--ink); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; }
.trial-tab.active { border-color: var(--onyx); background: var(--onyx); color: var(--gold-bright); }
.trial-tab .status-light { width: 8px; height: 8px; border-radius: 50%; background: #b9b2a2; }
.trial-tab .status-light.is-on { background: #3f9a57; box-shadow: 0 0 6px #3f9a5799; }
.trial-form { display: grid; gap: 12px; }
.ct-row { display: grid; gap: 12px; }
.ct-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ct-answers { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
.ct-hint { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) minmax(0, .8fr) minmax(0, 1fr); }
.media-preview img { display: block; width: 100%; max-height: 170px; object-fit: cover; border: 1px solid var(--line); border-radius: var(--r-sm, 8px); background: var(--onyx-3); }
.video-preview img { aspect-ratio: 16 / 9; height: auto; max-height: 170px; }
.trial-image-preview { display: grid; gap: 8px; }
.trial-image-preview img { max-width: none; max-height: 170px; object-fit: contain; }
.method-row { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.ct-box .checkbox-row { margin: 0; }
.ct-box.is-dulled { opacity: .55; }
.ct-box.goodie-field.is-dulled { opacity: .55; }
.info-pop .goodie-note:empty { display: none; }
@media (max-width: 900px) {
  .ct-hint { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ct-answers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ct-answers > .ct-box:first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .trial-setup-grid, .ct-two { grid-template-columns: minmax(0, 1fr); }
}

.template-row { flex-wrap: nowrap; }
.template-row .template-picker { flex: 1 1 auto; min-width: 0; }
@media (max-width: 1100px) { .template-row { flex-wrap: wrap; } }
.media-preview { position: relative; display: grid; place-items: center; height: 150px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-sm, 8px); background: var(--onyx-2); }
.media-preview img { width: 100%; height: 100%; max-height: none; border: 0; border-radius: 0; object-fit: cover; }
.trial-image-preview img { object-fit: contain; background: var(--onyx-2); }
.media-preview.is-empty { border-style: dashed; background: #f4efe2; }
.media-preview.is-empty img, .media-preview img.is-broken { display: none; }
.media-preview.is-empty::before { content: attr(data-empty); color: #9a9078; font-size: 13px; }
.media-preview .play-mark { position: absolute; width: 46px; height: 46px; border-radius: 50%; background: #0b0b0acc; box-shadow: 0 0 0 2px #f3d27a; }
.media-preview .play-mark::after { content: ""; position: absolute; left: 18px; top: 14px; border-left: 15px solid #f3d27a; border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
.media-preview.is-empty .play-mark { display: none; }
.trial-image-field:has(.trial-image-preview.is-empty) .image-remove { display: none; }
.template-row .template-picker { gap: 6px 14px; }
.template-row .template-option { padding: 4px 0; }
@media (max-width: 640px) { .ct-hint > .ct-box:first-child { grid-column: 1 / -1; } }

/* ---------- Trial configuration v2.1: tab joined to its sheet; grouped sub-tiles ---------- */
.trial-panel .challenge-tile { --sheet: #f6ecd2; --sheet-edge: #c9a227; }
.trial-tabs { position: relative; z-index: 1; flex-wrap: nowrap; align-items: flex-end; gap: 4px; margin-bottom: -13px; padding: 0 0 0 2px; border-bottom: 0; overflow-x: auto; scrollbar-width: none; }
.trial-tabs::-webkit-scrollbar { display: none; }
.trial-tabs-caption { align-self: center; margin-right: 6px; color: #8a7a52; font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
:root:root .trial-tab { flex: none; min-height: 36px; padding: 7px 14px 9px; border: 1.5px solid var(--line); border-bottom: 0; border-radius: 10px 10px 0 0 !important; background: #fbf8f0; color: #5f5747; }
:root:root .trial-tab.active { min-height: 44px; padding-bottom: 14px; border-color: var(--sheet-edge); background: var(--sheet); color: var(--onyx); box-shadow: none; }
.trial-tab.active .status-light:not(.is-on) { background: #a39a85; }
:root:root .trial-sheet { position: relative; gap: 14px; padding: 16px; border: 1.5px solid var(--sheet-edge); border-radius: 12px !important; background: var(--sheet); }
.trial-sheet .ct-box { border-color: #e6dcc2; background: #fff; }
.ct-field { position: relative; display: grid; align-content: start; gap: 8px; min-width: 0; }
.ct-field > h5 { margin: 0; padding-right: 26px; color: #6b5418; font-family: var(--serif); font-size: 15px; font-weight: 600; }
.ct-field > .info-tip { top: -2px; right: 0; }
.ct-field.is-dulled { opacity: .55; }
.ct-pair { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.ct-group { gap: 14px 16px; padding: 14px 16px; }
.ct-group > .info-tip { display: none; }
.ct-answers-group { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.ct-stack { display: grid; align-content: start; gap: 14px; }
.ct-method-group { grid-template-columns: minmax(0, 1fr); }
.ct-box.ct-hint { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) minmax(0, .8fr) minmax(0, 1fr); }
.ct-hint > .hint-switch { grid-column: 1 / -1; margin: 0; }
.ct-hint.hint-off > .ct-field { display: none; }
.ct-group .ct-field + .ct-field, .ct-group .ct-stack { position: relative; }
.ct-answers-group > .ct-stack, .ct-hint > .ct-field + .ct-field { padding-left: 16px; border-left: 1px solid #efe6cf; }
.ct-method-group > .ct-field + .ct-field { padding-top: 14px; border-top: 1px solid #efe6cf; }
.ct-method-group > .ct-field + .ct-field > .info-tip { top: 12px; }
@media (max-width: 900px) {
  .ct-pair { grid-template-columns: minmax(0, 1fr); }
  .ct-box.ct-hint { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ct-hint > .ct-field:nth-child(2) { grid-column: 1 / -1; }
  .ct-hint > .ct-field + .ct-field { padding-left: 0; border-left: 0; }
}
@media (max-width: 640px) {
  .ct-answers-group { grid-template-columns: minmax(0, 1fr); }
  .ct-answers-group > .ct-stack { padding-left: 0; border-left: 0; padding-top: 14px; border-top: 1px solid #efe6cf; }
  .trial-sheet { padding: 12px; }
}
:root:root .trial-tab:not(.active) { margin-bottom: 2px; }

/* ---------- Trial configuration v2.2: centred headings and actions; tabs fill the width ---------- */
.trial-setup-tile .ct-box > h5, .trial-panel .challenge-tile > h4 { padding: 0 26px; text-align: center; }
.trial-setup-tile .total-box { justify-items: center; }
.trial-setup-tile .template-box { justify-items: center; }
.template-row, .template-row { flex-direction: column; flex-wrap: nowrap; justify-content: center; gap: 12px; }
.template-row .template-picker { justify-content: center; }
.trial-setup-actions { justify-content: center; }
.trial-sheet > .admin-actions { justify-content: center; }
:root:root .trial-tab { flex: 1 1 0; justify-content: center; min-width: 64px; }

/* ---------- Path templates drawn as linked stages ---------- */
.template-diagram { display: block; overflow: visible; }
.template-diagram line { stroke: #c9a227; stroke-width: 2; stroke-linecap: round; }
.template-diagram circle { fill: var(--onyx); stroke: #c9a227; stroke-width: 1.6; transition: fill .15s ease, stroke .15s ease; }
.template-diagram text { fill: #f3d27a; font: 700 12px/1 var(--sans); text-anchor: middle; dominant-baseline: middle; font-variant-numeric: tabular-nums; transition: fill .15s ease; }
.template-option.is-selected .template-diagram circle { fill: #e3bd4a; stroke: #8a6a17; }
.template-option.is-selected .template-diagram text { fill: var(--onyx); }
.template-option.is-selected .template-diagram line { stroke: #8a6a17; stroke-width: 2.4; }
.template-option:has(input:disabled):not(.is-selected) .template-diagram { opacity: .45; }
.template-row .template-picker { gap: 10px 26px; }
.template-row .template-option { gap: 8px; }

/* ---------- Satchel items: Craft Board ---------- */
.trial-panel .items-tile { position: relative; display: grid; gap: 12px; }
.trial-panel .items-tile > h4 { margin: 0; padding: 0 26px; text-align: center; }
.items-head { display: flex; align-items: center; justify-content: space-between; }
.items-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.items-list > .empty-sphinx { grid-column: 1 / -1; }
.item-card { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding: 12px; border: 1px solid #e6dcc2; border-radius: var(--r-md, 12px); background: #fbf8f0; }
.item-card-picture { display: grid; place-items: center; width: 72px; height: 72px; border-radius: var(--r-sm, 8px); background: var(--onyx); color: var(--gold-bright); overflow: hidden; }
.item-card-picture img { width: 100%; height: 100%; object-fit: cover; }
.item-glyph { width: 44px; height: 44px; }
.item-card-body { display: grid; gap: 4px; min-width: 0; }
.item-card-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.item-card-title strong { font-family: var(--serif); font-size: 16px; }
.item-action { padding: 2px 8px; border-radius: 999px !important; background: var(--onyx); color: var(--gold-bright); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.item-card-facts, .item-card-held, .item-card-place { margin: 0; color: var(--muted); font-size: 12px; }
.item-card-held { display: flex; align-items: center; gap: 6px; }
.item-card-held .info-tip { position: relative; top: auto; right: auto; }
.item-card-actions { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; }
.item-dialog { width: min(620px, calc(100% - 28px)); }
.item-form-top { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; align-items: start; }
.item-picture { display: grid; justify-items: center; gap: 8px; }
.item-picture-preview { display: grid; place-items: center; width: 120px; height: 120px; border-radius: var(--r-md, 12px); background: var(--onyx); color: var(--gold-bright); overflow: hidden; }
.item-picture-preview img { width: 100%; height: 100%; object-fit: cover; }
.item-picture-preview .item-glyph { width: 64px; height: 64px; }
.item-picture-button { cursor: pointer; }
.item-form-fields { display: grid; gap: 12px; }
@media (max-width: 560px) { .item-form-top { grid-template-columns: minmax(0, 1fr); justify-items: center; } .item-form-fields { width: 100%; } }

/* ---------- Satchel: player Hunt tab ---------- */
.satchel-tile { display: grid; gap: 12px; margin-top: 14px; }
.satchel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.satchel-head h3 { margin: 0; color: var(--gold-bright); font-family: var(--serif); font-size: 17px; letter-spacing: .24em; text-transform: uppercase; }
.satchel-head span { color: #a9a396; font-size: 12px; }
.satchel-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.satchel-slot { display: grid; justify-items: center; gap: 6px; padding: 10px 6px 8px; border: 1px solid #c9a22755; border-radius: var(--r-md, 12px); background: var(--onyx-soft); color: #f1e8d2; font: 600 12px/1.2 var(--sans); cursor: pointer; }
.satchel-picture { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, var(--onyx-3), var(--onyx)); color: var(--gold-bright); overflow: hidden; box-shadow: inset 0 0 0 1px #c9a22766; }
.satchel-picture img { width: 100%; height: 100%; object-fit: cover; }
.satchel-picture .item-glyph { width: 34px; height: 34px; }
.satchel-name { text-align: center; overflow-wrap: anywhere; }
.satchel-empty { grid-column: 1 / -1; margin: 0; padding: 12px; border: 1px dashed #c9a22755; border-radius: var(--r-md, 12px); color: #a9a396; text-align: center; }
.satchel-slot.arrive { animation: us-arrive 1s ease-out; }
@keyframes us-arrive { 0% { transform: scale(.4) translateY(-30px); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; box-shadow: 0 0 26px #f3d27a; } 100% { transform: none; } }
@media (hover: hover) and (pointer: fine) { .satchel-slot:hover { border-color: var(--gold-bright); background: var(--onyx-2); } }
.inspect-dialog { width: min(420px, calc(100% - 28px)); padding: 28px 22px 24px; border: 1px solid #c9a227aa; background: radial-gradient(120% 80% at 50% 0%, var(--onyx-3), var(--onyx-soft) 60%); color: #f1e8d2; text-align: center; }
.inspect-dialog .dialog-close { position: absolute; top: 10px; right: 10px; background: transparent; border-color: #ffffff30; color: #f1e8d2; }
.inspect-picture { display: grid; place-items: center; width: 120px; height: 120px; margin: 0 auto 12px; border-radius: 50%; background: var(--onyx); color: var(--gold-bright); overflow: hidden; box-shadow: 0 0 0 2px #c9a227, 0 0 30px #c9a22744; }
.inspect-picture img { width: 100%; height: 100%; object-fit: cover; }
.inspect-picture .item-glyph { width: 70px; height: 70px; }
.inspect-dialog h2 { margin: 0 0 8px; color: var(--gold-bright); font-family: var(--serif); font-size: 22px; letter-spacing: .04em; }
.inspect-text { margin: 0 0 10px; color: #e8dfc8; line-height: 1.6; }
.inspect-engraving { margin: 0; padding: 10px 12px; border: 1px dashed #c9a22788; border-radius: var(--r-sm, 8px); color: var(--gold-bright); font-family: var(--serif); font-style: italic; }
@media (prefers-reduced-motion: reduce) { .satchel-slot.arrive { animation: none; } }
.item-picture-button input[type="file"] { display: none !important; }

/* ---------- Gameplay configuration ---------- */
.gameplay-panel .energy-config { position: relative; display: grid; gap: 12px; }
.gameplay-panel .cfg-tile > h4 { margin: 0; padding: 0 26px; text-align: center; }
.gameplay-panel .ct-box > h5 { padding: 0 26px; text-align: center; }
.energy-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px; padding: 0 26px; }
.energy-head h4 { margin: 0; }
.energy-body { display: grid; gap: 12px; }
.gameplay-switch { display: inline-flex; align-items: center; gap: 9px; margin: 0; font-size: 13px; font-weight: 700; cursor: pointer; }
.gameplay-switch input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); }
.gameplay-switch input:checked + .toggle-switch { background: #5b9b66; }
.gameplay-switch input:checked + .toggle-switch::after { transform: translateX(15px); }
.gameplay-switch input:focus-visible + .toggle-switch { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.energy-config.is-off .energy-body { opacity: .45; pointer-events: none; }
.unit-input { display: flex; align-items: center; justify-content: center; gap: 8px; }
.unit-input input { max-width: 110px; font-size: 18px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.unit-input span { color: var(--muted, #6f685c); font-weight: 700; }
#energyRate { margin: 0; text-align: center; }
.energy-preview-box { background: #fff; }
.energy-preview-box #energyPreview { padding: 12px 14px; border-radius: var(--r-md, 12px); background: var(--onyx); }

/* ---------- Energy bar (player Hunt and preview) ---------- */
.hunt-energy { margin-bottom: 12px; padding: 12px 16px; }
.hunt-energy.hidden { display: none; }
.energy-meter { display: grid; gap: 7px; }
.energy-meter-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.energy-meter-head small { color: #a9a396; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.energy-meter-head strong { color: var(--gold-bright); font-size: 18px; font-variant-numeric: tabular-nums; }
.energy-track { position: relative; height: 12px; overflow: hidden; border: 1px solid #c9a22755; border-radius: 999px; background: var(--onyx-2); }
.energy-fill { position: absolute; inset: 0 auto 0 0; width: var(--level, 100%); border-radius: inherit; background: linear-gradient(90deg, #a07d17, var(--gold-bright)); box-shadow: 0 0 10px #e4c15855; transition: width 1s linear, background .4s; }
.energy-meter.is-low .energy-fill { background: linear-gradient(90deg, #a8571b, #e39a3a); box-shadow: 0 0 10px #e39a3a55; }
.energy-meter.is-low strong { color: #e9a24a; }
.energy-meter.is-critical .energy-fill { background: linear-gradient(90deg, #8f2a22, #d9503f); box-shadow: 0 0 10px #d9503f66; }
.energy-meter.is-critical strong { color: #e0614f; }
.energy-meter.is-paused .energy-meter-head small::after { content: " · paused"; color: #8c867a; letter-spacing: .08em; }
.energy-vignette { position: fixed; inset: 0; z-index: 30; pointer-events: none; opacity: var(--vignette, 0); background: radial-gradient(ellipse at center, transparent 55%, #000000d9 100%); transition: opacity 2s ease; }
.energy-empty { display: grid; justify-items: center; gap: 10px; padding: 26px 12px; text-align: center; }
.energy-empty-mark { display: grid; place-items: center; width: 64px; height: 64px; border: 1px solid #c9a22755; border-radius: 50%; color: #8c7a4a; }
.energy-empty-mark svg { width: 30px; height: 30px; }
.energy-empty p { max-width: 34ch; margin: 0; color: #e8dfc8; font-size: 16px; line-height: 1.55; }
.satchel-tile.is-dulled { opacity: .45; pointer-events: none; filter: grayscale(.6); }
@media (prefers-reduced-motion: reduce) { .energy-fill, .energy-vignette { transition: none; } }

/* Live event - Manage: energy column */
.lb-energy { white-space: nowrap; }
/* Desk boost sits under the bar (14 Oct 2026). */
.lb-energy-line { display: flex; align-items: center; }
.lb-energy .lb-boost { display: block; margin-top: 5px; padding: 3px 10px; font-size: 12px; }
.lb-winner { white-space: nowrap; text-align: right; }
.challenge-prize-count { margin: 8px 0; color: var(--gold, #d7b46a); font-weight: 600; }
.lb-energy-bar { display: inline-block; width: 56px; height: 8px; margin-right: 6px; overflow: hidden; border-radius: 999px; background: #e8e1cf; vertical-align: middle; }
.lb-energy-bar i { display: block; height: 100%; background: #c9a227; }
.lb-energy-bar.is-low i { background: #e39a3a; }
.lb-energy-bar.is-critical i { background: #d9503f; }
.lb-energy-value { display: inline-block; min-width: 36px; font-variant-numeric: tabular-nums; }
.energy-give { position: relative; display: inline-block; margin-left: 4px; }
.energy-give > summary { display: inline-grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--line); border-radius: 50%; background: #fffdf7; font-weight: 800; cursor: pointer; list-style: none; }
.energy-give > summary::-webkit-details-marker { display: none; }
.energy-give[open] > summary { border-color: var(--onyx); background: var(--onyx); color: var(--gold-bright); }
.energy-give-menu { position: absolute; top: calc(100% + 4px); right: 0; z-index: 5; display: flex; gap: 4px; padding: 6px; border: 1px solid var(--line); border-radius: var(--r-sm, 8px); background: #fff; box-shadow: 0 6px 18px #0002; }

/* ---------- Special powers ---------- */
.item-action.is-attack { background: #5c1d17; color: #ffd9cf; }
.item-action.is-defence { background: #1f3d2a; color: #d4f0dc; }
.power-type-row { display: flex; gap: 18px; }
#powerForm fieldset { margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm, 8px); }
#powerForm fieldset.hidden, #powerForm label.hidden { display: none; }
#powerForm legend { padding: 0 6px; font-weight: 700; }
.power-effect-note { margin: 6px 0 0; }
.inspect-power { margin: 0 0 10px; color: var(--gold-bright); font-weight: 700; }
.inspect-actions { display: flex; justify-content: center; margin-top: 14px; }
.target-list { display: grid; gap: 8px; margin-top: 12px; }
.target-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 10px 14px; border: 1px solid #c9a22766; border-radius: var(--r-sm, 8px); background: var(--onyx-2); color: #f4ecd8; font-size: 15px; font-weight: 700; text-align: left; cursor: pointer; }
.target-row:hover:not(:disabled) { border-color: var(--gold-bright); background: var(--onyx-3); }
.target-row:disabled { opacity: .45; cursor: not-allowed; }
.target-row small { color: #a9a396; font-size: 12px; font-weight: 600; }
.stun-card { display: grid; justify-items: center; gap: 8px; padding: 24px 12px; text-align: center; }
.stun-card .item-glyph { width: 64px; height: 64px; color: #e4c158; animation: stun-spin 6s linear infinite; }
.stun-title { margin: 0; color: #f4ecd8; font-family: var(--serif); font-size: 20px; }
.stun-clock { margin: 0; color: var(--gold-bright); font-size: 40px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
@keyframes stun-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .stun-card .item-glyph { animation: none; } }
.hunt-shields { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 12px; }
.hunt-shields.hidden { display: none; }
.shield-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border: 1px solid #5b9b66; border-radius: 999px; background: #10251a; color: #d4f0dc; font-size: 13px; font-variant-numeric: tabular-nums; }
.shield-chip .item-glyph { width: 20px; height: 20px; color: #8fd19e; }
.target-list { max-height: min(60vh, 520px); overflow-y: auto; padding-right: 2px; }

/* ---------- Picture library (Settings) and picker ---------- */
.library-pane { display: grid; align-content: start; gap: 12px; min-height: 0; }
.library-head h3 { margin: 0 0 4px; }
.library-head p { margin: 0; }
.library-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 16px; min-height: 0; }
.library-folders { display: grid; align-content: start; gap: 4px; }
.library-folder { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; padding: 6px 10px; border: 1px solid transparent; border-radius: var(--r-sm, 8px); background: transparent; color: var(--ink); font-weight: 700; text-align: left; cursor: pointer; }
.library-folder small { color: #8a8170; font-weight: 600; }
.library-folder:hover { background: #f6f0df; }
.library-folder.active { border-color: var(--onyx); background: var(--onyx); color: var(--gold-bright); }
.library-folder.active small { color: #c9c2b0; }
.new-folder { display: flex; gap: 6px; margin-top: 8px; }
.new-folder input { min-width: 0; flex: 1; margin: 0; padding: 6px 10px; }
.library-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 12px; }
.library-toolbar strong { font-family: var(--serif); font-size: 18px; }
.library-actions { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.library-actions label.button { cursor: pointer; }
.library-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 12px; }
.library-tile { display: grid; justify-items: center; gap: 5px; padding: 8px; border: 1px solid #e6dcc2; border-radius: var(--r-md, 12px); background: #fbf8f0; color: var(--ink); cursor: pointer; }
.library-tile:hover { border-color: var(--gold); box-shadow: 0 4px 14px #0001; }
.library-thumb { display: grid; place-items: center; width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: var(--r-sm, 8px); background: var(--onyx); }
.library-thumb img { width: 100%; height: 100%; object-fit: contain; }
.library-name { max-width: 100%; overflow: hidden; font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.library-tile small { color: #8a8170; font-size: 11px; }
.library-edit-picture { display: grid; place-items: center; width: 160px; height: 160px; margin: 0 auto; overflow: hidden; border-radius: var(--r-md, 12px); background: var(--onyx); }
.library-edit-picture img { width: 100%; height: 100%; object-fit: contain; }
.library-edit-actions { flex-wrap: wrap; }
.library-edit-actions label.button { cursor: pointer; }
.library-picker { width: min(720px, calc(100vw - 32px)); }
.picker-folders { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; }
.picker-chip { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fffdf7; font-weight: 700; cursor: pointer; }
.picker-chip.active { border-color: var(--onyx); background: var(--onyx); color: var(--gold-bright); }
.picker-grid { max-height: 60vh; overflow-y: auto; }
.picture-buttons { display: flex; justify-content: center; gap: 6px; }
.picture-buttons .button { padding-inline: 12px; }
.item-card-picture img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 700px) { .library-layout { grid-template-columns: 1fr; } .library-folders { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; } }

/* ---------- Power ranges, presets, matching defences ---------- */
.power-range-row { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #e6dcc2; }
.power-range-row small { display: block; color: #8a8170; font-size: 11px; font-weight: 500; }
.blocks-grid { display: grid; grid-template-columns: 70px 80px 80px; align-items: center; justify-items: center; gap: 8px 6px; }
.blocks-grid strong:nth-child(3n+1) { justify-self: start; }
.blocks-grid input { width: 18px; height: 18px; margin: 0; accent-color: #7a5c12; }
.powers-actions { display: inline-flex; align-items: center; gap: 10px; }
.target-row em { color: var(--gold-bright); font-style: normal; font-weight: 800; font-variant-numeric: tabular-nums; }
.power-preset.hidden { display: none; }
.picture-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; width: 120px; }
.picture-buttons .button { min-height: 30px; padding: 4px 6px; font-size: 12px; }
.picture-buttons .button { min-width: 0; width: 100%; }

/* ---------- Story tab ---------- */
.story-tile { display: grid; gap: 4px; padding: 22px 20px; }
.story-waiting { margin: 0; color: #c9c2b0; text-align: center; font-family: var(--serif); font-size: 18px; }
.story-chapter { display: grid; gap: 12px; }
.story-chapter-title { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0; color: var(--gold-bright); font-family: var(--serif); font-size: 15px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.story-new { padding: 2px 8px; border-radius: 999px; background: var(--gold-bright); color: var(--onyx); font-family: system-ui, sans-serif; font-size: 10px; letter-spacing: .1em; }
.story-image { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid #c9a22755; border-radius: var(--r-md, 12px); }
.story-text { color: #efe6cf; font-family: var(--serif); font-size: 17px; line-height: 1.7; white-space: pre-wrap; }
.story-chapter.is-new .story-text { color: #fff8e2; }
.story-divider { margin: 18px 0; }
.story-field-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; }
.story-image-box { display: grid; gap: 6px; align-content: start; }
.story-image-preview img { max-height: 140px; object-fit: cover; }
.story-bookends { position: relative; display: grid; gap: 12px; }
.story-bookends > h4 { margin: 0; padding: 0 26px; text-align: center; }
.story-bookends .ct-box > h5 { text-align: center; }
.story-image-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
@media (max-width: 700px) { .story-field-grid { grid-template-columns: minmax(0, 1fr); } }
.item-preset.hidden { display: none; }
.satchel-slot { position: relative; }
.satchel-badge { position: absolute; top: 6px; right: 6px; padding: 2px 7px; border-radius: 999px; background: var(--gold-bright); color: var(--onyx); font-size: 10px; font-weight: 800; letter-spacing: .04em; animation: badge-pulse 1.6s ease-in-out infinite; }
@keyframes badge-pulse { 50% { box-shadow: 0 0 0 4px #e4c15844; } }
@media (prefers-reduced-motion: reduce) { .satchel-badge { animation: none; } }

/* ---------- Focus mode: slim strip and bottom bar once the hunt has started ---------- */
.live-strip { display: none; }
.more-tab, .more-menu { display: none; }
body.focus-mode .live-strip, body.pre-hunt .live-strip { position: sticky; top: var(--header-h, 0px); z-index: 20; display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0 0 10px; padding: 6px 12px; border: 1px solid #c9a22755; border-radius: 12px; background: var(--onyx); color: #f4ecd8; cursor: pointer; }
body.focus-mode #backToEvents, body.pre-hunt #backToEvents { display: none; }
body.focus-mode:not(.show-banner) #eventDetailContent, body.pre-hunt:not(.show-banner) #eventDetailContent { display: none; }
body.pre-hunt .hunt-top { display: none; }
.strip-back { flex: none; width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--onyx-2); color: var(--gold-bright); font-size: 16px; cursor: pointer; }
.strip-name { flex: 1; min-width: 0; overflow: hidden; font-family: var(--serif); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.strip-status { display: inline-flex; flex: none; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; }
.strip-tokens { display: inline-grid; flex: none; justify-items: center; padding-left: 10px; border-left: 1px solid #c9a22744; color: var(--gold-bright); font-weight: 800; line-height: 1; }
.strip-tokens small { color: #a9a396; font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.strip-chevron { flex: none; color: #a9a396; font-size: 12px; }
body.focus-mode .hunt-top { display: none; }
body.focus-mode > footer, body.focus-mode footer { display: none; }
body.focus-mode #eventTabs { position: fixed; right: 0; bottom: 0; left: 0; z-index: 45; display: flex; gap: 0; margin: 0; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); overflow: visible; border: 0; border-top: 1px solid #c9a22755; border-radius: 16px 16px 0 0; background: var(--onyx); box-shadow: 0 -6px 24px #0004; }
body.focus-mode #eventTabs > .tab { flex: 1 1 0; justify-content: center; min-height: 48px; margin: 0; border: 0; border-radius: 12px; background: transparent; color: #c9c2b0; font-size: 13px; font-weight: 700; }
body.focus-mode #eventTabs > .tab.active { background: var(--onyx-2); color: var(--gold-bright); }
body.focus-mode #eventTabs > [data-event-view="teamView"], body.focus-mode #eventTabs > [data-event-view="updatesView"] { display: none; }
body.focus-mode #eventTabs > #storyTab { order: 1; }
body.focus-mode #eventTabs > [data-event-view="huntView"] { order: 2; flex-grow: 1.4; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; }
body.focus-mode #eventTabs > [data-event-view="leaderboardView"] { order: 3; }
body.focus-mode #eventTabs > .more-tab { position: relative; display: inline-flex; order: 4; }
body.focus-mode #eventTabs > #storyTab.hidden { display: none; }
.more-dot { position: absolute; top: 8px; right: 18%; width: 8px; height: 8px; border-radius: 50%; background: #e0614f; }
.more-dot.hidden { display: none; }
body.focus-mode .more-menu { position: absolute; right: 10px; bottom: calc(100% + 8px); display: grid; gap: 4px; min-width: 190px; padding: 6px; border: 1px solid #c9a22755; border-radius: 12px; background: var(--onyx-soft); box-shadow: 0 10px 30px #0006; }
body.focus-mode .more-menu.hidden { display: none; }
.more-item { position: relative; min-height: 44px; padding: 10px 14px; border: 0; border-radius: 8px; background: transparent; color: #f4ecd8; font-weight: 700; text-align: left; cursor: pointer; }
.more-item:hover, .more-item.active { background: var(--onyx-2); color: var(--gold-bright); }
.more-item .more-dot { top: 50%; right: 12px; transform: translateY(-50%); }
body.focus-mode #eventDetail { padding-bottom: 150px; }

/* ---------- Pockets: Backpack, Abilities, Supplies ---------- */
.hunt-pockets { display: grid; grid-template-columns: repeat(var(--pockets, 3), minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.hunt-pockets.hidden { display: none; }
body.focus-mode .hunt-pockets { position: fixed; right: 8px; bottom: calc(68px + env(safe-area-inset-bottom)); left: 8px; z-index: 44; margin: 0; }
.hunt-pockets.is-dulled { opacity: .5; filter: grayscale(.6); }
.pocket-button { position: relative; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 6px 8px; border: 1px solid #c9a22766; border-radius: 12px; background: #141310ee; color: #f4ecd8; font-size: 13px; font-weight: 700; cursor: pointer; backdrop-filter: blur(6px); }
.pocket-button.is-empty { color: #8c867a; }
.pocket-icon { display: grid; width: 20px; height: 20px; color: var(--gold-bright); }
.pocket-icon svg { width: 100%; height: 100%; }
.pocket-count { min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--onyx-3); color: var(--gold-bright); font-size: 12px; font-variant-numeric: tabular-nums; }
.pocket-dot { position: absolute; top: 5px; right: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--gold-bright); box-shadow: 0 0 0 3px #e4c15844; }
.pocket-button.arrive { animation: badge-pulse 1.2s ease-in-out 3; }
.pocket-dialog { width: min(560px, calc(100vw - 24px)); }
.pocket-dialog h2 { margin: 0 0 4px; color: var(--gold-bright); font-family: var(--serif); letter-spacing: .12em; text-transform: uppercase; }
.pocket-dialog .satchel-slots { margin-top: 12px; }
.supply-badge { top: auto; bottom: 6px; animation: none; }
.item-action.is-supply { background: #3a2c10; color: #f6dfa0; }
.supply-only.hidden, .item-only-field.hidden { display: none; }
@media (max-width: 380px) { .pocket-name { display: none; } }
body.focus-mode .site-header { position: relative; }
body.focus-mode .live-strip, body.pre-hunt .live-strip { top: 6px; }
.supply-badge { top: 6px; bottom: auto; }
.pocket-icon svg { display: block; width: 20px; height: 20px; }
body.focus-mode #eventTabs > .tab { display: inline-flex; align-items: center; }
body.focus-mode #eventTabs > .tab.hidden { display: none; }
body.focus-mode #eventTabs > .tab[data-event-view="teamView"], body.focus-mode #eventTabs > .tab[data-event-view="updatesView"], body.focus-mode #eventTabs > .tab.hidden { display: none; }

/* ---------- Live event - Manage: slim leaderboard + team dialog ---------- */
.slim-board td { vertical-align: middle; }
.slim-board .lb-rank { width: 32px; color: var(--muted); font-weight: 800; font-variant-numeric: tabular-nums; text-align: center; }
.lb-name-button { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.lb-name-button:hover .lb-name { text-decoration: underline; text-underline-offset: 3px; }
.lb-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.lb-chips:empty { display: none; }
.lb-chip { padding: 1px 8px; border-radius: 999px; background: #eee8da; color: var(--muted); font-size: 11px; font-weight: 700; white-space: nowrap; }
.lb-chip.is-bad { background: #f6dcd8; color: var(--red); }
.lb-chip.is-warn { background: #fbe7c8; color: #8a5a12; }
.lb-chip.is-good { background: #dcebdf; color: var(--green); }
.lb-chip.is-gold { background: var(--gold-light); color: #5c4514; }
.slim-board .lb-progress { min-width: 140px; }
.slim-board .lb-progress .team-progress-track { display: block; height: 8px; }
.slim-board .lb-progress small { color: var(--muted); }
.slim-board .button.is-dulled { opacity: .55; }
.slim-board .menu-cell { width: 40px; text-align: right; }

.team-sheet h4 { margin: 18px 0 8px; font-family: var(--serif); font-size: 17px; }
.team-sheet .team-pane > h4:first-child { margin-top: 0; }
.sheet-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.sheet-card { display: grid; gap: 4px; align-content: start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fffdf7; }
.sheet-card > small { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.sheet-energy { width: 100%; margin: 2px 0 0; }
.sheet-switch, .sheet-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fffdf7; margin-bottom: 10px; }
.sheet-switch small { display: block; color: var(--muted); }
.sheet-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.sheet-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fffdf7; }
.sheet-list li > span:first-child { flex: 1 1 auto; min-width: 0; }
.sheet-list li:has(.sheet-thumb) { justify-content: flex-start; }
.sheet-thumb { display: grid; flex: 0 0 40px; place-items: center; width: 40px; height: 40px; overflow: hidden; border-radius: 8px; background: var(--onyx); color: var(--gold-bright); }
.sheet-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sheet-thumb .item-glyph { width: 26px; height: 26px; }
.sheet-edit { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.sheet-edit label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.sheet-edit small { flex-basis: 100%; }
.sheet-table tr.is-current td { background: #fbf3d9; }
@media (max-width: 700px) {
  .settings-dialog .settings-layout { grid-template-rows: auto minmax(0, 1fr); align-content: start; }
  /* The slim leaderboard as cards: name and ⋮, then progress, then energy and the desk boost. */
  .slim-board thead { display: none; }
  .leaderboard-management .data-table.slim-board { min-width: 0; }
  .slim-board, .slim-board tbody { display: block; width: 100%; }
  .slim-board tr { display: grid; grid-template-columns: 28px 1fr auto; gap: 6px 8px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--line); }
  .slim-board td { display: block; padding: 0; border: 0; }
  .slim-board .lb-rank { grid-row: 1; grid-column: 1; }
  .slim-board td:nth-child(2) { grid-row: 1; grid-column: 2; }
  .slim-board .menu-cell { grid-row: 1; grid-column: 3; }
  .slim-board .lb-progress { grid-row: 2; grid-column: 2 / 4; min-width: 0; }
  .slim-board .lb-energy { grid-row: 3; grid-column: 2 / 4; display: flex; align-items: center; gap: 10px; }
  .slim-board .lb-energy .lb-boost { margin-top: 0; }
  .slim-board .lb-winner { grid-row: 4; grid-column: 2 / 4; text-align: left; }
  .slim-board .lb-winner:empty { display: none; }
}

/* Event configuration: category, tile description and duration share one row */
.cfg-row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.duration-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.duration-fields .unit-input { display: flex; align-items: center; gap: 6px; }
.duration-fields input { width: 100%; min-width: 0; }
@media (max-width: 700px) { .cfg-row3 { grid-template-columns: 1fr; } }

/* ---------- Gameplay configuration (redesign) ---------- */
.energy-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; }
.energy-field { display: grid; gap: 6px; margin: 0; font-size: 13px; font-weight: 700; }
.energy-field > span:first-child { color: #6b5418; }
.energy-field .unit-input { display: flex; align-items: center; gap: 6px; }
.energy-field .unit-input input { width: 100%; min-width: 0; }
.energy-field input[readonly] { background: #f3efe5; color: var(--muted); }
.energy-empty input { width: 100%; }
.energy-rate { margin: -4px 0 0; }
.follow-switch { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; }
.follow-switch input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); }
.follow-switch input:checked + .toggle-switch { background: #5b9b66; }
.follow-switch input:checked + .toggle-switch::after { transform: translateX(15px); }
.energy-preview-wide { padding: 12px 14px; border-radius: 12px; background: var(--onyx); }
.energy-preview-wide .energy-fill { transition: width .6s ease, background .4s; }

.gp-pockets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.gp-pocket { position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 420px; background: #fff; }
.gp-pocket-head { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 8px; padding-right: 26px; }
.gp-pocket-head h4 { margin: 0; text-align: center; }
.gp-pocket > .info-tip { position: absolute; top: 14px; right: 10px; }
.gp-pocket-icon { display: grid; place-items: center; width: 28px; height: 28px; color: #6b5418; }
.gp-pocket-icon svg { width: 24px; height: 24px; }
.gp-pocket .items-list { grid-template-columns: 1fr; }
.gp-pocket.is-pocket-off .items-list, .gp-pocket.is-pocket-off .items-head { opacity: .45; }
.item-card.is-off { opacity: .55; }
.item-card-actions .item-switch { margin-left: auto; }
/* Locked event: editing is frozen, but switches, tag links and messages still work. */
#gameplayView.is-event-locked .gp-edit { display: none !important; }
@media (max-width: 900px) {
  .energy-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gp-pockets { grid-template-columns: 1fr; }
  .gp-pocket { min-height: 0; }
}
.energy-fields .unit-input { justify-content: flex-start; }
.energy-fields input { box-sizing: border-box; height: 44px; padding: 8px 12px; font-size: 15px; font-weight: 600; text-align: left; }
.energy-fields .unit-input > span { color: var(--muted); font-weight: 700; }
.energy-field.energy-empty > span, .energy-fields .energy-field > span:first-child { text-align: left; }

/* Hunt: energy bar (80%) with the tokens tile beside it (20%) */
.hunt-energy-row { display: grid; grid-template-columns: 4fr 1fr; gap: 10px; margin-bottom: 12px; }
.hunt-energy-row.hidden { display: none; }
.hunt-energy-row .hunt-energy { margin: 0; }
.energy-tokens { display: grid; place-content: center; justify-items: center; padding: 8px 6px; text-align: center; }
.energy-tokens strong { color: var(--gold-bright); font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums; }
.energy-tokens small { color: #a9a396; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.energy-tokens.hidden { display: none; }

/* Trials can be configured only once the template is locked */
.trial-lock-note { display: none; margin: 8px 0; padding: 14px; border: 1px dashed var(--line); border-radius: 10px; background: #fbf8f0; color: var(--muted); text-align: center; }
.challenge-tile.needs-template-lock .trial-lock-note { display: block; }
.challenge-tile.needs-template-lock #trialTabs, .challenge-tile.needs-template-lock #trialEditorEmpty, .challenge-tile.needs-template-lock #createTrialForm { display: none !important; }

/* Live event - Manage: desk boost tools under the leaderboard */
.desk-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.desk-tools.hidden { display: none; }
.desk-tool { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 40px 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fffdf7; }
.desk-tool > .info-tip { position: absolute; top: 50%; right: 10px; transform: translateY(-50%); }
.desk-tool .team-lock-row { flex: 1; max-width: none; margin: 0; padding: 0; border: 0; background: transparent; }
.boost-all strong { margin-right: auto; }
.boost-all .unit-input input { width: 64px; height: 36px; font-size: 15px; }
@media (max-width: 700px) { .desk-tools { grid-template-columns: 1fr; } }

/* Abilities: shields & immunities, steal pick, spy snapshot, ability values */
.hunt-shields { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.shields-title { flex-basis: 100%; color: #a9a396; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.shield-chip.is-immune { border-color: #7fbf8e66; }
.shield-chip.is-finished { border-color: var(--gold-bright); }
.steal-dialog { max-width: min(420px, calc(100vw - 24px)); }
.steal-clock-wrap { display: flex; justify-content: center; margin: 6px 0 12px; }
.steal-clock { --left: 100%; display: grid; place-items: center; width: 74px; height: 74px; border-radius: 50%; background: conic-gradient(var(--gold-bright) var(--left), #ffffff22 0); color: var(--gold-bright); font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; position: relative; }
.steal-clock::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--onyx-soft); }
.steal-clock { isolation: isolate; }
.steal-clock::before { z-index: -1; }
.steal-list { display: grid; gap: 8px; }
.steal-option { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 12px; border: 1px solid #c9a22755; border-radius: 12px; background: var(--onyx-2); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.steal-option.is-taken { border-color: var(--gold-bright); }
.steal-option small, .snapshot-list small { display: block; color: #a9a396; }
.steal-option .satchel-picture, .snapshot-list .satchel-picture { width: 44px; height: 44px; flex: 0 0 44px; }
.snapshot-list { display: grid; gap: 6px; margin: 0 0 8px; padding: 0; list-style: none; }
.snapshot-list li { display: flex; align-items: center; gap: 10px; }
.ability-values-dialog { width: min(640px, calc(100vw - 24px)); }
.ability-values-table td { vertical-align: middle; }
.ability-values-table .unit-input { justify-content: flex-start; }
.ability-values-table input { width: 70px; height: 34px; font-size: 14px; }
.ability-values-table tr.simple-row td { background: #faf6ec; }
.ability-values-table input:disabled { background: #f3efe5; color: var(--muted); border-color: transparent; }
.shields-title { color: var(--muted); }

/* Super abilities and airdrops */
.update-airdrop .update-kind { color: #b0571a; }
.item-action.is-super { background: linear-gradient(90deg, #6b3a08, #8a5a12); color: #ffe9b8; }
.power-airdrop { display: grid; gap: 12px; padding: 12px 14px; border: 1px dashed var(--gold); border-radius: 10px; }
.power-airdrop > .field-note { margin: 0; }
.airdrops-list { display: grid; gap: 8px; }
.airdrop-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.airdrop-row .satchel-picture { width: 44px; height: 44px; }
.airdrop-text { display: grid; gap: 2px; min-width: 0; }
.airdrop-text small { color: var(--muted); }
.airdrop-text .item-action { justify-self: start; }
.airdrop-status { font-size: 13px; color: var(--muted); }
.airdrop-row.is-open .airdrop-status { color: #b0571a; font-weight: 700; }
.airdrop-row.is-used { opacity: .65; }
.hunt-airdrops { display: grid; gap: 10px; margin-bottom: 12px; }
.airdrop-card { border: 1px solid var(--gold-bright); box-shadow: 0 0 0 1px #e4c15833, 0 8px 24px #c9a22722; animation: airdrop-in .5s ease-out; }
.airdrop-head { display: flex; gap: 12px; align-items: center; }
.airdrop-head .satchel-picture { width: 52px; height: 52px; }
.airdrop-head strong { display: block; font-family: var(--serif); font-size: 20px; color: var(--gold-bright); }
.airdrop-kicker { color: #f0a35a; font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.airdrop-challenge { margin: 12px 0 6px; font-size: 16px; white-space: pre-line; }
.airdrop-power, .airdrop-tag { margin: 0 0 10px; font-size: 13px; opacity: .8; }
.airdrop-claim { display: flex; gap: 8px; }
.airdrop-claim input { flex: 1; min-width: 0; }
.ability-values-table .super-row td { border-top: 1px dashed var(--line); }
@keyframes airdrop-in { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 640px) {
  .airdrop-row { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .airdrop-status { grid-column: 2 / -1; grid-row: 2; }
  .airdrop-action { grid-column: 3; grid-row: 1; }
}
@media (prefers-reduced-motion: reduce) { .airdrop-card { animation: none; } }
.invisible { visibility: hidden; }

/* Trial rewards and the game balance check */
.rewards-strip { margin-top: 16px; }
.rewards-strip h4 { margin: 0 0 10px; }
.rewards-list { display: grid; gap: 8px; }
.reward-row { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 10px; align-items: center; }
.reward-trial { font-weight: 800; font-size: 13px; color: var(--muted-gold); }
.reward-items { display: flex; flex-wrap: wrap; gap: 6px; }
.reward-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; }
.reward-chip img, .reward-chip .item-glyph { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; background: var(--onyx); color: var(--gold-bright); padding: 2px; }
.reward-chip.is-off { opacity: .5; text-decoration: line-through; }
.trial-rewards-line { margin: 4px 0 0; font-size: 13px; color: var(--muted-gold); }
.balance-panel .balance-board { padding: 0; }
.balance-run { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.balance-minutes { display: inline-flex; align-items: center; gap: 8px; color: #f2e3b3; font-size: 13px; font-weight: 700; }
.balance-minutes .unit-input input { width: 72px; }
.alert-line.level-note { color: #b9c2cc; }
.alert-line.level-ok { color: #7fcf8e; }
.reward-note-list { margin: 8px 0 0; padding-left: 18px; }

/* Mid-event challenges (12 Oct 2026) */
.challenge-name-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 10px; }
.challenge-name-row label { display: grid; gap: 4px; flex: 1 1 220px; font-size: 13px; }
.prize-fieldset { display: grid; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 12px; }
.prize-fieldset legend { padding: 0 6px; font-weight: 600; }
.prize-picker { display: grid; gap: 10px; max-height: 260px; overflow-y: auto; }
.prize-group { display: grid; gap: 4px; }
.prize-group > small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.danger-text { color: #b3261e; font-weight: 600; }
.challenge-prizes { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.challenge-prizes li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; align-items: center; }
.challenge-prizes .satchel-picture { width: 36px; height: 36px; }
.challenge-prizes small { display: block; opacity: .8; font-size: 12px; }
.update-challenge .update-kind { color: #b0571a; }

/* Storyboard tile (12 Oct 2026) */
.board-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.board-grid .board-box:not(.board-ending) { grid-column: 1 / -1; }
#storyboardView.is-event-locked .board-chapters [data-board-edit] { display: none; }
.board-box input, .board-box textarea { width: 100%; }
.board-chapter { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.board-chapter > .text-button, .board-chapter > p { grid-column: 1 / -1; justify-self: start; }
.board-page { display: grid; gap: 6px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; background: #fff; }
.board-page h6 { margin: 0; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.board-page img { width: 100%; max-height: 160px; object-fit: cover; border-radius: 8px; }
.board-page p { margin: 0; white-space: pre-wrap; font-size: 14px; }
@media (max-width: 720px) { .board-grid, .board-chapter { grid-template-columns: minmax(0, 1fr); } }

/* Story pages in the Hunt tab */
.story-page { display: grid; gap: 14px; }
.story-page-kicker { margin: 0; color: var(--gold, #c9a227); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.story-page-image { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; }
.story-page-text { white-space: pre-wrap; font-family: var(--serif); font-size: 18px; line-height: 1.55; }
.story-page-actions { display: flex; justify-content: space-between; gap: 10px; }
.story-page-actions [data-page="next"]:only-child { margin-left: auto; }
.story-back { margin-top: 10px; }

/* Mid-event challenge countdown */
.countdown-dialog { border: 1px solid var(--gold-bright, #e4c158); border-radius: 18px; background: var(--onyx); color: #f3ead6; padding: 28px 32px; text-align: center; width: min(360px, calc(100vw - 32px)); }
.countdown-dialog::backdrop { background: rgba(0, 0, 0, .72); }
.countdown-text { margin: 0 0 6px; font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #f0a35a; }
.countdown-number { margin: 0; font-family: var(--serif); font-size: 72px; line-height: 1; color: var(--gold-bright, #e4c158); font-variant-numeric: tabular-nums; }

/* Winner messages */
.ending-text { white-space: pre-wrap; }
.countdown-after { margin: 10px 0 0; }
.countdown-after:empty { display: none; }

/* Test copies (12 Oct 2026) */
.test-banner { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin: 0 0 12px; padding: 10px 14px; border: 2px dashed #d9761e; border-radius: 12px; background: #fff3e6; color: #6b3608; }
.test-banner.hidden { display: none; }
.test-banner strong { letter-spacing: .08em; }
.test-banner-text { font-size: 14px; }
.test-banner-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.test-banner .button { border-color: #d9761e; background: #fff; color: #6b3608; }
.test-banner .test-purge { background: #8e2b12; border-color: #8e2b12; color: #fff; }
.test-chip { display: inline-block; margin-bottom: 6px; padding: 2px 8px; border-radius: 999px; background: #d9761e; color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.test-copy-tile .test-copy-row { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
.test-copy-tile .test-copy-row > span:first-child { display: grid; gap: 2px; }
.test-copy-tile small { color: var(--muted); }
.test-copy-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.category-test { border-style: dashed; }
.test-banner select { width: auto; min-width: 110px; padding-block: 6px; }
.craft-home-stack { display: grid; gap: 18px; }
.category-tile.is-soon { cursor: default; opacity: .55; border-style: dashed; }
.category-tile.is-soon:hover { transform: none; border-color: var(--line); box-shadow: none; }
.category-soon { font-size: 12px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.qv-test-line { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.qv-test-line .test-chip { margin: 0; }
.answer-lock { margin: 6px 0 0; color: #b0571a; font-weight: 600; font-size: 14px; }
.answer-lock:empty { display: none; }
.hunt-answer.is-waiting { opacity: .55; }
.wrong-message-label { margin-top: 10px; }
.board-wrong input { width: 100%; }

/* ---------- Item, booster and ability dialogs (13 Oct 2026) ---------- */
.item-dialog { width: min(680px, calc(100% - 28px)); }
.item-dialog .dialog-caps-title { margin-right: 36px; margin-left: 36px; text-align: center; text-transform: uppercase; letter-spacing: .12em; }
.item-dialog .item-form-top { grid-template-columns: 168px minmax(0, 1fr); gap: 18px; }
.item-dialog .item-picture-preview { width: 168px; height: 168px; }
.item-dialog .item-picture-preview .item-glyph { width: 80px; height: 80px; }
.field { display: grid; min-width: 0; }
.field-head { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.field-head label { margin: 0; }
.field-info, .power-effect-line .info-tip { position: relative; top: auto; right: auto; display: inline-block; z-index: 6; }
.field-info .info-btn, .power-effect-line .info-btn { width: 17px; height: 17px; }
.field-info .info-btn::before, .power-effect-line .info-btn::before { width: 13px; height: 13px; }
.field-head .info-pop, .power-effect-line .info-pop { width: min(300px, 80vw); }
.power-effect-line { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; color: var(--muted); font-size: 12px; font-weight: 500; }
.power-effect-line:empty, .power-effect-line > span:empty:only-child { display: none; }
.limit-row { display: flex; gap: 8px; }
.limit-row select { flex: 1 1 auto; min-width: 0; }
.limit-row input { flex: 0 0 84px; width: 84px; }
.item-dialog .form-stack .checkbox-row { margin: 0; }
@media (max-width: 560px) { .item-dialog .item-form-top { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Save / error pop-up (Craft Board, 13 Oct 2026) ---------- */
.message-pop { width: min(380px, calc(100% - 32px)); padding: 26px 24px 18px; border: 1px solid #d9c785; border-radius: 16px; background: #fffdf6; color: #3b3220; text-align: center; box-shadow: 0 24px 60px #0007; cursor: pointer; }
.message-pop::backdrop { background: #16140f8c; backdrop-filter: blur(6px) brightness(.85); -webkit-backdrop-filter: blur(6px) brightness(.85); }
.message-pop p { margin: 10px 0 12px; font-size: 15px; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.message-pop small { color: var(--muted); font-size: 11px; }
.message-pop-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #f6ecc9; color: #8a6a12; }
.message-pop-icon::before { content: "✓"; font-size: 22px; font-weight: 800; }
.message-pop.error { border-color: #e2bcb9; }
.message-pop.error .message-pop-icon { background: #fde4e1; color: var(--red); }
.message-pop.error .message-pop-icon::before { content: "!"; }
.message-pop.error p { color: var(--red); }

/* ---------- Needs item, tag challenges (13 Oct 2026) ---------- */
.needs-item-note { margin: 10px 0 0; padding: 8px 12px; border: 1px dashed #c9a22799; border-radius: 9px; background: #c9a2270f; color: inherit; font-size: 13px; font-weight: 600; }
.needs-items { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; }
.needs-label { margin-top: 12px; }
.needs-note { margin-top: 8px; }
.tag-for-chips { display: grid; gap: 6px; }
.tag-for-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.tag-for-row > span { min-width: 52px; }
.tag-chip { display: inline-flex; margin: 0; cursor: pointer; }
.tag-chip input { position: absolute; opacity: 0; pointer-events: none; }
.tag-chip span { padding: 4px 10px; border: 1px solid #d9cfb4; border-radius: 999px; background: #fff; color: #514b3f; font-weight: 700; font-size: 12px; }
.tag-chip input:checked + span { border-color: var(--gold-brand, #c9a227); background: #f6ecc9; color: #6b5418; }
.tag-chip input:focus-visible + span { outline: 2px solid var(--gold-brand, #c9a227); outline-offset: 2px; }
.tag-for-summary { margin: 4px 0 0; }
.item-card-note { margin: 0; color: var(--red); font-size: 12px; }
.field-head .field-label { color: #514b3f; font-size: 12px; font-weight: 700; }

/* ---------- Mid-event challenge prizes (13 Oct 2026) ---------- */
.prize-list { display: grid; gap: 10px; }
.prize-row { position: relative; display: grid; grid-template-columns: 72px minmax(0, 1fr) 28px; gap: 12px; align-items: start; padding: 10px; border: 1px solid #e3d9bf; border-radius: 12px; background: #fff; }
.prize-pic { display: grid; justify-items: center; gap: 4px; }
.prize-pic .item-picture-preview { width: 64px; height: 64px; }
.prize-pic .item-glyph { width: 34px; height: 34px; }
.prize-fields { display: grid; gap: 6px; }
.prize-crux { color: var(--muted); font-size: 12px; }
.prize-restores { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 12px; }
.prize-restores input { width: 80px; margin: 0 !important; }
.prize-remove { width: 26px; height: 26px; border: 1px solid #d9cfb4; border-radius: 50%; background: #fff; color: #6b5418; cursor: pointer; }
.prize-add { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.challenge-window.is-dulled { opacity: .5; }
.item-card-from { color: var(--muted); font-size: 12px; }

/* ---------- Game Tree (13 Oct 2026) ---------- */
.game-tree-tile { position: relative; display: grid; gap: 10px; }
.game-tree-scroll { overflow-x: auto; padding-bottom: 6px; }
.tree-canvas { position: relative; margin: 0 auto; }
.tree-cols { position: absolute; top: 0; left: 0; right: 0; height: 20px; }
.tree-col { position: absolute; transform: translateX(-50%); color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.tree-lines { position: absolute; top: 0; left: 0; overflow: visible; }
.tree-lines path { fill: none; stroke: #c9b98d; stroke-width: 2; }
.tree-lines path.tree-hop { stroke: #8a6a12; stroke-dasharray: 5 4; stroke-width: 1.6; }
.tree-nodes { position: absolute; left: 0; right: 0; bottom: 0; }
.tree-node { position: absolute; display: grid; justify-items: center; gap: 3px; padding: 0; border: 0; background: none; transform: translate(-50%, -17px); cursor: pointer; font: inherit; }
.tree-dot { position: relative; display: grid; place-items: center; width: 34px; height: 34px; border: 2px solid #c9a227; border-radius: 50%; background: #fffdf6; color: #3b3220; font-size: 12px; font-weight: 800; }
.tree-node.is-empty .tree-dot { border-style: dashed; border-color: #b9ae92; color: #9a917d; background: transparent; }
.tree-node.is-warning .tree-dot { border-color: #e08a1e; box-shadow: 0 0 0 3px #e08a1e33; }
.tree-node.is-error .tree-dot { border-color: var(--red); box-shadow: 0 0 0 3px #c0392b33; }
.tree-node.is-open .tree-dot { background: #f6ecc9; }
.tree-lock { position: absolute; top: -9px; right: -11px; font-size: 12px; font-style: normal; }
.tree-badges { display: flex; gap: 4px; padding: 1px 6px; border-radius: 999px; background: #fff; box-shadow: 0 0 0 1px #e3d9bf; font-size: 10.5px; font-weight: 700; white-space: nowrap; }
.game-tree-detail { padding: 12px 14px; border: 1px solid #e3d9bf; border-radius: 12px; background: #fff; display: grid; gap: 8px; }
.tree-detail-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tree-detail-head small { color: var(--muted); }
.tree-detail-head .text-button { margin-left: auto; }
.tree-detail-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px; font-size: 13px; }
.tree-detail-row strong { color: #514b3f; font-size: 12px; }
.tree-detail-row small { color: var(--muted); }
.tree-detail-row .level-error { color: var(--red); }
.tree-detail-row .level-warning { color: #b8650f; }
.game-tree-challenges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; }
.tree-strip-label { color: var(--muted); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.tree-chip { padding: 3px 9px; border: 1px solid #e3d9bf; border-radius: 999px; background: #fff; }
.tree-checked { flex-basis: 100%; color: var(--muted); font-size: 11px; }
@media (max-width: 560px) { .tree-detail-row { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

/* 4:3 pictures (13 Oct 2026): story and challenge pictures fill a 4:3 frame;
   a tap on the challenge picture shows it whole, full screen. */
.challenge-frame { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; margin: 0 0 18px; padding: 0; border: 1px solid #c9a22755; border-radius: 8px; overflow: hidden; background: var(--onyx); cursor: zoom-in; }
.zoom-hint { position: absolute; right: 8px; bottom: 8px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #000a; color: #f3e7c4; font-size: 16px; line-height: 1; }
.image-viewer { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #000; }
.image-viewer::backdrop { background: #000; }
.image-viewer-scroll { width: 100%; height: 100%; overflow: auto; display: grid; place-items: center; touch-action: pinch-zoom pan-x pan-y; }
.image-viewer-scroll img { max-width: 100%; max-height: 100dvh; object-fit: contain; }
.image-viewer-close { position: fixed; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid #c9a22788; background: #000c; color: #f3e7c4; font-size: 18px; }
.image-hint { margin: 2px 0 0; font-size: 12px; color: var(--muted, #8a8170); }
.story-image-preview img { aspect-ratio: 4 / 3; }

/* Magnifier scene (13 Oct 2026): a lens over the challenge picture shows the hidden picture, enlarged. */
.challenge-scene { position: relative; }
.challenge-scene .challenge-frame { margin-bottom: 8px; }
.challenge-scene.is-lens .challenge-frame { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.challenge-scene .challenge-image { -webkit-user-drag: none; user-select: none; }
.challenge-scene.is-lens .zoom-hint { display: none; }
.lens-wrap { position: absolute; width: 0; height: 0; display: none; pointer-events: none; z-index: 2; }
.challenge-scene.is-lens .lens-wrap { display: block; }
.lens { position: absolute; left: -66px; top: -66px; width: 132px; height: 132px; border-radius: 50%; overflow: hidden; border: 5px solid #c9a227; background: #e9dcc0; box-shadow: 0 0 0 2px #6b5112, 0 10px 24px #000b, inset 0 0 18px #0006; }
.lens::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 30% 25%, #ffffff50, transparent 42%); }
.lens-view { position: absolute; background-size: cover; background-position: center; background-repeat: no-repeat; }
.lens-handle { position: absolute; left: 44px; top: 44px; width: 14px; height: 56px; border-radius: 7px; background: linear-gradient(90deg, #5a3a1c, #8a5a2c); transform: rotate(-45deg); transform-origin: top center; box-shadow: 0 4px 10px #0008; }
.lens-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 16px; }
.lens-tip { font-size: 13px; color: #c9a227; }
.reveal-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.reveal-item { display: grid; gap: 6px; font-size: 13px; }
@media (max-width: 640px) { .reveal-grid { grid-template-columns: 1fr; } }

/* Unlock scene (13 Oct 2026). Drawn looks animate in 2.4 s: the tool comes in
   (0-0.8 s), the lock gives (0.8-1.4 s), then it opens (1.3-2.3 s). */
.unlock-frame { position: relative; width: 100%; aspect-ratio: 4 / 3; margin: 0 0 10px; border: 1px solid #c9a22755; border-radius: 8px; overflow: hidden; background: var(--onyx); }
.unlock-frame .unlock-art, .unlock-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.unlock-frame img.unlock-open { position: absolute; inset: 0; animation: ul-fade .9s ease-out both; }
.unlock-art g { transform-box: fill-box; }
.ul-tool, .ul-glow, .ul-cracks { opacity: 0; }
.ul-cutter .ul-jaw-a, .ul-cutter .ul-jaw-b { stroke: #8a8270; stroke-width: 5; stroke-linecap: round; transform-origin: 0 0; }
.ul-lid { transform-origin: 0% 100%; }
.ul-arm-left { transform-origin: 0% 100%; } .ul-arm-right { transform-origin: 100% 100%; }

/* Key: slides in, turns; the shackle lifts and the lock drops. */
.is-opening-opens .ul-tool-key { opacity: 1; }
.is-opening-opens .ul-key { animation: ul-key-in .55s ease-out both, ul-key-turn .3s .6s ease-in-out both, ul-fade-out .3s 1.3s both; transform-origin: center; }
.is-opening-opens .ul-shackle, .is-opening-breaks .ul-shackle { animation: ul-shackle .25s .85s ease-out both; }
.is-opening-opens .ul-lock { animation: ul-drop .55s 1.05s ease-in both; transform-origin: center; }
/* Cutter or crowbar: bites, the frame shakes, the lock flies off, cracks show. */
.is-opening-breaks .ul-tool-cutter { opacity: 1; }
.is-opening-breaks .ul-cutter { animation: ul-cutter-in .45s ease-out both, ul-fade-out .3s 1.3s both; }
.is-opening-breaks .ul-jaw-a { animation: ul-jaw-a .2s .5s ease-in both; } .is-opening-breaks .ul-jaw-b { animation: ul-jaw-b .2s .5s ease-in both; }
.is-opening-breaks .unlock-art { animation: ul-shake .45s .65s ease-in-out both; }
.is-opening-breaks .ul-lock { animation: ul-fly .6s .75s ease-out both; transform-origin: center; }
.is-opening-breaks .ul-cracks { animation: ul-fade .3s .7s both; }
/* Crate: the lid lifts and the glow rises. */
.look-crate.is-opening-opens .ul-lid { animation: ul-lid .9s 1.35s cubic-bezier(.3,1.4,.5,1) both; }
.look-crate.is-opening-breaks .ul-lid { animation: ul-lid-pop .8s 1.05s cubic-bezier(.3,1.6,.5,1) both; }
.look-crate[class*="is-opening"] .ul-glow { animation: ul-fade .9s 1.6s both; }
.look-crate.is-open .ul-lid { transform: translateY(-18px) rotate(-24deg); }
.look-crate.is-open .ul-glow { opacity: 1; }
/* Padlocked hands: the chain falls, the cuffs slip off, the hands part. */
.look-hands[class*="is-opening"] .ul-chain { animation: ul-drop .6s 1.2s ease-in both; }
.look-hands.is-opening-breaks .ul-link-m { animation: ul-snap .3s .7s ease-out both; }
.look-hands[class*="is-opening"] .ul-cuff { animation: ul-cuff .6s 1.5s ease-in both; }
.look-hands[class*="is-opening"] .ul-arm-left { animation: ul-arm-left .8s 1.5s cubic-bezier(.3,1.3,.5,1) both; }
.look-hands[class*="is-opening"] .ul-arm-right { animation: ul-arm-right .8s 1.5s cubic-bezier(.3,1.3,.5,1) both; }
.look-hands.is-open .ul-chain, .look-hands.is-open .ul-cuff { opacity: 0; }
.look-hands.is-open .ul-arm-left { transform: translate(-46px, 12px) rotate(-8deg); }
.look-hands.is-open .ul-arm-right { transform: translate(46px, 12px) rotate(8deg); }
.unlock-frame.is-open .ul-lock { opacity: 0; }
/* Own pictures: a shake, then the open picture fades in. */
.look-own[class*="is-opening"] img { animation: ul-shake .5s ease-in-out both; }
/* A wrong item: a short shake. */
.unlock-frame.is-refused .unlock-art, .unlock-frame.is-refused img { animation: ul-shake .4s ease-in-out; }

@keyframes ul-key-in { from { opacity: 0; transform: translateX(46px); } to { opacity: 1; transform: translateX(0); } }
@keyframes ul-key-turn { to { transform: scaleY(.25); } }
@keyframes ul-cutter-in { from { opacity: 0; transform: translateX(50px); } to { opacity: 1; transform: translateX(0); } }
@keyframes ul-jaw-a { to { transform: rotate(16deg); } } @keyframes ul-jaw-b { to { transform: rotate(-16deg); } }
@keyframes ul-shackle { to { transform: translateY(-9px); } }
@keyframes ul-drop { to { transform: translateY(120px) rotate(28deg); opacity: 0; } }
@keyframes ul-fly { to { transform: translate(90px, -70px) rotate(80deg); opacity: 0; } }
@keyframes ul-snap { to { transform: translateY(40px) rotate(70deg); opacity: 0; } }
@keyframes ul-lid { to { transform: translateY(-18px) rotate(-24deg); } }
@keyframes ul-lid-pop { 0% { transform: none; } 60% { transform: translateY(-34px) rotate(-30deg); } 100% { transform: translateY(-18px) rotate(-24deg); } }
@keyframes ul-cuff { to { transform: translateY(70px); opacity: 0; } }
@keyframes ul-arm-left { to { transform: translate(-46px, 12px) rotate(-8deg); } }
@keyframes ul-arm-right { to { transform: translate(46px, 12px) rotate(8deg); } }
@keyframes ul-shake { 0%, 100% { transform: none; } 20% { transform: translateX(-7px) rotate(-1deg); } 40% { transform: translateX(6px) rotate(1deg); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@keyframes ul-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ul-fade-out { to { opacity: 0; } }

.unlock-use { margin: 0 0 14px; }
.unlock-ask { margin: 0 0 8px; font-size: 14px; color: #c9a227; }
.unlock-items { display: flex; flex-wrap: wrap; gap: 8px; }
.unlock-item { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 12px 6px 6px; border: 1px solid #c9a22766; border-radius: 10px; background: var(--onyx-soft); color: #f1e8d2; font: inherit; font-size: 14px; cursor: pointer; }
.unlock-item:hover:not(:disabled) { border-color: #f3d27a; }
.unlock-item:disabled { opacity: .5; }
.unlock-item .satchel-picture { width: 32px; height: 32px; }
.unlock-reply { min-height: 20px; margin: 8px 0 0; font-size: 14px; color: #e07a5f; }
.unlock-inside { margin: 0 0 16px; padding: 12px 14px; border: 1px solid #c9a22755; border-radius: 8px; background: #c9a2270f; color: #f1e8d2; white-space: pre-wrap; }
.unlock-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.unlock-grid textarea, .unlock-grid input:not([type="checkbox"]):not([type="file"]) { width: 100%; }
@media (max-width: 640px) { .unlock-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .unlock-frame * { animation-duration: .01ms !important; animation-delay: 0s !important; } }

/* An empty table keeps its column names, with one quiet row (14 Oct 2026). */
.data-table tr.empty-row td { padding: 18px 12px; text-align: center; color: var(--muted, #7a7262); font-style: italic; }

/* Desk boost line under the player's HP bar (14 Oct 2026). */
.desk-line { margin: 6px 0 0; font-size: 12px; line-height: 1.35; color: #b9b2a2; }
.desk-line.is-open { color: #e9c97c; font-weight: 600; }
.desk-line.is-closed { color: #d9503f; }

/* ---------- Rulebook (14 Oct 2026) ---------- */
.rulebook-steps { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.rulebook-steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid #efe6cf; }
.rulebook-steps li:first-child { border-top: 0; }
.rb-step { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--onyx-2); color: #e8c766; font-weight: 700; font-size: 13px; }
.rb-text { display: grid; gap: 2px; min-width: 0; }
.rb-text small { color: var(--muted, #7a7262); font-size: 12.5px; line-height: 1.4; }
.rb-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.rb-email { margin-top: 4px; font-size: 13px; }
@media (max-width: 640px) { .rulebook-steps li { grid-template-columns: 28px minmax(0, 1fr); } .rulebook-steps li > :last-child { grid-column: 2; justify-self: start; } }
.rb-template-note { margin: 10px 0; }
.rb-markers h4 { margin: 18px 0 4px; }
.rb-marker-table td { padding: 5px 8px; vertical-align: top; font-size: 13px; }
.rb-marker-table td:first-child { white-space: nowrap; }
.update-card.is-pinned { border: 1px solid #c9a227; box-shadow: 0 0 0 1px #c9a22733 inset; }
.update-card [data-open-rulebook] { margin-top: 10px; }

/* ---------- Before the hunt and the player guide (14 Oct 2026) ---------- */
.guide { display: grid; gap: 12px; }
.guide.is-pc { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
.guide-demo { min-width: 0; }
.demo-label { margin: 0 0 6px; color: #e8c766; font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
/* The demo: the Hunt screen at real size (390x780 or 1280x760), scaled to fit. */
.demo-frame { position: relative; width: 100%; overflow: hidden; border-radius: 14px; box-shadow: 0 0 0 1px #3a352a; }
.demo-screen { position: absolute; top: 0; left: 0; overflow: hidden; transform-origin: top left; background: var(--onyx); color: #f4ecd8; text-align: left; --inv: 1; }
.demo-main { padding: 16px 16px 0; }
.demo-screen.is-pc .demo-main { max-width: 1180px; margin: 0 auto; padding: 16px 24px 0; }
.demo-screen .live-strip { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0 0 10px; padding: 6px 12px; border: 1px solid #c9a22755; border-radius: 12px; background: var(--onyx); color: #f4ecd8; }
.demo-screen .strip-back { display: grid; place-items: center; }
.demo-screen .hunt-tile { margin: 0; }
.demo-answer { display: flex; gap: 8px; margin-top: 14px; }
.demo-answer span { flex: 1; padding: 12px 14px; border-radius: 10px; background: #fffaf0; color: #9a9078; font-size: 15px; }
.demo-answer b { padding: 12px 20px; border-radius: 10px; background: #c9a227; color: var(--onyx-2); }
.demo-hint { display: inline-block; margin-top: 10px; color: #c9c2b0; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
/* Pockets and tabs sit where they sit in play: pinned to the bottom. */
.demo-screen .demo-pockets { position: absolute; right: 8px; bottom: 68px; left: 8px; z-index: 8; margin: 0; }
.demo-tabs { position: absolute; right: 0; bottom: 0; left: 0; z-index: 9; display: flex; padding: 6px 8px; border-top: 1px solid #c9a22755; border-radius: 16px 16px 0 0; background: var(--onyx); box-shadow: 0 -6px 24px #0004; }
.demo-tabs .tab { position: relative; display: inline-flex; flex: 1 1 0; align-items: center; justify-content: center; min-height: 48px; border-radius: 12px; color: #c9c2b0; font-size: 13px; font-weight: 700; }
.demo-tabs .tab.active { background: var(--onyx-2); color: var(--gold-bright); }
.demo-tabs .tab.is-hunt { flex-grow: 1.4; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; }
/* Steps: the numbered parts; the one being explained glows and grows a little. */
.demo-screen [data-g] { position: relative; cursor: pointer; transition: opacity .2s, filter .2s, box-shadow .2s, transform .2s; }
.demo-screen.has-focus [data-g]:not(.is-focus) { opacity: .3; filter: saturate(.4); }
.demo-screen.has-focus .hunt-energy:not(.is-focus), .demo-screen.has-focus .demo-tabs:not(.is-focus) { opacity: 1; filter: none; }
.demo-screen.has-focus .hunt-energy:not(.is-focus) > :not(.is-focus), .demo-screen.has-focus .demo-tabs:not(.is-focus) > :not(.is-focus) { opacity: .3; filter: saturate(.4); }
.demo-screen [data-g].is-focus { z-index: 6; opacity: 1; filter: none; box-shadow: 0 0 0 3px #e8c766, 0 0 26px #e8c766aa; transform: scale(1.04); }
.demo-screen .demo-tabs.is-focus, .demo-screen .demo-pockets .is-focus { transform: scale(1.02); }
.demo-screen .desk-line.is-focus { border-radius: 8px; }
/* The numbers stay full size whatever the scale. */
.guide-num { position: absolute; top: -7px; left: -7px; z-index: 7; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: #e8c766; color: var(--onyx-2); font: 700 11px/1 system-ui, sans-serif; box-shadow: 0 1px 4px #0008; transform: scale(var(--inv, 1)); transform-origin: center; }
.demo-tabs > .guide-num { top: -10px; right: 14px; left: auto; }
.demo-tabs .tab > .guide-num { top: 4px; left: 8px; }
.demo-screen .desk-line > .guide-num { top: -2px; left: -22px; }
.demo-hint { display: block; text-align: center; }
.demo-screen .live-strip > .guide-num { top: -10px; }
.guide-card { padding: 14px 16px; border-radius: 14px; background: #fffaf0; color: var(--onyx-2); }
.guide-card h4 { margin: 2px 0 6px; font-family: var(--serif, Georgia, serif); font-size: 18px; }
.guide-card p { margin: 0 0 12px; font-size: 14px; line-height: 1.5; }
.guide-count { color: #9a7425; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; }
.guide-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.guide-dots { display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; }
.guide-dots i { width: 6px; height: 6px; border-radius: 50%; background: #d9cfb4; }
.guide-dots i.is-on { background: #c9a227; }
.hunt-energy-row { position: relative; }
.guide-help { position: absolute; top: -8px; right: -6px; z-index: 3; width: 24px; height: 24px; border-radius: 50%; border: 1px solid #c9a227; background: var(--onyx-soft); color: #e8c766; font: 700 13px/1 system-ui, sans-serif; cursor: pointer; }
.guide-dialog { width: min(1100px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 18px 14px; border: 0; border-radius: 18px; background: var(--onyx); color: #ece6d6; }
.guide-dialog::backdrop { background: #000a; }
.guide-dialog h2 { margin: 0 0 12px; font-family: var(--serif, Georgia, serif); color: #e8c766; font-size: 20px; }
.guide-dialog .dialog-close { color: #ece6d6; }
/* In the dialog (phone) the explanation stays in view while the demo scrolls. */
.guide-dialog { overflow-y: auto; }
.guide-dialog .guide.is-phone .guide-card { position: sticky; bottom: -18px; z-index: 5; box-shadow: 0 -8px 24px #000c; }
.guide.is-pc .guide-card { position: sticky; top: 0; }
.guide-nav .button { white-space: nowrap; }
/* Before the start (15 Oct 2026): "Event starts in" and the Demo. */
.before-clock { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 2px 0 16px; color: #ece6d6; font-size: 15px; }
.before-clock-label { color: #c9c2b0; font-weight: 700; }
.before-clock strong { color: var(--gold-bright); font-size: 22px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.before-clock.is-soon .bulb { animation: soon-pulse 1.2s ease-in-out infinite; }
@keyframes soon-pulse { 50% { box-shadow: 0 0 0 6px #4caf5044; } }
@media (prefers-reduced-motion: reduce) { .before-clock.is-soon * { animation: none; } }
.demo-screen .demo-tabs, .demo-screen .demo-tabs[data-g] { position: absolute; z-index: 9; }
/* Offline network check: Props and Tags checklists (16 Oct 2026). */
.checklist .checklist-head { margin: 10px 0 4px; font-size: 13px; letter-spacing: .02em; }
.checklist .checklist-head:first-child { margin-top: 0; }
.checklist .check-props { display: block; margin-top: 2px; color: var(--muted, #6f6a5e); font-size: 12px; line-height: 1.4; white-space: pre-line; }

/* SANCTUM (16 Oct 2026): the module ribbon, module tiles and phase placeholders. */
.sanctum-ribbon { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 18px; margin-bottom: 18px; padding: 10px 16px 10px 20px; border: 1px solid var(--gold-brand); border-radius: 12px; background: var(--onyx); color: var(--parchment); }
.sanctum-ribbon.hidden { display: none; }
.sanctum-ribbon > p { margin: 0; font-size: 15px; }
.sanctum-ribbon strong { color: var(--gold-bright); font-family: var(--serif); font-size: 18px; font-weight: 600; }
.ribbon-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: #8f8778; font-size: 12.5px; }
.ribbon-crumb { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px; border: 0; background: none; color: #d9d2c1; font: inherit; font-weight: 700; letter-spacing: .06em; cursor: pointer; }
.ribbon-crumb:hover { color: var(--gold-bright); }
.module-number { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--gold-brand); color: var(--onyx); font-size: 12px; font-weight: 800; letter-spacing: 0; }
.module-tile .module-number { position: absolute; top: 14px; left: 14px; }
.module-grid .category-title { padding-right: 0; font-size: 22px; }
.soon-panel h3 { margin: 0 0 6px; color: var(--gold-bright); font-family: var(--serif); }
.soon-panel p { margin: 0; color: #d9d2c1; }
.org-tabs.no-subs .org-subs { min-height: 0; margin-top: 0; }

/* Team site phase 2: view-only areas of a module. */
[data-ro="1"] :is(input, select, textarea, .toggle-switch, button:not(.info-btn), .cover-frame) { opacity: .55; cursor: not-allowed; }
[data-ro="1"] [data-ro-allow="1"] :is(input, select, textarea, .toggle-switch, button, .cover-frame),
[data-ro="1"][data-ro-allow="1"] :is(input, select, textarea, .toggle-switch, button, .cover-frame) { opacity: 1; cursor: auto; }
/* (5 Nov 2026) No outline on editable parts of view-only tabs: greying the rest is enough. */
.sphinx-locked[data-ro="1"] { position: relative; }
section.sphinx-locked[data-ro="1"]::after { content: "Sphinx only"; position: absolute; top: 10px; right: 12px; padding: 2px 8px; border-radius: 10px; background: var(--onyx); color: var(--gold-bright); font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.ro-note { margin: 0 0 12px; padding: 8px 14px; border: 1px dashed var(--gold-brand); border-radius: 10px; background: #fffaf0; color: #6b5a2b; font-size: 13px; font-weight: 600; }
.module-hidden { display: none !important; }
.complete-tile { margin-top: 16px; }

/* Team site phase 3: event forms. */
.form-card { display: grid; align-content: start; gap: 6px; min-height: 200px; padding: 18px 18px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--ink); text-align: left; cursor: pointer; box-shadow: 0 8px 22px #33270c0d; transition: transform .15s, border-color .15s; }
.form-card:hover, .form-card:focus-visible { transform: translateY(-2px); border-color: var(--gold); }
.form-card h3 { margin: 0; font-family: var(--serif); font-size: 21px; }
.form-card p { display: flex; gap: 6px; align-items: center; margin: 0; font-size: 13px; }
.form-number { justify-self: start; padding: 2px 8px; border-radius: 10px; background: var(--onyx); color: var(--gold-bright); font-size: 11px; font-weight: 800; letter-spacing: .06em; }
.form-backnote { margin: 4px 0 0; padding: 6px 10px; border-left: 3px solid #b5483a; background: #fbefec; color: #7a2d22; font-size: 13px; }
.panel-menu-link { margin-top: 14px; color: var(--gold-bright); font-size: 13px; }
.form-dialog { width: min(860px, calc(100vw - 32px)); }
.form-section { display: block; min-width: 0; margin: 0 0 14px; padding: 14px 16px 16px; border: 1px solid var(--line); border-radius: 12px; }
.form-section legend { padding: 0 6px; font-family: var(--serif); font-size: 18px; font-weight: 600; }
.form-section legend small { margin-left: 6px; color: var(--muted); font-family: inherit; font-size: 12px; font-weight: 500; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px 14px; }
.form-grid label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.form-grid .checkbox-row { display: flex; align-items: center; align-self: end; }
.form-wide { grid-column: 1 / -1; }
.form-radio { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.form-radio .checkbox-row { font-weight: 500; }
.form-grid .duration-fields { display: flex; gap: 8px; }
.is-dull { opacity: .5; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.form-actions [data-act="delete"] { margin-right: auto; order: -1; }
.form-event-line { margin: 0 0 12px; font-size: 14px; }
.form-qr { display: block; max-width: 180px; margin-top: 10px; border-radius: 8px; }
.form-note { display: grid; gap: 4px; margin: 0 0 14px; padding: 12px 16px; border: 1px solid var(--gold-brand); border-radius: 12px; background: #fffaf0; font-size: 14px; }
.form-note.hidden { display: none; }
.form-note-todo { color: #8a3b10; font-weight: 700; }
.form-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 12px 0 0; }
.form-facts div { padding: 10px 12px; border: 1px solid var(--line-on-dark, #3a352b); border-radius: 10px; }
.form-facts dt { color: #a99f8a; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.form-facts dd { margin: 4px 0 0; color: var(--parchment); font-size: 15px; }
.form-facts a { color: var(--gold-bright); }
.money-form .form-section { background: var(--panel); }
.money-form > .button { margin-top: 4px; }
.money-form .form-section { color: var(--ink); }
.money-form .form-section legend { display: none; }
.money-form .form-grid label { color: #514b3f; }

/* Team site phase 4: Pre Event Activity checklists. */
.warden-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; justify-content: space-between; }
.warden-head p { margin: 4px 0 0; color: #bdb4a2; }
.warden-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.warden-stale { margin: 12px 0 0; padding: 8px 12px; border-radius: 10px; background: #5a2a14; color: #ffd9b8; font-weight: 700; font-size: 13px; }
.warden-count { margin: 12px 0 8px; color: var(--gold-bright); font-weight: 700; font-size: 13px; }
.warden-list { display: grid; gap: 8px; }
.warden-list.is-dull { opacity: .55; }
.warden-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid #3a352b; border-radius: 10px; background: var(--onyx-soft); color: var(--parchment); cursor: pointer; }
.warden-row input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--gold-brand); }
.warden-row span { display: grid; gap: 2px; }
.warden-row small { color: #bdb4a2; white-space: pre-line; }
.offline-source { margin: -4px 0 8px; }

/* Team site phase 5: Sphinx controls and Site Architecture. */
.spot-switch-tile { position: relative; }
.spot-switch-row { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.spot-switch-row .checkbox-row { margin: 0; }
.spot-switch-tile p { margin: 8px 0 0; }
#openSpotTeam.is-off { opacity: .5; }
.sphinx-only { display: none !important; }
body[data-module="sphinx"] .sphinx-only { display: flex !important; }
.metric-intro { margin: -8px 0 16px; color: #d9d2c1; font-size: 13px; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.metric-tile { display: grid; gap: 4px; padding: 14px 16px; border-radius: 12px; background: var(--panel); color: var(--ink); }
.metric-tile strong { font-family: var(--serif); font-size: 26px; font-weight: 600; }
.metric-tile small { color: var(--muted); font-size: 12px; }
.metric-label { color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.metric-chart { margin-top: 14px; padding: 14px 16px; border-radius: 12px; background: var(--panel); }
.metric-bars { display: flex; align-items: flex-end; gap: 2px; height: 90px; margin-top: 10px; }
.metric-bar { flex: 1; min-height: 2px; border-radius: 2px 2px 0 0; background: var(--gold-brand); }
.metric-refresh { margin-top: 14px; }

/* SANCTUM home (30 Oct 2026): one full-width tile per department, stacked. */
.sanctum-home { display: grid; gap: 12px; }
.department-tile { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 16px; min-height: 84px; padding: 16px 24px; border: 1px solid var(--gold-brand); border-radius: 14px; background: var(--onyx); color: var(--parchment); cursor: pointer; transition: transform .15s, border-color .15s, box-shadow .15s; }
.department-tile:hover, .department-tile:focus-visible { transform: translateY(-1px); border-color: var(--gold-bright); box-shadow: 0 10px 24px #0000002e; }
.department-name { grid-column: 1; color: var(--gold-bright); font-family: var(--serif); font-size: clamp(21px, 2.6vw, 26px); font-weight: 600; letter-spacing: .03em; line-height: 1.15; }
.department-welcome { grid-column: 1; margin-top: 2px; color: #bdb4a2; font-size: 14px; }
.department-arrow { grid-column: 2; grid-row: 1 / span 2; color: var(--gold-bright); font-size: 30px; line-height: 1; }
.department-soon { grid-column: 2; grid-row: 1 / span 2; color: #8f8778; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.department-tile.is-soon { cursor: default; opacity: .6; border-style: dashed; }
.department-tile.is-soon:hover { transform: none; box-shadow: none; border-color: var(--gold-brand); }
/* Inside a department: a slim bar with the way back. */
.sanctum-ribbon { padding: 6px 12px; margin-bottom: 14px; }
.ribbon-crumb.is-here { color: var(--gold-bright); }

/* Settings opened from a department show only that pane. */
.settings-dialog.single-pane .settings-tabs { display: none; }
.settings-dialog.single-pane .settings-layout { grid-template-columns: 1fr; }
/* People & Access. */
.people-page { display: grid; gap: 14px; margin-top: 14px; }
.people-panel h3 { margin: 0 0 6px; font-family: var(--serif); }
.people-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 12px 0; }
.people-fields label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.people-modules { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 12px; }
.chip-dept { display: inline-block; margin: 2px 0; padding: 2px 9px; border-radius: 10px; background: var(--onyx); color: var(--gold-bright); font-size: 12px; font-weight: 700; }
.people-actions { white-space: nowrap; }
.people-actions .text-button { margin-left: 10px; }
.people-actions .danger { color: #b5483a; }
.people-panel { color: var(--parchment); }
.people-panel h3 { color: var(--gold-bright); }
.people-panel .muted, .people-fields label { color: #d9d2c1; }
.people-panel .data-table td { color: var(--parchment); }
.people-panel .chip-dept { border: 1px solid var(--gold-brand); }
.people-modules .checkbox-row span { color: #e9e3d4; }


/* SANCTUM colours (30 Oct 2026, "Treasure Map"): sand and parchment with forest
   green anchors, warm gold, and one colour per department. Organiser pages only;
   the player site keeps black and gold (the variables above). */
body.organiser-mode {
  --onyx: #2F4A3A; --onyx-soft: #294233; --onyx-2: #36533F; --onyx-3: #3E5C47;
  --paper: #F3EAD7; --panel: #FFF9EE; --line: #DCCDAE; --ink: #2B2A28; --muted: #7A6A55;
  --gold: #C98A2B; --gold-brand: #C98A2B; --gold-bright: #F0C35A; --parchment: #FBF5E8;
  --line-on-dark: rgba(240, 195, 90, 0.35);
  --dept: #2F4A3A;
  background: var(--paper);
}
body.organiser-mode .site-header { background: var(--onyx-soft); }
/* One colour per department: tiles on the home, and the accent inside a department. */
.department-sales, body[data-module="sales"] { --dept: #C8553D; }
.department-marketing, body[data-module="marketing"] { --dept: #E39B3A; }
.department-craft, body[data-module="craft"] { --dept: #6B4E9B; }
.department-registrations, body[data-module="registrations"] { --dept: #2E7D6B; }
.department-management, body[data-module="management"] { --dept: #3B6EA5; }
.department-archives, body[data-module="archives"] { --dept: #8C7356; }
.department-finances, body[data-module="finances"] { --dept: #4F8A3C; }
.department-sphinx, body[data-module="sphinx"] { --dept: #B8862B; }
.department-architecture, body[data-module="architecture"] { --dept: #55606E; }
.department-knowledge, body[data-module="knowledge"] { --dept: #A44A6E; }
.organiser-mode .department-tile { padding-left: 76px; background: var(--panel); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 4px 12px #5a3e1a14; }
.organiser-mode .department-tile::before { content: ""; position: absolute; top: 12px; bottom: 12px; left: 14px; width: 46px; border-radius: 10px; background: var(--dept); }
.organiser-mode .department-tile:hover, .organiser-mode .department-tile:focus-visible { border-color: var(--dept); box-shadow: 0 10px 24px #5a3e1a24; }
.organiser-mode .department-name { color: var(--ink); }
.organiser-mode .department-welcome { color: var(--muted); }
.organiser-mode .department-arrow { color: var(--dept); }
.organiser-mode .department-soon { color: var(--muted); }
.organiser-mode .department-tile.is-soon { opacity: .65; border-style: dashed; }
.organiser-mode .department-tile.is-soon:hover { border-color: var(--line); box-shadow: 0 4px 12px #5a3e1a14; }
/* Inside a department: the bar and the active tab take its colour. */
.organiser-mode .sanctum-ribbon { background: var(--panel); border: 1px solid var(--line); border-left: 6px solid var(--dept); }
.organiser-mode .ribbon-crumb { color: var(--muted); }
.organiser-mode .ribbon-crumb:hover { color: var(--ink); }
.organiser-mode .ribbon-crumb.is-here { color: var(--dept); }
.organiser-mode .org-tabs { --onyx: var(--dept); }
.organiser-mode .org-tab.active { color: #fff; }
.organiser-mode .org-sub { color: rgba(255, 255, 255, .78); }
.organiser-mode .org-sub:hover { color: #fff; }
.organiser-mode .org-sub.active { color: #fff; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }

/* Form M6 after approval (30 Oct 2026): locked note and Change history. */
.m6-locked { margin: 10px 0 0; color: var(--muted); font-size: 13px; font-weight: 600; }
.m6-history { margin: -4px 0 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--ink); }
.m6-history summary { cursor: pointer; font-weight: 700; font-size: 13.5px; }
.m6-history ul { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.m6-history li { display: grid; gap: 2px; padding-top: 8px; border-top: 1px solid var(--line); }
.m6-when { color: var(--muted); font-size: 12px; }
.m6-change { font-size: 13.5px; }
.soon-panel .m6-history { margin-top: 14px; }
.soon-panel .m6-locked { color: #d9d2c1; }
/* View-only fields in event forms look view-only. */
.form-dialog :is(input, select, textarea)[disabled]:not([type="checkbox"]):not([type="radio"]),
.money-form :is(input, select, textarea)[disabled]:not([type="checkbox"]):not([type="radio"]) { background: #F3ECDD; color: #5d5446; border-style: dashed; cursor: default; }

/* Auto-email configuration as a table (30 Oct 2026). */
.email-table .email-row { cursor: pointer; }
.email-table .email-row:hover td, .email-table .email-row:focus-visible td { background: #f6efdc; }
.email-table td { vertical-align: top; }
.email-edit-dialog { width: min(720px, calc(100vw - 32px)); }
.email-edit-dialog textarea { width: 100%; font-family: inherit; }
.utr-help { margin: -4px 0 0; }

/* Department Dashboard (30 Oct 2026): number cards at the top of a department. */
.dept-dashboard { padding: 18px 22px 20px; border: 1px solid var(--line); border-left: 6px solid var(--dept, var(--gold-brand)); border-radius: 14px; background: var(--panel); }
.dept-dashboard-title { margin: 0 0 12px; color: var(--ink); font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: .04em; }
.dept-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.dept-card { display: grid; justify-items: start; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fffdf8; color: var(--ink); text-align: left; cursor: pointer; transition: transform .15s, border-color .15s, box-shadow .15s; }
.dept-card:hover, .dept-card:focus-visible { transform: translateY(-1px); border-color: var(--dept, var(--gold-brand)); box-shadow: 0 8px 18px #5a3e1a14; }
.dept-card strong { color: var(--dept, var(--gold-brand)); font-family: var(--serif); font-size: 34px; font-weight: 700; line-height: 1; }
.dept-card span { font-size: 13.5px; font-weight: 700; }
.dept-card small { color: var(--muted); font-size: 12px; }
.dept-card.is-zero strong { color: var(--muted); opacity: .6; }
/* Event forms as a table. */
.form-list { display: grid; gap: 12px; margin-top: 14px; }
.form-list-head { display: flex; justify-content: flex-end; }
.form-table .form-row { cursor: pointer; }
.form-table .form-row:hover td, .form-table .form-row:focus-visible td { background: #f6efdc; }
.form-table td { vertical-align: top; }
.form-table .form-backnote { margin-top: 6px; }
/* Event-form table: light card so rows read clearly */
body.organiser-mode .panel.form-list { padding: 18px; background: #fffaf0; border: 1px solid #e3d6b8; border-left: 5px solid var(--dept, #b8892e); color: #2b2a24; }
body.organiser-mode .form-list .form-table th { color: #6b5f45; border-bottom-color: #e3d6b8; }
body.organiser-mode .form-list .form-table td { color: #2b2a24; border-bottom-color: #efe5cf; }
body.organiser-mode .form-list .form-table td:first-child { color: var(--dept, #8a6a1f); font-weight: 700; }
body.organiser-mode .form-list .form-table td:last-child { color: #6b5f45; }
/* Form board: Sales and Sphinx Approvals (one table, status chips, search) */
.form-board { gap: 10px; }
.form-board-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.form-board-title { margin: 0; color: #2b2a24; font-family: var(--serif); font-size: 24px; font-weight: 600; letter-spacing: .04em; }
.form-board-note { margin: 0; color: #6b5f45 !important; }
.form-new { white-space: nowrap; }
.form-board-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.form-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.form-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid #e3d6b8; border-radius: 999px; background: #fffdf8; color: #2b2a24; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.form-chip strong { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: #f1e8d2; color: var(--dept, #8a6a1f); font-size: 12.5px; text-align: center; }
.form-chip:hover, .form-chip:focus-visible { border-color: var(--dept, #b8892e); }
.form-chip.is-zero strong { color: #9a8f78; }
.form-chip.is-on { border-color: var(--dept, #b8892e); background: var(--dept, #b8892e); color: #fff; }
.form-chip.is-on strong { background: #ffffff33; color: #fff; }
.form-search { flex: 0 1 320px; min-width: 200px; padding: 8px 12px; border: 1px solid #e3d6b8; border-radius: 10px; background: #fffdf8; color: #2b2a24; font: inherit; font-size: 14px; }
.form-search:focus { outline: 2px solid var(--dept, #b8892e); outline-offset: 1px; }
.form-list .form-empty { margin: 8px 0; color: #6b5f45 !important; }
.form-list .form-deleted-link { justify-self: start; color: #6b5f45; }
.form-board.is-deleted-view .form-chips { opacity: .55; }
@media (max-width: 560px) { .form-search { flex: 1 1 100%; } }
.form-list { min-width: 0; max-width: 100%; }
.form-list > *, .form-table-block { min-width: 0; }
.form-table-block .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.form-table .nowrap { white-space: nowrap; }
@media (max-width: 560px) { .form-board-top .form-board-title { font-size: 21px; } .form-chip { padding: 6px 10px; font-size: 13px; } }
/* EID / FID labels (30 Oct 2026) */
.event-ids { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.event-ids span, .row-ids span { padding: 2px 8px; border-radius: 999px; background: #2e4a3c; color: #f3d27a; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; }
.event-number + .event-number { margin-left: 6px; }

/* Grid / Rows switch */
.view-switch { display: inline-flex; align-self: flex-end; justify-self: end; margin: 0 0 12px auto; padding: 3px; border: 1px solid #e3d6b8; border-radius: 999px; background: #fffaf0; }
.craft-section > .view-switch { display: flex; width: max-content; }
.view-switch button { padding: 6px 14px; border: 0; border-radius: 999px; background: transparent; color: #6b5f45; font-size: 13px; font-weight: 700; cursor: pointer; }
.view-switch button.is-on { background: var(--dept, #b8892e); color: #fff; }

/* Rows view */
.event-grid.event-rows { grid-template-columns: 1fr; gap: 10px; }
.event-row { display: grid; grid-template-columns: auto minmax(220px, 2fr) minmax(130px, 1.3fr) minmax(130px, 1fr) minmax(120px, .9fr) auto; align-items: center; gap: 16px;
  width: 100%; padding: 10px 16px 10px 12px; border: 1px solid #e3d6b8; border-left: 5px solid var(--dept, #b8892e); border-radius: 12px; background: #fffaf0; color: #2b2a24; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.event-row:hover, .event-row:focus-visible { border-color: var(--dept, #b8892e); box-shadow: 0 8px 18px #5a3e1a14; }
.event-row.is-archived { opacity: .8; }
.row-ids { display: grid; gap: 4px; justify-items: start; }
.row-ids .is-none { background: #efe5cf; color: #8a7d60; }
.row-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.row-image { flex: none; width: 64px; height: 48px; overflow: hidden; border-radius: 8px; background: #2e4a3c; }
.row-image img { width: 100%; height: 100%; object-fit: cover; }
.row-image-placeholder { display: grid; place-items: center; height: 100%; color: #f3d27a; font-family: var(--serif); font-weight: 700; }
.row-name { display: grid; gap: 3px; min-width: 0; }
.row-name strong { overflow: hidden; font-family: var(--serif); font-size: 17px; line-height: 1.2; text-overflow: ellipsis; }
.row-fact { display: flex; align-items: center; gap: 6px; min-width: 0; color: #4a4434; font-size: 13.5px; }
.row-fact svg { flex: none; color: var(--dept, #8a6a1f); }
.row-status { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
@media (max-width: 900px) {
  .event-row { grid-template-columns: auto 1fr; gap: 8px 14px; }
  .row-title { grid-column: 2; }
  .row-fact, .row-status { grid-column: 1 / -1; }
  .row-status { justify-content: flex-start; }
}

/* Coming up (approved forms, per department) */
.coming-up { margin-top: 0; }
.coming-scroll { max-height: 290px; overflow: auto; border: 1px solid #efe5cf; border-radius: 10px; }
.coming-scroll thead th { position: sticky; top: 0; background: #fffaf0; z-index: 1; }
.coming-up .coming-wide { min-width: 220px; white-space: normal; }

/* Form conversation log */
.form-log-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.form-log-entry { padding: 10px 12px; border-left: 4px solid #b8892e; border-radius: 8px; background: #fbf4e4; }
.form-log-entry.is-sphinx { border-left-color: #2e4a3c; background: #eef3ef; }
.form-log-head { font-size: 13.5px; }
.form-log-when { display: block; margin-top: 2px; color: #7a6f57; font-size: 12px; }
.form-log-entry p { margin: 6px 0 0; white-space: pre-wrap; }
.form-log-entry .form-log-empty { color: #8a7d60; font-style: italic; }
.note-dialog { width: min(480px, calc(100vw - 32px)); padding: 22px; border: 0; border-radius: 16px; background: #fffaf0; color: #2b2a24; }
.note-dialog::backdrop { background: #10201890; }
.note-dialog h3 { margin: 0 0 10px; font-family: var(--serif); }
.note-dialog textarea { width: 100%; }
.note-quote { margin: 0 0 12px; padding: 10px 12px; border-left: 4px solid #b5483a; background: #fbefec; color: #7a2d22; white-space: pre-wrap; }
/* Department event lists: tab bar + list (31 Oct 2026) */
.dept-lists { gap: 12px; }
.list-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.list-tabs { display: flex; flex-wrap: wrap; overflow: hidden; border: 1px solid #e3d6b8; border-radius: 12px; background: #fffdf8; }
.list-tabs button { padding: 10px 16px; border: 0; border-right: 1px solid #e3d6b8; background: none; color: #2b2a24; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.list-tabs button:last-child { border-right: 0; }
.list-tabs button em { margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: #efe6d3; color: var(--dept, #8a6a1f); font-size: 12.5px; font-style: normal; }
.list-tabs button:hover { background: #f6efdc; }
.list-tabs button.is-on { background: var(--dept, #b8892e); color: #fff; }
.list-tabs button.is-on em { background: #ffffff33; color: #fff; }
.dept-lists .view-switch { margin: 0; }
.list-note { margin: 0; color: #6b5f45 !important; }
.list-note:empty { display: none; }
.list-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.list-sort { padding: 8px 12px; border: 1px solid #e3d6b8; border-radius: 10px; background: #fffdf8; color: #2b2a24; font: inherit; font-size: 13.5px; font-weight: 600; }
.dept-lists .event-grid:not(.event-rows) { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.dept-lists .empty-sphinx p { color: #6b5f45; }
.event-row.is-form { border-left-style: dashed; background: #fbf7ee; }
.row-form-icon { font-family: var(--sans) !important; font-size: 11px; letter-spacing: .12em; }
.row-sub { color: #8a7d60; font-size: 12px; }
.settings-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 12px 22px; border: 1px solid #e3d6b8; border-radius: 12px; background: #fffaf0; font-size: 14px; }
.settings-line b { color: #6b5f45; font-size: 12px; letter-spacing: .1em; }
.settings-line .text-button { color: var(--dept, #8a6a1f); font-weight: 700; text-decoration: underline; }
.settings-soon { color: #9a8f78; }
@media (max-width: 560px) {
  .list-tabs { width: 100%; }
  .list-tabs button { flex: 1 1 auto; padding: 9px 10px; font-size: 13px; }
  .list-tools .form-search { flex: 1 1 100%; }
}
.list-tools .form-search { flex: 0 1 360px; }
.list-tools .list-sort { width: auto; flex: 0 0 auto; max-width: 100%; }
.coming-up .form-table td { white-space: nowrap; }
.coming-up .form-table td.coming-wide { white-space: normal; }
@media (max-width: 560px) {
  .dept-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dept-card { padding: 10px 12px; }
  .dept-card strong { font-size: 26px; }
  .list-tools .list-sort { flex: 1 1 100%; }
}
/* Dashboard: one row of figures, view only (31 Oct 2026) */
.dept-dashboard { padding: 14px 22px 16px; }
.dept-dashboard .dept-dashboard-title { text-align: center; margin-bottom: 10px; }
.dept-stats { display: flex; flex-wrap: wrap; justify-content: center; margin: 0; }
.dept-stat { display: flex; align-items: baseline; gap: 8px; padding: 2px 26px; border-left: 1px solid #e3d6b8; }
.dept-stat:first-child { border-left: 0; }
.dept-stat dd { margin: 0; color: var(--dept, #8a6a1f); font-family: var(--serif); font-size: 30px; font-weight: 700; line-height: 1; }
.dept-stat dt { color: #2b2a24; font-size: 14px; font-weight: 700; }
.dept-stat dt small { display: block; color: #8a7d60; font-size: 11.5px; font-weight: 600; }
.dept-stat.is-zero dd { color: #b5ab96; }
@media (max-width: 560px) {
  .dept-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 0; }
  .dept-stat { padding: 2px 12px; border-left: 0; }
  .dept-stat dd { font-size: 24px; }
  .dept-stat dt { font-size: 12.5px; }
}

/* Where you are (option A, 31 Oct 2026): SANCTUM › Department in the pinned
   header, one line, all the same size; each part can be tapped. */
.sanctum-ribbon { display: none !important; }
#craftBoardTitle { pointer-events: auto; }
#craftBoardTitle button { padding: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; cursor: pointer; }
#craftBoardTitle button:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.where { display: flex; align-items: baseline; gap: .55em; }
.where-sep { color: #c9b98f; font-size: .8em; }
#craftBoardTitle .where-dept { color: color-mix(in srgb, var(--dept, #e8c35a) 40%, #fff); }
.where-event { color: #e9dfc4; }
body[data-module] .site-header::after { height: 3px; background: linear-gradient(90deg, transparent, var(--dept), var(--dept), transparent); }
#craftBoardTitle.is-located { font-size: 1.4rem; letter-spacing: .14em; }
@media (max-width: 1320px) { #craftBoardTitle.is-located { font-size: 1.12rem; letter-spacing: .1em; } }
@media (max-width: 1060px) { #craftBoardTitle .where-event, #craftBoardTitle .where-event-sep { display: none; } }
@media (max-width: 900px) { body.organiser-mode .brand-name { display: none; } }
@media (max-width: 700px) {
  #craftBoardTitle.is-located { font-size: .92rem; letter-spacing: .08em; }
  #craftBoardTitle .where-event, #craftBoardTitle .where-event-sep { display: none; }
}
/* Rows: the same column widths on every row, so columns line up (31 Oct 2026) */
.event-row { grid-template-columns: 116px minmax(0, 2.3fr) minmax(0, 1.5fr) 175px 150px 200px; gap: 14px; }
.row-ids span { white-space: nowrap; }
.row-name strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; }
.row-status { flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; }
.row-image { background: #efe6d3; }
.row-image-placeholder, .row-image.is-blank { display: grid; place-items: center; width: 100%; height: 100%; color: #a8986f; }
.row-tentative { display: block; color: #8a7d60; font-size: 11.5px; }
.event-row.is-form .row-name strong { color: #4a4434; }
@media (max-width: 1100px) { .event-row { grid-template-columns: 116px minmax(0, 2fr) minmax(0, 1.3fr) 150px 130px 180px; gap: 10px; } }
@media (max-width: 900px) {
  .event-row { grid-template-columns: 116px 1fr; }
  .row-status { flex-direction: row; flex-wrap: wrap; }
}
.row-image.is-blank { width: 64px; height: 48px; }
.row-image-placeholder { width: 100%; height: 100%; }
.row-status > * { max-width: 100%; white-space: normal; text-align: left; line-height: 1.3; }
.tentative { display: inline-grid; gap: 1px; line-height: 1.3; }
.tentative em { color: #8a7d60; font-size: 11.5px; font-style: italic; }
/* Venue fields (31 Oct 2026) */
.venue-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 14px; margin-bottom: 10px; }
.venue-grid label { display: grid; gap: 4px; min-width: 0; }
.venue-grid .venue-wide { grid-column: span 2; }
.venue-grid input, .venue-grid select { width: 100%; }
.venue-block { display: grid; gap: 8px; }
.venue-title { font-weight: 700; }
.form-grid .venue-grid { grid-column: 1 / -1; }
@media (max-width: 700px) { .venue-grid { grid-template-columns: 1fr 1fr; } .venue-grid .venue-wide { grid-column: 1 / -1; } }
/* Gate 1: publishing bar above the event's tabs (31 Oct 2026) */
.listing-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin: 14px 0; padding: 14px 18px; border: 1px solid #e3d6b8; border-left: 6px solid var(--dept, #b8892e); border-radius: 14px; background: #fffaf0; color: #2b2a24; }
.listing-main { display: grid; gap: 6px; min-width: 0; flex: 1 1 420px; }
.listing-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.listing-kicker { color: #6b5f45; font-size: 11.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.listing-body { color: #4a4434; font-size: 14px; }
.listing-body p { margin: 4px 0 0; }
.listing-quote { margin: 6px 0 0; padding: 8px 12px; border-left: 4px solid #2e4a3c; border-radius: 6px; background: #eef3ef; color: #2b2a24; white-space: pre-wrap; }
.listing-quote.is-back { border-left-color: #b5483a; background: #fbefec; color: #7a2d22; }
.listing-missing { color: #8a5a0a; }
.listing-ready { color: #24603d; }
.listing-warn { color: #8a5a0a; font-weight: 600; }
.listing-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.listing-log summary { cursor: pointer; color: #6b5f45; font-size: 13px; font-weight: 700; }
.listing-log .form-log-list { margin-top: 8px; }
#editEventForm.listing-locked .event-form-fields { opacity: .72; }
#editEventForm.listing-locked .save-settings { display: none; }
.change-diff { width: 100%; margin-top: 8px; border-collapse: collapse; font-size: 13.5px; }
.change-diff th { padding: 6px 10px; border-bottom: 1px solid #e3d6b8; color: #6b5f45; font-size: 11.5px; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
.change-diff td { padding: 7px 10px; border-bottom: 1px solid #efe5cf; vertical-align: top; }
.change-diff td:first-child { font-weight: 700; white-space: nowrap; }
.change-diff .is-before { color: #8a7d60; text-decoration: line-through; text-decoration-color: #c9b98f; }
.change-diff .is-after { color: #24603d; font-weight: 600; }
/* Phase 4: live fixes and the Sphinx's alert banner */
.live-fix-list { display: grid; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.live-fix-list li { display: grid; gap: 2px; padding: 7px 10px; border-left: 3px solid #d9a441; border-radius: 6px; background: #fdf6e6; font-size: 13.5px; }
.live-fix-list small { color: #8a7d60; font-size: 11.5px; }
.live-fix-dialog { width: min(560px, calc(100vw - 32px)); }
.live-fix-dialog label { display: grid; gap: 4px; }
.live-fix-dialog select, .live-fix-dialog input, .live-fix-dialog textarea { width: 100%; }
@keyframes sphinx-pulse { 50% { box-shadow: 0 0 0 7px #c0392b11; } }
/* Stage vs now, and column titles (31 Oct 2026) */
.event-row, .rows-head { grid-template-columns: 112px minmax(0, 2fr) minmax(0, 1.3fr) 175px 190px 170px; gap: 12px; }
.rows-head { display: grid; position: sticky; top: 78px; z-index: 2; padding: 8px 16px 8px 17px; border-bottom: 1px solid #e3d6b8; background: #fffaf0; color: #6b5f45; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.row-when { display: grid; gap: 4px; min-width: 0; }
.row-stage { display: grid; justify-items: start; gap: 4px; }
.row-stage .status-chip, .row-status .status-chip { white-space: normal; text-align: left; line-height: 1.3; }
.stage-due { color: #a33a2c; font-size: 11.5px; font-weight: 800; }
.tile-chips .stage-due { display: block; margin-top: 4px; }
@media (max-width: 1100px) { .event-row, .rows-head { grid-template-columns: 104px minmax(0, 1.8fr) minmax(0, 1.2fr) 155px 170px 150px; gap: 10px; } }
@media (max-width: 900px) {
  .rows-head { display: none; }
  .event-row { grid-template-columns: 112px 1fr; }
  .row-when, .row-stage, .row-status { grid-column: 1 / -1; }
  .row-stage { grid-auto-flow: column; justify-content: start; align-items: center; }
}
/* Stage tracker at the top of an event */
.stage-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; margin: 14px 0 10px; padding: 12px 18px; border: 1px solid #e3d6b8; border-radius: 14px; background: #fffaf0; color: #2b2a24; }
.stage-now { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.stage-steps { display: flex; flex-wrap: wrap; gap: 6px 4px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.stage-steps li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; color: #8a7d60; }
.stage-steps li span { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #efe6d3; color: #8a7d60; font-size: 11px; font-weight: 800; }
.stage-steps li + li::before { content: ""; width: 14px; height: 2px; margin-right: 4px; background: #e3d6b8; }
.stage-steps li.is-done { color: #24603d; }
.stage-steps li.is-done span { background: #24603d; color: #fff; }
.stage-steps li.is-current { background: #fdf3dd; color: #8a5a0a; font-weight: 700; }
.stage-steps li.is-current span { background: #d9a441; color: #fff; }
.sphinx-inbox { border-left-color: #c0392b; }
#organizerView > .listing-bar, #alertBoardView > .listing-bar { margin-top: 18px; }
/* Stage codes with an i (31 Oct 2026) */
.stage-code-wrap { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; }
.stage-code { display: inline-grid; place-items: center; min-width: 38px; padding: 3px 9px; border: 1px solid #d8cba8; border-radius: 999px; background: #f6efdc; color: #4a4434; font-size: 12.5px; font-weight: 800; letter-spacing: .04em; }
.stage-code.is-warn { border-color: #e5b65a; background: #fcebd2; color: #8a5a0a; }
.stage-code.is-bad { border-color: #e2a59b; background: #fbe4df; color: #9b2f22; }
.stage-code.is-good { border-color: #a9d3b8; background: #dcefe3; color: #24603d; }
.stage-code.is-idle { border-color: #ddd5c3; background: #eee9dd; color: #7a7262; }
.stage-code.has-flags::after { content: "•"; margin-left: 3px; color: #c0392b; }
.stage-code.is-due { box-shadow: 0 0 0 2px #c0392b55; }
.info-tip.is-inline { position: relative; top: auto; right: auto; display: inline-block; }
.info-tip.is-inline .info-btn { display: inline-grid; place-items: center; width: 18px; height: 18px; border: 1px solid #c9b98f; border-radius: 50%; background: #fffaf0; color: #6b5f45; font-size: 11px; font-weight: 800; font-style: italic; cursor: pointer; }
.info-tip.is-inline .info-pop { left: 0; right: auto; z-index: 30; }
.stage-flags { margin: 6px 0 0; padding-left: 16px; }
.deleted-row summary .stage-code-wrap { margin-right: 8px; }
.dept-lists .list-title { margin: 0 0 4px; }
.list-subtitle { margin: 18px 0 8px; color: #6b5f45; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.stage-code { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
/* The Sphinx's code pills (31 Oct 2026) */
.code-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.code-group { display: inline-flex; flex-wrap: wrap; gap: 5px; padding-left: 12px; border-left: 1px solid #e3d6b8; }
.code-pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border: 1px solid #e3d6b8; border-radius: 999px; background: #fffdf8; color: #2b2a24; font: inherit; font-size: 12.5px; font-weight: 800; cursor: pointer; }
.code-pill em { font-style: normal; font-weight: 700; color: var(--dept, #8a6a1f); }
.code-pill.is-empty { opacity: .45; }
.code-pill:hover { border-color: var(--dept, #b8892e); opacity: 1; }
.code-pill.is-on { border-color: var(--dept, #b8892e); background: var(--dept, #b8892e); color: #fff; opacity: 1; }
.code-pill.is-on em { color: #fff; }
.code-pill.is-all { padding: 6px 12px; }
.list-tools .view-switch.in-tools { margin: 0 0 0 auto; }

/* SANCTUM home (31 Oct 2026): two large tiles, "Teams" (eight departments, 4 x 2)
   and "Administrator" (Sphinx and Knowledge Base) below it. Square department tiles
   filled with the department colour, centred in their large tile. */
.sanctum-home { container-type: inline-size; gap: 18px; }
/* The large tiles stay full width. The squares spread out evenly: the gap between them is
   also the gap to the large tile's sides and bottom (4 tiles, 5 equal gaps). */
.home-group { --cols: 4; --tile: min(200px, 16cqw); --space: calc((100cqw - 2px - var(--cols) * var(--tile)) / (var(--cols) + 1)); padding: 18px 0 var(--space); border-radius: 18px; background: var(--onyx); border: 1px solid var(--gold-brand); }
.home-group-title { margin: 0 0 14px; text-align: center; color: var(--gold-bright); font-family: var(--serif); font-size: clamp(24px, 2.8vw, 30px); font-weight: 600; letter-spacing: .05em; }
/* Four tiles of about 200px a row with 40px between them (30% smaller than a full-width column). */
.home-group-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space); padding: 0 var(--space); }
.home-group .department-tile, .organiser-mode .home-group .department-tile {
  flex: 0 0 var(--tile);
  aspect-ratio: 1 / 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
  padding: 18px; overflow: hidden; background: var(--dept); border: 1px solid transparent; color: #fff;
  box-shadow: 0 6px 16px #00000033;
}
.organiser-mode .home-group .department-tile::before { content: none; }
.home-group .department-name, .organiser-mode .home-group .department-name { color: #fff; font-size: clamp(19px, 1.9vw, 24px); line-height: 1.12; }
.home-group .department-welcome, .organiser-mode .home-group .department-welcome { margin-top: 6px; color: #ffffffd9; font-size: 14px; }
.home-group .department-arrow, .home-group .department-soon { position: absolute; top: 14px; right: 16px; }
.home-group .department-arrow, .organiser-mode .home-group .department-arrow { color: #fff; font-size: 30px; }
.organiser-mode .home-group .department-soon { color: #fff; }
.organiser-mode .home-group .department-tile:hover, .organiser-mode .home-group .department-tile:focus-visible { border-color: var(--gold-bright); box-shadow: 0 12px 26px #00000047; }
/* Coming soon: the colour faded, a dashed edge, not clickable. */
.organiser-mode .home-group .department-tile.is-soon { opacity: .5; border: 1px dashed #ffffffa6; box-shadow: none; }
.organiser-mode .home-group .department-tile.is-soon:hover { transform: none; border-color: #ffffffa6; box-shadow: none; }
@media (max-width: 720px) {
  .home-group { --cols: 2; --tile: min(150px, 40cqw); }
  .home-group .department-arrow, .organiser-mode .home-group .department-arrow { top: 6px; right: 9px; font-size: 18px; }
  .home-group .department-tile, .organiser-mode .home-group .department-tile { padding: 12px; }
  .home-group .department-name, .organiser-mode .home-group .department-name { font-size: 15px; }
  .home-group .department-welcome, .organiser-mode .home-group .department-welcome { font-size: 12px; }
  .home-group .department-soon { position: static; order: 3; margin-top: 4px; font-size: 9.5px; }
  .home-group .department-welcome, .organiser-mode .home-group .department-welcome { font-size: 11px; margin-top: 3px; }
}

/* ---------- Event banner, slim bar and Event details fold (1 Nov 2026) ---------- */
.organiser-mode #backToEvents { display: none; }
.sanctum-banner { margin-top: 10px; overflow: hidden; border: 1px solid #c98a2b66; border-radius: 16px; background: var(--onyx); color: var(--parchment); }
.sb-main { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: start; padding: 22px 28px 18px; }
.sb-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.sb-title { margin: 0; color: #fff; font-family: var(--serif); font-size: clamp(30px, 3.4vw, 42px); font-weight: 600; line-height: 1.05; }
.sb-title-row .event-number { margin-left: 0; }
.sb-desc { margin: 6px 0 12px; color: #d8d1bf; font-size: 15.5px; }
.sb-facts { display: flex; flex-wrap: wrap; gap: 6px 26px; margin: 0; font-size: 15px; font-weight: 500; }
.sb-facts .banner-fact { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.sb-facts .pin-icon { color: var(--gold-bright); }
.sb-side { display: grid; justify-items: end; gap: 10px; text-align: right; }
.sb-reg { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; background: #fbf5e8; color: #2b2a28; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.sb-reg i { width: 8px; height: 8px; border-radius: 50%; background: #8b8170; }
.sb-reg.tone-green i { background: #2e9d5a; } .sb-reg.tone-orange i { background: #e39b3a; } .sb-reg.tone-red i { background: #c8553d; }
.sb-days { line-height: 1; }
.sb-days b { display: block; color: var(--gold-bright); font-family: var(--serif); font-size: clamp(36px, 4vw, 52px); font-weight: 600; }
.sb-days small { display: block; margin-top: 4px; color: #d8d1bf; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.sb-stage:empty { display: none; }
.sb-stage .stage-bar { margin: 0; padding: 10px 28px; border: 0; border-top: 1px solid #c98a2b44; border-radius: 0; background: #26402f; color: #e9e3d4; }
.sb-stage .listing-kicker { color: #c9c0ab; }
.sb-stage .stage-steps li { color: #a9a08c; }
.sb-stage .stage-steps li span { background: transparent; border: 1px solid #6d6a5d; color: #a9a08c; }
.sb-stage .stage-steps li + li::before { background: #6d6a5d; }
.sb-stage .stage-steps li.is-done { color: #e9e3d4; }
.sb-stage .stage-steps li.is-done span { background: #3f8f5d; border-color: #3f8f5d; color: #fff; }
.sb-stage .stage-steps li.is-current { background: transparent; color: var(--gold-bright); }
.sb-stage .stage-steps li.is-current span { background: var(--gold-bright); border-color: var(--gold-bright); color: #2b2a28; }
.sb-stage .info-btn { background: transparent; border-color: #d8d1bf; color: #d8d1bf; }
/* Slim bar: pinned with the tabs once the banner has scrolled away. */
.event-pin .mgmt-title { display: none; }
.slim-bar { display: none; }
.organiser-mode.banner-gone .slim-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 16px; border: 1px solid #c98a2b66; border-radius: 12px; background: var(--onyx); color: var(--parchment); font-size: 14px; box-shadow: 0 8px 18px #2b2a2833; }
.slim-name { color: #fff; font-family: var(--serif); font-size: 21px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40%; }
.slim-bar .event-number { margin: 0; }
.slim-bar .sb-reg { padding: 3px 10px; font-size: 12.5px; }
.slim-stage { display: inline-flex; align-items: center; }
.slim-days { margin-left: auto; color: var(--gold-bright); font-weight: 700; white-space: nowrap; }
.slim-up { padding: 0 4px; border: 0; background: none; color: #d8d1bf; font-size: 18px; cursor: pointer; }
.organiser-mode.banner-gone .event-pin .org-tabs { margin-top: 8px; }
.organiser-mode .event-pin .org-tabs { margin-bottom: 8px; }
/* Event details as a fold above the department's tabs. */
.details-fold { margin: 14px 0 4px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.details-fold.hidden { display: none; }
.fold-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; width: 100%; padding: 13px 20px; border: 0; background: none; color: var(--ink); text-align: left; cursor: pointer; }
.fold-chev { width: 14px; color: var(--dept, #6B4E9B); font-size: 14px; transition: transform .15s; }
.details-fold.is-open .fold-chev { transform: rotate(90deg); }
.fold-title { font-family: var(--serif); font-size: 23px; font-weight: 600; }
.fold-pills { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.fold-pill { padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: #efe5cf; color: #6d5a37; }
.fold-pill.is-ok { background: #e3f0e4; color: #2f6b43; }
.fold-pill.is-wait { background: #fcebd2; color: #8a5a0a; }
.fold-pill.is-back { background: #fbe4df; color: #9b2f22; }
.fold-pill.is-edit { background: #ece6f5; color: #5b3f8b; }
.fold-act { margin-left: auto; color: var(--dept, #6B4E9B); font-size: 13.5px; font-weight: 700; }
.fold-summary { margin: -6px 0 0; padding: 0 20px 12px 46px; color: var(--muted); font-size: 13.5px; }
.fold-summary:empty, .details-fold.is-open .fold-summary { display: none; }
.fold-body { display: none; padding: 0 12px 12px; }
.details-fold.is-open .fold-body { display: block; }
.fold-body #organizerView { margin: 0; }
/* What the event form said, under the fields it is about. */
.field-hint { display: block; margin-top: 6px; color: var(--muted); font-size: 12.5px; font-weight: 500; line-height: 1.45; }
.field-hint em { font-style: italic; }
.field-hint .is-todo, .field-hint.is-todo { color: #9b5a0a; font-weight: 600; }
@media (max-width: 720px) {
  .sb-main { grid-template-columns: 1fr; gap: 12px; padding: 18px 18px 14px; }
  .sb-side { justify-items: start; text-align: left; }
  .sb-facts { flex-direction: column; font-size: 14px; }
  .sb-stage .stage-bar { padding: 10px 18px; }
  .sb-stage .stage-steps { display: none; }
  .slim-name { flex: 1 1 100%; max-width: none; font-size: 18px; }
  .slim-bar .event-number { display: none; }
  .slim-bar .to-go, .slim-up { display: none; }
  .fold-head { padding: 12px 14px; }
  .fold-summary { padding: 0 14px 12px 40px; }
}
/* Client requests (1 Nov 2026). */
.client-requests { margin-top: 14px; padding: 18px 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--ink); }
.client-requests h3 { margin: 0 0 2px; color: var(--ink); font-family: var(--serif); font-size: 24px; }
.request-progress { display: flex; align-items: center; gap: 10px; margin: 10px 0 8px; color: #5c5446; font-size: 13px; font-weight: 600; }
.request-bar { flex: 1; height: 7px; overflow: hidden; border-radius: 9px; background: #e7dcc4; }
.request-bar i { display: block; height: 100%; background: #3f8f5d; }
.request-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.request-table th { padding: 6px 8px; border-bottom: 1px solid var(--line); color: #8a7a5f; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-align: left; text-transform: uppercase; }
.request-table td { padding: 10px 8px; border-bottom: 1px solid #eee3cc; vertical-align: top; }
.request-table td:first-child { width: 28px; }
.request-table small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.request-box { display: grid; place-items: center; width: 20px; height: 20px; border: 2px solid #a89a80; border-radius: 5px; color: #fff; font-size: 13px; }
.request-table tr.is-done .request-box { border-color: #3f8f5d; background: #3f8f5d; }
.request-how { width: 42%; }
.request-tick { display: flex; gap: 8px; }
.request-tick input, .request-add input { flex: 1; min-width: 0; padding: 7px 9px; border: 1px solid #c98a2b; border-radius: 7px; background: #fffdf6; font: inherit; font-size: 13.5px; }
.request-chip { display: inline-block; padding: 2px 9px; border-radius: 999px; color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; }
.request-chip.owner-craft { background: #6B4E9B; } .request-chip.owner-management { background: #3B6EA5; }
.request-owner { padding: 4px 6px; border: 1px solid var(--line); border-radius: 7px; background: #fff; font: inherit; font-size: 13px; }
.request-add { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.request-add input { flex: 1 1 320px; width: auto; }
.request-add select, .request-add button, .request-tick button { flex: 0 0 auto; width: auto; }
.request-tick input { width: auto; }
.request-add select { padding: 6px; border: 1px solid var(--line); border-radius: 7px; font: inherit; font-size: 13px; }
.request-empty { color: var(--muted); }
.tab-count { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: #c8553d; color: #fff; font-size: 11px; font-style: normal; font-weight: 700; }
.tab-count.hidden { display: none; }
@media (max-width: 720px) {
  .request-table thead { display: none; }
  .request-table tr { display: grid; grid-template-columns: 28px 1fr; gap: 4px 6px; padding: 8px 0; border-bottom: 1px solid #eee3cc; }
  .request-table td { padding: 2px 0; border: 0; }
  .request-table td:nth-child(n+3) { grid-column: 2; width: auto; }
  .request-tick { flex-wrap: wrap; }
}
/* Phone, pinned: the tabs become single scrolling rows so the pinned bar stays short. */
@media (max-width: 720px) {
  .organiser-mode.banner-gone .event-pin .org-main, .organiser-mode.banner-gone .event-pin .org-sub-row { display: flex; overflow-x: auto; scrollbar-width: none; }
  .organiser-mode.banner-gone .event-pin .org-sub-row.hidden { display: none; }
  .organiser-mode.banner-gone .event-pin .org-tab, .organiser-mode.banner-gone .event-pin .org-sub { flex: 0 0 auto; white-space: nowrap; }
  .organiser-mode.banner-gone .event-pin .org-tabs.has-subs .org-tab.active::before, .organiser-mode.banner-gone .event-pin .org-tabs.has-subs .org-tab.active::after { display: none; }
}
/* Unsaved changes (1 Nov 2026). */
.unsaved-mark { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; width: max-content; margin: 0 10px 6px 0; padding: 3px 10px; border-radius: 999px; background: #fbe4df; color: #9b2f22; font-size: 12.5px; font-weight: 700; vertical-align: middle; }
.unsaved-mark::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #e0703a; }
.unsaved-mark.hidden { display: none; }
/* Search (1 Nov 2026). */
.header-search { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid #f0c35a55; border-radius: 999px; background: #ffffff12; color: #f3ead7; font: 600 13px var(--sans); cursor: pointer; }
.header-search:hover { border-color: var(--gold-bright); }
.header-search.hidden { display: none; }
.header-search kbd, .search-box kbd { padding: 1px 6px; border: 1px solid #ffffff40; border-radius: 5px; font: 600 11px var(--sans); opacity: .8; }
.search-dialog { width: min(640px, calc(100vw - 32px)); max-height: min(70vh, 640px); margin-top: 10vh; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); color: var(--ink); box-shadow: 0 24px 60px #00000055; }
.search-dialog::backdrop { background: #1d2a2299; }
.search-box { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.search-box input { flex: 1; min-width: 0; padding: 6px 0; border: 0; outline: none; background: transparent; color: var(--ink); font: 500 16px var(--sans); }
.search-box kbd { border-color: var(--line); color: var(--muted); }
.search-results { max-height: calc(min(70vh, 640px) - 60px); overflow-y: auto; padding: 6px 8px 10px; }
.search-group { margin: 10px 8px 4px; color: #8a7a5f; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.search-hint { margin: 14px 10px; color: var(--muted); font-size: 14px; }
.search-hit { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; width: 100%; padding: 9px 12px; border: 0; border-radius: 10px; background: none; color: var(--ink); text-align: left; cursor: pointer; }
.search-hit.is-active, .search-hit:hover { background: #efe5cf; }
.search-hit-name { font-weight: 700; }
.search-hit-ids { color: #7a5a1e; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-align: right; }
.search-hit-meta { color: var(--muted); font-size: 13px; }
.search-hit .stage-code { justify-self: end; }
.search-hit-how { grid-column: 1 / -1; color: #9a8d78; font-size: 11.5px; }
@media (max-width: 720px) {
  .header-search span, .header-search kbd { display: none; }
  /* Phone: the header has no room beside the breadcrumb, so search is a round button bottom right. */
  .header-search { position: fixed; right: 16px; bottom: 18px; z-index: 60; justify-content: center; width: 50px; height: 50px; padding: 0; border: 1px solid var(--gold-bright); background: var(--onyx); box-shadow: 0 8px 20px #00000055; }
  .header-search svg { width: 22px; height: 22px; }
  /* (A blur on the header would pin the round button inside the header.) */
  body.organiser-mode .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .search-dialog { margin-top: 12px; }
}
.search-box input, .search-box input:focus { border: 0 !important; box-shadow: none !important; outline: none; }
.org-tabs.single-tab { display: none; }

/* 1 Nov 2026 (evening): no pinned bar; the banner scrolls away. Event details and
   Event Management are green tiles with centred titles; the tabs sit in Event Management. */
.organiser-mode.banner-gone .slim-bar { display: none; }
.details-fold { border: 1px solid #c98a2b66; background: var(--onyx); color: var(--parchment); }
.fold-head { display: grid; grid-template-columns: 70px 1fr 70px; align-items: center; color: var(--parchment); }
.fold-chev { color: var(--gold-bright); }
.fold-head .fold-center { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 12px; }
.fold-title { color: var(--gold-bright); letter-spacing: .03em; }
.fold-act { margin-left: 0; color: var(--gold-bright); text-align: right; }
.fold-summary { margin: -4px 0 0; padding: 0 20px 14px; color: #d8d1bf; text-align: center; }
.fold-pill { background: #fbf5e8; }
.organiser-mode .event-pin { margin: 14px 0; padding: 14px 16px 6px; border: 1px solid #c98a2b66; border-radius: 14px; background: var(--onyx); }
.organiser-mode .event-pin .mgmt-title { display: block; margin: 0 0 12px; color: var(--gold-bright); font-family: var(--serif); font-size: 23px; font-weight: 600; letter-spacing: .03em; text-align: center; }
.organiser-mode .event-pin .org-tabs { margin: 0 0 8px; }
@media (max-width: 720px) {
  .fold-head { grid-template-columns: 24px 1fr 44px; }
  .organiser-mode .event-pin { padding: 12px 10px 4px; }
}
/* Inside Event Management, the sub-tab band takes room only when a group with sub-tabs is open. */
.organiser-mode .event-pin .org-tabs:not(.has-subs) .org-subs { min-height: 0; margin-top: 0; }
/* Title truly centred: chevron left, status pills right, no Open/Fold word. */
.fold-head { grid-template-columns: 1fr auto 1fr; }
.fold-head .fold-chev { justify-self: start; }
.fold-head .fold-title { justify-self: center; text-align: center; }
.fold-head .fold-pills { justify-self: end; justify-content: flex-end; }
.fold-head .fold-act { display: none; }
@media (max-width: 720px) {
  .fold-head { grid-template-columns: 24px 1fr 24px; }
  .fold-head .fold-title { justify-self: center; }
  .fold-head .fold-pills { grid-column: 1 / -1; justify-self: center; justify-content: center; }
}

/* SANCTUM headings (1 Nov 2026): Tinos, a sturdier Times-style serif, instead of
   Cormorant Garamond (the player site keeps Cormorant). */
body.organiser-mode { --serif: 'Tinos', 'Liberation Serif', 'Times New Roman', Times, serif; }

/* Energy tile (1 Nov 2026): compact settings with the Energy boosters inside; off = one
   slim row. Backpack and Abilities share the row below. */
.gameplay-panel .energy-group { position: relative; display: grid; gap: 12px; padding: 14px 18px 16px; }
.energy-group .energy-config { position: static; gap: 10px; }
.energy-group .energy-config > .info-tip { position: absolute; top: 14px; right: 14px; }
.energy-group .energy-head { justify-content: flex-start; padding: 0 30px 0 0; gap: 8px 14px; }
.energy-group .energy-head h4 { font-size: 22px; }
.energy-head-note { color: var(--muted); font-size: 13.5px; }
.energy-group .energy-body { grid-template-columns: minmax(0, 1fr) minmax(260px, 360px); grid-template-areas: "fields fields" "empty preview" "empty rate"; gap: 8px 14px; align-items: end; }
.energy-group .energy-fields { grid-area: fields; }
.energy-group .energy-empty { grid-area: empty; display: grid; justify-items: stretch; gap: 5px; padding: 0; text-align: left; }
.energy-group .energy-empty > span { text-align: left; }
.energy-group #energyPreview { grid-area: preview; padding: 8px 12px; }
.energy-group .energy-rate { grid-area: rate; margin: 0; font-size: 12px; text-align: right; }
.energy-group .trial-setup-actions { justify-content: flex-end; margin: 0; }
.energy-group.is-energy-off .energy-body, .energy-group.is-energy-off .energy-boosters { display: none; }
.energy-group.is-energy-off .trial-setup-actions { margin-top: -6px; }
.energy-group.is-energy-off #saveGameplay:disabled { display: none; }
/* Boosters inside the Energy tile. */
.energy-group .energy-boosters { min-height: 0; gap: 8px; padding-top: 12px; border-top: 1px dashed var(--line); background: none; }
.energy-group .energy-boosters .gp-pocket-head { grid-template-columns: 28px auto auto 1fr; justify-items: start; padding-right: 30px; }
.energy-group .energy-boosters .gp-pocket-head h4 { font-size: 18px; text-align: left; }
.energy-group .energy-boosters > .info-tip { top: 14px; right: 0; }
.energy-group .energy-boosters .items-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.energy-group .energy-boosters .empty-sphinx { padding: 8px 0; }
.gameplay-panel .gp-pockets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gameplay-panel .gp-pocket:not(.energy-boosters) { min-height: 0; }
@media (max-width: 900px) {
  .energy-group .energy-body { grid-template-columns: 1fr; grid-template-areas: "fields" "empty" "preview" "rate"; }
  .energy-group .energy-boosters .items-list { grid-template-columns: 1fr; }
  .gameplay-panel .gp-pockets { grid-template-columns: 1fr; }
}
.energy-group .energy-boosters { display: grid; grid-template-columns: auto 1fr; align-items: center; }
.energy-group .energy-boosters .gp-pocket-head { padding-right: 0; }
.energy-group .energy-boosters .items-head { justify-content: flex-end; gap: 12px; padding-right: 30px; margin: 0; }
.energy-group .energy-boosters > .info-tip { top: 18px; }
.energy-group .energy-boosters .items-list { grid-column: 1 / -1; }
.energy-group .energy-boosters .empty-sphinx img { width: 30px; height: 30px; }
.energy-group .energy-boosters .empty-sphinx { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 4px 0; }
.energy-group .energy-boosters .empty-sphinx p { margin: 0; }
.energy-group .energy-boosters .empty-sphinx { flex-wrap: wrap; text-align: center; } .energy-group .energy-boosters .empty-sphinx p { flex: 0 1 auto; min-width: 0; }

/* ---------- Lists, design A (1 Nov 2026) ----------
   Dark green header band with gold titles, white rows joined below it, a coloured
   strip on each row's left by stage, bold first line + quiet second line, "›" to open. */
:root { --strip-draft: #a59a86; }
.form-board-title { display: inline-flex; align-items: center; gap: 10px; }
.form-board-title .info-tip { font-family: var(--sans); font-size: 14px; letter-spacing: 0; }
/* Form tables */
.form-table.table-a { border-collapse: separate; border-spacing: 0; }
body.organiser-mode .form-list .form-table.table-a th { padding: 12px 14px; border: 0; background: var(--onyx); color: var(--gold-bright); font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.form-table.table-a th:first-child { border-radius: 10px 0 0 0; }
.form-table.table-a th:last-child { border-radius: 0 10px 0 0; width: 28px; }
body.organiser-mode .form-list .form-table.table-a td { padding: 13px 14px; border-bottom: 1px solid #efe5cf; background: #fff; vertical-align: middle; }
body.organiser-mode .form-list .form-table.table-a td:first-child { border-left: 5px solid var(--strip, var(--strip-draft)); }
.form-table.table-a tbody tr:last-child td:first-child { border-radius: 0 0 0 10px; }
.form-table.table-a tbody tr:last-child td:last-child { border-radius: 0 0 10px 0; }
body.organiser-mode .form-list .form-table.table-a .form-row:hover td, body.organiser-mode .form-list .form-table.table-a .form-row:focus-visible td { background: #fdf5e2; }
.form-table.table-a .form-number { display: inline-block; padding: 3px 8px; border-radius: 6px; background: var(--onyx); color: var(--gold-bright); font-size: 12.5px; font-weight: 700; letter-spacing: .06em; white-space: nowrap; }
.cell-event b { display: block; color: var(--ink); font-size: 15px; font-weight: 700; line-height: 1.3; }
.cell-event small, .cell-when small { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.cell-when { color: var(--ink); font-weight: 600; white-space: nowrap; }
body.organiser-mode .form-list .form-table.table-a td.cell-updated { color: var(--muted); font-size: 13px; font-weight: 500; white-space: nowrap; }
.cell-go { color: #c9b994; font-size: 20px; text-align: right; }
.form-row:hover .cell-go, .event-row:hover .cell-go { color: var(--dept, #C8553D); }
/* Stage: the code (with its i) and a short phrase; "Your turn" in gold. */
.stage-cell { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.stage-phrase { color: #4d4434; font-size: 13px; line-height: 1.3; }
.stage-cell.is-mine .stage-phrase { color: #8a5a0a; font-weight: 700; }
.stage-cell.is-mine .stage-code { border-color: #d9a441; background: var(--gold-bright); color: #4a3405; }
/* Filter pills: counts coloured only where they matter. */
.form-chip[data-filter="sent"]:not(.is-on) strong { background: #fcebd2; color: #8a5a0a; }
.form-chip[data-filter="approved"]:not(.is-on) strong { background: #e3f0e4; color: #2f6b43; }
.form-chip[data-filter="sent_back"]:not(.is-on) strong { background: #fbe4df; color: #9b2f22; }
/* Department lists in Rows view: the same table look. */
.dept-lists .event-grid.event-rows { gap: 0; }
.dept-lists .event-rows .rows-head, .dept-lists .event-rows .event-row { grid-template-columns: 104px minmax(0, 2.2fr) 150px minmax(0, 1.6fr) 170px 22px; gap: 14px; }
.dept-lists .event-rows .rows-head { top: 76px; padding: 12px 16px 12px 21px; border: 0; border-radius: 10px 10px 0 0; background: var(--onyx); color: var(--gold-bright); font-size: 11.5px; font-weight: 700; letter-spacing: .12em; }
.dept-lists .event-rows .event-row { min-height: 0; padding: 13px 16px; border: 0; border-bottom: 1px solid #efe5cf; border-left: 5px solid var(--strip, var(--strip-draft)); border-radius: 0; background: #fff; box-shadow: none; transform: none; }
.dept-lists .event-rows .event-row:last-child { border-radius: 0 0 10px 10px; border-bottom: 0; }
.dept-lists .event-rows .event-row:hover, .dept-lists .event-rows .event-row:focus-visible { border-color: #efe5cf; border-left-color: var(--strip, var(--strip-draft)); background: #fdf5e2; box-shadow: none; }
.dept-lists .event-rows .event-row.is-form { border-left-style: solid; background: #fff; }
.dept-lists .event-rows .event-row.is-form:hover { background: #fdf5e2; }
.event-rows .row-ids { display: grid; gap: 4px; justify-items: start; }
.event-rows .row-ids span { border-radius: 6px; background: var(--onyx); color: var(--gold-bright); }
.event-rows .row-ids span.is-fid { background: #efe6d3; color: #6d5a37; }
.event-rows .cell-event { min-width: 0; text-align: left; }
.event-rows .cell-event .test-chip { margin-bottom: 3px; }
.event-rows .cell-go { align-self: center; }
@media (max-width: 760px) {
  .dept-lists .event-rows .rows-head { display: none; }
  .dept-lists .event-rows .event-row { grid-template-columns: 90px 1fr 18px; border-radius: 10px; margin-bottom: 8px; border-bottom: 0; }
  .dept-lists .event-rows .event-row .cell-when, .dept-lists .event-rows .event-row .row-stage, .dept-lists .event-rows .event-row .row-status { grid-column: 1 / -1; }
  .dept-lists .event-rows .event-row .cell-go { grid-column: 3; grid-row: 1; }
  .form-table.table-a thead { display: none; }
  .form-table.table-a tr { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; padding: 10px 0; }
  body.organiser-mode .form-list .form-table.table-a td { padding: 2px 10px; border: 0; background: transparent; }
  .form-table.table-a tr { border-left: 5px solid var(--strip); background: #fff; border-radius: 10px; margin-bottom: 8px; }
  body.organiser-mode .form-list .form-table.table-a td:first-child { border-left: 0; }
  .form-table.table-a td.cell-event { grid-column: 2; }
  .form-table.table-a td:nth-child(n+3) { grid-column: 1 / -1; }
  .form-table.table-a td.cell-go { display: none; }
}

/* SANCTUM home (1 Nov 2026): team tiles carry their picture (icon at the top, the
   name and welcome line at the bottom); no › on any tile. */
.home-group .department-tile, .organiser-mode .home-group .department-tile { justify-content: flex-end; padding-bottom: 16px; background-position: center; background-size: cover; }
.home-group .department-tile .department-soon, .organiser-mode .home-group .department-soon { position: static; order: 3; margin-top: 6px; font-size: 10.5px; }
.organiser-mode .home-group .department-sales { background-image: url("/static/teams/sales.webp"); }
.organiser-mode .home-group .department-craft { background-image: url("/static/teams/craft.webp"); }
.organiser-mode .home-group .department-registrations { background-image: url("/static/teams/registrations.webp"); }
.organiser-mode .home-group .department-management { background-image: url("/static/teams/management.webp"); }
.organiser-mode .home-group .department-archives { background-image: url("/static/teams/archives.webp"); }
.organiser-mode .home-group .department-finances { background-image: url("/static/teams/finances.webp"); }
.organiser-mode .home-group .department-architecture { background-image: url("/static/teams/architecture.webp"); }
.organiser-mode .home-group .department-marketing { background-image: url("/static/teams/marketing.webp"); }
.home-group .department-name, .home-group .department-welcome { text-shadow: 0 1px 6px #00000040; }

/* ---------- Event form (1 Nov 2026) ----------
   A wide window; centred title and buttons; three parts (The event · Money · Client
   contact), each made of clearly separated groups. */
.form-dialog { width: min(1180px, calc(100vw - 32px)); max-height: calc(100vh - 40px); }
.form-dialog-heading { position: relative; display: block; text-align: center; }
.form-dialog-heading .dialog-close { position: absolute; top: 0; right: 0; }
.form-dialog-heading h3 { margin-top: 2px; }
.event-form-dialog > .form-actions { justify-content: center; }
.event-form-dialog > .form-actions [data-act="delete"] { order: 3; margin-right: 0; }
.event-form-dialog .form-message { text-align: center; }
.form-part { display: block; min-width: 0; margin: 0 0 18px; padding: 16px 18px 18px; border: 1px solid #d9c9a6; border-radius: 14px; background: #f6eedd; }
.form-part > legend { padding: 4px 14px; border-radius: 999px; background: var(--onyx); color: var(--gold-bright); font-family: var(--serif); font-size: 17px; font-weight: 600; letter-spacing: .02em; }
.form-part > legend small { margin-left: 10px; color: #e9e3d4; font-family: var(--sans); font-size: 12px; font-weight: 500; letter-spacing: 0; }
.form-groups { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr); gap: 12px; }
.form-group { min-width: 0; padding: 12px 14px 14px; border: 1px solid #e6d9bd; border-radius: 11px; background: #fffdf8; }
.form-group.is-wide { grid-column: 1 / -1; }
.form-group > h5 { margin: 0 0 10px; color: #6b5418; font-family: var(--sans); font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.form-group .form-grid { gap: 10px 14px; }
.form-group .form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-group .form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-group .form-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-group .venue-grid { margin: 0; }
.form-group label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.form-group .checkbox-row { display: flex; align-items: center; gap: 8px; align-self: end; }
.form-group.is-category label { color: transparent; font-size: 0; }
.form-group.is-category select { width: 100%; font-size: 15px; }
.form-group .field-note { font-weight: 500; }
.sponsor-list { display: grid; gap: 8px; }
.sponsor-row { display: grid; grid-template-columns: 1fr 1.2fr 1.4fr 34px; gap: 10px; align-items: end; padding-bottom: 8px; border-bottom: 1px dashed #e6d9bd; }
.sponsor-remove { width: 34px; height: 38px; border: 1px solid #e3d6b8; border-radius: 8px; background: #fff; color: #9b2f22; font-size: 18px; cursor: pointer; }
.sponsor-remove[disabled] { display: none; }
.sponsor-add { margin-top: 10px; }
.sponsor-add[disabled] { display: none; }
.sponsor-empty { margin: 0; }
.sponsor-fact { display: block; margin-bottom: 4px; }
.sponsor-fact small { display: block; color: var(--muted); }
.event-form-dialog .form-send-note { margin-top: 2px; }
@media (max-width: 860px) {
  .form-groups { grid-template-columns: 1fr; }
  .form-group .form-grid.two, .form-group .form-grid.three, .form-group .form-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sponsor-row { grid-template-columns: 1fr 34px; }
  .sponsor-row label:nth-child(2), .sponsor-row label:nth-child(3) { grid-column: 1; }
  .sponsor-row .sponsor-remove { grid-column: 2; grid-row: 1; }
}
@media (max-width: 520px) {
  .form-group .form-grid.two, .form-group .form-grid.three, .form-group .form-grid.four { grid-template-columns: 1fr; }
}
.form-group .form-grid > label { align-content: end; }
@media (max-width: 520px) { .form-group .venue-grid { grid-template-columns: 1fr; } .form-group .venue-grid > * { grid-column: 1 / -1; } .form-part { padding: 14px 10px; } }
/* Form 1 / 2 / 3 parts in the site's green (1 Nov 2026); their groups stay white. */
.form-part { border-color: #c98a2b66; background: var(--onyx); }
.form-part > legend { border: 1px solid #c98a2b88; background: #26402f; }
.form-part .m6-locked, .form-part + .m6-history { color: var(--ink); }
/* List header (1 Nov 2026): title + Grid/Rows on one line; tabs with search and sort on their right. */
.dept-lists .list-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.dept-lists .list-head .list-title { margin: 0; }
.dept-lists .list-top { margin-bottom: 14px; }
.dept-lists .list-top .list-tools { margin-left: auto; flex-wrap: nowrap; }
.dept-lists .list-top .list-tools .form-search { flex: 0 1 300px; min-width: 200px; }
.dept-lists .list-top.has-pills { align-items: flex-start; }
.dept-lists .list-top.has-pills .code-pills { flex: 1 1 520px; }
.dept-lists .list-note[hidden] { display: none; }
.dept-lists .list-note { margin: -6px 0 12px; }
@media (max-width: 900px) {
  .dept-lists .list-top .list-tools { flex-wrap: wrap; width: 100%; margin-left: 0; }
  .dept-lists .list-top .list-tools .form-search { flex: 1 1 100%; }
}

/* Dashboard (1 Nov 2026), every department: a green tile; "Dashboard" on the left,
   centred top to bottom; the figures in two columns, name left and number right. */
.dept-dashboard, .organiser-mode .dept-dashboard { display: grid; grid-template-columns: 240px minmax(0, 1fr); padding: 0; overflow: hidden; border: 1px solid #c98a2b66; border-left: 1px solid #c98a2b66; border-radius: 16px; background: var(--onyx); }
.dept-dashboard .dept-dashboard-title { display: flex; align-items: center; justify-content: center; margin: 0; padding: 18px; border-right: 1px solid #ffffff22; color: var(--gold-bright); font-family: var(--serif); font-size: 28px; font-weight: 600; letter-spacing: .06em; text-align: center; }
.dept-dashboard .dept-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 36px; margin: 0; padding: 8px 24px; }
.dept-dashboard .dept-stat { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 6px; border: 0; border-bottom: 1px solid #ffffff1a; }
.dept-dashboard .dept-stat dt { color: #f3ead7; font-family: var(--sans); font-size: 15px; font-weight: 500; }
.dept-dashboard .dept-stat dt small { display: block; margin-top: 2px; color: #e9dfc4b3; font-size: 12px; font-weight: 500; }
.dept-dashboard .dept-stat dd { min-width: 34px; margin: 0; padding: 2px 10px; border-radius: 999px; background: #ffffff14; color: #fff; font-family: var(--sans); font-size: 15px; font-weight: 700; line-height: 1.4; text-align: center; }
.dept-dashboard .dept-stat.is-mine dd { background: var(--gold-bright); color: #2b2a28; }
.dept-dashboard .dept-stat.is-zero dt { color: #f3ead799; }
.dept-dashboard .dept-stat.is-zero dd { background: transparent; color: #ffffff88; }
@media (max-width: 760px) {
  .dept-dashboard, .organiser-mode .dept-dashboard { grid-template-columns: 1fr; }
  .dept-dashboard .dept-dashboard-title { padding: 12px; border-right: 0; border-bottom: 1px solid #ffffff22; font-size: 22px; }
  .dept-dashboard .dept-stats { grid-template-columns: 1fr; padding: 4px 16px 8px; }
}
.dept-dashboard .dept-stat:last-child, .dept-dashboard .dept-stat:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
@media (max-width: 760px) { .dept-dashboard .dept-stat:nth-last-child(2):nth-child(odd) { border-bottom: 1px solid #ffffff1a; } }
/* Stage flags in words (1 Nov 2026): every code chip the same size, no dot or ring. */
.stage-code.is-due { box-shadow: none; }
.stage-code.has-flags::after { content: none; }
.stage-flag { flex-basis: 100%; color: var(--muted); font-size: 12.5px; line-height: 1.3; }
.stage-flag.is-warn { color: #b0362a; font-weight: 700; }
.sb-stage .stage-flag { flex-basis: auto; color: #e9dfc4; }
.sb-stage .stage-flag.is-warn { color: #ff9b8a; }
/* Sent-back forms (1 Nov 2026): the Sphinx's comment and Sales' reply, together above the buttons. */
.form-reply { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid #e3a597; border-left: 5px solid #C8553D; border-radius: 12px; background: #fdf1ee; }
.form-reply-quote { margin: 0; color: #6d2c22; font-size: 14px; }

/* Reviewing a publishing or change request (1 Nov 2026). */
.review-mode #eventPin, .review-mode .event-panel:not(#organizerView), .review-mode #designBar, .review-mode #liveFixBar, .review-mode #testBanner, .review-mode #updatedStamp, .review-mode .publish-tile { display: none !important; }
.review-changes #detailsFold { display: none !important; }
.review-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 14px 0 0; padding: 12px 18px; border: 1px solid #e7c46b; border-left: 6px solid #E39B3A; border-radius: 12px; background: #fff7e3; color: #5c4510; font-size: 14px; }
.review-bar.hidden { display: none; }
.review-what b { margin-right: 8px; color: #3d2e08; }
.review-actions { display: inline-flex; align-items: center; gap: 14px; }
.field-hint.is-form { color: #8a5a0a; font-weight: 600; }
.review-mode #organizerView #listingBar { margin-top: 14px; }
.preview-dialog { width: min(1180px, calc(100vw - 32px)); max-height: calc(100vh - 40px); padding: 0; overflow: auto; border: 1px solid var(--line); border-radius: 16px; background: #14120e; color: #f4ecd8; }
.preview-dialog::backdrop { background: #000a; }
.preview-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; background: #1d1a14; color: #f0c35a; font-size: 15px; }
.preview-body { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 24px; padding: 20px; align-items: start; }
.preview-label { margin: 0 0 8px; color: #c9bfa6; font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.preview-tile { display: block; width: 100%; text-align: left; }
.preview-popup { position: static; display: block; width: 100%; max-height: none; margin: 0; overflow: hidden; border-radius: 14px; }
@media (max-width: 860px) { .preview-body { grid-template-columns: 1fr; } }
/* The preview uses the player site's own colours and fonts, not SANCTUM's. */
.preview-dialog .preview-body { --onyx: #0B0B0A; --onyx-soft: #151412; --onyx-2: #1d1b17; --onyx-3: #2a261e; --gold-brand: #C9A227; --gold-bright: #E4C158;
  --parchment: #F1ECE0; --line-on-dark: rgba(201, 162, 39, 0.35); --serif: 'Cormorant Garamond', Georgia, serif; --ink: #2A2723; --muted: #7d7360;
  --gold: #C9A227; --paper: #F1ECE0; --panel: #F8F4EA; --line: #d9d1bf; }

/* Folding sections and the Approvals rows (1 Nov 2026). */
.section-toggle { display: inline-flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; cursor: pointer; }
.section-chevron { display: inline-block; font-size: .7em; color: var(--muted); transition: transform .15s ease; }
.is-folded .section-chevron { transform: rotate(-90deg); }
.section-count { padding: 2px 10px; border-radius: 999px; background: #fdf1d6; color: #8a5a0a; font: 700 13px var(--sans); font-style: normal; letter-spacing: .02em; }
.is-folded > .section-body, .dept-lists.is-folded .list-head-tools { display: none; }
.dept-lists.is-folded .list-head { margin-bottom: 0; }
.dept-lists .approval-rows .rows-head, .dept-lists .approval-rows .event-row { grid-template-columns: minmax(0, 1fr) minmax(0, .8fr) minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) 22px; gap: 20px; }
.approval-rows .cell-request b { display: block; color: var(--ink); font-size: 14.5px; font-weight: 700; }
.approval-rows .cell-request small { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; }
.sphinx-inbox .list-top { margin-bottom: 14px; }
.approval-rows .cell-phone { display: none; }
@media (max-width: 760px) {
  .dept-lists .approval-rows .event-row { grid-template-columns: 1fr 18px; }
  .dept-lists .approval-rows .event-row .cell-request { grid-column: 1; grid-row: 1; }
  .dept-lists .approval-rows .event-row .row-ids { grid-column: 1; grid-row: 2; display: flex; gap: 6px; }
  .dept-lists .approval-rows .event-row .cell-event { grid-column: 1; grid-row: 3; }
  .dept-lists .approval-rows .event-row .cell-when { display: none; }
  .dept-lists .approval-rows .event-row .cell-phone { display: block; grid-column: 1; grid-row: 4; color: var(--muted); font-size: 12.5px; }
  .dept-lists .approval-rows .event-row .cell-go { grid-column: 2; grid-row: 1; }
  .sphinx-inbox .list-tabs { flex-wrap: nowrap; overflow-x: auto; }
  .sphinx-inbox .list-tabs button { white-space: nowrap; }
}

/* Bell (1 Nov 2026): what is waiting for you. */
.header-right { position: relative; }
.header-bell { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid #f0c35a55; border-radius: 50%; background: #ffffff12; color: #f3ead7; cursor: pointer; }
.header-bell:hover, .header-bell[aria-expanded="true"] { border-color: var(--gold-bright); color: var(--gold-bright); }
.header-bell.hidden { display: none; }
.bell-count { position: absolute; top: -5px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: #c0392b; color: #fff; font: 700 11px/19px var(--sans); text-align: center; box-shadow: 0 0 0 2px var(--onyx-soft, #294233); }
.bell-count[hidden] { display: none; }
.bell-panel { position: absolute; top: calc(100% + 12px); right: 0; z-index: 80; width: min(400px, calc(100vw - 24px)); max-height: min(70vh, 560px); overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--ink); box-shadow: 0 20px 50px #00000045; text-align: left; }
.bell-head { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; padding: 13px 16px; border-bottom: 1px solid #efe5cf; background: var(--panel); font-size: 14px; }
.bell-head span { color: var(--muted); font-weight: 700; }
.bell-group { margin: 0; padding: 10px 16px 4px; color: #6b5f45; font: 800 11px var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.bell-item { display: grid; gap: 2px; width: 100%; padding: 11px 16px 11px 13px; border: 0; border-left: 3px solid #E39B3A; border-bottom: 1px solid #f3ead7; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.bell-item:hover, .bell-item:focus-visible { background: #fdf5e2; outline: none; }
.bell-what { color: #8a5a0a; font-size: 12.5px; font-weight: 700; }
.bell-name { color: var(--ink); font-size: 14.5px; font-weight: 600; }
.bell-name em { margin-left: 4px; color: var(--muted); font-size: 12px; font-style: normal; font-weight: 600; letter-spacing: .04em; }
.bell-note { color: var(--muted); font-size: 12.5px; }
.bell-empty { margin: 0; padding: 18px 16px; color: var(--muted); font-size: 14px; }
@media (max-width: 560px) {
  .bell-panel { position: fixed; top: 70px; right: 12px; left: 12px; width: auto; }
}
@media (max-width: 560px) {
  .header-bell { width: 32px; height: 32px; }
  .header-bell svg { width: 17px; height: 17px; }
  .bell-count { top: -4px; right: -5px; min-width: 17px; height: 17px; font-size: 10px; line-height: 17px; }
  body.organiser-mode .header-right { gap: 8px; }
  .dept-lists .list-head .list-title { font-size: 21px; }
  .section-toggle { text-align: left; }
}
@media (max-width: 430px) { #craftBoardTitle.is-located { font-size: .8rem; letter-spacing: .03em; } #craftBoardTitle .where { gap: .4em; } }

/* List header (1 Nov 2026): search and sort on the title line; Grid/Rows as icons;
   the stage cell as code and i on top, the words below. */
.view-switch button { display: inline-grid; place-items: center; padding: 5px 9px; }
.view-switch button svg { display: block; }
.dept-lists .list-head-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.dept-lists .list-head-tools .list-tools { flex-wrap: nowrap; }
.dept-lists .list-head-tools .form-search { flex: 0 1 280px; min-width: 200px; }
.dept-lists .list-top:empty { display: none; }
.stage-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.stage-cell .stage-flag { flex-basis: auto; }
@media (max-width: 760px) {
  .dept-lists .list-head-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; width: 100%; margin-left: 0; }
  .dept-lists .list-head-tools .list-tools { display: contents; }
  .dept-lists .list-head-tools .form-search { grid-column: 1 / -1; min-width: 0; }
  .dept-lists .list-head-tools .list-sort { width: 100%; }
}

/* Tabs flow into the page below (1 Nov 2026): no gap between Event Management and the
   tab's content; the active tab runs down into a line in the department's colour
   along the top of the content. */
.organiser-mode .event-pin { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; border-radius: 14px 14px 0 0; }
.organiser-mode .event-pin .org-tabs { margin-bottom: 0; }
.organiser-mode .event-pin .org-main { padding-bottom: 0; border-bottom: 0; border-radius: 12px 12px 0 0; }
.organiser-mode .event-pin .org-tab.active { border-radius: 9px 9px 0 0 !important; padding-bottom: 11px; }
.organiser-mode .event-pin .org-tabs.has-subs .org-tab.active::before, .organiser-mode .event-pin .org-tabs.has-subs .org-tab.active::after { display: none; }
.organiser-mode .event-pin ~ .event-panel:not(.hidden) { margin-top: 0; border-top: 4px solid var(--tab-teal); }
.organiser-mode .event-pin ~ .event-panel:not(.hidden) > .organizer-stack { padding-top: 0; margin-top: 0; }
/* :not(#a):not(#b) outweighs the shared panel rules, whose :is() lists carry an id. */
.organiser-mode .event-pin ~ .event-panel:not(.hidden) > .organizer-stack > .panel:first-child:not(#a):not(#b),
.organiser-mode .event-pin ~ .event-panel:not(.hidden) > .panel:first-child:not(#a):not(#b),
.organiser-mode .event-pin ~ .event-panel:not(.hidden) > .lock-banner:not(#a):not(#b),
.organiser-mode .event-pin ~ .event-panel:not(.hidden) > .quickview > :first-child:not(#a):not(#b),
.organiser-mode .event-pin ~ .event-panel:not(.hidden) > .lock-banner.hidden + .panel:not(#a):not(#b),
.organiser-mode .event-pin ~ .event-panel:not(.hidden) > .ro-note + .panel:not(#a):not(#b),
.organiser-mode .event-pin ~ .event-panel:not(.hidden) > :first-child:not(#a):not(#b) { margin-top: 0; border-top-left-radius: 0 !important; border-top-right-radius: 0 !important; }
.organiser-mode .event-pin ~ .event-panel:not(.hidden) > .ro-note { margin-bottom: 0; border-top: 0; border-radius: 0; }
@media (max-width: 720px) {
  /* Tabs wrap onto two lines on a phone: the bar meets the line, the active tab stays whole. */
  .organiser-mode .event-pin .org-main { padding-bottom: 4px; }
  .organiser-mode .event-pin .org-tab.active { border-radius: 9px !important; padding-bottom: 7px; }
}

/* Event Management tabs in the main tiles' green for every department (1 Nov 2026). */
body.organiser-mode { --tab-teal: #2F4A3A; }
.organiser-mode .event-pin .org-tabs { --onyx: var(--tab-teal); }

/* Story Board (2 Nov 2026): no title; Prologue | Epilogue, the challenge stories, then
   the two winner messages and the wrong-answer message, each a white tile straight on
   the green (as in Event details). */
.story-panel .story-bookends.cfg-tile:not(#a) { padding: 0; background: transparent; }
.story-panel .board-grid .board-box:not(.board-ending) { grid-column: auto; }
.story-panel .board-grid .board-box.board-chapters:not(.board-ending) { grid-column: 1 / -1; }
.story-panel .ct-box.board-box { padding: 14px 16px; border: 0; border-radius: 12px; background: #fff; }
.story-panel .trial-setup-actions { justify-content: center; }
/* No focus ring on the Event Management tabs once clicked (keyboard focus still shows). */
.organiser-mode .event-pin .org-tab:focus:not(:focus-visible) { outline: none; box-shadow: none; }

/* Event details fold (2 Nov 2026): no one-line note; a bigger gold triangle. */
.details-fold .fold-summary { display: none !important; }
.fold-head .fold-chev { display: inline-grid; place-items: center; width: 30px; height: 30px; color: var(--gold-bright); font-size: 24px; }

/* Gameplay Mechanics (2 Nov 2026): no page title; each tile opens with a green title
   bar (name and on/off switch centred) set inside the white tile with a thin bezel.
   Backpack and Abilities keep a fixed height; their lists scroll inside. */
.gameplay-panel .energy-head, .gameplay-panel .gp-pocket-head { display: grid !important; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: -8px -10px 4px; padding: 10px 44px 10px 14px !important; border-radius: 9px; background: var(--onyx); }
.gameplay-panel .head-mid { grid-column: 2; display: inline-flex; align-items: center; gap: 12px; }
.gameplay-panel .energy-head h4, .gameplay-panel .gp-pocket-head h4 { margin: 0; color: var(--gold-bright) !important; }
.gameplay-panel .head-mid .gameplay-switch span:last-child { color: #e9e3d4; }
.gameplay-panel .energy-head-note { display: none; }
.gameplay-panel .gp-pocket-icon { grid-column: 1; justify-self: start; color: #e9e3d4; }
.gameplay-panel .gp-pocket > .info-tip, .gameplay-panel .energy-config > .info-tip { top: 15px !important; right: 15px !important; z-index: 2; }
.gameplay-panel .gp-pocket > .info-tip .info-btn, .gameplay-panel .energy-config > .info-tip .info-btn { background: transparent; border-color: #e9e3d4; color: #e9e3d4; }
.gameplay-panel .energy-group:not(#a) { padding: 14px 16px; }
.gameplay-panel .energy-group:has(.energy-config.is-off):not(#a) { padding-bottom: 6px; }
.gameplay-panel .energy-group .energy-config.is-off .energy-head { margin-bottom: 0; }
.gameplay-panel .energy-boosters .gp-pocket-head { margin: 0 0 4px; }
.gameplay-panel .gp-pockets .gp-pocket { height: calc(100vh - 120px); min-height: 360px; }
.gameplay-panel .gp-pockets .gp-pocket .items-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-right: 4px; }
@media (max-width: 720px) {
  .gameplay-panel .gp-pockets .gp-pocket { height: 75vh; }
}
.energy-group.is-energy-off .trial-setup-actions:has(#saveGameplay:disabled) { display: none; }
.gameplay-panel .energy-group .energy-boosters .gp-pocket-head:not(#a) { grid-column: 1 / -1; grid-template-columns: 1fr auto 1fr; justify-items: stretch; margin: 0 0 4px; padding: 10px 44px 10px 14px !important; }
.gameplay-panel .energy-group .energy-boosters .gp-pocket-head h4 { font-size: 16px; }
.gameplay-panel .energy-group .energy-boosters > .info-tip:not(#a) { top: 21px !important; right: 9px !important; }
.gameplay-panel .energy-group .energy-boosters > .items-head, .gameplay-panel .energy-group .energy-boosters > .items-list { grid-column: 1 / -1; }
.gameplay-panel .gp-pockets .items-list:has(> .empty-sphinx) { display: flex; flex-direction: column; justify-content: center; }
.gameplay-panel .gp-pockets .items-list > .empty-sphinx { flex: 0 0 auto; height: auto; min-height: 0; }

/* Gameplay Mechanics, second pass (2 Nov 2026).
   Title bars: icon | i, name, switch (centre) | + on the right.
   Energy: two rows of two (labels beside their boxes), the message row, the longest
   possible event, Save centred; no preview bar.
   Backpack · Boosters · Abilities: three equal columns, as tall as the screen,
   lists scrolling inside; Boosters only while the bar is on. */
.gameplay-panel .energy-head:not(#a), .gameplay-panel .gp-pocket-head:not(#a) { padding: 10px 14px !important; }
.gameplay-panel .head-mid .info-tip { position: static !important; }
.gameplay-panel .head-mid .info-btn { background: transparent !important; border-color: #e9e3d4 !important; color: #e9e3d4 !important; }
.gameplay-panel .gp-pocket-head .plus-button { grid-column: 3; justify-self: end; background: transparent; border-color: var(--gold-bright); color: var(--gold-bright); }
.gameplay-panel .gp-pocket-head .plus-button:hover { background: #ffffff1a; }
.gameplay-panel .gp-pocket .items-head:not(#a) { justify-content: space-between; min-height: 0; margin: 0; padding: 0; }
.gameplay-panel #energyPreview, .gameplay-panel .energy-rate { display: none !important; }
.gameplay-panel .energy-group .energy-body:not(#a) { display: grid; grid-template-columns: 1fr; grid-template-areas: none; gap: 12px; padding: 4px 6px 0; align-items: stretch; }
.gameplay-panel .energy-group .energy-body > *:not(#a) { grid-area: auto; grid-column: 1; }
.gameplay-panel .energy-group .energy-fields:not(#a) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 32px; }
.gameplay-panel .energy-field:not(#a) { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0; padding: 0; text-align: left; }
.gameplay-panel .energy-field > span:first-child:not(#a) { flex: 0 0 150px; margin: 0; color: #6b5418; font-size: 14px; font-weight: 700; line-height: 1.2; text-align: left; white-space: nowrap; }
.gameplay-panel .energy-fields .energy-field:nth-child(even) > span:first-child:not(#a) { flex-basis: 190px; }
.gameplay-panel .energy-field input:not(#a) { height: 44px; box-sizing: border-box; margin: 0; padding: 0 12px; font-size: 15px; font-weight: 600; text-align: left; }
.gameplay-panel .energy-fields .energy-field:first-child input:not(#a) { flex: 1 1 auto; min-width: 0; width: auto; }
.gameplay-panel .energy-fields .unit-input:not(#a) { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; margin: 0; color: var(--muted); font-size: 14px; font-weight: 600; }
.gameplay-panel .energy-fields .unit-input > * { margin: 0 !important; }
.gameplay-panel #deskAmount { order: 0; }
.gameplay-panel .energy-fields .unit-input > span:first-child:not(:last-child) { display: none; }
.gameplay-panel .energy-fields .unit-input input:not(#a) { width: 90px; }
.gameplay-panel .energy-fields .follow-switch:not(#a) { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 0 10px; font-size: 14px; white-space: nowrap; }
.gameplay-panel .energy-group .energy-empty:not(#a) { display: flex; }
.gameplay-panel .energy-empty input:not(#a) { flex: 1 1 auto; min-width: 0; }
.gameplay-panel .energy-config > .trial-setup-actions:not(#a) { justify-content: center; margin: 12px 0 0; }
.gameplay-panel .energy-group.is-energy-off .energy-body:not(#a) { display: none; }
.gameplay-panel .energy-group.is-energy-off .energy-config > .trial-setup-actions:not(#a) { margin-top: 8px; }
.gameplay-panel .gp-pockets:not(#a) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gameplay-panel .gp-pockets .energy-boosters:not(#a) { display: flex; flex-direction: column; align-items: stretch; gap: 10px; min-height: 360px; padding: 14px 16px; border: 0; border-top: 0; border-radius: 12px; background: #fff; }
.gameplay-panel .gp-pockets .energy-boosters .gp-pocket-head:not(#a) { grid-column: auto; grid-template-columns: 1fr auto 1fr; justify-items: stretch; margin: -8px -10px 4px; }
.gameplay-panel .gp-pockets .energy-boosters .gp-pocket-head h4 { font-size: 16px; text-align: center; }
.gameplay-panel .gp-pockets .items-list:not(#a) { grid-template-columns: 1fr; align-content: start; }
@media (max-width: 1100px) {
  .gameplay-panel .energy-group .energy-fields:not(#a) { grid-template-columns: 1fr; }
  .gameplay-panel .energy-fields .energy-field:nth-child(even) > span:first-child:not(#a) { flex-basis: 150px; }
  .gameplay-panel .gp-pockets:not(#a), .gameplay-panel .gp-pockets.is-energy-off:not(#a) { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .gameplay-panel .energy-field:not(#a), .gameplay-panel .energy-group .energy-empty:not(#a) { flex-wrap: wrap; }
  .gameplay-panel .energy-field > span:first-child:not(#a) { flex-basis: 100%; }
}

/* Event POC: the email sent on publishing (2 Nov 2026). */
.poc-email { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); }
.poc-email h4 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 10px; color: var(--gold-bright); font-family: var(--serif); font-size: 19px; }
.poc-email-body summary { margin-top: 10px; cursor: pointer; color: var(--gold-bright); font-weight: 700; }
.poc-email-body pre { margin: 8px 0 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fffdf7; white-space: pre-wrap; font: 13.5px/1.5 var(--sans); color: var(--ink); }
.poc-email .form-actions { margin-top: 10px; }

/* Bar settings as small tiles (2 Nov 2026, option A): each label beside its box inside
   its own beige tile, all four tiles one height on one line (the Use Event Duration
   switch sits inside the Bar Duration tile, after "min"); the message tile below. */
.gameplay-panel .energy-group .energy-fields:not(#a) { display: flex; flex-wrap: nowrap; align-items: stretch; justify-content: space-between; gap: 10px; }
.gameplay-panel .energy-fields .energy-field:not(#a), .gameplay-panel .energy-group .energy-empty:not(#a) { display: flex; flex: 1 1 auto; min-width: 0; align-items: center; gap: 8px; min-height: 0; padding: 8px 10px; border: 1px solid #e3d6b8; border-radius: 10px; background: #fbf6ea; }
.gameplay-panel .energy-fields .energy-field > span:first-child:not(#a), .gameplay-panel .energy-fields .energy-field:nth-child(even) > span:first-child:not(#a), .gameplay-panel .energy-group .energy-empty > span:first-child:not(#a) { flex: 0 0 auto; font-size: 13.5px; }
.gameplay-panel .energy-fields .energy-field:first-child input:not(#a) { flex: 1 1 120px; width: auto; min-width: 90px; }
.gameplay-panel .energy-fields .unit-input:not(#a) { gap: 6px; }
.gameplay-panel .energy-fields .unit-input input:not(#a) { width: 64px; padding: 0 8px; }
.gameplay-panel .energy-fields .follow-switch:not(#a) { gap: 6px; margin: 0 0 0 2px; font-size: 12.5px; }
.gameplay-panel .energy-group .energy-empty:not(#a) { display: flex; }
@media (max-width: 1180px) {
  .gameplay-panel .energy-group .energy-fields:not(#a) { flex-wrap: wrap; }
  .gameplay-panel .energy-fields .energy-field:not(#a) { flex: 1 1 calc(50% - 5px); }
}
@media (max-width: 560px) {
  .gameplay-panel .energy-fields .energy-field:not(#a), .gameplay-panel .energy-group .energy-empty:not(#a) { flex: 1 1 100%; flex-wrap: wrap; }
}

/* Bar tiles, final (2 Nov 2026): four tiles of equal width and height, labels and
   boxes on one line in every tile; "Use Event Duration" is a small checkbox in the
   Bar Duration tile's bottom space, centred under its box. */
.gameplay-panel .energy-fields .energy-field:not(#a) { flex: 1 1 0; justify-content: center; padding: 16px 10px 22px; }
.gameplay-panel .energy-fields .energy-field:nth-child(2):not(#a) { position: relative; display: flex; }
.gameplay-panel .energy-fields .follow-check { position: absolute; left: 0; right: 0; bottom: 4px; display: flex; align-items: center; justify-content: center; gap: 5px; margin: 0; color: var(--muted); font-size: 11.5px; font-weight: 600; cursor: pointer; }
.gameplay-panel .energy-fields .follow-check input:not(#a) { width: 14px; height: 14px; min-height: 0; margin: 0; padding: 0; accent-color: #3f8f5d; }
.gameplay-panel .energy-fields .energy-field:first-child input:not(#a) { flex: 1 1 auto; min-width: 0; }
.gameplay-panel .energy-group .energy-empty:not(#a) { padding: 8px 10px; }
@media (max-width: 1180px) { .gameplay-panel .energy-fields .energy-field:not(#a) { flex: 1 1 calc(50% - 5px); } }
@media (max-width: 560px) { .gameplay-panel .energy-fields .energy-field:not(#a) { flex: 1 1 100%; } }

/* Bar off (2 Nov 2026): the Boosters tile stays in place, dulled and locked; its boosters are kept. */
.gameplay-panel .gp-pockets.is-energy-off .energy-boosters:not(#a) { background: #f3f2ee; }
.gameplay-panel .gp-pockets.is-energy-off .energy-boosters > :not(.boosters-off-note) { opacity: .45; filter: grayscale(1); }
.gameplay-panel .gp-pockets.is-energy-off .energy-boosters .items-list,
.gameplay-panel .gp-pockets.is-energy-off .energy-boosters .bare-switch,
.gameplay-panel .gp-pockets.is-energy-off .energy-boosters #addSupply { pointer-events: none; }
.boosters-off-note { margin: 0; font-size: 12.5px; text-align: center; color: #5b5b55; }

/* Registration settings (2 Nov 2026): three lights with hover details; Pause row for the Sphinx. */
.bulb-black { background: #1d1d1b; }
.reg-settings:not(#a) { padding: 4px 6px; }
.reg-settings-head { background: var(--tab-teal, #2F4A3A); color: #e9c46a; font-family: Georgia, serif; font-size: 15px; text-align: center; padding: 6px; border-radius: 9px; }
.reg-lights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 10px 8px; }
.reg-light { position: relative; display: flex; align-items: center; justify-content: center; gap: 9px; font-size: 14px; font-weight: 600; color: #2b2b28; cursor: help; outline: none; }
.reg-light + .reg-light { border-left: 1px solid #ece7da; }
.reg-light small { font-weight: 500; color: #6f6a5a; font-size: 12.5px; }
.reg-pop { display: none; position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 30; width: max-content; max-width: 340px; flex-direction: column; gap: 2px;
  background: #1f2a24; color: #f3efe3; font-size: 12.5px; font-weight: 500; line-height: 1.5; padding: 9px 12px; border-radius: 9px; box-shadow: 0 6px 18px rgba(0,0,0,.25); text-align: left; }
.reg-pop b { color: #e9c46a; }
.reg-light:hover .reg-pop, .reg-light:focus .reg-pop { display: flex; }
.reg-pause-row { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 9px; border-top: 1px solid #ece7da; font-size: 14px; }
.reg-pause-row.hidden { display: none; }
.reg-pause-row .pause-field { display: flex; align-items: center; gap: 8px; }
.reg-pause-row .pause-field.hidden { display: none; }
.reg-pause-row select:not(#a) { width: 110px; height: 30px; padding: 0 8px; font-size: 13.5px; }
@media (max-width: 700px) {
  .reg-lights { grid-template-columns: 1fr; gap: 8px; }
  .reg-light + .reg-light { border-left: 0; }
  .reg-pop { left: 0; transform: none; }
}
.lb-actions:has(.spot-live-switch) { display: flex; align-items: center; justify-content: flex-end; gap: 16px; flex-wrap: wrap; }
.spot-live-switch { margin: 0; gap: 10px; }
.spot-live-switch.is-readonly { opacity: .6; }

/* Bar off (2 Nov 2026): the settings stay in place, dulled and locked, instead of collapsing. */
.gameplay-panel .energy-group.is-energy-off .energy-body:not(#a):not(#b) { display: grid; opacity: .45; filter: grayscale(1); pointer-events: none; user-select: none; }

/* Trial Crafting (2 Nov 2026): no tab title; the Total Trials / Trial tree template tile as slim as it goes. */
#trialConfigView .trial-panel > .dark-title { display: none; }
#pathsTile.trial-setup-tile:not(#a) { gap: 8px; padding: 10px 12px; }
#pathsTile .trial-setup-grid:not(#a) { grid-template-columns: minmax(150px, 200px) minmax(0, 1fr); gap: 10px; }
#pathsTile .ct-box:not(#a) { padding: 8px 12px 10px; gap: 6px; min-height: 0; align-content: start; }
#pathsTile .ct-box > h5:not(#a) { margin: 0; font-size: 15px; line-height: 1.3; }
#pathsTile .ct-box > .info-tip:not(#a) { top: 6px; right: 8px; }
#pathsTile #plannedTrialsInput:not(#a) { height: 40px; width: 96px; padding: 0; font-size: 17px; }
#pathsTile .template-row:not(#a) { flex-direction: row; justify-content: center; gap: 10px 26px; flex-wrap: wrap; }
#pathsTile .template-row .template-picker:not(#a) { flex: 0 1 auto; gap: 4px 18px; }
#pathsTile .template-row .template-option:not(#a) { padding: 2px 0; }
#pathsTile .trial-setup-actions:not(#a) { margin: 0; }
#pathsTile #saveTrialSetup:not(#a) { padding: 5px 22px; min-height: 0; }
@media (max-width: 760px) { #pathsTile .trial-setup-grid:not(#a) { grid-template-columns: minmax(0, 1fr); } }

/* My Team: the registration code (5 Nov 2026). */
.team-name-tile .team-reg-code { display: grid; gap: 4px; margin: 14px 0 0; }
.team-name-tile .team-reg-code code { justify-self: start; padding: 6px 12px; border: 1px solid #c9a227; border-radius: 8px; background: #0b0b0a; color: #f3d27a; font: 700 20px/1.2 Menlo, Consolas, monospace; letter-spacing: .24em; }

/* Live Event → Manage: Find by registration code (5 Nov 2026). */
.find-code { position: relative; display: grid; gap: 8px; }
.find-code-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; }
.find-code-line input:not(#a) { width: 9em; text-transform: uppercase; letter-spacing: .18em; font-family: Menlo, Consolas, monospace; }
.find-code-result { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 14px; }
.find-code-result.is-miss { color: #b3261e; }
.find-code-status { padding: 2px 8px; border-radius: 999px; background: #eee; font-size: 12px; font-weight: 700; }
.find-code-status.is-accepted { background: #e3f4e6; color: #1e6b32; }
.find-code-status.is-rejected, .find-code-status.is-withdrawn { background: #fbe4e2; color: #b3261e; }
.find-code-status.is-pending { background: #fff1d6; color: #8a5a00; }
.map-strip.is-dulled { filter: grayscale(1); }

/* Registrations tile: counts and Map with paths (5 Nov 2026). */
.reg-settings .reg-counts { width: 100%; border-collapse: separate; border-spacing: 0; margin: 8px 0 4px; border: 1px solid #e6dcc2; border-radius: 10px; overflow: hidden; table-layout: fixed; }
.reg-settings .reg-counts th:not(#a) { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #8a7a52; font-weight: 700; padding: 8px 10px; background: #f6f2e6; text-align: center; border-left: 1px solid #e6dcc2; }
.reg-settings .reg-counts td:not(#a) { font: 700 20px/1.2 Georgia, serif; color: #1d1a14; padding: 8px 10px; text-align: center; border-left: 1px solid #e6dcc2; border-top: 1px solid #e6dcc2; }
.reg-settings .reg-counts th:first-child:not(#a), .reg-settings .reg-counts td:first-child:not(#a) { border-left: 0; }
.reg-settings .reg-counts td small { font: 400 13px/1 Inter, system-ui, sans-serif; color: #8a7a52; margin-left: 5px; }
@media (max-width: 700px) {
  .reg-settings .reg-counts, .reg-settings .reg-counts tbody { display: block; }
  .reg-settings .reg-counts thead { display: none; }
  .reg-settings .reg-counts tr { display: grid; }
  .reg-settings .reg-counts td:not(#a) { display: flex; justify-content: space-between; align-items: baseline; border-left: 0; text-align: left; font-size: 17px; }
  .reg-settings .reg-counts td::before { content: attr(data-k); font: 700 11px/1.4 Inter, system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #8a7a52; margin-right: auto; }
  .reg-settings .reg-counts td small { margin-left: 6px; }
  .reg-settings .reg-counts tr td:first-child:not(#a) { border-top: 0; }
}
.reg-settings .map-row { position: relative; margin-top: 8px; padding: 8px 44px 8px 14px; border: 1px solid #e6dcc2; border-radius: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.reg-settings .map-row.hidden { display: none; }
.reg-settings .map-row .map-switch:not(#a) { display: inline-flex; flex-direction: row; align-items: center; gap: 14px; margin: 0; cursor: pointer; }
.reg-settings .map-row .map-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.reg-settings .map-row .path-slots { margin-left: auto; display: grid; grid-auto-flow: column; grid-auto-columns: 96px; gap: 8px; }
.reg-settings .map-row .path-slot { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: #f6f2e6; font-size: 14px; white-space: nowrap; }
.reg-settings .map-row .path-slot b { color: #6b5418; }
.reg-settings .map-row .path-slot span { font-weight: 700; }
.reg-settings .map-row .path-slot span.is-blank { color: #bbb; font-weight: 400; }
.reg-settings .map-row > .info-tip { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }
@media (max-width: 700px) { .reg-settings .map-row .path-slots { margin-left: 0; grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); grid-auto-columns: auto; } }
.map-ready-dialog h2 { margin: 0 0 6px; }
.map-ready-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; font-size: 15px; }
.map-ready-list li.is-ok b { color: #1e6b32; }
.map-ready-list li.is-no b { color: #b3261e; }

/* Live event settings (Sphinx) and the Spot registration button (5 Nov 2026). */
.live-settings .ls-row { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding-right: 44px !important; margin-top: 12px; }
.live-settings .ls-row > .info-tip { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }
.live-settings .ls-switch:not(#a) { display: inline-flex; flex-direction: row; align-items: center; gap: 14px; margin: 0; cursor: pointer; }
.live-settings .ls-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.live-settings .ls-choices { display: inline-flex; flex-wrap: wrap; gap: 16px; }
.live-settings .ls-radio:not(#a) { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; margin: 0; font-size: 14px; }
.live-settings .ls-radio input:not(#a) { width: auto; margin: 0; }
.spot-btn-wrap { position: relative; display: inline-grid; justify-items: center; gap: 4px; }
.spot-btn-wrap .spot-places { font-size: 12px; color: #e9dcb4; }
.spot-btn-wrap .spot-places b { color: #f3d27a; }
#openSpotTeam.is-off:not(#a) { opacity: .45; filter: grayscale(.6); cursor: not-allowed; }
.spot-btn-wrap .spot-pop { position: absolute; top: calc(100% + 8px); right: 0; width: 250px; background: #fffdf7; color: #1d1a14; border: 1px solid #c9a227; border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.45; box-shadow: 0 8px 24px rgba(0,0,0,.3); z-index: 20; text-align: left; }
.spot-btn-wrap:hover .spot-pop:not(:empty), .spot-btn-wrap:focus-within .spot-pop:not(:empty) { display: block; }
.spot-btn-wrap .spot-pop { display: none; }
.map-switch input:checked + .toggle-switch, .ls-switch input:checked + .toggle-switch { background: #5b9b66; }
.map-switch input:checked + .toggle-switch::after, .ls-switch input:checked + .toggle-switch::after { transform: translateX(15px); }
.map-switch input:focus-visible + .toggle-switch, .ls-switch input:focus-visible + .toggle-switch { outline: 2px solid #c9a227; outline-offset: 2px; }

/* Trial Tree (5 Nov 2026): muted dashed blocks named 1A / 2AB / 3, tinted by Trial,
   joined by soft grey dashed lines. The tint is set inline per Trial. */
.tree-node:not(#a) { transform: translate(-50%, -23px); }
.tree-dot:not(#a) { width: 84px; height: 46px; padding: 0; border: 2px dashed #b9ae92; border-radius: 8px; color: #6b6250; font: 800 16px/1 Inter, system-ui, sans-serif; letter-spacing: .03em; }
.tree-lines path:not(.tree-hop):not(#a) { stroke: #b9ae92; stroke-width: 2; stroke-dasharray: 4 4; }
.tree-node.is-warning .tree-dot:not(#a) { border-color: #e08a1e; border-style: solid; }
.tree-node.is-error .tree-dot:not(#a) { border-color: var(--red); border-style: solid; }
.tree-node.is-open .tree-dot:not(#a) { border-color: #8a7a52; box-shadow: 0 0 0 3px #c9a22733; }
.tree-cols .tree-col { letter-spacing: .14em; }
.tree-plain .tree-plain-title { margin: 0 0 6px; font-family: Georgia, serif; font-size: 18px; color: #3b3220; }
.tree-plain .tree-preview-note { margin: 6px 0 0; text-align: center; font-size: 12px; color: #8a7a52; }
.trial-tree-panel .game-tree-tile { margin-top: 14px; }

/* Story Board (5 Nov 2026). */
.sb-story-tile .sb-tabs:not(#a) { display: flex; gap: 6px; overflow-x: auto; flex-wrap: nowrap; }
.sb-story-tile .trial-tab:not(#a) { flex: 0 0 auto; min-width: 64px; white-space: nowrap; }
.status-light.is-half:not(#a) { background: #e08a1e; }
.sb-panel { border: 1px solid #e6dcc2; border-top: 2px solid #c9a227; background: #fbf4e2; border-radius: 0 0 12px 12px; padding: 16px; display: grid; gap: 12px; }
.sb-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 800px) { .sb-two { grid-template-columns: 1fr; } }
.sb-pane { background: #fff; border: 1px solid #e6dcc2; border-radius: 12px; padding: 14px; display: grid; gap: 8px; align-content: start; }
.sb-pane.is-focus { box-shadow: 0 0 0 2px #c9a22766; }
.sb-pane h5 { margin: 0; font-family: Georgia, serif; font-size: 16px; color: #6b5418; }
.sb-pane p.muted { margin: 0; }
.sb-pane textarea { width: 100%; box-sizing: border-box; }
.sb-actions { display: flex; justify-content: center; }
.sb-empty { margin: 8px 0; text-align: center; }
.sb-tree, .board-endings { margin-top: 14px; }
.tree-plain-title small { font: 400 12px Inter, system-ui, sans-serif; color: #8a7a52; margin-left: 8px; }
.sb-tree .tree-node:not(#a) { cursor: pointer; }
.sb-tree .tree-node:hover .tree-dot { border-color: #8a7a52; }
.tree-dot-wide:not(#a) { width: 100px; font-size: 14px; }
.wrong-default-tile { position: relative; display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding-right: 44px !important; margin-bottom: 12px; }
.wrong-default-tile input:not(#a) { flex: 1; min-width: 240px; width: auto; }
.wrong-default-tile > .info-tip { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }
.story-link-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 18px; }
.ct-box.story-links:not(#a) { padding-top: 10px; padding-bottom: 10px; }
.story-view-body img { display: block; max-width: 100%; border-radius: 10px; margin-bottom: 10px; }
.story-view-body p { white-space: pre-wrap; line-height: 1.6; }
/* Story Board (5 Nov 2026, b): compact tree on top is the navigation; panes put the
   picture (thumbnail, Choose picture) on the left and the text on the right. */
#storyboardView .sb-tree { margin: 0 0 14px; padding-top: 6px !important; padding-bottom: 6px !important; }
#storyboardView .sb-tree .game-tree { zoom: .74; }
#storyboardView .sb-panel { border-radius: 12px; border-top: 1px solid #e6dcc2; }
.tree-dot .sb-dot { position: absolute; top: 5px; right: 5px; width: 9px; height: 9px; border-radius: 50%; background: #b9b1a0; }
.tree-dot .sb-dot.is-on { background: #2e9e4f; }
.tree-dot .sb-dot.is-half { background: #e08a1e; }
.sb-tree .tree-dot:not(#a) { position: relative; }
.sb-tree .tree-node.is-open .tree-dot:not(#a) { border-style: solid; border-color: #c9a227; box-shadow: 0 0 0 3px #c9a22744; }
.sb-pane:not(#a) { position: relative; grid-template-columns: 140px 1fr; grid-template-rows: auto 1fr; column-gap: 14px; }
.sb-pane > h5 { grid-column: 1 / -1; padding-right: 30px; }
.sb-pane > .info-tip { position: absolute; top: 12px; right: 12px; }
.sb-pic-col { grid-column: 1; display: grid; gap: 6px; align-content: start; justify-items: start; }
.sb-pic-col .story-image-preview:not(#a) { width: 140px; height: 105px; min-height: 0; }
.sb-pic-col .sb-file:not(#a) { cursor: pointer; margin: 0; }
.sb-pane > textarea:not(#a) { grid-column: 2; grid-row: 2; min-height: 150px; height: 100%; resize: vertical; }

/* Trial Crafting, three tiles (6 Nov 2026): uniform 40px fields, 96px text boxes, 4:3 previews. */
.tc-form:not(#a) { display: grid; gap: 12px; --tc-h: 40px; --tc-ta: 96px; --tc-media: 168px; }
.tc-form .story-link-row { display: flex; justify-content: space-between; margin: 0; }
.tc3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
@media (max-width: 1100px) { .tc3 { grid-template-columns: 1fr; } }
.tc3-tile { background: #fff; border: 1px solid #e6dcc2; border-radius: 12px; padding: 14px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.tc3-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid #f0e8d4; }
.tc3-head b { font: 700 16px Georgia, serif; color: #3b3220; }
.tc3-head small { margin-left: auto; color: #8a7a52; font-size: 12px; }
.tc3-num { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #1f3a2c; color: #f3d27a; font: 800 12px/1 Inter, system-ui, sans-serif; }
.tc-field { position: relative; display: grid; gap: 6px; align-content: start; min-width: 0; }
.tc-label:not(#a) { display: flex; align-items: center; gap: 6px; margin: 0; font: 700 12.5px Inter, system-ui, sans-serif; color: #5a5140; }
.tc-label .field-note { font-weight: 400; }
.tc-label > .info-tip:not(#a), .tc-switch > .info-tip:not(#a) { position: relative; top: auto; right: auto; margin-left: auto; }
.tc-form input[type=text]:not(#a), .tc-form input[type=url]:not(#a), .tc-form input[type=number]:not(#a), .tc-form input:not([type]):not(#a), .tc-form select:not(#a) { box-sizing: border-box; width: 100%; height: var(--tc-h); min-height: 0; }
.tc-form textarea:not(#a) { box-sizing: border-box; width: 100%; height: var(--tc-ta); min-height: 0; resize: vertical; }
.tc-form textarea.tc-tall:not(#a) { height: 120px; }
.tc-media { display: grid; grid-template-columns: var(--tc-media) minmax(0, 1fr); gap: 10px; align-items: end; }
.tc-media-side { display: grid; gap: 8px; align-content: end; }
.tc-box:not(#a) { width: var(--tc-media); aspect-ratio: 4 / 3; height: auto; min-height: 0; border-radius: 8px; }
.tc-letterbox:not(#a) { background: #f7f1e3; }
.tc-letterbox:not(.is-empty):not(#a) { background: #000; }
.tc-letterbox:not(.is-empty) img { object-fit: contain; }
.tc-scene-box { display: grid; place-items: center; border: 1px dashed #d9cfb4; background: #f7f1e3; color: #a49a82; font-size: 12px; text-align: center; padding: 6px; box-sizing: border-box; }
.tc-scene-box.is-set { border-style: solid; border-color: #c9a227; background: #fbf4e2; color: #3b3220; font-weight: 700; }
.tc-file:not(#a) { height: var(--tc-h); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; margin: 0; box-sizing: border-box; }
.tc-media-side .image-remove:not(#a) { margin: 0; font-size: 13px; }
.tc-chips:not(#a) { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tc-chips .checkbox-row:not(#a) { position: relative; margin: 0; height: 34px; padding: 0 13px; border: 1px solid #d9cfb4; border-radius: 999px; background: #fffdf7; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; }
.tc-chips .checkbox-row input:not(#a) { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.tc-chips .checkbox-row:has(input:checked) { background: #f3e7c4; border-color: #c9a227; }
.tc-chips .checkbox-row:has(input:checked) span::before { content: "✓ "; }
.tc-chips .checkbox-row:has(input:focus-visible) { outline: 2px solid #c9a227; outline-offset: 2px; }
.tc-switch:not(#a) { position: relative; display: flex; align-items: center; gap: 10px; margin: 0; min-height: var(--tc-h); font-size: 13.5px; cursor: pointer; }
.tc-switch > input:not(#a) { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tc-switch input:checked + .toggle-switch { background: #5b9b66; }
.tc-switch input:checked + .toggle-switch::after { transform: translateX(15px); }
.tc-switch input:focus-visible + .toggle-switch { outline: 2px solid #c9a227; outline-offset: 2px; }
.tc-needs-body { display: grid; gap: 8px; padding-left: 44px; }
.tc-pair:not(#a) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0; border: 0; }
.tc-readonly { margin: 0; min-height: var(--tc-h); display: flex; align-items: center; padding: 0 11px; border: 1px dashed #d9cfb4; border-radius: 8px; color: #8a7a52; font-size: 13px; box-sizing: border-box; }
.tc-sub { font: 800 11px Inter, system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: #8a7a52; }
.tc-hint:not(#a):not(#b) { display: grid; grid-template-columns: 1fr; gap: 14px; padding: 0; border: 0; background: none; }
.tc-hint > .ct-field:not(#a):not(#b) { padding: 0; border: 0; }
.tc-hint.hint-off > .ct-field:not(#a) { display: none; }
.tc-form .reveal-field .scene-fields { margin-top: 6px; }
.tc-actions:not(#a) { position: sticky; bottom: 0; z-index: 3; display: flex; justify-content: center; gap: 10px; padding: 10px; background: #fbf4e2; border: 1px solid #e6dcc2; border-radius: 12px; margin: 0; }
.tc-form #trialSaved:not(#a) { font-size: 14px; letter-spacing: 0; padding: 10px 14px; }
.tc3 .scene-fields:not(#a):not(#b) { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 12px; border: 1px solid #f0e8d4; border-radius: 10px; background: #fffdf7; }
.tc3 .scene-fields.hidden:not(#a):not(#b) { display: none; }
.tc3 .scene-fields .reveal-item:not(#a) { display: grid; gap: 6px; font: 700 12.5px Inter, system-ui, sans-serif; color: #5a5140; }
.tc3 .scene-fields .reveal-item .field-note { font-weight: 400; }
.tc3 .scene-fields .media-preview:not(#a) { width: var(--tc-media); aspect-ratio: 4 / 3; height: auto; min-height: 0; }
.tc3 .scene-fields .image-hint { margin: 0; font-size: 12px; }

/* ---------- Shops (6 Nov 2026): Gameplay Mechanics ---------- */
.gameplay-panel .shops-tile { min-height: 0; margin-top: 14px; }
.shops-tile .gp-pocket-head { position: relative; }
.shop-add-wrap { position: relative; justify-self: end; grid-column: 3; }
.shop-add-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; display: grid; min-width: 170px; padding: 6px; background: #fff; border: 1px solid #e6dcc2; border-radius: 10px; box-shadow: 0 10px 26px rgba(0,0,0,.18); }
.shop-add-menu button { text-align: left; padding: 9px 12px; border: 0; border-radius: 6px; background: none; font: 600 13px Inter, system-ui, sans-serif; color: #1d1a14; cursor: pointer; }
.shop-add-menu button:hover, .shop-add-menu button:focus-visible { background: #f3ecdb; }
.shop-currency { display: grid; gap: 10px; padding: 12px; border: 1px solid #eee5cf; border-radius: 10px; background: #fcfaf4; }
.shop-sub { display: flex; align-items: center; gap: 10px; font: 800 11px Inter, system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: #8a7a52; }
.shop-sub .button { margin-left: auto; letter-spacing: 0; text-transform: none; }
.shop-cur-fields { display: grid; grid-template-columns: 1.3fr .7fr 1fr 1fr auto; gap: 10px; align-items: stretch; }
.shop-cell { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid #eee5cf; border-radius: 9px; background: #fff; min-width: 0; }
.shop-cell > span { font: 600 12.5px Inter, system-ui, sans-serif; color: #7a6f57; white-space: nowrap; }
.shop-cell input, .shop-cell select { flex: 1; min-width: 0; height: 36px; }
.shop-cell-ro em { flex: 1; font-style: normal; color: #8a7a52; font-size: 13px; padding: 8px 10px; border-radius: 8px; background: #f6f1e4; }
.earn-strip { display: flex; align-items: stretch; gap: 4px; overflow-x: auto; padding: 4px 0 2px; scrollbar-width: thin; }
.earn-label { flex: 0 0 auto; align-self: center; padding-right: 6px; font: 700 11.5px Inter, system-ui, sans-serif; color: #7a6f57; white-space: nowrap; }
.earn-cell { flex: 0 0 auto; display: inline-flex; align-items: baseline; gap: 4px; padding: 3px 8px; border-radius: 999px; background: #f1ead6; color: #3b3220; font-size: 12px; line-height: 1.4; }
.earn-cell small { color: #8a7a52; font-size: 10.5px; font-weight: 700; }
.earn-cell b { font-variant-numeric: tabular-nums; }
.earn-cell.is-empty { opacity: .5; }
.shop-balance { margin: 0; padding: 7px 10px; border-radius: 8px; background: #f4f8f2; border: 1px solid #d7e6d3; font-size: 12.5px; color: #5a5140; }
.shop-balance b { color: #2d5b3a; }
.shop-split { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 0; border: 1px solid #eee5cf; border-radius: 10px; overflow: hidden; min-height: 260px; }
.shop-list { display: grid; gap: 8px; align-content: start; padding: 10px; background: #fbf8f0; border-right: 1px solid #eee5cf; }
.shop-list .empty-sphinx { padding: 20px 6px; }
.shop-card { display: grid; gap: 4px; text-align: left; padding: 10px 12px; border: 1px solid #e6dcc2; border-radius: 10px; background: #fff; cursor: pointer; font: 13px Inter, system-ui, sans-serif; color: #1d1a14; }
.shop-card b { font: 700 15px Georgia, serif; color: #3b3220; }
.shop-card > small { color: #8a7a52; font-size: 12px; }
.shop-card.is-selected { border: 2px solid #c9a227; box-shadow: 0 2px 8px rgba(160,120,20,.15); padding: 9px 11px; }
.shop-card.is-off { opacity: .6; }
.shop-kind { display: block; font: 700 10.5px Inter, system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #8a7a52; }
.shop-pills { display: flex; flex-wrap: wrap; gap: 5px; }
.shop-pill { font: 700 10px Inter, system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; background: #e8efe6; color: #2d5b3a; }
.shop-pill.is-digital { background: #e6ecf5; color: #2f4f7e; }
.shop-pill.is-lock { background: #f3ead2; color: #7a5a14; }
.shop-pill.is-off { background: #eee; color: #777; }
.shop-editor { padding: 14px 16px; min-width: 0; }
.shop-empty-note { margin: 30px 0; text-align: center; }
.shop-form { display: grid; gap: 14px; }
.shop-edit-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid #eee5cf; }
.shop-edit-head > b { font: 700 18px Georgia, serif; color: #3b3220; }
.shop-active { margin-left: auto; font-size: 12.5px; color: #7a6f57; }
.shop-row2 { display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px; }
.shop-row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.shop-field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.shop-field > span { display: flex; align-items: center; gap: 6px; font: 700 12.5px Inter, system-ui, sans-serif; color: #5a5140; }
.shop-field > span small { font-weight: 400; color: #a49a82; }
.shop-field > span .info-tip { margin-left: auto; }
.shop-field input:not([type=checkbox]):not([type=radio]):not([type=file]), .shop-field select { height: 40px; }
.shop-ro { display: flex; align-items: center; height: 40px; padding: 0 10px; border-radius: 8px; background: #f6f1e4; color: #7a6f57; font-style: normal; font-size: 13px; }
.shop-radios { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.shop-radio { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid #d9cfb4; border-radius: 10px; background: #fffdf7; cursor: pointer; }
.shop-radio.is-on { border-color: #c9a227; box-shadow: inset 0 0 0 1px #c9a227; background: #fbf3dc; }
.shop-radio input { margin-top: 3px; accent-color: #8a6a12; }
.shop-radio > span:not(.info-tip) { display: grid; gap: 2px; }
.shop-radio b { font: 700 13.5px Inter, system-ui, sans-serif; }
.shop-radio small { font-size: 12px; color: #7a6f57; }
.shop-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.shop-chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid #d9cfb4; border-radius: 999px; background: #fffdf7; font-size: 13px; cursor: pointer; }
.shop-chip.is-on { background: #f3e7c4; border-color: #c9a227; }
.shop-chip input { accent-color: #8a6a12; margin: 0; }
.shop-tag-field.is-dulled { opacity: .45; }
.shop-warn { margin: 0; font-size: 12.5px; color: #8a4b12; background: #fdf1de; border: 1px solid #efcf9c; border-radius: 8px; padding: 8px 10px; }
.shop-prop { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; align-items: start; }
.shop-banner { aspect-ratio: 3 / 1; border-radius: 8px; background: var(--onyx, #1f3a2c); color: var(--gold-bright, #f3d27a); display: grid; place-items: center; overflow: hidden; font: 700 12px Georgia, serif; text-align: center; padding: 4px; }
.shop-banner img { width: 100%; height: 100%; object-fit: cover; }
.shop-prop-fields { display: grid; gap: 8px; }
.shop-prop-fields input { height: 40px; }
.shop-prop-buttons { display: flex; gap: 8px; }
.shop-goods { width: 100%; border-collapse: collapse; font-size: 13px; }
.shop-goods th { text-align: left; font: 700 11.5px Inter, system-ui, sans-serif; color: #8a7a52; padding: 6px 8px; border-bottom: 1px solid #eee5cf; white-space: nowrap; }
.shop-goods td { padding: 8px; border-bottom: 1px solid #f3ecdb; vertical-align: middle; }
.shop-goods td small { display: block; color: #8a7a52; font-size: 12px; }
.shop-thumb { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 7px; background: #efe6cf; overflow: hidden; }
.shop-thumb img, .shop-thumb svg { width: 100%; height: 100%; object-fit: cover; }
.shop-thumb svg { width: 22px; height: 22px; }
.shop-goods-actions { white-space: nowrap; text-align: right; }
.shop-goods-actions .button + .button { margin-left: 6px; }
.shop-foot { display: flex; justify-content: flex-end; gap: 10px; }
.in-shop .get-by-field, .in-shop .get-by-fields, .in-shop .window-field, .in-shop .tag-only-field, .in-shop .power-placement, .in-shop .limit-field { display: none !important; }
.shop-fields { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid #e6dcc2; border-radius: 10px; background: #fbf8f0; }
.shop-fields.hidden { display: none; }
.three-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 900px) {
  .shop-cur-fields { grid-template-columns: 1fr 1fr; }
  .shop-split { grid-template-columns: 1fr; }
  .shop-list { border-right: 0; border-bottom: 1px solid #eee5cf; }
  .shop-row2, .shop-row3, .shop-radios, .three-fields, .shop-prop { grid-template-columns: 1fr; }
}

/* Trial Crafting: how teams get the hint (Auto hint / Hint shop). */
.hint-ways { display: grid; gap: 8px; }
.tc-muted { font-weight: 400; color: #a49a82; margin-left: 4px; }
.hint-way { display: grid; gap: 6px; padding: 9px 12px; border: 1px solid #d9cfb4; border-radius: 10px; background: #fffdf7; cursor: pointer; }
.hint-way:has(input:checked) { border-color: #c9a227; box-shadow: inset 0 0 0 1px #c9a227; background: #fbf3dc; }
.hint-way-head { display: flex; align-items: center; gap: 8px; }
.hint-way-head input { accent-color: #8a6a12; margin: 0; }
.hint-way-head b { font: 700 13.5px Inter, system-ui, sans-serif; }
.hint-way-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.hint-way-row input { width: 90px; height: 34px; }
.hint-way small { font-size: 12px; color: #7a6f57; }
.hint-way .auto-hint-minutes.is-dulled { opacity: .45; }
.shop-radio input { width: auto; flex: 0 0 auto; height: auto; }
.shop-radio > span:not(.info-tip) { text-align: left; }
.shop-prop-buttons input[type=file] { display: none; }
.shop-cell select { font-size: 16px; line-height: 1.3; }
.shop-cell-ro em { white-space: nowrap; }

/* Player: Shops pocket (6 Nov 2026), inside the dark pocket dialog. */
.player-shops { display: grid; gap: 12px; grid-column: 1 / -1; }
#pocketList:has(.player-shops) { display: block; }
.pshop { display: grid; gap: 8px; padding: 12px; border: 1px solid #c9a22755; border-radius: 12px; background: #1b1916; color: #f4ecd8; }
.pshop.is-locked { opacity: .6; }
.pshop header { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.pshop header b { font: 700 16px var(--serif, Georgia, serif); color: var(--gold-bright, #f3d27a); }
.pshop header small { font: 700 10px Inter, system-ui, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #a89f8a; }
.pshop-banner { width: 100%; max-height: 70px; object-fit: cover; border-radius: 8px; flex-basis: 100%; }
.pshop-loc { margin: 0; font-size: 12.5px; color: #c9bfa6; }
.pshop-status { margin: 0; padding: 7px 10px; border-radius: 8px; background: #23301f; color: #b9dcb0; font-size: 13px; font-weight: 600; }
.pshop-status.is-locked { background: #3a3120; color: #e9cf8e; }
.pshop-status.is-digital { background: #1f2a3a; color: #b5c8e6; }
.pshop-timer { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; padding: 10px 12px; border-radius: 10px; background: #233a2c; }
.pshop-timer span { font-weight: 700; font-size: 13px; }
.pshop-timer b { font: 800 22px Inter, system-ui, sans-serif; color: var(--gold-bright, #f3d27a); font-variant-numeric: tabular-nums; }
.pshop-timer i { grid-column: 1 / -1; display: block; height: 6px; border-radius: 999px; background: #3d5c4b; overflow: hidden; }
.pshop-timer em { display: block; height: 100%; background: var(--gold-bright, #f3d27a); transition: width 1s linear; }
.pshop-timer small { grid-column: 1 / -1; color: #cfe0d3; font-size: 11.5px; }
.pshop-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid #ffffff14; font-size: 13.5px; }
.pshop-thumb { flex: 0 0 auto; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: #2a261e; overflow: hidden; color: var(--gold-bright, #f3d27a); }
.pshop-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pshop-thumb svg { width: 22px; height: 22px; }
.pshop-name { flex: 1; min-width: 0; }
.pshop-name small { display: block; color: #a89f8a; font-size: 11.5px; }
.pshop-price { font-weight: 800; white-space: nowrap; }
.pshop-empty { margin: 0; color: #a89f8a; font-size: 12.5px; }
.shop-balance-chip { color: var(--gold-bright, #f3d27a); }
.pocket-button.is-shop-open { border-color: var(--gold-bright, #f3d27a); box-shadow: 0 0 0 2px #f3d27a44; }
.hint-shop-note { margin: 10px 0 0; font-size: 13px; color: #6b5418; }
.pshop { text-align: left; }
.hunt-pockets.is-four { gap: 6px; }
.hunt-pockets.is-four .pocket-button { flex-direction: column; gap: 2px; min-height: 54px; padding: 6px 4px; font-size: 11px; }
.hunt-pockets.is-four .pocket-icon svg { width: 20px; height: 20px; }
.hunt-pockets.is-four .pocket-count { position: absolute; top: 4px; right: 5px; min-width: 18px; height: 18px; font-size: 10.5px; }
.hint-way:not(#a) { text-align: left; }
.hint-way-head:not(#a) { display: flex; justify-content: flex-start; align-items: center; gap: 8px; }
.hint-way-head:not(#a) input { width: auto; height: auto; flex: 0 0 auto; }
.hint-way-head:not(#a) b { text-align: left; }
.hint-way-row:not(#a) { display: flex; justify-content: flex-start; flex-wrap: nowrap; white-space: nowrap; }
.hint-way-row:not(#a) input { width: 90px; flex: 0 0 90px; height: 34px; }
.shop-cell select:not(#a) { height: 40px; padding: 4px 8px; }

/* Shops editor, second layout (6 Nov 2026). */
.shop-form { gap: 14px; }
.shop-radios.is-one { grid-template-columns: 1fr; }
.shop-radio:not(#a) { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.shop-radio:not(#a) input { margin: 0; }
.shop-radio:not(#a) b { font: 700 14px Inter, system-ui, sans-serif; text-align: left; }
.shop-radio .info-tip { margin-left: auto; }
.shop-subtile { display: grid; gap: 12px; padding: 14px; border: 1px solid #e6dcc2; border-radius: 12px; background: #fffefb; }
.shop-sub-note { margin-left: auto; letter-spacing: 0; text-transform: none; font: 600 12px Inter, system-ui, sans-serif; color: #7a6f57; }
.shop-physical { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 16px; align-items: start; }
.shop-physical.hidden { display: none; }
.shop-phys-left { display: grid; gap: 12px; min-width: 0; }
.shop-phys-right { display: grid; gap: 8px; justify-items: start; }
.shop-phys-right .shop-banner { width: 100%; aspect-ratio: 4 / 3; font-size: 15px; }
.shop-phys-right small { font-size: 11.5px; }
.shop-req { color: #a3341f; }
.shop-err { color: #a3341f; font-size: 12px; }
.shop-field input.is-missing, .shop-hints input.is-missing { border: 2px solid #c0392b; background: #fff6f4; }
.shop-tags { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.shop-tagbox:not(#a) { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #d9cfb4; border-radius: 10px; background: #fffdf7; cursor: pointer; text-align: left; }
.shop-tagbox.is-on { border-color: #c9a227; background: #fbf3dc; }
.shop-tagbox:not(#a) input { width: auto; height: auto; margin: 0; flex: 0 0 auto; accent-color: #8a6a12; }
.shop-tagbox > span { display: grid; gap: 1px; min-width: 0; }
.shop-tagbox b { font: 700 13.5px Inter, system-ui, sans-serif; }
.shop-tagbox small { color: #7a6f57; font-size: 12px; }
.shop-tagbox .button { margin-left: auto; }
.shop-hints td input { width: 110px; height: 36px; }
.shop-ch { font: 800 12px Inter, system-ui, sans-serif; color: #5b3a86; background: #efe7f7; border-radius: 6px; padding: 3px 8px; white-space: nowrap; }
.shop-ok, .shop-need { font: 700 11px Inter, system-ui, sans-serif; border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.shop-ok { color: #2d6b3a; background: #e3f0e3; }
.shop-need { color: #a3341f; background: #fbe3de; }
.shop-items-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.shop-add-card { display: grid; place-content: center; justify-items: center; gap: 6px; min-height: 190px; border: 2px dashed #c9a227; border-radius: 12px; background: #fffdf7; color: #8a6a12; font: 600 13px Inter, system-ui, sans-serif; cursor: pointer; }
.shop-add-card span { display: grid; place-items: center; width: 40px; height: 40px; border: 2px solid #c9a227; border-radius: 50%; font: 400 26px/1 Inter, system-ui, sans-serif; }
.shop-add-card:hover { background: #fbf3dc; }
.shop-item-card { display: grid; gap: 5px; align-content: start; padding: 10px; border: 1px solid #e6dcc2; border-radius: 12px; background: #fff; }
.shop-item-card.is-off { opacity: .55; }
.shop-item-card b { font: 700 14px Georgia, serif; color: #3b3220; }
.shop-item-card small { color: #8a7a52; font-size: 12px; }
.shop-item-thumb { display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: 8px; background: #efe6cf; overflow: hidden; color: #6b5418; }
.shop-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.shop-item-thumb svg { width: 34px; height: 34px; }
.shop-item-pills { display: flex; flex-wrap: wrap; gap: 5px; }
.shop-item-pills span { font: 700 11px Inter, system-ui, sans-serif; padding: 3px 8px; border-radius: 999px; background: #f1ead6; color: #3b3220; }
.shop-item-actions { display: flex; gap: 6px; }
.shop-foot { align-items: center; padding-top: 12px; border-top: 1px solid #eee5cf; }
.shop-foot .shop-active { margin-left: 0; margin-right: auto; }
.shop-active.is-locked-on { opacity: .8; }
.shop-card > small { display: block; }
.shop-add-menu button:disabled { color: #b0a68e; cursor: not-allowed; background: none; }
.shop-add-menu button small { display: block; font-weight: 400; font-size: 11px; }
@media (max-width: 900px) { .shop-physical, .shop-tags { grid-template-columns: 1fr; } }
.shop-form .info-tip, .shop-currency .info-tip, .hint-ways .info-tip { position: relative; top: auto; right: auto; display: inline-block; z-index: 6; }
.shop-field > span .info-tip, .shop-radio .info-tip, .shop-sub .info-tip { margin-left: auto; }
.shop-sub .info-tip + .shop-sub-note { margin-left: 12px; }

/* Shops tile: teal frame, and the selected shop flows into its details (6 Nov 2026). */
.shops-tile { background: var(--tab-teal, #2F4A3A); border-color: var(--tab-teal, #2F4A3A); }
.shops-tile .shop-currency { background: #fcfaf4; border-color: #fcfaf4; }
.shops-tile .shop-split:not(#a) { background: transparent; border: 0; border-radius: 0; overflow: visible; grid-template-columns: 270px minmax(0, 1fr); min-height: 320px; }
.shops-tile .shop-list:not(#a) { background: transparent; border: 0; padding: 14px 0 14px 0; gap: 8px; }
.shops-tile .shop-card:not(#a) { position: relative; padding: 12px 16px; border: 1px solid #ffffff26; border-right: 0; border-radius: 12px 0 0 12px; background: #3b5c4a; color: #e9e2cc; margin-right: 10px; transition: background .15s, margin .15s; }
.shops-tile .shop-card:not(#a) b { color: var(--gold-bright, #f3d27a); }
.shops-tile .shop-card:not(#a) > small { color: #c9d6c6; }
.shops-tile .shop-card:not(#a):hover { background: #456a56; }
.shops-tile .shop-card.is-selected:not(#a) { margin-right: 0; background: #fffefb; border-color: #fffefb; box-shadow: none; padding: 12px 16px; z-index: 2; }
.shops-tile .shop-card.is-selected:not(#a) b { color: #3b3220; }
.shops-tile .shop-card.is-selected:not(#a) > small { color: #8a7a52; }
.shops-tile .shop-card.is-selected:not(#a)::after { content: ""; position: absolute; right: -2px; top: 0; bottom: 0; width: 4px; background: #fffefb; }
.shops-tile .shop-card.is-selected:not(#a)::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 0 3px 3px 0; background: var(--gold-bright, #c9a227); }
.shops-tile .shop-card.is-off:not(#a) { opacity: .6; }
.shops-tile .shop-list .empty-sphinx { color: #e9e2cc; }
.shops-tile .shop-editor:not(#a) { background: #fffefb; border-radius: 12px; margin: 14px 0 0; padding: 16px 18px; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
@media (max-width: 900px) {
  .shops-tile .shop-split:not(#a) { grid-template-columns: 1fr; }
  .shops-tile .shop-card:not(#a), .shops-tile .shop-card.is-selected:not(#a) { margin-right: 0; border-right: 1px solid #ffffff26; border-radius: 12px; }
  .shops-tile .shop-card.is-selected:not(#a)::after { display: none; }
  .shops-tile .shop-editor:not(#a) { margin-top: 0; }
}
/* Currency part in teal too (6 Nov 2026). */
.shops-tile .shop-currency:not(#a) { background: #3b5c4a; border: 1px solid #ffffff26; }
.shops-tile .shop-currency .shop-sub { color: var(--gold-bright, #f3d27a); }
.shops-tile .shop-cell:not(#a) { background: var(--tab-teal, #2F4A3A); border-color: #ffffff26; }
.shops-tile .shop-cell:not(#a) > span { color: #c9d6c6; }
.shops-tile .shop-cell-ro:not(#a) em { background: #ffffff14; color: #e9e2cc; }
.shops-tile .earn-label { color: #e9e2cc; }
.shops-tile .earn-cell:not(#a) { background: #ffffff1a; color: #f3e9cf; }
.shops-tile .earn-cell:not(#a) small { color: #c9d6c6; }
.shops-tile .earn-cell:not(#a) b { color: var(--gold-bright, #f3d27a); }
.shops-tile .shop-balance:not(#a) { background: #ffffff12; border-color: #ffffff26; color: #e9e2cc; }
.shops-tile .shop-balance:not(#a) b { color: var(--gold-bright, #f3d27a); }

/* Tags checklist: each tag's NFC link and QR code for Event Operations (6 Nov 2026). */
.warden-item { display: grid; gap: 0; border: 1px solid #3a352b; border-radius: 10px; background: var(--onyx-soft); overflow: hidden; }
.warden-item > .warden-row { border: 0; border-radius: 0; }
.warden-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 12px 10px 42px; }
.warden-link { flex: 1 1 260px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; color: #c9bfa6; background: #ffffff0d; border-radius: 6px; padding: 5px 8px; }
.warden-links .button { color: var(--parchment); border-color: #ffffff40; }
.warden-links:empty { display: none; }
.warden-list.is-dull .warden-links .button { opacity: 1; }

/* Trial Crafting, teal with five tiles and Prop notes (6 Nov 2026). */
#trialConfigView .trial-panel:first-child { background: var(--tab-teal, #2F4A3A); }
#trialConfigView .challenge-tile:not(#a) { background: transparent; border: 0; box-shadow: none; padding: 0; }
#trialConfigView .challenge-tile > h4 { color: var(--gold-bright, #f3d27a); }
#trialConfigView .story-link-row .button { background: transparent; color: #f3e9cf; border-color: #ffffff55; }
.tc3:not(#a) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
.tc3 > .tc3-tile, .tc-col > .tc3-tile { background: #fffefb; border: 0; border-radius: 12px; }
.tc-col { display: grid; gap: 12px; align-content: start; }
.tc-props-tile { grid-column: 1 / -1; }
.tc3-head .tc-head-switch { margin-left: auto; }
.tc3-head .info-tip { position: relative; top: auto; right: auto; display: inline-block; }
.tc3-head .tc-rplus { margin-left: auto; }
.tc-props-tile .tc3-head .tc-rplus { margin-left: 12px; }
.tc-off-note { display: none; margin: 0; font-size: 12.5px; color: #8a7a52; }
.tc3-tile.is-off .tc-off-note { display: block; }
.ct-hint.is-off .hint-ways, .ct-hint.is-off .tc-hint-text { display: none; }
.hint-ways-row:not(#a) { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hint-ways-row .hint-way:not(#a) { padding: 8px 10px; }
.hint-ways-row .hint-way-head:not(#a) { flex-wrap: nowrap; }
.hint-ways-row .auto-hint-minutes:not(#a) { margin-left: auto; gap: 4px; font-size: 12px; }
.hint-ways-row .auto-hint-minutes:not(#a) input { width: 58px; flex: 0 0 58px; height: 30px; }
.tc-hint-text:not(#a) { min-height: 70px; }
.tc-radio .info-tip { order: 9; margin-left: auto; position: relative; top: auto; right: auto; }
.tc-rewards { position: relative; }
.tc-rsub { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid #eee5cf; border-radius: 10px; background: #fcfaf4; }
.tc-rsub-head { display: flex; align-items: center; gap: 8px; font: 800 11px Inter, system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #8a7a52; }
.tc-rsub-head .info-tip { position: relative; top: auto; right: auto; letter-spacing: 0; }
.tc-rsub-head .tc-rplus { margin-left: auto; }
.tc-rplus:not(#a) { width: 28px; height: 28px; font-size: 18px; }
.tc-rplus:disabled { opacity: .4; cursor: not-allowed; }
.tc-cur { display: flex; align-items: center; gap: 10px; }
.tc-cur input:not(#a) { width: 90px; height: 38px; }
.tc-cur-name { font-size: 12.5px; color: #7a6f57; }
.tc-ritem { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid #eee5cf; border-radius: 8px; background: #fff; }
.tc-ritem.is-off { opacity: .6; }
.tc-rthumb { width: 34px; height: 34px; border: 0; border-radius: 7px; background: #efe6cf; display: grid; place-items: center; overflow: hidden; padding: 0; cursor: pointer; color: #6b5418; }
.tc-rthumb img { width: 100%; height: 100%; object-fit: cover; }
.tc-rthumb svg { width: 20px; height: 20px; }
.tc-rname { border: 0; background: none; text-align: left; padding: 0; cursor: pointer; min-width: 0; }
.tc-rname b { display: block; font: 700 13.5px Georgia, serif; color: #3b3220; }
.tc-rname small { display: block; color: #8a7a52; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-rwho:not(#a) { height: 30px; font-size: 12px; padding: 0 6px; width: auto; }
.tc-x { border: 0; background: none; color: #a49a82; font-size: 15px; cursor: pointer; padding: 2px 4px; }
.tc-x:hover { color: #8a2c22; }
.tc-rnone { margin: 0; font-size: 12px; color: #a49a82; }
.tc-rnote { margin: 0; font-size: 11.5px; color: #8a7a52; }
.tc-goodie { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #7a6f57; }
.tc-goodie input:not(#a) { width: 70px; height: 34px; }
.tc-goodie .tc-x { margin-left: auto; }
.goodie-field.is-dulled .tc-rsub-head { opacity: .6; }
.tc-picker { position: absolute; right: 14px; z-index: 30; width: min(340px, calc(100% - 28px)); display: grid; gap: 2px; padding: 8px; background: #fff; border: 1px solid #e6dcc2; border-radius: 12px; box-shadow: 0 14px 30px rgba(0,0,0,.2); }
.tc-picker-head { font: 800 10.5px Inter, system-ui, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #8a7a52; padding: 6px 10px; }
.tc-picker button { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 0; border-radius: 6px; background: none; text-align: left; font: 600 13px Inter, system-ui, sans-serif; color: #1d1a14; cursor: pointer; }
.tc-picker button:hover:not(:disabled) { background: #f3ecdb; }
.tc-picker button:disabled { color: #b0a68e; cursor: not-allowed; }
.tc-picker button em { margin-left: auto; font-style: normal; font-weight: 400; font-size: 11.5px; color: #a49a82; text-align: right; }
.tc-picker .tc-picker-new { color: #8a6a12; border-top: 1px solid #eee5cf; border-radius: 0 0 6px 6px; margin-top: 4px; }
.tc-props { display: grid; gap: 8px; }
.tc-pnote { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 10px; border: 1px solid #eee5cf; border-radius: 8px; background: #fff; }
.tc-pnote.is-fixed { background: #f4f8f2; border-color: #d7e6d3; min-height: 38px; }
.tc-pnote.is-fixed em { font-style: normal; font-size: 11.5px; font-weight: 700; color: #2d6b3a; white-space: nowrap; }
.tc-pkind { font: 700 12px Inter, system-ui, sans-serif; color: #3b3220; }
.tc-pnote input:not(#a) { height: 34px; border: 1px solid transparent; background: transparent; }
.tc-pnote input:not(#a):focus { border-color: #d9cfb4; background: #fffdf7; }
@media (max-width: 1100px) { .tc3:not(#a) { grid-template-columns: 1fr; } }

/* Items: where each comes from; given elsewhere = greyed, view only (6 Nov 2026). */
.item-card.is-attached { opacity: .62; }
.item-card.is-attached:hover { opacity: .85; }
.item-card-source { margin: 2px 0 0; font-size: 12px; font-weight: 600; color: #6b5f45; }
.item-card-source.is-warn { color: #a3341f; }
.item-source-line { margin: 0 0 6px; padding: 8px 10px; border-radius: 8px; background: #f4f8f2; border: 1px solid #d7e6d3; font-size: 12.5px; font-weight: 600; color: #2d5b3a; }
.item-source-line.is-warn { background: #fdf1de; border-color: #efcf9c; color: #8a4b12; }
form.is-view-only > *:not(.item-source-line):not(.admin-actions):not(.dialog-close) { pointer-events: none; opacity: .7; }
.get-by-field:not(#a), .reward-trial-field:not(#a) { display: none !important; }
.in-reward .window-field:not(#a), .in-reward .tag-only-field:not(#a), .in-reward .tag-for-field:not(#a) { display: none !important; }
.booster-size-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 12px 0; }
.booster-size-grid label { display: grid; gap: 6px; font-weight: 700; }
.booster-size-grid label span { display: flex; align-items: center; gap: 6px; font-weight: 400; }
.booster-size-grid input { width: 80px; }
.booster-size-grid small { color: #8a7a52; font-weight: 400; font-size: 12px; }
#createTrialForm.tc-form:not(#a) { background: #3b5c4a; border-color: #ffffff1f; }
#trialTabs .trial-tab.active:not(#a) { background: #3b5c4a; color: #f3e9cf; border-color: #3b5c4a; }
#createTrialForm .tc3-tile.tc-hint:not(#a) { background: #fffefb; padding: 14px; border: 0; border-radius: 12px; display: grid; gap: 12px; }
#createTrialForm .hint-way-head b { white-space: nowrap; }
#createTrialForm .hint-ways-row .auto-hint-minutes input:not(#a) { width: 64px; flex: 0 0 64px; padding: 0 6px; }
#createTrialForm .tc-cur input:not(#a) { width: 90px; flex: 0 0 90px; }
#createTrialForm .tc-goodie input:not(#a) { width: 70px; flex: 0 0 70px; }
#createTrialForm .tc-actions:not(#a) { background: transparent; border: 0; }
#createTrialForm .issued-code:not(#a) { background: #fffefb; }
.warden-group { margin: 10px 0 0; font: 800 11.5px Inter, system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-bright, #f3d27a); }
.checklist-group { margin: 10px 0 4px; font: 800 11px Inter, system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #8a7a52; }

/* Fixed tile sizes (6 Nov 2026): the three columns end on one line, switches fade a tile
   instead of folding it, Tag type is as tall as Accepted answers, and lists that grow
   (needed items, abilities, boosters, backpack items) scroll inside their own box. */
#createTrialForm .tc3:not(#a) { align-items: stretch; }
#createTrialForm .tc3 > .tc3-tile { box-sizing: border-box; height: 100%; align-content: start; }
#createTrialForm .tc-col:not(#a) { display: flex; flex-direction: column; gap: 12px; }
#createTrialForm .tc-col > .tc3-tile:nth-child(2) { flex: 1 1 auto; }
#createTrialForm .tc-needs-body.hidden:not(#a) { display: grid !important; }
#createTrialForm .tc-needs-tile.is-off .tc-needs-body,
#createTrialForm .ct-hint.is-off .hint-ways,
#createTrialForm .ct-hint.is-off .tc-hint-text { opacity: .4; pointer-events: none; }
#createTrialForm .ct-hint.is-off .hint-ways:not(#a):not(#b) { display: grid; }
#createTrialForm .ct-hint.is-off .tc-hint-text:not(#a):not(#b) { display: block; }
#createTrialForm .tc3-tile .tc-off-note:not(#a):not(#b) { display: none; }
#createTrialForm .tc-needs-body { min-height: 96px; align-content: start; }
#needsItems:not(#a):not(#b) { box-sizing: border-box; height: 132px; overflow-y: auto; align-content: flex-start; }
#createTrialForm .tc-when-tag .tc-tagbox:not(#a) { box-sizing: border-box; height: 96px; border: 1px solid #d9cfb4; border-radius: 8px; background: #fffdf7; padding: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: stretch; }
#createTrialForm .tc-tagbox .checkbox-row:not(#a):not(#b) { height: auto; min-height: 0; align-self: stretch; border: 1px solid #e6dcc2; border-radius: 8px; background: #fff; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; margin: 0; }
#createTrialForm .tc-tagbox .checkbox-row small { display: block; font-weight: 400; color: #8a7a52; font-size: 11px; }
#needsItems .needs-chip-taken { opacity: .5; cursor: not-allowed; }
#needsItems .needs-chip-taken input { pointer-events: none; }
.needs-taken-note { display: block; font-size: 10.5px; font-weight: 400; color: #8a7a52; }
#createTrialForm .tc-actions:not(#a):not(#b) { background: #3b5c4a; margin: 0 -2px; padding: 12px 10px; border-radius: 0 0 12px 12px; }

/* Reward squares (6 Nov 2026): one sideways-scrolling row per kind, fixed height. */
#createTrialForm .tc-rewards .tc-rlist:not(#a):not(#b) { max-height: none; display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; overflow-y: hidden; padding: 2px 2px 8px; scroll-snap-type: x proximity; }
.tc-rtile { position: relative; flex: 0 0 92px; height: 104px; box-sizing: border-box; border: 1px solid #e6dcc2; border-radius: 10px; background: #fff; display: grid; grid-template-rows: 44px auto auto; justify-items: center; align-content: start; gap: 3px; padding: 8px 6px 6px; scroll-snap-align: start; cursor: pointer; }
.tc-rtile:hover, .tc-rtile:focus-visible { border-color: #c9a44c; outline: none; }
.tc-rtile.is-off { opacity: .55; }
.tc-rglyph { width: 40px; height: 40px; border-radius: 8px; background: #f3ead3; display: grid; place-items: center; overflow: hidden; }
.tc-rglyph svg { width: 26px; height: 26px; }
.tc-rglyph img { width: 100%; height: 100%; object-fit: cover; }
.tc-rtile b { font: 700 12px Georgia, serif; color: #2c2618; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-rtile small { font: 700 11px Inter, system-ui, sans-serif; color: #8a7a52; white-space: nowrap; }
.tc-rtile small.is-up { color: #3e7d55; }
.tc-rtile small.is-down { color: #b0472f; }
.tc-rtile small.is-plain { font-weight: 500; }
.tc-rx:not(#a) { position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; min-height: 0; border: 0; border-radius: 50%; background: #f3ead3; color: #7a6a45; font-size: 10px; line-height: 18px; padding: 0; cursor: pointer; }
.tc-rlim { position: absolute; top: 4px; left: 4px; font: 700 9.5px Inter, system-ui, sans-serif; background: #3b5c4a; color: #f3e9cf; border-radius: 6px; padding: 1px 5px; }

/* The goodie (6 Nov 2026): picture on the left, then its name and how many get it. */
#createTrialForm .tc-goodie:not(#a):not(#b) { position: relative; display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px; border: 1px solid #e6dcc2; border-radius: 10px; background: #fff; }
#createTrialForm .tc-goodie.hidden:not(#a):not(#b) { display: none; }
.tc-goodie-pic { position: relative; width: 72px; height: 72px; border: 1px dashed #cdbf9a; border-radius: 10px; background: #f7f0de; display: grid; place-items: center; text-align: center; font: 600 10.5px Inter, system-ui, sans-serif; color: #8a7a52; cursor: pointer; overflow: hidden; }
.tc-goodie-pic.has-picture { border-style: solid; }
.tc-goodie-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tc-goodie-fields { display: grid; gap: 6px; padding-right: 22px; }
#createTrialForm .tc-goodie-fields input[name="goodie_name"]:not(#a) { width: 100%; height: 34px; box-sizing: border-box; }
.tc-goodie-count { justify-self: end; margin-top: -3px; font: 500 10.5px Inter, system-ui, sans-serif; color: #8a7a52; }
.tc-goodie-limit:not(#a) { display: flex; align-items: center; gap: 6px; font: 500 12.5px Inter, system-ui, sans-serif; color: #5a5140; white-space: nowrap; margin: 0; }
#createTrialForm .tc-goodie-limit input:not(#a):not(#b) { width: 64px; flex: 0 0 64px; height: 34px; }
#createTrialForm .tc-goodie .tc-x:not(#a) { position: absolute; top: 6px; right: 6px; }

/* "You won a goodie" (6 Nov 2026), on the player's phone. */
.goodie-pop { width: min(300px, calc(100vw - 32px)); box-sizing: border-box; padding: 22px 20px 18px; border: 1px solid var(--gold-brand, #c9a227); border-radius: 16px; background: var(--onyx-2, #1d1b17); color: #eee7d5; text-align: center; box-shadow: 0 18px 50px #000a; }
.goodie-pop::backdrop { background: #000b; }
.goodie-pop-kicker { margin: 0; font: 800 11px Inter, system-ui, sans-serif; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-bright, #e4c158); }
.goodie-pop img { display: block; width: 150px; height: 150px; margin: 14px auto 10px; object-fit: cover; border-radius: 14px; border: 2px solid #c9a22755; }
.goodie-pop b { display: block; font: 700 22px Georgia, serif; color: #f3e9cf; }
.goodie-pop-text { margin: 8px 0 16px; color: #cbbf9f; font-size: 13.5px; line-height: 1.45; }
.goodie-pop form { margin: 0; }
.goodie-pop .button { width: 100%; }

/* ---------- SANCTUM rail (6 Nov 2026): Sales first ---------- */
.sanctum-rail { position: fixed; left: 8px; top: 92px; bottom: 12px; z-index: 40; width: 64px; box-sizing: border-box; display: flex; flex-direction: column; gap: 2px; padding: 10px 8px; background: #26402f; border: 1px solid #3d5d48; border-radius: 16px; box-shadow: 0 10px 30px #0003; transition: width .16s ease; }
body.rail-pinned .sanctum-rail { width: 256px; }
.rail-item:not(#a) { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; height: 44px; min-height: 0; margin: 0; padding: 0 10px; flex: 0 0 auto; border: 0; border-radius: 10px; background: transparent; color: #d9d0b8; font: 600 13.5px Inter, system-ui, sans-serif; text-align: left; white-space: nowrap; cursor: pointer; box-shadow: none; }
.rail-item svg { width: 22px; height: 22px; flex: 0 0 22px; }
.rail-item:not(#a):hover, .rail-item:not(#a):focus-visible { background: #ffffff14; outline: none; }
.rail-item.is-on:not(#a) { background: #f4ecd8; color: #26402f; }
.rail-item.is-on::before { content: ""; position: absolute; left: -8px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: #e0b552; }
.rail-item.is-new:not(#a) { color: #e7b955; }
.rail-item.is-sub:not(#a) { height: 30px; padding-left: 44px; font-weight: 500; font-size: 12.5px; color: #b9c7b8; }
.rail-label { overflow: hidden; text-overflow: ellipsis; }
body:not(.rail-pinned) .rail-label, body:not(.rail-pinned) .rail-item.is-sub { display: none; }
.rail-heading { flex: 0 0 auto; padding: 10px 12px 2px; font: 800 9.5px Inter, system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: #8fa894; white-space: nowrap; }
body:not(.rail-pinned) .rail-heading { height: 1px; padding: 0; margin: 6px; background: #3d5d48; color: transparent; overflow: hidden; }
.rail-sep { flex: 0 0 1px; margin: 6px; background: #3d5d48; }
.rail-count { position: absolute; left: 30px; top: 6px; min-width: 17px; height: 17px; padding: 0 4px; box-sizing: border-box; border-radius: 9px; font: 700 10px/17px Inter, system-ui, sans-serif; text-align: center; color: #fff; background: #5c7a64; }
body.rail-pinned .rail-count { position: static; margin-left: auto; height: 20px; min-width: 22px; line-height: 20px; border-radius: 10px; font-size: 11px; }
.rail-count.is-red { background: #c4553a; }
.rail-count.is-orange { background: #df8a2b; color: #1d1608; }
.rail-count.is-green { background: #4f9a63; }
.rail-count.is-grey { background: #7d8a80; }
.rail-count.is-white { background: #f4ecd8; color: #26402f; }
.rail-item.is-on .rail-count.is-white { background: #26402f; color: #f4ecd8; }
.rail-tick { position: relative; margin-left: auto; width: 18px; height: 18px; flex: 0 0 18px; box-sizing: border-box; border: 1.6px solid #8fa894; border-radius: 50%; }
.rail-tick.is-done { background: #5fa36f; border-color: #5fa36f; }
.rail-tick.is-done::after { content: ""; position: absolute; left: 5px; top: 2px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
body:not(.rail-pinned) .rail-tick { position: absolute; left: 32px; top: 24px; width: 10px; height: 10px; border-width: 1.4px; background: #26402f; }
body:not(.rail-pinned) .rail-tick.is-done { background: #5fa36f; }
body:not(.rail-pinned) .rail-tick.is-done::after { display: none; }
/* The name on hover (closed rail only). */
body:not(.rail-pinned) .rail-item:hover::after, body:not(.rail-pinned) .rail-item:focus-visible::after { content: attr(data-tip); position: absolute; left: 58px; top: 50%; transform: translateY(-50%); z-index: 2; padding: 7px 10px; border-radius: 8px; background: #1b2c21; color: #f4ecd8; font: 600 12.5px Inter, system-ui, sans-serif; white-space: nowrap; box-shadow: 0 6px 18px #0005; pointer-events: none; }
.rail-arrow:not(#a) { flex: 0 0 auto; align-self: center; width: 30px; height: 30px; min-height: 0; margin: 0 0 8px; padding: 0; display: grid; place-items: center; border: 1px solid #3d5d48; border-radius: 50%; background: #f4ecd8; color: #26402f; box-shadow: 0 3px 10px #0003; cursor: pointer; }
body.rail-pinned .rail-arrow:not(#a) { align-self: flex-end; margin-right: 4px; }
.rail-arrow svg { width: 15px; height: 15px; transform: rotate(180deg); }
body.rail-pinned .rail-arrow svg { transform: none; }
/* The page keeps clear of the rail; opened, the rail moves it right. */
body.rail-on main { margin-left: max(84px, calc((100vw - 1280px) / 2)); }
body.rail-pinned main { margin-left: 276px; margin-right: 24px; max-width: none; }
/* Sales lists: the rail replaces the filter buttons, New and the deleted link. */
.sales-stack .form-chips, .sales-stack .form-new, .sales-stack .form-deleted-link { display: none !important; }
/* Dashboard: the squares spread evenly across a full-width tile, like the SANCTUM home
   (4 squares, 5 equal gaps: between them and to the tile's sides). */
.sales-dash { display: grid; gap: 18px; container-type: inline-size; }
.sales-dash-group { --tile: min(170px, 18cqw); --space: calc((100cqw - 2px - 4 * var(--tile)) / 5); padding: 18px 0 30px; border-radius: 18px; background: var(--onyx, #26402f); border: 1px solid var(--gold-brand); }
.sales-dash-group h2 { margin: 0 0 16px; text-align: center; color: var(--gold-bright); font-family: var(--serif); font-size: clamp(22px, 2.6vw, 28px); font-weight: 600; letter-spacing: .08em; }
.sales-squares { display: flex; justify-content: space-between; padding: 0 var(--space); }
.sales-square { width: var(--tile); flex: 0 0 var(--tile); aspect-ratio: 1; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: #fffaf0; border: 1px solid #e6dcc2; border-top: 6px solid #7d8a80; border-radius: 14px; }
.sales-square { border-left-color: transparent; border-right-color: transparent; border-bottom-color: transparent; box-shadow: 0 6px 16px #00000033; }
.sales-square b { font: 700 44px Georgia, serif; color: #2c2618; line-height: 1; }
.sales-square span { font: 600 13px Inter, system-ui, sans-serif; color: #5a5140; text-align: center; }
.sales-square.is-orange { border-top-color: #df8a2b; } .sales-square.is-green { border-top-color: #4f9a63; } .sales-square.is-red { border-top-color: #c4553a; }
.sales-pending { padding: 16px 18px; background: #fffaf0; border: 1px solid #e6dcc2; border-radius: 14px; }
.sales-pending h3 { margin: 0 0 10px; text-align: center; font: 800 13px Inter, system-ui, sans-serif; letter-spacing: .16em; color: #7a5d1c; }
/* Five rows show; more scroll inside the tile (the scroll bar stays visible). */
.sales-pending-list { max-height: calc(5 * 64px); overflow-y: scroll; scrollbar-width: thin; scrollbar-color: #b8892e #f1e8d2; padding-right: 6px; }
.sales-pending-list::-webkit-scrollbar { width: 8px; }
.sales-pending-list::-webkit-scrollbar-track { background: #f1e8d2; border-radius: 8px; }
.sales-pending-list::-webkit-scrollbar-thumb { background: #b8892e; border-radius: 8px; }
.sales-pending-none { margin: 10px 0; text-align: center; }
.sales-pending-row:not(#a) { display: grid; grid-template-columns: 86px 1fr auto; gap: 12px; align-items: center; width: 100%; height: 64px; box-sizing: border-box; min-height: 0; margin: 0; padding: 10px 6px; border: 0; border-top: 1px solid #efe6cf; border-radius: 0; background: none; color: #2c2618; text-align: left; font: 500 13.5px Inter, system-ui, sans-serif; cursor: pointer; box-shadow: none; }
.sales-pending-row:first-of-type { border-top: 0; }
.sales-pending-row:hover { background: #f6eedb; }
.sales-pending-text b { display: block; font-weight: 600; }
.sales-pending-text small { display: block; margin-top: 2px; color: #8a7a52; font-size: 12px; }
.sales-pill { padding: 3px 9px; border-radius: 10px; font: 700 11px Inter, system-ui, sans-serif; color: #fff; background: #7d8a80; white-space: nowrap; }
.sales-pill.is-red { background: #c4553a; } .sales-pill.is-orange { background: #df8a2b; color: #1d1608; } .sales-pill.is-green { background: #4f9a63; }
/* The event form as a page. */
.form-page-heading { margin-bottom: 16px; }
.form-page-crumb { margin: 0 0 4px; font: 600 12.5px Inter, system-ui, sans-serif; color: #8a7a52; }
.form-page-heading h2 { margin: 0 0 10px; font: 700 28px Georgia, serif; color: #2c2618; }
.form-page-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; font: 600 13.5px Inter, system-ui, sans-serif; }
.form-page-banner.is-green { background: #e6f1e6; border: 1px solid #b9d8bd; color: #24502f; }
.form-page-banner.is-orange { background: #fbefdc; border: 1px solid #ecc993; color: #6b4310; }
.form-page-banner.is-red { background: #f8e4de; border: 1px solid #e3b2a4; color: #7a2a17; }
.form-page-banner-note { margin-left: auto; font-weight: 500; }
.form-page .form-part, .form-page .form-group { scroll-margin-top: 96px; }
@media (max-width: 760px) {
  /* Phones: the rail becomes a bar along the bottom. */
  .sanctum-rail { top: auto; left: 0; right: 0; bottom: 0; width: auto !important; height: 60px; flex-direction: row; overflow-x: auto; border-radius: 0; padding: 6px; }
  .rail-heading, .rail-sep, .rail-arrow, .rail-item.is-sub, .rail-label { display: none !important; }
  .rail-item:not(#a) { width: 48px; flex: 0 0 48px; justify-content: center; padding: 0; }
  body.rail-on main, body.rail-pinned main { margin-left: auto; margin-right: auto; padding-bottom: 84px; }
  body .rail-item:hover::after, .rail-item.is-on::before { display: none; }
  /* The floating search button sits above the bar. */
  body.rail-on .header-search { bottom: 76px; }
  /* Two squares a row on a phone. */
  .sales-dash-group { --tile: 40cqw; --space: 6.6cqw; }
  .sales-squares { flex-wrap: wrap; row-gap: var(--space); }
}

/* Team colours (6 Nov 2026): only on the module tiles (and the header line); tables,
   lists and dashboards inside a module use the house gold. */
body.organiser-mode main { --dept: #b8892e; }

/* ---------- Header and Event Design rail (7 Nov 2026) ---------- */
/* SANCTUM, and the team's name beneath it in small capitals. */
#craftBoardTitle .where-stack { display: grid; justify-items: center; gap: 4px; line-height: 1; }
#craftBoardTitle .where-stack .where-home { font-size: clamp(20px, 2vw, 26px); letter-spacing: .18em; }
#craftBoardTitle .where-stack .where-dept:not(#a) { font: 700 11px Inter, system-ui, sans-serif; letter-spacing: .32em; color: color-mix(in srgb, var(--dept, #e8c35a) 35%, #fff); }
/* The header follows the page beside the rail, so it stays symmetric over it. */
body.rail-on .header-wrap { box-sizing: border-box; width: auto; max-width: 1280px; margin-left: max(84px, calc((100vw - 1280px) / 2)); margin-right: max(16px, calc((100vw - 1280px) / 2)); }
body.rail-pinned .header-wrap { max-width: none; margin-left: 276px; margin-right: 24px; }
/* Event Design inside an event: the rail replaces the tab row and its title band. */
body.rail-event #organiserTabs, body.rail-event .mgmt-title, body.rail-event #slimBar { display: none !important; }
body.rail-event .event-pin { position: static; min-height: 0; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
.rail-heading.is-event:not(#a) { height: auto; margin: 0; padding: 12px 12px 8px; background: none; color: #f4ecd8; text-transform: none; letter-spacing: 0; white-space: normal; overflow: visible; font: 700 17px/1.2 var(--serif, Georgia, serif); }
.rail-heading.is-event span { display: block; margin-bottom: 4px; font: 800 9.5px Inter, system-ui, sans-serif; letter-spacing: .16em; text-transform: uppercase; color: #e7b955; }
body:not(.rail-pinned) .rail-heading.is-event:not(#a) { height: 1px; padding: 0; margin: 6px; background: #3d5d48; color: transparent; overflow: hidden; }
body:not(.rail-pinned) .rail-heading.is-event span { display: none; }
body.rail-pinned .sanctum-rail { overflow-y: auto; }
.rail-count.is-navy, .sales-square.is-navy { background: #22314f; }
.sales-square.is-navy { background: #fffaf0; border-top-color: #22314f; }
.sales-dash-group.is-five { --tile: min(150px, 15cqw); --space: calc((100cqw - 2px - 5 * var(--tile)) / 6); }
.rail-home .list-tabs { display: none !important; }
.rail-home .dept-lists .list-top:not(.has-pills) { display: none; }
/* The event banner (7 Nov 2026): one line in gold with teal writing, the page's colours
   reversed: name, venue, date and where the event stands. */
.sanctum-banner > :not(.sb-line) { display: none !important; }
.sanctum-banner:not(#a) { padding: 0; min-height: 0; background: none; border: 0; box-shadow: none; }
.sb-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; min-height: 52px; box-sizing: border-box; padding: 10px 20px; border-radius: 14px; background: linear-gradient(180deg, #e8bf55, #d6a63a); color: #1f3d33; box-shadow: 0 6px 18px #5a3e1a26; }
.sbl-name { font: 700 19px var(--serif, Georgia, serif); color: #173329; }
.sbl-fact { display: inline-flex; align-items: center; gap: 6px; font: 600 13.5px Inter, system-ui, sans-serif; }
.sbl-fact svg { width: 15px; height: 15px; color: #1f3d33; }
.sbl-status { margin-left: auto; padding: 4px 12px; border-radius: 999px; background: #1f3d33; color: #f3e3b5; font: 700 12.5px Inter, system-ui, sans-serif; }
@media (max-width: 760px) { .sbl-status { margin-left: 0; } body.rail-on .header-wrap, body.rail-pinned .header-wrap { margin-left: auto; margin-right: auto; } }

/* Long rail labels wrap to two lines (7 Nov 2026). */
body.rail-pinned .rail-item:not(#a):not(.is-sub) { height: auto; min-height: 44px; padding-top: 6px; padding-bottom: 6px; }
body.rail-pinned .rail-label { white-space: normal; line-height: 1.2; }
.rail-count.is-navy { color: #fff; }
/* Approvals log: view only. */
.approvals-log:not(#a) { padding: 18px 20px; background: #fffaf0; border: 1px solid #e3d6b8; border-radius: 14px; }
.approvals-title { margin: 0 0 12px; text-align: center; font: 800 13px Inter, system-ui, sans-serif; letter-spacing: .16em; color: #7a5d1c; }
.approvals-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 14px; }
.approvals-table td { vertical-align: middle; }

/* ---------- Alignment fixes (7 Nov 2026) ---------- */
/* SANCTUM and the team's name stay at the centre of the whole ribbon. */
@media (min-width: 761px) {
  body.organiser-mode #craftBoardTitle:not(#a) { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); }
  /* Sidebar open: the crest and name go to the far left, the bell and account to the far right. */
  body.rail-pinned .header-wrap { max-width: none; margin-left: 24px; margin-right: 24px; }
}
/* The event banner: its top level with the sidebar's, the same gap above and below it. */
body.organiser-mode #eventDetail { padding-top: 0; }
body.organiser-mode .sanctum-banner:not(#a) { margin: 6px 0 15px; }
/* The rail scrolls when its items don't fit; its hover label floats outside it. */
.sanctum-rail:not(#a) { overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.sanctum-rail::-webkit-scrollbar { display: none; }
body:not(.rail-pinned) .rail-item:hover::after, body:not(.rail-pinned) .rail-item:focus-visible::after { content: none !important; }
body:not(.rail-pinned) .rail-item:not(#a):not(.is-sub) { height: 40px; }
.rail-tip { position: fixed; z-index: 70; transform: translateY(-50%); padding: 7px 10px; border-radius: 8px; background: #1b2c21; color: #f4ecd8; font: 600 12.5px Inter, system-ui, sans-serif; white-space: nowrap; box-shadow: 0 6px 18px #0005; pointer-events: none; }
.rail-tip::before { content: ""; position: absolute; left: -5px; top: 50%; margin-top: -5px; border: 5px solid transparent; border-left: 0; border-right-color: #1b2c21; }
.rail-tip.hidden { display: none; }
@media (max-width: 760px) { .rail-tip { display: none; } }

/* Passwords (7 Nov 2026). */
.passwords-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.passwords-head h3 { margin: 0; }
.passwords-pick { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.passwords-pick select { min-width: 260px; }
.passwords-word { white-space: nowrap; }
.passwords-word code { font: 700 14px ui-monospace, Menlo, monospace; letter-spacing: .04em; margin-right: 8px; }
.passwords-eye:not(#a) { font-size: 16px; text-decoration: none; }
.passwords-panel .passwords-head h3, .passwords-panel .passwords-pick { color: #f3e9cf; }
.passwords-panel > p.muted { color: #cbd5c6; }
.passwords-table tbody tr:not(#a) { background: #fffaf0; color: #2c2618; }
.passwords-table tbody tr td { border-bottom: 1px solid #e6dcc2; }
.passwords-table thead th { color: #e8c35a; }

/* Player Relations dashboard (7 Nov 2026): three squares, ↻, view-only pending rows,
   and the Registrations overview tiles. */
.sales-dash-group.is-three { --tile: min(180px, 19cqw); --space: calc((100cqw - 2px - 3 * var(--tile)) / 4); position: relative; }
.pr-refresh:not(#a) { position: absolute; top: 16px; right: 18px; width: 36px; height: 36px; min-height: 0; padding: 0; border-radius: 50%; border: 1px solid var(--gold-brand); background: transparent; color: var(--gold-bright); font-size: 19px; line-height: 1; cursor: pointer; box-shadow: none; }
.pr-refresh:hover { background: #ffffff14; }
.pr-loaded { margin: 14px 0 -12px; text-align: center; color: #cdbf95; font: 500 12px Inter, system-ui, sans-serif; }
.sales-pending-row.is-static:not(#a) { grid-template-columns: 1fr auto; cursor: default; }
.sales-pending-row.is-static:hover { background: none; }
.pr-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.pr-tile:not(#a) { display: grid; gap: 8px; min-height: 0; margin: 0; padding: 14px 16px; text-align: left; background: #fff; color: #2c2618; border: 1px solid #e6dcc2; border-top: 4px solid #b8892e; border-radius: 12px; box-shadow: 0 3px 10px #0000000f; cursor: pointer; font: 500 13.5px Inter, system-ui, sans-serif; }
.pr-tile:hover { border-color: #b8892e; box-shadow: 0 6px 16px #0000001c; }
.pr-tile-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.pr-tile-top b { font: 600 16px Georgia, serif; }
.pr-tile-line { display: flex; align-items: center; gap: 8px; }
.pr-tile-line small { min-width: 128px; color: #8a7a52; font-size: 12px; }
.pr-tile-line strong { font: 700 16px Georgia, serif; }
.pr-tile .bulb { flex: none; }
.pr-tile-line.is-stack { display: grid; gap: 2px; }

/* Event Operations sidebar (7 Nov 2026): screens not built yet are greyed. */
.rail-item.is-soon { opacity: .5; }
.rail-item.is-soon:hover { opacity: .7; }
.sales-dash-group.is-three .sales-square span { padding: 0 12px; }

/* Event results (7 Nov 2026) */
.results-content { display: grid; gap: 14px; }
.results-wait { margin: 6px 0; padding: 22px; text-align: center; color: #5a5140; background: #fffaf0; border-radius: 12px; font: 600 15px Inter, system-ui, sans-serif; }
.results-table tr.is-winner td { background: #fbf1d6; }
.results-goodies { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.results-goodies li { display: flex; gap: 12px; padding: 6px 0; border-top: 1px solid #efe6cf; }
.results-goodies li:first-child { border-top: 0; }
.results-goodies b { min-width: 120px; }
.results-content .live-stats { margin-bottom: 0; }
.results-content .live-stats strong { color: #2c2618; font-size: 30px; line-height: 1.1; }

/* Finance and Accounts (7 Nov 2026) */
.fin-soon { margin: 10px 0 0; text-align: center; color: #e9dcb6; font: 600 18px Inter, system-ui, sans-serif; }
.income-tile { margin: 0 0 18px; padding: 14px 16px; border: 1px solid #e6dcc2; border-radius: 12px; background: #fffaf0; }
.income-tile h4, .money-head { margin: 0 0 10px; font: 600 17px Georgia, serif; color: #6b5317; }
.income-tile dd small { display: block; margin-top: 2px; color: #8a7a52; font-size: 12px; }
.income-tile .income-net { border-top: 1px solid #e6dcc2; padding-top: 8px; }
.income-tile dd { color: #2c2618; }
.income-tile dd b { display: block; font: 700 24px Georgia, serif; color: #2c2618; }
.income-tile dt { color: #8a7a52; }
.income-tile .income-net { grid-column: 1 / -1; }

/* The Sphinx's dashboard (8 Nov 2026): five squares, published split in two. */
.sales-dash-group.is-five { position: relative; }
.sales-dash-group.is-five .sales-square span { padding: 0 10px; }
.sales-square .square-split { display: grid; gap: 1px; margin-top: 4px; font: 600 11.5px Inter, system-ui, sans-serif; color: #22314f; text-align: center; }
.sales-square .square-split span { font: inherit; color: inherit; padding: 0; }
/* Test copies delete themselves after 24 hours (8 Nov 2026): the countdown ring. */
.expiry { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; font: 600 12px Inter, system-ui, sans-serif; color: #9a4f12; white-space: nowrap; vertical-align: middle; }
.expiry-ring { width: 20px; height: 20px; flex: none; }
.expiry-track { fill: none; stroke: #f1dcc2; stroke-width: 3; }
.expiry-left { fill: none; stroke: #df8a2b; stroke-width: 3; stroke-linecap: round; transition: stroke-dashoffset .4s; }
.expiry-left.is-low { stroke: #c4553a; }
.test-banner-expiry .expiry { margin-left: 0; font-size: 13px; }
.test-banner-expiry .expiry-ring { width: 24px; height: 24px; }

/* ---------- Life cycle pop-up (8 Nov 2026) ---------- */
.sbl-status { border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.sbl-status:hover { background: #29503f; }
.sbl-status-i { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: #f3e3b5; color: #1f3d33; font: italic 700 11px/1 Georgia, serif; }
.life-btn { display: inline-grid; margin-left: 4px; vertical-align: middle; }
.stage-code-wrap { display: inline-flex; align-items: center; }
.note-visible { display: block; margin-top: 4px; }
.listing-life { margin-top: 10px; padding: 0; border: 0; background: none; color: #6b5418; font-weight: 700; text-decoration: underline; cursor: pointer; }
.life-dialog { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: 18px; background: #fffaf0; color: #2b2a24; overflow: auto; }
.life-dialog::backdrop { background: #10201890; }
.life-loading { padding: 32px; color: #6b6352; }
.life-head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 22px 14px; background: #1f3d33; color: #f3e3b5; }
.life-head h3 { margin: 2px 0 0; font-family: var(--serif); font-size: 22px; color: #fff; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.life-head .listing-kicker { color: #e5c46b; }
.life-close { width: 34px; height: 34px; border: 1px solid #f3e3b555; border-radius: 50%; background: transparent; color: #f3e3b5; font-size: 22px; line-height: 1; cursor: pointer; }
.life-current { display: flex; gap: 14px; align-items: flex-start; margin: 18px 22px 6px; padding: 14px 16px; border: 1px solid #e5d6ae; border-radius: 14px; background: #fff; }
.life-current p { margin: 4px 0 0; color: #4a4434; }
.life-flags { display: flex; flex-wrap: wrap; gap: 6px; }
.life-strip { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 22px 4px; padding: 0; list-style: none; }
.life-pill { display: inline-grid; place-items: center; min-width: 38px; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .04em; border: 1px solid #d8cba8; }
.life-pill.is-done { background: #dcefe3; border-color: #a9d3b8; color: #24603d; }
.life-pill.is-now { background: #1f3d33; border-color: #1f3d33; color: #f3e3b5; box-shadow: 0 0 0 3px #e5c46b; }
.life-pill.is-ahead { background: #f4f1ea; color: #a59a86; border-style: dashed; }
.life-legend { margin: 6px 22px 0; color: #6b6352; font-size: 12.5px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.life-legend .life-pill { min-width: 30px; padding: 1px 6px; font-size: 11px; }
.life-sub { margin: 20px 22px 8px; font: 800 12px Inter, system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #8a6d1f; }
.life-journey { margin: 0 22px; padding: 0 0 0 18px; list-style: none; border-left: 2px solid #e5d6ae; }
.life-block { position: relative; padding: 0 0 16px 12px; }
.life-block::before { content: ""; position: absolute; left: -26px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: #a9d3b8; border: 2px solid #fffaf0; }
.life-block.life-now::before { background: #e5c46b; box-shadow: 0 0 0 3px #1f3d3333; }
.life-block-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.life-now-tag { padding: 2px 8px; border-radius: 999px; background: #1f3d33; color: #f3e3b5; font-size: 11px; font-weight: 800; letter-spacing: .06em; }
.life-steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.life-step { padding: 8px 12px; border-radius: 10px; background: #fff; border: 1px solid #efe6cf; font-size: 14px; }
.life-step.is-move { border-color: #e5d6ae; }
.life-step-head strong { color: #1f3d33; }
.life-when { display: block; margin-top: 2px; color: #7a705c; font-size: 12.5px; }
.life-note { margin: 6px 0 0; padding: 6px 10px; border-left: 3px solid #e5c46b; background: #fdf6e3; white-space: pre-wrap; }
.life-foot { margin: 6px 22px 20px; color: #7a705c; font-size: 12.5px; }
.life-dialog .expiry { margin-left: 0; }

/* ---------- Rail tab (8 Nov 2026): a teardrop bulge on the rail's right edge ---------- */
.rail-arrow:not(#a) { display: none; }
.rail-tab { position: fixed; z-index: 41; left: 71px; top: calc(50vh + 40px); transform: translateY(-50%); width: 14px; height: 56px; padding: 0; margin: 0; border: 0; background: none; cursor: pointer; transition: left .16s ease; display: grid; place-items: center; }
body.rail-pinned .rail-tab { left: 263px; }
.rail-tab-shape { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.rail-tab-shape path { fill: #26402f; }
.rail-tab-shape .rail-tab-edge { fill: none; stroke: #3d5d48; stroke-width: 1; }
.rail-tab > svg:not(.rail-tab-shape) { position: relative; width: 11px; height: 11px; margin-left: -3px; stroke-width: 3.6; color: #e5c46b; transform: rotate(180deg); transition: transform .16s ease; }
body.rail-pinned .rail-tab > svg:not(.rail-tab-shape) { transform: none; }
.rail-tab:hover .rail-tab-shape path:first-child { fill: #2f4f3a; }
.rail-tab:focus-visible { outline: 2px solid #e5c46b; outline-offset: 2px; border-radius: 8px; }
.sanctum-rail:not(#a) { padding-top: 14px; }
@media (max-width: 760px) { .rail-tab { display: none; } }

/* ---------- Main headings in the rail (8 Nov 2026): Sales first ---------- */
.rail-item.is-new:not(#a) { color: #d9d0b8; }
.rail-item.is-main:not(#a) { color: #e7b955; font-weight: 700; font-size: 14px; }
.rail-item.is-main.is-on:not(#a) { color: #8a6d1f; }
.rail-heading.is-main:not(#a) { position: relative; display: flex; align-items: center; justify-content: flex-start; gap: 12px; height: 44px; margin: 6px 0 2px; padding: 0 10px; color: #e7b955; font: 700 14px Inter, system-ui, sans-serif; letter-spacing: 0; text-transform: none; background: none; overflow: visible; }
.rail-heading.is-main svg { width: 22px; height: 22px; flex: 0 0 22px; }
.rail-head-find { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid #3d5d48; border-radius: 50%; background: transparent; color: #d9d0b8; cursor: pointer; }
.rail-head-find svg { width: 16px; height: 16px; flex: 0 0 16px; }
.rail-head-find:hover, .rail-head-find:focus-visible { background: #ffffff14; outline: none; }
.rail-head-find.is-on { background: #f4ecd8; color: #26402f; border-color: #f4ecd8; }
body.rail-pinned .rail-item.is-closed-only:not(#a) { display: none; }
body:not(.rail-pinned) .rail-heading.is-main:not(#a) { height: 1px; margin: 6px; padding: 0; background: #3d5d48; color: transparent; overflow: hidden; }
body:not(.rail-pinned) .rail-heading.is-main > * { display: none; }

/* Groups (8 Nov 2026): a heading folds its items, which hang off a tree line. */
.rail-group { display: flex; flex-direction: column; gap: 2px; flex: 0 0 auto; }
.rail-group-items { display: flex; flex-direction: column; gap: 2px; }
.rail-heading.is-main:not(#a) { cursor: pointer; border-radius: 10px; }
.rail-heading.is-main:not(#a):hover { background: #ffffff0d; }
.rail-heading.is-main:focus-visible { outline: 2px solid #e7b955; outline-offset: -2px; }
.rail-head-caret { display: grid; place-items: center; width: 12px; order: -1; margin: 0 -6px 0 -4px; color: #e7b955; }
.rail-head-caret svg { width: 11px !important; height: 11px !important; flex-basis: 11px !important; transform: rotate(-90deg); stroke-width: 3; transition: transform .14s ease; }
.rail-group.is-folded > .rail-heading .rail-head-caret svg { transform: rotate(180deg); }
body.rail-pinned .rail-group.is-folded > .rail-group-items { display: none; }
body.rail-pinned .rail-group-items { margin-left: 21px; padding-left: 10px; border-left: 1.5px solid #4d6b55; }
body.rail-pinned .rail-group-items .rail-item:not(#a) { height: 38px; min-height: 38px; padding-left: 8px; font-size: 13px; }
body.rail-pinned .rail-group-items .rail-item svg { width: 18px; height: 18px; flex-basis: 18px; }
body.rail-pinned .rail-group.is-subgroup > .rail-heading.is-main:not(#a) { height: 38px; margin: 2px 0; padding-left: 8px; font-size: 13px; }
body.rail-pinned .rail-group.is-subgroup > .rail-heading svg:not(.rail-head-caret svg) { width: 18px; height: 18px; flex-basis: 18px; }
body.rail-pinned .rail-group.is-subgroup > .rail-group-items { margin-left: 17px; }
body:not(.rail-pinned) .rail-group.is-subgroup > .rail-heading.is-main:not(#a) { display: none; }
body.rail-pinned .rail-group-items .rail-item.is-sub:not(#a) { height: 30px; min-height: 30px; padding-left: 38px; font-size: 12.5px; }
@media (max-width: 760px) {
  .rail-group, .rail-group-items { display: contents !important; }
  .rail-item.is-closed-only:not(#a) { display: flex !important; }
}
.rail-heading.is-main .rail-main-label { min-width: 0; white-space: normal; line-height: 1.2; }
.rail-heading.is-main:not(#a):has(.rail-head-find) { padding-right: 46px; }

/* Player site: Share under each event tile (30 Oct 2026, carried into the merge 8 Nov 2026). */
.event-tile { display: flex; flex-direction: column; min-width: 0; }
.event-tile > .event-card { flex: 1; }
:root:root #eventList .event-tile > .event-card { border-bottom-left-radius: 0 !important; border-bottom-right-radius: 0 !important; }
.tile-share { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 10px 14px; border: 3px solid var(--onyx); border-top: 0; border-radius: 0 0 14px 14px; background: var(--onyx); color: var(--gold-bright); font-size: 13.5px; font-weight: 700; letter-spacing: .04em; cursor: pointer; }
.tile-share:hover, .tile-share:focus-visible { color: #fff; }
.event-tile > .event-card:hover { transform: none; }

/* 9 Nov 2026: with the sidebar open, the page never runs past the window; wide
   tiles (Gameplay Elements) shrink or wrap instead. */
body.rail-pinned main:not(#a) { min-width: 0; max-width: calc(100vw - 300px); }
body.rail-on .organizer-stack, body.rail-on .event-panel { min-width: 0; }
body.rail-on .organizer-stack:not(#a) { grid-template-columns: minmax(0, 1fr); }
body.rail-on .gameplay-panel:not(#a), body.rail-on .gameplay-panel .energy-group:not(#a) { grid-template-columns: minmax(0, 1fr); }
body.rail-on .gameplay-panel .form-stack, body.rail-on .gameplay-panel .energy-head { min-width: 0; }
body.rail-on .gameplay-panel .energy-config:not(#a), body.rail-on .gameplay-panel .energy-group .energy-body:not(#a) { grid-template-columns: minmax(0, 1fr); }
/* 13 Nov 2026: the bar's four tiles are only as wide as what they hold (a 12-letter
   name, three-digit numbers), and the room left over goes between them, so they
   stay on one row with the sidebar open. */
.gameplay-panel .energy-group .energy-fields:not(#a):not(#b) { flex-wrap: nowrap; justify-content: space-between; gap: 12px; }
.gameplay-panel .energy-fields .energy-field:not(#a):not(#b) { flex: 0 0 auto; min-width: 0; justify-content: flex-start; padding: 16px 12px 22px; }
.gameplay-panel .energy-fields .energy-field > span:first-child:not(#a):not(#b) { flex: 0 0 auto; white-space: nowrap; }
.gameplay-panel .energy-fields .energy-field > input, .gameplay-panel .energy-fields .energy-field .unit-input { flex: 0 0 auto; }
.gameplay-panel .energy-fields .energy-field:first-child input:not(#a):not(#b) { flex: 0 0 auto; width: 10ch; min-width: 0; }
.gameplay-panel .energy-fields .unit-input input:not(#a):not(#b) { width: 6.2ch; padding: 0 4px 0 8px; }
/* Narrower windows: label and box stay side by side; the text and boxes get smaller
   instead, so the four tiles still share one row. */
@media (max-width: 1400px) {
  body.rail-pinned .gameplay-panel .energy-fields .energy-field:not(#a):not(#b) { gap: 6px; padding: 14px 10px 22px; }
  body.rail-pinned .gameplay-panel .energy-fields .energy-field > span:first-child:not(#a):not(#b) { font-size: 12.5px; }
  body.rail-pinned .gameplay-panel .energy-fields .energy-field input:not([type=checkbox]):not(#a):not(#b) { font-size: 14px; min-height: 38px; height: 38px; }
  body.rail-pinned .gameplay-panel .energy-fields .unit-input:not(#a):not(#b) { gap: 4px; font-size: 13px; }
  body.rail-pinned .gameplay-panel .energy-fields .follow-check:not(#a):not(#b) { font-size: 11.5px; }
}
@media (max-width: 1250px) {
  body.rail-pinned .gameplay-panel .energy-group .energy-fields:not(#a):not(#b) { gap: 8px; }
  body.rail-pinned .gameplay-panel .energy-fields .energy-field:not(#a):not(#b) { gap: 5px; padding: 14px 8px 22px; }
  body.rail-pinned .gameplay-panel .energy-fields .energy-field > span:first-child:not(#a):not(#b) { font-size: 11.5px; }
  body.rail-pinned .gameplay-panel .energy-fields .energy-field input:not([type=checkbox]):not(#a):not(#b) { font-size: 13px; padding: 0 6px; }
  body.rail-pinned .gameplay-panel .energy-fields .energy-field:first-child input:not(#a):not(#b) { width: 9ch; }
  body.rail-pinned .gameplay-panel .energy-fields .unit-input input:not(#a):not(#b) { width: 52px; }
  body.rail-pinned .gameplay-panel .energy-fields .follow-check:not(#a):not(#b) { font-size: 11px; }
  body.rail-pinned .gameplay-panel .energy-fields .energy-field:nth-child(2):not(#a):not(#b) { min-width: 136px; }
}
@media (max-width: 1100px) {
  .gameplay-panel .energy-fields .energy-field:not(#a):not(#b) { gap: 6px; padding: 14px 10px 22px; }
  .gameplay-panel .energy-fields .energy-field > span:first-child:not(#a):not(#b) { font-size: 12.5px; }
  .gameplay-panel .energy-fields .energy-field input:not([type=checkbox]):not(#a):not(#b) { font-size: 14px; min-height: 38px; height: 38px; }
}
@media (max-width: 820px) { .gameplay-panel .energy-group .energy-fields:not(#a):not(#b) { flex-wrap: wrap; justify-content: center; } }
@media (max-width: 560px) { .gameplay-panel .energy-fields .energy-field:not(#a):not(#b) { flex: 1 1 100%; } }

/* ---------- Demo View (9 Nov 2026): the event on a phone ---------- */
.demo-panel { display: grid; gap: 18px; }
.demo-head { display: grid; justify-items: center; gap: 6px; text-align: center; }
.demo-head .dark-title { margin: 0; }
.demo-sub { margin: 0; color: #d9d0b8; font-size: 14px; }
.demo-paths { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; color: #e7b955; font-weight: 700; font-size: 13px; }
.demo-paths > span { margin-right: 4px; }
.demo-path { width: 34px; height: 34px; border-radius: 50%; border: 1px solid #4d6b55; background: transparent; color: #f4ecd8; font-weight: 800; cursor: pointer; }
.demo-path.is-on { background: #e7b955; border-color: #e7b955; color: #1f3d33; }
.demo-body { display: grid; grid-template-columns: auto minmax(220px, 300px); justify-content: center; gap: 32px; align-items: start; }
.demo-phone-col { display: grid; justify-items: center; gap: 14px; }
.demo-phone { position: relative; width: 340px; height: 690px; padding: 14px; border-radius: 46px; background: #0f1a14; box-shadow: 0 0 0 2px #3d5d48, 0 24px 60px #0007; }
.demo-notch { position: absolute; z-index: 2; top: 22px; left: 50%; width: 92px; height: 24px; transform: translateX(-50%); border-radius: 14px; background: #0f1a14; }
.demo-phone-screen { height: 100%; overflow-y: auto; border-radius: 34px; background: #1f3d33; color: #f4ecd8; scrollbar-width: none; }
.demo-phone-screen::-webkit-scrollbar { display: none; }
.demo-status { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 48px 18px 10px; background: #1a3329; font-size: 12.5px; font-weight: 700; color: #e7b955; }
.demo-status span:first-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.demo-live { padding: 2px 8px; border-radius: 999px; background: #2f7a4f; color: #fff; font-size: 11px; }
.demo-page { display: grid; gap: 12px; padding: 16px 18px 24px; }
.demo-page h4 { margin: 0; font-family: var(--serif); font-size: 22px; color: #f3e3b5; }
.demo-kicker { margin: 0; color: #e7b955; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.demo-pic { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; }
.demo-text { white-space: pre-wrap; line-height: 1.55; font-size: 15px; }
.demo-empty { margin: 8px 0; padding: 14px; border: 1px dashed #4d6b55; border-radius: 12px; color: #b9c7b8; font-size: 14px; text-align: center; }
.demo-fake-button { justify-self: center; padding: 10px 34px; border-radius: 999px; background: #e7b955; color: #1f3d33; font-weight: 800; }
.demo-card-page { padding: 14px 12px 24px; }
.demo-card.challenge-card { margin: 0; text-align: center; }
.demo-card .challenge { white-space: pre-wrap; }
.demo-card .demo-pic { margin: 8px 0; }
.demo-needs { margin: 10px 0 0; color: #e7b955; font-size: 13px; font-weight: 700; }
.demo-tag { margin-top: 12px; padding: 12px; border: 1px dashed #c9a227; border-radius: 10px; color: #f3e3b5; font-size: 14px; font-weight: 700; }
.demo-ending { min-height: 520px; align-content: center; }
.demo-pop { display: grid; gap: 12px; padding: 22px 18px; border-radius: 18px; background: #fffaf0; color: #2b2a24; text-align: center; box-shadow: 0 10px 30px #0006; }
.demo-pop h4 { color: #1f3d33; }
.demo-note { margin: 0; color: #8a7d60; font-size: 12.5px; }
.demo-nav { display: flex; align-items: center; gap: 16px; }
.demo-count { min-width: 70px; color: #f3e3b5; font-weight: 700; text-align: center; }
.demo-steps { display: grid; gap: 2px; max-height: 720px; overflow-y: auto; margin: 0; padding: 14px; list-style: none; border-radius: 16px; background: #fffaf0; }
.demo-step-group { margin: 10px 0 2px; color: #8a6d1f; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.demo-step-group:first-child { margin-top: 0; }
.demo-step { width: 100%; padding: 7px 10px 7px 14px; border: 0; border-left: 2px solid #e5d6ae; background: none; color: #4a4434; font-size: 14px; text-align: left; cursor: pointer; }
.demo-step-solo .demo-step { padding-left: 10px; border-left: 0; font-weight: 700; }
.demo-step:hover { background: #f4ecd8; }
.demo-step.is-on { border-left-color: #c9a227; background: #f3e3b5; color: #1f3d33; font-weight: 800; }
.demo-step.is-missing { color: #b0533c; }
@media (max-width: 1100px) { .demo-body { grid-template-columns: 1fr; justify-items: center; } .demo-steps { width: min(340px, 100%); max-height: 300px; } }
.demo-card .demo-answer span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 9 Nov 2026: the Story Board's tabs share the full width evenly; with many
   challenges they keep a minimum width and the row scrolls. */
.sb-story-tile .sb-tabs:not(#a) > .trial-tab { flex: 1 1 auto; min-width: 56px; justify-content: center; }
/* 9 Nov 2026: the open tab joins its sheet (the panel's top line no longer shows
   through it), and the sheet's top corners sit square under the end tabs. */
.sb-story-tile { --sheet: #fbf4e2; --sheet-edge: #c9a227; }
.sb-story-tile .sb-tabs:not(#a) { padding-left: 0; }
.sb-story-tile .sb-tabs:not(#a) > .trial-tab.active { position: relative; z-index: 2; background: var(--sheet); border-color: var(--sheet-edge); }
#storyboardView .sb-panel:not(#a) { border-top-left-radius: 0; border-top-right-radius: 0; }
.gameplay-panel .energy-fields .energy-field:nth-child(2):not(#a):not(#b) { min-width: 150px; }
.gameplay-panel .energy-fields input[type=number] { appearance: textfield; -moz-appearance: textfield; }
.gameplay-panel .energy-fields input[type=number]::-webkit-inner-spin-button,
.gameplay-panel .energy-fields input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* Event form tidy-up (13 Nov 2026): FID title, required marks, "i" after labels,
   one-or-two dates, a neat Entries row, and a folding two-line conversation. */
.form-fid-badge { display: inline-block; margin: 0 0 6px; padding: 5px 16px; border-radius: 999px; background: var(--onyx); color: var(--gold-bright); font-family: var(--serif); font-size: 24px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-style: normal; }
.form-dialog-heading .form-dialog-status { margin: 0; color: #6b5f45; font-family: var(--sans); font-size: 13.5px; font-weight: 600; letter-spacing: .02em; }
.form-group .label-line, .form-group > h5 { display: flex; align-items: center; gap: 5px; min-height: 20px; white-space: nowrap; }
.req { color: #b2321f; font-weight: 800; }
.form-group > h5 .req { font-size: 13px; }
.field-tip { margin-left: 2px; vertical-align: middle; }
.form-group > h5 .field-tip .info-pop, .form-group .label-line .field-tip .info-pop { text-transform: none; letter-spacing: 0; white-space: normal; font-family: var(--sans); font-style: normal; font-weight: 450; }
.form-group .form-grid input, .form-group .form-grid select, .form-group .venue-grid input, .form-group .venue-grid select { height: 40px; }
.date-mode { margin: 0 0 10px; font-weight: 600; font-size: 13px; }
.date-pair.is-single { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.date-pair.is-single .date-second { visibility: hidden; }
.entries-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px 26px; }
.entry-cell { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
.entry-cell input { height: 40px; }
.entry-cell input.num-2 { width: 4.2ch; min-width: 56px; padding: 0 6px; text-align: center; }
.entry-cell input.num-4 { width: 92px; text-align: center; }
.entry-cell input.num-6 { width: 110px; }
.form-group input.num-6 { max-width: 140px; }
.form-group input.num-8 { max-width: 170px; }
.entry-cell .unit-input { justify-content: flex-start; gap: 6px; }
.entry-cell .unit-input input { font-size: 15px; font-weight: 600; text-align: center; }
.entry-cell .duration-fields { display: flex; gap: 10px; }
.entries-row input[type="number"]::-webkit-inner-spin-button, .entries-row input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.entries-row input[type="number"] { -moz-appearance: textfield; }
/* Two-way choices (13 Nov 2026, option A): each choice is its own button with a
   radio dot; the chosen one gets a gold ring, a filled dot and a tint. */
.choice { display: flex; flex-wrap: wrap; gap: 8px; }
.choice label { display: flex !important; align-items: center; gap: 8px; height: 40px; margin: 0; padding: 0 14px 0 11px; border: 1.5px solid #d9c9a6; border-radius: 9px; background: #fff; cursor: pointer; font-size: 13px; font-weight: 600; color: #6b5f45; white-space: nowrap; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label::before { content: ""; flex: none; width: 16px; height: 16px; border: 2px solid #b9a77f; border-radius: 50%; background: #fff; box-sizing: border-box; }
.choice label:has(input:checked) { border-color: #b8892e; background: #fbf1d8; color: #2a241a; box-shadow: 0 0 0 1px #b8892e inset; }
.choice label:has(input:checked)::before { border-color: #2e4a3c; background: radial-gradient(circle, #2e4a3c 0 4px, #fff 4.5px); }
.choice label:has(input:focus-visible) { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
.choice label:has(input:disabled) { cursor: default; }
.choice label:has(input:disabled:not(:checked)) { opacity: .55; }
/* Option B (mock-up only): plain radio buttons, one under the other. */
.choice-b .choice { display: grid; gap: 6px; }
.choice-b .choice label { height: auto; padding: 0; border: 0; background: none; box-shadow: none; }
.choice-b .choice label:has(input:checked) { background: none; box-shadow: none; }
/* Entries: five equal sub-tiles across the full width. */
.form-group .entries-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.form-group .entries-row .entry-cell { padding: 10px 12px 12px; border: 1px solid #ece2cb; border-radius: 9px; background: #faf5ea; }
@media (max-width: 1180px) { .form-group .entries-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .form-group .entries-row { grid-template-columns: 1fr; } }
.form-log-tile { margin: 0 0 16px; border: 1px solid #d9c9a6; border-radius: 12px; background: #fffdf8; }
.form-log-tile > summary { display: flex; align-items: center; gap: 8px; padding: 10px 14px; cursor: pointer; list-style: none; font-family: var(--serif); font-size: 16px; font-weight: 600; }
.form-log-tile > summary::-webkit-details-marker { display: none; }
.form-log-tile > summary::before { content: "▸"; color: #98701d; font-size: 13px; transition: transform .15s; }
.form-log-tile[open] > summary::before { transform: rotate(90deg); }
.form-log-count { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: #efe4c8; color: #6b5418; font-family: var(--sans); font-size: 12px; font-weight: 800; text-align: center; }
.form-log-tile .form-log-list { gap: 0; padding: 0 14px 8px; }
.form-log-tile .form-log-entry { padding: 7px 0 7px 10px; border-left: 3px solid #b8892e; border-radius: 0; background: none; border-bottom: 1px solid #efe6d2; }
.form-log-tile .form-log-entry:last-child { border-bottom: 0; }
.form-log-tile .form-log-entry.is-sphinx { border-left-color: #2e4a3c; background: none; }
.form-log-tile .form-log-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 13px; line-height: 1.35; }
.form-log-tile .form-log-head b { color: #2a241a; }
.form-log-tile .form-log-what { color: #6b5418; font-weight: 600; }
.form-log-tile .form-log-when { display: inline; margin: 0 0 0 auto; color: #8a7d60; font-size: 12px; white-space: nowrap; }
.form-log-tile .form-log-note { margin: 2px 0 0; font-size: 13.5px; line-height: 1.4; white-space: pre-wrap; }
.form-log-tile .form-log-note.is-empty { color: #a09378; font-style: italic; }
@media (max-width: 860px) { .form-log-tile .form-log-when { margin-left: 0; } }
.form-fid-badge.is-inline { margin: 0 12px 0 0; padding: 3px 12px; font-size: 20px; vertical-align: 2px; }
.form-group .label-line { height: 22px; min-height: 0; }
.field-tip { display: inline-flex; align-items: center; line-height: 0; }
.field-tip .info-pop { line-height: 1.45; }
.entry-cell .choice { justify-self: start; }
.entry-cell .unit-input > span { align-self: center; line-height: 1; }
.date-mode { margin-bottom: 14px; }
.date-mode input { width: 16px; height: 16px; margin: 0; }
.form-group .entries-row .entry-cell { gap: 6px; align-content: start; }
.entries-row input { margin: 0; }
.form-section > legend .field-tip, .form-send-note .label-line .field-tip { margin-left: 6px; }
.form-section > legend .req { margin-left: 3px; }
.form-send-note .label-line { display: flex; align-items: center; gap: 4px; }
.form-group .entries-row .entry-cell input, .form-group .entries-row .entry-cell select { margin-top: 0; }
.form-group .checkbox-row.date-mode { margin: 0 0 14px; }
.entry-cell .choice { flex-wrap: nowrap; width: max-content; max-width: 100%; gap: 6px; }
.entry-cell .choice label { padding: 0 10px 0 9px; gap: 6px; }
.choice-b .entry-cell .choice { display: grid; }
@media (max-width: 1320px) { .form-group .entries-row .label-line { font-size: 12px; gap: 3px; } .entry-cell .choice label { font-size: 12px; padding: 0 8px; } .form-group .entries-row .entry-cell { padding: 10px 9px 12px; } }
.entry-cell .choice { width: auto; justify-self: stretch; flex-wrap: wrap; }
/* 13 Nov 2026: the user chose option B — plain radio buttons, one under the other. */
.entry-cell .choice { display: grid; gap: 7px; width: auto; }
.entry-cell .choice label, .choice label { height: auto; padding: 0; border: 0; background: none; box-shadow: none; font-size: 13.5px; }
.choice label:has(input:checked) { background: none; box-shadow: none; border: 0; }
.choice label:has(input:focus-visible) { outline: 2px solid var(--gold-bright); outline-offset: 3px; border-radius: 4px; }
/* Prizes and goodies rows (13 Nov 2026). */
.award-list { display: grid; gap: 10px; }
.award-row { padding: 10px 12px; border: 1px solid #ece2cb; border-radius: 9px; background: #faf5ea; }
.award-main { display: grid; grid-template-columns: 150px 170px minmax(0, 1fr) auto 34px; gap: 10px 12px; align-items: end; }
.award-main > label.hidden { display: none; }
.award-main [data-kind="goodie"] input { width: 110px; }
.award-main .award-sponsored { align-self: end; height: 40px; white-space: nowrap; }
.award-main:not(:has([data-kind]:not(.hidden))) .award-details { grid-column: 2 / 4; }
.award-sponsor { display: none; grid-template-columns: 1fr 1.2fr 1.4fr; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed #e0d2b0; }
.award-row.is-sponsored .award-sponsor { display: grid; }
.award-remove { width: 34px; height: 40px; border: 1px solid #e3d6b8; border-radius: 8px; background: #fff; color: #9b2f22; font-size: 18px; cursor: pointer; }
.award-remove[disabled], .award-add[disabled] { display: none; }
.award-add { margin-top: 10px; }
.award-empty { margin: 0; }
.sponsor-linked .sponsor-row { grid-template-columns: 1fr 1.2fr 1.4fr 70px; opacity: .8; }
.sponsor-linked-tag { align-self: center; justify-self: start; padding: 2px 9px; border-radius: 999px; background: #efe4c8; color: #6b5418; font-size: 11.5px; font-weight: 800; }
.form-group label.is-dull input { background: #efe9dc; color: #6f6656; font-weight: 700; }
@media (max-width: 860px) { .award-main { grid-template-columns: 1fr 1fr; } .award-main .award-details { grid-column: 1 / -1; } .award-sponsor, .sponsor-linked .sponsor-row { grid-template-columns: 1fr; } }
.form-m6 .sponsor-row, .form-m6 .sponsor-linked .sponsor-row { grid-template-columns: 1fr 1.2fr 1.4fr 70px; }
.form-m6 .sponsor-remove { justify-self: start; }
@media (max-width: 860px) { .form-m6 .sponsor-row, .form-m6 .sponsor-linked .sponsor-row { grid-template-columns: 1fr; } }
/* Urgent rows (13 Nov 2026): light red, the warning on hover. */
.event-row.is-urgent { position: relative; }
.dept-lists .event-rows .event-row.is-urgent, .event-row.is-urgent { background: #fbe4e0; }
.dept-lists .event-rows .event-row.is-urgent:hover, .dept-lists .event-rows .event-row.is-urgent:focus-visible, .event-row.is-urgent:hover { background: #f8d6d0; }
.event-row .row-alert { position: absolute; left: 50%; bottom: calc(100% - 8px); z-index: 20; display: none; gap: 2px; padding: 8px 12px; border-radius: 9px; background: #8f2a1d; color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; transform: translateX(-50%); box-shadow: 0 8px 20px #0003; pointer-events: none; }
.event-row .row-alert::after { content: ""; position: absolute; left: 50%; top: 100%; border: 6px solid transparent; border-top-color: #8f2a1d; transform: translateX(-50%); }
.event-row.is-urgent:hover .row-alert, .event-row.is-urgent:focus-visible .row-alert { display: grid; }
.dept-lists .event-rows .event-row.is-urgent, .dept-lists .event-rows .event-row.is-urgent:hover, .event-row.is-urgent { --strip: #c0392b; border-left-color: #c0392b; }
