@font-face {
  font-family: "TT Days Sans";
  src: url("assets/fonts/TTDaysSans-Regular.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "TT Days Sans";
  src: url("assets/fonts/TTDaysSans-Bold.woff2") format("woff2");
  font-weight: 600 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "F37 Ginger";
  src: url("assets/fonts/F37GingerCyrillic-VF.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Korzinka Display ExtraBold Italic";
  src: url("assets/fonts/Korzinka_DisplayExtraBoldItalic.otf") format("opentype");
  font-weight: 800;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Korzinka Regular";
  src: url("assets/fonts/Korzinka-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-ui: "TT Days Sans", "Montserrat", system-ui, sans-serif;
  --font-display: var(--potok-brand-font-family);
  --ink: #07111f;
  --cream: #f6f4ef;
  --paper: #ffffff;
  --muted: #6b7280;
  --line: rgba(7, 17, 31, 0.1);
  --line-strong: rgba(7, 17, 31, 0.16);
  --blue: #246bfe;
  --amber: #f2a62b;
  --violet: #7a5af8;
  --coral: #ef6a68;
  --emerald: #21b66f;
  --lime: #c8ff5a;
  --shadow-soft: 0 14px 44px rgba(7, 17, 31, 0.08);
  --shadow-card: 0 6px 16px rgba(7, 17, 31, 0.06);
  --drawer-width: 450px;
}

* { box-sizing: border-box; }

html { min-width: 320px; scroll-behavior: smooth; }

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(42, 171, 238, 0.12), transparent 26rem),
    radial-gradient(circle at 82% 2%, rgba(33, 182, 111, 0.1), transparent 23rem),
    var(--cream);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
}

body.drawer-open { padding-right: var(--drawer-width); }

button, input, textarea, select { font: inherit; }
button { color: inherit; }
button, a, label { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid rgba(36, 107, 254, 0.32);
  outline-offset: 2px;
}

.topbar {
  position: sticky;
  z-index: 40;
  top: 0;
  height: 72px;
  display: grid;
  grid-template-columns: max-content minmax(280px, 1fr) max-content;
  align-items: center;
  gap: 20px;
  padding: 0 28px;
  border-bottom: 1px solid rgba(7, 17, 31, 0.08);
  background: rgba(246, 244, 239, 0.9);
  backdrop-filter: blur(18px);
  transition: padding-right 0.24s ease;
}

body.drawer-open .topbar { padding-right: calc(var(--drawer-width) + 28px); }

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 13px;
  object-fit: cover;
  box-shadow: 0 9px 20px rgba(7, 17, 31, 0.2);
}
.brand-name { font-family: var(--font-display); font-size: 24px; font-weight: 760; line-height: 1; letter-spacing: -0.035em; }
.brand-scope { display: none; align-items: center; gap: 10px; line-height: 1; white-space: nowrap; }
.brand-scope > span { color: #b8bec7; font-size: 21px; font-weight: 400; line-height: 1; }
.brand-scope > strong { color: #e5002b; font-family: "Korzinka Display ExtraBold Italic", sans-serif; font-size: 20px; font-style: italic; font-weight: 800; line-height: 1; letter-spacing: -.025em; }
body[data-scope="korzinka"] .brand-scope { display: inline-flex; }
.brand-caption { overflow: hidden; color: var(--muted); font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }

.search {
  width: 100%;
  max-width: 640px;
  justify-self: center;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 3px 12px rgba(7, 17, 31, 0.03);
}

.search-icon { position: relative; width: 15px; height: 15px; flex: 0 0 auto; border: 1.8px solid #87909e; border-radius: 50%; }
.search-icon::after { position: absolute; width: 6px; height: 1.8px; right: -5px; bottom: -2px; content: ""; border-radius: 99px; background: #87909e; transform: rotate(45deg); }
.search input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 13px; }
.search input::placeholder { color: #9299a5; }
.search kbd { padding: 3px 7px; border: 1px solid var(--line); border-radius: 6px; color: #8b929c; background: #f8f8f6; font-family: inherit; font-size: 9px; font-weight: 600; }

.top-actions { min-width: max-content; display: flex; align-items: center; justify-content: flex-end; gap: 10px; white-space: nowrap; }
.save-state { display: flex; align-items: center; gap: 7px; color: #5f6976; font-size: 11px; font-weight: 600; white-space: nowrap; }
.save-state i { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 0 4px rgba(33, 182, 111, 0.12); }
.save-state[data-state="saving"] i { background: var(--amber); box-shadow: 0 0 0 4px rgba(242, 166, 43, 0.13); animation: pulse 1s infinite; }
.save-state[data-state="error"] { color: #a44240; }
.save-state[data-state="error"] i { background: var(--coral); box-shadow: 0 0 0 4px rgba(239, 106, 104, 0.12); }
@keyframes pulse { 50% { opacity: .45; } }

.icon-button, .primary-button, .secondary-button, .label-library-button, .grid-button, .text-button, .collapsible-title, .dialog-close, .drawer-close, .danger-button, .add-project-wide, .add-card, .project-menu-button, .card, .height-preset, .menu-danger, .file-download, .file-remove, .drawer-label-option, .label-row-delete, .card-label, .card-label-add, .filter-label-option, .card-popover-option, .card-popover-manage {
  border: 0;
  cursor: pointer;
}

.icon-button { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 13px; background: rgba(255, 255, 255, 0.82); font-size: 18px; }
.label-library-button { min-height: 40px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255, 255, 255, 0.82); font-size: 10px; font-weight: 700; }
.label-library-button i { width: 9px; height: 9px; border-radius: 4px; background: linear-gradient(135deg, var(--blue) 0 50%, var(--violet) 50%); transform: rotate(45deg); }
.label-filter-wrap { position: relative; }
.label-library-button[aria-expanded="true"] { border-color: var(--blue); background: #eef4ff; }
.toolbar-count { min-width: 17px; padding: 2px 5px; border-radius: 99px; color: #1a5bc9; background: #e7efff; font-size: 8px; }
.grid-button { min-height: 40px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255, 255, 255, 0.82); font-size: 10px; font-weight: 700; }
.grid-button i { width: 12px; height: 12px; border: 1.5px solid #747d89; border-radius: 3px; background: linear-gradient(90deg, transparent 43%, #747d89 43% 57%, transparent 57%), linear-gradient(transparent 43%, #747d89 43% 57%, transparent 57%); }
.grid-button[aria-pressed="true"] { border-color: var(--violet); color: #5c43c6; background: #f0ecff; }
.grid-button[aria-pressed="true"] i { border-color: var(--violet); background: linear-gradient(90deg, transparent 43%, var(--violet) 43% 57%, transparent 57%), linear-gradient(transparent 43%, var(--violet) 43% 57%, transparent 57%); }
.label-filter-popover { position: absolute; z-index: 80; top: calc(100% + 9px); right: 0; width: 280px; padding: 13px; border: 1px solid var(--line); border-radius: 15px; background: white; box-shadow: 0 20px 52px rgba(7,17,31,.18); }
.filter-popover-head { display: grid; gap: 9px; margin-bottom: 10px; }
.filter-popover-head strong { display: block; font-size: 10px; }
.filter-popover-head span { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; line-height: 1.4; }
.filter-actions { width: 100%; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.filter-actions button { min-height: 28px; padding: 4px 8px; border: 0; border-radius: 8px; color: var(--blue); background: #edf3ff; font-size: 8px; font-weight: 700; cursor: pointer; }
.filter-label-list { max-height: 290px; display: grid; gap: 5px; overflow-y: auto; scrollbar-width: thin; }
.filter-label-list.is-role-groups { gap: 12px; }
.filter-label-group { display: grid; gap: 6px; }
.filter-label-group + .filter-label-group { padding-top: 11px; border-top: 1px solid var(--line); }
.filter-label-group-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 2px; }
.filter-label-group-head strong { font-size: 8px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.filter-label-group-head span { color: var(--muted); font-size: 7.5px; font-weight: 700; }
.filter-label-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.filter-manage-button { width: 100%; min-height: 31px; margin-top: 11px; border: 1px solid var(--line); color: #344052; background: #fff; font-size: 8.5px; font-weight: 720; cursor: pointer; }
.filter-manage-button:hover { border-color: #9ca7b5; background: #f7f8f9; }
.filter-label-option { --label-color: var(--blue); width: 100%; min-height: 32px; display: grid; grid-template-columns: 15px 10px 1fr; align-items: center; gap: 7px; padding: 0 8px; border: 1px solid var(--line); border-radius: 9px; background: white; text-align: left; font-size: 8.5px; font-weight: 650; }
.filter-label-option::before { width: 13px; height: 13px; display: grid; place-items: center; content: ""; border: 1px solid #c8cdd3; border-radius: 4px; }
.filter-label-option.is-active::before { content: "✓"; color: white; border-color: var(--label-color); background: var(--label-color); font-size: 8px; }
.filter-label-option i { width: 8px; height: 8px; border-radius: 3px; background: var(--label-color); }
.primary-button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 15px; border-radius: 13px; color: white; background: var(--ink); box-shadow: 0 9px 22px rgba(7, 17, 31, 0.16); font-size: 12px; font-weight: 700; }
.secondary-button { min-height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: 13px; background: white; font-size: 12px; font-weight: 650; }
.avatar { width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center; border: 2px solid rgba(255,255,255,.9); border-radius: 50%; color: white; background: linear-gradient(150deg, #8469ff, #3d55d7); box-shadow: 0 7px 18px rgba(51, 64, 149, 0.2); font-size: 12px; font-weight: 700; }

main { padding: 18px 28px 70px; transition: padding-right 0.24s ease; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.page-heading h1 { margin: 0 0 6px; font-family: var(--font-display); font-size: clamp(28px, 2.4vw, 36px); font-weight: 760; line-height: 1.05; letter-spacing: -0.045em; }
.page-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.summary { display: flex; align-items: center; gap: 15px; }
.summary-item { display: grid; gap: 2px; padding-left: 15px; border-left: 1px solid var(--line-strong); }
.summary-item:first-child { border-left: 0; }
.summary-item strong { font-size: 14px; }
.summary-item span { color: var(--muted); font-size: 9px; white-space: nowrap; }

.project-stack { display: grid; gap: 18px; }
.project {
  --project-accent: var(--blue);
  position: relative;
  overflow: visible;
  border: 1px solid rgba(7, 17, 31, 0.09);
  border-left: 6px solid var(--project-accent);
  border-radius: 23px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: var(--shadow-soft);
}
.project-head { position: relative; z-index: 8; min-height: 50px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 7px 12px 7px 16px; border-radius: 23px 23px 0 0; border-bottom: 1px solid rgba(7, 17, 31, 0.08); background: rgba(255, 255, 255, 0.82); }
.project-title-wrap { min-width: 0; flex: 1; display: flex; align-items: center; gap: 9px; }
.project-glyph { width: 32px; height: 32px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; color: var(--project-accent); background: color-mix(in srgb, var(--project-accent) 12%, white); font-family: var(--font-display); font-size: 15px; font-weight: 760; text-transform: uppercase; }
.project-name { min-width: 80px; width: min(620px, 100%); height: 30px; overflow: hidden; margin: 0; padding: 0 7px; border: 1px solid transparent; border-radius: 8px; outline: 0; color: var(--ink); background: transparent; font-size: 14px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; transition: border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.project-name:hover { background: rgba(255,255,255,.72); }
.project-name:focus { border-color: color-mix(in srgb, var(--project-accent) 40%, var(--line)); background: white; box-shadow: 0 0 0 3px color-mix(in srgb, var(--project-accent) 12%, transparent); }
.project-tools { position: relative; display: flex; align-items: center; gap: 8px; }
.project-menu-button { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: white; }
.project-menu-button::before { width: 7px; height: 7px; content: ""; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .18s ease; }
.project.is-menu-open .project-menu-button::before { transform: translateY(2px) rotate(225deg); }

.project-popover { position: absolute; z-index: 20; top: calc(100% + 8px); right: 0; width: 300px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: 0 20px 52px rgba(7,17,31,.18); }
.popover-title { margin: 0 0 11px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.project-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.project-stat { display: grid; gap: 3px; padding: 10px; border-radius: 11px; background: #f5f5f3; }
.project-stat strong { font-size: 15px; }
.project-stat span { color: var(--muted); font-size: 8px; }
.popover-section { padding-top: 13px; margin-top: 13px; border-top: 1px solid var(--line); }
.height-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.height-preset { height: 34px; border: 1px solid var(--line); border-radius: 9px; background: white; font-size: 9px; font-weight: 650; }
.height-preset.is-active { border-color: var(--project-accent); color: color-mix(in srgb, var(--project-accent) 75%, var(--ink)); background: color-mix(in srgb, var(--project-accent) 8%, white); }
.menu-danger { width: 100%; min-height: 34px; border-radius: 9px; color: #a44240; background: #fdebea; font-size: 9px; font-weight: 650; }

.project-board { height: var(--board-height, 340px); overflow: auto; border-radius: 0 0 22px 22px; scrollbar-color: rgba(7, 17, 31, 0.28) rgba(7, 17, 31, 0.045); scrollbar-width: thin; }
.project-board::-webkit-scrollbar { width: 9px; height: 9px; }
.project-board::-webkit-scrollbar-track { background: rgba(7, 17, 31, 0.045); }
.project-board::-webkit-scrollbar-thumb { border: 2px solid rgba(255,255,255,.45); border-radius: 99px; background: rgba(7, 17, 31, 0.25); }
.columns { min-width: 980px; min-height: calc(var(--board-height, 340px) + 70px); display: grid; grid-template-columns: repeat(5, minmax(178px, 1fr)); gap: 9px; padding: 10px 12px 22px 16px; }

.column { --status: var(--blue); min-width: 0; align-self: stretch; overflow: hidden; border: 1px solid rgba(7, 17, 31, 0.07); border-radius: 15px; background: rgba(248, 248, 247, 0.86); }
.column[data-status="consider"] { --status: var(--amber); }
.column[data-status="doing"] { --status: var(--violet); }
.column[data-status="questions"] { --status: var(--coral); }
.column[data-status="done"] { --status: var(--emerald); }
.column-head { position: sticky; z-index: 5; top: 0; min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 7px; padding: 5px 9px; border-top: 3px solid var(--status); border-bottom: 1px solid rgba(7, 17, 31, 0.07); background: color-mix(in srgb, var(--status) 7%, white); backdrop-filter: blur(10px); }
.column-title { min-width: 0; display: flex; align-items: center; gap: 7px; font-size: 10px; font-weight: 700; }
.status-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--status); box-shadow: 0 0 0 3px color-mix(in srgb, var(--status) 16%, transparent); }
.column-count { min-width: 18px; padding: 2px 5px; border-radius: 99px; color: color-mix(in srgb, var(--status) 80%, #07111f); background: color-mix(in srgb, var(--status) 13%, white); text-align: center; font-size: 8px; font-weight: 700; }
.card-list { position: relative; min-height: 70px; display: grid; align-content: start; gap: 7px; padding: 8px; }
.card-list.is-drop-target { border-radius: 11px; background: color-mix(in srgb, var(--status) 8%, transparent); }

.card { position: relative; width: 100%; display: grid; gap: 8px; padding: 10px 10px 11px; border: 1px solid rgba(7, 17, 31, 0.08); border-radius: 11px; color: var(--ink); background: white; box-shadow: var(--shadow-card); text-align: left; cursor: grab; transform-origin: top; transition: padding-bottom .18s ease, border-color .16s ease, box-shadow .16s ease, opacity .16s ease; }
.card:hover { padding-bottom: 15px; border-color: color-mix(in srgb, var(--status) 35%, transparent); box-shadow: 0 10px 24px rgba(7, 17, 31, 0.09); }
.card:active { cursor: grabbing; }
.card.is-dragging { position: absolute; opacity: 0; pointer-events: none; transform: none; }
.card.is-selected { border-color: var(--status); box-shadow: 0 0 0 2px color-mix(in srgb, var(--status) 13%, transparent), 0 10px 26px rgba(7,17,31,.09); }
.card.is-urgent { border: 2px solid #ff3030; box-shadow: 0 0 0 3px rgba(255,48,48,.12), 0 8px 22px rgba(164,28,28,.15); }
.card.is-urgent:hover { border-color: #ff2020; box-shadow: 0 0 0 4px rgba(255,48,48,.15), 0 11px 28px rgba(164,28,28,.2); }
.card-labels { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding-right: 17px; }
.card-labels:not(:has(.card-label)) { display: none; }
.card-label { --label-color: var(--blue); max-width: 120px; overflow: hidden; padding: 3px 6px; border-radius: 5px; color: color-mix(in srgb, var(--label-color) 78%, #07111f); background: color-mix(in srgb, var(--label-color) 12%, white); font-size: 8px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.card-label-add { display: none; padding: 2px 5px; border: 1px dashed var(--line-strong); border-radius: 5px; color: var(--muted); background: white; font-size: 8px; }
.card:hover .card-labels:has(.card-label), .card-labels:focus-within { display: flex; }
.card:hover .card-label-add, .card-labels:focus-within .card-label-add { display: inline-flex; }
.card h3 { margin: 0; padding-right: 13px; font-size: 10.5px; font-weight: 650; line-height: 1.35; }
.card-subtitle { display: -webkit-box; overflow: hidden; margin: -2px 0 0; color: var(--muted); font-size: 8.5px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.card-subtitle.is-empty { display: none; }
.card-footer { display: flex; align-items: center; justify-content: flex-start; gap: 7px; color: #808792; font-size: 8px; }
.due { padding: 3px 5px; border-radius: 5px; color: #68717d; background: #f2f3f4; font-size: 7.5px; font-weight: 700; }
.due.is-overdue { color: #a44240; background: #fdeae9; }
.due.is-done { color: #147849; background: #e4f7ec; }
.card-placeholder { width: 100%; min-height: 62px; contain: layout paint; border: 2px dashed color-mix(in srgb, var(--status) 58%, #8390a0); border-radius: 11px; background: color-mix(in srgb, var(--status) 7%, white); box-shadow: inset 0 0 0 3px rgba(255,255,255,.6); pointer-events: none; }

body.grid-mode .card-list { gap: 6px; padding: 7px; }
body.grid-mode .card { height: 92px; min-height: 92px; grid-template-rows: 15px 15px 12px 18px; align-content: start; gap: 5px; padding: 7px 10px 8px; }
body.grid-mode .card:hover { padding-bottom: 8px; }
body.grid-mode .card .card-labels { min-width: 0; min-height: 15px; display: flex; flex-wrap: nowrap; overflow: hidden; white-space: nowrap; }
body.grid-mode .card-label { flex: 0 0 auto; }
body.grid-mode .card-label-add { display: none; }
body.grid-mode .card h3, body.grid-mode .card-subtitle { display: block; overflow: hidden; margin: 0; text-overflow: ellipsis; white-space: nowrap; }
body.grid-mode .card-subtitle.is-empty { display: block; visibility: hidden; }
body.grid-mode .card-footer { min-height: 18px; }

.add-card { width: calc(100% - 16px); min-height: 32px; display: flex; align-items: center; gap: 6px; margin: 0 8px 8px; padding: 0 9px; border: 1px dashed rgba(7, 17, 31, 0.15); border-radius: 9px; color: #67717d; background: rgba(255,255,255,.64); font-size: 9px; font-weight: 650; }
.project-resize { position: absolute; z-index: 7; right: 50%; bottom: -5px; width: 62px; height: 12px; border: 0; border-radius: 99px; background: transparent; cursor: ns-resize; transform: translateX(50%); touch-action: none; }
.project-resize::after { position: absolute; width: 36px; height: 4px; inset: 4px auto auto 13px; content: ""; border-radius: 99px; background: rgba(7,17,31,.2); transition: background .16s ease, width .16s ease, left .16s ease; }
.project-resize:hover::after, .project.is-resizing .project-resize::after { width: 46px; left: 8px; background: var(--project-accent); }

.add-project-wide { width: 100%; min-height: 66px; display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 18px; border: 1px dashed rgba(7, 17, 31, .17); border-radius: 20px; color: #68717d; background: rgba(255,255,255,.34); font-size: 12px; font-weight: 650; }
.empty-state { display: grid; place-items: center; gap: 10px; min-height: 260px; padding: 36px; border: 1px dashed var(--line-strong); border-radius: 22px; background: rgba(255,255,255,.5); text-align: center; }
.empty-state strong { font-family: var(--font-display); font-size: 23px; }
.empty-state span { color: var(--muted); font-size: 11px; }

.drawer { position: fixed; z-index: 60; inset: 0 0 0 auto; width: var(--drawer-width); display: grid; grid-template-rows: auto 1fr; border-left: 1px solid rgba(7,17,31,.12); background: white; box-shadow: -24px 0 70px rgba(7,17,31,.14); transform: translateX(105%); transition: transform .24s ease; }
body.drawer-open .drawer { transform: translateX(0); }
.drawer-head { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.drawer-breadcrumb { min-width: 0; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 9px; font-weight: 600; }
.drawer-breadcrumb > span:first-child { overflow: hidden; max-width: 175px; text-overflow: ellipsis; white-space: nowrap; }
.drawer-status-pill { --pill: var(--violet); display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 99px; color: color-mix(in srgb, var(--pill) 75%, var(--ink)); background: color-mix(in srgb, var(--pill) 12%, white); font-size: 8.5px; font-weight: 700; }
.drawer-status-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--pill); }
.drawer-close { width: 35px; height: 35px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 11px; color: #66707c; background: #f3f4f4; font-size: 23px; line-height: 1; }
.drawer-scroll { overflow-y: auto; padding: 19px 22px 28px; scrollbar-color: rgba(7,17,31,.22) transparent; scrollbar-width: thin; }
.field-label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.drawer-title-input { width: 100%; padding: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-family: var(--font-display); font-size: 25px; font-weight: 730; line-height: 1.12; letter-spacing: -0.035em; }
.subtitle-label { margin-top: 18px; }
.drawer-subtitle-input { width: 100%; height: 39px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; outline: 0; color: #44505e; background: #fafaf9; font-size: 10px; }
.drawer-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 18px 0 4px; }
.drawer-meta-field { display: grid; gap: 6px; }
.drawer-meta-field span { color: var(--muted); font-size: 8px; font-weight: 700; text-transform: uppercase; }
.drawer-meta-field select, .drawer-meta-field input { width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fafaf9; font-size: 9.5px; }
.urgent-toggle { grid-column: 1 / -1; display: grid; grid-template-columns: 20px 1fr; align-items: center; gap: 9px; min-height: 48px; padding: 8px 10px; border: 1px solid rgba(255,48,48,.2); border-radius: 11px; background: #fff7f7; cursor: pointer; }
.urgent-toggle input { position: absolute; opacity: 0; }
.urgent-toggle i { width: 20px; height: 20px; display: grid; place-items: center; border: 1.5px solid #ef8c8c; border-radius: 6px; background: white; }
.urgent-toggle input:checked + i { border-color: #ff3030; background: #ff3030; }
.urgent-toggle input:checked + i::after { content: "✓"; color: white; font-size: 11px; font-style: normal; font-weight: 800; }
.urgent-toggle span { display: grid; gap: 2px; }
.urgent-toggle strong { color: #b72d2b; font-size: 9.5px; }
.urgent-toggle small { color: #9c6767; font-size: 7.8px; }
.card-label-section { padding: 17px 0 18px; }
.text-button { padding: 0; color: var(--blue); background: transparent; font-size: 8.5px; font-weight: 700; }
.collapsible-title { display: inline-flex; align-items: center; gap: 7px; padding: 0; background: transparent; }
.collapsible-title h2 { margin: 0; font-size: 11px; }
.collapsible-title i { width: 6px; height: 6px; margin-top: -3px; border-right: 1.3px solid var(--muted); border-bottom: 1.3px solid var(--muted); transform: rotate(45deg); transition: transform .16s ease, margin .16s ease; }
.collapsible-title[aria-expanded="true"] i { margin-top: 3px; transform: rotate(225deg); }
.drawer-label-list { display: flex; flex-wrap: wrap; gap: 7px; }
.drawer-label-option { --label-color: var(--blue); min-height: 30px; display: inline-flex; align-items: center; gap: 6px; padding: 0 9px; border: 1px solid color-mix(in srgb, var(--label-color) 18%, var(--line)); border-radius: 8px; color: color-mix(in srgb, var(--label-color) 76%, #07111f); background: color-mix(in srgb, var(--label-color) 7%, white); font-size: 8.5px; font-weight: 700; }
.drawer-label-option::before { width: 7px; height: 7px; content: ""; border: 1.5px solid var(--label-color); border-radius: 2px; background: white; }
.drawer-label-option.is-active { border-color: var(--label-color); background: color-mix(in srgb, var(--label-color) 15%, white); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--label-color) 15%, transparent); }
.drawer-label-option.is-active::before { border-color: var(--label-color); background: var(--label-color); box-shadow: inset 0 0 0 2px white; }
.drawer-label-chip { --label-color: var(--blue); padding: 4px 7px; border-radius: 6px; color: color-mix(in srgb, var(--label-color) 78%, #07111f); background: color-mix(in srgb, var(--label-color) 12%, white); font-size: 8.5px; font-weight: 700; }
.drawer-section { padding: 18px 0; border-top: 1px solid var(--line); }
.drawer-section:first-of-type { margin-top: 16px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.section-title h2 { margin: 0; font-size: 11px; font-weight: 700; }
.section-title span { color: #8b929b; font-size: 8.5px; }
.description-section { position: relative; }
.rich-editor-shell { position: relative; overflow: visible; border: 1px solid var(--line); border-radius: 13px; background: #fafaf9; transition: border-color .16s ease, box-shadow .16s ease, background .16s ease; }
.rich-editor-shell:focus-within { border-color: rgba(36,107,254,.42); background: white; box-shadow: 0 0 0 3px rgba(36,107,254,.08); }
.editor-toolbar { min-height: 44px; display: flex; align-items: center; gap: 4px; padding: 5px 7px; border-bottom: 1px solid var(--line); background: rgba(245,246,246,.88); border-radius: 12px 12px 0 0; }
.editor-toolbar button { width: 34px; height: 32px; display: grid; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 9px; color: #59636f; background: transparent; font-size: 15px; line-height: 1; cursor: pointer; }
.editor-toolbar button:hover, .editor-toolbar button.is-active { border-color: #d8dce1; color: var(--ink); background: white; box-shadow: 0 2px 7px rgba(7,17,31,.06); }
.editor-toolbar-separator { width: 1px; height: 22px; margin: 0 4px; background: #d9dde1; }
.editor-glyph { width: 18px; height: 18px; display: grid; place-items: center; font-family: Arial, sans-serif; font-size: 15px; line-height: 18px; }
.editor-glyph.is-bold { font-weight: 800; }
.editor-glyph.is-italic { padding-right: 2px; font-family: Georgia, serif; font-style: italic; font-weight: 700; }
.editor-glyph.is-strike { font-weight: 600; text-decoration: line-through; text-decoration-thickness: 1.6px; }
.editor-glyph.is-underline { font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.6px; text-underline-offset: 2px; }
.editor-link-glyph { position: relative; width: 19px; height: 18px; display: block; }
.editor-link-glyph::before, .editor-link-glyph::after { position: absolute; top: 6px; width: 10px; height: 5px; content: ""; border: 1.7px solid currentColor; border-radius: 6px; transform: rotate(-40deg); }
.editor-link-glyph::before { left: 0; }
.editor-link-glyph::after { right: 0; }
.editor-emoji-fallback { width: 18px; height: 18px; display: grid; place-items: center; font-size: 18px; line-height: 1; }
.editor-toolbar #editorEmojiButton .apple-emoji { width: 18px; height: 18px; margin: 0; vertical-align: 0; }
.description-editor { width: 100%; min-height: 150px; max-height: 340px; overflow-y: auto; padding: 12px 13px 16px; border: 0; border-radius: 0 0 12px 12px; outline: 0; color: #3f4956; background: transparent; font-size: 10.5px; line-height: 1.62; white-space: pre-wrap; overflow-wrap: anywhere; scrollbar-width: thin; }
.description-editor:empty::before { content: attr(data-placeholder); color: #9aa1aa; pointer-events: none; }
.description-editor a { color: var(--blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.description-editor img, .description-editor .apple-emoji { user-select: all; }
.editor-link-popover { position: absolute; z-index: 31; top: 43px; left: 8px; width: min(320px, calc(100% - 16px)); padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: 0 15px 38px rgba(7,17,31,.16); }
.editor-link-popover > label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 8px; font-weight: 700; text-transform: uppercase; }
.editor-link-popover > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.editor-link-popover input { min-width: 0; height: 34px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 9px; outline: 0; font-size: 9.5px; }
.editor-link-popover input:focus { border-color: rgba(36,107,254,.55); box-shadow: 0 0 0 3px rgba(36,107,254,.08); }
.editor-link-popover button { min-height: 34px; padding: 0 11px; border-radius: 9px; color: white; background: var(--ink); font-size: 8.5px; font-weight: 700; }
.editor-link-popover .editor-link-remove { width: 100%; min-height: 28px; margin-top: 6px; color: #8d4745; background: #fdebea; }
.emoji-picker { position: absolute; z-index: 30; top: 43px; right: 8px; width: min(366px, calc(100% - 16px)); overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 18px 48px rgba(7,17,31,.2); }
.emoji-picker-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 7px; padding: 9px; border-bottom: 1px solid var(--line); }
.emoji-picker-head label { height: 34px; display: flex; align-items: center; gap: 7px; padding: 0 9px; border: 1px solid var(--line); border-radius: 10px; background: #f7f7f6; }
.emoji-picker-head label .search-icon { width: 12px; height: 12px; }
.emoji-picker-head input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; font-size: 9.5px; }
.emoji-picker-head > button { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: #6d7580; background: #f1f2f2; font-size: 17px; }
.emoji-categories { display: flex; gap: 3px; overflow-x: auto; padding: 7px 8px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.emoji-categories::-webkit-scrollbar { display: none; }
.emoji-category { width: 29px; height: 29px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid transparent; border-radius: 8px; color: #7b838d; background: transparent; font-size: 14px; }
.emoji-category:hover, .emoji-category.is-active { border-color: #dbe3f3; background: #eef3ff; }
.emoji-grid { height: 246px; display: grid; grid-template-columns: repeat(8, 1fr); align-content: start; gap: 3px; overflow-y: auto; padding: 8px; scrollbar-width: thin; }
.emoji-option { min-width: 0; height: 36px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 9px; background: transparent; }
.emoji-option:hover, .emoji-option:focus-visible { border-color: #dce2e9; background: #f3f5f7; outline: 0; transform: scale(1.06); }
.emoji-option .apple-emoji { width: 25px; height: 25px; }
.emoji-picker-foot { min-height: 30px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 10px; border-top: 1px solid var(--line); color: #8a929c; font-size: 7.5px; }
.apple-emoji { display: inline-block; width: 1.2em; height: 1.2em; margin: 0 .03em; background-image: url("assets/emoji/apple/apple-emoji-32.png"); background-repeat: no-repeat; background-size: 6200% 6200%; background-position: var(--emoji-position-x) var(--emoji-position-y); vertical-align: -.22em; }
.file-list { display: grid; gap: 7px; }
.file-row { display: grid; grid-template-columns: 35px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 9px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.file-icon { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; color: #235fc6; background: #eaf2ff; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.file-copy { min-width: 0; display: grid; gap: 2px; }
.file-copy strong { overflow: hidden; font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
.file-copy span { color: var(--muted); font-size: 8px; }
.file-actions { display: flex; gap: 3px; }
.file-download, .file-remove { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; color: #68717c; background: #f2f3f3; font-size: 12px; }
.file-remove { color: #a44240; }
.file-add { width: 100%; min-height: 38px; display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 8px; border: 1px dashed rgba(7,17,31,.18); border-radius: 11px; color: #66707b; background: #fafaf9; cursor: pointer; font-size: 9.5px; font-weight: 650; }
.empty-copy { padding: 13px; border-radius: 11px; color: var(--muted); background: #f7f7f5; text-align: center; font-size: 9px; }
.danger-button { width: 100%; min-height: 38px; margin-top: 4px; border-radius: 11px; color: #a44240; background: #fdebea; font-size: 9.5px; font-weight: 700; }

.app-dialog { width: min(520px, calc(100% - 32px)); padding: 0; border: 0; border-radius: 23px; color: var(--ink); background: white; box-shadow: 0 30px 90px rgba(7,17,31,.25); }
.app-dialog::backdrop { background: rgba(7,17,31,.36); backdrop-filter: blur(4px); }
.app-dialog form { padding: 22px; }
.dialog-head { display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.dialog-head h2 { margin: 5px 0 0; font-family: var(--font-display); font-size: 25px; letter-spacing: -.035em; }
.eyebrow { color: var(--blue); font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.dialog-close { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 11px; background: #f2f3f3; font-size: 23px; }
.dialog-field { display: grid; gap: 7px; margin-top: 22px; }
.dialog-field span, .color-picker legend { color: var(--muted); font-size: 9px; font-weight: 700; }
.dialog-field input { height: 45px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 12px; outline: 0; font-size: 12px; }
.color-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin: 18px 0 0; padding: 0; border: 0; }
.color-picker legend { margin-bottom: 8px; }
.color-picker label { position: relative; display: grid; justify-items: center; gap: 5px; padding: 9px 5px; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; font-size: 8px; }
.color-picker input { position: absolute; opacity: 0; }
.color-picker i { width: 22px; height: 22px; border-radius: 50%; background: var(--swatch); box-shadow: 0 0 0 3px white, 0 0 0 4px transparent; }
.color-picker input:checked + i { box-shadow: 0 0 0 3px white, 0 0 0 4px var(--swatch); }
.color-picker label:has(input:checked) { background: #f7f7f5; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }

.confirm-dialog { width: min(420px, calc(100% - 32px)); }
.confirm-dialog form { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 14px; padding: 24px; text-align: left; }
.confirm-icon { width: 42px; height: 42px; display: grid; place-items: center; margin: 0; border-radius: 15px; color: #b72d2b; background: #fdebea; box-shadow: inset 0 0 0 1px rgba(183,45,43,.08); font-family: var(--font-display); font-size: 21px; font-weight: 800; }
.confirm-copy p { max-width: none; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }

.task-context-menu {
  position: fixed;
  z-index: 260;
  width: 190px;
  padding: 5px;
  border: 1px solid #cfd7e2;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(7, 17, 31, .15);
}
.task-context-menu > span {
  display: block;
  padding: 7px 9px 6px;
  color: #7a8595;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
}
.task-context-menu button {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 9px;
  border: 0;
  border-radius: 2px;
  background: #fff;
  color: #172336;
  font-size: 10px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}
.task-context-menu button:hover,
.task-context-menu button:focus-visible { outline: 0; background: #f4f6f8; }
.task-context-menu button:disabled { color: #a7afbb; cursor: default; background: #fff; }
.task-context-menu button.is-danger { color: #c72e39; }
.task-context-menu button.is-danger:hover { background: #fff3f3; }
.task-context-menu button i { width: 14px; font-size: 14px; }

.card.is-task-selected {
  outline: 2px solid #246bfe;
  outline-offset: -3px;
  box-shadow: 0 0 0 1px rgba(36, 107, 254, .16);
}
.task-marquee-box {
  position: fixed;
  z-index: 255;
  pointer-events: none;
  border: 1px solid #246bfe;
  background: rgba(36, 107, 254, .1);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .65) inset;
}
body.task-marquee-active,
body.task-marquee-active * { cursor: crosshair !important; user-select: none !important; }
.confirm-actions { grid-column: 1 / -1; width: 100%; justify-content: stretch; margin-top: 8px; }
.confirm-actions > * { flex: 1; }
.confirm-danger-button { min-height: 40px; padding: 0 16px; border: 0; border-radius: 13px; color: white; background: #c83d3a; box-shadow: 0 9px 22px rgba(164,28,28,.18); font-size: 11px; font-weight: 700; cursor: pointer; }
.confirm-danger-button:hover { background: #b63331; }

.labels-dialog { width: min(650px, calc(100% - 32px)); }
.labels-dialog-content { padding: 22px; }
.labels-dialog .dialog-head p { max-width: 410px; margin: 7px 0 0; color: var(--muted); font-size: 9.5px; line-height: 1.5; }
.label-manager-list { max-height: min(420px, 52vh); display: grid; gap: 7px; overflow-y: auto; margin-top: 20px; padding-right: 3px; scrollbar-width: thin; }
.label-manager-row { --label-color: var(--blue); display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: #fafaf9; }
.label-color-input { width: 34px; height: 34px; overflow: hidden; padding: 0; border: 0; border-radius: 10px; background: var(--label-color); cursor: pointer; }
.label-color-input::-webkit-color-swatch-wrapper { padding: 0; }
.label-color-input::-webkit-color-swatch { border: 0; border-radius: 9px; }
.label-name-input { min-width: 0; height: 34px; padding: 0 10px; border: 1px solid transparent; border-radius: 8px; outline: 0; background: transparent; font-size: 10px; font-weight: 650; }
.label-name-input:hover, .label-name-input:focus { border-color: var(--line); background: white; }
.label-row-delete { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; color: #a44240; background: #fdebea; font-size: 17px; }
.label-create-form { display: grid; grid-template-columns: minmax(0, 1fr) 75px auto; align-items: end; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.label-create-form label { display: grid; gap: 6px; }
.performer-manager-group { display: grid; gap: 8px; }
.performer-manager-group + .performer-manager-group { margin-top: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.performer-manager-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.performer-manager-head strong { font-size: 9px; letter-spacing: .055em; text-transform: uppercase; }
.performer-manager-head span { color: var(--muted); font-size: 8px; }
.performer-manager-list { display: grid; gap: 6px; }
.performer-manager-row { grid-template-columns: 12px minmax(0, 1fr) auto; padding: 6px 8px; }
.performer-color-mark { width: 8px; height: 8px; background: var(--performer-color); }
.performer-system-mark { padding: 0 5px; color: #8a93a0; font-size: 7px; }
.performer-create-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
.performer-create-form input { min-width: 0; height: 36px; padding: 0 10px; border: 1px solid var(--line); outline: none; background: #fff; font-size: 9px; }
.performer-create-form input:focus { border-color: var(--performer-color); }
.performer-create-form .primary-button { min-height: 36px; background: var(--performer-color); box-shadow: none; font-size: 9px; }
.label-create-form label > span { color: var(--muted); font-size: 8.5px; font-weight: 700; }
.label-create-form input[type="text"] { height: 40px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 11px; outline: 0; font-size: 10px; }
.label-color-field input { width: 75px; height: 40px; padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: white; cursor: pointer; }

.card-label-popover { position: fixed; z-index: 95; width: 270px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 20px 52px rgba(7,17,31,.2); }
.card-popover-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.card-popover-title strong { font-size: 10px; }
.card-popover-title span { color: var(--muted); font-size: 7.5px; }
.card-popover-list { max-height: 230px; display: grid; gap: 5px; overflow-y: auto; scrollbar-width: thin; }
.card-popover-option { --label-color: var(--blue); min-height: 32px; display: grid; grid-template-columns: 14px 9px 1fr; align-items: center; gap: 7px; padding: 0 8px; border: 1px solid var(--line); border-radius: 9px; background: white; text-align: left; font-size: 8.5px; font-weight: 650; }
.card-popover-option::before { width: 12px; height: 12px; content: ""; border: 1px solid #c8cdd3; border-radius: 4px; }
.card-popover-option.is-active::before { content: "✓"; display: grid; place-items: center; color: white; border-color: var(--label-color); background: var(--label-color); font-size: 7px; }
.card-popover-option i { width: 8px; height: 8px; border-radius: 3px; background: var(--label-color); }
.card-popover-manage { width: 100%; min-height: 34px; margin-top: 9px; border-top: 1px solid var(--line); border-radius: 9px; color: var(--blue); background: #edf3ff; font-size: 8.5px; font-weight: 700; }

.toast-region { position: fixed; z-index: 100; right: 18px; bottom: 18px; display: grid; gap: 8px; pointer-events: none; }
.toast { max-width: 330px; padding: 11px 14px; border-radius: 12px; color: white; background: var(--ink); box-shadow: 0 12px 32px rgba(7,17,31,.23); font-size: 10px; animation: toast-in .2s ease both; }
.toast.is-error { background: #9d3837; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* Dispatcher redesign — flat, dense and intentionally technical. */
:root {
  --cream: #f8f9fa;
  --paper: #ffffff;
  --muted: #6d7785;
  --line: #dce1e7;
  --line-strong: #cbd2da;
  --blue: #246bfe;
  --amber: #f2a62b;
  --violet: #246bfe;
  --coral: #ef525f;
  --emerald: #20aa67;
  --shadow-soft: none;
  --shadow-card: 0 1px 2px rgba(7, 17, 31, 0.035);
}

body {
  background: #fbfbfa;
}

.topbar {
  height: 82px;
  grid-template-columns: max-content minmax(300px, 630px) minmax(0, 1fr);
  gap: 22px;
  padding: 0 22px;
  border: 0;
  background: #fff;
  backdrop-filter: none;
}

body.drawer-open .topbar { padding-right: calc(var(--drawer-width) + 22px); }

.brand { gap: 10px; }
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 5px;
  box-shadow: none;
}
.brand-name { font-size: 24px; font-weight: 780; }
.brand-caption { display: none; }

.search {
  max-width: 630px;
  justify-self: start;
  height: 46px;
  gap: 11px;
  padding: 0 13px;
  border-color: #d6dce3;
  border-radius: 5px;
  background: #fff;
  box-shadow: none;
}
.search-icon {
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  color: #667283;
  font-size: 19px;
  line-height: 1;
}
.search-icon::after { display: none; }
.search input { font-size: 13px; }
.search kbd {
  padding: 3px 6px;
  border-radius: 4px;
  background: #fbfbfa;
  font-size: 9px;
}

.top-actions { gap: 9px; }
.save-state { gap: 8px; color: #536071; font-size: 10.5px; }
.save-state i { width: 7px; height: 7px; box-shadow: 0 0 0 3px rgba(32, 170, 103, 0.1); }

.icon-button,
.label-library-button,
.grid-button {
  min-height: 42px;
  border-color: #d8dde4;
  border-radius: 5px;
  background: #fff;
  box-shadow: none;
}
.icon-button { width: 42px; height: 42px; font-size: 17px; }
.label-library-button,
.grid-button { gap: 7px; padding: 0 12px; font-size: 10px; }
.label-library-button > i,
.grid-button > i {
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  color: #344155;
  background: none;
  font-size: 16px;
  line-height: 1;
  transform: none;
}
.label-library-button[aria-expanded="true"],
.grid-button[aria-pressed="true"] {
  border-color: #9eb9f5;
  color: #174fae;
  background: #f5f8ff;
}
.grid-button[aria-pressed="true"] > i { border: 0; color: var(--blue); background: none; }
.toolbar-count {
  min-width: auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  font-size: 8px;
}
.primary-button {
  min-height: 42px;
  gap: 7px;
  padding: 0 14px;
  border-radius: 5px;
  box-shadow: none;
  font-size: 11px;
}
.primary-button > i { font-size: 15px; }
.avatar {
  width: 42px;
  height: 42px;
  border: 1px solid #d8dde4;
  border-radius: 5px;
  color: #0d1a2d;
  background: #fff;
  box-shadow: none;
  font-size: 11px;
}

.label-filter-popover,
.project-popover {
  border-color: #cfd5dc;
  border-radius: 6px;
  box-shadow: 0 18px 46px rgba(7, 17, 31, 0.14);
}
.filter-actions button,
.filter-label-option,
.height-preset,
.menu-danger { border-radius: 4px; }

main { padding: 12px 20px 48px; }
.project-stack { min-width: 0; gap: 0; }

.project {
  min-width: 0;
  width: 100%;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.project-head {
  min-height: 62px;
  padding: 9px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: grab;
}
.project-head:active { cursor: grabbing; }
.project-head input,
.project-head button { cursor: revert; }
.project-reordering,
.project-reordering * {
  cursor: grabbing !important;
  user-select: none !important;
}
.project.is-project-dragging {
  opacity: .24;
  filter: saturate(.55);
}
.project-drag-placeholder {
  position: relative;
  height: 12px;
  margin: -1px 0;
  border: 1px dashed #7c8796;
  background: rgba(36, 107, 254, .055);
  pointer-events: none;
}
.project-drag-placeholder::before {
  position: absolute;
  top: 50%;
  left: -1px;
  width: 42px;
  height: 2px;
  content: "";
  background: #246bfe;
  transform: translateY(-50%);
}
.project-title-wrap { gap: 0; }
.project-glyph { display: none; }
.project-name {
  width: min(720px, 100%);
  height: 38px;
  padding: 0;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.012em;
}
.project-name:hover { background: transparent; }
.project-name:focus {
  padding-inline: 8px;
  border-color: #9eb9f5;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(36, 107, 254, 0.09);
}
.project-menu-button {
  width: 34px;
  height: 34px;
  border-color: #d6dce3;
  border-radius: 5px;
  color: #203047;
  background: #fff;
  font-size: 17px;
}
.project-menu-button::before { display: none; }
.project-menu-button > i { transition: transform .18s ease; }
.project.is-menu-open .project-menu-button > i { transform: rotate(180deg); }

.project-stats { gap: 6px; }
.project-stat { border-radius: 4px; background: #f4f5f6; }
.height-preset.is-active {
  border-color: #91a8ce;
  color: #1c4d9c;
  background: #f3f7fd;
}

.project-board {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  height: var(--board-height, 340px);
  overflow: auto;
  border: 0;
  border-radius: 0;
  background: #fff;
  overscroll-behavior: contain;
  scrollbar-color: #aeb6c1 #eef0f2;
}
.project-board::-webkit-scrollbar { width: 8px; height: 8px; }
.project-board::-webkit-scrollbar-track { background: #eef0f2; }
.project-board::-webkit-scrollbar-thumb {
  border: 2px solid #eef0f2;
  border-radius: 8px;
  background: #aeb6c1;
}
.columns {
  min-width: 1040px;
  min-height: 100%;
  grid-template-columns: repeat(5, minmax(190px, 1fr));
  gap: 0;
  padding: 0;
  background: #fff;
}
.column {
  --status: #7d8796;
  min-width: 0;
  min-height: 100%;
  overflow: visible;
  border: 0;
  border-right: 1px solid #d4d9e2;
  border-bottom: 1px solid #d4d9e2;
  border-radius: 0;
  background: color-mix(in srgb, var(--status) 10%, #fff);
}
.column:first-child { border-left: 1px solid #d4d9e2; }
.column[data-status="consider"] { --status: var(--amber); }
.column[data-status="doing"] { --status: var(--blue); }
.column[data-status="questions"] { --status: var(--coral); }
.column[data-status="done"] { --status: var(--emerald); }
.column-head {
  top: 0;
  min-height: 44px;
  padding: 0 12px;
  border-top: 2px solid var(--status);
  border-bottom: 1px solid #d4d9e2;
  background: color-mix(in srgb, var(--status) 7%, #fff);
  backdrop-filter: none;
}
.column-title {
  gap: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.018em;
  text-transform: uppercase;
}
.status-dot { display: none; }
.column-count {
  min-width: auto;
  padding: 0;
  border-radius: 0;
  color: #172337;
  background: transparent;
  font-size: 9px;
}
.card-list {
  min-height: 70px;
  gap: 9px;
  padding: 10px;
}
.card-list.is-drop-target {
  border-radius: 0;
  background: color-mix(in srgb, var(--status) 11%, transparent);
}
.card {
  min-height: 60px;
  gap: 9px;
  padding: 12px 12px 13px;
  border-color: #d8dde4;
  border-radius: 4px;
  box-shadow: var(--shadow-card);
  transition: padding-bottom .18s ease, border-color .16s ease, box-shadow .16s ease, opacity .16s ease;
}
.card:hover {
  padding-bottom: 17px;
  border-color: color-mix(in srgb, var(--status) 42%, #cbd2da);
  box-shadow: 0 5px 14px rgba(7, 17, 31, 0.07);
}
.card.is-selected {
  border-color: var(--status);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--status) 12%, transparent);
}
.card.is-urgent { border: 2px solid #ff3030; }
.card-labels { gap: 7px; padding-right: 0; }
.card-label {
  max-width: 130px;
  padding: 0;
  border-radius: 0;
  color: var(--label-color);
  background: transparent;
  font-size: 8.5px;
  font-weight: 700;
}
.card-label:hover { text-decoration: underline; text-underline-offset: 2px; }
.card h3 {
  padding-right: 0;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.4;
}
.card-subtitle { padding-right: 18px; color: #687486; font-size: 8.5px; }
.card-footer { padding-right: 18px; color: #667183; }
.due {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 0;
  border-radius: 0;
  color: #5e6979;
  background: transparent;
  white-space: nowrap;
}
.due.is-overdue { color: #c73d48; background: transparent; }
.due.is-done { color: #148b52; background: transparent; }
.card-placeholder {
  min-height: 62px;
  border: 1px dashed color-mix(in srgb, var(--status) 68%, #7c8795);
  border-radius: 4px;
  background: color-mix(in srgb, var(--status) 10%, #fff);
  box-shadow: none;
}

.card:has(.card-footer) { min-height: 72px; }
.card:has(.card-label) { min-height: 108px; }

body.grid-mode .card-list { gap: 8px; padding: 9px; }
body.grid-mode .card {
  height: 96px;
  min-height: 96px;
  grid-template-rows: 14px 15px 12px 18px;
  gap: 5px;
  padding: 8px 10px;
}
body.grid-mode .card:hover { padding-bottom: 8px; }
body.grid-mode .card:has(.card-label),
body.grid-mode .card:has(.card-footer) { min-height: 96px; }

.add-card {
  width: calc(100% - 20px);
  min-height: 38px;
  margin: 0 10px 10px;
  padding: 0 11px;
  border-color: #cdd3da;
  border-radius: 4px;
  color: #657083;
  background: rgba(255, 255, 255, .62);
  font-size: 9px;
}
.add-card > i { font-size: 13px; }
.project-resize::after { height: 3px; border-radius: 2px; background: #b8bec7; }
.project-resize:hover::after,
.project.is-resizing .project-resize::after { background: #667284; }
.add-project-wide {
  min-height: 56px;
  margin-top: 14px;
  border-color: #cbd2da;
  border-radius: 0;
  color: #657083;
  background: #fff;
  font-size: 10.5px;
}
.add-project-wide > i { font-size: 14px; }

.editor-link-glyph::before {
  position: static;
  display: inline-block;
  width: auto;
  height: auto;
  content: "\eeaf";
  border: 0;
  border-radius: 0;
  transform: none;
}
.editor-link-glyph::after { display: none; }
.editor-link-glyph { display: grid; place-items: center; font-size: 18px; }

/* Card workspace — continuation of the dispatcher logbook system */
.drawer {
  --drawer-accent: var(--blue);
  border-left-color: #cbd2da;
  background: #fdfdfc;
  box-shadow: -12px 0 32px rgba(7, 17, 31, .055);
}
.drawer::before {
  position: absolute;
  z-index: 3;
  inset: 0 0 auto;
  height: 2px;
  content: "";
  background: var(--drawer-accent);
}
.drawer-head {
  min-height: 56px;
  padding: 9px 13px 8px 17px;
  border-bottom-color: #cfd5dc;
  background: #fff;
}
.drawer-breadcrumb {
  gap: 5px;
  color: #697485;
  font-size: 8px;
  font-weight: 680;
  letter-spacing: .025em;
  text-transform: uppercase;
}
.drawer-breadcrumb > span:first-child { max-width: 205px; }
.drawer-breadcrumb > .ri-arrow-right-s-line { color: #9aa2ad; font-size: 13px; }
.drawer-status-pill {
  gap: 0;
  padding: 1px 0 1px 7px;
  border-left: 2px solid var(--pill);
  border-radius: 0;
  color: color-mix(in srgb, var(--pill) 78%, #07111f);
  background: transparent;
  font-size: 8px;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.drawer-status-pill > i { display: none; }
.drawer-close {
  width: 32px;
  height: 32px;
  border: 1px solid #d4d9df;
  border-radius: 2px;
  color: #566170;
  background: #fff;
  font-size: 18px;
}
.drawer-close:hover { border-color: #aeb6c1; color: var(--ink); background: #f6f7f7; }
.drawer-scroll {
  padding: 0 18px 24px;
  scrollbar-color: #aeb5bf transparent;
}
.drawer-scroll > .field-label:first-child { margin-top: 17px; }
.field-label {
  margin-bottom: 6px;
  color: #737d8b;
  font-size: 7.5px;
  letter-spacing: .075em;
}
.drawer-title-input {
  min-height: 42px;
  padding: 0 0 8px;
  border-bottom: 1px solid #cfd5dc;
  border-radius: 0;
  font-size: 21px;
  font-weight: 740;
  line-height: 1.16;
}
.drawer-title-input:focus { border-bottom-color: var(--drawer-accent); }
.subtitle-label { margin-top: 15px; }
.drawer-subtitle-input {
  height: 36px;
  padding: 0 10px;
  border-color: #d2d7de;
  border-radius: 2px;
  background: #fff;
  font-size: 9.5px;
}
.drawer-subtitle-input:focus,
.drawer-meta-field select:focus,
.drawer-meta-field input:focus {
  border-color: var(--drawer-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--drawer-accent) 10%, transparent);
  outline: 0;
}
.drawer-meta-grid {
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 16px -18px 0;
  border-top: 1px solid #cfd5dc;
  border-bottom: 1px solid #cfd5dc;
  background: #fff;
}
.drawer-meta-field {
  gap: 5px;
  padding: 10px 18px 11px;
}
.drawer-meta-field + .drawer-meta-field { border-left: 1px solid #d9dde3; }
.drawer-meta-field span {
  color: #737d8b;
  font-size: 7.5px;
  letter-spacing: .065em;
}
.drawer-meta-field select,
.drawer-meta-field input {
  height: 32px;
  padding: 0 7px;
  border-color: #d2d7de;
  border-radius: 2px;
  background: #fbfbfa;
  font-size: 9px;
}
.drawer-time-row {
  grid-column: 1 / -1;
  min-height: 49px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  align-items: center;
  gap: 14px;
  padding: 8px 18px;
  border-top: 1px solid #d9dde3;
}
.drawer-time-toggle {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  cursor: pointer;
}
.drawer-time-toggle input { position: absolute; opacity: 0; }
.drawer-time-toggle > i {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 1px solid #aeb7c3;
  border-radius: 2px;
  background: #fff;
}
.drawer-time-toggle input:checked + i { border-color: var(--drawer-accent); background: var(--drawer-accent); }
.drawer-time-toggle input:checked + i::after { content: "✓"; color: #fff; font-size: 10px; font-style: normal; font-weight: 800; }
.drawer-time-toggle > span { display: grid; gap: 2px; }
.drawer-time-toggle strong { color: #364151; font-size: 9px; }
.drawer-time-toggle small { color: #87909d; font-size: 7.5px; }
.drawer-time-row > input[type="time"] {
  width: 104px;
  height: 32px;
  padding: 0 7px;
  border: 1px solid #d2d7de;
  border-radius: 2px;
  outline: 0;
  color: var(--ink);
  background: #fbfbfa;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}
.drawer-time-row > input[type="time"]:focus { border-color: var(--drawer-accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--drawer-accent) 10%, transparent); }
.drawer-time-row.is-disabled { background: #fafafa; }
.drawer-time-row.is-disabled .drawer-time-toggle { cursor: not-allowed; opacity: .55; }
.urgent-toggle {
  grid-column: 1 / -1;
  min-height: 46px;
  gap: 9px;
  padding: 8px 18px;
  border: 0;
  border-top: 1px solid #ead5d7;
  border-radius: 0;
  background: #fff8f8;
}
.urgent-toggle > i {
  width: 18px;
  height: 18px;
  border-width: 1px;
  border-radius: 2px;
}
.urgent-toggle strong { font-size: 9px; }
.urgent-toggle small { font-size: 7.5px; }
.card-label-section {
  margin: 0 -18px;
  padding: 14px 18px 15px;
  border-bottom: 1px solid #cfd5dc;
  background: #fff;
}
.section-title { margin-bottom: 9px; }
.section-title h2,
.collapsible-title h2 {
  font-size: 9px;
  font-weight: 760;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.section-title > span { font-size: 7.5px; }
.text-button { color: #285fb8; font-size: 8px; }
.collapsible-title { gap: 4px; }
.collapsible-title > i {
  width: auto;
  height: auto;
  margin: 0;
  border: 0;
  color: #7c8694;
  font-size: 14px;
  line-height: 1;
  transform: none;
  transition: transform .16s ease;
}
.collapsible-title[aria-expanded="true"] > i { margin: 0; transform: rotate(180deg); }
.drawer-label-list { gap: 6px; }
.drawer-label-chip {
  padding: 3px 7px 3px 6px;
  border-left: 2px solid var(--label-color);
  border-radius: 0;
  font-size: 8px;
}
.drawer-label-option {
  min-height: 28px;
  padding: 0 8px;
  border-radius: 2px;
  font-size: 8px;
}
.drawer-label-option::before { border-radius: 1px; }
.drawer-section {
  margin: 0 -18px;
  padding: 15px 18px 16px;
  border-top: 0;
  border-bottom: 1px solid #cfd5dc;
  background: #fdfdfc;
}
.drawer-section:first-of-type { margin-top: 0; }
.rich-editor-shell {
  border-color: #cfd5dc;
  border-radius: 2px;
  background: #fff;
}
.rich-editor-shell:focus-within {
  border-color: var(--drawer-accent);
  background: #fff;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--drawer-accent) 9%, transparent);
}
.editor-toolbar {
  min-height: 38px;
  gap: 2px;
  padding: 3px 5px;
  border-radius: 1px 1px 0 0;
  background: #f5f6f4;
}
.editor-toolbar button {
  width: 30px;
  height: 30px;
  border-radius: 2px;
  font-size: 14px;
}
.editor-toolbar button > [class^="ri-"] { font-size: 16px; line-height: 1; }
.editor-toolbar button:hover,
.editor-toolbar button.is-active {
  border-color: #cfd5dc;
  background: #fff;
  box-shadow: none;
}
.editor-toolbar-separator { height: 18px; margin: 0 3px; }
.editor-glyph { width: 16px; height: 16px; font-size: 14px; line-height: 16px; }
.editor-link-glyph { width: 16px; height: 16px; font-size: 16px; }
.editor-emoji-fallback { width: 17px; height: 17px; font-size: 17px; }
.editor-toolbar #editorEmojiButton .apple-emoji { width: 17px; height: 17px; }
.description-editor {
  min-height: 138px;
  padding: 11px 12px 14px;
  border-radius: 0 0 1px 1px;
  color: #3f4956;
  background: #fff;
  font-size: 10px;
  line-height: 1.58;
}
.editor-link-popover,
.emoji-picker {
  border-color: #c6cdd6;
  border-radius: 2px;
  box-shadow: 0 16px 36px rgba(7, 17, 31, .15);
}
.editor-link-popover input,
.editor-link-popover button,
.emoji-picker-head label,
.emoji-picker-head > button,
.emoji-category,
.emoji-option { border-radius: 2px; }
.emoji-picker-head,
.emoji-categories,
.emoji-picker-foot { border-color: #cfd5dc; }
.file-list { gap: 6px; }
.file-row {
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 8px;
  padding: 7px;
  border-color: #d3d8de;
  border-radius: 2px;
  box-shadow: none;
}
.file-icon {
  width: 32px;
  height: 32px;
  border-radius: 2px;
  font-size: 7.5px;
}
.file-download,
.file-remove { width: 26px; height: 26px; border-radius: 2px; }
.file-add {
  min-height: 36px;
  border-color: #cbd2da;
  border-radius: 2px;
  background: #fff;
  font-size: 9px;
}
.empty-copy {
  padding: 11px;
  border: 1px dashed #d4d9df;
  border-radius: 0;
  background: transparent;
  font-size: 8.5px;
}
.danger-button {
  min-height: 36px;
  margin-top: 16px;
  border: 1px solid #e4b8bb;
  border-radius: 2px;
  color: #a43138;
  background: #fffafa;
  font-size: 9px;
}
.danger-button:hover { border-color: #cd7378; background: #fff2f2; }

@media (max-width: 1500px) {
  :root { --drawer-width: 420px; }
  .topbar { grid-template-columns: max-content minmax(240px, 1fr) max-content; gap: 20px; padding-inline: 20px; }
  body.drawer-open .topbar { padding-right: calc(var(--drawer-width) + 20px); }
  .brand-caption { display: none; }
  main { padding-inline: 20px; }
}

@media (max-width: 1180px) {
  body.drawer-open { padding-right: 0; }
  body.drawer-open .topbar { padding-right: 18px; }
  .topbar { grid-template-columns: max-content minmax(220px, 1fr) auto; padding-inline: 18px; }
  .save-state span { display: none; }
  .top-actions .icon-button, .top-actions .avatar { display: none; }
  .drawer { width: min(450px, 100%); }
  .summary { display: none; }
}

@media (max-width: 760px) {
  .topbar { height: auto; grid-template-columns: 1fr auto; gap: 10px; padding-block: 11px; }
  .brand-name { font-size: 21px; }
  .brand-scope { gap: 7px; }
  .brand-scope > span { font-size: 15px; }
  .brand-scope > strong { font-size: 21px; }
  .brand-mark { width: 34px; height: 34px; }
  .search { grid-column: 1 / -1; grid-row: 2; }
  .top-actions .save-state { display: none; }
  .label-library-button, .grid-button { width: 40px; padding: 0; justify-content: center; font-size: 0; }
  .toolbar-count { display: none; }
  .primary-button { padding-inline: 11px; }
  main { padding: 22px 14px 56px; }
  .page-heading { align-items: start; }
  .page-heading h1 { font-size: 29px; }
  .page-heading p { max-width: 420px; line-height: 1.5; }
  .project-head { padding-left: 0; }
  .project-popover { position: fixed; inset: auto 14px 18px; width: auto; }
  .project-board { height: min(var(--board-height, 340px), 70vh); }
  .project-resize { display: none; }
  .drawer-meta-grid { grid-template-columns: 1fr; }
  .drawer-meta-field + .drawer-meta-field { border-top: 1px solid #d9dde3; border-left: 0; }
  .drawer-scroll { padding-inline: 14px; }
  .drawer-meta-grid,
  .card-label-section,
  .drawer-section { margin-inline: -14px; }
  .drawer-meta-field,
  .drawer-time-row,
  .urgent-toggle,
  .card-label-section,
  .drawer-section { padding-inline: 14px; }
  .label-create-form { grid-template-columns: 1fr auto; }
  .label-create-form > label:first-child { grid-column: 1 / -1; }
}

@media (max-width: 350px) {
  body[data-scope="potok"] .topbar .grid-button,
  body[data-scope="potok"] .topbar .primary-button,
  body[data-scope="potok"] .topbar .avatar {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
  }
  body[data-scope="potok"] .topbar .label-library-button {
    min-width: 52px;
    min-height: 40px;
    padding-inline: 6px;
  }
}

/* Account and sign-in */
.account-wrap {
  position: relative;
  flex: 0 0 auto;
}

button.avatar {
  padding: 0;
  cursor: pointer;
}

button.avatar:hover,
button.avatar[aria-expanded="true"] {
  border-color: #9eb9f5;
  color: #174fae;
  background: #f5f8ff;
}

.account-popover {
  position: absolute;
  z-index: 90;
  top: calc(100% + 9px);
  right: 0;
  width: 260px;
  overflow: hidden;
  border: 1px solid #cfd5dc;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(7, 17, 31, 0.14);
}

.account-popover[hidden],
.auth-gate[hidden] { display: none; }

.account-summary {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 13px;
  border-bottom: 1px solid #e0e4e8;
}

.account-avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: #0d1a2d;
  background: #eef3fa;
  font-size: 10px;
  font-weight: 750;
}

.account-summary > span:last-child { min-width: 0; }
.account-summary strong,
.account-summary small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-summary strong { color: #0d1a2d; font-size: 10px; }
.account-summary small { margin-top: 3px; color: #778293; font-size: 8px; }

.account-popover > button {
  width: 100%;
  min-height: 38px;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 0 13px;
  border: 0;
  color: #3f4b5b;
  background: #fff;
  font: inherit;
  font-size: 9px;
  text-align: left;
  cursor: pointer;
}
.account-popover > button:hover { color: #a43138; background: #fff7f7; }

.auth-gate {
  position: fixed;
  z-index: 70;
  inset: 82px 0 0;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(90deg, rgba(125, 135, 150, .045) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(rgba(125, 135, 150, .045) 1px, transparent 1px) 0 0 / 72px 72px,
    #f8f9f7;
}

.auth-card {
  width: min(430px, 100%);
  padding: 38px 38px 34px;
  border: 1px solid #cfd5dc;
  border-top: 3px solid #0d1a2d;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(7, 17, 31, .08);
}

.auth-card > img {
  width: 58px;
  height: 58px;
  display: block;
  margin-bottom: 26px;
  border-radius: 5px;
}

.auth-eyebrow {
  display: block;
  margin-bottom: 9px;
  color: #687485;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .085em;
  text-transform: uppercase;
}

.auth-card h1 {
  margin: 0;
  color: #0d1a2d;
  font-family: var(--font-display);
  font-size: 31px;
  line-height: 1.08;
  letter-spacing: -.035em;
}

.auth-card > p:not(.auth-status) {
  max-width: 340px;
  margin: 14px 0 25px;
  color: #657183;
  font-size: 11px;
  line-height: 1.55;
}

.google-signin {
  min-height: 44px;
  display: flex;
  align-items: center;
  opacity: 1;
  transition: opacity .16s ease;
}
.google-signin[hidden] { display: none; }
.google-signin.is-busy { opacity: .45; pointer-events: none; }

.password-signin {
  display: grid;
  gap: 13px;
}
.password-signin[hidden] { display: none; }
.password-signin label {
  display: grid;
  gap: 6px;
}
.password-signin label > span {
  color: #596577;
  font-size: 9px;
  font-weight: 700;
}
.password-signin input {
  width: 100%;
  height: 43px;
  padding: 0 12px;
  border: 1px solid #cfd5dc;
  outline: 0;
  color: #0d1a2d;
  background: #fff;
  font: inherit;
  font-size: 12px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.password-signin input:focus {
  border-color: #246bfe;
  box-shadow: 0 0 0 3px rgba(36, 107, 254, .1);
}
.password-signin button {
  min-height: 43px;
  margin-top: 3px;
  border: 1px solid #0d1a2d;
  color: #fff;
  background: #0d1a2d;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.password-signin button:hover { background: #17263b; }
.password-signin.is-busy { opacity: .55; pointer-events: none; }

.auth-status {
  min-height: 16px;
  margin: 14px 0 0;
  color: #7a8594;
  font-size: 8px;
  line-height: 1.45;
}

body[data-auth="required"] main,
body[data-auth="loading"] main { visibility: hidden; }
body[data-auth="required"] .search,
body[data-auth="required"] .top-actions,
body[data-auth="loading"] .search,
body[data-auth="loading"] .top-actions { visibility: hidden; }

@media (max-width: 760px) {
  .auth-gate { inset: 60px 0 0; padding: 14px; }
  .auth-card { padding: 28px 24px 25px; }
  .auth-card h1 { font-size: 28px; }
}

/* Final workspace controls */
.topbar {
  box-shadow: var(--potok-header-shadow);
}

.project-tools {
  display: flex;
  align-items: center;
  gap: 7px;
}

.project-collapse-button,
.project-delete-button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d6dce3;
  border-radius: 5px;
  color: #354255;
  background: #fff;
  font: inherit;
  font-size: 9px;
  font-weight: 680;
  cursor: pointer;
  transition: border-color .16s ease, color .16s ease, background .16s ease;
}

.project-collapse-button {
  width: 34px;
  padding: 0;
  font-size: 17px;
}
.project-collapse-button:hover { border-color: #aeb8c5; color: #0d1a2d; background: #f8f9fa; }
.project-delete-button { gap: 6px; padding: 0 11px; }
.project-delete-button > i { font-size: 13px; }
.project-delete-button:hover { border-color: #efb8bc; color: #b1323d; background: #fff7f7; }
.project.is-collapsed .project-head { min-height: 50px; }
.project-board[hidden] { display: none !important; }

.site-footer {
  position: fixed;
  z-index: 38;
  inset: auto 0 0;
  height: 6px;
  min-height: 0;
  display: grid;
  grid-template-columns: max-content minmax(240px, 1fr) max-content;
  align-items: center;
  gap: 28px;
  margin: 0;
  padding: 0 22px;
  overflow: hidden;
  border-top: 0;
  color: #6c7786;
  background: #f6f7f6;
  box-shadow: 0 -5px 18px rgba(7, 17, 31, 0);
  font-size: 9px;
  transition: height .26s ease, padding .26s ease, box-shadow .26s ease, right .24s ease;
}
.site-footer::before {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  content: "";
  background: linear-gradient(90deg, #c3ff4f 0 70px, #62d2ff 70px 140px, #0d1a2d 140px 100%);
}
.site-footer.is-expanded {
  height: 82px;
  padding: 16px 22px 18px;
  box-shadow: 0 -9px 28px rgba(7, 17, 31, .09);
}
.site-footer > * {
  opacity: 0;
  transform: translateY(9px);
  transition: opacity .16s ease, transform .2s ease;
}
.site-footer.is-expanded > * {
  opacity: 1;
  transform: translateY(0);
}
.footer-brand { display: flex; align-items: baseline; gap: 9px; white-space: nowrap; }
.footer-brand strong { color: #0d1a2d; font-size: 13px; letter-spacing: -.015em; }
.footer-brand span { color: #87909c; }
.site-footer p { max-width: 520px; margin: 0; line-height: 1.55; }
.site-footer nav { display: flex; align-items: center; gap: 18px; }
.site-footer a { color: #3f526c; font-weight: 680; text-underline-offset: 3px; }
.site-footer a:hover { color: #174fae; }
.site-footer .footer-site-link {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 11px;
  border-radius: 5px;
  color: #fff;
  background: #0d1a2d;
  text-decoration: none;
}
.site-footer .footer-site-link:hover { color: #0d1a2d; background: #c3ff4f; }
.site-footer .footer-site-link > i { font-size: 13px; }
body.drawer-open .site-footer { right: var(--drawer-width); }
main { padding-bottom: 112px; }
body[data-auth="required"] .site-footer,
body[data-auth="loading"] .site-footer { visibility: hidden; }

.tour-overlay {
  position: fixed;
  z-index: 360;
  inset: 0;
  pointer-events: auto;
}
.tour-overlay[hidden] { display: none; }
.tour-spotlight {
  position: fixed;
  z-index: 1;
  border: 2px solid rgba(195, 255, 79, .95);
  border-radius: 7px;
  background: rgba(255, 255, 255, .025);
  box-shadow: 0 0 0 9999px rgba(5, 13, 24, .66), 0 0 0 5px rgba(195, 255, 79, .12);
  pointer-events: none;
  transition: left .2s ease, top .2s ease, width .2s ease, height .2s ease, opacity .15s ease;
}
.tour-card {
  position: fixed;
  z-index: 2;
  width: min(360px, calc(100vw - 24px));
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 7px;
  color: #eef4fc;
  background: #0b1727;
  box-shadow: 0 20px 58px rgba(0, 0, 0, .34);
}
.tour-progress { display: grid; grid-template-columns: max-content 1fr; align-items: center; gap: 10px; margin-bottom: 15px; }
.tour-progress > span { color: #a9b6c7; font-size: 8px; font-weight: 720; letter-spacing: .08em; }
.tour-progress > i { height: 2px; overflow: hidden; background: rgba(255,255,255,.13); }
.tour-progress b { height: 100%; display: block; background: #c3ff4f; transition: width .2s ease; }
.tour-card h2 { margin: 0; color: #fff; font-family: var(--font-display); font-size: 19px; line-height: 1.15; letter-spacing: -.025em; }
.tour-card p { min-height: 54px; margin: 10px 0 18px; color: #b9c5d4; font-size: 10px; line-height: 1.55; }
.tour-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tour-actions > div { display: flex; gap: 7px; }
.tour-actions button {
  min-height: 35px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 5px;
  color: #e8eef7;
  background: transparent;
  font: inherit;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}
.tour-actions button:hover { border-color: rgba(255,255,255,.4); background: rgba(255,255,255,.06); }
.tour-actions .tour-skip { padding-inline: 0; border-color: transparent; color: #8f9caf; }
.tour-actions .tour-next { border-color: #c3ff4f; color: #08111e; background: #c3ff4f; }
.tour-actions .tour-next:hover { border-color: #d1ff77; background: #d1ff77; }
.tour-actions button:focus-visible { outline: 2px solid #62d2ff; outline-offset: 2px; }

@media (min-width: 761px) and (max-width: 1100px) {
  .site-footer { grid-template-columns: max-content 1fr; }
  .site-footer.is-expanded { height: 112px; }
  .site-footer nav { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .site-footer { grid-template-columns: 1fr; gap: 10px; padding-inline: 16px; }
  .site-footer.is-expanded { height: 174px; padding-block: 16px; }
  .site-footer nav { flex-wrap: wrap; gap: 12px 18px; }
  body.drawer-open .site-footer { right: 0; }
  .tour-card { padding: 16px; }
  .tour-card p { min-height: 0; }
}

/* One rectangular geometry across every Potok surface */
:root { --ui-radius: 3px; }

button,
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea,
dialog,
[contenteditable="true"],
.brand-mark,
.search,
.label-filter-popover,
.filter-label-option,
.card,
.card-placeholder,
.add-project-wide,
.empty-state,
.drawer,
.rich-editor-shell,
.editor-link-popover,
.emoji-picker,
.card-label-popover,
.account-popover,
.account-avatar,
.auth-card,
.auth-card > img,
.label-manager-row,
.confirm-icon,
.toast,
.tour-spotlight,
.tour-card,
.site-footer .footer-site-link {
  border-radius: var(--ui-radius) !important;
}

.editor-toolbar { border-radius: 2px 2px 0 0 !important; }
.description-editor { border-radius: 0 0 2px 2px !important; }
.filter-label-option::before,
.card-popover-option::before,
.drawer-time-toggle > i,
.urgent-toggle > i { border-radius: 2px !important; }

.card-list > .add-card {
  width: 100%;
  min-height: 46px;
  margin: 0;
  flex: 0 0 auto;
  border-color: #cbd2da;
  background: rgba(255, 255, 255, .72);
}

/* Card focus mode */
.card-focus-button {
  position: absolute;
  z-index: 4;
  top: auto;
  right: 13px;
  bottom: 13px;
  width: 8px;
  height: 8px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #8a95a5;
  border-radius: 50% !important;
  color: #0d1a2d;
  background: rgba(255, 255, 255, .9);
  box-shadow: none;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: scale(.7);
  transition: opacity .1s ease, border-color .1s ease, background .1s ease, transform .1s ease;
}
.card-focus-button::before {
  position: absolute;
  inset: -5px;
  content: "";
}
.card:hover .card-focus-button,
.card:focus-within .card-focus-button {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}
body.tour-active.tour-show-focus-trigger .card.is-tour-focus-card .card-focus-button {
  visibility: visible;
  opacity: 1;
  pointer-events: none;
  transform: scale(1);
}
.card-focus-button:hover {
  border-color: #0d1a2d;
  background: #fff;
  transform: scale(1.08);
}
.card-focus-button:focus-visible {
  outline: 2px solid #246bfe;
  outline-offset: 2px;
}
.card-focus-button[aria-pressed="true"] {
  border-color: #0d1a2d;
  background: #0d1a2d;
}
.card-delete-button {
  position: absolute;
  z-index: 4;
  right: 8px;
  bottom: 6px;
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 3px;
  color: #8a95a5;
  background: transparent;
  font-size: 13px;
  cursor: pointer;
  transition: color .12s ease, background .12s ease;
}
.card-delete-button:hover { color: #c73d48; background: #fff0f1; }
.card-delete-button:focus-visible { outline: 2px solid #ef525f; outline-offset: 1px; }
body[data-scope="korzinka"] .card[data-status="take"] .card-focus-button { right: 40px; }
body.focus-mode .card-focus-button {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: scale(.7);
}
body.focus-mode .card-delete-button { visibility: hidden; pointer-events: none; }

body.focus-mode::after {
  position: fixed;
  z-index: 110;
  inset: 0;
  content: "";
  background: rgba(248, 249, 247, .58);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  pointer-events: auto;
}
body.focus-mode .card.is-focused {
  position: relative;
  z-index: 120;
  width: var(--focus-locked-width, 100%);
  height: var(--focus-locked-height, auto);
  min-height: var(--focus-locked-height, 0);
  box-shadow: none;
  cursor: default;
}
body.focus-mode .card.is-focused:hover { height: var(--focus-locked-height, auto); min-height: var(--focus-locked-height, 0); }
body[data-scope="korzinka"].grid-mode.focus-mode .card.is-focused,
body[data-scope="korzinka"].grid-mode.focus-mode .card.is-focused:hover {
  padding: 7px 9px;
}

.card-focus-layer {
  --focus-card-left: 0px;
  --focus-card-top: 0px;
  --focus-card-width: 0px;
  --focus-card-height: 0px;
  --focus-controls-left: 0px;
  --focus-controls-top: 0px;
  --focus-panel-width: 230px;
  position: fixed;
  z-index: 130;
  inset: 0;
  pointer-events: none;
}
.card-focus-layer[hidden] { display: none; }
.card-focus-card-shadow {
  position: fixed;
  z-index: 0;
  top: var(--focus-card-top);
  left: var(--focus-card-left);
  width: var(--focus-card-width);
  height: var(--focus-card-height);
  border-radius: 3px;
  box-shadow: 0 13px 38px rgba(7, 17, 31, .18);
  pointer-events: none;
}
.card-focus-watermark {
  position: fixed;
  z-index: 1;
  bottom: 12px;
  left: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
  color: #4f5966;
  font-size: 8px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: .01em;
  opacity: .3;
  pointer-events: none;
  user-select: none;
}
.card-focus-watermark img {
  width: 11px;
  height: 11px;
  display: block;
  filter: grayscale(1) saturate(0) contrast(.82);
}
.card-focus-panel {
  position: fixed;
  z-index: 2;
  width: var(--focus-panel-width);
  height: clamp(140px, 23vh, 188px);
  min-width: 220px;
  min-height: 132px;
  max-width: calc(100dvw - 20px);
  max-height: calc(100dvh - 20px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  resize: none;
  border: 1px solid #d7dbe1;
  border-radius: 4px;
  color: #111827;
  background: #fff;
  box-shadow: 0 7px 20px rgba(7, 17, 31, .09);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity .24s ease,
    visibility 0s linear .24s;
}
.card-focus-panel.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}
.card-focus-panel.is-dragging {
  box-shadow: 0 14px 32px rgba(7, 17, 31, .16);
  cursor: grabbing;
}
.card-focus-panel.is-resizing { user-select: none; }
.card-focus-resize-handle {
  position: absolute;
  z-index: 5;
  right: 0;
  bottom: 0;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: end;
  padding: 0 4px 4px 0;
  border: 0;
  outline: 0;
  color: rgba(86, 96, 109, .42);
  background: transparent;
  cursor: nwse-resize;
  opacity: 0;
  touch-action: none;
  transition: opacity .28s ease, color .22s ease;
}
.card-focus-resize-handle:hover,
.card-focus-resize-handle:focus-visible,
.card-focus-panel.is-resizing .card-focus-resize-handle {
  color: rgba(63, 73, 86, .72);
  opacity: .72;
}
.card-focus-resize-handle:focus-visible {
  outline: 1px solid rgba(36, 107, 254, .3);
  outline-offset: -2px;
}
.card-focus-resize-handle i {
  font-size: 9px;
  line-height: 1;
  pointer-events: none;
  transform: scaleX(-1);
}
.card-focus-panel-title {
  position: relative;
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 9px 12px 8px;
  border-bottom: 0;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.card-focus-panel-title::after {
  position: absolute;
  right: auto;
  bottom: 0;
  left: 0;
  width: 33.333%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, #dfe3e8 0%, rgba(223, 227, 232, 0) 100%);
  pointer-events: none;
}
.card-focus-panel-title:active { cursor: grabbing; }
.card-focus-panel-title > strong {
  display: block;
  font-size: 11px;
  font-weight: 760;
  line-height: 1.2;
}
.card-focus-description-text {
  min-height: 0;
  overflow: auto;
  padding: 10px 14px 15px;
  color: #273142;
  font-size: 10px;
  line-height: 1.58;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  scroll-padding-block: 10px 12px;
  scrollbar-width: none;
  clip-path: inset(4px 0 6px);
}
.card-focus-description-text div,
.card-focus-description-text p { min-height: 0; margin: 0; padding: 0; }
.card-focus-description-text a,
#cardFocusNotesInput a {
  color: #246bfe;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.card-focus-description-text.is-empty { color: #8b94a1; }
#cardFocusNotesInput {
  min-height: 0;
  width: 100%;
  overflow: auto;
  padding: 12px 14px 15px;
  border: 0;
  outline: 0;
  color: #273142;
  background: #fff;
  box-shadow: none;
  font: inherit;
  font-size: 10px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  scroll-padding-block: 10px 12px;
  scrollbar-width: none;
  clip-path: inset(4px 0 6px);
}
#cardFocusNotesInput:focus,
#cardFocusNotesInput:focus-visible {
  border: 0;
  outline: 0;
  box-shadow: none;
}
#cardFocusNotesInput:empty::before {
  content: attr(data-placeholder);
  color: #a0a7b1;
  pointer-events: none;
}
#cardFocusNotesInput div,
#cardFocusNotesInput p { min-height: 0; margin: 0; padding: 0; }
.card-focus-description-text::-webkit-scrollbar,
#cardFocusNotesInput::-webkit-scrollbar {
  width: 0;
  height: 0;
}
.card-focus-scrollbar {
  --focus-scrollbar-size: 20px;
  --focus-scrollbar-offset: 0px;
  position: absolute;
  z-index: 3;
  top: 40px;
  right: 3px;
  bottom: 8px;
  width: 2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s ease;
}
.card-focus-scrollbar[hidden] { display: none; }
.card-focus-scrollbar.is-visible { opacity: 1; }
.card-focus-scrollbar > span {
  position: absolute;
  top: 0;
  right: 0;
  width: 2px;
  height: var(--focus-scrollbar-size);
  border-radius: 999px;
  background: rgba(76, 86, 101, .24);
  transform: translateY(var(--focus-scrollbar-offset));
  transition: transform .08s linear;
}
.card-focus-notes-link {
  position: absolute;
  z-index: 4;
  top: 38px;
  right: 6px;
  left: 6px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 4px;
  padding: 6px;
  border: 1px solid #d7dbe1;
  border-radius: 4px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 7px 18px rgba(7, 17, 31, .12);
}
.card-focus-notes-link[hidden] { display: none; }
.card-focus-notes-link input {
  min-width: 0;
  height: 25px;
  padding: 0 7px;
  border: 1px solid #d7dbe1;
  border-radius: 3px;
  outline: 0;
  font: inherit;
  font-size: 9px;
}
.card-focus-notes-link input:focus { border-color: #9ab7ee; }
.card-focus-notes-link button {
  height: 25px;
  padding: 0 7px;
  border: 1px solid #d7dbe1;
  border-radius: 3px;
  color: #465163;
  background: #fff;
  font-size: 8px;
  cursor: pointer;
}
.card-focus-controls {
  position: fixed;
  z-index: 3;
  top: var(--focus-controls-top);
  left: var(--focus-controls-left);
  display: flex;
  gap: 6px;
  opacity: 0;
  transform: translateY(-2px);
  pointer-events: auto;
  transition: opacity .24s ease, transform .24s ease;
}
.card-focus-controls::before {
  position: absolute;
  z-index: 0;
  inset: -8px;
  content: "";
}
body.focus-mode:has(.card.is-focused:hover) .card-focus-controls,
.card-focus-controls:hover,
.card-focus-controls:has(button:focus-visible) {
  opacity: 1;
  transform: translateY(0);
}
body.tour-active.tour-show-focus-controls .card-focus-controls {
  opacity: 1;
  transform: none;
}
.card-focus-controls button {
  position: relative;
  z-index: 1;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #d2d6dc;
  border-radius: 50% !important;
  color: #737d8b;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 2px 6px rgba(7, 17, 31, .05);
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  opacity: .6;
  transition: opacity .22s ease, border-color .18s ease, color .18s ease, background .18s ease;
}
.card-focus-controls button > i {
  position: relative;
  width: 12px;
  height: 12px;
  display: grid;
  place-items: center;
  overflow: visible;
  line-height: 12px;
}
.card-focus-controls button > i::before {
  display: block;
  width: 12px;
  height: 12px;
  font-size: 11px;
  line-height: 12px;
  text-align: center;
}
.card-focus-controls button:hover {
  border-color: #b9c0c9;
  color: #4e5968;
  background: #fff;
}
.card-focus-controls button[aria-pressed="false"] {
  color: #a7adb6;
  background: rgba(255, 255, 255, .7);
  opacity: .3;
}
.card-focus-controls button:focus-visible {
  outline: 2px solid rgba(36, 107, 254, .38);
  outline-offset: 2px;
}
@media (max-width: 820px) {
  .card-focus-panel {
    width: var(--focus-panel-width);
    height: clamp(112px, 24vh, 150px);
  }
  .card-focus-notes-link { grid-template-columns: minmax(0, 1fr) auto; }
  .card-focus-notes-link #cardFocusNotesLinkRemove { display: none; }
}

/* Korzinka production board */
.korzinka-only { display: none; }
body[data-scope="korzinka"] .korzinka-only { display: grid; }
body[data-scope="korzinka"] {
  width: 100%;
  height: 100dvh;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}
@media (min-width: 761px) {
  body[data-scope="korzinka"] .topbar {
    height: var(--potok-header-height);
    grid-template-columns: max-content minmax(0, 1fr);
    gap: var(--potok-header-gap);
    padding-inline: var(--potok-gutter-x);
  }
  body[data-scope="korzinka"] .top-actions { justify-self: end; }
  body[data-scope="korzinka"] .brand { gap: var(--potok-brand-gap); }
  body[data-scope="korzinka"] .brand-mark { width: var(--potok-brand-mark-size); height: var(--potok-brand-mark-size); }
  body[data-scope="korzinka"] .brand-name { font-size: var(--potok-brand-name-size); }
  body[data-scope="korzinka"] .brand-scope { gap: 8px; }
  body[data-scope="korzinka"] .brand-scope > span { font-size: var(--potok-brand-scope-size); }
  body[data-scope="korzinka"] .brand-scope > strong { font-size: var(--potok-brand-scope-size); }
  body[data-scope="korzinka"] .label-library-button { min-height: var(--potok-control-height); padding-inline: 11px; }
  body[data-scope="korzinka"] .avatar { width: var(--potok-control-height); height: var(--potok-control-height); }
}
body[data-scope="korzinka"] .search { display: none; }
body[data-scope="korzinka"] .week-picker-wrap { position: relative; display: block; }
body[data-scope="korzinka"] .week-picker-button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid #d8dde4;
  color: #0d1a2d;
  background: #fff;
  font-size: 10px;
  font-weight: 720;
  cursor: pointer;
}
body[data-scope="korzinka"] .week-picker-button > i:first-child { color: #e5002b; font-size: 15px; }
body[data-scope="korzinka"] .week-picker-button > i:last-child { color: #7d8796; font-size: 14px; transition: transform .14s ease; }
body[data-scope="korzinka"] .week-picker-button[aria-expanded="true"] { border-color: #9eb9f5; background: #f8faff; }
body[data-scope="korzinka"] .week-picker-button[aria-expanded="true"] > i:last-child { transform: rotate(180deg); }
body[data-scope="korzinka"] .week-picker-button small { color: #667183; font-size: 8.5px; font-weight: 620; }
body[data-scope="korzinka"] .statistics-button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  border: 1px solid #d8dde4;
  color: #0d1a2d;
  background: #fff;
  font-size: 10px;
  font-weight: 720;
  cursor: pointer;
}
body[data-scope="korzinka"] .statistics-button:hover { border-color: #9da7b4; background: #fafafa; }
body[data-scope="korzinka"] .content-table-link {
  border-color: #efc6ce;
  color: #d9002d;
  text-decoration: none;
}
body[data-scope="korzinka"] .content-table-link:hover { border-color: #e5002b; background: #fff7f8; }
body[data-scope="korzinka"] .week-picker-popover {
  position: absolute;
  z-index: 90;
  top: calc(100% + 8px);
  right: 0;
  width: min(340px, calc(100vw - 24px));
  padding: 11px;
  border: 1px solid #cfd5dc;
  background: #fff;
  box-shadow: 0 16px 38px rgba(7, 17, 31, .14);
}
body[data-scope="korzinka"] .week-picker-popover[hidden] { display: none; }
.week-picker-list { max-height: min(430px, calc(100dvh - 100px)); display: grid; gap: 6px; overflow-y: auto; scrollbar-width: thin; }
.week-option {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 9px;
  border: 1px solid #e0e4ea;
  color: #0d1a2d;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.week-option:hover { border-color: #aeb8c5; background: #fafbfc; }
.week-option.is-selected { border-color: #246bfe; background: #f4f7ff; }
.week-option.is-current:not(.is-selected) { border-color: #bfd0ec; }
.week-option-copy { min-width: 0; display: grid; gap: 4px; }
.week-option-copy strong { font-size: 10px; }
.week-option-copy small { overflow: hidden; color: #7b8593; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.week-current-badge { flex: 0 0 auto; padding: 3px 5px; border: 1px solid #c7d7f4; color: #315b9e; background: #f7faff; font-size: 7px; font-weight: 760; text-transform: uppercase; }
body[data-scope="korzinka"] #newProjectButton,
body[data-scope="korzinka"] #addProjectWide,
body[data-scope="korzinka"] #gridButton,
body[data-scope="korzinka"] .drawer-status-field,
body[data-scope="korzinka"] .subtitle-label,
body[data-scope="korzinka"] .drawer-subtitle-input,
body[data-scope="korzinka"] .drawer-status-pill,
body[data-scope="korzinka"] .drawer-breadcrumb > i,
body[data-scope="korzinka"] .card-subtitle { display: none !important; }
body[data-scope="korzinka"] .drawer-breadcrumb,
body[data-scope="korzinka"] .drawer-scroll > .field-label:first-child,
body[data-scope="korzinka"] #drawerLabelsSettings,
body[data-scope="korzinka"] #labelCreateForm,
body[data-scope="korzinka"] .drawer-time-toggle small,
body[data-scope="korzinka"] .urgent-toggle small { display: none !important; }
body[data-scope="korzinka"] .drawer-title-input { margin-top: 17px; }
body[data-scope="korzinka"] .drawer-time-toggle > span,
body[data-scope="korzinka"] .urgent-toggle span { display: block; }

body[data-scope="korzinka"] main {
  min-height: 0;
  padding: var(--potok-content-gap-top) var(--potok-gutter-x) var(--potok-content-gap-bottom);
  overflow: hidden;
}
body[data-scope="korzinka"] .project-stack { height: 100%; display: block; }
body[data-scope="korzinka"] .korzinka-fixed-project {
  height: 100%;
  width: 100%;
  margin: 0;
}
body[data-scope="korzinka"] .korzinka-fixed-project .project-board {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border-top: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
body[data-scope="korzinka"] .korzinka-fixed-project .project-board::-webkit-scrollbar { display: none; width: 0; height: 0; }
body[data-scope="korzinka"] .korzinka-fixed-project .columns {
  min-width: 0;
  height: 100%;
  min-height: 0;
  grid-template-columns: minmax(190px, 1fr) 10px minmax(0, 4fr);
  align-items: stretch;
  overflow: hidden;
}
body[data-scope="korzinka"] .korzinka-fixed-project .column { min-height: 100%; }
body[data-scope="korzinka"] .korzinka-fixed-project .column[data-status="copywriter"] { border-left: 1px solid #d4d9e2; }
body[data-scope="korzinka"] .korzinka-workflow-gap {
  min-height: 100%;
  align-self: stretch;
  border: 0;
  background: #fbfbfa;
}
body[data-scope="korzinka"] .korzinka-fixed-project .columns > .column:first-child {
  position: sticky;
  z-index: 7;
  top: 0;
  left: 0;
  height: 100%;
  max-height: 100%;
  align-self: start;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-right: 1px solid #d4d9e2;
  box-shadow: 10px 0 0 #fbfbfa;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
body[data-scope="korzinka"] .korzinka-fixed-project .columns > .column:first-child > .column-head {
  z-index: 40;
}
body[data-scope="korzinka"] .korzinka-fixed-project .columns > .column:first-child::-webkit-scrollbar { display: none; width: 0; }
body[data-scope="korzinka"] .korzinka-workflow-scroll {
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
body[data-scope="korzinka"] .korzinka-workflow-scroll::-webkit-scrollbar { display: none; width: 0; height: 0; }
body[data-scope="korzinka"] .korzinka-workflow-columns {
  min-width: 760px;
  min-height: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  align-items: stretch;
}
body[data-scope="korzinka"] .korzinka-workflow-columns > .column { min-height: 100%; }

@media (max-width: 1024px) {
  body[data-scope="korzinka"] .korzinka-workflow-scroll,
  body[data-scope="korzinka"] .korzinka-workflow-columns { display: contents; }
}
body[data-scope="korzinka"] .site-footer {
  position: relative;
  inset: auto;
  right: auto !important;
  height: var(--potok-footer-height);
  grid-template-columns: max-content max-content;
  justify-content: space-between;
  gap: 20px;
  padding: 0 var(--potok-gutter-x);
  overflow: visible;
  border-top: 1px solid #d9dee6;
  background: #fff;
  box-shadow: none;
}
body[data-scope="korzinka"] .site-footer::before { display: none; }
body[data-scope="korzinka"] .site-footer > * { opacity: 1; transform: none; }
body[data-scope="korzinka"] .korzinka-footer-copy {
  max-width: none;
  color: #0d1a2d;
  font-size: 11px;
  font-weight: 720;
  letter-spacing: .01em;
}
body[data-scope="korzinka"] .korzinka-footer-editor {
  min-height: 32px;
  padding: 0 13px;
  border: 1px solid #e5002b;
  color: #fff;
  background: #e5002b;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  opacity: 1;
  cursor: pointer;
}
body[data-scope="korzinka"] .korzinka-footer-editor:hover { border-color: #bd0024; background: #bd0024; }
body[data-scope="korzinka"] .korzinka-footer-actions { display: flex; align-items: center; gap: 7px; }
body[data-scope="korzinka"] .korzinka-footer-notepad {
  min-height: 32px;
  padding: 0 13px;
  border: 1px solid #e5002b;
  color: #e5002b;
  background: #fff;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}
body[data-scope="korzinka"] .korzinka-footer-notepad:hover { color: #fff; background: #e5002b; }
body[data-scope="korzinka"] .korzinka-footer-aaaa {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #e5002b;
  color: #e5002b;
  background: #fff;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}
body[data-scope="korzinka"] .korzinka-footer-aaaa:hover { color: #fff; background: #e5002b; }
.product-editor-overlay {
  position: fixed;
  z-index: 180;
  inset: 0;
  display: none;
  place-items: center;
  padding: 10px;
  background: rgba(7, 17, 31, .46);
  backdrop-filter: blur(3px);
}
body[data-scope="korzinka"] .product-editor-overlay.is-open { display: grid; }
.product-editor-panel {
  position: relative;
  width: min(1120px, 68vw);
  height: calc(100dvh - 20px);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #cbd2dc;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(7, 17, 31, .3);
}
.product-editor-close {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(229, 0, 43, .45);
  border-radius: 2px;
  color: #e5002b;
  background: #fff;
  box-shadow: none;
  font-size: 20px;
  cursor: pointer;
}
.product-editor-close:hover { border-color: #e5002b; color: #e5002b; background: rgba(229, 0, 43, .035); }
.product-editor-panel iframe {
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  display: block;
  overflow: hidden;
  border: 0;
  background: #fff;
}
.notepad-overlay {
  position: fixed;
  z-index: 190;
  inset: 0;
  display: none;
  place-items: center;
  padding: 12px;
  background: rgba(7, 17, 31, .46);
  backdrop-filter: blur(3px);
}
body[data-scope="korzinka"] .notepad-overlay.is-open { display: grid; }
body.notepad-open { overflow: hidden; }
.notepad-panel {
  position: relative;
  width: min(720px, calc(100vw - 24px));
  height: min(760px, calc(100dvh - 24px));
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 22px;
  padding: 52px 48px 46px;
  border: 1px solid #d7dce3;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(7, 17, 31, .3);
}
.notepad-panel h2 {
  margin: 0;
  color: #e5002b;
  font-family: "Korzinka Display ExtraBold Italic", sans-serif;
  font-size: clamp(36px, 5vw, 52px);
  font-style: italic;
  font-weight: 800;
  line-height: .95;
  letter-spacing: -.025em;
  text-align: center;
}
.notepad-close {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(229, 0, 43, .45);
  border-radius: 2px;
  color: #e5002b;
  background: #fff;
  box-shadow: none;
  font-size: 20px;
  cursor: pointer;
}
.notepad-close:hover { border-color: #e5002b; color: #e5002b; background: rgba(229, 0, 43, .035); }
.statistics-overlay {
  position: fixed;
  z-index: 195;
  inset: 0;
  display: none;
  place-items: center;
  padding: 12px;
  background: rgba(7, 17, 31, .46);
  backdrop-filter: blur(3px);
}
body[data-scope="korzinka"] .statistics-overlay.is-open { display: grid; }
body.statistics-open { overflow: hidden; }
.statistics-panel {
  position: relative;
  width: min(760px, calc(100vw - 24px));
  height: min(760px, calc(100dvh - 24px));
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 24px;
  padding: 48px 48px 40px;
  border: 1px solid #d7dce3;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(7, 17, 31, .3);
}
.statistics-panel h2 {
  margin: 0;
  color: #e5002b;
  font-family: "Korzinka Display ExtraBold Italic", sans-serif;
  font-size: clamp(36px, 5vw, 50px);
  font-style: italic;
  font-weight: 800;
  line-height: .95;
  letter-spacing: -.025em;
  text-align: left;
}
.statistics-close {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(229, 0, 43, .45);
  border-radius: 2px;
  color: #e5002b;
  background: #fff;
  box-shadow: none;
  font-size: 20px;
  cursor: pointer;
}
.statistics-close:hover { border-color: #e5002b; background: rgba(229, 0, 43, .035); }
.statistics-content {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 22px;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: #cfd5dd transparent;
}
.statistics-filter-section,
.statistics-metric {
  min-width: 0;
  display: grid;
  gap: 12px;
  padding-bottom: 22px;
  border-bottom: 1px solid #e1e5eb;
}
.statistics-filter-section {
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  column-gap: 24px;
}
.statistics-metric:last-child { padding-bottom: 0; border-bottom: 0; }
.statistics-section-heading { min-width: 0; display: grid; gap: 4px; }
.statistics-section-heading strong {
  color: #101828;
  font-size: 14px;
  font-weight: 760;
  line-height: 1.2;
}
.statistics-section-heading span {
  color: #7a8493;
  font-size: 10px;
  line-height: 1.35;
}
.statistics-copywriters { display: flex; flex-wrap: wrap; gap: 8px; }
.statistics-copywriter-option {
  min-width: 130px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid #d8dde5;
  background: #fff;
  cursor: pointer;
  user-select: none;
}
.statistics-copywriter-option:hover { border-color: var(--statistics-color); }
.statistics-copywriter-option input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; pointer-events: none; }
.statistics-copywriter-option > span {
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid #cbd2dc;
  color: transparent;
  background: #fff;
  font-size: 13px;
}
.statistics-copywriter-option input:checked + span { border-color: var(--statistics-color); color: #fff; background: var(--statistics-color); }
.statistics-copywriter-option input:focus-visible + span { outline: 2px solid color-mix(in srgb, var(--statistics-color) 28%, transparent); outline-offset: 2px; }
.statistics-copywriter-option strong { color: #263142; font-size: 11px; font-weight: 680; }
.statistics-bar {
  min-width: 0;
  height: 20px;
  min-height: 20px;
  display: flex;
  overflow: hidden;
  border: 1px solid #d5dbe4;
  background: #f5f7f9;
}
.statistics-bar.is-empty { align-items: center; justify-content: center; padding: 0 18px; color: #8a93a1; font-size: 10px; text-align: center; }
.statistics-segment {
  min-width: 0;
  flex: var(--statistics-share) 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  gap: 5px;
  padding: 0 7px;
  color: #fff;
  background: var(--statistics-color);
  border-right: 1px solid rgba(255,255,255,.42);
  text-align: center;
}
.statistics-segment:last-child { border-right: 0; }
.statistics-segment strong,
.statistics-segment span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.statistics-segment strong { font-size: 8px; font-weight: 760; }
.statistics-segment span { font-size: 8px; opacity: .88; }
.statistics-legend { display: flex; flex-wrap: wrap; gap: 7px 16px; }
.statistics-legend > span { display: inline-flex; align-items: center; gap: 6px; color: #707a88; font-size: 9px; }
.statistics-legend i { width: 7px; height: 7px; flex: 0 0 auto; background: var(--statistics-color); }
.statistics-legend strong { color: #263142; font-weight: 760; }
.statistics-copywriter-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}
.statistics-copywriter-summary-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr);
  gap: 9px;
  padding: 0 14px;
  border-right: 1px solid #e1e5eb;
}
.statistics-copywriter-summary-item:first-child { padding-left: 0; }
.statistics-copywriter-summary-item:last-child { padding-right: 0; border-right: 0; }
.statistics-copywriter-summary-item > i { width: 9px; height: 9px; margin-top: 3px; background: var(--statistics-color); }
.statistics-copywriter-summary-item > div { min-width: 0; display: grid; gap: 3px; }
.statistics-copywriter-summary-item strong { overflow: hidden; color: #263142; font-size: 10px; font-weight: 760; text-overflow: ellipsis; white-space: nowrap; }
.statistics-copywriter-summary-item span { color: #7a8493; font-size: 8px; line-height: 1.25; white-space: nowrap; }
.statistics-posts-bar .statistics-segment strong { display: none; }
.statistics-posts-bar .statistics-segment span { font-size: 8px; opacity: .92; }
.statistics-empty-copy { margin: 0; color: #7a8493; font-size: 10px; }
.notepad-editor-shell {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) 0fr;
  border: 1px solid rgba(229, 0, 43, .58);
  background: #fff;
  box-shadow: 0 0 0 0 rgba(229, 0, 43, 0);
  transition: grid-template-rows .2s cubic-bezier(.22, 1, .36, 1), border-color .16s ease, box-shadow .16s ease;
}

@media (max-width: 720px) {
  .statistics-overlay { padding: 0; }
  .statistics-panel {
    width: 100vw;
    height: 100dvh;
    gap: 22px;
    padding: 30px 18px 22px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .statistics-panel h2 { padding-right: 46px; font-size: 38px; }
  .statistics-close { top: 12px; right: 12px; }
  .statistics-content { gap: 20px; padding-right: 0; }
  .statistics-filter-section,
  .statistics-metric { gap: 11px; padding-bottom: 19px; }
  .statistics-filter-section { grid-template-columns: 1fr; align-items: stretch; }
  .statistics-copywriters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .statistics-copywriter-option { min-width: 0; min-height: 40px; padding: 0 10px; }
  .statistics-bar { height: 22px; min-height: 22px; }
  .statistics-segment { padding-inline: 5px; }
  .statistics-segment strong { font-size: 8px; }
  .statistics-segment span { font-size: 8px; }
  .statistics-copywriter-summary { grid-template-columns: 1fr; gap: 8px; }
  .statistics-copywriter-summary-item,
  .statistics-copywriter-summary-item:first-child,
  .statistics-copywriter-summary-item:last-child { padding: 0; border-right: 0; }
  .statistics-copywriter-summary-item > div { grid-template-columns: minmax(76px, 1fr) auto auto; align-items: center; gap: 8px; }
}
.notepad-editor-shell.is-emoji-open {
  grid-template-rows: auto minmax(150px, 1fr) minmax(255px, .9fr);
}
.notepad-editor-shell:focus-within {
  border-color: #e5002b;
  box-shadow: 0 0 0 2px rgba(229, 0, 43, .1);
}
.notepad-toolbar {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 7px;
  border-bottom: 1px solid rgba(229, 0, 43, .25);
  background: rgba(229, 0, 43, .025);
}
.notepad-toolbar > span {
  width: 1px;
  height: 18px;
  margin: 0 4px;
  background: rgba(229, 0, 43, .22);
}
.notepad-toolbar button {
  width: 34px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 2px;
  color: #6b7280;
  background: transparent;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
.notepad-toolbar button:hover,
.notepad-toolbar button.is-active { border-color: rgba(229, 0, 43, .22); color: #e5002b; background: #fff; }
.notepad-toolbar #notepadEmojiButton .apple-emoji { width: 18px; height: 18px; margin: 0; vertical-align: 0; }
.notepad-editor {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 22px 24px;
  outline: 0;
  color: #111827;
  background: transparent;
  caret-color: #e5002b;
  font: 18px/1.5 "Korzinka Regular", ui-sans-serif, system-ui, sans-serif;
  overflow-wrap: anywhere;
  tab-size: 2;
  white-space: pre-wrap;
  scrollbar-color: #e5002b transparent;
  scrollbar-width: thin;
}
.notepad-editor:empty::before { content: attr(data-placeholder); color: #94a3b8; pointer-events: none; }
.notepad-editor::selection,
.notepad-editor *::selection { background: rgba(229, 0, 43, .18); }
.notepad-editor div,
.notepad-editor p { min-height: 0; margin: 0; padding: 0; }
.notepad-editor a { color: #e5002b; text-decoration: underline; text-underline-offset: 2px; }
.notepad-editor .apple-emoji { user-select: all; }
.notepad-link-popover {
  position: absolute;
  z-index: 4;
  top: 46px;
  left: 8px;
  width: min(390px, calc(100% - 16px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  padding: 9px;
  border: 1px solid rgba(229, 0, 43, .35);
  background: #fff;
  box-shadow: 0 14px 34px rgba(7, 17, 31, .17);
}
.notepad-link-popover[hidden] { display: none; }
.notepad-link-popover input {
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #d5dae1;
  border-radius: 2px;
  outline: 0;
  font-size: 12px;
}
.notepad-link-popover input:focus { border-color: #e5002b; }
.notepad-link-popover button {
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid #e5002b;
  border-radius: 2px;
  color: #fff;
  background: #e5002b;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}
.notepad-link-popover #notepadLinkRemove {
  grid-column: 1 / -1;
  min-height: 30px;
  color: #e5002b;
  background: #fff;
}
.notepad-emoji-picker {
  position: relative;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-rows: auto minmax(90px, 1fr);
  grid-template-areas:
    "categories title"
    "categories grid";
  overflow: hidden;
  border: 0;
  border-top: 1px solid rgba(229, 0, 43, .32);
  background: #fffafa;
  box-shadow: 0 -12px 28px rgba(7, 17, 31, .07);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .15s ease, transform .2s cubic-bezier(.22, 1, .36, 1);
}
.notepad-emoji-picker[hidden] { display: none; }
.notepad-editor-shell.is-emoji-open .notepad-emoji-picker {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.notepad-emoji-categories {
  grid-area: categories;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 3px 4px;
  border-right: 1px solid rgba(229, 0, 43, .14);
  background: rgba(229, 0, 43, .018);
  scrollbar-width: none;
}
.notepad-emoji-categories::-webkit-scrollbar { display: none; }
.notepad-emoji-category {
  position: relative;
  width: 32px;
  height: 26px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-left: 2px solid transparent;
  border-radius: 2px;
  color: #7b8593;
  background: transparent;
  font-size: 16px;
  cursor: pointer;
}
.notepad-emoji-category:hover { background: rgba(229, 0, 43, .045); }
.notepad-emoji-category.is-active { border-left-color: #e5002b; background: rgba(229, 0, 43, .065); }
.notepad-emoji-category .apple-emoji { width: 18px; height: 18px; margin: 0; vertical-align: 0; }
.notepad-emoji-group-title {
  grid-area: title;
  min-height: 22px;
  display: flex;
  align-items: center;
  padding: 1px 8px 0;
  color: #667085;
  font-family: "Korzinka Regular", ui-sans-serif, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 400;
}
.notepad-emoji-grid {
  grid-area: grid;
  min-height: 90px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(30px, 1fr));
  align-content: start;
  gap: 1px;
  overflow-y: auto;
  padding: 3px 6px 7px;
  scrollbar-color: #e5002b transparent;
  scrollbar-width: thin;
}
.notepad-emoji-option {
  min-width: 0;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  cursor: pointer;
}
.notepad-emoji-option:hover,
.notepad-emoji-option:focus-visible { border-color: rgba(229, 0, 43, .18); background: rgba(229, 0, 43, .05); outline: 0; }
.notepad-emoji-option .apple-emoji { width: 22px; height: 22px; margin: 0; vertical-align: 0; }
.notepad-emoji-empty {
  grid-column: 1 / -1;
  padding: 28px 12px;
  color: #8a929c;
  font-family: "Korzinka Regular", ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  text-align: center;
}
.aaaa-canvas {
  position: fixed;
  z-index: 220;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  display: none;
  pointer-events: none;
}
body[data-scope="korzinka"] .aaaa-canvas.is-active { display: block; }

@media (max-width: 760px) {
  body[data-scope="korzinka"] .topbar { grid-template-columns: minmax(0, 1fr) auto; }
  body[data-scope="korzinka"] .week-picker-button small { display: none; }
  body[data-scope="korzinka"] .week-picker-button { padding-inline: 9px; }
  body[data-scope="korzinka"] .site-footer { padding-inline: 12px; }
  body[data-scope="korzinka"] .korzinka-footer-copy { display: none; }
  .product-editor-panel { width: calc(100vw - 12px); height: calc(100dvh - 12px); }
  .notepad-panel { width: calc(100vw - 12px); height: calc(100dvh - 12px); padding: 54px 20px 20px; }
}
body[data-scope="korzinka"] .column[data-status="copywriter"] { --status: var(--amber); }
body[data-scope="korzinka"] .column[data-status="designer"] { --status: var(--blue); }
body[data-scope="korzinka"] .column[data-status="approval"] { --status: var(--coral); }
body[data-scope="korzinka"] .column[data-status="released"] { --status: var(--emerald); }
body[data-scope="korzinka"] .label-filter-popover { width: min(390px, calc(100vw - 24px)); }
body[data-scope="korzinka"] .card-list[data-status="take"] { gap: 10px; }
.take-day-group {
  position: relative;
  width: calc(100% + 14px);
  display: grid;
  gap: 7px;
  margin-inline: -7px;
}
.take-day-group + .take-day-group { padding-top: 3px; }
.take-day-heading {
  position: sticky;
  z-index: 20;
  top: 44px;
  width: 100%;
  min-height: 22px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 14px;
  border: 1px solid transparent;
  color: #6c7684;
  background: color-mix(in srgb, var(--status) 7%, #fff);
  text-align: left;
  appearance: none;
  font-size: 7.5px;
  line-height: 1;
  cursor: pointer;
  transition: border-color .14s ease, background-color .14s ease;
}
.take-day-heading:hover { background: color-mix(in srgb, var(--status) 11%, #fff); }
.take-day-heading:focus-visible { outline: 2px solid #246bfe; outline-offset: -2px; }
.take-day-heading span { color: #344052; font-weight: 760; }
.take-day-heading i { color: #a7afb9; font-style: normal; }
.take-day-heading strong { font-weight: 620; }
.take-day-chevron {
  margin-left: auto;
  font-size: 12px;
  transition: transform .14s ease;
}
.take-day-cards { position: relative; z-index: 1; display: grid; gap: 8px; padding-inline: 7px; }
.take-day-group.is-collapsed { gap: 0; }
.take-day-group.is-collapsed .take-day-heading {
  position: relative;
  top: auto;
  min-height: 29px;
  padding: 5px 14px;
  border-right: 0;
  border-left: 0;
  border-radius: 0 !important;
  background: #fff;
}
.take-day-group.is-collapsed .take-day-chevron { transform: rotate(-90deg); }
.take-day-group.is-collapsed .take-day-cards { display: none; }
.take-day-group.is-collapsed.is-done .take-day-heading { border-color: #20aa67; background: #f4fbf7; }
.take-day-group.is-collapsed.is-overdue .take-day-heading { border-color: #ef525f; background: #fff6f7; }
.take-day-group.is-collapsed.is-progress .take-day-heading { border-color: #f2a62b; background: #fff9ef; }
.take-day-group.is-collapsed.is-neutral .take-day-heading { border-color: #c9d0da; background: #f8f9fa; }
.card.is-schedule-mirror h3 { color: #111827; }
.card.is-schedule-mirror.is-schedule-progress h3 { color: #d97706; }
.card.is-schedule-mirror.is-schedule-done h3 { color: #148b52; }
.card.is-schedule-mirror.is-schedule-done {
  border: 2px solid #20aa67;
  box-shadow: none;
}
.card.is-schedule-mirror.is-schedule-done:hover {
  border-color: #148b52;
  box-shadow: none;
}
body[data-scope="korzinka"] .card.is-sheet-rename-old,
body[data-scope="korzinka"] .card.is-sheet-rename-old:hover {
  border-color: #e5002b !important;
  background: #fff5f7 !important;
  box-shadow: inset 4px 0 0 #e5002b !important;
}
body[data-scope="korzinka"] .card.is-sheet-rename-new,
body[data-scope="korzinka"] .card.is-sheet-rename-new:hover {
  border-color: #7c3aed !important;
  background: #f8f5ff !important;
  box-shadow: inset 4px 0 0 #7c3aed !important;
}
body[data-scope="korzinka"] .card.is-sheet-rename-old h3 { color: #bd1530 !important; }
body[data-scope="korzinka"] .card.is-sheet-rename-new h3 { color: #6330b8 !important; }
body[data-scope="korzinka"].grid-mode .card-list { gap: 6px; padding: 7px; }
body[data-scope="korzinka"].grid-mode .take-day-cards { gap: 6px; }
body[data-scope="korzinka"].grid-mode .card {
  height: 70px;
  min-height: 70px;
  grid-template-rows: 12px 16px 16px;
  gap: 3px;
  padding: 7px 9px;
}
body[data-scope="korzinka"].grid-mode .card:hover { padding: 7px 9px; }
body[data-scope="korzinka"].grid-mode .card:has(.card-label),
body[data-scope="korzinka"].grid-mode .card:has(.card-footer) { min-height: 70px; }
body[data-scope="korzinka"].grid-mode .card .card-labels { min-height: 12px; height: 12px; gap: 6px; }
body[data-scope="korzinka"] .card-label { max-width: 92px; font-size: 7.5px; }
body[data-scope="korzinka"] .card h3 { font-size: var(--potok-card-title-size); line-height: 1.3; }
body[data-scope="korzinka"] .card-footer {
  min-width: 0;
  min-height: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 0;
}
.card-footer-actions { min-width: 0; display: inline-flex; align-items: center; justify-content: flex-end; gap: 7px; margin-left: auto; }
.card-footer-actions:empty { display: none; }
body[data-scope="korzinka"] .card-footer .card-focus-button {
  position: relative;
  right: auto;
  bottom: auto;
  flex: 0 0 auto;
}
body[data-scope="korzinka"] .card-footer .card-delete-button {
  position: static;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  font-size: 11px;
}
body[data-scope="korzinka"] .due { overflow: hidden; font-size: var(--potok-card-meta-size); text-overflow: ellipsis; }

.sheet-sync-button {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  margin-left: 7px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--status) 34%, #ccd2da);
  color: #324054;
  background: rgba(255, 255, 255, .72);
  font-size: 13px;
  cursor: pointer;
}
.sheet-sync-button:hover { border-color: var(--status); background: #fff; }
.sheet-sync-button.is-loading i { animation: spin .75s linear infinite; }
.sheet-sync-button:disabled { cursor: wait; opacity: .65; }
@keyframes spin { to { transform: rotate(360deg); } }

body[data-scope="korzinka"] .drawer-meta-grid { grid-template-columns: 1fr; }
.drawer-asana-field {
  gap: 7px;
  margin-top: 16px;
  color: #6b7280;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.drawer-asana-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 7px;
}
.drawer-asana-control input {
  min-width: 0;
  height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line);
  outline: 0;
  color: var(--ink);
  background: #fafaf9;
  font-size: 10px;
  text-transform: none;
}
.drawer-asana-control input:focus {
  border-color: #8db0ef;
  box-shadow: 0 0 0 3px rgba(36, 107, 254, .09);
}
.drawer-asana-control a {
  display: grid;
  place-items: center;
  border: 1px solid #cfd5dc;
  color: #174fae;
  background: #fff;
  font-size: 16px;
  text-decoration: none;
}
.drawer-asana-control a[hidden] { display: none; }

.assignment-dialog { width: min(500px, calc(100% - 32px)); }
.assignment-dialog form { padding: 22px; }
.assignment-copy {
  margin: 0 0 16px;
  color: #687485;
  font-size: 10px;
  line-height: 1.5;
}
.assignment-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 20px;
}
.assignment-option {
  min-height: 42px;
  display: grid;
  grid-template-columns: 15px 9px 1fr;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid #d4d9e2;
  background: #fff;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}
.sheet-change-notice {
  --sheet-change-color: #7c3aed;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--sheet-change-color) 44%, #d7dce4);
  background: color-mix(in srgb, var(--sheet-change-color) 6%, #fff);
}
.sheet-change-notice[hidden] { display: none !important; }
.sheet-change-notice[data-kind="renamed-old"] { --sheet-change-color: #e5002b; }
.sheet-change-notice-mark {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--sheet-change-color);
}
.sheet-change-notice > div { min-width: 0; display: grid; gap: 3px; }
.sheet-change-notice strong { color: #101828; font-size: 9px; }
.sheet-change-notice > div > span { color: #6f7886; font-size: 8px; line-height: 1.35; }
.sheet-change-notice button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, var(--sheet-change-color) 34%, #ccd2db);
  color: var(--sheet-change-color);
  background: #fff;
  font-size: 8px;
  font-weight: 760;
  cursor: pointer;
}
.sheet-change-notice button:hover { border-color: var(--sheet-change-color); }
.assignment-option:has(input:checked) {
  border-color: var(--label-color);
  background: color-mix(in srgb, var(--label-color) 7%, #fff);
}
.assignment-option input { margin: 0; accent-color: var(--label-color); }
.assignment-option i { width: 9px; height: 9px; background: var(--label-color); }

@media (max-width: 760px) {
  body[data-scope="korzinka"] .korzinka-fixed-project .project-board { height: 100%; min-height: 0; }
  .assignment-options { grid-template-columns: 1fr; }
}

/* Main Potok — compact multi-project workspace */
body[data-scope="potok"] .topbar {
  height: var(--potok-header-height);
  gap: var(--potok-header-gap);
  padding-inline: var(--potok-gutter-x);
}
body[data-scope="potok"] .brand { gap: var(--potok-brand-gap); }
body[data-scope="potok"] .brand-mark { width: var(--potok-brand-mark-size); height: var(--potok-brand-mark-size); }
body[data-scope="potok"] .brand-name { font-size: var(--potok-brand-name-size); }
body[data-scope="potok"] .search { height: 38px; }
body[data-scope="potok"] .topbar .icon-button,
body[data-scope="potok"] .topbar .label-library-button,
body[data-scope="potok"] .topbar .grid-button,
body[data-scope="potok"] .topbar .primary-button { min-height: var(--potok-control-height); }
body[data-scope="potok"] .topbar .avatar { width: var(--potok-control-height); height: var(--potok-control-height); }

body[data-scope="potok"] .project-head { min-height: 50px; padding-block: 6px; }
body[data-scope="potok"] .project-name { height: 34px; font-size: 13px; }
body[data-scope="potok"] .project-collapse-button,
body[data-scope="potok"] .project-delete-button { min-height: 32px; }
body[data-scope="potok"] .project-collapse-button { width: 32px; }

body[data-scope="potok"] .columns {
  min-width: 1050px;
  grid-template-columns: minmax(190px, 1fr) 10px repeat(4, minmax(190px, 1fr));
  background: #fbfbfa;
}
body[data-scope="potok"] .workflow-gap {
  min-height: 100%;
  align-self: stretch;
  border: 0;
  background: #fbfbfa;
}
body[data-scope="potok"] .columns > .column:first-of-type {
  position: sticky;
  z-index: 7;
  top: 0;
  left: 0;
  height: 100%;
  max-height: 100%;
  align-self: start;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-right: 1px solid #d4d9e2;
  box-shadow: 10px 0 0 #fbfbfa;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
body[data-scope="potok"] .columns > .column:first-of-type::-webkit-scrollbar { display: none; width: 0; }
body[data-scope="potok"] .column[data-status="consider"] { border-left: 1px solid #d4d9e2; }

body[data-scope="potok"] .card-list { gap: 7px; padding: 8px; }
body[data-scope="potok"] .card {
  min-height: 68px;
  gap: 6px;
  padding: 9px 10px;
}
body[data-scope="potok"] .card:hover { padding: 9px 10px; }
body[data-scope="potok"] .card:has(.card-footer),
body[data-scope="potok"] .card:has(.card-label) { min-height: 68px; }
body[data-scope="potok"] .card-subtitle { display: none !important; }
body[data-scope="potok"] .card-labels { min-height: 12px; height: 12px; gap: 6px; overflow: hidden; }
body[data-scope="potok"] .card-label { max-width: 100px; font-size: 7.5px; }
body[data-scope="potok"] .card h3 {
  overflow: hidden;
  font-size: var(--potok-card-title-size);
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body[data-scope="potok"] .card-footer {
  min-width: 0;
  min-height: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 0;
}
body[data-scope="potok"] .card-footer .card-focus-button {
  position: relative;
  right: auto;
  bottom: auto;
  flex: 0 0 auto;
}
body[data-scope="potok"] .due { overflow: hidden; font-size: var(--potok-card-meta-size); text-overflow: ellipsis; }
body[data-scope="potok"].grid-mode .card-list { gap: 6px; padding: 7px; }
body[data-scope="potok"].grid-mode .card {
  height: 70px;
  min-height: 70px;
  grid-template-rows: 12px 16px 16px;
  gap: 3px;
  padding: 7px 9px;
}
body[data-scope="potok"].grid-mode .card:hover { padding: 7px 9px; }
body[data-scope="potok"].grid-mode .card:has(.card-label),
body[data-scope="potok"].grid-mode .card:has(.card-footer) { min-height: 70px; }

body[data-scope="potok"] .drawer-scroll > .field-label:first-child,
body[data-scope="potok"] #drawerLabelsSettings,
body[data-scope="potok"] .drawer-time-toggle small,
body[data-scope="potok"] .urgent-toggle small { display: none !important; }
body[data-scope="potok"] .drawer-status-field,
body[data-scope="potok"] .subtitle-label,
body[data-scope="potok"] .drawer-subtitle-input,
body[data-scope="potok"] .drawer-status-pill,
body[data-scope="potok"] .drawer-breadcrumb > i { display: none !important; }
body[data-scope="potok"] .drawer-title-input { margin-top: 17px; }
body[data-scope="potok"] .drawer-time-toggle > span,
body[data-scope="potok"] .urgent-toggle span { display: block; }

/* Solo-Potok inherits the universal one-piece time control from the Korzinka workspace. */
@media (min-width: 761px) {
  body[data-scope="potok"] .drawer-time-row {
    position: relative;
    grid-column: 1 / -1;
    grid-template-columns: 72px 36px minmax(0, 1fr);
    grid-template-rows: 42px;
    column-gap: 0;
    row-gap: 0;
    align-items: center;
    min-height: 58px;
    padding: 8px 18px;
    background: #fff;
  }
  body[data-scope="potok"] .drawer-time-row::after {
    position: absolute;
    z-index: 0;
    top: 8px;
    right: 18px;
    bottom: 8px;
    left: 90px;
    content: "";
    border: 1px solid #d2d7de;
    border-radius: 2px;
    background: #fbfbfa;
    pointer-events: none;
    transition: border-color 100ms ease, box-shadow 100ms ease, background 100ms ease;
  }
  body[data-scope="potok"] .drawer-time-row.is-disabled::after {
    background: #fafafa;
  }
  body[data-scope="potok"] .drawer-time-row:has(.drawer-time-toggle:hover, .potok-picker-trigger:hover)::after {
    border-color: #aeb9c7;
  }
  body[data-scope="potok"] .drawer-time-row:has(.drawer-time-toggle input:focus-visible, .potok-picker-trigger:focus-visible, .potok-picker-control.is-open)::after {
    border-color: var(--drawer-accent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--drawer-accent) 10%, transparent);
  }
  body[data-scope="potok"] .drawer-time-row > .drawer-meta-caption {
    position: relative;
    z-index: 1;
    grid-column: 1;
    grid-row: 1;
    display: block;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
  }
  body[data-scope="potok"] .drawer-time-toggle {
    position: relative;
    z-index: 1;
    grid-column: 2;
    grid-row: 1;
    grid-template-columns: 1fr;
    place-items: center;
    gap: 0;
    justify-self: stretch;
    width: 36px;
    min-width: 36px;
    min-height: 42px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  body[data-scope="potok"] .drawer-time-toggle > span {
    display: none;
  }
  body[data-scope="potok"] .drawer-time-row > .potok-picker-control,
  body[data-scope="potok"] .drawer-time-row > input[type="time"] {
    position: relative;
    z-index: 1;
    grid-column: 3;
    grid-row: 1;
    min-width: 0;
    width: 100%;
  }
  body[data-scope="potok"] .drawer-time-row > input[type="time"],
  body[data-scope="potok"] .drawer-time-row > .potok-picker-control .potok-picker-trigger {
    width: 100%;
    height: 42px;
    padding-inline: 7px;
    border: 0;
    border-radius: 0;
    outline: 0;
    outline-offset: 0;
    background: transparent;
    box-shadow: none;
    font-size: 10px;
  }
}

@media (max-width: 760px) {
  body[data-scope="potok"] .topbar { height: 60px; padding-inline: 12px; }
  body[data-scope="potok"] .brand-mark { width: 34px; height: 34px; }
  body[data-scope="potok"] .drawer-time-row > .drawer-meta-caption { display: none; }
}

/* Mobile workspace — swipeable columns, touch-sized controls and full-screen editing. */
.project-mobile-order,
.mobile-card-actions { display: none; }

@media (min-width: 761px) and (max-width: 1024px) {
  body[data-scope="potok"] .columns,
  body[data-scope="korzinka"] .korzinka-fixed-project .columns {
    min-width: max-content;
    grid-template-columns: minmax(320px, 43vw) 12px repeat(4, minmax(320px, 43vw));
  }

  body[data-scope="potok"] .project-board,
  body[data-scope="korzinka"] .korzinka-fixed-project .project-board {
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }
  body[data-scope="potok"] .project-board::-webkit-scrollbar,
  body[data-scope="korzinka"] .korzinka-fixed-project .project-board::-webkit-scrollbar { display: none; width: 0; height: 0; }

  body[data-scope="potok"] .column,
  body[data-scope="korzinka"] .column { scroll-snap-align: start; }

  body[data-scope="potok"] .columns > .column:first-of-type,
  body[data-scope="korzinka"] .korzinka-fixed-project .columns > .column:first-child {
    position: relative;
    left: auto;
    box-shadow: none;
  }

  body[data-scope="potok"] .card h3,
  body[data-scope="korzinka"] .card h3 { font-size: 12px; }
  body[data-scope="potok"] .due,
  body[data-scope="korzinka"] .due { font-size: 8.5px; }
}

@media (min-width: 761px) and (max-width: 900px) {
  body[data-scope="potok"] .topbar {
    grid-template-columns: max-content minmax(180px, 1fr) max-content;
    gap: 10px;
    padding-inline: 14px;
  }
  body[data-scope="potok"] .top-actions { gap: 6px; }
  body[data-scope="potok"] .top-actions .avatar,
  body[data-scope="korzinka"] .top-actions .avatar { display: grid; }
  body[data-scope="potok"] .topbar .grid-button,
  body[data-scope="potok"] .topbar .primary-button {
    width: 38px;
    min-width: 38px;
    padding: 0;
    font-size: 0;
  }
  body[data-scope="potok"] .topbar .grid-button > i,
  body[data-scope="potok"] .topbar .primary-button > i { margin: 0; font-size: 17px; }
  body[data-scope="korzinka"] .topbar { gap: 10px; padding-inline: 14px; }
  body[data-scope="korzinka"] .top-actions { gap: 7px; }
}

@media (max-width: 760px) {
  :root { --mobile-gutter: 12px; }

  html,
  body { width: 100%; max-width: 100%; }

  body {
    overscroll-behavior-x: none;
    -webkit-text-size-adjust: 100%;
  }

  body.drawer-open { overflow: hidden; }

  .topbar,
  body[data-scope="potok"] .topbar,
  body[data-scope="korzinka"] .topbar {
    height: auto;
    min-height: 0;
    gap: 8px;
    padding: max(8px, env(safe-area-inset-top)) var(--mobile-gutter) 10px;
  }

  body.drawer-open .topbar,
  body[data-scope="potok"].drawer-open .topbar,
  body[data-scope="korzinka"].drawer-open .topbar { padding-right: var(--mobile-gutter); }

  .brand { gap: 8px; }
  .brand-mark,
  body[data-scope="potok"] .brand-mark,
  body[data-scope="korzinka"] .brand-mark { width: 34px; height: 34px; }
  .brand-name,
  body[data-scope="potok"] .brand-name,
  body[data-scope="korzinka"] .brand-name { font-size: 20px; }

  .top-actions .avatar {
    width: 44px;
    height: 44px;
    display: grid;
  }
  body[data-scope="potok"] .topbar .avatar { width: 44px; height: 44px; }

  body[data-scope="potok"] .topbar {
    grid-template-columns: minmax(0, 1fr) max-content;
    grid-template-areas: "brand actions" "search search";
  }
  body[data-scope="potok"] .brand { grid-area: brand; }
  body[data-scope="potok"] .search {
    grid-area: search;
    width: 100%;
    height: 44px;
    margin: 0;
  }
  body[data-scope="potok"] .search input { font-size: 16px; }
  body[data-scope="potok"] .top-actions {
    grid-area: actions;
    gap: 6px;
  }
  body[data-scope="potok"] .topbar .label-library-button {
    width: auto;
    min-width: 58px;
    min-height: 44px;
    padding: 0 8px;
    font-size: 9.5px;
  }
  body[data-scope="potok"] .topbar .grid-button,
  body[data-scope="potok"] .topbar .primary-button {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
  }
  body[data-scope="potok"] .topbar .grid-button { font-size: 0; }
  body[data-scope="potok"] .topbar .grid-button > i { font-size: 18px; }
  body[data-scope="potok"] .topbar .primary-button { font-size: 0; }
  body[data-scope="potok"] .topbar .primary-button > i { margin: 0; font-size: 19px; }
  body[data-scope="potok"] .toolbar-count { display: none; }

  body[data-scope="korzinka"] .topbar {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
  }
  body[data-scope="korzinka"] .brand {
    width: 100%;
    min-width: 0;
  }
  body[data-scope="korzinka"] .brand-scope { min-width: 0; gap: 7px; }
  body[data-scope="korzinka"] .brand-scope > span { font-size: 16px; }
  body[data-scope="korzinka"] .brand-scope > strong {
    overflow: hidden;
    font-size: 17px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body[data-scope="korzinka"] .top-actions {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) max-content 44px;
    gap: 7px;
  }
  body[data-scope="korzinka"] .week-picker-wrap,
  body[data-scope="korzinka"] .label-filter-wrap { min-width: 0; }
  body[data-scope="korzinka"] .topbar .week-picker-button,
  body[data-scope="korzinka"] .topbar .label-library-button,
  body[data-scope="korzinka"] .topbar .statistics-button {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    justify-content: center;
    padding: 0 9px;
    font-size: 10px;
  }
  body[data-scope="korzinka"] .topbar .label-library-button { font-size: 10px; }
  body[data-scope="korzinka"] .topbar .statistics-button { width: auto; padding-inline: 10px; }
  body[data-scope="korzinka"] .topbar .content-table-link { width: 100%; padding-inline: 7px; }
  body[data-scope="korzinka"] .topbar .avatar { width: 44px; height: 44px; }
  body[data-scope="korzinka"] .toolbar-count { display: inline; font-size: 8px; }

  main,
  body[data-scope="potok"] main {
    width: 100%;
    min-width: 0;
    padding: 10px var(--mobile-gutter) 78px;
  }

  .project-stack { width: 100%; min-width: 0; }

  body[data-scope="potok"] .project-head {
    min-height: 54px;
    gap: 6px;
    padding: 6px 0;
  }
  body[data-scope="potok"] .project-title-wrap { min-width: 0; }
  body[data-scope="potok"] .project-name {
    width: 100%;
    min-width: 0;
    height: 40px;
    padding-inline: 5px;
    font-size: 14px;
  }
  body[data-scope="potok"] .project-tools { flex: 0 0 auto; gap: 5px; }
  .project-mobile-order { display: inline-flex; gap: 4px; }
  .project-mobile-order button,
  body[data-scope="potok"] .project-collapse-button,
  body[data-scope="potok"] .project-delete-button {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid #d6dce3;
    background: #fff;
    font: inherit;
    cursor: pointer;
  }
  .project-mobile-order button { font-size: 16px; }
  .project-mobile-order button:disabled { color: #a5adb8; background: #f4f5f6; cursor: default; }
  body[data-scope="potok"] .project-delete-button { font-size: 0; }
  body[data-scope="potok"] .project-delete-button > i { font-size: 16px; }

  .project-board,
  body[data-scope="potok"] .project-board {
    height: min(var(--board-height, 430px), 58dvh);
    min-height: 360px;
    max-height: 520px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-padding-inline: 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .project-board::-webkit-scrollbar,
  body[data-scope="potok"] .project-board::-webkit-scrollbar { display: none; width: 0; height: 0; }

  .columns,
  body[data-scope="potok"] .columns,
  body[data-scope="korzinka"] .korzinka-fixed-project .columns {
    width: max-content;
    min-width: max-content;
    height: 100%;
    min-height: 100%;
    grid-template-columns: calc(100vw - 42px) 10px repeat(4, calc(100vw - 42px));
    align-items: stretch;
  }
  .workflow-gap,
  body[data-scope="potok"] .workflow-gap,
  body[data-scope="korzinka"] .korzinka-workflow-gap {
    width: 10px;
    min-width: 10px;
    min-height: 100%;
    background: #fbfbfa;
  }
  .column,
  body[data-scope="potok"] .column,
  body[data-scope="korzinka"] .column {
    width: calc(100vw - 42px);
    height: 100%;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .column::-webkit-scrollbar,
  body[data-scope="potok"] .column::-webkit-scrollbar,
  body[data-scope="korzinka"] .column::-webkit-scrollbar { display: none; width: 0; }
  body[data-scope="potok"] .columns > .column:first-of-type,
  body[data-scope="korzinka"] .korzinka-fixed-project .columns > .column:first-child {
    position: relative;
    z-index: 1;
    top: auto;
    left: auto;
    height: 100%;
    max-height: none;
    box-shadow: none;
  }

  .column-head,
  body[data-scope="potok"] .column-head,
  body[data-scope="korzinka"] .column-head {
    position: sticky;
    z-index: 35;
    top: 0;
    min-height: 44px;
    padding-inline: 12px;
  }
  .column-title,
  body[data-scope="potok"] .column-title { font-size: 11px; }
  .column-count,
  body[data-scope="potok"] .column-count { font-size: 10px; }

  .card-list,
  body[data-scope="potok"] .card-list,
  body[data-scope="korzinka"] .card-list {
    min-height: calc(100% - 44px);
    gap: 8px;
    padding: 10px;
  }
  .card,
  body[data-scope="potok"] .card,
  body[data-scope="korzinka"] .card {
    min-height: 82px;
    gap: 7px;
    padding: 11px 12px;
    -webkit-user-drag: none;
  }
  .card:hover,
  body[data-scope="potok"] .card:hover,
  body[data-scope="korzinka"] .card:hover { padding: 11px 12px; }
  .card-labels,
  body[data-scope="potok"] .card-labels { min-height: 15px; height: 15px; }
  .card-label,
  body[data-scope="potok"] .card-label,
  body[data-scope="korzinka"] .card-label { font-size: 10px; }
  .card h3,
  body[data-scope="potok"] .card h3,
  body[data-scope="korzinka"] .card h3 {
    font-size: 13px;
    line-height: 1.35;
  }
  .card-footer,
  body[data-scope="potok"] .card-footer,
  body[data-scope="korzinka"] .card-footer {
    min-height: 20px;
    height: 20px;
  }
  .due,
  body[data-scope="potok"] .due,
  body[data-scope="korzinka"] .due { font-size: 9.5px; }
  body[data-scope="potok"].grid-mode .card {
    height: 82px;
    min-height: 82px;
    grid-template-rows: 15px 18px 20px;
    gap: 5px;
    padding: 9px 11px;
  }
  body[data-scope="potok"].grid-mode .card:hover { padding: 9px 11px; }
  .card-list > .add-card,
  body[data-scope="potok"] .card-list > .add-card,
  body[data-scope="korzinka"] .card-list > .add-card {
    min-height: 48px;
    padding-inline: 12px;
    font-size: 10.5px;
  }

  body[data-scope="korzinka"] main {
    min-height: 0;
    padding: 8px 10px 10px;
  }
  body[data-scope="korzinka"] .korzinka-fixed-project .project-board {
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
  }
  body[data-scope="korzinka"] .take-day-group {
    width: calc(100% + 20px);
    margin-inline: -10px;
  }
  body[data-scope="korzinka"] .take-day-heading {
    top: 44px;
    min-height: 34px;
    padding: 7px 14px;
    font-size: 9.5px;
  }
  body[data-scope="korzinka"] .take-day-cards { padding-inline: 10px; }
  body[data-scope="korzinka"] .sheet-sync-button {
    width: 34px;
    height: 34px;
    margin-left: 4px;
    font-size: 16px;
  }
  body[data-scope="korzinka"] .site-footer {
    height: calc(56px + env(safe-area-inset-bottom));
    min-height: calc(56px + env(safe-area-inset-bottom));
    padding: 0 10px env(safe-area-inset-bottom);
  }
  body[data-scope="korzinka"] .korzinka-footer-actions {
    width: 100%;
    justify-content: flex-end;
    gap: 8px;
  }
  body[data-scope="korzinka"] .korzinka-footer-aaaa,
  body[data-scope="korzinka"] .korzinka-footer-editor,
  body[data-scope="korzinka"] .korzinka-footer-notepad {
    min-height: 44px;
    padding-inline: 13px;
    font-size: 10px;
  }

  .drawer {
    z-index: 200;
    width: 100vw;
    height: 100dvh;
    border-left: 0;
    box-shadow: none;
  }
  .drawer-head {
    min-height: calc(56px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 12px 0 16px;
  }
  .drawer-breadcrumb { font-size: 9px; }
  .drawer-close {
    width: 44px;
    height: 44px;
    font-size: 22px;
  }
  .drawer-scroll {
    padding: 0 16px calc(28px + env(safe-area-inset-bottom));
    overscroll-behavior-y: contain;
  }
  .drawer-scroll > .field-label:first-child { margin-top: 16px; }
  .drawer-title-input {
    min-height: 50px;
    font-size: 23px;
  }
  .drawer-subtitle-input,
  .drawer-meta-field select,
  .drawer-meta-field input,
  .drawer-time-row > input[type="time"],
  .drawer-asana-control input,
  .editor-link-popover input,
  .emoji-picker-head input { font-size: 16px; }
  .drawer-subtitle-input { height: 46px; }
  .drawer-meta-grid {
    grid-template-columns: 1fr;
    margin-inline: -16px;
  }
  .drawer-meta-field { min-height: 68px; padding: 10px 16px; }
  .drawer-meta-field + .drawer-meta-field { border-top: 1px solid #d9dde3; border-left: 0; }
  .drawer-meta-field span,
  .field-label { font-size: 9px; }
  .drawer-meta-field select,
  .drawer-meta-field input { height: 44px; }
  .drawer-time-row {
    min-height: 64px;
    grid-template-columns: minmax(0, 1fr) 112px;
    gap: 10px;
    padding: 9px 16px;
  }
  .drawer-time-row > input[type="time"] { width: 112px; height: 44px; }
  .drawer-time-toggle { grid-template-columns: 24px minmax(0, 1fr); }
  .drawer-time-toggle > i,
  .urgent-toggle > i { width: 24px; height: 24px; }
  .drawer-time-toggle strong,
  .urgent-toggle strong { font-size: 11px; }
  .urgent-toggle { min-height: 60px; padding: 10px 16px; }
  .drawer-asana-field { margin-top: 18px; font-size: 9px; }
  .drawer-asana-control { grid-template-columns: minmax(0, 1fr) 44px; }
  .drawer-asana-control input,
  .drawer-asana-control a { height: 44px; }
  .sheet-change-notice {
    grid-template-columns: 10px minmax(0, 1fr);
    margin: 14px 0 0;
    padding: 12px;
  }
  .sheet-change-notice strong { font-size: 11px; }
  .sheet-change-notice > div > span { font-size: 10px; }
  .sheet-change-notice button {
    grid-column: 1 / -1;
    min-height: 44px;
    font-size: 10px;
  }

  .mobile-card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin: 16px 0;
  }
  .mobile-card-actions button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 9px;
    border: 1px solid #cfd5dc;
    color: #26354a;
    background: #fff;
    font: inherit;
    font-size: 10px;
    font-weight: 720;
    cursor: pointer;
  }
  .mobile-card-actions button:disabled { color: #9aa3af; background: #f5f6f7; cursor: default; }
  body[data-scope="potok"] .mobile-card-actions .korzinka-only { display: none; }
  body[data-scope="korzinka"] .drawer-head { justify-content: flex-end; }
  body[data-scope="korzinka"] .mobile-card-actions.is-order-locked #mobileCardUp,
  body[data-scope="korzinka"] .mobile-card-actions.is-order-locked #mobileCardDown { display: none; }

  .card-label-section,
  .drawer-section { margin-inline: -16px; padding-inline: 16px; }
  .card-label-section { padding-block: 16px; }
  .collapsible-title { min-height: 44px; }
  .section-title h2,
  .collapsible-title h2 { font-size: 10px; }
  .drawer-label-option { min-height: 44px; padding-inline: 11px; font-size: 10px; }
  .drawer-label-chip { padding: 6px 8px; font-size: 9.5px; }
  .editor-toolbar {
    min-height: 48px;
    gap: 3px;
    padding: 3px 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .editor-toolbar::-webkit-scrollbar { display: none; }
  .editor-toolbar button { width: 42px; height: 42px; flex: 0 0 auto; font-size: 18px; }
  .description-editor { min-height: 230px; padding: 14px; font-size: 16px; line-height: 1.55; }
  .danger-button { min-height: 48px; font-size: 10px; }

  .label-filter-popover,
  body[data-scope="korzinka"] .label-filter-popover,
  body[data-scope="korzinka"] .week-picker-popover,
  .account-popover,
  .card-label-popover {
    position: fixed;
    z-index: 230;
    inset: auto 8px max(8px, env(safe-area-inset-bottom));
    width: auto;
    max-height: min(74dvh, 620px);
    padding: 15px;
    overflow-y: auto;
    border-color: #cbd2da;
    background: #fff;
    box-shadow: 0 18px 70px rgba(7, 17, 31, .24);
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .filter-popover-head strong { font-size: 12px; }
  .filter-popover-head span { font-size: 10px; }
  .filter-actions button { min-height: 42px; font-size: 10px; }
  .filter-label-list { max-height: 50dvh; }
  .filter-label-grid { grid-template-columns: 1fr; }
  .filter-label-option { min-height: 44px; font-size: 10.5px; }
  .filter-manage-button { min-height: 44px; font-size: 10px; }
  .week-picker-list { max-height: 58dvh; }
  .week-option { min-height: 58px; padding: 10px 11px; }
  .week-option-copy strong { font-size: 11px; }
  .week-option-copy small { font-size: 9.5px; }
  .account-popover { padding: 0; }
  .account-summary { padding: 14px; }
  .account-popover > button { min-height: 48px; font-size: 10.5px; }

  .editor-link-popover {
    position: fixed;
    z-index: 240;
    inset: auto 8px max(8px, env(safe-area-inset-bottom));
    width: auto;
    padding: 14px;
  }
  .editor-link-popover input { height: 44px; }
  .editor-link-popover button { min-height: 44px; font-size: 10px; }
  .emoji-picker {
    position: fixed;
    z-index: 240;
    inset: calc(64px + env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom));
    width: auto;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
  }
  .emoji-picker[hidden],
  .editor-link-popover[hidden] { display: none !important; }
  .emoji-picker-head label,
  .emoji-picker-head > button { height: 44px; }
  .emoji-grid { max-height: none; }

  .app-dialog,
  .labels-dialog,
  .assignment-dialog,
  .confirm-dialog {
    width: calc(100% - 16px);
    max-width: none;
    max-height: calc(100dvh - 16px);
    margin: auto;
    overflow-y: auto;
  }
  .app-dialog form,
  .labels-dialog-content,
  .assignment-dialog form { padding: 18px; }
  .dialog-head h2 { font-size: 23px; }
  .dialog-close { width: 44px; height: 44px; }
  .dialog-field { min-width: 0; }
  .dialog-field input { width: 100%; min-width: 0; height: 48px; font-size: 16px; }
  .color-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .color-picker label { min-width: 0; min-height: 68px; font-size: 9px; }
  .dialog-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dialog-actions .primary-button,
  .dialog-actions .secondary-button,
  .confirm-danger-button { width: 100%; min-width: 0; min-height: 46px; padding-inline: 8px; font-size: 11px; }
  .label-manager-row { grid-template-columns: 44px minmax(0, 1fr) 44px; }
  .performer-manager-row { grid-template-columns: 14px minmax(0, 1fr) 44px; }
  .label-manager-row input { min-width: 0; font-size: 16px; }
  .label-row-delete { width: 44px; height: 44px; }
  .label-create-form { grid-template-columns: 1fr; }
  .label-create-form > label:first-child { grid-column: auto; }
  .label-create-form input[type="text"] { height: 48px; font-size: 16px; }
  .label-color-field input { width: 100%; height: 48px; }
  .assignment-options { grid-template-columns: 1fr; }
  .assignment-option { min-height: 48px; font-size: 11px; }
  .confirm-dialog form {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    padding: 20px;
  }
  .confirm-actions { grid-column: 1 / -1; width: 100%; }

  .auth-gate {
    inset: 104px 0 0;
    align-items: start;
    padding: 18px 12px;
    overflow-y: auto;
  }
  .auth-card { padding: 26px 22px 24px; }
  .auth-card > img { margin-bottom: 20px; }
  .auth-card h1 { font-size: 27px; }
  .auth-card > p:not(.auth-status) { font-size: 12px; }
  .password-signin input { height: 48px; font-size: 16px; }

  .product-editor-overlay { padding: 0; }
  .product-editor-panel {
    width: 100vw;
    height: 100dvh;
    border: 0;
  }
  .product-editor-close {
    top: max(10px, env(safe-area-inset-top));
    right: 10px;
    width: 44px;
    height: 44px;
  }
  .notepad-overlay { padding: 0; }
  .notepad-panel {
    width: 100vw;
    height: 100dvh;
    gap: 18px;
    padding: max(68px, calc(env(safe-area-inset-top) + 58px)) 12px max(12px, env(safe-area-inset-bottom));
    border: 0;
  }
  .notepad-panel h2 { font-size: 38px; }
  .notepad-close {
    top: max(10px, env(safe-area-inset-top));
    right: 10px;
    width: 44px;
    height: 44px;
  }
  .notepad-toolbar { min-height: 48px; overflow-x: auto; scrollbar-width: none; }
  .notepad-toolbar::-webkit-scrollbar { display: none; }
  .notepad-toolbar button { width: 42px; height: 40px; flex: 0 0 auto; font-size: 19px; }
  .notepad-toolbar #notepadEmojiButton .apple-emoji { width: 21px; height: 21px; }
  .notepad-editor { padding: 18px 16px; font-size: 18px; }
  .notepad-editor-shell.is-emoji-open {
    grid-template-rows: auto minmax(128px, 1fr) minmax(220px, .88fr);
  }
  .notepad-link-popover { grid-template-columns: minmax(0, 1fr); }
  .notepad-link-popover input,
  .notepad-link-popover button { min-height: 44px; }
  .notepad-emoji-picker {
    width: 100%;
  }
  .notepad-emoji-category { width: 32px; height: 26px; }
  .notepad-emoji-grid { grid-template-columns: repeat(auto-fill, minmax(29px, 1fr)); }
  .notepad-emoji-option { height: 32px; }

  .toast-region {
    right: 10px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    left: 10px;
  }
  .toast { width: 100%; max-width: none; padding: 13px 14px; font-size: 11px; }
  .tour-card { width: calc(100vw - 20px); }
  .tour-actions button { min-height: 44px; }

  body[data-scope="potok"] .site-footer.is-expanded {
    height: auto;
    min-height: 138px;
    padding: 16px 14px calc(16px + env(safe-area-inset-bottom));
  }
}

/* Unified modal motion and close controls */
.modal-close {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 2px;
  outline: 0;
  color: #617084;
  background: transparent;
  box-shadow: none;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  transition: color 120ms ease, border-color 120ms ease, background-color 120ms ease;
}

.modal-close:hover,
.modal-close:focus-visible {
  border-color: var(--line-strong);
  outline: 0;
  color: #e5002b;
  background: #fff7f8;
  box-shadow: none;
}

.drawer:focus,
.product-editor-panel:focus,
.notepad-panel:focus,
.statistics-panel:focus {
  outline: none;
}

.card-modal-backdrop { display: none; }

body[data-scope="korzinka"] .card-modal-backdrop {
  position: fixed;
  z-index: 205;
  inset: 0;
  display: block;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  background: rgb(7 21 40 / 13%);
  -webkit-backdrop-filter: blur(0);
  backdrop-filter: blur(0);
  transition:
    opacity 160ms ease,
    visibility 0s linear 190ms,
    backdrop-filter 160ms ease;
}

body[data-scope="korzinka"].drawer-open .card-modal-backdrop {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  -webkit-backdrop-filter: blur(2.5px);
  backdrop-filter: blur(2.5px);
  transition-delay: 0s;
}

body[data-scope="korzinka"].drawer-open {
  padding-right: 0;
  overflow: hidden;
}

body[data-scope="korzinka"].drawer-open .topbar { padding-right: var(--potok-gutter-x); }
body[data-scope="korzinka"].drawer-open .site-footer { right: 0; }

body[data-scope="korzinka"] .drawer {
  z-index: 210;
  inset: auto;
  top: 50%;
  right: auto;
  bottom: auto;
  left: 50%;
  width: min(700px, calc(100vw - 32px));
  height: min(820px, calc(100dvh - 32px));
  max-height: calc(100dvh - 32px);
  overflow: hidden;
  border: 1px solid #cbd2da;
  background: #fdfdfc;
  box-shadow: 0 22px 58px rgb(7 21 40 / 18%);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition:
    opacity 160ms ease,
    visibility 0s linear 190ms;
}

body[data-scope="korzinka"].drawer-open .drawer {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  transition-delay: 0s;
}

body[data-scope="potok"] .card-modal-backdrop {
  position: fixed;
  z-index: 205;
  inset: 0;
  display: block;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  background: rgb(7 21 40 / 13%);
  -webkit-backdrop-filter: blur(0);
  backdrop-filter: blur(0);
  transition:
    opacity 160ms ease,
    visibility 0s linear 190ms,
    backdrop-filter 160ms ease;
}

body[data-scope="potok"].drawer-open .card-modal-backdrop {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  -webkit-backdrop-filter: blur(2.5px);
  backdrop-filter: blur(2.5px);
  transition-delay: 0s;
}

body[data-scope="potok"].drawer-open {
  padding-right: 0;
  overflow: hidden;
}

body[data-scope="potok"].drawer-open .topbar { padding-right: var(--potok-gutter-x); }
body[data-scope="potok"].drawer-open .site-footer { right: 0; }

body[data-scope="potok"] .drawer {
  z-index: 210;
  inset: auto;
  top: 50%;
  right: auto;
  bottom: auto;
  left: 50%;
  width: min(700px, calc(100vw - 32px));
  height: min(820px, calc(100dvh - 32px));
  max-height: calc(100dvh - 32px);
  overflow: hidden;
  border: 1px solid #cbd2da;
  background: #fdfdfc;
  box-shadow: 0 22px 58px rgb(7 21 40 / 18%);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition:
    opacity 160ms ease,
    visibility 0s linear 190ms;
}

body[data-scope="potok"].drawer-open .drawer {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  transition-delay: 0s;
}

body[data-scope="korzinka"] .drawer-head {
  justify-content: flex-end;
  min-height: 50px;
  padding: 8px 12px;
}

body[data-scope="korzinka"] .drawer-scroll {
  padding-inline: 24px;
  padding-bottom: 26px;
}

body[data-scope="korzinka"] .drawer-section {
  margin-inline: -24px;
}

body[data-scope="korzinka"] .card-label-section,
body[data-scope="korzinka"] .drawer-section {
  padding-inline: 24px;
}

body[data-scope="korzinka"] .task-history-section {
  display: block;
  padding-block: 18px 20px;
}

.task-history-content { margin-top: 12px; }
.task-history-message {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  color: #778294;
  background: #f7f8f9;
  font-size: 9px;
  line-height: 1.45;
}
.task-history-message.is-loading::before {
  width: 6px;
  height: 6px;
  display: inline-block;
  margin-right: 7px;
  border-radius: 50%;
  background: #8792a2;
  content: "";
  animation: task-history-pulse 900ms ease-in-out infinite alternate;
}
.task-history-message.is-error {
  border-color: #e3d6d8;
  color: #8a6670;
  background: #fffafa;
}
.task-history-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.task-history-item {
  position: relative;
  display: grid;
  grid-template-columns: 11px minmax(0, 1fr);
  gap: 9px;
  min-width: 0;
  padding: 0 0 15px;
}
.task-history-item:last-child { padding-bottom: 0; }
.task-history-item:not(:last-child)::before {
  position: absolute;
  top: 10px;
  bottom: 1px;
  left: 3px;
  width: 1px;
  background: #d8dde3;
  content: "";
}
.task-history-marker {
  position: relative;
  z-index: 1;
  width: 7px;
  height: 7px;
  margin-top: 4px;
  border: 1px solid #9aa4b2;
  background: #fdfdfc;
}
.task-history-body { min-width: 0; }
.task-history-event-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.task-history-event-head strong {
  min-width: 0;
  color: var(--ink);
  font-size: 9.5px;
  font-weight: 720;
  line-height: 1.35;
}
.task-history-event-head time {
  flex: 0 0 auto;
  color: #8a94a3;
  font-size: 8px;
  white-space: nowrap;
}
.task-history-detail,
.task-history-meta {
  margin: 3px 0 0;
  color: #5e6a7a;
  font-size: 8.5px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.task-history-meta { color: #8a94a3; }
.task-history-action {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  margin-top: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #2466c6;
  font: inherit;
  font-size: 8.5px;
  line-height: 1.35;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.task-history-action:disabled { opacity: .45; cursor: wait; }

@keyframes task-history-pulse {
  to { opacity: .35; }
}

body[data-scope="korzinka"] .product-editor-overlay,
body[data-scope="korzinka"] .notepad-overlay,
body[data-scope="korzinka"] .statistics-overlay {
  display: grid;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  -webkit-backdrop-filter: blur(0);
  backdrop-filter: blur(0);
  transition:
    opacity 160ms ease,
    visibility 0s linear 190ms,
    backdrop-filter 160ms ease;
}

body[data-scope="korzinka"] .product-editor-overlay.is-open,
body[data-scope="korzinka"] .notepad-overlay.is-open,
body[data-scope="korzinka"] .statistics-overlay.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  transition-delay: 0s;
}

.product-editor-panel,
.notepad-panel,
.statistics-panel {
  opacity: 0;
  transform: none;
  transition: opacity 160ms ease;
}

.product-editor-overlay.is-open .product-editor-panel,
.notepad-overlay.is-open .notepad-panel,
.statistics-overlay.is-open .statistics-panel {
  opacity: 1;
  transform: none;
}

.product-editor-close.modal-close,
.notepad-close.modal-close,
.statistics-close.modal-close {
  top: 16px;
  right: 16px;
}

body.product-editor-open,
body.notepad-open,
body.statistics-open { overflow: hidden; }

@media (max-width: 760px) {
  body[data-scope="korzinka"].drawer-open .topbar { padding-right: var(--mobile-gutter); }

  body[data-scope="potok"].drawer-open .topbar { padding-right: var(--mobile-gutter); }

  body[data-scope="potok"] .drawer,
  body[data-scope="korzinka"] .drawer {
    top: auto;
    right: 8px;
    bottom: 8px;
    left: 8px;
    width: auto;
    height: min(92dvh, 820px);
    max-height: calc(100dvh - 16px);
    border: 1px solid #cbd2da;
    box-shadow: 0 18px 54px rgb(7 21 40 / 22%);
    transform: none;
  }

  body[data-scope="potok"].drawer-open .drawer,
  body[data-scope="korzinka"].drawer-open .drawer { transform: none; }

  body[data-scope="korzinka"] .drawer-head {
    min-height: 50px;
    padding: 8px 10px 8px 16px;
  }

  body[data-scope="korzinka"] .drawer-scroll {
    padding-inline: 16px;
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }

  body[data-scope="korzinka"] .drawer-meta-grid,
  body[data-scope="korzinka"] .card-label-section,
  body[data-scope="korzinka"] .drawer-section {
    margin-inline: -16px;
  }

  body[data-scope="korzinka"] .drawer-meta-field,
  body[data-scope="korzinka"] .drawer-time-row,
  body[data-scope="korzinka"] .urgent-toggle,
  body[data-scope="korzinka"] .card-label-section,
  body[data-scope="korzinka"] .drawer-section {
    padding-inline: 16px;
  }

  body[data-scope="korzinka"] .task-history-section { padding-block: 16px 18px; }
  .task-history-event-head { align-items: flex-start; }
  .task-history-event-head time { padding-top: 1px; font-size: 8.5px; }
  .task-history-event-head strong { font-size: 10px; }
  .task-history-detail,
  .task-history-meta { font-size: 9px; }

  .product-editor-close.modal-close,
  .notepad-close.modal-close,
  .statistics-close.modal-close {
    top: max(12px, env(safe-area-inset-top));
    right: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-scope="potok"] .card-modal-backdrop,
  body[data-scope="potok"] .drawer,
  body[data-scope="korzinka"] .card-modal-backdrop,
  body[data-scope="korzinka"] .drawer,
  body[data-scope="korzinka"] .product-editor-overlay,
  body[data-scope="korzinka"] .notepad-overlay,
  body[data-scope="korzinka"] .statistics-overlay,
  .product-editor-panel,
  .notepad-panel,
  .statistics-panel {
    transition-duration: 1ms;
  }
}

.drawer-post-poa {
  grid-template-columns: minmax(0, 3fr) minmax(118px, 1fr);
  align-items: end;
  gap: 12px;
  margin-top: 20px;
}
.drawer-post-poa .drawer-asana-field { margin-top: 0; }
.drawer-planned-toggle {
  position: relative;
  min-height: 48px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid #cfd5dc;
  color: #425065;
  background: #fafaf9;
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
}
.drawer-planned-toggle input { position: absolute; opacity: 0; }
.drawer-planned-toggle i {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1px solid #9ea8b6;
  background: #fff;
}
.drawer-planned-toggle input:checked + i {
  border-color: #246bfe;
  background: #246bfe;
}
.drawer-planned-toggle input:checked + i::after {
  content: "✓";
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.push-poa-fields {
  gap: 10px;
  margin-top: 12px;
}
.push-poa-field {
  min-width: 0;
  min-height: 68px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px 96px 25%;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px dashed #bcc5d1;
  outline: 0;
  background: #fafbfc;
}
.push-poa-field:focus,
.push-poa-field.is-dragover {
  border-color: #246bfe;
  box-shadow: 0 0 0 2px rgb(36 107 254 / 9%);
}
.push-poa-field > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.push-poa-field > div strong {
  color: #344256;
  font-size: 10px;
  letter-spacing: .045em;
}
.push-poa-field > div span {
  overflow: hidden;
  color: #8993a1;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.push-poa-preview {
  width: 48px;
  height: 48px;
  overflow: hidden;
  padding: 0;
  border: 1px solid #c9d0da;
  background: #fff;
  cursor: zoom-in;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 220ms ease,
    visibility 0s linear 220ms;
}
.push-poa-preview.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}
.push-poa-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.push-poa-picker {
  min-height: 38px;
  display: grid;
  place-items: center;
  padding: 0 10px;
  border: 1px solid #cfd5dd;
  color: #40506a;
  background: #fff;
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
}
.push-poa-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.push-poa-paste {
  height: 48px;
  display: grid;
  place-items: center;
  border-left: 1px solid #d9dee5;
  color: #9aa3af;
  font-size: 10px;
  font-weight: 700;
  text-transform: lowercase;
}

.poa-lightbox {
  position: fixed;
  z-index: 520;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgb(11 18 29 / 30%);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}
.poa-lightbox.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.poa-lightbox figure {
  position: relative;
  max-width: 50vw;
  max-height: 50vh;
  margin: 0;
}
.poa-lightbox img {
  max-width: 50vw;
  max-height: 50vh;
  display: block;
  object-fit: contain;
  background: #fff;
  box-shadow: 0 25px 70px rgb(7 17 31 / 30%);
}
.poa-lightbox button {
  position: absolute;
  right: 8px;
  bottom: 8px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 11px;
  border: 1px solid rgb(255 255 255 / 60%);
  color: #fff;
  background: rgb(13 26 45 / 86%);
  font-size: 8px;
  font-weight: 750;
}
.poa-image-context {
  position: fixed;
  z-index: 540;
  padding: 4px;
  border: 1px solid #cfd5dd;
  background: #fff;
  box-shadow: 0 12px 28px rgb(7 17 31 / 16%);
}
.poa-image-context button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  color: #273449;
  background: #fff;
  font-size: 9px;
  font-weight: 700;
}
.poa-image-context button:hover { background: #f2f5f8; }

@media (max-width: 760px) {
  .drawer-post-poa { grid-template-columns: 1fr; }
  .push-poa-field {
    grid-template-columns: minmax(0, 1fr) 42px 72px;
  }
  .push-poa-field.has-proof {
    grid-template-columns: minmax(0, 1fr) 42px 72px;
  }
  .push-poa-paste { display: none; }
  .poa-lightbox figure,
  .poa-lightbox img {
    max-width: 88vw;
    max-height: 70vh;
  }
}

/* Copywriters board chat */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body[data-scope="korzinka"] {
  --board-chat-width: clamp(360px, 25vw, 400px);
}

body[data-scope="korzinka"] .korzinka-footer-chat {
  position: relative;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid #172132;
  color: #172132;
  background: #fff;
  font: inherit;
  font-size: 10px;
  font-weight: 760;
  cursor: pointer;
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease;
}

body[data-scope="korzinka"] .korzinka-footer-chat:hover,
body[data-scope="korzinka"] .korzinka-footer-chat[aria-expanded="true"] {
  border-color: #172132;
  color: #fff;
  background: #172132;
}

body[data-scope="korzinka"] .korzinka-footer-chat > b {
  min-width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  padding-inline: 4px;
  border-radius: 9px;
  color: #fff;
  background: #e5002b;
  font-size: 8px;
  line-height: 1;
}

/* Copywriters board polish — 2026-07-29 */
.drawer-scroll {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.drawer-scroll::-webkit-scrollbar { display: none; width: 0; height: 0; }

button.avatar,
.account-avatar,
.tk-account {
  border-radius: 50% !important;
}

.card.is-focused:not(.is-urgent) {
  border-color: color-mix(in srgb, var(--status) 42%, #cbd2da);
  transition-property: padding-bottom, box-shadow, opacity;
}

.card-footer-meta {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 2px;
}
.card-footer-meta:has(.card-content-targets) {
  height: 24px;
  grid-template-rows: 8px 10px;
  align-content: space-between;
  gap: 0;
}
.card-content-targets {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}
.card-content-targets > span {
  box-sizing: border-box;
  width: 30px;
  min-width: 30px;
  height: 10px;
  position: relative;
  display: block;
  padding: 0;
  border: 1px solid #cbd3de;
  color: #8b96a5;
  background: transparent;
  font-size: 0;
  line-height: 0;
  opacity: .7;
}
.card-content-target-label {
  position: absolute;
  inset: 1px 0;
  display: grid;
  place-items: center;
  transform: translateY(1px);
  font-size: 5.5px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}
.card-content-targets > [data-content-target="post"] {
  border-color: #cbd3de;
  color: #8b96a5;
  background: transparent;
}
.card-content-targets > [data-content-target="push-mp"] {
  border-color: #cbd3de;
  color: #8b96a5;
  background: transparent;
}
.card-content-targets > [data-content-target="push-tg"] {
  border-color: #cbd3de;
  color: #8b96a5;
  background: transparent;
}

body[data-scope="korzinka"] .card:has(.card-footer) { min-height: 70px; }
body[data-scope="korzinka"] .card-footer {
  min-height: 25px;
  height: 25px;
  align-items: flex-end;
}
body[data-scope="korzinka"] .card-footer-actions { align-self: end; }
body[data-scope="korzinka"] .due { line-height: 8px; }
body[data-scope="korzinka"].grid-mode .card,
body[data-scope="korzinka"].grid-mode .card:has(.card-label),
body[data-scope="korzinka"].grid-mode .card:has(.card-footer) {
  height: 70px;
  min-height: 70px;
}
body[data-scope="korzinka"].grid-mode .card {
  grid-template-rows: 10px 13px 25px;
}
body[data-scope="korzinka"].grid-mode .card .card-labels {
  min-height: 10px;
  height: 10px;
}

body[data-scope="korzinka"] .drawer-title-input[readonly] {
  color: #172132;
  cursor: default;
  border-bottom-color: #dfe3e8;
}
body[data-scope="korzinka"] .drawer-title-input[readonly]:focus {
  border-bottom-color: #dfe3e8;
}

body[data-scope="korzinka"] .drawer-title-input {
  min-height: 48px;
  margin-top: 17px;
  padding-bottom: 8px;
  font-size: 25px;
}

body[data-scope="korzinka"] .drawer-meta-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 12px;
  margin: 18px 0 0;
  border: 0;
  background: transparent;
}
body[data-scope="korzinka"] .drawer-status-field {
  grid-column: 1 / -1;
}
body[data-scope="korzinka"] .drawer-meta-grid > .drawer-meta-field,
body[data-scope="korzinka"] .drawer-meta-grid > .drawer-time-row,
body[data-scope="korzinka"] .drawer-meta-grid > .urgent-toggle {
  min-width: 0;
  padding: 0;
}
body[data-scope="korzinka"] .drawer-meta-field {
  grid-template-columns: 52px minmax(0, 1fr);
  grid-template-rows: 42px;
  align-items: center;
  column-gap: 8px;
  min-height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
}
body[data-scope="korzinka"] .drawer-meta-field span {
  font-size: 9px;
  line-height: 1;
  white-space: nowrap;
}
body[data-scope="korzinka"] .drawer-meta-field input {
  height: 42px;
  font-size: 10px;
}
body[data-scope="korzinka"] .drawer-meta-field > .potok-picker-control,
body[data-scope="korzinka"] .drawer-time-row > .potok-picker-control {
  min-width: 0;
  width: 100%;
}
body[data-scope="korzinka"] .drawer-meta-field > .potok-picker-control .potok-picker-trigger,
body[data-scope="korzinka"] .drawer-time-row > .potok-picker-control .potok-picker-trigger {
  box-sizing: border-box;
  grid-template-columns: minmax(0, 1fr) 12px;
  gap: 4px;
  min-width: 0;
  height: 42px;
  padding-inline: 6px;
}
body[data-scope="korzinka"] .drawer-meta-field > .potok-picker-control .potok-picker-trigger > span,
body[data-scope="korzinka"] .drawer-time-row > .potok-picker-control .potok-picker-trigger > span {
  font-size: 8.5px;
}
body[data-scope="korzinka"] .drawer-meta-field > .potok-picker-control .potok-picker-trigger > i,
body[data-scope="korzinka"] .drawer-time-row > .potok-picker-control .potok-picker-trigger > i {
  font-size: 12px;
}
body[data-scope="korzinka"] .drawer-time-row {
  position: relative;
  grid-column: auto;
  grid-template-columns: 52px 36px minmax(0, 1fr);
  grid-template-rows: 42px;
  column-gap: 0;
  row-gap: 0;
  align-items: center;
  min-height: 42px;
  padding: 0;
  border-top: 0;
  border-left: 0;
  background: transparent;
}
body[data-scope="korzinka"] .drawer-time-row::after {
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  bottom: 0;
  left: 52px;
  content: "";
  border: 1px solid #d2d7de;
  border-radius: 2px;
  background: #fbfbfa;
  pointer-events: none;
  transition: border-color 100ms ease, box-shadow 100ms ease;
}
body[data-scope="korzinka"] .drawer-time-row:has(.drawer-time-toggle:hover, .potok-picker-trigger:hover)::after {
  border-color: #aeb9c7;
}
body[data-scope="korzinka"] .drawer-time-row:has(.drawer-time-toggle input:focus-visible, .potok-picker-trigger:focus-visible, .potok-picker-control.is-open)::after {
  border-color: #eb0033;
  box-shadow: 0 0 0 2px rgb(235 0 51 / 9%);
}
body[data-scope="korzinka"] .drawer-meta-caption {
  position: relative;
  z-index: 1;
  grid-column: 1;
  grid-row: 1;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}
body[data-scope="korzinka"] .drawer-time-toggle {
  position: relative;
  z-index: 1;
  grid-row: 1;
  grid-column: 2;
  grid-template-columns: 1fr;
  place-items: center;
  gap: 0;
  justify-self: end;
  width: 28px;
  min-width: 28px;
  min-height: 42px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
body[data-scope="korzinka"] .drawer-time-toggle > span {
  display: none;
}
body[data-scope="korzinka"] .drawer-time-toggle > i,
body[data-scope="korzinka"] .urgent-toggle > i {
  width: 18px;
  height: 18px;
}
body[data-scope="korzinka"] .drawer-time-toggle input:checked + i {
  border-color: #eb0033;
  background: #eb0033;
}
body[data-scope="korzinka"] .drawer-time-toggle strong,
body[data-scope="korzinka"] .urgent-toggle strong {
  font-size: 11px;
}
body[data-scope="korzinka"] .drawer-time-row > .potok-picker-control {
  position: relative;
  z-index: 1;
  grid-row: 1;
  grid-column: 3;
}
body[data-scope="korzinka"] .drawer-time-row > .potok-picker-control .potok-picker-trigger {
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 0;
  outline: 0;
  outline-offset: 0;
  background: transparent;
  box-shadow: none;
  font-size: 10px;
}
body[data-scope="korzinka"] .urgent-toggle {
  position: relative;
  grid-column: auto;
  grid-template-columns: 64px 20px minmax(0, 1fr);
  grid-template-rows: 42px;
  column-gap: 8px;
  row-gap: 0;
  align-items: center;
  min-height: 42px;
  padding: 0;
  border-top: 0;
  border-left: 0;
  background: transparent;
}
body[data-scope="korzinka"] .urgent-toggle > .drawer-meta-caption {
  grid-row: 1;
  grid-column: 1;
  display: block;
}
body[data-scope="korzinka"] .urgent-toggle > i {
  grid-row: 1;
  grid-column: 2;
  justify-self: start;
}
body[data-scope="korzinka"] .urgent-toggle > span:not(.drawer-meta-caption) {
  display: none;
}

/* Solo task scheduling mirrors the compact Korzinka editor. */
body[data-scope="potok"] .drawer-meta-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 12px;
  margin: 18px 0 0;
  border: 0;
  background: transparent;
}
body[data-scope="potok"] .drawer-meta-grid > .drawer-meta-field,
body[data-scope="potok"] .drawer-meta-grid > .drawer-time-row,
body[data-scope="potok"] .drawer-meta-grid > .urgent-toggle {
  min-width: 0;
  padding: 0;
}
body[data-scope="potok"] .drawer-meta-field {
  grid-template-columns: 52px minmax(0, 1fr);
  grid-template-rows: 42px;
  align-items: center;
  column-gap: 8px;
  min-height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
}
body[data-scope="potok"] .drawer-meta-field span {
  font-size: 9px;
  line-height: 1;
  white-space: nowrap;
}
body[data-scope="potok"] .drawer-meta-field input {
  height: 42px;
  font-size: 10px;
}
body[data-scope="potok"] .drawer-meta-field > .potok-picker-control,
body[data-scope="potok"] .drawer-time-row > .potok-picker-control {
  min-width: 0;
  width: 100%;
}
body[data-scope="potok"] .drawer-meta-field > .potok-picker-control .potok-picker-trigger,
body[data-scope="potok"] .drawer-time-row > .potok-picker-control .potok-picker-trigger {
  box-sizing: border-box;
  grid-template-columns: minmax(0, 1fr) 12px;
  gap: 4px;
  min-width: 0;
  height: 42px;
  padding-inline: 6px;
}
body[data-scope="potok"] .drawer-meta-field > .potok-picker-control .potok-picker-trigger > span,
body[data-scope="potok"] .drawer-time-row > .potok-picker-control .potok-picker-trigger > span {
  font-size: 8.5px;
}
body[data-scope="potok"] .drawer-meta-field > .potok-picker-control .potok-picker-trigger > i,
body[data-scope="potok"] .drawer-time-row > .potok-picker-control .potok-picker-trigger > i {
  font-size: 12px;
}
body[data-scope="potok"] .drawer-time-row {
  position: relative;
  grid-column: auto;
  grid-template-columns: 52px 36px minmax(0, 1fr);
  grid-template-rows: 42px;
  column-gap: 0;
  row-gap: 0;
  align-items: center;
  min-height: 42px;
  padding: 0;
  border-top: 0;
  border-left: 0;
  background: transparent;
}
body[data-scope="potok"] .drawer-time-row::after {
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  bottom: 0;
  left: 52px;
  content: "";
  border: 1px solid #d2d7de;
  border-radius: 2px;
  background: #fbfbfa;
  pointer-events: none;
  transition: border-color 100ms ease, box-shadow 100ms ease;
}
body[data-scope="potok"] .drawer-time-row:has(.drawer-time-toggle:hover, .potok-picker-trigger:hover)::after {
  border-color: #aeb9c7;
}
body[data-scope="potok"] .drawer-time-row:has(.drawer-time-toggle input:focus-visible, .potok-picker-trigger:focus-visible, .potok-picker-control.is-open)::after {
  border-color: var(--drawer-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--drawer-accent) 9%, transparent);
}
body[data-scope="potok"] .drawer-meta-caption {
  position: relative;
  z-index: 1;
  grid-column: 1;
  grid-row: 1;
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}
body[data-scope="potok"] .drawer-time-toggle {
  position: relative;
  z-index: 1;
  grid-row: 1;
  grid-column: 2;
  grid-template-columns: 1fr;
  place-items: center;
  gap: 0;
  justify-self: end;
  width: 28px;
  min-width: 28px;
  min-height: 42px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
body[data-scope="potok"] .drawer-time-toggle > span {
  display: none;
}
body[data-scope="potok"] .drawer-time-toggle > i,
body[data-scope="potok"] .urgent-toggle > i {
  width: 18px;
  height: 18px;
}
body[data-scope="potok"] .drawer-time-toggle input:checked + i {
  border-color: var(--drawer-accent);
  background: var(--drawer-accent);
}
body[data-scope="potok"] .drawer-time-row > .potok-picker-control {
  position: relative;
  z-index: 1;
  grid-row: 1;
  grid-column: 3;
}
body[data-scope="potok"] .drawer-time-row > .potok-picker-control .potok-picker-trigger {
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 0;
  outline: 0;
  outline-offset: 0;
  background: transparent;
  box-shadow: none;
  font-size: 10px;
}
body[data-scope="potok"] .urgent-toggle {
  position: relative;
  grid-column: auto;
  grid-template-columns: 64px 20px minmax(0, 1fr);
  grid-template-rows: 42px;
  column-gap: 8px;
  row-gap: 0;
  align-items: center;
  min-height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
}
body[data-scope="potok"] .urgent-toggle > .drawer-meta-caption {
  grid-row: 1;
  grid-column: 1;
  display: block;
}
body[data-scope="potok"] .urgent-toggle > i {
  grid-row: 1;
  grid-column: 2;
  justify-self: start;
}
body[data-scope="potok"] .urgent-toggle > span:not(.drawer-meta-caption) {
  display: none;
}
body[data-scope="korzinka"] .card-label-section {
  min-height: 0;
  margin: 15px 0 0;
  padding: 0 0 15px;
  border-left: 0;
  border-bottom: 1px solid #cfd5dc;
  overflow: visible;
}
body[data-scope="korzinka"] .card-label-section .section-title {
  height: auto;
  min-height: 18px;
  margin-bottom: 7px;
}
body[data-scope="korzinka"] .card-label-section .collapsible-title {
  height: 18px;
  min-height: 18px;
  line-height: 18px;
}
body[data-scope="korzinka"] .card-label-section .drawer-label-list {
  width: 100%;
  min-height: 20px;
  align-items: center;
  gap: 5px;
  overflow: visible;
}
body[data-scope="korzinka"] .card-label-section .drawer-label-list > .empty-copy {
  box-sizing: border-box;
  flex: 1 1 100%;
  width: 100%;
  min-height: 20px;
  display: flex;
  align-items: center;
}
body[data-scope="korzinka"] .collapsible-title h2,
body[data-scope="korzinka"] .description-section .section-title h2 {
  font-size: 13px;
}
body[data-scope="korzinka"] .card-label-section .collapsible-title h2 {
  color: var(--muted);
  font-size: 9px;
  line-height: 1;
  letter-spacing: .06em;
  text-transform: uppercase;
}
body[data-scope="korzinka"] .drawer-label-chip {
  font-size: 10px;
}
body[data-scope="korzinka"] .drawer-asana-field {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  font-size: 9px;
  line-height: 1;
}
body[data-scope="korzinka"] .drawer-post-poa .drawer-asana-field {
  display: grid;
  gap: 8px;
  margin-top: 0;
}
body[data-scope="korzinka"] .drawer-post-poa { margin-top: 18px; }
body[data-scope="korzinka"] .push-poa-fields { margin-top: 16px; }
body[data-scope="korzinka"] .drawer-asana-control {
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 10px;
}
body[data-scope="korzinka"] .drawer-asana-control:has(a[hidden]) {
  grid-template-columns: minmax(0, 1fr);
}
body[data-scope="korzinka"] .drawer-asana-control input {
  height: 48px;
  padding-inline: 14px;
  font-size: 12px;
}
body[data-scope="korzinka"] .description-section {
  padding-block: 24px 26px;
}
body[data-scope="korzinka"] .description-editor {
  min-height: 220px;
  padding: 14px 16px 18px;
  font-size: 12px;
}

body[data-scope="korzinka"] .korzinka-footer-aaaa,
body[data-scope="korzinka"] .korzinka-footer-editor,
body[data-scope="korzinka"] .korzinka-footer-notepad,
body[data-scope="korzinka"] .korzinka-footer-chat {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #e5002b;
  color: #e5002b;
  background: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}
body[data-scope="korzinka"] .korzinka-footer-aaaa:hover,
body[data-scope="korzinka"] .korzinka-footer-editor:hover,
body[data-scope="korzinka"] .korzinka-footer-notepad:hover,
body[data-scope="korzinka"] .korzinka-footer-chat:hover,
body[data-scope="korzinka"] .korzinka-footer-chat[aria-expanded="true"] {
  border-color: #e5002b;
  color: #fff;
  background: #e5002b;
}

.poa-lightbox[hidden],
.poa-image-context[hidden] { display: none; }

body[data-scope="korzinka"] .board-chat {
  position: fixed;
  z-index: 175;
  top: var(--potok-header-height, 56px);
  right: 0;
  bottom: var(--potok-footer-height, 56px);
  width: var(--board-chat-width);
  min-width: 0;
  display: flex;
  visibility: hidden;
  flex-direction: column;
  overflow: hidden;
  border-left: 1px solid #d7dce3;
  background: #fff;
  box-shadow: -18px 0 42px rgba(13, 26, 45, .11);
  opacity: 0;
  transform: translateX(102%);
  pointer-events: none;
  transition:
    transform 210ms cubic-bezier(.22, .72, .3, 1),
    opacity 160ms ease,
    visibility 0s linear 220ms;
}

body[data-scope="korzinka"].chat-open .board-chat {
  visibility: visible;
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
  transition-delay: 0s;
}

.board-chat-head {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 14px 12px 20px;
  border-bottom: 1px solid #e2e6eb;
}

.board-chat-head > div { min-width: 0; display: grid; gap: 2px; }
.board-chat-kicker {
  overflow: hidden;
  color: #8b94a1;
  font-size: 8px;
  font-weight: 760;
  letter-spacing: .085em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.board-chat-head h2 {
  margin: 0;
  color: #0d1a2d;
  font-size: 17px;
  line-height: 1.1;
  letter-spacing: -.025em;
}

.board-chat-close {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  color: #5e6876;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
}

.board-chat-close:hover { color: #0d1a2d; background: #f1f3f5; }

.board-chat-avatar {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  margin-left: -4px;
  overflow: hidden;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: #26364d;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.board-chat-avatar.tone-1 { background: #e5002b; }
.board-chat-avatar.tone-2 { background: #3767a6; }
.board-chat-avatar.tone-3 { background: #7457ad; }
.board-chat-avatar.tone-4 { background: #2f8266; }
.board-chat-avatar.tone-5 { background: #9a6636; }
.board-chat-avatar img,
.board-chat-message-avatar img { width: 100%; height: 100%; object-fit: cover; }

.board-chat-content {
  min-height: 0;
  flex: 1 1 auto;
  display: grid;
  overflow: hidden;
}

.board-chat-content > .board-chat-body {
  min-height: 0;
  grid-area: 1 / 1;
}

.board-chat-body {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #cbd1d8 transparent;
  scrollbar-width: thin;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  transition:
    opacity 150ms ease,
    transform 220ms cubic-bezier(.22, .72, .3, 1),
    visibility 0s;
}

.board-chat-state {
  min-height: 100%;
  display: grid;
  place-content: center;
  gap: 7px;
  padding: 28px;
  color: #7a8491;
  text-align: center;
  font-size: 10px;
}

.board-chat-state strong { color: #202b3b; font-size: 12px; }
.board-chat-state span { max-width: 250px; line-height: 1.5; }
.board-chat-messages { padding: 9px 20px 18px; }

.board-chat-day,
.board-chat-unread {
  position: relative;
  display: grid;
  place-items: center;
  margin: 10px 0;
  color: #919aa6;
  font-size: 8px;
  font-weight: 720;
}

.board-chat-day::before,
.board-chat-unread::before {
  position: absolute;
  inset-inline: 0;
  height: 1px;
  content: "";
  background: #edf0f3;
}

.board-chat-day span,
.board-chat-unread span {
  position: relative;
  padding: 0 9px;
  background: #fff;
}

.board-chat-unread { margin: 14px 0 8px; color: #d50029; }
.board-chat-unread::before { background: #f5bcc7; }

.board-chat-message {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  padding: 11px 0 12px;
}

.board-chat-message + .board-chat-message { border-top: 1px solid #f1f2f4; }
.board-chat-message.is-reply-highlighted {
  animation: board-chat-reply-highlight 1.4s ease both;
}
@keyframes board-chat-reply-highlight {
  0%, 100% { background: transparent; }
  20%, 68% { background: rgba(99, 216, 255, .14); }
}
.board-chat-message-avatar {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  color: #fff;
  background: #6d7886;
  font-size: 8px;
  font-weight: 800;
}

.board-chat-message.is-own .board-chat-message-avatar { background: #172132; }
.board-chat-message-content { min-width: 0; display: grid; justify-items: start; gap: 5px; }
.board-chat-message-content > header {
  width: 100%;
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.board-chat-message-content > header strong {
  overflow: hidden;
  color: #192435;
  font-size: 10px;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-chat-message-content > header time {
  flex: 0 0 auto;
  color: #a0a7b1;
  font-size: 8px;
}

.board-chat-message-content > p {
  margin: 0;
  color: #303b4a;
  font-size: 11px;
  line-height: 1.52;
  overflow-wrap: anywhere;
}
.board-chat-message-reply {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 6px 8px;
  overflow: hidden;
  border: 0;
  border-left: 2px solid #63d8ff;
  color: #485568;
  background: #f5f7f9;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.board-chat-message-reply:hover { background: #eef2f5; }
.board-chat-message-reply small,
.board-chat-message-reply span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.board-chat-message-reply small {
  color: #173b6b;
  font-size: 8px;
  font-weight: 760;
}
.board-chat-message-reply span { font-size: 8.5px; }
.board-chat-mention {
  color: #184f94;
  background: #eaf3ff;
  font-weight: 760;
}

.board-chat-message-task,
.board-chat-linked-task > button:first-child {
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  border: 1px solid #dbe1e8;
  color: #273346;
  background: #f7f8fa;
  font: inherit;
  font-size: 8.5px;
  font-weight: 680;
  cursor: pointer;
}

.board-chat-message-task:hover,
.board-chat-linked-task > button:first-child:hover {
  border-color: #aeb8c5;
  background: #f0f3f6;
}

.board-chat-message-task span,
.board-chat-linked-task span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-chat-message-files { width: 100%; display: grid; gap: 5px; }
.board-chat-message-files > button {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid #e0e4ea;
  color: #273346;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.board-chat-message-files > button:hover { border-color: #aeb8c5; background: #f8f9fa; }
.board-chat-message-files > button > i { font-size: 16px; }
.board-chat-message-files > button > span { min-width: 0; display: grid; gap: 2px; }
.board-chat-message-files b,
.board-chat-message-files small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-chat-message-files b { font-size: 8.5px; }
.board-chat-message-files small { color: #8d96a2; font-size: 7.5px; }

.board-chat-composer {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  gap: 8px;
  padding: 12px 14px 13px;
  border-top: 1px solid #dfe3e8;
  background: #fff;
  box-shadow: 0 -8px 22px rgba(13, 26, 45, .035);
}

.board-chat-message-field { display: block; }
.board-chat-message-field textarea {
  width: 100%;
  min-height: 76px;
  max-height: 132px;
  display: block;
  resize: none;
  padding: 10px 11px;
  border: 1px solid #cfd5dd;
  border-radius: 0;
  outline: 0;
  color: #1a2637;
  background: #fff;
  font-size: 10.5px;
  line-height: 1.45;
}

.board-chat-message-field textarea:focus { border-color: #cfd5dd; box-shadow: none; }
.board-chat-message-field textarea::placeholder { color: #a0a8b2; }
.board-chat-composer-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.board-chat-tools { min-width: 0; display: flex; align-items: center; gap: 3px; }
.board-chat-tools > button,
.board-chat-task-button,
.board-chat-send {
  min-width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 7px;
  border: 0;
  color: #6b7583;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.board-chat-tools > button:hover,
.board-chat-task-button:hover { color: #172132; background: #f0f2f4; }
.board-chat-tools > button > i { font-size: 15px; }
#boardChatMentionButton > span {
  font-size: 13px;
  line-height: 1;
}

.board-chat-task-button {
  width: max-content;
  justify-content: flex-start;
  padding-inline: 5px 8px;
  font-size: 8.5px;
  font-weight: 700;
}

.board-chat-tools > .board-chat-task-button > span {
  font-size: 8.5px;
  line-height: 1;
  font-weight: 700;
}

.board-chat-task-button > i { font-size: 14px; }
.board-chat-task-button.is-linked { color: #172132; background: #eef1f4; }
.board-chat-send {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #fff;
  background: #172132;
  font-size: 15px;
}
.board-chat-send > i {
  display: block;
  font-size: 18px;
  line-height: 1;
}

.board-chat-send:hover { background: #2c394b; }
.board-chat-send:disabled { color: #a7aeb7; background: #e7eaee; cursor: default; }

.board-chat-linked-task {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 6px 7px;
  border: 1px solid #dbe1e8;
  background: #f7f8fa;
}
.board-chat-replying {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 7px 7px 10px;
  border-left: 2px solid #63d8ff;
  background: #f5f7f9;
}
.board-chat-replying[hidden] { display: none; }
.board-chat-replying > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.board-chat-replying small,
.board-chat-replying strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.board-chat-replying small {
  color: #687486;
  font-size: 7.5px;
}
.board-chat-replying small b { color: #173b6b; }
.board-chat-replying strong {
  color: #303c4d;
  font-size: 8.5px;
  font-weight: 650;
}
.board-chat-replying > button {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  color: #697587;
  background: transparent;
  cursor: pointer;
}
.board-chat-replying > button:hover { color: #172132; background: #e7eaee; }

.board-chat-linked-task > button:first-child {
  min-width: 0;
  flex: 1 1 auto;
  justify-content: flex-start;
  padding: 0;
  border: 0;
  background: transparent;
}

.board-chat-linked-task > button:last-child {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  color: #747f8d;
  background: transparent;
  cursor: pointer;
}

.board-chat-linked-task > button:last-child:hover { color: #172132; background: #e7eaee; }
.board-chat-attachments { display: flex; flex-wrap: wrap; gap: 5px; }
.board-chat-attachments > span {
  max-width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 5px;
  padding: 5px 5px 5px 7px;
  border: 1px solid #dbe1e8;
  color: #344052;
  background: #f7f8fa;
}

.board-chat-attachments b {
  overflow: hidden;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-chat-attachments small { color: #8a94a1; font-size: 7px; white-space: nowrap; }
.board-chat-attachments button {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  color: #77818f;
  background: transparent;
  cursor: pointer;
}

.board-chat-task-picker {
  position: absolute;
  z-index: 3;
  right: 14px;
  bottom: calc(100% - 1px);
  left: 14px;
  overflow: hidden;
  border: 1px solid #cfd5dd;
  background: #fff;
  box-shadow: 0 -12px 34px rgba(13, 26, 45, .14);
}

.board-chat-mention-picker {
  position: absolute;
  z-index: 4;
  right: 14px;
  bottom: 89px;
  left: 14px;
  max-height: 246px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid #cfd5dd;
  background: #fff;
  box-shadow: 0 -12px 34px rgba(13, 26, 45, .14);
}

.board-chat-mention-picker > button {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 0;
  color: #263346;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.board-chat-mention-picker > button:hover,
.board-chat-mention-picker > button[aria-selected="true"] { background: #f0f2f5; }
.board-chat-mention-picker > button > span:last-child { min-width: 0; display: grid; gap: 2px; }
.board-chat-mention-picker b,
.board-chat-mention-picker small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.board-chat-mention-picker b { font-size: 9px; }
.board-chat-mention-picker small { color: #8b94a0; font-size: 7.5px; }

.board-chat-task-picker > label {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border-bottom: 1px solid #e5e8ec;
  color: #7b8592;
}

.board-chat-task-picker input {
  min-width: 0;
  flex: 1 1 auto;
  border: 0;
  outline: 0;
  color: #1d293a;
  background: transparent;
  font-size: 10px;
}

.board-chat-task-list { max-height: 270px; overflow-y: auto; padding: 5px; }
.board-chat-task-list > button {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 8px 9px;
  border: 0;
  color: #263346;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.board-chat-task-list > button:hover,
.board-chat-task-list > button[aria-selected="true"] { background: #f0f2f5; }
.board-chat-task-list span,
.board-chat-task-list small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-chat-task-list span { font-size: 9px; font-weight: 700; }
.board-chat-task-list small { color: #8b94a0; font-size: 7.5px; }
.board-chat-task-list > p { margin: 0; padding: 20px; color: #8b94a0; font-size: 9px; text-align: center; }

.board-chat-message-menu {
  position: fixed;
  z-index: 360;
  width: 156px;
  padding: 5px;
  border: 1px solid #cfd7e2;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(7, 17, 31, .16);
}
.board-chat-message-menu[hidden] { display: none; }
.board-chat-message-menu button {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 9px;
  border: 0;
  border-radius: 2px;
  color: #172336;
  background: #fff;
  font: inherit;
  font-size: 10px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}
.board-chat-message-menu button:hover,
.board-chat-message-menu button:focus-visible {
  outline: 0;
  background: #f4f6f8;
}
.board-chat-message-menu button.is-danger { color: #c72e39; }
.board-chat-message-menu button.is-danger:hover { background: #fff3f3; }
.board-chat-message-menu button i { width: 14px; font-size: 14px; }

.board-chat > :not(.board-chat-delete-confirm) {
  transition: filter 140ms ease;
}

.board-chat.is-delete-confirming > :not(.board-chat-delete-confirm) {
  filter: blur(3px);
  pointer-events: none;
  user-select: none;
}

.board-chat-delete-confirm {
  position: absolute;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(13, 26, 45, .12);
}

.board-chat-delete-confirm[hidden] { display: none; }

.board-chat-delete-dialog {
  width: min(300px, 100%);
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 18px;
  border: 1px solid #d9dee5;
  background: #fff;
  box-shadow: 0 18px 50px rgba(13, 26, 45, .2);
}

.board-chat-delete-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #c72e39;
  background: #fff0f1;
  font-size: 18px;
}

.board-chat-delete-dialog p {
  margin: 0;
  color: #202b3b;
  font-size: 10px;
  line-height: 1.5;
}

.board-chat-delete-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.board-chat-delete-actions button {
  min-width: 76px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid #cfd5dd;
  color: #253143;
  background: #fff;
  font: inherit;
  font-size: 9px;
  font-weight: 720;
  cursor: pointer;
}

.board-chat-delete-actions button:hover,
.board-chat-delete-actions button:focus-visible {
  border-color: #8d98a6;
  outline: 0;
}

.board-chat-delete-actions button.is-danger {
  border-color: #c72e39;
  color: #fff;
  background: #c72e39;
}

.board-chat-delete-actions button.is-danger:hover,
.board-chat-delete-actions button.is-danger:focus-visible {
  border-color: #aa1f2b;
  background: #aa1f2b;
}

.board-chat button:focus-visible,
.korzinka-footer-chat:focus-visible {
  outline: 2px solid #246bfe;
  outline-offset: 2px;
}

[hidden] { display: none !important; }

@media (min-width: 761px) {
  body[data-scope="korzinka"].chat-open .product-editor-overlay {
    padding-right: calc(var(--board-chat-width) + 10px);
  }

  body[data-scope="korzinka"].chat-open .notepad-overlay {
    padding-right: calc(var(--board-chat-width) + 12px);
  }

  body[data-scope="korzinka"].chat-open .product-editor-panel {
    width: min(1120px, calc(100vw - var(--board-chat-width) - 20px));
  }

  body[data-scope="korzinka"].chat-open .notepad-panel {
    width: min(720px, calc(100vw - var(--board-chat-width) - 24px));
  }
}

@media (min-width: 1025px) {
  body[data-scope="korzinka"] main {
    transition: padding-right 210ms cubic-bezier(.22, .72, .3, 1);
  }

  body[data-scope="korzinka"] .site-footer {
    transition: margin-right 210ms cubic-bezier(.22, .72, .3, 1);
  }

  body[data-scope="korzinka"] .board-chat {
    bottom: 0;
  }

  body[data-scope="korzinka"].chat-open main {
    padding-right: calc(var(--potok-gutter-x) + var(--board-chat-width));
  }

  body[data-scope="korzinka"].chat-open .site-footer {
    margin-right: var(--board-chat-width);
  }

  body[data-scope="korzinka"].chat-linked-task-open .board-chat {
    z-index: 215;
  }

  body[data-scope="korzinka"].chat-linked-task-open .card-modal-backdrop {
    right: var(--board-chat-width);
  }

  body[data-scope="korzinka"].chat-linked-task-open .drawer {
    left: calc((100vw - var(--board-chat-width)) / 2);
    width: min(700px, calc(100vw - var(--board-chat-width) - 32px));
  }
}

@media (max-width: 760px) {
  body[data-scope="potok"] .drawer-meta-grid,
  body[data-scope="korzinka"] .drawer-meta-grid {
    grid-template-columns: 1fr;
  }
  body[data-scope="potok"] .drawer-status-field,
  body[data-scope="korzinka"] .drawer-status-field {
    grid-column: auto;
  }
  body[data-scope="potok"] .drawer-time-row,
  body[data-scope="potok"] .urgent-toggle,
  body[data-scope="korzinka"] .drawer-time-row,
  body[data-scope="korzinka"] .urgent-toggle {
    border-top: 1px solid #d9dde3;
    border-left: 0;
  }

  body[data-scope="korzinka"] .korzinka-footer-chat,
  body[data-scope="korzinka"] .korzinka-footer-aaaa,
  body[data-scope="korzinka"] .korzinka-footer-editor,
  body[data-scope="korzinka"] .korzinka-footer-notepad {
    min-height: 40px;
    padding-inline: 10px;
  }

  body[data-scope="korzinka"] .board-chat {
    z-index: 320;
    top: 0;
    bottom: 0;
    width: 100vw;
    max-width: none;
    border-left: 0;
    box-shadow: none;
  }

  .board-chat-head {
    min-height: calc(62px + env(safe-area-inset-top));
    padding-top: max(13px, env(safe-area-inset-top));
  }

  .board-chat-composer { padding-bottom: calc(13px + env(safe-area-inset-bottom)); }

  body[data-scope="korzinka"].chat-linked-task-open .card-modal-backdrop { z-index: 325; }
  body[data-scope="korzinka"].chat-linked-task-open .drawer { z-index: 330; }
}

@media (max-width: 520px) {
  body[data-scope="korzinka"] .korzinka-footer-chat {
    min-width: 58px;
    padding-inline: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-scope="korzinka"] .board-chat,
  body[data-scope="korzinka"] main {
    transition-duration: 1ms;
  }
}
