/* ============================================================
   PostFlow — Zain brand skin
   Obsidian black, molten orange, brushed chrome.
   Glass panels float over two slow embers; one accent gradient
   does the work, chrome is reserved for type.
   ============================================================ */

:root {
  --ink: #f7f4f2;
  --ink-2: #d8d2ce;
  --muted: #9a938f;
  --muted-2: #6f6864;

  --orange: #ff6a00;
  --orange-hi: #ffb25e;
  --ember: #e8330a;
  --amber: #ffb020;
  --chrome: #cfcac6;

  --grad: linear-gradient(135deg, #ffb25e 0%, #ff6a00 46%, #e8330a 100%);
  --grad-soft: linear-gradient(135deg, rgba(255, 178, 94, 0.22), rgba(232, 51, 10, 0.18));
  --on-accent: #170a02;

  --glass-hi: rgba(32, 27, 24, 0.72);
  --glass-lo: rgba(16, 13, 12, 0.58);
  --glass-line: rgba(255, 255, 255, 0.085);
  --hair: rgba(255, 255, 255, 0.075);

  --glow: 0 18px 44px -22px rgba(255, 96, 0, 0.6);

  --r-lg: 26px;
  --r-md: 18px;
  --r-sm: 12px;

  --spring: cubic-bezier(0.22, 1.2, 0.36, 1);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --rail: 216px;
  --queue: 312px;
  --top: 66px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable", system-ui, sans-serif;
  --urdu: "Noto Nastaliq Urdu", "Noto Naskh Arabic", serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  padding: 14px;
  height: 100dvh;
  overflow: hidden;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background:
    radial-gradient(120% 90% at 12% 108%, rgba(255, 96, 0, 0.16), transparent 62%),
    radial-gradient(90% 70% at 96% -10%, rgba(255, 60, 0, 0.14), transparent 60%),
    #08070a;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;

  display: grid;
  gap: 14px;
  grid-template-columns: var(--rail) minmax(0, 1fr) var(--queue);
  grid-template-rows: var(--top) minmax(0, 1fr);
  grid-template-areas:
    "top top top"
    "rail main queue";
}

/* ---------------- embers ---------------- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  will-change: transform;
}

.b1 {
  width: 640px; height: 640px;
  top: -240px; left: -160px;
  background: radial-gradient(circle at 30% 30%, #ff7a1a, rgba(255, 122, 26, 0));
  animation: drift1 30s var(--ease) infinite alternate;
}
.b2 {
  width: 600px; height: 600px;
  bottom: -240px; right: -160px;
  background: radial-gradient(circle at 60% 40%, #e8330a, rgba(232, 51, 10, 0));
  animation: drift2 36s var(--ease) infinite alternate;
}
.b3 {
  width: 520px; height: 520px;
  top: 30%; left: 48%;
  background: radial-gradient(circle at 50% 50%, #2a4a7a, rgba(42, 74, 122, 0));
  animation: drift3 44s var(--ease) infinite alternate;
  opacity: 0.42;
}

@keyframes drift1 {
  to { transform: translate3d(120px, 80px, 0) scale(1.12); }
}
@keyframes drift2 {
  to { transform: translate3d(-140px, -90px, 0) scale(1.08); }
}
@keyframes drift3 {
  to { transform: translate3d(-100px, 70px, 0) scale(0.9); }
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image: radial-gradient(rgba(255, 255, 255, 0.045) 0.5px, transparent 0.6px);
  background-size: 3px 3px;
}

/* ---------------- glass ---------------- */
.glass,
.glass-soft {
  position: relative;
  border-radius: var(--r-lg);
  border: 1px solid var(--glass-line);
  background: linear-gradient(158deg, var(--glass-hi), var(--glass-lo));
  -webkit-backdrop-filter: blur(30px) saturate(150%);
  backdrop-filter: blur(30px) saturate(150%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4),
    0 24px 50px -30px rgba(0, 0, 0, 0.9),
    0 2px 0 -1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
  animation: rise 0.75s var(--ease) both;
}

.glass-soft {
  background: linear-gradient(158deg, rgba(36, 30, 27, 0.6), rgba(18, 15, 14, 0.44));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 14px 34px -26px rgba(0, 0, 0, 0.9);
  border-radius: var(--r-md);
}

/* warm specular highlight that follows the cursor */
.glass::after,
.glass-soft::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(
    340px circle at var(--mx, 50%) var(--my, 0%),
    rgba(255, 150, 60, 0.16),
    rgba(255, 150, 60, 0) 62%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
}
.glass:hover::after,
.glass-soft:hover::after { opacity: 1; }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px) scale(0.985); filter: blur(8px); }
  to { opacity: 1; transform: none; filter: none; }
}

/* ---------------- top bar ---------------- */
.topbar {
  grid-area: top;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  z-index: 5;
}

.brand { display: flex; align-items: center; gap: 11px; }

.mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  filter: drop-shadow(0 6px 14px rgba(255, 96, 0, 0.45));
}

.brand-text { display: flex; align-items: baseline; gap: 7px; }

.wordmark {
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #ffffff 0%, #dcd7d3 52%, #9c9691 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-sub {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange-hi);
  background: rgba(255, 106, 0, 0.14);
  border: 1px solid rgba(255, 106, 0, 0.24);
  border-radius: 999px;
  padding: 2px 7px;
}

.status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--hair);
  font-size: 11.5px;
  color: var(--muted);
}

.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(255, 106, 0, 0.16);
  animation: pulse 2.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.14); }
  50% { box-shadow: 0 0 0 6px rgba(255, 106, 0, 0.05); }
}

.who { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--on-accent);
  background: var(--grad);
  box-shadow: 0 6px 16px -8px rgba(255, 96, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* ---------------- buttons ---------------- */
.btn {
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 8px 15px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.25s var(--spring), box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-glass {
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.btn-glass:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 150, 60, 0.28);
}

.btn-primary {
  color: var(--on-accent);
  background: var(--grad);
  box-shadow: var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 44px -20px rgba(255, 96, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* ---------------- rail ---------------- */
.rail {
  grid-area: rail;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px;
  z-index: 3;
}

.rail-pill {
  position: absolute;
  left: 12px;
  width: calc(100% - 24px);
  height: 38px;
  border-radius: 12px;
  background: var(--grad);
  box-shadow: 0 10px 26px -14px rgba(255, 96, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: transform 0.5s var(--spring), opacity 0.22s ease;
  pointer-events: none;
}

.rail-item {
  position: relative;
  z-index: 1;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 12px;
  height: 38px;
  padding: 0 12px;
  cursor: pointer;
  transition: color 0.3s ease;
}
.rail-item:hover { color: var(--ink-2); }
.rail-item.is-active { color: var(--on-accent); font-weight: 650; }

.rail-foot {
  margin-top: auto;
  padding: 12px 12px 4px;
  border-top: 1px solid var(--hair);
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--muted-2);
}
.rail-foot p { margin: 0; }
.rail-foot-title {
  margin-bottom: 3px !important;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--orange-hi);
}

/* ---------------- main ---------------- */
main {
  grid-area: main;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px 4px 40px;
  z-index: 2;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}
main::-webkit-scrollbar { width: 8px; }
main::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
}

.view { display: none; max-width: 900px; }
.view.is-active { display: block; }

.view-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 6px 22px;
}

.kicker {
  margin: 0 0 2px;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--orange);
}

.bigdate {
  margin: 0;
  font-size: clamp(30px, 3.4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  background: linear-gradient(180deg, #ffffff 0%, #e6e1dd 46%, #a09a95 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.view-note {
  margin: 0;
  max-width: 40ch;
  font-size: 12.5px;
  line-height: 1.55;
  text-align: right;
  color: var(--muted);
}

/* ---------------- channel strip ---------------- */
.channels {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 16px;
}

.chan {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 11.5px;
  color: var(--muted);
}
.chan.is-on {
  color: var(--ink-2);
  border-color: rgba(255, 106, 0, 0.3);
  background: linear-gradient(158deg, rgba(255, 106, 0, 0.14), rgba(20, 15, 13, 0.5));
}

.chan-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--muted-2);
}
.chan-dot.big { width: 30px; height: 30px; border-radius: 10px; }
.chan-dot.fb { background: #1877f2; }
.chan-dot.li { background: #0a66c2; }
.chan-dot.web { background: var(--amber); }
.chan-dot.ai {
  background: var(--grad);
  border-radius: 50%;
  box-shadow: 0 0 14px rgba(255, 106, 0, 0.6);
}

.chan-state {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.chan.is-on .chan-state { color: var(--orange-hi); }

/* ---------------- slots ---------------- */
.slots { display: flex; flex-direction: column; gap: 14px; }

.slot {
  padding: 16px 18px 14px;
  animation-delay: calc(var(--i, 0) * 90ms + 60ms);
}
.slot::before {
  content: "";
  position: absolute;
  left: 0; top: 18px; bottom: 18px;
  width: 2px;
  border-radius: 99px;
  background: var(--grad);
  opacity: 0.75;
}
.slot.is-reel::before { background: linear-gradient(180deg, var(--amber), #ff8a00); }

.slot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.slot-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.slot-time {
  font-size: 12.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.chip {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--hair);
  border-radius: 999px;
  padding: 3px 9px;
}

.chip-type {
  color: var(--orange-hi);
  background: rgba(255, 106, 0, 0.12);
  border-color: rgba(255, 106, 0, 0.22);
}
.chip-type.is-reel {
  color: var(--amber);
  background: rgba(255, 176, 32, 0.12);
  border-color: rgba(255, 176, 32, 0.24);
}

.slot-actions { display: flex; gap: 7px; }

.proof {
  position: relative;
  border-radius: 14px;
  padding: 15px 16px 13px 18px;
  background: rgba(10, 8, 7, 0.5);
  border: 1px solid var(--hair);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.proof-body {
  margin: 0;
  font-size: 13px;
  line-height: 1.62;
  color: var(--ink-2);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.proof-body.is-urdu {
  font-family: var(--urdu);
  font-size: 14.5px;
  line-height: 2.15;
  direction: rtl;
  text-align: right;
}

.tags {
  margin: 11px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--orange-hi);
  word-spacing: 2px;
  opacity: 0.9;
}

/* ---------------- calendar ---------------- */
.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  overflow: hidden;
  animation: none;
}

.cell {
  min-height: 88px;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-right: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s var(--spring);
}
.cell:nth-child(7n) { border-right: 0; }
.cell:hover { background: rgba(255, 255, 255, 0.045); }
.cell:active { transform: scale(0.985); }
.cell.is-empty { cursor: default; background: transparent; }

.cell-weekday {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--muted-2);
}

.cell-day {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
}

.cell.is-today {
  background: rgba(255, 106, 0, 0.1);
  box-shadow: inset 0 0 0 1.5px rgba(255, 106, 0, 0.6), 0 0 30px -14px rgba(255, 106, 0, 0.9);
  border-radius: 12px;
}
.cell.is-today .cell-day { color: var(--orange-hi); }

.cell-marks { display: flex; gap: 4px; margin-top: auto; }
.mk {
  width: 14px; height: 4px;
  border-radius: 99px;
  background: var(--grad);
}
.mk.reel { background: linear-gradient(90deg, var(--amber), #ff8a00); }

.day-detail { margin-top: 22px; }
.day-detail h2 {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  padding-left: 6px;
  color: var(--ink);
}
.day-detail .slot { margin-bottom: 12px; }

/* ---------------- styles library ---------------- */
.styles {
  list-style: none;
  margin: 0;
  padding: 6px 18px;
  animation: none;
}

.styles li {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 18px;
  align-items: baseline;
  padding: 13px 0;
  border-bottom: 1px solid var(--hair);
  transition: transform 0.35s var(--spring);
}
.styles li:last-child { border-bottom: 0; }
.styles li:hover { transform: translateX(4px); }
.styles .name { font-weight: 600; font-size: 13.5px; color: var(--ink); }
.styles .sample { color: var(--muted); font-size: 13px; }

/* ---------------- channels + composer ---------------- */
.connect-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
}

.connect-card { padding: 18px 20px 20px; display: flex; flex-direction: column; }

.connect-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.connect-id { min-width: 0; }
.connect-card .label { margin: 0; font-size: 11.5px; color: var(--muted); }
.connect-card .value {
  margin: 0;
  font-size: 15.5px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.connect-card .hint { margin: 10px 0 0; font-size: 11.5px; line-height: 1.5; color: var(--muted); }

.pill-state {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.02em;
  border-radius: 999px;
  padding: 3px 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
}
.pill-state.is-on { color: #7ee2a8; background: rgba(34, 197, 94, 0.16); }
.pill-state.is-off { color: var(--muted); background: rgba(255, 255, 255, 0.06); }

.field-label {
  display: block;
  margin: 10px 0 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.field {
  width: 100%;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  background: rgba(8, 7, 6, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.field::placeholder { color: var(--muted-2); }
.field:focus {
  outline: none;
  border-color: rgba(255, 106, 0, 0.6);
  box-shadow: 0 0 0 4px rgba(255, 106, 0, 0.14);
}

.connect-card .btn { margin-top: 12px; align-self: flex-start; }
.connect-card .btn + .btn { margin-top: 8px; }

.auto-line {
  margin-top: 8px !important;
  padding: 7px 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
}
.auto-line.is-on {
  color: #7ee2a8;
  background: rgba(34, 197, 94, 0.12);
}

.mini-steps {
  margin: 0 0 12px;
  padding-left: 18px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--muted);
}
.mini-steps li::marker { color: var(--orange); font-weight: 700; }

.connect-card .hint code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 10.5px;
  padding: 1px 5px;
  border-radius: 5px;
  color: var(--orange-hi);
  background: rgba(255, 106, 0, 0.12);
}

.connect-card a.btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.why {
  margin-top: 12px;
  border-top: 1px solid var(--hair);
  padding-top: 10px;
  font-size: 11.5px;
  color: var(--muted);
}
.why summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--orange-hi);
  list-style: none;
}
.why summary::-webkit-details-marker { display: none; }
.why summary::before { content: "? "; }
.why p { margin: 8px 0 0; line-height: 1.55; }

/* signature strip — proof that brand + contact rides in every post */
.sig-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 10px;
  align-items: center;
  margin: 0 0 11px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--hair);
  font-size: 10.5px;
  color: var(--muted-2);
}
.sig-strip b { color: var(--ink-2); font-weight: 600; }
.sig-strip span { white-space: nowrap; }

.sig-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 8px rgba(255, 106, 0, 0.8);
}

/* composer */
.composer { padding: 20px 22px; display: flex; flex-direction: column; gap: 18px; }

.q-label {
  margin: 0 0 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
}

.q-split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }

.chip-btn {
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  transition: transform 0.2s var(--spring), background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.chip-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 150, 60, 0.28);
  transform: translateY(-1px);
}
.chip-btn.is-on {
  color: var(--on-accent);
  background: var(--grad);
  border-color: transparent;
  box-shadow: 0 8px 20px -12px rgba(255, 96, 0, 0.9);
}

.composer-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.gen-state { font-size: 12px; color: var(--muted); }
.gen-state.is-error { color: #ff7a6b; }

.is-hidden { display: none !important; }

.result { margin-top: 16px; animation: rise 0.5s var(--ease) both; }
.result.is-hidden { display: none; }

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  padding: 0 4px;
  flex-wrap: wrap;
}
.result-actions { display: flex; gap: 8px; }

.editor {
  width: 100%;
  min-height: 300px;
  resize: vertical;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-2);
  background: rgba(8, 7, 6, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-md);
  padding: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 10px 26px -22px rgba(0, 0, 0, 0.9);
}
.editor:focus {
  outline: none;
  border-color: rgba(255, 106, 0, 0.55);
  box-shadow: 0 0 0 4px rgba(255, 106, 0, 0.12);
}

/* ---------------- history ---------------- */
.history { padding: 6px 18px; animation: none; }

.history-row {
  display: grid;
  grid-template-columns: 96px 58px minmax(0, 1fr) 92px;
  gap: 14px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--hair);
  font-size: 12.5px;
}
.history-row:last-child { border-bottom: 0; }

.h-date { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }
.h-time { color: var(--muted-2); font-variant-numeric: tabular-nums; }
.h-hook {
  color: var(--ink-2);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.h-chan {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  vertical-align: 1px;
  background: #1877f2;
}
.h-chan.in { background: #0a66c2; }
.h-chan.web { background: var(--amber); }

.h-state {
  justify-self: end;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  padding: 3px 10px;
  color: #7ee2a8;
  background: rgba(34, 197, 94, 0.14);
}
.h-state.is-failed { color: #ff8a7a; background: rgba(239, 68, 68, 0.16); }
.h-state.is-planned { color: var(--muted); background: rgba(255, 255, 255, 0.06); }

.history-empty {
  padding: 44px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.history-empty strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  color: var(--ink);
  font-weight: 650;
  letter-spacing: -0.01em;
}

/* ---------------- queue ---------------- */
.queue {
  grid-area: queue;
  padding: 18px 18px 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation-delay: 0.14s;
  z-index: 3;
}

.queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 0 2px;
}

.queue-title {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.queue-count {
  font-size: 11px;
  font-weight: 650;
  color: var(--orange-hi);
  background: rgba(255, 106, 0, 0.14);
  border-radius: 999px;
  padding: 2px 9px;
}

.queue-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  scrollbar-width: none;
}
.queue-list::-webkit-scrollbar { display: none; }

.queue-list li {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 11px;
  padding: 11px 2px;
  border-bottom: 1px solid var(--hair);
  border-radius: 10px;
  transition: background 0.25s ease;
}
.queue-list li:hover { background: rgba(255, 255, 255, 0.04); }

.q-date {
  font-size: 11.5px;
  font-weight: 650;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
  padding-top: 1px;
}

.q-hook {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink-2);
}

.q-meta {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--muted-2);
}

/* ---------------- focus + motion ---------------- */
:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: 10px;
}

::selection {
  background: rgba(255, 106, 0, 0.35);
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .glass::after, .glass-soft::after { display: none; }
}

/* ---------------- responsive ---------------- */
@media (max-width: 1180px) {
  :root { --rail: 190px; --queue: 276px; }
}

@media (max-width: 1080px) {
  body {
    grid-template-columns: var(--rail) minmax(0, 1fr);
    grid-template-areas: "top top" "rail main";
  }
  .queue { display: none; }
}

@media (max-width: 820px) {
  body {
    padding: 10px;
    gap: 10px;
    grid-template-columns: 1fr;
    grid-template-rows: var(--top) minmax(0, 1fr) 62px;
    grid-template-areas: "top" "main" "rail";
  }
  .rail {
    flex-direction: row;
    align-items: center;
    padding: 8px;
    gap: 4px;
  }
  .rail-pill { height: 40px; top: 8px; left: 8px; }
  .rail-item {
    flex: 1;
    text-align: center;
    height: 40px;
    padding: 0 6px;
    font-size: 12px;
  }
  .rail-foot { display: none; }
  main { padding: 2px 2px 24px; }
  .view-head { flex-direction: column; align-items: flex-start; gap: 8px; padding-bottom: 12px; }
  .view-note { text-align: left; max-width: none; }
  .connect-grid { grid-template-columns: 1fr; }
  .styles li { grid-template-columns: 1fr; gap: 3px; }
  .slot { padding: 13px 13px 11px; }
  .proof { padding: 14px 14px 11px 18px; }
  .cell { min-height: 68px; padding: 7px; }
  .cell-day { font-size: 15px; }
  .status { display: none; }
  .btn-glass#copyToday { display: none; }
  .slot-actions .btn { padding: 7px 11px; font-size: 11.5px; }
  .q-split { grid-template-columns: 1fr; }
}
