/* The planner in Aftabi Games' colours (the studio site's palette: ink, cream, sun, slate,
   Fraunces and Nunito). Loaded after the page's own styles on the self-hosted planner, and by
   the sign-in page. */
:root:root:not([data-aft]) {
  --bg: #121318;
  --panel: #1b1d24;
  --line: #2b2e39;
  --fg: #ece6da;
  --dim: #a3a9c2;
  --accent: #ffb65b;
  --accent-soft: #3b2f23;
  --carve: #ff9fb8;
  --note: #b9a0d6;
  --good: #8fd19e;
  --warn: #ff8f4a;
  --mapbg: #0f1015;
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --cream: #f6efe3;
  --slate: #5a678f;
  --sun: #ffb65b;
  --discord: #5865f2;
  --f-display: "Fraunces", Georgia, serif;
  color-scheme: dark;
}
body { background: var(--bg); color: var(--fg); }

/* ---- The planner's header ---- */
header { gap: 14px 18px; background: linear-gradient(180deg, #1d1f28, var(--panel)); }
header h1 { font-family: var(--f-display); font-weight: 500; font-size: 20px; color: var(--cream); font-variation-settings: "SOFT" 100, "opsz" 72; }
header h1 em { font-style: italic; font-weight: 400; color: var(--sun); }
.aft-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--cream); text-decoration: none; font-weight: 800; letter-spacing: .01em; padding-right: 14px; border-right: 1px solid var(--line); }
.aft-brand img { width: 34px; height: 34px; }
.aft-brand em { font-style: normal; font-weight: 600; color: var(--dim); margin-left: 4px; }
.aft-who { display: flex; align-items: center; gap: 10px; }
.aft-user { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--cream); }
.av { border-radius: 50%; display: inline-grid; place-items: center; flex: none; object-fit: cover; }
.av--blank { background: var(--slate); color: var(--cream); font-weight: 800; font-size: 13px; }
.aft-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; border: 0;
  background: var(--sun); color: #1d201f; font: 800 13px var(--font); cursor: pointer; text-decoration: none; white-space: nowrap;
}
.aft-btn:hover { box-shadow: 0 8px 26px -10px rgba(255, 182, 91, .9); }
.aft-btn--ghost { background: rgba(255, 255, 255, .06); color: var(--cream); border: 1.5px solid rgba(255, 255, 255, .22); }
.aft-btn--ghost:hover { background: rgba(255, 255, 255, .12); box-shadow: none; }
button.btn.primary { color: #1d201f; font-weight: 800; }
button.btn { border-radius: 999px; }
.tool[aria-pressed="true"] { color: var(--sun); }
@media (max-width: 760px) {
  .aft-brand span { display: none; }
  .aft-brand { border-right: 0; padding-right: 0; }
  .aft-who { margin-left: auto; }
  .aft-user span { display: none; }
}

/* ---- People ---- */
.aft-dialog {
  width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 64px); border: 1px solid var(--line); border-radius: 22px;
  background: var(--panel); color: var(--fg); padding: 0; font-family: var(--font);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7);
}
.aft-dialog::backdrop { background: rgba(10, 10, 14, .62); backdrop-filter: blur(4px); }
.aft-people { padding: 20px 22px 22px; display: grid; gap: 12px; }
.aft-people header { all: unset; display: flex; align-items: center; justify-content: space-between; }
.aft-people h2 { margin: 0; font-family: var(--f-display); font-weight: 500; font-size: 26px; color: var(--cream); text-transform: none; letter-spacing: 0; }
.aft-people h3 { margin: 8px 0 0; font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--sun); }
.aft-x { background: none; border: 0; color: var(--dim); font-size: 26px; line-height: 1; cursor: pointer; padding: 4px 8px; }
.aft-add { display: flex; gap: 8px; }
.aft-add input { flex: 1; min-width: 0; padding: 9px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); font: 14px var(--font); }
.aft-people ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.aft-people li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.aft-people li .nm { flex: 1; min-width: 0; display: grid; }
.aft-people li .nm b { color: var(--cream); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aft-people li small { color: var(--dim); }
.aft-err { color: var(--warn); margin: 0; font-size: 14px; }
.aft-people .empty { margin: 0; }

/* ---- Sign-in page ---- */
.aft-signin {
  min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center;
  padding: 32px 16px; box-sizing: border-box;
  background:
    radial-gradient(1100px 640px at 15% -10%, #2b2140, transparent 60%),
    radial-gradient(900px 600px at 100% 110%, rgba(90, 103, 143, .35), transparent 60%),
    var(--bg);
  font-family: var(--font); color: var(--fg);
}
.aft-card { width: 100%; max-width: 440px; min-width: 0; text-align: center; display: grid; gap: 18px; justify-items: center; }
.aft-card > *, #state > * { max-width: 100%; box-sizing: border-box; }   /* centred grid items shrink to fit: let text wrap */
#state { width: 100%; }
.aft-card .hero { width: min(300px, 80%); height: auto; filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .35)); }
.aft-card .eyebrow { margin: 0; font-weight: 800; font-size: 12px; letter-spacing: .28em; text-transform: uppercase; color: var(--sun); }
.aft-card h1 { margin: 0; font-family: var(--f-display); font-weight: 500; font-size: clamp(34px, 8vw, 48px); line-height: 1; color: var(--cream); font-variation-settings: "SOFT" 100, "opsz" 144; }
.aft-card h1 em { font-style: italic; font-weight: 400; color: var(--sun); }
.aft-card p { margin: 0; color: var(--dim); line-height: 1.55; }
.aft-card p b { color: var(--cream); }
.aft-discord {
  display: inline-flex; align-items: center; gap: 12px; padding: 15px 28px; border-radius: 999px; background: var(--discord); color: #fff;
  font: 800 16px var(--font); text-decoration: none; transition: box-shadow .3s;
}
.aft-discord:hover { box-shadow: 0 0 0 6px rgba(88, 101, 242, .2), 0 18px 50px -10px rgba(88, 101, 242, .8); }
.aft-discord svg { width: 22px; height: 22px; fill: currentColor; }
.aft-note { font-size: 13px; }
.aft-note a { color: var(--cream); }
.aft-msg { padding: 10px 16px; border-radius: 14px; background: rgba(255, 143, 74, .12); color: var(--warn); font-size: 14px; }
