.chat-drawer-open{overflow:hidden}.desk-drawer-backdrop{position:fixed;inset:0;background:#112f2552;border:0;border-radius:0;z-index:40;cursor:default}.desk-chat-drawer{position:fixed;right:0;top:0;bottom:0;width:min(1100px,calc(100vw - 100px));z-index:41;background:white;box-shadow:-10px 0 40px #12342625;display:flex;flex-direction:column}.desk-drawer-header{display:flex;justify-content:space-between;align-items:center;padding:20px 23px;border-bottom:1px solid var(--line);gap:15px}.desk-drawer-header h2{font-size:17px}.desk-drawer-header small{color:var(--muted);font-size:11px}.desk-close{border:0;background:none;padding:6px;line-height:1}.desk-drawer-content{display:grid;grid-template-columns:minmax(0,1fr) 320px;min-height:0;flex:1}.desk-drawer-content .chat-center{min-height:0;max-height:none}.desk-drawer-content .chat-intelligence{display:block;grid-column:auto;min-height:0;overflow:auto;border-top:0;border-left:1px solid var(--line)}.desk-drawer-content .chat-history{min-height:130px}.desk-drawer-content .chat-composer{padding:15px 20px}.desk-drawer-content .chat-message{max-width:95%}.desk-drawer-content .chat-message .bubble{font-size:12px}.desk-assistant-title{display:flex;align-items:center;gap:8px;padding:18px 18px;border-bottom:1px solid var(--line);flex-wrap:wrap}.desk-assistant-title h3{margin:0;flex:1}.desk-assistant-title .desk-icon{width:18px;height:18px}.ai-section{padding:17px 18px}.ai-section select{width:100%;font-size:11px}.ai-section h3{font-size:13px}.ai-section .assistant-summary{font-size:12px;line-height:1.8}.ai-section small{font-size:10px;color:var(--muted)}.assistant-excerpt{border-left:2px solid #dce7d9;padding-left:10px;margin:11px 0}.assistant-excerpt b{font-size:10px;color:#769175}.assistant-excerpt p{font-size:11px;margin:5px 0;white-space:pre-wrap;overflow-wrap:anywhere}.assistant-reply{white-space:pre-wrap;overflow-wrap:anywhere}.ai-section blockquote{padding:9px 11px;background:#edf5e9;margin:10px 0;font-size:12px}.ai-section button{font-size:11px}.desk-chat-drawer .chat-composer textarea{height:100px;min-height:70px}.desk-chat-drawer .chat-composer .footnote{font-size:10px}.desk-drawer-content .mail-channel{padding:10px 18px}.message-assignment .eyeline{font-size:10px}.desk-chat-drawer .message-assignment button{font-size:10px}dialog{z-index:55}dialog .evidence-body{max-height:220px;overflow:auto}.toast{z-index:70}.desk-drawer-header .tag{font-size:10px}.desk-chat-drawer .chat-composer .row{flex-wrap:wrap}.desk-chat-drawer .chat-composer .row>span{max-width:none}
@media(min-width:1650px){.desk-chat-drawer{width:min(1200px,calc(100vw - 250px))}.desk-drawer-content{grid-template-columns:minmax(0,1fr) 340px}}
@media(max-width:1150px){.desk-chat-drawer{width:calc(100vw - 35px)}.desk-drawer-content{grid-template-columns:minmax(0,1fr) 290px}}
@media(max-width:750px){.desk-chat-drawer{width:100%;top:0}.desk-drawer-header{padding:13px 15px}.desk-drawer-header .tag{display:none}.desk-drawer-content{display:flex;flex-direction:column;overflow:auto}.desk-drawer-content .chat-center{min-height:540px;flex:none;height:65vh}.desk-drawer-content .chat-intelligence{border-left:0;border-top:1px solid var(--line);overflow:visible;flex:none}.desk-drawer-content .chat-composer{padding:12px 15px}.desk-chat-drawer .chat-composer textarea{height:80px}.desk-drawer-header h2{font-size:15px}}


:root {
  --app-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --type-caption: .75rem;
  --type-small: .8125rem;
  --type-ui: .875rem;
  --type-body: .9375rem;
  --type-subtitle: 1rem;
  --type-section: 1.125rem;
  --type-dialog: 1.375rem;
  --type-page: 1.75rem;
  --type-metric: 2rem;
  --leading-ui: 1.45;
  --leading-body: 1.6;
  --leading-heading: 1.3;
}

.desk-themed, .auth-page {
  font-family: var(--app-font);
  font-size: var(--type-ui);
  line-height: var(--leading-body);
}
.desk-themed :where(.content, dialog) h1, .auth-page h1 {
  font-size: var(--type-page);
  font-weight: 700;
  line-height: var(--leading-heading);
}
.desk-themed :where(.content, dialog) h2 { font-size: var(--type-section); font-weight: 650; line-height: var(--leading-heading); }
.desk-themed :where(.content, dialog) h3 { font-size: var(--type-subtitle); font-weight: 650; line-height: var(--leading-heading); }
.desk-themed :where(.content, dialog) .dialog-head h2 { font-size: var(--type-dialog); }
.desk-themed :where(.content, dialog) :is(label, .note-band) { font-size: var(--type-ui); }
.desk-themed :where(.content, dialog) :is(.footnote, .eyeline, td small), .auth-page .hint { font-size: var(--type-caption); }
.desk-themed :where(.content, dialog) :is(button, input, select, textarea) { font-family: inherit; line-height: var(--leading-ui); }
.auth-page label { font-size: var(--type-ui); }
.auth-page input, .auth-page button { font-size: var(--type-body); }

.desk-themed {
  --ink: #11271f;
  --muted: #54615d;
  --green: #10583e;
  --paper: #fff;
  --bg: #eef5f2;
  --line: #dde6e2;
  --pale: #e9f3ee;
  --desk-selected: #d4efdf;
}

.desk-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  flex: none;
  object-fit: contain;
  vertical-align: middle;
}

/* Shared application shell */
.desk-themed .shell { grid-template-columns: 238px minmax(0, 1fr); }
.desk-themed .sidebar {
  background: var(--paper);
  border-right: 1px solid var(--line);
  color: var(--ink);
  gap: 44px;
  overflow: auto;
  padding: 21px 14px;
}
.desk-themed .brand {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-left: 7px;
  color: #101815;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.05;
}
.desk-themed .brand small {
  display: block;
  margin-top: 3px;
  color: #27312d;
  font-size: var(--type-small);
  font-weight: 500;
  letter-spacing: 0;
  white-space: nowrap;
}
.desk-brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  aspect-ratio: 1;
  flex: none;
  border-radius: 10px;
  background: var(--desk-selected);
}
.desk-brand-mark .desk-icon { width: 34px; height: 34px; }
.desk-themed .nav { gap: 0; }
.desk-nav-group + .desk-nav-group {
  margin-top: 22px;
  padding-top: 17px;
  position: relative;
}
.desk-nav-group + .desk-nav-group::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline: 8px 3px;
  border-top: 1px solid var(--line);
}
.desk-nav-group > p { margin: 0 0 10px; padding: 0 11px; color: #374a43; font-size: var(--type-caption); font-weight: 600; }
.desk-themed .desk-nav-group > button {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
  min-height: 48px;
  padding: 9px 15px;
  border: 0;
  border-radius: 8px;
  color: #15251f;
  font-size: var(--type-ui);
  text-align: left;
}
.desk-nav-group > button .desk-icon { width: 25px; height: 25px; }
.desk-themed .desk-nav-group > button:hover { background: var(--pale); }
.desk-themed .desk-nav-group > button.active { background: var(--desk-selected); color: #10472f; font-weight: 700; }
.desk-themed .side-foot { margin: auto 7px 0; padding-top: 15px; border-top: 1px solid var(--line); color: var(--muted); }
.desk-themed .side-foot strong { color: var(--ink); margin-bottom: 0; }
.desk-themed .topbar {
  min-height: 55px;
  padding: 9px 22px 9px 28px;
  gap: 18px;
}
.desk-themed .topbar .breadcrumb { color: #18221e; font-size: var(--type-ui); }
.desk-themed .topbar #view-name { font-size: var(--type-small); color: var(--muted); }
.desk-home #view-name, .desk-themed .top-meta > :is(#demo-date, .avatar) { display: none; }
.desk-themed .top-meta {
  gap: clamp(12px, 1.55vw, 24px);
  color: #14241d;
  flex-wrap: nowrap;
  font-size: var(--type-small);
  white-space: nowrap;
}
.desk-themed .top-meta > .tag,
.desk-themed #save-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 0 0 clamp(12px, 1.55vw, 24px);
  border: 0;
  border-left: 1px solid #d5dfda;
  border-radius: 0;
  background: none;
  color: inherit;
  font-size: inherit;
  line-height: 28px;
}
.desk-themed #save-badge { order: 2; }
.desk-themed #save-badge[data-saved]::before,
.desk-themed .top-meta > .tag::before {
  content: "";
  width: 21px;
  height: 21px;
  flex: none;
  background: currentColor;
  mask: url("/assets/icons/monitor.svg") center / contain no-repeat;
}
.desk-themed #save-badge[data-saved]::before {
  background: #52ae75;
  mask-image: url("/assets/icons/saved.svg");
}
.desk-themed .notice, .desk-themed .desk-mobile-header { display: none; }
.desk-themed .content { max-width: 1800px; padding: 24px 22px 30px; }
.desk-themed .heading { align-items: center; }
.desk-themed button { border-radius: 8px; }
.desk-themed button.primary { background: var(--green); border-color: var(--green); }
.desk-themed button.primary:hover:not(:disabled) { background: #0b4833; border-color: #0b4833; }
.desk-themed .panel { border-color: var(--line); border-radius: 14px; }
.desk-themed :is(button, summary, select, input, textarea):focus-visible { outline: 2px solid #26815a; outline-offset: 2px; }

/* Dashboard composition and data styles */
.desk-home .heading { margin: 0 4px 24px; }
.desk-home .heading h1 { color: #10271e; }
.desk-home .heading .muted { margin-top: 5px; font-size: var(--type-body); }
.desk-heading-actions { gap: 15px; }
.desk-heading-actions:empty { display: none; }
.desk-heading-actions > button { padding: 9px 25px; min-height: 44px; color: var(--green); border-color: #bacbc3; font-size: var(--type-ui); font-weight: 650; }
.desk-heading-actions > .primary { min-width: 165px; color: #fff; }
.desk-heading-actions > button:not(.primary) { min-width: 138px; }
.desk-heading-actions .desk-icon { margin-right: 3px; filter: brightness(0) invert(1); }
.desk-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 21px;
  padding: 12px 9px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}
.desk-stat {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: center;
  column-gap: clamp(10px, 1.45vw, 23px);
  padding: 0 clamp(10px, 1.5vw, 24px);
  min-width: 0;
}
.desk-stat + .desk-stat { border-left: 1px solid #d8e2dd; }
.desk-stat > .desk-icon { width: 32px; height: 32px; margin-top: 5px; }
.desk-stat span { display: block; font-size: var(--type-ui); color: #17231e; }
.desk-stat b {
  display: block;
  margin-top: 3px;
  color: #0e4d34;
  font-size: var(--type-metric);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.desk-stat small { display: block; grid-column: 1 / -1; margin-top: 3px; color: var(--muted); line-height: var(--leading-ui); font-size: var(--type-caption); }
.desk-overview { display: grid; grid-template-columns: minmax(0, 1.14fr) minmax(0, 1fr); gap: 17px; margin-bottom: 21px; }
.desk-home .panel-head { padding: 16px 22px 11px; border-bottom: 0; }
.desk-home .panel-head h2 { margin: 0; color: #101c17; font-size: var(--type-section); }
.desk-themed .desk-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 0;
  color: var(--green);
  font-size: var(--type-ui);
  font-weight: 700;
}
.desk-link .desk-icon { width: 17px; height: 17px; }
.desk-distribution, .desk-priorities { min-width: 0; margin: 0; }
.desk-phase-bar {
  display: flex;
  gap: 2px;
  height: 15px;
  margin: 12px 22px 25px;
  border-radius: 7px;
}
.desk-phase-bar > button { min-width: 0; padding: 0; border: 0; border-radius: 0; background: var(--phase-bar); }
.desk-phase-bar > button:first-child { border-radius: 7px 0 0 7px; }
.desk-phase-bar > button:last-child { border-radius: 0 7px 7px 0; }
.desk-phase-bar > button:only-child { border-radius: 7px; }
.desk-phase-bar > button:hover { filter: brightness(.9); }
.desk-phase-bar > button[aria-pressed="true"] { outline: 2px solid var(--green); outline-offset: 2px; }
.desk-empty-bar { width: 100%; background: #e5eeea; border-radius: inherit; }
[data-phase="contact"] { --phase-bar: #14583f; }
[data-phase="confirmed"] { --phase-bar: #47a361; }
[data-phase="sampling"] { --phase-bar: #65bc84; }
[data-phase="filming"] { --phase-bar: #91d6a5; }
[data-phase="review"] { --phase-bar: #7ccc85; }
[data-phase="settlement"] { --phase-bar: #9edba9; }
.desk-phase-legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 22px; }
.desk-phase-legend > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  min-width: 0;
  min-height: 49px;
  padding: 5px 9px;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--ink);
  text-align: left;
  font-size: var(--type-ui);
}
.desk-phase-legend > button:nth-child(n + 4) { border-top: 1px solid #edf1ef; }
.desk-phase-legend > button:not(:nth-child(3n)) { border-right: 1px solid #e9eeeb; }
.desk-phase-legend > button[aria-pressed="true"], .desk-phase-history > button[aria-pressed="true"] { background: var(--pale); }
.desk-phase-tag { display: inline-block; padding: 3px 8px; border-radius: 6px; font-size: var(--type-small); line-height: var(--leading-ui); }
.phase-contact { background: #e5ede8; color: #213d31; }
.phase-confirmed { background: #d9f0e2; color: #14462f; }
.phase-sampling { background: #fdf1d6; color: #59430f; }
.phase-filming { background: #deeff7; color: #254556; }
.phase-review { background: #ece4f6; color: #403255; }
.phase-settlement { background: #f8e3e8; color: #603646; }
.phase-done { background: #d9eee3; color: #285842; }
.phase-cancelled { background: #ecedeb; color: #47534d; }
.phase-none { background: #eef3f0; color: #44564e; }
.desk-phase-history { display: flex; align-items: center; margin: 23px 22px 15px; padding-top: 12px; border-top: 1px solid #e6ede9; }
.desk-phase-history > button { display: inline-flex; align-items: center; gap: 9px; padding: 3px 8px 3px 0; border: 0; border-radius: 0; color: var(--ink); font-size: var(--type-small); }
.desk-phase-history > button + button { border-left: 1px solid #d8e2dd; padding-left: 24px; margin-left: 15px; }
.desk-phase-history .desk-icon { width: 21px; height: 21px; }
.desk-task-list { padding: 0 22px 12px; }
.desk-themed .desk-task {
  display: flex;
  width: 100%;
  min-height: 75px;
  align-items: center;
  gap: 16px;
  padding: 9px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: left;
}
.desk-themed .desk-task + .desk-task { border-top: 1px solid #e6ede9; }
.desk-themed .desk-task:hover { background: #f4f8f6; }
.desk-task-icon { display: grid; place-items: center; flex: none; width: 50px; height: 50px; background: var(--pale); border-radius: 9px; }
.desk-task-icon .desk-icon { width: 28px; height: 28px; }
.desk-task-copy { min-width: 0; flex: 1; }
.desk-task-copy > :is(strong,small) { display: block; overflow-wrap: anywhere; }
.desk-task-copy strong { color: #13231d; font-size: var(--type-body); font-weight: 650; }
.desk-task-copy small { color: #495a52; font-size: var(--type-small); }
.desk-quiet { padding: 22px 0; color: var(--muted); }
.desk-quiet small { display: block; margin-top: 6px; font-size: .9em; }

/* The same cooperation rows become labelled cards on narrow screens. */
.desk-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 11px; }
.desk-filters :is(input,select,button) { min-height: 40px; font-size: var(--type-ui); border-color: #cfdad5; border-radius: 7px; }
.desk-filters button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding-block: 6px; }
.desk-filters select { min-width: 145px; max-width: 100%; padding: 6px 12px; }
.desk-search { position: relative; width: min(100%, 356px); }
.desk-search > .desk-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.desk-search input { width: 100%; padding: 6px 12px 6px 43px; }
.desk-table-scroll { margin: 6px 14px 0; overflow: auto; }
.desk-table { width: 100%; min-width: 735px; border-collapse: separate; border-spacing: 0; font-size: var(--type-ui); }
.desk-table th { padding: 9px 12px; background: #eaf3ef; color: #16251e; font-size: var(--type-small); font-weight: 650; white-space: nowrap; }
.desk-table th:first-child { border-radius: 8px 0 0 8px; }
.desk-table th:last-child { border-radius: 0 8px 8px 0; }
.desk-table th:first-child, .desk-table .desk-identity { padding-left: 19px; }
.desk-table td { padding: 8px 12px; border-bottom: 1px solid #edf1ef; overflow-wrap: anywhere; }
.desk-table .desk-identity { width: 24%; }
.desk-table .desk-row-actions { width: 1%; }
.desk-table .desk-row-actions .row { gap: 7px; }
.desk-table .desk-row-actions button { border: 0; background: none; padding: 6px 4px; color: var(--green); font-size: var(--type-ui); font-weight: 650; white-space: nowrap; }
.desk-table .desk-row-actions button:hover { text-decoration: underline; }
.desk-table .desk-row-actions button + button { border-left: 1px solid #dbe4df; border-radius: 0; padding-left: 12px; }
.creator-chat-trigger { display: flex; align-items: center; gap: 12px; padding: 0; border: 0; background: transparent; text-align: left; max-width: 100%; }
.creator-chat-trigger:hover strong { text-decoration: underline; }
.creator-chat-trigger strong, .creator-chat-trigger small { display: block; overflow-wrap: anywhere; }
.creator-chat-trigger strong { color: var(--green); font-size: var(--type-ui); font-weight: 650; }
.creator-chat-trigger small { color: var(--muted); font-size: var(--type-small); line-height: var(--leading-ui); }
.desk-avatar { display: inline-grid; place-items: center; width: 39px; height: 39px; flex: none; border-radius: 50%; color: #204432; font-size: 17px; font-weight: 650; }
.desk-themed .desk-table .desk-avatar, .sage { background: #d7efe2; }
.peach { background: #f1e0d1; }
.lavender { background: #e5def2; }
.blue { background: #d9e8ed; }
.rose { background: #eedfe5; }
.desk-platform { display: inline-flex; align-items: center; gap: 5px; margin-right: 7px; }
.desk-platform:last-child { margin-right: 0; }
.desk-platform .desk-icon { width: 20px; height: 20px; }
.desk-table small.desk-phase-detail { color: var(--muted); font-size: var(--type-caption); line-height: var(--leading-ui); margin-top: 3px; }
.desk-phase-age { color: var(--green); font-size: var(--type-caption); font-weight: 600; line-height: var(--leading-ui); font-variant-numeric: tabular-nums; }
.desk-table .desk-phase-age, .desk-task-copy .desk-phase-age { display: block; margin-top: 3px; }
.milestone-case .row:has(.desk-phase-age), .flow-current-phase { flex-wrap: wrap; }
.flow-current-phase { margin-top: 10px; }
.desk-table-foot { display: flex; align-items: center; gap: 7px; padding: 10px 22px 12px; color: var(--muted); font-size: var(--type-caption); }
.desk-table-foot .desk-icon { width: 17px; height: 17px; }
.desk-mobile-label { display: none; }

/* Creator form */
.desk-themed dialog { color: var(--ink); }
.desk-themed dialog:has(.creator-form-fields) {
  width: 594px;
  max-height: calc(100dvh - 30px);
  padding: 27px;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 12px 37px #142d2530;
}
.desk-themed dialog::backdrop { background: #1c30297a; }
.desk-themed dialog:has(.creator-form-fields) .dialog-head { align-items: start; margin-bottom: 9px; }
.desk-themed dialog:has(.creator-form-fields) h2 { margin: 0; color: #102a20; font-size: var(--type-dialog); }
.desk-themed dialog:has(.creator-form-fields) .close { line-height: 1; padding: 4px 6px; font-size: 25px; }
.desk-themed dialog:has(.creator-form-fields) .dialog-head + p { margin: 0 0 22px; color: var(--muted); font-size: var(--type-ui); }
.creator-form-fields .two { gap: 22px; }
.creator-form-fields .field { margin-bottom: 15px; }
.creator-form-fields label { color: #16251f; font-size: var(--type-ui); font-weight: 600; }
.creator-required { color: #af3432; }
.creator-form-fields :is(input,textarea) { height: 42px; padding: 8px 14px; border-color: #bfcfc7; border-radius: 7px; font-size: var(--type-body); }
.creator-form-fields #f-socials { height: 81px; min-height: 81px; }
.creator-guided-field { margin-bottom: 17px; }
.creator-guided-field .field { margin-bottom: 3px; }
.creator-guided-field p { margin: 0; color: var(--muted); font-size: var(--type-small); }
.creator-optional { margin: 20px 0 0; }
.creator-optional > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 8px;
  background: #e2eee8;
  color: var(--ink);
  font-size: var(--type-ui);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.creator-optional summary::-webkit-details-marker { display: none; }
.creator-optional > summary::after {
  content: "";
  width: 18px;
  height: 18px;
  flex: none;
  background: url("/assets/icons/chevron-right.svg") center / contain no-repeat;
  transform: rotate(90deg);
}
.creator-optional[open] > summary::after { transform: rotate(-90deg); }
.creator-optional > div { padding-top: 14px; }
.desk-themed dialog:has(.creator-form-fields) .form-actions { gap: 14px; margin-top: 27px; padding-top: 19px; border-top: 1px solid #d9e4de; }
.desk-themed dialog:has(.creator-form-fields) .form-actions button { min-height: 43px; padding-inline: 23px; border-color: var(--green); font-size: var(--type-ui); font-weight: 650; }
.desk-themed dialog:has(.creator-form-fields) .form-actions button:not(.primary) { color: var(--green); }

@media (max-width: 1220px) {
  .desk-themed .shell { grid-template-columns: 199px minmax(0, 1fr); }
  .desk-themed .sidebar { padding-inline: 11px; }
  .desk-themed .desk-nav-group > button { gap: 10px; padding-inline: 11px; }
  .desk-themed .top-meta { gap: 12px; }
  .desk-phase-legend > button { padding-inline: 6px; }
  .desk-phase-legend .desk-phase-tag { font-size: 13px; padding-inline: 5px; }
}
@media (max-width: 1020px) {
  .desk-overview { grid-template-columns: 1fr; }
  .desk-themed .top-meta .desk-session-status { display: none; }
  .desk-themed .notice {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 22px;
    background: #e3eee8;
    border-color: var(--line);
    color: var(--ink);
  }
  .desk-themed .notice strong { margin-right: 10px; }
  .desk-stat > .desk-icon { width: 24px; height: 24px; }
}
@media (max-width: 820px) {
  :root { --type-page: 1.5rem; --type-dialog: 1.25rem; --type-metric: 1.75rem; }
  .desk-themed .shell { display: block; }
  .desk-themed { --desk-mobile-header-height: 45px; }
  .desk-themed .topbar { padding: 4px 13px 4px 10px; position: sticky; top: 0; z-index: 25; min-height: var(--desk-mobile-header-height); gap: 6px; }
  .desk-themed .topbar > :not(.desk-mobile-header, .top-meta) { display: none; }
  .desk-themed .top-meta > .tag, .desk-themed #save-badge::before { display: none; }
  .desk-themed #save-badge { padding: 0; border: 0; line-height: 1.3; text-align: right; white-space: normal; font-size: 13px; }
  .desk-themed .desk-mobile-header { display: flex; gap: 10px; align-items: center; }
  .desk-themed .desk-menu-toggle { display: grid; place-items: center; border: 0; padding: 0; width: 28px; height: 36px; background: transparent; }
  .desk-menu-toggle .desk-icon { height: 23px; width: 23px; }
  .desk-themed .desk-mobile-header .brand { gap: 8px; padding: 0; font-size: 18px; }
  .desk-themed .desk-mobile-header .brand small { font-size: 10px; margin-top: 2px; }
  .desk-mobile-header .desk-brand-mark { width: 33px; border-radius: 8px; }
  .desk-mobile-header .desk-brand-mark .desk-icon { width: 22px; height: 22px; }
  .desk-themed .sidebar {
    display: none;
    position: fixed;
    top: var(--desk-mobile-header-height);
    left: 0;
    bottom: 0;
    z-index: 24;
    width: min(280px, 85vw);
    height: auto;
    padding: 19px 12px;
    box-shadow: 7px 0 18px #163b3021;
  }
  .desk-themed .sidebar.desk-menu-open { display: block; }
  .desk-themed .sidebar > .brand { display: none; }
  .desk-themed .nav { display: block; overflow: visible; }
  .desk-nav-group + .desk-nav-group { margin-top: 12px; padding-top: 12px; }
  .desk-nav-group > p { margin-bottom: 3px; }
  .desk-themed .desk-nav-group > button { min-height: 40px; }
  .desk-nav-group > button .desk-icon { width: 20px; height: 20px; }
  .desk-themed .notice { margin: 10px 12px 0; padding: 6px 11px; border: 1px solid var(--line); border-radius: 8px; }
  .desk-themed .notice > .desk-icon { width: 23px; height: 23px; }
  .desk-themed .notice strong { display: block; font-size: 15px; }
  .desk-themed .notice span { display: block; font-size: 12px; }
  .desk-themed .content { padding: 10px 12px 22px; }
  .desk-home .heading { display: block; margin: 0 0 12px; }
  .desk-home .heading h1 { margin-bottom: 0; }
  .desk-home .heading .muted { margin-top: 3px; font-size: var(--type-ui); }
  .desk-heading-actions { display: grid; grid-template-columns: 1.13fr 1fr; gap: 8px; margin-top: 11px; }
  .desk-heading-actions > button { width: 100%; min-width: 0; min-height: 36px; padding: 5px 4px; border-color: var(--green); }
  .desk-heading-actions > .primary, .desk-heading-actions > button:not(.primary) { min-width: 0; }
  .desk-heading-actions .desk-icon { width: 17px; height: 17px; }
  .desk-themed .panel, .desk-stats { border-radius: 10px; }
  .desk-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 12px; padding: 7px 10px; }
  .desk-stat { display: block; padding: 7px 8px; }
  .desk-stat:nth-child(odd) { border-left: 0; }
  .desk-stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .desk-stat > .desk-icon, .desk-stat small { display: none; }
  .desk-stat span { font-size: var(--type-small); }
  .desk-overview { grid-template-areas: "priorities" "distribution"; gap: 12px; margin-bottom: 12px; }
  .desk-priorities { grid-area: priorities; }
  .desk-distribution { grid-area: distribution; }
  .desk-home .panel-head { padding: 6px 12px 4px; }
  .desk-themed .desk-link { font-size: var(--type-small); padding-block: 2px; }
  .desk-link .desk-icon { width: 14px; height: 14px; }
  .desk-task-list { padding: 0 11px 3px; }
  .desk-themed .desk-task { min-height: 45px; gap: 10px; padding: 4px 0; line-height: 1.35; border-top: 1px solid #e6ede9; }
  .desk-task:nth-child(n + 3) { display: none; }
  .desk-task-icon { width: 34px; height: 34px; }
  .desk-task-icon .desk-icon { width: 22px; height: 22px; }
  .desk-task-copy strong { font-size: var(--type-ui); }
  .desk-task-copy small { font-size: var(--type-caption); }
  .desk-quiet { padding: 7px 0 11px; font-size: 13px; }
  .desk-phase-bar { margin: 6px 12px 8px; height: 12px; }
  .desk-phase-legend { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 13px; margin: 0 12px; }
  .desk-phase-legend > button:nth-child(n) { position: relative; border: 0; min-height: 24px; padding: 2px 0 2px 18px; font-size: 13px; }
  .desk-phase-legend > button::before { content: ""; position: absolute; inset-inline-start: 0; width: 11px; height: 11px; border-radius: 3px; background: var(--phase-bar); }
  .desk-phase-legend .desk-phase-tag { color: var(--ink); background: none; padding: 0; font-size: 12px; }
  .desk-phase-history { margin: 6px 12px; padding-top: 4px; }
  .desk-phase-history > button { min-height: 30px; gap: 5px; flex: 1; justify-content: center; font-size: 13px; white-space: nowrap; }
  .desk-phase-history > button + button { padding-left: 6px; margin-left: 0; }
  .desk-phase-history .desk-icon { width: 16px; height: 16px; }
  .desk-filters { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 7px; margin-top: 8px; margin-inline: -2px; }
  .desk-filters .desk-search { width: 100%; grid-column: 1 / -1; }
  .desk-filters :is(input,select,button) { width: 100%; min-width: 0; min-height: 34px; font-size: 13px; }
  .desk-filters select { padding-inline: 5px; text-overflow: ellipsis; }
  .desk-search input { padding-left: 36px; }
  .desk-search > .desk-icon { width: 17px; height: 17px; left: 11px; }
  .desk-filters button .desk-icon { width: 16px; height: 16px; }
  .desk-reset { grid-column: 3; }
  .desk-table-scroll { overflow: visible; margin: 3px 7px 0; }
  .desk-table { display: block; min-width: 0; font-size: var(--type-small); }
  .desk-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .desk-table tbody { display: grid; gap: 7px; }
  .desk-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0,1.06fr) minmax(0,1.10fr) minmax(0,1.06fr) minmax(0,.78fr) minmax(0,1fr);
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 9px;
  }
  .desk-table td { min-width: 0; padding: 6px; border: 0; }
  .desk-table td.desk-identity { grid-area: 1 / 1 / 2 / 4; width: auto; padding: 7px 5px 7px 7px; border-bottom: 1px solid var(--line); }
  .desk-table td.desk-row-actions { grid-area: 1 / 4 / 2 / 6; display: flex; justify-content: end; width: auto; padding-right: 7px; border-bottom: 1px solid var(--line); }
  .desk-table .desk-row-actions .row { gap: 2px; flex-wrap: wrap; justify-content: end; }
  .desk-table .desk-row-actions button { padding: 5px 2px; font-size: var(--type-caption); }
  .desk-table .desk-row-actions button + button { padding-left: 5px; }
  .desk-table .desk-fact { position: relative; padding-inline: 4px; }
  .desk-table .desk-fact:nth-child(6) { font-size: var(--type-caption); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
  .desk-table .desk-fact + .desk-fact::before { content: ""; position: absolute; top: 8px; bottom: 8px; left: 0; border-left: 1px solid var(--line); }
  .desk-mobile-label { display: block; color: var(--muted); font-size: var(--type-caption); font-weight: 600; margin-bottom: 4px; }
  .desk-table .desk-phase-tag { padding: 2px 3px; font-size: var(--type-caption); }
  .desk-table .desk-platform { gap: 2px; margin-right: 0; max-width: 100%; font-size: var(--type-caption); }
  .desk-table .desk-platform .desk-icon { width: 12px; height: 12px; }
  .desk-table .desk-platform > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .desk-table .creator-chat-trigger { gap: 6px; }
  .desk-table .creator-chat-trigger small { font-size: var(--type-caption); }
  .desk-table .desk-avatar { width: 32px; height: 32px; font-size: 15px; }
  .desk-table .desk-empty-row { border: 0; display: block; }
  .desk-table .desk-empty-row td { display: block; }
  .desk-table-foot { padding: 8px 10px; }
  .desk-table-foot .desk-icon { width: 13px; height: 13px; }
  .desk-themed dialog:has(.creator-form-fields) { padding: 16px; border-radius: 13px; }
  .desk-themed dialog:has(.creator-form-fields) .dialog-head + p { margin-bottom: 12px; font-size: var(--type-small); }
  .creator-form-fields .two { grid-template-columns: 1fr; gap: 0; }
  .creator-guided-field p { font-size: var(--type-caption); }
  .creator-form-fields .field { margin-bottom: 10px; }
  .desk-themed dialog:has(.creator-form-fields) .form-actions { margin-top: 16px; padding-top: 12px; }
}

/* The full-screen dismiss button must stay translucent under global button states. */
.desk-drawer-backdrop:hover,
.desk-drawer-backdrop:active,
.desk-drawer-backdrop:focus-visible{background:#112f2552}

/* Feedback belongs inside the native dialog's top layer, including long mobile forms. */
.form-error{padding:11px 13px;border:1px solid #e6bab4;border-radius:6px;background:#fff1ef;color:#8b332c;font-size:12px;white-space:pre-wrap;overflow-wrap:anywhere}

.connection-mail-grid{display:grid;grid-template-columns:1fr 1fr}.connection-mail-grid>.pad+div{border-left:1px solid var(--line)}.connection-mail-grid .muted{font-size:12px}.connection-mail-grid input,.connection-mail-grid select{min-width:0}details.panel>summary{cursor:pointer;color:var(--ink)}[data-connection]>.row:first-child{margin-bottom:14px}[data-connection] .row button{font-size:12px}details.panel>.pad{padding-top:4px}@media(max-width:1000px){.connection-mail-grid{grid-template-columns:1fr}.connection-mail-grid>.pad+div{border-left:0;border-top:1px solid var(--line)}}
.connection-result{margin-top:14px;padding:13px 15px;border:1px solid #c7d7ce;border-radius:7px;background:#f3f7f4;line-height:1.7;overflow-wrap:anywhere}
.connection-result p{margin:5px 0}
.connection-result small{color:#60746b}
.connection-error{background:#fff4f0;border-color:#e1b5a8;color:#793d2e}
.connection-success{background:#edf7ef;color:#22563e}
.connection-username-warning{color:#8c531f;font-size:12px;line-height:1.7}
.connection-username-warning[hidden]{display:none}
.connection-help{margin:0 0 18px;font-size:12px;line-height:1.8;color:#49685a}
.connection-help summary{cursor:pointer;font-weight:600}
.connection-help p{margin:8px 0}
.creator-context .row{gap:8px;flex-wrap:wrap}.creator-context h3{font-size:13px;margin:0}.creator-context button{font-size:11px;padding:5px 8px}
.creator-context-fields{margin:12px 0;font-size:12px;line-height:1.7}.creator-context-fields>div{display:grid;grid-template-columns:65px minmax(0,1fr);gap:8px;margin:7px 0}.creator-context-fields dt{color:#718478}.creator-context-fields dd{margin:0;overflow-wrap:anywhere}.creator-context-fields small{display:block;color:#718478;font-size:10px;margin-top:4px}
.creator-address{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;line-height:1.7}.creator-interest-note{margin-top:8px;font-size:12px;line-height:1.7}.creator-interest-note summary{cursor:pointer}
.bilingual-composer{flex:none;max-height:55vh;overflow:auto}.bilingual-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px}.bilingual-fields>div{min-width:0}.bilingual-fields label{display:block;color:#526f60;font-size:11px;margin-bottom:7px}.bilingual-fields textarea{width:100%;min-height:105px;height:112px;resize:vertical;font-size:12px;line-height:1.7}.bilingual-composer>.row{gap:9px;flex-wrap:wrap}.bilingual-composer #reply-translation-hint{flex:1;min-width:160px;line-height:1.7}.bilingual-composer>p{line-height:1.7;margin-bottom:0}
@media(max-width:800px){.bilingual-fields{grid-template-columns:1fr}.bilingual-composer{max-height:58vh}.bilingual-composer textarea{height:100px}}
@media(max-width:750px){.desk-drawer-content .chat-center{height:auto;min-height:0;max-height:none;flex:none}.desk-drawer-content .chat-history{height:220px;min-height:130px;flex:none}.desk-drawer-content .bilingual-composer{max-height:none;overflow:visible}}
