/* Studio by Concepts by Al. Brand: gold #E39E29 on ink, Bebas Neue for display, Montserrat for text. */
:root {
  --ink: #0b0b0c;
  --ink-2: #141416;
  --ink-3: #1e1e21;
  --gold: #e39e29;
  --gold-lt: #eeb144;
  --on-ink: #f4f3f1;
  --on-ink-muted: #a5a29c;

  --bg: #f4f3f1;
  --surface: #ffffff;
  --surface-2: #efede9;
  --text: #0b0b0c;
  --muted: #5f5c57;
  --border: #e2dfd9;
  --accent: #9a6210; /* gold, darkened enough to read as text on white */
  --accent-bg: #fbf0dc;
  --ok: #2f6b16;
  --ok-bg: #e8f3de;
  --warn: #85500b;
  --warn-bg: #faeeda;
  --bad: #a32d2d;
  --bad-bg: #fcebeb;
  --info: #1d5c96;
  --info-bg: #e6f1fb;
  --radius: 8px;
  --display: 'Bebas Neue', Impact, sans-serif;
  --body: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0c;
    --surface: #141416;
    --surface-2: #1e1e21;
    --text: #f4f3f1;
    --muted: #a5a29c;
    --border: #2c2c30;
    --accent: #eeb144;
    --accent-bg: #3a2a0d;
    --ok: #a9d98a;
    --ok-bg: #1f3a10;
    --warn: #f5c56f;
    --warn-bg: #4a3208;
    --bad: #f3a7a7;
    --bad-bg: #4d1717;
    --info: #9cc6f0;
    --info-bg: #0f2f4f;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 15px/1.55 var(--body); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
h1 { font: 400 34px/1.05 var(--display); letter-spacing: 0.02em; margin: 0 0 16px; }
h2 { font-size: 16px; font-weight: 600; margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---- Shell: dark sidebar, light content ---- */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--ink); color: var(--on-ink); display: flex; flex-direction: column; gap: 14px; padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.wordmark { display: flex; align-items: center; gap: 10px; color: var(--on-ink); text-decoration: none; padding: 0 6px; }
.wordmark b { display: block; font: 400 26px/0.9 var(--display); letter-spacing: 0.04em; color: var(--gold); }
.wordmark small { display: block; font-size: 10.5px; color: var(--on-ink-muted); letter-spacing: 0.04em; }

.switcher { position: relative; }
.switch-btn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--ink-3); border: 1px solid #2c2c30; border-radius: 10px; color: var(--on-ink); text-align: left; }
.switch-btn:hover { background: #26262a; }
.switch-btn .names { flex: 1; min-width: 0; }
.switch-btn .names b { display: block; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.switch-btn .names small { display: block; font-size: 11px; color: var(--on-ink-muted); }
.switch-menu { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 6px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); max-height: 60vh; overflow-y: auto; }
.switch-menu button { width: 100%; display: flex; align-items: center; gap: 10px; border: none; background: none; padding: 7px 8px; border-radius: 6px; text-align: left; }
.switch-menu button:hover, .switch-menu button.on { background: var(--surface-2); }
.switch-menu hr { border: none; border-top: 1px solid var(--border); margin: 6px 0; }

.logo { width: 30px; height: 30px; border-radius: 7px; flex: none; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: #fff; overflow: hidden; background: #555; }
.logo img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.logo.lg { width: 44px; height: 44px; border-radius: 10px; font-size: 15px; }

nav { display: flex; flex-direction: column; gap: 2px; }
nav a, nav .more { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius); color: var(--on-ink-muted); text-decoration: none; font-size: 14px; font-weight: 500; border: none; background: none; }
nav a i, nav .more i { font-size: 19px; }
nav a:hover { color: var(--on-ink); background: var(--ink-2); }
nav a.active { color: var(--on-ink); background: var(--ink-3); box-shadow: inset 3px 0 0 var(--gold); }
nav a.active i { color: var(--gold); }
nav .more { display: none; }
.extra { display: contents; }
.nav-label { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: #6f6c67; padding: 14px 10px 4px; }
.me { margin-top: auto; font-size: 12.5px; color: var(--on-ink-muted); padding: 10px; border-top: 1px solid #222226; }
.me b { color: var(--on-ink); font-weight: 600; display: block; }
.me a { color: var(--on-ink-muted); }

.content { min-width: 0; }
#banner .note { margin: 14px 24px 0; padding: 8px 12px; border-radius: var(--radius); background: var(--warn-bg); color: var(--warn); font-size: 13px; }
main { padding: 24px; max-width: 1120px; margin: 0 auto; }

/* ---- Building blocks ---- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; margin-bottom: 16px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
label.field, p.field { display: block; font-size: 13px; color: var(--muted); margin: 0 0 4px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.head h1 { margin: 0; }
.eyebrow { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 2px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; text-decoration: none; color: inherit; display: block; }
.stat:hover { border-color: var(--gold); }
.stat .label { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat .value { font: 400 40px/1 var(--display); margin-top: 6px; }
.stat.bad .value { color: var(--bad); }

.list-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); text-decoration: none; color: inherit; }
.list-row:first-of-type { border-top: none; }
.list-row .when { width: 92px; flex: none; font-size: 13px; color: var(--muted); }
.list-row .what { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plat-icons { display: flex; gap: 4px; color: var(--muted); font-size: 17px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.tile { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; text-decoration: none; color: inherit; }
.tile:hover { border-color: var(--gold); }
.tile > i { font-size: 22px; color: var(--accent); }
.tile b { display: block; font-weight: 600; }
.empty { text-align: center; padding: 28px 16px; }
.empty i { font-size: 30px; color: var(--accent); }

input, select, textarea, button { font: inherit; color: inherit; }
input[type='text'], input[type='email'], input[type='url'], input[type='datetime-local'], select, textarea {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 10px; min-height: 38px;
}
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
textarea { width: 100%; resize: vertical; }
button { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 14px; cursor: pointer; min-height: 38px; }
button:hover { background: var(--surface-2); }
button.primary { background: var(--gold); border-color: var(--gold); color: var(--ink); font-weight: 600; }
button.primary:hover { background: var(--gold-lt); }
button.danger { color: var(--bad); }
button.link { border: none; background: none; padding: 0; min-height: 0; color: var(--accent); }
button:disabled { opacity: 0.6; cursor: wait; }
a.btn { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.form-grid input { width: 100%; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; font-size: 13px; cursor: pointer; user-select: none; background: var(--surface); }
.pill.on { background: var(--accent-bg); color: var(--accent); border-color: var(--accent); }
.pill.off { opacity: 0.5; cursor: not-allowed; }
.badge { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px; background: var(--surface-2); color: var(--muted); }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.info { background: var(--info-bg); color: var(--info); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.error { color: var(--bad); font-size: 13px; }
.warn-text { color: var(--warn); font-size: 13px; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin: 16px 0 10px; flex-wrap: wrap; }
.tab { padding: 6px 12px; cursor: pointer; border-bottom: 2px solid transparent; color: var(--muted); font-size: 14px; }
.tab.on { border-bottom-color: var(--gold); color: var(--text); }
.media-list { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.media-item { position: relative; width: 84px; height: 84px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); font-size: 11px; display: flex; align-items: center; justify-content: center; text-align: center; }
.media-item img, .media-item video { width: 100%; height: 100%; object-fit: cover; }
.media-item button { position: absolute; top: 2px; right: 2px; padding: 0 6px; min-height: 0; font-size: 12px; }

.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head div { font-size: 12px; color: var(--muted); padding: 4px 6px; }
.cal-grid { border-top: 1px solid var(--border); border-left: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.day { min-height: 110px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 4px; background: var(--surface); }
.day.other { background: var(--surface-2); }
.day.today .num { background: var(--gold); color: var(--ink); border-radius: 999px; padding: 0 6px; font-weight: 600; }
.day.drop { outline: 2px dashed var(--gold); outline-offset: -3px; }
.num { font-size: 12px; color: var(--muted); display: inline-block; margin-bottom: 2px; }
.chip { display: block; font-size: 12px; padding: 2px 6px; margin-bottom: 3px; border-radius: 4px; border-left: 3px solid; background: var(--surface-2); cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chip[draggable='true'] { cursor: grab; }

.post { border-top: 1px solid var(--border); padding: 12px 0; }
.post:first-child { border-top: none; }
.post-text { white-space: pre-wrap; margin: 6px 0; }
.targets { display: grid; gap: 4px; margin: 8px 0; font-size: 13px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-weight: 500; color: var(--muted); font-size: 13px; }
.table-wrap { overflow-x: auto; }

#toast { position: fixed; z-index: 50; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--on-ink); padding: 9px 16px; border-radius: var(--radius); font-size: 14px; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
#toast.show { opacity: 1; }

.me .link { color: var(--on-ink-muted); text-decoration: underline; font-size: inherit; }

/* ---- Website page editor ---- */
.editor { max-width: 820px; }
.fld { margin-bottom: 16px; }
.fld input[type='text'], .fld input[type='url'], .fld input[type='number'], .fld input[type='date'], .fld input[type='datetime-local'], .fld select, .fld textarea { width: 100%; }
.fld .field { font-weight: 500; color: var(--text); font-size: 14px; }
.req { color: var(--bad); }
.hint { font-size: 12.5px; color: var(--muted); margin: 4px 0 0; }
textarea.md { font: 14px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; padding: 4px 0; }
.group { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px 4px; margin: 0 0 16px; }
.group legend { font-weight: 600; font-size: 14px; padding: 0 6px; }
.group > button { margin-bottom: 10px; }
.list-item { background: var(--surface-2); border-radius: 8px; padding: 10px 12px 2px; margin-bottom: 10px; }
.img-field { display: flex; gap: 12px; align-items: flex-start; }
.img-field img, .img-empty { width: 96px; height: 72px; border-radius: 8px; object-fit: cover; flex: none; background: var(--surface-2); border: 1px solid var(--border); }
.img-empty { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 22px; }
.editor-bar { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--border); margin: 8px -18px -16px; padding: 12px 18px; border-radius: 0 0 12px 12px; }
.eyebrow a { color: inherit; }
input[type='search'] { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 10px; min-height: 38px; }
[hidden] { display: none !important; }

/* ---- Sign-in: the brand's ink and gold, whatever the device theme ---- */
.signin { min-height: 100vh; max-width: none; margin: 0; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: var(--ink); color: var(--on-ink); }
.signin-card { width: 100%; max-width: 380px; text-align: center; }
.signin-word { font: 400 40px/1 var(--display); letter-spacing: 0.05em; color: var(--gold); margin: 14px 0 2px; }
.signin-by { font-size: 12px; color: var(--on-ink-muted); letter-spacing: 0.06em; margin: 0 0 28px; }
.signin form { text-align: left; background: var(--ink-2); border: 1px solid #26262a; border-radius: 14px; padding: 18px; }
.signin .field { color: var(--on-ink-muted); }
.signin input { width: 100%; background: var(--ink); color: var(--on-ink); border-color: #34343a; font-size: 16px; min-height: 46px; }
.signin .code-input { font-size: 26px; letter-spacing: 0.4em; text-align: center; }
.signin button.primary { width: 100%; min-height: 46px; font-size: 15px; }
.signin .error { color: #f3a7a7; min-height: 1.3em; margin: 6px 0 8px; }
.signin .muted, .signin .small { color: var(--on-ink-muted); }
.signin .link { color: var(--gold-lt); }
.signin b { color: var(--on-ink); }

/* ---- Phones: top bar with the switcher, bottom tab bar ---- */
@media (max-width: 760px) {
  .shell { display: block; }
  .sidebar { position: sticky; top: 0; z-index: 30; height: auto; flex-direction: row; align-items: center; gap: 10px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); overflow: visible; }
  .wordmark span { display: none; }
  .switcher { flex: 1; min-width: 0; }
  .me { display: none; }
  nav { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; flex-direction: row; justify-content: space-around; background: var(--ink); border-top: 1px solid #222226; padding: 6px 4px; padding-bottom: max(6px, env(safe-area-inset-bottom)); }
  nav a, nav .more { flex-direction: column; gap: 2px; font-size: 11px; padding: 6px 8px; flex: 1; justify-content: center; }
  nav .more { display: flex; }
  nav a.active { box-shadow: none; }
  .extra { display: none; position: absolute; left: 0; right: 0; bottom: 100%; grid-template-columns: 1fr 1fr; gap: 4px; padding: 10px; background: var(--ink); border-top: 1px solid #222226; border-radius: 14px 14px 0 0; }
  nav.open .extra { display: grid; }
  .extra a { flex-direction: row; font-size: 14px; padding: 12px; justify-content: flex-start; background: var(--ink-2); }
  .extra .nav-label { display: none; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .stat { padding: 10px 12px; }
  .stat .label { font-size: 11.5px; line-height: 1.3; align-items: flex-start; }
  .stat .label i { display: none; }
  .stat .value { font-size: 34px; }
  main { padding: 16px 16px 96px; }
  #banner .note { margin: 12px 16px 0; }
  h1 { font-size: 30px; }
  .day { min-height: 64px; }
  .chip { font-size: 11px; }
  #toast { bottom: 84px; }
  .editor-bar { bottom: calc(66px + env(safe-area-inset-bottom)); margin-bottom: -16px; }
  .switch-menu { position: fixed; top: 60px; left: 16px; right: 16px; }
}
