/* Green Rock · PM. The cheat sheet's type and colours, calmer for daily use.
   Light in daylight, dark when the phone is dark. */

@font-face { font-family: 'Archivo'; src: url(fonts/archivo-var.woff2) format('woff2-variations'); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url(fonts/instrument-serif-italic.woff2) format('woff2'); font-style: italic; font-weight: 400; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url(fonts/jbmono-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url(fonts/jbmono-500.woff2) format('woff2'); font-weight: 500; font-display: swap; }

:root {
  --bg: #F3F1EC; --surface: #FFFFFF; --surface-2: #F8F6F2; --ink: #121512; --dim: rgba(18,21,18,.64); --faint: rgba(18,21,18,.4);
  --line: rgba(18,21,18,.12); --line-2: rgba(18,21,18,.2);
  --accent: #9C6A52; --tan: #D4A68C; --on-tan: #121512;
  --red: #B9412A; --red-bg: #FBE7E2; --amber: #9A6510; --amber-bg: #FBF0D9; --green: #3F7A47;
  --t-task: #7F9DC4; --t-meeting: #A9A397; --t-shoot: #5E9460; --t-bigEvent: #C9875F;
  --night: #0A0F0C; --forest: #1F3A2B;
  --sans: 'Archivo', 'Helvetica Neue', Arial, sans-serif; --serif: 'Instrument Serif', Georgia, serif; --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --pad: clamp(14px, 3vw, 36px); --radius: 14px; --barh: 58px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0A0F0C; --surface: #111914; --surface-2: #18231C; --ink: #F2F0EA; --dim: rgba(242,240,234,.66); --faint: rgba(242,240,234,.4);
    --line: rgba(242,240,234,.13); --line-2: rgba(242,240,234,.22);
    --accent: #D4A68C; --red: #EE7A62; --red-bg: rgba(238,122,98,.13); --amber: #E9B24E; --amber-bg: rgba(233,178,78,.13); --green: #8DC28F;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15.5px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
body.locked { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; }
.muted { color: var(--dim); }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; text-transform: none; letter-spacing: -.01em; }
.disp { font-weight: 860; font-stretch: 62%; text-transform: uppercase; line-height: .88; letter-spacing: -.005em; }
.mark { display: inline-block; aspect-ratio: 1.437; background: currentColor; -webkit-mask: url(icons/mark-white.svg) center/contain no-repeat; mask: url(icons/mark-white.svg) center/contain no-repeat; }
.splash { min-height: 100svh; display: grid; place-items: center; background: var(--night); color: #F2F0EA; }
.splash .mark { width: 64px; opacity: .8; animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .35; } }

/* ---- Top bar ---------------------------------------------------------------------------- */
.bar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 18px; min-height: var(--barh); padding: 0 var(--pad);
       background: color-mix(in srgb, var(--bg) 90%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; white-space: nowrap; }
.brand .mark { width: 30px; color: var(--ink); }
.brand span { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; }
.brand b { font-weight: 500; color: var(--accent); }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; min-width: 0; flex: 0 1 auto; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; padding: 9px 12px 8px; border-radius: 999px; color: var(--dim); text-decoration: none; white-space: nowrap; }
.tabs a:hover { color: var(--ink); background: var(--line); }
.tabs a.on { background: var(--tan); color: var(--on-tan); }
.me { margin-left: auto; display: flex; align-items: center; gap: 10px; white-space: nowrap; flex: none; }
@media (max-width: 1100px) { .me .who span { display: none; } }
.me .who { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.pdot { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--tan)); flex: none; display: inline-block; }
.linkish { background: none; border: 0; padding: 6px 4px; cursor: pointer; font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.linkish:hover { color: var(--ink); }
.envtag { font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; padding: 3px 7px 2px; border-radius: 4px; background: var(--amber-bg); color: var(--amber); }
@media (max-width: 760px) {
  .bar { flex-wrap: wrap; row-gap: 6px; padding-top: 10px; }
  .tabs { order: 3; width: calc(100% + 2 * var(--pad)); margin: 0 calc(-1 * var(--pad)); padding: 0 calc(var(--pad) - 6px) 8px;
          -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .me { gap: 8px; }
  .envtag .long { display: none; }
  .brand .mark { width: 26px; }
}
.offline { background: var(--red); color: #fff; text-align: center; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; padding: 6px var(--pad); }

/* ---- Screens ---------------------------------------------------------------------------- */
main.screen { padding: 22px var(--pad) calc(90px + env(safe-area-inset-bottom, 0px)); max-width: 1440px; margin: 0 auto; }
.screen-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 18px; }
.screen-head h1 { font-weight: 860; font-stretch: 62%; text-transform: uppercase; font-size: clamp(40px, 5.2vw, 68px); line-height: .86; }
.screen-head h1 .serif { display: block; font-size: .36em; line-height: 1.2; color: var(--accent); margin-top: 6px; }
.tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.empty { border: 1.5px dashed var(--line-2); border-radius: var(--radius); padding: 28px 20px; text-align: center; color: var(--dim); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }

/* ---- Controls --------------------------------------------------------------------------- */
.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2);
       background: transparent; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:hover { background: color-mix(in srgb, var(--ink) 85%, var(--tan)); }
.btn.tan { background: var(--tan); color: var(--on-tan); border-color: var(--tan); }
.btn.danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); }
.btn.big { min-height: 52px; font-size: 16px; padding: 0 22px; }
.btn:disabled { opacity: .45; cursor: default; }
@media (max-width: 760px) { .btn { min-height: 44px; } }
.seg { justify-self: start; width: fit-content; max-width: 100%; display: inline-flex; padding: 3px; border: 1px solid var(--line-2); border-radius: 999px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; cursor: pointer; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; padding: 8px 12px 7px; border-radius: 999px; color: var(--dim); }
.seg button.on { background: var(--ink); color: var(--bg); }
.seg.small button { padding: 6px 10px 5px; font-size: 10px; }
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; min-height: 32px; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle.off { opacity: .55; cursor: default; }
.toggle i { width: 40px; height: 24px; border-radius: 999px; background: var(--line-2); position: relative; flex: none; transition: background .15s; }
.toggle i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.toggle input:checked + i { background: var(--green); }
.toggle input:checked + i::after { transform: translateX(16px); }
.toggle input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.field { display: grid; gap: 6px; align-content: start; }
.field .lbl { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.field .hint { color: var(--dim); font-size: 12.5px; }
input[type=text], input[type=email], input[type=date], input[type=time], input[type=url], input[type=search], select, textarea {
  width: 100%; min-height: 44px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); padding: 0 12px; font-size: 16px; }
textarea { min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 0; border-color: var(--accent); }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.row > *, .field > input { min-width: 0; }
.row.two { grid-template-columns: 1fr 1fr; }
.pick { display: flex; flex-wrap: wrap; gap: 6px; }
.pick button { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 7px 12px 7px 10px; cursor: pointer; font-size: 14px; }
.pick button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.box { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 12px; background: var(--surface-2); }
.box > .toggle { font-weight: 600; }
.note { font-size: 13px; color: var(--dim); }
.note.ok { color: var(--green); }
.note.warn { color: var(--amber); }
.note.bad { color: var(--red); }

/* ---- The sheet (pop-up) ----------------------------------------------------------------- */
.sheet-bg { position: fixed; inset: 0; z-index: 100; background: rgba(10,15,12,.5); display: grid; place-items: center; padding: 16px; animation: fade .15s ease-out; }
.sheet { width: min(640px, 100%); max-height: min(88svh, 900px); background: var(--surface); border-radius: 18px; display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0,0,0,.35); overflow: hidden; }
.sheet.wide { width: min(880px, 100%); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 14px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { font-weight: 860; font-stretch: 62%; text-transform: uppercase; font-size: 30px; line-height: .9; }
.x { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); background: none; font-size: 22px; line-height: 1; cursor: pointer; flex: none; }
.sheet-body { padding: 18px 20px 22px; overflow-y: auto; display: grid; gap: 16px; overscroll-behavior: contain; }
.sheet-foot { display: flex; gap: 8px; justify-content: flex-end; align-items: center; flex-wrap: wrap; padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--surface); }
.sheet-foot .grow { margin-right: auto; }
.meta { font-size: 12.5px; color: var(--dim); }
@media (max-width: 760px) {
  .sheet-bg { place-items: end stretch; padding: 0; }
  .sheet, .sheet.wide { width: 100%; max-height: 94svh; border-radius: 18px 18px 0 0; animation: rise .2s ease-out; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(40px); opacity: .5; } }

/* ---- Toasts ----------------------------------------------------------------------------- */
.toasts { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; width: min(92vw, 440px); pointer-events: none; }
.toast { background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 12px; font-size: 14.5px; box-shadow: 0 10px 30px rgba(0,0,0,.25); transition: opacity .4s, transform .4s; }
.toast.bad { background: var(--red); color: #fff; }
.toast.out { opacity: 0; transform: translateY(8px); }

/* ---- Sign-in ---------------------------------------------------------------------------- */
.signin { min-height: 100svh; background: linear-gradient(180deg, var(--forest), var(--night) 70%); color: #F2F0EA; display: grid; align-content: center; justify-items: start;
          padding: 40px max(var(--pad), calc((100vw - 980px) / 2)); gap: 28px; }
.signin .mark { width: 64px; color: #D4A68C; }
.signin h1 { font-weight: 860; font-stretch: 62%; text-transform: uppercase; font-size: clamp(64px, 13vw, 168px); line-height: .84; }
.signin h1 .serif { display: block; font-size: clamp(20px, 2.4vw, 30px); line-height: 1.2; color: #D4A68C; margin-top: 12px; max-width: 26ch; }
.signin .panel { display: grid; gap: 14px; min-width: min(340px, 100%); }
.signin .devform { display: grid; gap: 10px; padding: 16px; border: 1px dashed rgba(242,240,234,.3); border-radius: 14px; max-width: 360px; }
.signin .devform input { background: rgba(242,240,234,.08); border-color: rgba(242,240,234,.25); color: #F2F0EA; }
.signin .devform .btn { color: #F2F0EA; border-color: rgba(242,240,234,.4); }
.signin .small { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: rgba(242,240,234,.6); }
.signin .err { color: #EE9A86; font-size: 14px; }

/* ---- Placeholder screens ---------------------------------------------------------------- */
.soon { padding: 40px 0; display: grid; gap: 10px; }
.soon p { max-width: 52ch; color: var(--dim); }

/* ---- Calendar: the strip --------------------------------------------------------------- */
.strip { display: grid; gap: 6px; margin-bottom: 16px; }
.strip .late { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; border-left: 4px solid currentColor; border-radius: 10px;
               padding: 11px 14px; font-size: 14.5px; cursor: pointer; line-height: 1.3; }
.strip .late span { color: var(--ink); }
.strip .late i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.strip .late.red { background: var(--red-bg); color: var(--red); }
.strip .late.amber { background: var(--amber-bg); color: var(--amber); }
.strip .more { justify-self: start; background: none; border: 0; cursor: pointer; font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); padding: 6px 2px; }
.strip.calm { display: flex; align-items: center; gap: 10px; color: var(--dim); font-size: 14px; padding: 4px 2px; }
.strip.calm i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }

/* ---- Calendar: FullCalendar in the studio look ------------------------------------------ */
.cal-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.fc { --fc-border-color: var(--line); --fc-page-bg-color: var(--surface); --fc-neutral-bg-color: var(--surface-2); --fc-neutral-text-color: var(--dim);
      --fc-today-bg-color: color-mix(in srgb, var(--tan) 13%, transparent); --fc-now-indicator-color: var(--red);
      --fc-button-text-color: var(--ink); --fc-button-bg-color: transparent; --fc-button-border-color: var(--line-2);
      --fc-button-hover-bg-color: var(--line); --fc-button-hover-border-color: var(--ink); --fc-button-active-bg-color: var(--ink); --fc-button-active-border-color: var(--ink);
      --fc-event-text-color: #121512; --fc-event-border-color: transparent; --fc-list-event-hover-bg-color: var(--surface-2);
      --fc-highlight-color: color-mix(in srgb, var(--tan) 25%, transparent); font-size: 13.5px; }
.fc .fc-toolbar { gap: 8px; flex-wrap: wrap; }
.fc .fc-toolbar.fc-header-toolbar { margin-bottom: 12px; }
.fc .fc-toolbar-title { font-weight: 860; font-stretch: 62%; text-transform: uppercase; font-size: 26px; line-height: 1; }
.fc .fc-button { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; border-radius: 999px !important; padding: 8px 12px 7px; box-shadow: none !important; }
.fc .fc-button-group { gap: 4px; }
.fc .fc-button-primary:not(:disabled).fc-button-active, .fc .fc-button-primary:not(:disabled):active { color: var(--bg); }
.fc .fc-button .fc-icon { font-size: 1.2em; }
.fc .fc-col-header-cell-cushion, .fc .fc-list-day-text, .fc .fc-daygrid-day-number { font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; color: var(--dim); }
.fc .fc-day-today .fc-col-header-cell-cushion, .fc .fc-day-today .fc-daygrid-day-number { color: var(--accent); font-weight: 500; }
.fc .fc-timegrid-slot-label-cushion, .fc .fc-timegrid-axis-cushion { font-family: var(--mono); font-size: 10px; color: var(--faint); }
.fc .fc-timegrid-slot { height: 2.1em; }
.fc .fc-event { border-radius: 6px; font-weight: 600; cursor: pointer; background: var(--c, var(--t-task)); border-color: var(--c, var(--t-task)); }
.fc .fc-event .fc-event-main { color: #121512; padding: 1px 4px; }
.fc .fc-event.t-task { --c: var(--t-task); } .fc .fc-event.t-meeting { --c: var(--t-meeting); }
.fc .fc-event.t-shoot { --c: var(--t-shoot); } .fc .fc-event.t-bigEvent { --c: var(--t-bigEvent); }
.fc .fc-event.is-done { opacity: .45; } .fc .fc-event.is-done .fc-event-title { text-decoration: line-through; }
.fc .fc-event.is-high { box-shadow: inset 4px 0 0 var(--red); }
.fc .fc-list-event { background: none; color: var(--ink); } .fc .fc-list-event td { border-color: var(--line); }
.fc .fc-list-event .fc-event-main, .fc-list-event-title, .fc-list-event-time { color: var(--ink); }
.fc .fc-list-event-dot { border-color: var(--c, var(--t-task)); }
.fc .fc-list-day-cushion { background: var(--surface-2); }
.fc .fc-daygrid-more-link { font-family: var(--mono); font-size: 10px; color: var(--dim); }
.fc .fc-popover { background: var(--surface); }
.fc a { color: inherit; }
@media (max-width: 760px) {
  .cal-wrap { padding: 8px; margin: 0 calc(-1 * var(--pad) + 6px); }
  .fc .fc-toolbar-title { font-size: 20px; }
  .fc .fc-button { padding: 9px 10px 8px; }
}
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .sw { width: 12px; height: 12px; border-radius: 3px; background: var(--c); }
.legend .t-task { --c: var(--t-task); } .legend .t-meeting { --c: var(--t-meeting); } .legend .t-shoot { --c: var(--t-shoot); } .legend .t-bigEvent { --c: var(--t-bigEvent); }
.box.footage { background: color-mix(in srgb, var(--t-shoot) 12%, var(--surface)); }

/* ---- Content: the journal grid ---------------------------------------------------------- */
.s-idea { --sc: #A9A397; } .s-production { --sc: #7F9DC4; } .s-ready { --sc: #E0A93B; } .s-approved { --sc: #5E9460; } .s-posted { --sc: #C9875F; }
.sdot { width: 10px; height: 10px; border-radius: 50%; background: var(--sc); flex: none; display: inline-block; }
.ig { max-width: 640px; margin: 0 auto; }
.ig-head { display: flex; align-items: center; gap: 16px; padding: 4px 4px 18px; font-size: 14.5px; }
.ig-head .av { width: 68px; height: 68px; border-radius: 50%; background: var(--night); display: grid; place-items: center; flex: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--tan); }
.ig-head .av .mark { width: 34px; color: #D4A68C; }
.ig-head .counts { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 4px; color: var(--dim); font-size: 13.5px; }
.ig-head .counts b { color: var(--ink); }
.ig-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
.tile { position: relative; aspect-ratio: 3 / 4; border: 0; padding: 0; margin: 0; cursor: pointer; overflow: hidden; display: block; width: 100%;
        background: color-mix(in srgb, var(--sc) 26%, var(--surface)); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.tile:hover img { transform: scale(1.03); }
.tile .tt { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 14px 10px; text-align: center;
            font-weight: 820; font-stretch: 70%; text-transform: uppercase; font-size: clamp(12px, 2.4vw, 17px); line-height: 1.05; color: var(--ink); overflow: hidden; }
.tile .td { position: absolute; left: 6px; top: 6px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .06em; background: rgba(10,15,12,.72); color: #F2F0EA; padding: 3px 6px 2px; border-radius: 4px; }
.tile .tf { position: absolute; right: 7px; top: 4px; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.7); font-size: 14px; }
.tile .sdot { position: absolute; left: 7px; bottom: 7px; box-shadow: 0 0 0 2px rgba(255,255,255,.9); }
/* A version on the review page (15.11.2026). */
.tile .trev { position: absolute; right: 6px; bottom: 6px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .06em; background: var(--accent); color: #fff; padding: 3px 6px 2px; border-radius: 4px; }
.revlink { display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 760px) { .ig-grid { margin: 0 calc(-1 * var(--pad)); } }
.tray { max-width: 640px; margin: 28px auto 0; }
.tray h2 { color: var(--dim); margin-bottom: 10px; }
.tray-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.tray-card { flex: 0 0 150px; display: grid; gap: 6px; text-align: left; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 10px 12px; cursor: pointer; font-size: 13.5px; }
.tray-card small { color: var(--dim); }
.status-legend { max-width: 640px; margin: 18px auto 0; }
.plist { max-width: 760px; display: grid; gap: 18px; }
.plist h3 { color: var(--accent); margin-bottom: 6px; }
.prow { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; cursor: pointer; margin-bottom: 6px; }
.prow .pt { display: grid; gap: 2px; flex: 1; min-width: 0; }
.prow .pt small { color: var(--dim); font-size: 10px; }
.prow .chs { display: flex; gap: 4px; }
.prow .chs i { font-style: normal; font-family: var(--mono); font-size: 9.5px; padding: 3px 5px 2px; border-radius: 4px; border: 1px solid var(--line-2); color: var(--dim); }
.prow .chs i.done { background: var(--green); border-color: var(--green); color: #fff; }

/* ---- Content: the post editor ------------------------------------------------------------- */
.post-top { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 18px; align-items: start; }
.cover-edit { display: grid; gap: 8px; justify-items: start; }
.cover-edit .pv { width: 170px; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: var(--surface-2); border: 1px dashed var(--line-2); display: grid; place-items: center; color: var(--faint); }
.cover-edit .pv img { width: 100%; height: 100%; object-fit: cover; }
.post-main { display: grid; gap: 14px; }
.channels { display: grid; gap: 6px; }
.chrow { display: grid; grid-template-columns: 110px auto auto minmax(0, 1fr); gap: 8px 16px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; }
@media (max-width: 760px) {
  .post-top { grid-template-columns: 1fr; }
  .cover-edit { grid-template-columns: 110px 1fr; align-items: center; }
  .cover-edit .pv { width: 110px; grid-row: span 2; }
  .chrow { grid-template-columns: 1fr 1fr; }
  .chrow b { grid-column: 1 / -1; }
  .chrow input { grid-column: 1 / -1; }
}

/* ---- Ideas ------------------------------------------------------------------------------ */
.ideas-screen .screen-head h1 .serif { max-width: 34ch; }
.composer { padding: 14px; display: grid; gap: 10px; margin-bottom: 18px; max-width: 980px; }
.composer textarea { min-height: 70px; }
.composer-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.composer-row input { flex: 1 1 200px; width: auto; }
.thumb { display: inline-flex; align-items: center; gap: 8px; }
.thumb img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.ideas { columns: 3 300px; column-gap: 14px; max-width: 1200px; }
.idea { break-inside: avoid; margin-bottom: 14px; overflow: hidden; display: block; }
.idea.closed { opacity: .75; }
.idea .ph { width: 100%; max-height: 260px; object-fit: cover; }
.idea .ib { padding: 14px 16px 12px; display: grid; gap: 8px; }
.idea .it { font-size: 17px; line-height: 1.35; white-space: pre-wrap; }
.idea .place { color: var(--accent); }
.iacts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.like { border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: 14px; min-width: 52px; }
.like.on { background: var(--tan); border-color: var(--tan); color: var(--on-tan); }
.admin-acts { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; }
.comments { display: grid; gap: 6px; font-size: 14px; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }

/* ---- Team -------------------------------------------------------------------------------- */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.person { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; align-items: center; text-align: left; padding: 14px 16px; cursor: pointer; }
.person:hover { border-color: var(--line-2); }
.person .pn { display: grid; }
.person .pn small { color: var(--dim); font-size: 13px; }
.person .pe { grid-column: 2; font-family: var(--mono); font-size: 10.5px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; }
.pdot.big { width: 22px; height: 22px; grid-row: span 2; }
.settings { margin-top: 34px; display: grid; gap: 10px; max-width: 900px; }
.settings h2 { color: var(--dim); }
.setting { display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; padding: 14px 16px; }
.setting p { font-size: 13.5px; max-width: 60ch; margin-top: 2px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatches .sw { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--c); cursor: pointer; }
.swatches .sw.on { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--ink); }

/* ---- How we work, Tutorial --------------------------------------------------------------- */
/* The Guide tab (14.11.2026): the M4 book fills the screen under the top bar, one section, no box;
   the page stays put and the book scrolls inside. */
#app:has(> .guide-screen) { display: flex; flex-direction: column; height: 100svh; }
main.screen.guide-screen { flex: 1 1 auto; min-height: 0; padding: 0; max-width: none; margin: 0; }
.guide-frame { display: block; width: 100%; height: 100%; border: 0; background: #fff; } /* M4 is bright: white while the book loads */
.tutorial { max-width: 860px; }
.video-soon { padding: 18px; display: grid; gap: 4px; margin-bottom: 18px; background: linear-gradient(135deg, var(--forest), var(--night)); color: #F2F0EA; border: 0; }
.video-soon .mono { color: #D4A68C; }
.toc { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.toc a { font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; padding: 7px 10px 6px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--dim); }
.tut { padding: 22px 0; border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--barh) + 50px); }
.tut h2 { display: flex; align-items: baseline; gap: 12px; font-weight: 860; font-stretch: 62%; text-transform: uppercase; font-size: clamp(28px, 3.4vw, 40px); line-height: .95; margin-bottom: 12px; }
.tut h2 .mono { color: var(--accent); font-size: 12px; }
.tb { display: grid; gap: 10px; font-size: 16.5px; line-height: 1.5; max-width: 64ch; }
.tb ol, .tb ul { margin: 0; padding-left: 1.3em; display: grid; gap: 8px; }
.red-t { color: var(--red); font-weight: 600; } .amber-t { color: var(--amber); font-weight: 600; }

/* ---- Today ------------------------------------------------------------------------------- */
.home { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.home-col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.hsec h2.mono { color: var(--dim); margin-bottom: 10px; }
.hsec.card { padding: 14px 16px 16px; }
.hsec-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 8px; }
.hsec-head h2.mono { margin: 0; }
.home .strip { margin-bottom: 0; }
.go { display: inline-block; margin-top: 8px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); text-decoration: none; }
.hsec-head .go { margin: 0; }
.dlist { display: grid; gap: 6px; padding: 4px 0 12px; }
.dlist + .dlist { border-top: 1px solid var(--line); padding-top: 12px; }
.dlist h3 { display: flex; gap: 8px; align-items: baseline; font-size: 15px; font-weight: 700; }
.dlist h3 .muted { font-weight: 400; font-size: 13px; }
.drow { display: flex; align-items: center; gap: 10px; border-radius: 10px; background: var(--surface-2); box-shadow: inset 4px 0 0 var(--c); padding-left: 12px; }
.drow.t-task { --c: var(--t-task); } .drow.t-meeting { --c: var(--t-meeting); } .drow.t-shoot { --c: var(--t-shoot); } .drow.t-bigEvent { --c: var(--t-bigEvent); }
.tick { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--line-2); background: var(--surface); color: #fff; font-size: 14px; line-height: 1; cursor: pointer; }
.drow.is-done .tick { background: var(--green); border-color: var(--green); }
.dmain { flex: 1; min-width: 0; display: grid; grid-template-columns: 6.6em minmax(0, 1fr); gap: 0 10px; align-items: baseline; text-align: left; background: none; border: 0; padding: 9px 12px 9px 0; cursor: pointer; }
.dmain .dt { color: var(--dim); font-size: 10px; letter-spacing: .04em; grid-row: span 2; }
.dmain .dtt { font-weight: 600; overflow-wrap: anywhere; }
.dmain small { grid-column: 2; color: var(--dim); font-size: 12.5px; }
.drow.is-done .dtt { text-decoration: line-through; color: var(--dim); }
.dmeet { flex: none; margin-right: 10px; padding: 6px 12px; border-radius: 999px; background: var(--tan); color: var(--on-tan); font-size: 12.5px; font-weight: 600; text-decoration: none; }
.box.meetbox { background: color-mix(in srgb, var(--t-meeting) 12%, var(--surface)); }
.nothing { font-size: 14px; }
.week { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.mtile { position: relative; flex: 0 0 104px; aspect-ratio: 3 / 4; border: 0; padding: 0; border-radius: 8px; overflow: hidden; cursor: pointer; background: color-mix(in srgb, var(--sc) 26%, var(--surface)); }
.mtile img { width: 100%; height: 100%; object-fit: cover; }
.mtile .tt { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 22px 6px 10px; text-align: center; font-weight: 820; font-stretch: 70%; text-transform: uppercase; font-size: 11.5px; line-height: 1.05; color: var(--ink); overflow: hidden; }
.mtile .td { position: absolute; left: 5px; top: 5px; font-family: var(--mono); font-size: 9px; letter-spacing: .04em; background: rgba(10,15,12,.72); color: #F2F0EA; padding: 3px 5px 2px; border-radius: 4px; }
.mtile .sdot { position: absolute; left: 6px; bottom: 6px; box-shadow: 0 0 0 2px rgba(255,255,255,.9); }
.nums { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.num { display: grid; gap: 4px; align-content: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.num b { font-weight: 860; font-stretch: 62%; font-size: 34px; line-height: 1; }
.num span { font-size: 12.5px; color: var(--dim); }
.num.warn b { color: var(--amber); } .num.bad b { color: var(--red); }
.irow { display: flex; gap: 12px; align-items: baseline; width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--line); padding: 9px 0; cursor: pointer; }
.hsec-head + .irow { border-top: 0; }
.irow .likes { flex: none; font-size: 13px; color: var(--dim); min-width: 3em; }
.irow .itx { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 900px) { .home { grid-template-columns: minmax(0, 1fr); } }

/* ---- Journal posts on the calendar --------------------------------------------------------- */
.fc .fc-event.t-post:not(.fc-list-event) { background: var(--surface); border: 1.5px solid var(--tan); }
.fc .fc-event.t-post .fc-event-main { color: var(--ink); }
.fc .fc-event.t-post.s-posted { opacity: .7; }
.fc .fc-list-event.t-post .fc-list-event-dot { border-color: var(--tan); }
.pev { display: flex; gap: 6px; align-items: center; min-width: 0; overflow: hidden; }
.pev img { width: 22px; height: 29px; object-fit: cover; border-radius: 3px; flex: none; }
.pev > span { display: grid; min-width: 0; line-height: 1.15; }
.pev b { font-family: var(--mono); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 500; }
.pev > span > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend .t-post { --c: var(--surface); box-shadow: inset 0 0 0 1.5px var(--tan); }

/* ---- Dragging posts in the grid ------------------------------------------------------------- */
.tile, .tray-card, .mtile { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.tile img { -webkit-user-drag: none; }
.drag-ghost { position: fixed !important; left: 0; top: 0; z-index: 300; margin: 0; pointer-events: none; transform-origin: 0 0; border-radius: 8px; opacity: .92; box-shadow: 0 18px 40px rgba(0,0,0,.4); }
.drag-ghost img { transition: none; }
.drag-src { opacity: .3; }
.drop-on { outline: 4px solid var(--accent); outline-offset: -4px; }
.tile.drop-on img { transform: scale(.94); }
body.dragging, body.dragging * { cursor: grabbing !important; }
.ig-grid.saving { opacity: .6; pointer-events: none; transition: opacity .2s; }
.hint-line { margin-top: 10px; color: var(--dim); font-size: 12.5px; text-align: center; }
.tray .hint-line { margin-top: 6px; text-align: left; }

/* ---- Team: the Google card ------------------------------------------------------------------ */
.gcard .tools { flex-wrap: wrap; }
.gerr { margin-top: 6px; }
.gerr summary { cursor: pointer; }
.gerr ul { margin: 6px 0 0; padding-left: 1.2em; font-size: 13px; display: grid; gap: 4px; }
.cover-edit small { font-size: 12px; }

/* ---- Content: Instagram and the AI caption helper on a post ---------------------------------- */
.igbox { gap: 6px; }
.igbox .note { margin: 0; }
.igrow { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.aiask { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.aidraft { padding: 12px 14px; display: grid; gap: 8px; border-color: var(--line-2); }
.aidraft p { margin: 0; white-space: pre-wrap; }
.aihead { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; }
.aiwait { margin: 0; }
.post-top + .aidraft, .post-top + .aiask, .post-top + .field, .post-top + .note { margin-top: 2px; }

/* ---- Content: a post's pictures (drafts and what goes out, from Drive) ------------------------ */
.pics { gap: 10px; }
.pics .lbl .linkish { margin-left: 8px; padding: 0 4px; }
.pics .note { margin: 0; }
.pics-row { display: grid; gap: 6px; }
.pics-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.pic-wrap { display: grid; gap: 2px; justify-items: center; flex: none; }
.pic-acts { display: flex; gap: 2px; }
.pic { position: relative; flex: none; width: 104px; aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; cursor: pointer;
       background: var(--surface-2); border: 1px solid var(--line); outline: 3px solid transparent; outline-offset: -3px; }
.pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pic.on { outline-color: var(--accent); }
.pic .badge { position: absolute; top: 6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; display: grid; place-items: center;
              font: 600 12px/1 var(--mono); background: rgba(10,15,12,.72); color: #fff; }
.pic .num { left: 6px; } .pic.on .num { background: var(--accent); }
.pic .vid { right: 6px; }
.pic .zoom { position: absolute; right: 5px; bottom: 5px; width: 26px; height: 26px; border-radius: 8px; border: 0; cursor: pointer;
             background: rgba(10,15,12,.6); color: #fff; font-size: 14px; line-height: 1; }
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(10,15,12,.9); display: flex; flex-direction: column; align-items: center;
            justify-content: center; gap: 12px; padding: 16px; cursor: zoom-out; color: #fff; }
.lightbox img { max-width: 100%; max-height: 82svh; object-fit: contain; border-radius: 8px; }
.lightbox small { font-family: var(--mono); font-size: 11px; opacity: .7; }
.lightbox .note { color: #fff; }

/* ---- Phones: comfortable tap areas (last, so they win over the rules above) ---------------- */
@media (max-width: 760px) {
  .linkish { min-height: 40px; padding: 10px 8px; }
  .seg.small button { padding: 10px 12px 9px; }
  .tick { width: 36px; height: 36px; }
  .pic .zoom { width: 36px; height: 36px; }
}

/* ---- Who can change what (08.11.2026): locked fields, the footage line ------------------ */
fieldset.lock { display: contents; }
fieldset.lock.cover-edit { display: grid; border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.lock:disabled input, fieldset.lock:disabled select, fieldset.lock:disabled textarea { background: var(--surface-2); color: var(--ink); opacity: 1; -webkit-text-fill-color: var(--ink); }
fieldset.lock:disabled .pick button, fieldset.lock:disabled .seg button, fieldset.lock:disabled .toggle { cursor: default; }
fieldset.lock:disabled label.btn { opacity: .45; cursor: default; pointer-events: none; }
fieldset.lock:disabled .linkish { display: none; }
.note.lockline { border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: var(--surface-2); color: var(--ink); }
.tick:disabled { cursor: default; opacity: .4; }
.shoot-links { display: grid; gap: 6px; }
.shoot-link { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: var(--surface-2); }
.shoot-link b { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.shoot-link span { flex: 1 1 140px; }
.shoot-pick { max-height: 220px; overflow-y: auto; padding: 2px; }

/* ---- The Board (11.11.2026): To do · In progress · Done ------------------------------------ */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } /* columns as tall as the longest: drop anywhere in one */
.board.saving { opacity: .6; pointer-events: none; transition: opacity .2s; }
.bcol { display: grid; gap: 10px; align-content: start; min-height: 180px; padding: 12px; border-radius: var(--radius); background: color-mix(in srgb, var(--ink) 5%, transparent); }
.bcol.drop-on { outline: 3px solid var(--accent); outline-offset: -3px; }
.bcol-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 2px 4px 0; }
.bcol-head h2 { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; }
.bcol-head .n { font-family: var(--mono); font-size: 11px; color: var(--dim); }
.bcards { display: grid; gap: 8px; }
.bempty { color: var(--faint); font-size: 13.5px; padding: 6px 4px; }
.bnote { color: var(--faint); font-size: 12px; padding: 0 4px; }
.bcard { display: grid; gap: 7px; text-align: left; width: 100%; padding: 11px 12px 10px 15px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
         box-shadow: inset 4px 0 0 var(--c), 0 1px 2px rgba(0,0,0,.05); cursor: pointer; font: inherit; color: inherit;
         -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.bcard:hover { border-color: var(--line-2); }
.bcard.t-task { --c: var(--t-task); } .bcard.t-shoot { --c: var(--t-shoot); }
.c-done .bcard .btitle { text-decoration: line-through; color: var(--dim); }
.btitle { font-weight: 600; font-size: 14.5px; line-height: 1.3; overflow-wrap: anywhere; }
.btitle .hi { color: var(--red); }
.bmeta, .bwho { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 6px; }
.bwho:empty { display: none; }
.chip, .bcard .tag { font-family: var(--mono); font-size: 10px; letter-spacing: .04em; padding: 4px 7px 3px; border-radius: 5px; background: var(--surface-2); color: var(--dim); white-space: nowrap; }
.chip.today { background: color-mix(in srgb, var(--tan) 32%, transparent); color: var(--ink); }
.chip.late { background: var(--red-bg); color: var(--red); }
.chip.done { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); }
.bcard .where { font-size: 12px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.ini { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--c, var(--tan)); color: #121512; font-style: normal; font-size: 11px; font-weight: 700; }
.bwho small { color: var(--dim); font-size: 12px; }
.badd { border: 0; background: none; text-align: left; padding: 9px 6px; border-radius: 8px; color: var(--dim); font: inherit; font-size: 14px; cursor: pointer; }
.badd:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); }
.bform { display: grid; gap: 8px; }
.bform input, .bform select { width: 100%; min-width: 0; }
.bform .brow { display: flex; gap: 8px; align-items: center; }
.bform .brow > * { flex: 1 1 0; }
.bform .brow .btn, .bform .brow .linkish { flex: 0 0 auto; }
.gos { display: flex; gap: 6px 18px; flex-wrap: wrap; }
.status-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.status-line .lbl { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
@media (max-width: 760px) {
  .board { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 86%; overflow-x: auto; scroll-snap-type: x mandatory;
           margin: 0 calc(-1 * var(--pad)); padding: 0 var(--pad) 6px; scroll-padding: 0 var(--pad); }
  .bcol { scroll-snap-align: start; }
  .bcard { padding: 13px 12px 12px 15px; }
  .badd { min-height: 44px; }
}

/* ---- The admin AI chat (11.11.2026) -------------------------------------------------------- */
/* The prompt line, always at the bottom for admins, and the conversation above it (12.11.2026). */
.aidock { position: fixed; z-index: 60; left: 0; right: 0; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); margin: 0 auto;
          width: min(860px, calc(100% - 2 * var(--pad))); max-height: calc(100svh - var(--barh) - 24px);
          display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.aidock > * { pointer-events: auto; }
.aibar { flex: none; display: grid; gap: 6px; padding: 6px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 24px;
         box-shadow: 0 10px 34px rgba(0,0,0,.2); transition: border-color .15s; }
.aibar:focus-within, .aibar.over { border-color: var(--accent); }
.aibar-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 6px 0; }
.aibar-row { display: flex; align-items: flex-end; gap: 4px; }
.aibar textarea { flex: 1 1 auto; min-width: 0; min-height: 40px; max-height: 168px; height: 40px; border: 0; border-radius: 0; background: transparent;
                  resize: none; padding: 9px 6px; font-size: 16px; line-height: 22px; overflow-y: hidden; }
.aibar textarea:focus { outline: none; border: 0; }
.aib { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; background: none; color: var(--dim); cursor: pointer; display: inline-grid; place-items: center; }
.aib:hover:not(:disabled) { color: var(--ink); background: var(--line); }
.aib.send { background: var(--ink); color: var(--bg); }
.aib.send:hover:not(:disabled) { background: color-mix(in srgb, var(--ink) 85%, var(--tan)); color: var(--bg); }
.aib:disabled { opacity: .3; cursor: default; }
.aichip { position: relative; flex: none; height: 40px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px 0 12px; border: 0; border-radius: 999px;
          background: var(--tan); color: var(--on-tan); cursor: pointer; font-family: var(--mono); font-weight: 700; font-size: 12px; letter-spacing: .08em; }
.aichip:hover { background: color-mix(in srgb, var(--tan) 85%, var(--ink)); }
.aichip i { width: 8px; height: 8px; border-radius: 50%; background: rgba(18,21,18,.3); }
.aichip.on i { background: #3F7A47; } .aichip.off i { background: #9A6510; }
.aichip.fresh::after { content: ''; position: absolute; top: -2px; right: -2px; width: 12px; height: 12px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px var(--surface); }
.aipanel { flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--line-2);
           border-radius: 18px; box-shadow: 0 24px 70px rgba(0,0,0,.3); animation: rise .18s ease-out; }
.aipanel-head { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px; border-bottom: 1px solid var(--line); }
.aipanel-head .aistate { flex: 1 1 auto; min-width: 0; }
.aipanel-head .aistate b { color: var(--ink); }
.aipanel-body { flex: 0 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px 16px; display: grid; gap: 12px; align-content: start; }
.aipanel .notes { margin: 0; }
body.has-aidock .toasts { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
.aistate { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--dim); }
.aistate i { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--faint); }
.aistate.on i { background: var(--green); } .aistate.off i { background: var(--amber); }
.chat-hello { border: 1.5px dashed var(--line-2); border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 6px; font-size: 14.5px; }
.notes { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin: 10px 0 14px; background: var(--surface); }
.notes summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 14px; }
.notes[open] summary { margin-bottom: 8px; }
.notes ul { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 2px; }
.notes li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 1.4; padding: 4px 0; border-bottom: 1px solid var(--line); }
.notes li small { color: var(--dim); font-size: 12px; }
.notes .muted { font-size: 13.5px; margin: 0 0 8px; }
.notes .ndel { border: 0; background: none; cursor: pointer; font-size: 17px; line-height: 1; color: var(--dim); padding: 0 4px; flex: none; }
.notes .ndel:hover { color: var(--red); }
.notes .crow input { min-width: 0; }
.msgs { display: grid; gap: 12px; }
.msg { display: grid; gap: 6px; max-width: 88%; padding: 10px 14px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); justify-self: start; }
.msg.mine { justify-self: end; background: color-mix(in srgb, var(--tan) 18%, var(--surface)); }
.msg.ai { max-width: 100%; width: 100%; background: var(--surface); border-color: var(--line-2); }
.mhead { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.mtext { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; line-height: 1.45; }
.mstate { font-size: 12.5px; color: var(--dim); font-style: italic; }
.mstate.bad { color: var(--red); font-style: normal; }
.files { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 12.5px; color: var(--ink); text-decoration: none; background: var(--surface); max-width: 100%; overflow-wrap: anywhere; }
.fchip button { border: 0; background: none; cursor: pointer; font-size: 15px; line-height: 1; color: var(--dim); padding: 0 2px; }
.changes { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.changes ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.changes li { font-size: 13.5px; line-height: 1.35; }
.changes li label, .changes li { display: flex; gap: 8px; align-items: flex-start; }
.changes li label { cursor: pointer; width: 100%; padding: 4px 0; }
.changes li input { margin-top: 2px; width: 17px; height: 17px; flex: none; accent-color: var(--accent); }
.changes li b, .changes .cmark { font-family: var(--mono); width: 14px; flex: none; text-align: center; color: var(--accent); }
.changes li.made .cmark { color: var(--green); }
.changes li.skipped .cmark, .changes li.skipped small { color: var(--red); }
.changes li.left, .changes.away li { color: var(--faint); }
.changes small { color: var(--dim); }
.crow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.crow .grow { flex: 1 1 auto; }
@media (max-width: 760px) {
  .msg { max-width: 94%; }
  .changes li label { padding: 7px 0; }
  .aidock { width: calc(100% - 16px); bottom: calc(8px + env(safe-area-inset-bottom, 0px)); max-height: calc(100svh - 16px); }
  .aipanel-body { padding: 12px 12px 14px; }
  .aipanel-head { padding-left: 12px; }
}
