/* ALLA RACE Studio — identitatea site-ului allarace.ro: crem, crom fin, email ivoriu, roșu 187 C.
   Fonturi de sistem (rapide pe telefon): Impact pentru titluri, Georgia italic pentru accente, Arial pentru text. */
:root {
  --cream: #f6efd9; --paper: #fbf6e8; --card: #fffbf0; --ink: #20291e; --muted: #5f655a; --line: #ddd1b3; --soft: #efe5cb;
  --red: #a40d22; --red-ink: #8f0b1d; --refuel: #c2731a; --refuel-ink: #8a4e0c; --cool: #215732; --cool-ink: #1b4a2a;
  --gold: #b88a2e; --blue: #2f5577;
  --chrome: linear-gradient(180deg, #fff 0%, #eef1f3 15%, #8b949b 32%, #252e35 46%, #fefefe 51%, #f5f7f8 67%, #66727c 88%, #202930 100%);
  --ivory: linear-gradient(155deg, #fffdf3 0%, #f7efd9 32%, #eee1c3 78%, #faf1dd 100%);
  --chrome-edge: 0 0 0 .6px #35414a, 0 1px 0 1px #ffffffa6;
  --enamel: inset 0 2px 2px #fffdf5, inset 0 -2px 3px #a48c5f45;
  --radius: 16px; --shadow: 0 1px 0 #fff9, 0 4px 14px #30271e1f;
  --font: Arial, Helvetica, sans-serif; --display: Impact, "Arial Narrow Bold", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 16px/1.5 var(--font); overflow-x: hidden; }
img, video { max-width: 100%; display: block; }
a { color: var(--blue); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: normal; line-height: 1.1; margin: 0; letter-spacing: .02em; }
h1 { font-size: clamp(28px, 6vw, 40px); text-transform: uppercase; }
h1 em, h2 em { font-family: var(--serif); font-style: italic; text-transform: none; color: var(--red); letter-spacing: 0; }
h2 { font-size: 22px; text-transform: uppercase; }
h3 { font-size: 18px; text-transform: uppercase; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 13px; }
.eyebrow { font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.serif { font-family: var(--serif); font-style: italic; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.spacer { flex: 1; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
[hidden] { display: none !important; }

/* the two cream stripes of the label, as a quiet divider */
.stripes { display: inline-flex; gap: 3px; }
.stripes i { width: 4px; height: 18px; background: var(--red); border-radius: 1px; }
.stripes i + i { background: var(--red); opacity: .55; }
.logo { height: 34px; width: auto; display: block; }
.brandbar { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brandbar .sub { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--ink); }

/* header with the fine chrome rule of the site */
.top { position: sticky; top: 0; z-index: 20; background: var(--paper); }
.top::after { content: ""; display: block; height: 3px; background: var(--chrome); }
.top .bar { display: flex; align-items: center; gap: 10px; min-height: 60px; }
.camp-select { max-width: 320px; }
.savestate { font-size: 13px; color: var(--muted); white-space: nowrap; }
.thumb { position: relative; }
.thumb .restr { position: absolute; top: 4px; right: 4px; background: #fff; border-radius: 999px; padding: 0 4px; font-size: 14px; }
.warn { color: #8a4e0c; }
.notice.red { border-left-color: var(--red); background: #fbe9ea; }
.plain { border: 0; background: none; padding: 0; cursor: pointer; }
.item.apprrow { display: flex; gap: 12px; align-items: flex-start; }
.apprrow .plain { flex: 0 0 84px; }
.apprrow .thumb { width: 84px; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.kpis .kpi .n { font-size: clamp(22px, 6vw, 32px); }
.me-chip { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700;
  cursor: pointer; white-space: nowrap; max-width: 30vw; overflow: hidden; text-overflow: ellipsis; min-height: 36px; }
/* read-only accounts: the server refuses changes; the interface hides the forms that would only end in an error */
body.readonly main form, body.readonly .drawer form, body.readonly [data-newpost], body.readonly .uploader { display: none !important; }
body.readonly main::before { content: "Doar vizualizare: contul tău poate vedea tot, dar nu poate modifica."; display: block; margin-bottom: 12px;
  padding: 10px 14px; border-radius: 12px; background: var(--soft); font-size: 14px; }
body.readonly #mypw { display: grid !important; }
/* level 1: the large areas (Marketing, Operațional, Financiar…) */
.tabs { display: flex; gap: 6px; padding: 0 16px 10px; overflow-x: auto; scrollbar-width: none; max-width: 1240px; margin: 0 auto; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { border: 0; background: transparent; padding: 9px 16px; border-radius: 999px; font-weight: 700; color: var(--muted);
  white-space: nowrap; cursor: pointer; min-height: 44px; font-size: 16px; display: inline-flex; align-items: center; gap: 7px; }
.tabs button .ic { font-size: 17px; }
.tabs button.area-set { margin-left: auto; }
.tabs button[aria-current="page"] { border: 2px solid transparent; background: linear-gradient(#293527, #20291e) padding-box, var(--chrome) border-box;
  color: var(--cream); box-shadow: var(--chrome-edge); }
/* level 2: the sections of the current area */
.subnav { background: var(--soft); border-top: 1px solid var(--line); }
.subnav-in { display: flex; gap: 4px; align-items: center; overflow-x: auto; scrollbar-width: none; padding-top: 6px; padding-bottom: 6px; }
.subnav-in::-webkit-scrollbar { display: none; }
.subnav .area-name { font-family: var(--display); text-transform: uppercase; letter-spacing: .03em; font-size: 15px; margin-right: 10px; white-space: nowrap; color: var(--red); }
.subnav button { border: 1px solid transparent; background: transparent; padding: 7px 13px; border-radius: 999px; font-weight: 700; font-size: 14.5px;
  color: var(--ink); white-space: nowrap; cursor: pointer; min-height: 38px; }
.subnav button[aria-current="page"] { background: var(--card); border-color: var(--line); box-shadow: var(--shadow); color: var(--red); }
.appr-btn { position: relative; border: 1px solid var(--line); background: var(--card); border-radius: 999px; min-width: 40px; min-height: 36px; cursor: pointer; font-size: 16px; }
.appr-btn .badge { position: absolute; top: -6px; right: -8px; margin: 0; }
.appr-btn.on { border-color: var(--red); }
/* the hub cards of the general home */
.hub { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); margin-top: 14px; }
.hubcard { display: flex; flex-direction: column; gap: 10px; }
.hubcard h2 { display: flex; align-items: center; gap: 8px; }
.hubcard .figs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.hubcard .figs div { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.hubcard .figs b { font-family: var(--display); font-size: 24px; display: block; line-height: 1.1; }
.hubcard .figs span { font-size: 13px; color: var(--muted); }
.hubcard .links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--red); color: #fff;
  font-size: 12px; line-height: 20px; margin-left: 6px; text-align: center; font-weight: 700; }
main { padding-top: 18px; padding-bottom: 110px; }

.bottomnav { display: none; }
@media (max-width: 760px) {
  .tabs { display: none; }
  .subnav .area-name { display: none; }
  .quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: relative; z-index: 1; }
  .quick .btn { width: 100%; justify-content: center; font-size: 15px; padding-left: 8px; padding-right: 8px; }
  .subnav-in { padding-left: 10px; padding-right: 10px; }
  .subnav button { font-size: 14px; padding: 6px 11px; min-height: 36px; }
  .camp-select { max-width: 42vw; }
  .savestate, .brandbar .sub { display: none; }
  .me-chip { max-width: 24vw; padding: 6px 8px; }
  .logo { height: 30px; }
  .bottomnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--paper); padding-bottom: env(safe-area-inset-bottom); }
  .bottomnav::before { content: ""; position: absolute; left: 0; right: 0; top: -3px; height: 3px; background: var(--chrome); }
  .bottomnav button { border: 0; background: none; padding: 8px 2px 10px; display: flex; flex-direction: column; align-items: center;
    gap: 3px; font-size: 12.5px; font-weight: 700; color: var(--muted); min-height: 60px; position: relative; cursor: pointer; }
  .bottomnav button .ic { font-size: 19px; line-height: 1; }
  .bottomnav button[aria-current="page"] { color: var(--red); }
  .bottomnav .badge { position: absolute; top: 4px; right: 18%; margin: 0; }
}

/* panels: ivory enamel inside a fine chrome rim */
.panel { background: var(--card); border: 2px solid transparent; background: var(--card) padding-box, linear-gradient(180deg, #fff, #c9c3b4 40%, #8b949b 55%, #e8e4da) border-box;
  border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.panel > h2 { margin-bottom: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.panel.accent { box-shadow: inset 0 4px 0 var(--red), var(--shadow); }
.panel.accent.refuel { box-shadow: inset 0 4px 0 var(--refuel), var(--shadow); }
.panel.accent.cool { box-shadow: inset 0 4px 0 var(--cool), var(--shadow); }
.item { display: block; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px; cursor: pointer; color: inherit; min-height: 48px; }
.item:hover { border-color: #8b949b; }
.item .t { font-weight: 700; }
.item.stack { display: flex; }
.paychoice { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 6px; margin-top: 6px; }
.paychoice button { min-height: 44px; border-radius: 11px; border: 1px solid #c9bd9c; background: #fffdf6; font-weight: 700; cursor: pointer; color: var(--ink); }
.paychoice button[aria-pressed="true"] { background: var(--ink); color: var(--cream); border-color: var(--ink); }
h1 .btn, h2 .btn, h3 .btn { font-family: var(--font); text-transform: none; letter-spacing: 0; font-size: 14px; }
.empty { border: 1.5px dashed var(--line); border-radius: 14px; padding: 18px; text-align: center; color: var(--muted); }
.notice { border-left: 4px solid var(--gold); background: #f8edcf; padding: 10px 12px; border-radius: 10px; }
.notice.red { border-left-color: var(--red); background: #f6dfdc; }
.notice.green { border-left-color: var(--cool); background: #e2ecdc; }
.kpi { display: flex; flex-direction: column; gap: 2px; }
.kpi .n { font-family: var(--display); font-size: 32px; line-height: 1.1; }
.kpi .l { font-size: 14px; color: var(--muted); }

/* buttons: ivory enamel with chrome rim (as on allarace.ro) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 16px; border-radius: 14px;
  border: 2px solid transparent; background: var(--ivory) padding-box, var(--chrome) border-box;
  box-shadow: var(--chrome-edge), 0 3px 6px #272b2928, var(--enamel); font-weight: 700; cursor: pointer; text-decoration: none;
  color: var(--ink); text-align: center; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(#293527, #20291e) padding-box, var(--chrome) border-box; color: var(--cream); box-shadow: var(--chrome-edge), 0 3px 6px #272b2928; }
.btn.red { background: linear-gradient(#b8142b, #96091c) padding-box, var(--chrome) border-box; color: #fff; box-shadow: var(--chrome-edge), 0 3px 6px #272b2928; }
.btn.green { background: linear-gradient(#2a6b3e, #1b4a2a) padding-box, var(--chrome) border-box; color: #fff; box-shadow: var(--chrome-edge), 0 3px 6px #272b2928; }
.btn.gold { background: linear-gradient(#d18a2c, #a8600f) padding-box, var(--chrome) border-box; color: #fff; box-shadow: var(--chrome-edge), 0 3px 6px #272b2928; }
.btn.sm { min-height: 36px; padding: 5px 12px; font-size: 14px; border-radius: 11px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.seg { display: inline-flex; border-radius: 13px; overflow: hidden; border: 2px solid transparent; background: var(--ivory) padding-box, var(--chrome) border-box; box-shadow: var(--chrome-edge); }
.seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { border: 0; background: transparent; padding: 7px 13px; min-height: 40px; font-weight: 700; cursor: pointer; color: var(--muted); white-space: nowrap; flex: 0 0 auto; }
.seg button[aria-pressed="true"] { background: linear-gradient(#293527, #20291e); color: var(--cream); }

input[type=text], input[type=url], input[type=number], input[type=date], input[type=time], input[type=datetime-local], input[type=password], select, textarea {
  width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid #c9bd9c; border-radius: 11px; background: #fffdf6; }
textarea { min-height: 90px; resize: vertical; }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 700; min-width: 0; }
details > summary { cursor: pointer; font-weight: 700; min-height: 32px; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin: 0; }
legend { font-weight: 700; font-size: 14px; padding: 0 6px; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; min-height: 36px; margin-right: 10px; }

/* status chips: symbol + text, never colour alone */
.st { display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px; border-radius: 999px; font-size: 13px; font-weight: 700;
  border: 1.5px solid currentColor; white-space: nowrap; line-height: 1.6; background: #fffdf6; }
.s-wait { color: #8a6200; } .s-wait::before { content: "⏳"; }
.s-work { color: var(--blue); } .s-work::before { content: "◐"; }
.s-block { color: var(--red-ink); } .s-block::before { content: "■"; }
.s-ask { color: #6b3fa0; } .s-ask::before { content: "?"; font-weight: 800; }
.s-done { color: var(--cool-ink); } .s-done::before { content: "✓"; }
.s-fail { color: var(--red-ink); } .s-fail::before { content: "✕"; }
.s-plan { color: var(--muted); } .s-plan::before { content: "◇"; }
.s-off { color: var(--muted); } .s-off::before { content: "⊘"; }
.s-gen { color: var(--red-ink); border-style: dashed; } .s-gen::before { content: "＋"; }
.s-review { color: #8a6200; } .s-review::before { content: "◎"; }
.s-chg { color: var(--red-ink); } .s-chg::before { content: "↺"; }
.s-info { color: var(--blue); } .s-info::before { content: "ⓘ"; }
.s-pub { color: #fff; background: var(--cool); border-color: var(--cool); } .s-pub::before { content: "●"; }
.s-sched { color: var(--blue); } .s-sched::before { content: "🕒"; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--soft); font-size: 13px; color: var(--muted); }
.tag.real { background: #dfeadb; color: var(--cool-ink); }
.tag.est { background: #f6e6c4; color: #7a5208; }
.prod { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; }
.prod::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--muted)); box-shadow: inset 0 0 0 1px #0002; }
.campdot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c, var(--muted)); margin-right: 5px; vertical-align: middle; }

/* media */
.thumb { position: relative; aspect-ratio: 9 / 16; background: #111; border-radius: 10px; overflow: hidden; flex: 0 0 auto; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .play { position: absolute; right: 5px; bottom: 5px; background: rgba(0,0,0,.65); color: #fff; border-radius: 999px; padding: 0 7px; font-size: 12px; }
.thumb.gen { background: repeating-linear-gradient(135deg, var(--soft), var(--soft) 10px, var(--card) 10px, var(--card) 20px);
  display: flex; align-items: center; justify-content: center; text-align: center; color: var(--red-ink); font-weight: 700; padding: 6px; font-size: 13px; }
.viewer { background: #0d0c0b; border-radius: 16px; overflow: hidden; display: flex; justify-content: center; align-items: center; min-height: 200px; }
.viewer video, .viewer img { max-height: min(68vh, 720px); width: auto; max-width: 100%; }
.mtabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0; }
.mtabs button { flex: 0 0 auto; border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 4px; cursor: pointer; width: 70px; color: inherit; }
.mtabs button[aria-pressed="true"] { border-color: var(--red); box-shadow: 0 0 0 2px #a40d2240; }
.mtabs .thumb { border-radius: 6px; }
.mtabs small { display: block; font-size: 11.5px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* phone simulation of the post */
.simwrap { display: grid; grid-template-columns: minmax(0, 360px) 1fr; gap: 18px; align-items: start; }
@media (max-width: 860px) { .simwrap { grid-template-columns: 1fr; } }
.phone { position: relative; width: min(100%, 360px); margin: 0 auto; border-radius: 34px; padding: 9px; background: var(--chrome); box-shadow: 0 10px 30px #20291e40; }
.phone .scr { position: relative; border-radius: 26px; overflow: hidden; background: #000; aspect-ratio: 9 / 19.5; color: #fff; font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.phone .scr.feed { background: #fff; color: #111; }
.phone .scr > .media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.phone .fmedia { position: relative; }
.phone .fmedia > .media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.phone .tap { position: absolute; inset: 0; z-index: 2; border: 0; background: transparent; cursor: pointer; }
.phone .tap span { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 64px; height: 64px; border-radius: 50%; background: #0008; color: #fff; font-size: 26px; display: flex; align-items: center; justify-content: center; }
.phone .tap.playing span { display: none; }
.month .ev .dot { width: 8px; height: 22px; border-radius: 2px; background: repeating-linear-gradient(135deg, var(--soft), var(--soft) 3px, var(--card) 3px, var(--card) 6px); border: 1px dashed var(--red); flex: 0 0 auto; }
.phone .ov { position: absolute; left: 0; right: 0; pointer-events: none; padding: 10px 12px; font-size: 13px; text-shadow: 0 1px 2px #0009; }
.phone .ov.ov-top { top: 0; display: flex; justify-content: space-between; font-weight: 700; padding-top: 14px; }
.phone .ov.ov-bot { bottom: 0; padding-bottom: 16px; background: linear-gradient(transparent, #0008); }
.phone .ov .cap { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 4px; font-weight: 400; }
.phone .rail { position: absolute; right: 8px; bottom: 90px; display: flex; flex-direction: column; gap: 14px; align-items: center; font-size: 11px; text-shadow: 0 1px 2px #0009; pointer-events: none; }
.phone .rail b { font-size: 22px; line-height: 1; }
.phone .handle { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.phone .av { width: 26px; height: 26px; border-radius: 50%; background: #fff; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; }
.phone .av img { width: 22px; height: auto; }
.phone .fhead { display: flex; align-items: center; gap: 8px; padding: 10px; font-weight: 700; font-size: 14px; }
.phone .fcap { padding: 8px 10px; font-size: 13px; line-height: 1.35; }
.phone .fmedia { aspect-ratio: 4 / 5; background: #111; overflow: hidden; }
.phone .fbar { display: flex; gap: 14px; padding: 8px 10px; font-size: 18px; }
.phone .story-bars { position: absolute; top: 8px; left: 10px; right: 10px; display: flex; gap: 3px; }
.phone .story-bars i { flex: 1; height: 2px; background: #fff9; border-radius: 2px; }
.sim-tag { position: absolute; z-index: 3; left: 50%; transform: translateX(-50%); top: -10px; background: var(--gold); color: #fff; font-size: 11.5px; font-weight: 700; padding: 2px 10px; border-radius: 999px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }

/* section navigation inside the post page */
.secnav { position: sticky; top: 52px; z-index: 2; display: flex; gap: 6px; overflow-x: auto; padding: 6px 0; background: var(--cream); scrollbar-width: none; }
.secnav::-webkit-scrollbar { display: none; }
.secnav a { flex: 0 0 auto; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 14px; padding: 6px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); white-space: nowrap; }

/* calendar */
.calbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.calbar .period { font-family: var(--display); font-size: 24px; text-transform: uppercase; min-width: 190px; text-align: center; }
.filt > summary { margin-bottom: 8px; }
@media (max-width: 760px) {
  .cal-eyebrow, #cal-jump, .campleg { display: none; }
  .calbar { gap: 6px; }
  .calbar .period { font-size: 19px; min-width: 0; flex: 1; }
  .calbar .spacer { display: none; }
}
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 8px; margin-bottom: 12px; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.month .dh { font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; padding: 4px 0; }
.month .d { min-height: 104px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 4px; font-size: 12px; overflow: hidden; cursor: pointer; }
.month .d.out { opacity: .45; }
.month .d.today { box-shadow: inset 0 0 0 2px var(--red); }
.month .d .n { font-weight: 700; color: var(--muted); }
.month .ev { display: flex; gap: 4px; align-items: center; width: 100%; border: 0; border-left: 3px solid var(--c, var(--muted)); padding: 2px 3px; background: #fffdf6; cursor: pointer;
  text-align: left; margin-top: 3px; color: inherit; border-radius: 4px; font-size: 12px; line-height: 1.25; }
.month .ev .thumb { width: 22px; border-radius: 3px; }
.month .ev span { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.month .mo { display: block; color: var(--red-ink); font-weight: 700; font-size: 11px; margin-top: 2px; }
@media (max-width: 760px) { .month .d { min-height: 64px; padding: 2px; } .month .ev .thumb, .month .ev span { display: none; } .month .ev { height: 7px; padding: 0; margin-top: 2px; background: var(--c); } }
.weekv { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.weekv .col { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 6px; min-height: 160px; display: flex; flex-direction: column; gap: 6px; }
.weekv .col h4 { margin: 0; font-size: 13px; color: var(--muted); }
@media (max-width: 760px) { .weekv { grid-template-columns: 1fr; } .weekv .col { min-height: 0; } }
.postrow { display: grid; grid-template-columns: 76px 1fr; gap: 12px; align-items: start; }
.postrow .thumb { width: 76px; }
.datelines { display: grid; gap: 4px; font-size: 13px; }
.datelines div { display: flex; gap: 6px; align-items: baseline; }
.datelines b { min-width: 100px; display: inline-block; color: var(--muted); font-weight: 700; }

.scrim { position: fixed; inset: 0; background: rgba(32,41,30,.5); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(980px, 100vw); background: var(--cream); z-index: 41; overflow-y: auto; box-shadow: -10px 0 30px rgba(0,0,0,.25); overscroll-behavior: contain; }
.drawer .dhead { position: sticky; top: 0; background: var(--paper); z-index: 3; display: flex; align-items: center; gap: 8px; padding: 8px 16px; }
.drawer .dhead::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; background: var(--chrome); }
.drawer .dhead .t { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.drawer .dbody { padding: 16px; display: flex; flex-direction: column; gap: 14px; padding-bottom: 120px; }
.actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
@media (max-width: 760px) { .drawer { width: 100vw; } .actions { grid-template-columns: repeat(2, 1fr); } }
dl.kv { display: grid; grid-template-columns: minmax(100px, 34%) 1fr; gap: 6px 12px; margin: 0; }
dl.kv dt { color: var(--muted); font-size: 14px; }
dl.kv dd { margin: 0; overflow-wrap: anywhere; min-width: 0; }

.cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cmp-toggle { display: none !important; }
@media (max-width: 760px) { .cmp { grid-template-columns: 1fr; } .cmp .b { display: none; } .cmp.showb .a { display: none; } .cmp.showb .b { display: block; } .cmp-toggle { display: inline-flex !important; } }

.chat { display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 92%; padding: 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); overflow-wrap: anywhere; }
.msg.owner { align-self: flex-end; background: var(--ink); color: var(--cream); border-color: transparent; }
.msg.agent { align-self: flex-start; border-left: 4px solid var(--cool); }
.msg.sys { align-self: center; background: var(--soft); font-size: 14px; max-width: 100%; }
.msg .meta { font-size: 12.5px; opacity: .85; margin-top: 4px; }
.rate { display: inline-flex; gap: 2px; margin-left: 6px; }
.rate button { border: 1px solid transparent; background: none; cursor: pointer; border-radius: 8px; padding: 0 4px; font-size: 15px; opacity: .55; }
.rate button[aria-pressed="true"] { opacity: 1; border-color: var(--line); background: var(--paper); }
.msg.work { align-self: flex-start; background: var(--paper); border: 1px dashed var(--gold); max-width: 92%; }
.msg.work .step { color: var(--muted); margin-top: 2px; }
.dots { display: inline-flex; gap: 3px; margin-right: 4px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: blink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }
#teammsgs { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow-y: auto; margin-top: 10px; }
.chatbar { display: flex; gap: 8px; align-items: flex-end; }
.chatbar textarea { flex: 1; min-height: 48px; }
.chatbar .btn { min-height: 48px; }
#team-mic.rec { background: var(--red); color: #fff; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .6; } }
/* the team chat, reachable from every page */
.teamchat-btn { position: fixed; right: 20px; bottom: 20px; z-index: 25; border: 2px solid transparent; border-radius: 999px; padding: 10px 16px;
  background: linear-gradient(#293527, #20291e) padding-box, var(--chrome) border-box; color: var(--cream); font-weight: 700; font-size: 16px;
  box-shadow: 0 6px 18px #20291e55; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
body.drawer-open .teamchat-btn { display: none; }
@media (max-width: 760px) {
  .teamchat-btn { bottom: calc(84px + env(safe-area-inset-bottom)); right: 12px; padding: 10px 14px; font-size: 15px; z-index: 31; }
  .chatbar { flex-wrap: wrap; }
  .chatbar textarea { order: -1; flex-basis: 100%; min-height: 70px; }
  .chatbar .btn[type="submit"] { flex: 1; }
}
.ctx { font-size: 13px; background: var(--soft); border-radius: 8px; padding: 6px 8px; }

.tw { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--soft); }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .tw.cards { border: 0; background: none; overflow: visible; }
  table.cards thead { display: none; }
  table.cards tr { display: block; border: 1px solid var(--line); border-radius: 12px; padding: 6px 0; margin-bottom: 8px; background: var(--card); }
  table.cards td { display: block; border: 0; padding: 4px 12px; text-align: right; overflow: hidden; }
  table.cards td::before { content: attr(data-l); float: left; width: 38%; color: var(--muted); font-size: 13px; text-align: left; padding-right: 8px; }
  table.cards td.num { white-space: normal; }
}
.kanban { display: grid; grid-template-columns: repeat(6, minmax(210px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.kanban .col { background: var(--soft); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 6px; min-height: 100px; }
@media (max-width: 760px) { .kanban { grid-template-columns: 1fr; overflow: visible; } }
.mapbox { position: relative; height: 520px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; touch-action: none; background: radial-gradient(#d9ccaa 1px, transparent 1px) 0 0 / 22px 22px, var(--card); }
.mapcanvas { position: absolute; left: 0; top: 0; width: 1340px; height: 700px; transform-origin: 0 0; }
.mapctl { position: absolute; top: 8px; right: 8px; z-index: 3; display: flex; gap: 6px; }
.node { position: absolute; width: 250px; text-align: left; background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; padding: 10px; cursor: pointer; box-shadow: var(--shadow); color: inherit; }
.node .r { font-family: var(--display); font-size: 17px; text-transform: uppercase; margin-top: 4px; }
.zone { position: absolute; border: 1.5px dashed #c9bd9c; border-radius: 16px; padding: 6px 10px; }
svg.edges { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
svg.edges path { stroke: var(--muted); stroke-width: 1.6; fill: none; }
.prog { height: 10px; background: var(--soft); border-radius: 999px; overflow: hidden; }
.prog > i { display: block; height: 100%; background: var(--cool); width: 0; transition: width .2s; }
.money { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 8px; }
.money > div { background: #fffdf6; border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.money .n { font-family: var(--display); font-size: 24px; }
.money .l { font-size: 13px; color: var(--muted); font-weight: 700; }
.hist { border-left: 2px solid var(--line); padding-left: 10px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }

.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--cream); }
.login-card { width: min(420px, 100%); border-radius: 22px; padding: 24px; display: flex; flex-direction: column; gap: 12px;
  border: 3px solid transparent; background: var(--ivory) padding-box, var(--chrome) border-box; box-shadow: var(--chrome-edge), 0 12px 30px #20291e30; }
.login-card .logo { height: 64px; margin: 0 auto 4px; }
.err { color: var(--red-ink); min-height: 1.2em; margin: 0; }
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: var(--ink); color: var(--cream); padding: 12px 16px; border-radius: 12px; z-index: 60; max-width: min(560px, calc(100vw - 32px)); box-shadow: var(--shadow); font-weight: 700; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; background: var(--paper); z-index: 45; border-radius: 18px 18px 0 0; padding: 16px; padding-bottom: calc(16px + env(safe-area-inset-bottom)); display: grid; gap: 8px; }
.hero { border-radius: 20px; padding: 20px; position: relative; overflow: hidden; border: 3px solid transparent;
  background: linear-gradient(115deg, #fffdf3 0%, #f3e8cc 60%, #eadbb6 100%) padding-box, var(--chrome) border-box; box-shadow: var(--chrome-edge), var(--shadow); }
.hero::after { content: ""; position: absolute; right: 26px; top: -20px; bottom: -20px; width: 46px; background: var(--red); transform: skewX(-12deg);
  box-shadow: 18px 0 0 -6px var(--cream), 30px 0 0 -2px var(--red); opacity: .92; }
.hero > * { position: relative; z-index: 1; max-width: calc(100% - 110px); }
.hero h1 { color: var(--ink); }

/* AI editing and generation */
.gref { width: 44px; height: 56px; object-fit: cover; border-radius: 6px; }
.refgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-top: 8px; }
.refpick { display: flex; flex-direction: column; gap: 4px; cursor: pointer; position: relative; }
.refpick img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 8px; border: 2px solid transparent; }
.refpick input { position: absolute; top: 6px; left: 6px; width: 20px; height: 20px; }
.refpick input:checked + img { border-color: var(--red); }
.refpick .tiny { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cost-line b { font-size: 1.1rem; }
.gen-card .msg.work { margin-top: 8px; }

/* + photos/videos from the phone on a post */
.addmedia { display: flex; justify-content: center; width: 100%; font-size: 16px; padding: 12px; }
#pm-panel .fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#pm-panel select { max-width: 120px; }
