:root {
  color-scheme: light;
  --bg: #f8f7f3;
  --panel: #fffefa;
  --ink: #1e1d24;
  --muted: #726e7b;
  --line: #e5e2dc;
  --accent: #7456cc;
  --soft: #ece5fa;
  --mint: #dcebc8;
  --coral: #f7c7b5;
  --shadow: 0 20px 60px #30214e09;
  --danger: #aa263d;
  --good: #2d7050;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}
body {
  margin: 0;
  font-family: Inter, Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}
body.dark {
  color-scheme: dark;
  --bg: #15141b;
  --panel: #211f2a;
  --ink: #f8f5ef;
  --muted: #b3aebb;
  --line: #393541;
  --soft: #352944;
  --shadow: 0 20px 60px #0002;
  --danger: #ff9fb1;
  --good: #b6ddb0;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
a,
button {
  touch-action: manipulation;
  outline-offset: 5px;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--accent);
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  line-height: 1.12;
}
h1 {
  font-size: clamp(36px, 5vw, 66px);
  letter-spacing: -0.045em;
}
h2 {
  font-size: clamp(24px, 2.8vw, 36px);
  letter-spacing: -0.03em;
}
h3 {
  font-size: 19px;
  letter-spacing: -0.02em;
}
p {
  overflow-wrap: anywhere;
}
small {
  font-size: 12px;
  color: var(--muted);
}
.muted {
  color: var(--muted);
}
.accent,
.text-link {
  color: var(--accent);
}
.text-link {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pre {
  white-space: pre-wrap;
}
.skip {
  position: fixed;
  left: 15px;
  top: -90px;
  z-index: 200;
  background: var(--panel);
  padding: 15px;
}
.skip:focus {
  top: 10px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 82px;
  padding: 0 max(5vw, 20px);
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.logo {
  font-size: 29px;
  font-weight: 900;
  letter-spacing: -1.8px;
  white-space: nowrap;
}
.logo span,
.logo i {
  color: var(--accent);
}
.logo i {
  display: inline-block;
  font-style: normal;
  font-size: 19px;
  vertical-align: top;
  margin: 2px 0 0 4px;
}
.desktop-nav {
  display: flex;
  gap: 27px;
  margin: auto;
  font-size: 14px;
}
.desktop-nav a:hover,
.footer a:hover {
  color: var(--accent);
}
.actions,
.button-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-height: 46px;
  padding: 11px 19px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  transition:
    transform 0.18s,
    box-shadow 0.18s;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn.danger {
  color: var(--danger);
}
.btn.sm {
  padding: 9px 13px;
  font-size: 12px;
  min-height: 42px;
}
.btn.wide {
  width: 100%;
}
.icon-button {
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 20px;
  flex-shrink: 0;
}
.linklike {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
}
.menu-toggle {
  display: none;
}
.nav-user {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--soft);
  font-weight: 700;
}
.mobile-nav {
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  z-index: 49;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  padding: 16px 5vw;
  display: grid;
  gap: 7px;
  box-shadow: var(--shadow);
}
.mobile-nav a {
  padding: 11px;
}
#unread,
#unreadChats,
#unreadSupport {
  position: absolute;
  right: -3px;
  top: -3px;
  min-width: 18px;
  padding: 1px 4px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  border-radius: 12px;
}
.hero {
  max-width: 1520px;
  margin: auto;
  min-height: 640px;
  padding: 76px 5vw 65px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 25px;
  align-items: center;
  overflow: hidden;
}
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}
.hero-top {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--mint);
  color: #33422f;
  padding: 9px 14px;
  border-radius: 999px;
  letter-spacing: 0.05em;
}
.dot {
  height: 7px;
  width: 7px;
  border-radius: 50%;
  background: #55864e;
}
.hero h1 {
  font-size: clamp(60px, 6.4vw, 97px);
  line-height: 0.96;
  letter-spacing: -0.065em;
  margin: 26px 0;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
  position: relative;
}
.hero h1 em:after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 4px;
  border-radius: 60%;
  background: var(--coral);
  transform: rotate(-4deg);
}
.hero p {
  font-size: 16px;
  max-width: 475px;
  color: var(--muted);
  line-height: 1.65;
}
.search {
  display: flex;
  padding: 7px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  border-radius: 19px;
  max-width: 590px;
  margin-top: 28px;
  position: relative;
  z-index: 3;
}
.search input {
  margin: 0;
  border: 0;
  min-width: 0;
  flex: 1;
  padding: 13px;
  background: transparent;
}
.search .btn {
  border-radius: 13px;
  white-space: nowrap;
  font-size: 12px;
}
.hero-meta {
  display: flex;
  gap: 22px;
  margin-top: 23px;
  color: var(--muted);
  font-size: 11px;
}
.hero-meta span:before {
  content: "↗";
  margin-right: 6px;
  color: var(--accent);
}
.hero-art {
  position: relative;
  height: 455px;
  isolation: isolate;
}
.orb {
  position: absolute;
  left: 15%;
  top: 12%;
  width: 330px;
  height: 330px;
  border-radius: 43% 57% 52% 48%;
  background: radial-gradient(
    circle at 28% 20%,
    #eee6ff 0,
    #bda5f0 30%,
    #8b65d4 65%,
    #593d9a 100%
  );
  box-shadow:
    inset -22px -28px 40px #49356844,
    inset 15px 16px 27px #fff7,
    0 35px 55px #7b57b233;
  transform: rotate(-12deg);
  animation: breathe 8s ease-in-out infinite;
}
.orb:before {
  content: "Q";
  position: absolute;
  inset: 15%;
  display: grid;
  place-items: center;
  color: #f8f4ff;
  font-size: 185px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -16px;
  text-shadow: 6px 8px 0 #8060b088;
  transform: rotate(12deg);
}
.orbit {
  position: absolute;
  inset: 8% -4%;
  border: 1px solid var(--line);
  border-radius: 50%;
  transform: rotate(-35deg);
  z-index: -1;
}
.orbit.two {
  inset: 26% -1%;
  transform: rotate(28deg);
}
.spark {
  position: absolute;
  right: 9%;
  top: 0;
  color: var(--accent);
  font-size: 66px;
  transform: rotate(14deg);
}
.float-card {
  position: absolute;
  z-index: 2;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 12px 40px #1e143215;
  border-radius: 18px;
  padding: 16px 20px;
  display: grid;
  gap: 7px;
}
.float-card small {
  font-size: 9px;
  letter-spacing: 0.1em;
}
.float-card b {
  font-size: 14px;
  letter-spacing: -0.03em;
}
.float-card span {
  font-size: 11px;
  color: var(--muted);
}
.float-card.idea {
  left: 0;
  top: 35px;
  transform: rotate(-6deg);
}
.float-card.match {
  right: -3%;
  top: 58%;
  transform: rotate(5deg);
}
.float-card.result {
  left: 4%;
  bottom: 3%;
  min-width: 235px;
  transform: rotate(-3deg);
  background: var(--mint);
  color: #29392d;
}
.float-card.result small {
  color: #4f6553;
}
.mini-path {
  display: flex;
  gap: 4px;
}
.mini-path i {
  height: 4px;
  flex: 1;
  border-radius: 5px;
  background: #6e9265;
}
.art-caption {
  position: absolute;
  bottom: 0;
  right: 0;
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--muted);
}
@keyframes breathe {
  50% {
    transform: translateY(-10px) rotate(-7deg);
    border-radius: 52% 48% 42% 58%;
  }
}
.hero-bridge {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 23px 5vw;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  flex-wrap: wrap;
}
.hero-bridge b {
  font-size: 13px;
}
.hero-bridge span {
  color: var(--muted);
}
.section {
  padding: 60px 5vw;
  max-width: 1520px;
  margin: auto;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 25px;
  margin-bottom: 28px;
}
.section-head p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 13px;
}
.grid4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
}
.direction-card {
  min-height: 228px;
  border-radius: 26px;
  padding: 25px;
  position: relative;
  color: #29252f;
  transition: transform 0.2s;
}
.direction-card:hover {
  transform: translateY(-6px);
}
.direction-card .symbol {
  font-size: 31px;
}
.direction-card .arrow {
  position: absolute;
  right: 24px;
  top: 24px;
  font-size: 23px;
}
.direction-card h3 {
  margin: 34px 0 11px;
}
.direction-card p {
  font-size: 12px;
  max-width: 205px;
  color: #504857;
}
.c0 {
  background: #d6c8f4;
}
.c1 {
  background: #dceac9;
}
.c2 {
  background: #f4c9b9;
}
.c3 {
  background: #c6e7e2;
}
.c4 {
  background: #f1e2ab;
}
.c5 {
  background: #e3d7e9;
}
.c6 {
  background: #e2e6c2;
}
.c7 {
  background: #edccdd;
}
.cards,
.feature-grid,
.pricing {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.spec-card,
.feature,
.price-card,
.order-card {
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 23px;
  background: var(--panel);
  box-shadow: var(--shadow);
  min-width: 0;
}
.spec-top {
  display: flex;
  gap: 12px;
  align-items: center;
}
.avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--soft);
  font-weight: 700;
  flex-shrink: 0;
}
.spec-card h3 {
  font-size: 17px;
}
.spec-card p {
  color: var(--muted);
  font-size: 13px;
  margin: 18px 0;
  min-height: 65px;
}
.spec-bottom {
  display: flex;
  gap: 7px;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 18px;
}
.rating {
  color: var(--accent);
  font-weight: 700;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}
.pill,
.order-status {
  font-size: 10px;
  font-weight: 600;
  background: var(--soft);
  padding: 5px 10px;
  border-radius: 50px;
  white-space: nowrap;
}
.pill.green {
  color: #315939;
  background: #deecd7;
}
.pill.coral {
  background: #f8dacd;
  color: #784b34;
}
.pill.outline {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
}
.feature .num {
  font-size: 11px;
  color: var(--accent);
}
.feature h3 {
  margin: 30px 0 12px;
}
.feature p {
  font-size: 13px;
  color: var(--muted);
}
.cta {
  margin: 20px 5vw 65px;
  background: #242029;
  color: #fff;
  border-radius: 32px;
  padding: 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  overflow: hidden;
}
.cta h2 {
  font-size: clamp(36px, 5vw, 59px);
}
.cta p {
  margin-top: 16px;
  color: #c5bccf;
}
.cta .btn {
  white-space: nowrap;
}
.cta .eyebrow {
  color: #c5b1f6;
}
.page {
  max-width: 1320px;
  padding: 48px 5vw 80px;
  margin: auto;
}
.page-head {
  margin-bottom: 30px;
}
.crumb {
  font-size: 11px;
  color: var(--muted);
  display: inline-block;
  margin-bottom: 30px;
}
.page-head .eyebrow {
  color: var(--accent);
}
.page-head h1 {
  margin: 16px 0;
}
.page-head p {
  font-size: 15px;
  color: var(--muted);
  max-width: 710px;
}
.panel {
  padding: 28px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--panel);
  min-width: 0;
}
.panel h3 {
  margin-bottom: 18px;
}
.stack {
  display: grid;
  gap: 15px;
}
.two-col {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 22px;
  align-items: start;
}
.two-col > .stack,
.two-col > .panel {
  min-width: 0;
}
.spacer {
  margin-top: 22px;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 22px 0;
}
.empty {
  grid-column: 1/-1;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 25px;
  padding: 45px 25px;
  background: var(--panel);
}
.empty-icon {
  font-size: 30px;
  color: var(--accent);
  margin-bottom: 14px;
}
.empty p {
  color: var(--muted);
  font-size: 14px;
  margin: 12px auto 20px;
  max-width: 520px;
}
.notice {
  background: var(--soft);
  padding: 16px 19px;
  border-radius: 15px;
  font-size: 13px;
  line-height: 1.6;
}
.notice.warning {
  background: #f6e8c9;
  color: #654c20;
}
.notice.success {
  background: #deecd7;
  color: #315939;
}
.form-error {
  color: var(--danger);
  font-size: 13px;
  white-space: pre-wrap;
}
.form-error:empty {
  display: none;
}
.form-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.65;
}
.form-note a,
.check a {
  color: var(--accent);
  text-decoration: underline;
}
.loading {
  padding: 90px 5vw;
  text-align: center;
  color: var(--muted);
}
label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  border-radius: 11px;
  padding: 12px 13px;
  outline: none;
  min-width: 0;
  font-size: 14px;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--soft);
}
textarea {
  min-height: 120px;
  resize: vertical;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.6;
}
.check input {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin-top: 3px;
  accent-color: var(--accent);
}
.field-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.password-field {
  position: relative;
}
.password-field input {
  padding-right: 90px;
}
.password-field button {
  position: absolute;
  right: 6px;
  top: 4px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 11px;
  padding: 12px 8px;
}
.auth-layout {
  max-width: 1040px;
  margin: 65px auto;
  padding: 0 5vw;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: center;
}
.auth-intro h1 {
  font-size: 58px;
  margin: 25px 0;
}
.auth-intro p {
  font-size: 14px;
  color: var(--muted);
}
.auth-shape {
  font-size: 140px;
  color: var(--accent);
  line-height: 1.4;
  transform: rotate(10deg);
}
.auth-form {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--panel);
  padding: 32px;
  display: grid;
  gap: 17px;
}
.auth-form h2 {
  font-size: 27px;
  margin-bottom: 6px;
}
.filter-wrap {
  margin-bottom: 28px;
}
.filter-wrap form {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  align-items: end;
  gap: 12px;
}
.filter-wrap .form-error {
  grid-column: 1/-1;
}
.filter-wrap .btn {
  justify-self: start;
}
.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 30px;
  font-size: 12px;
}
.with-rail {
  display: grid;
  grid-template-columns: 215px minmax(0, 1fr);
}
.rail {
  position: sticky;
  top: 82px;
  align-self: start;
  max-height: calc(100vh - 82px);
  overflow: auto;
  padding: 27px 16px;
  border-right: 1px solid var(--line);
  display: grid;
  gap: 4px;
}
.rail small {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin: 0 10px 16px;
}
.rail a {
  display: block;
  padding: 11px 13px;
  border-radius: 11px;
  font-size: 12px;
}
.rail a:hover,
.rail a.active {
  background: var(--soft);
  color: var(--accent);
}
.rail .btn {
  margin-top: 20px;
}
.with-rail .page {
  padding: 38px 3vw 70px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
}
.stat {
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  min-width: 0;
}
.stat small {
  display: block;
  margin-bottom: 13px;
}
.stat b {
  font-size: 28px;
  letter-spacing: -0.04em;
  word-break: break-word;
}
.welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  background: var(--soft);
  border-radius: 22px;
  padding: 29px;
}
.welcome h2 {
  font-size: 27px;
}
.welcome p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 10px;
}
.order-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}
.order-card h3 {
  margin-bottom: 13px;
}
.order-card p {
  font-size: 13px;
  color: var(--muted);
  margin: 15px 0;
}
.timeline {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 25px;
}
.timeline span {
  padding: 10px 13px;
  border-radius: 10px;
  background: var(--panel);
  color: var(--muted);
  font-size: 11px;
  border: 1px solid var(--line);
}
.timeline span.current {
  background: var(--soft);
  color: var(--accent);
  border-color: var(--soft);
}
.file-row {
  display: flex;
  gap: 15px;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  word-break: break-word;
}
.review {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.review p {
  font-size: 13px;
  margin: 10px 0;
}
.definition {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  font-size: 13px;
  margin: 0;
}
.definition dt {
  color: var(--muted);
}
.definition dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.chat {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 440px;
  overflow: auto;
  padding: 15px 3px;
  margin: 12px 0;
}
.bubble {
  max-width: 87%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 11px 15px;
  align-self: start;
}
.bubble.mine {
  align-self: end;
  background: var(--soft);
  border-color: var(--soft);
}
.bubble p {
  font-size: 13px;
  white-space: pre-wrap;
}
.bubble small {
  font-size: 9px;
  display: block;
  margin-top: 6px;
}
.bubble .deleted-note {
  color: var(--muted);
  font-style: italic;
}
.bubble .linklike {
  font-size: 9px;
  text-decoration: underline;
}
.tick {
  color: var(--muted);
}
.tick.read {
  color: var(--accent);
}
.chat-form {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}
.chat-form label {
  flex: 1;
}
.chat-form textarea {
  min-height: 78px;
}
.chat-form .form-error {
  width: 100%;
}
.chat-input-label {
  flex: 1;
}
.attach-btn {
  min-width: 46px;
  padding: 9px 12px;
  text-align: center;
  cursor: pointer;
}
.chat-draft-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}
.chat-draft-files:empty {
  display: none;
}
.chat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--soft);
  border-radius: 20px;
  padding: 6px 8px 6px 12px;
  font-size: 12px;
}
.chat-chip button {
  color: var(--muted);
}
.msg-files {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.msg-image img {
  max-width: 100%;
  max-height: 260px;
  border-radius: 12px;
  display: block;
}
.chat-day-sep {
  display: flex;
  justify-content: center;
  margin: 6px 0;
}
.chat-day-sep span {
  font-size: 11px;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 4px 12px;
}
.older-btn {
  align-self: center;
  margin: 0 auto 10px;
  display: block;
}
.messenger {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 22px;
  align-items: start;
}
.messenger-list {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 92px;
}
.messenger-list form.stack {
  gap: 0;
}
.chat-tabs {
  display: flex;
  gap: 8px;
}
.chat-list-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 62vh;
  overflow: auto;
  margin: 0 -8px;
}
.chat-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border-radius: 16px;
}
.chat-row.active {
  background: var(--soft);
}
.chat-row-link {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.chat-avatar {
  position: relative;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--soft);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
}
.online-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--good, #2ea043);
  border: 2px solid var(--panel);
}
.chat-row-body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chat-row-top,
.chat-row-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.chat-row-top b {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-row-top small {
  color: var(--muted);
  font-size: 10px;
  flex-shrink: 0;
}
.chat-preview {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-badge {
  min-width: 18px;
  padding: 1px 6px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  border-radius: 12px;
  text-align: center;
  flex-shrink: 0;
}
.chat-row-order {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-row-actions {
  display: none;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 140px;
}
.chat-row:hover .chat-row-actions,
.chat-row.active .chat-row-actions {
  display: flex;
}
.messenger-chat {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  padding: 24px;
  min-width: 0;
}
.messenger-empty {
  display: grid;
  place-items: center;
  min-height: 320px;
}
.back-btn {
  display: none;
  margin-bottom: 14px;
}
.chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.chat-head-info {
  display: flex;
  flex-direction: column;
}
.chat-head-info small {
  color: var(--muted);
  font-size: 11px;
}
.chat-head-info small.online {
  color: var(--good, #2ea043);
}
.order-chip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 16px;
  margin: 16px 0;
  font-size: 13px;
}
.order-chip > span:first-child {
  font-weight: 700;
  margin-right: auto;
}
.notification {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 19px 0;
  border-bottom: 1px solid var(--line);
}
.notification.unread {
  border-left: 3px solid var(--accent);
  padding-left: 15px;
}
.notification p {
  font-size: 13px;
  margin: 6px 0;
}
.table-wrap {
  overflow: auto;
}
.billing-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  text-align: left;
}
.billing-table th,
.billing-table td {
  padding: 15px 11px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.billing-table th {
  color: var(--muted);
  font-weight: 500;
}
.billing-table small {
  font-size: 10px;
  word-break: break-all;
}
.price-card {
  padding: 30px;
}
.price-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--soft);
}
.price-card h3 {
  margin: 25px 0;
}
.price {
  font-size: 39px;
  font-weight: 700;
  letter-spacing: -0.05em;
}
.price-card ul {
  padding-left: 18px;
  margin: 25px 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 2;
}
.pro-banner {
  background: var(--soft);
  border-radius: 26px;
  padding: 35px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
}
.pro-banner p {
  font-size: 14px;
  color: var(--muted);
  margin-top: 15px;
}
.legal {
  max-width: 900px;
}
.legal h2 {
  font-size: 23px;
  margin: 35px 0 15px;
}
.legal p,
.legal li {
  font-size: 14px;
  line-height: 1.85;
  margin-bottom: 13px;
}
.footer {
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 35px 5vw;
}
.footer p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 9px;
}
.footer nav {
  display: flex;
  gap: 23px;
  flex-wrap: wrap;
  font-size: 11px;
}
#toast {
  position: fixed;
  left: 50%;
  bottom: 25px;
  transform: translate(-50%, 20px);
  padding: 15px 23px;
  border-radius: 15px;
  background: var(--ink);
  color: var(--bg);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  z-index: 120;
  max-width: 90vw;
  font-size: 13px;
  transition:
    opacity 0.2s,
    transform 0.2s;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
dialog {
  width: min(530px, 92vw);
  border: 1px solid var(--line);
  border-radius: 25px;
  padding: 27px;
  background: var(--panel);
  color: var(--ink);
  max-height: 90vh;
}
dialog::backdrop {
  background: #17112188;
  backdrop-filter: blur(4px);
}
.dialog-head {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}
.dialog-head h2 {
  font-size: 24px;
}
#modalSubmit {
  margin-top: 23px;
}
#modalError {
  margin-top: 16px;
}
@media (min-width: 1600px) {
  .hero h1 {
    font-size: 97px;
  }
}
@media (max-width: 1100px) {
  .desktop-nav {
    gap: 16px;
    font-size: 12px;
  }
  .hero {
    grid-template-columns: 1.1fr 1fr;
  }
  .hero h1 {
    font-size: 70px;
  }
  .orb {
    width: 275px;
    height: 275px;
  }
  .orb:before {
    font-size: 155px;
  }
  .hero-art {
    height: 405px;
  }
  .float-card.match {
    right: 0;
  }
  .hero-meta {
    gap: 12px;
    font-size: 10px;
  }
  .with-rail {
    grid-template-columns: 185px minmax(0, 1fr);
  }
  .with-rail .cards,
  .with-rail .two-col {
    grid-template-columns: 1fr;
  }
  .filter-wrap form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cta {
    padding: 35px;
  }
  .pro-banner {
    display: block;
  }
  .pro-banner .btn {
    margin-top: 20px;
  }
}
@media (max-width: 850px) {
  .nav {
    height: 72px;
    padding: 0 5vw;
    gap: 9px;
  }
  .desktop-nav {
    display: none;
  }
  .actions {
    margin-left: auto;
  }
  .menu-toggle {
    display: grid;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 48px;
  }
  .hero h1 {
    font-size: 74px;
    max-width: 600px;
  }
  .hero-art {
    max-width: 530px;
    width: 100%;
    margin: auto;
  }
  .orb {
    width: 310px;
    height: 310px;
    left: 22%;
    top: 5%;
  }
  .orb:before {
    font-size: 175px;
  }
  .float-card.idea {
    left: 8%;
    top: 0;
  }
  .float-card.result {
    left: 10%;
    bottom: 0;
  }
  .float-card.match {
    right: 4%;
    top: 53%;
  }
  .hero-bridge {
    gap: 10px 20px;
  }
  .hero-bridge b {
    width: 100%;
  }
  .grid4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cards,
  .pricing {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cards .empty {
    grid-column: 1/-1;
  }
  .price-card:last-child {
    grid-column: 1/-1;
  }
  .two-col {
    grid-template-columns: 1fr;
  }
  .messenger {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .messenger-list {
    position: static;
    border-radius: 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    padding: 14px 0;
    margin: 0 -5vw;
    padding-left: 5vw;
    padding-right: 5vw;
  }
  .messenger-chat {
    border-radius: 0;
    border: 0;
    padding: 14px 0 40px;
  }
  .messenger:not(.chat-open) .messenger-chat {
    display: none;
  }
  .messenger.chat-open .messenger-list {
    display: none;
  }
  .chat-row-actions {
    display: flex;
    max-width: none;
  }
  .back-btn {
    display: inline-flex;
  }
  .with-rail {
    display: block;
  }
  .rail {
    position: static;
    display: flex;
    max-height: none;
    overflow-x: auto;
    padding: 13px 5vw;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    gap: 7px;
  }
  .rail small,
  .rail .btn {
    display: none;
  }
  .rail a {
    white-space: nowrap;
    padding: 9px 12px;
  }
  .with-rail .page {
    padding: 30px 5vw 60px;
  }
  .filter-wrap form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .filter-wrap label:first-child {
    grid-column: 1/-1;
  }
  .cta {
    flex-direction: column;
    align-items: start;
  }
  .footer {
    flex-wrap: wrap;
  }
  .feature-grid {
    gap: 10px;
  }
  .feature {
    padding: 19px;
  }
  .auth-layout {
    gap: 25px;
  }
  .auth-intro h1 {
    font-size: 45px;
  }
}
@media (max-width: 560px) {
  .nav .logo {
    font-size: 25px;
  }
  .nav .logo i {
    display: none;
  }
  .nav .icon-button {
    width: 40px;
    height: 40px;
  }
  .register-link {
    display: none;
  }
  .nav .btn {
    min-height: 40px;
    padding: 8px 13px;
    font-size: 12px;
  }
  .hero {
    padding: 36px 5vw 35px;
    min-height: 0;
    gap: 35px;
  }
  .hero h1 {
    font-size: 57px;
    letter-spacing: -0.06em;
  }
  .hero p {
    font-size: 14px;
  }
  .hero-top {
    font-size: 8px;
  }
  .search {
    display: grid;
    gap: 5px;
    border-radius: 15px;
  }
  .search input {
    font-size: 13px;
    padding: 10px;
  }
  .search .btn {
    padding: 13px;
  }
  .hero-meta {
    font-size: 9px;
    gap: 11px;
  }
  .hero-art {
    height: 325px;
  }
  .orb {
    width: 245px;
    height: 245px;
    left: 14%;
    top: 9%;
  }
  .orb:before {
    font-size: 139px;
  }
  .float-card {
    padding: 11px 14px;
    border-radius: 14px;
  }
  .float-card b {
    font-size: 11px;
  }
  .float-card small {
    font-size: 8px;
  }
  .float-card.idea {
    left: 0;
    top: 0;
  }
  .float-card.match {
    right: 0;
    top: 56%;
  }
  .float-card.result {
    left: 0;
    bottom: 0;
    min-width: 195px;
  }
  .art-caption {
    display: none;
  }
  .spark {
    font-size: 46px;
    right: 7%;
    top: 0;
  }
  .section {
    padding: 38px 5vw;
  }
  .section-head {
    align-items: start;
    flex-direction: column;
    gap: 17px;
  }
  .grid4 {
    gap: 10px;
  }
  .direction-card {
    padding: 19px;
    min-height: 203px;
    border-radius: 20px;
  }
  .direction-card h3 {
    font-size: 16px;
    margin-top: 26px;
  }
  .direction-card p {
    font-size: 11px;
  }
  .direction-card .symbol {
    font-size: 25px;
  }
  .direction-card .arrow {
    right: 15px;
    top: 17px;
  }
  .hero-bridge span {
    font-size: 10px;
  }
  .cards,
  .feature-grid,
  .pricing {
    grid-template-columns: 1fr;
  }
  .price-card:last-child {
    grid-column: auto;
  }
  .panel {
    padding: 21px;
    border-radius: 20px;
  }
  .field-pair {
    grid-template-columns: 1fr;
  }
  .filter-wrap .btn {
    grid-column: 1/-1;
    width: 100%;
  }
  .auth-layout {
    grid-template-columns: 1fr;
    margin: 35px auto;
  }
  .auth-intro h1 {
    font-size: 40px;
    margin: 15px 0;
  }
  .auth-shape {
    display: none;
  }
  .auth-form {
    padding: 23px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 18px;
  }
  .stat b {
    font-size: 26px;
  }
  .page {
    padding: 30px 5vw 55px;
  }
  .page-head h1 {
    font-size: 37px;
  }
  .page-head p {
    font-size: 14px;
  }
  .order-card {
    padding: 20px;
  }
  .order-top {
    flex-wrap: wrap;
  }
  .chat-form {
    align-items: stretch;
    flex-direction: column;
  }
  .chat-form .btn {
    align-self: end;
  }
  .notification {
    display: block;
  }
  .notification .btn {
    margin-top: 10px;
  }
  .definition {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .definition dd {
    margin-bottom: 12px;
  }
  .welcome {
    display: block;
    padding: 24px;
  }
  .welcome .btn {
    margin-top: 15px;
  }
  .footer {
    display: block;
    padding: 30px 5vw;
  }
  .footer p {
    margin: 16px 0;
  }
  .footer nav {
    gap: 10px 17px;
    margin-bottom: 18px;
  }
  .footer small {
    display: block;
  }
  .empty {
    padding: 30px 20px;
  }
  .cta {
    margin-bottom: 40px;
    padding: 30px;
  }
  .pro-banner {
    padding: 25px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
}
/* Messenger header tools, search, grouping */
.chat-head-actions {
  margin-left: auto;
  display: flex;
  gap: 6px;
}
.icon-button.sm-icon {
  width: 38px;
  height: 38px;
  font-size: 16px;
  cursor: pointer;
}
.chat-search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
.chat-search[hidden] {
  display: none;
}
.chat-search input {
  flex: 1;
}
.chat-search small {
  color: var(--muted);
  white-space: nowrap;
}
.chat .bubble.grouped {
  margin-top: -8px;
}
.bubble.grouped:not(.mine) {
  border-top-left-radius: 6px;
}
.bubble.grouped.mine {
  border-top-right-radius: 6px;
}
/* Current orders */
.order-tabs {
  flex-wrap: wrap;
}
.current-card details,
.submission {
  font-size: 13px;
  margin: 8px 0;
}
.current-card summary,
.submission summary {
  cursor: pointer;
  color: var(--accent);
  margin-bottom: 8px;
}
.progress {
  height: 8px;
  border-radius: 8px;
  background: var(--line);
  overflow: hidden;
  margin: 12px 0 4px;
}
.progress i {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 8px;
  width: 0;
}
.progress i.w35 { width: 35%; }
.progress i.w50 { width: 50%; }
.progress i.w60 { width: 60%; }
.progress i.w80 { width: 80%; }
.progress i.w92 { width: 92%; }
.progress i.w100 { width: 100%; }
/* Order page: history, review, amendments */
.history {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
  border-left: 2px solid var(--line);
}
.history li {
  position: relative;
  padding-left: 16px;
  font-size: 13px;
  display: grid;
  gap: 2px;
}
.history li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}
.history time {
  color: var(--muted);
  font-size: 11px;
}
.review-panel {
  border-color: var(--accent);
}
.amendments {
  border-left: 3px solid var(--accent);
  padding-left: 12px;
  font-size: 13px;
}
.amendments p {
  margin-top: 8px;
}
@media (max-width: 850px) {
  .chat-head-actions .sm-icon {
    width: 34px;
    height: 34px;
  }
}
/* Extras: progress, portfolio works, arbitration */
progress.progress {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border: 0;
  border-radius: 8px;
  background: var(--line);
  overflow: hidden;
}
progress.progress::-webkit-progress-bar {
  background: var(--line);
  border-radius: 8px;
}
progress.progress::-webkit-progress-value {
  background: var(--accent);
  border-radius: 8px;
}
progress.progress::-moz-progress-bar {
  background: var(--accent);
  border-radius: 8px;
}
.works {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.work {
  display: grid;
  gap: 6px;
  font-size: 13px;
}
.work img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
}
.work small {
  color: var(--muted);
}
.case-chat {
  max-height: 620px;
}
.chat-chip small {
  color: var(--muted);
}

/* Offers feed */
.offer-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.offer-card .button-row {
  margin-top: auto;
}
.offer-person {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.offer-person span:last-child {
  display: flex;
  flex-direction: column;
}
.offer-person small {
  color: var(--muted);
  font-size: 11px;
}

/* ===== Messenger: full-height layout ===== */
.messenger-page.page {
  max-width: 1680px;
  padding-top: 20px;
  padding-bottom: 20px;
}
.messenger-page .crumb {
  display: none;
}
.messenger-page .page-head {
  margin-bottom: 14px;
}
.messenger-page .page-head h1 {
  font-size: clamp(26px, 2.6vw, 34px);
  margin: 0;
}
.messenger {
  grid-template-columns: minmax(290px, 360px) minmax(0, 1fr);
  gap: 18px;
  height: calc(100vh - 175px);
  min-height: 620px;
  align-items: stretch;
}
.messenger-list {
  position: static;
  min-height: 0;
  overflow: hidden;
  padding: 16px;
  gap: 12px;
}
.chat-list-items {
  flex: 1;
  min-height: 0;
  max-height: none;
}
.chat-row {
  padding: 10px 8px;
  gap: 4px;
}
.chat-row-link {
  gap: 12px;
}
.chat-avatar {
  width: 46px;
  height: 46px;
}
.chat-row-top b {
  font-size: 14px;
}
.chat-preview {
  font-size: 13px;
}
.row-more {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  opacity: 0.45;
}
.chat-row:hover .row-more,
.chat-row.active .row-more,
.row-more:focus-visible {
  opacity: 1;
}
.messenger-chat {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 16px 22px 18px;
}
.messenger-chat > .messenger-empty {
  flex: 1;
}
.messenger-chat .chat-head {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.messenger-chat .order-chip {
  margin: 12px 0 0;
  padding: 9px 14px;
}
.messenger-chat .chat {
  flex: 1;
  min-height: 0;
  max-height: none;
  margin: 12px 0;
  padding: 18px 16px;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.messenger-chat .bubble {
  max-width: min(72%, 720px);
  padding: 12px 16px;
  background: var(--panel);
  border-color: var(--line);
}
.messenger-chat .bubble.mine {
  background: var(--soft);
  border-color: var(--soft);
}
.messenger-chat .bubble p {
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.messenger-chat .bubble small {
  font-size: 11px;
  color: var(--muted);
}
.messenger-chat .bubble .linklike {
  font-size: 11px;
}
.messenger-chat .chat-day-sep span {
  background: var(--panel);
}
.messenger-chat .msg-image img {
  max-height: 340px;
}
.messenger-chat .older-btn {
  margin: 10px auto 0;
}
.messenger-chat .chat-form {
  flex-shrink: 0;
  align-items: flex-end;
  gap: 10px;
}
.messenger-chat .chat-input-label {
  flex: 1 1 360px;
  font-size: 0;
}
.messenger-chat .chat-form textarea {
  width: 100%;
  min-height: 84px;
  max-height: 240px;
  resize: vertical;
  font-size: 15px;
  line-height: 1.45;
  padding: 12px 14px;
  border-radius: 16px;
}
.messenger-chat .chat-form .btn {
  height: 46px;
}
.messenger-chat .chat-form .btn.primary {
  padding-left: 22px;
  padding-right: 22px;
}
.messenger-chat > .form-note {
  flex-shrink: 0;
  text-align: center;
  padding: 12px;
}
@media (min-width: 1600px) {
  .messenger {
    grid-template-columns: 380px minmax(0, 1fr);
  }
}
@media (max-width: 1100px) {
  .messenger {
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 12px;
  }
  .messenger-chat .bubble {
    max-width: 82%;
  }
}
@media (max-width: 850px) {
  .messenger-page.page {
    padding-top: 10px;
    padding-bottom: 0;
  }
  .messenger-page .page-head {
    margin-bottom: 6px;
  }
  .messenger-page .page-head .eyebrow {
    display: none;
  }
  .messenger {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr);
    height: calc(100vh - 130px);
    height: calc(100dvh - 130px);
    min-height: 420px;
  }
  .messenger-chat {
    padding: 8px 0 10px;
  }
  .messenger-chat .chat {
    border-radius: 14px;
    padding: 12px 10px;
  }
  .messenger-chat .bubble {
    max-width: 88%;
  }
  .messenger-chat .chat-form textarea {
    min-height: 56px;
  }
  .messenger-chat .chat-input-label {
    flex-basis: 100%;
  }
  .messenger-chat .order-chip {
    font-size: 12px;
  }
  .row-more {
    opacity: 1;
  }
}
.chat-form label.attach-btn {
  flex: 0 0 auto;
}
.messenger-chat .chat-form .chat-draft-files,
.messenger-chat .chat-form .form-error {
  flex-basis: 100%;
}
/* compact header + search so the chat gets the height */
.messenger-page .page-head .eyebrow {
  display: none;
}
.messenger-page .page-head h1 {
  font-size: 26px;
}
.messenger {
  height: calc(100vh - 170px);
  min-height: 480px;
}
.messenger-list form.stack {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 8px;
}
.messenger-list form.stack label {
  flex: 1;
  font-size: 0;
  margin: 0;
}
.messenger-list form.stack input {
  font-size: 14px;
  height: 42px;
  margin: 0;
}
.messenger-list form.stack .btn {
  height: 42px;
  width: auto;
  padding: 0 16px;
  margin: 0;
  font-size: 13px;
}
.messenger-list form.stack .form-error:empty {
  display: none;
}
.messenger-list .chat-tabs .btn {
  padding: 7px 14px;
  font-size: 13px;
}
@media (max-width: 850px) {
  .messenger {
    height: calc(100vh - 118px);
    height: calc(100dvh - 118px);
  }
}
/* composer in one row: [textarea][📎][☰][Отправить] */
.messenger-chat .chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: end;
  gap: 8px;
}
.messenger-chat .chat-form .chat-draft-files,
.messenger-chat .chat-form .form-error {
  grid-column: 1 / -1;
}
.messenger-chat .chat-form textarea {
  min-height: 64px;
}
.messenger-chat .chat-form .attach-btn {
  width: 46px;
  padding: 0;
  display: grid;
  place-items: center;
}
/* slimmer order bar and header */
.messenger-chat .chat-head .chat-avatar {
  width: 42px;
  height: 42px;
}
.messenger-chat .chat-head {
  padding-bottom: 10px;
}
.messenger-chat .order-chip {
  padding: 6px 8px 6px 14px;
  gap: 6px;
  font-size: 13px;
}
.messenger-chat .order-chip .pill {
  padding: 3px 9px;
  font-size: 11px;
}
.messenger-chat .order-chip .btn {
  padding: 6px 12px;
  font-size: 12px;
  min-height: 0;
}
.messenger-chat .chat {
  margin: 10px 0;
}
.messenger {
  grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
}
/* short screens (laptops 720–800px tall): drop the page title */
@media (min-width: 851px) and (max-height: 820px) {
  .messenger-page .page-head {
    display: none;
  }
  .messenger-page.page {
    padding-top: 14px;
    padding-bottom: 14px;
  }
  .messenger {
    height: calc(100vh - 110px);
  }
  .messenger-chat .chat-form textarea {
    min-height: 52px;
  }
}
@media (max-width: 850px) {
  .messenger-chat .chat-form {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }
  .messenger-chat .chat-form .btn.primary {
    grid-column: 1 / -1;
  }
  .messenger-chat .order-chip > span:first-child {
    flex-basis: 100%;
  }
}
.send-icon {
  display: none;
}
@media (max-width: 850px) {
  .messenger-page .page-head {
    display: none;
  }
  .messenger {
    height: calc(100vh - 150px);
    height: calc(100dvh - 150px);
  }
  .messenger-chat .back-btn {
    align-self: flex-start;
    width: auto;
    padding: 6px 12px;
    font-size: 13px;
    margin-bottom: 8px;
  }
  .messenger-chat .chat-head {
    gap: 10px;
  }
  .messenger-chat .chat-head-actions {
    gap: 4px;
  }
  .messenger-chat .chat-head-actions .sm-icon {
    width: 34px;
    height: 34px;
  }
  .messenger-chat .chat-form {
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    gap: 6px;
  }
  .messenger-chat .chat-form .btn.primary {
    grid-column: auto;
  }
  .messenger-chat .chat-form .attach-btn,
  .messenger-chat .chat-form .send-btn {
    width: 42px;
    height: 42px;
    padding: 0;
    display: grid;
    place-items: center;
  }
  .send-label {
    display: none;
  }
  .send-icon {
    display: inline;
    font-size: 16px;
  }
  .messenger-chat .chat-form textarea {
    min-height: 44px;
    padding: 10px 12px;
  }
  .messenger-chat .order-chip {
    margin-top: 8px;
  }
}

/* ===== Support center ===== */
.support-page.page {
  max-width: 1440px;
}
.support-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.support-tabs a {
  white-space: nowrap;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
}
.support-tabs a:hover,
.support-tabs a.active {
  background: var(--soft);
  color: var(--ink);
}
form[data-form="support-search"],
form[data-form="support-tickets-search"],
form[data-form="support-queue-filter"],
form[data-form="support-order-search"] {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
}
form[data-form="support-search"] label,
form[data-form="support-tickets-search"] label,
form[data-form="support-queue-filter"] label,
form[data-form="support-order-search"] label {
  flex: 1 1 220px;
  margin: 0;
}
form[data-form="support-search"] label:first-of-type,
form[data-form="support-tickets-search"] label:first-of-type,
form[data-form="support-queue-filter"] label:first-of-type,
form[data-form="support-order-search"] label:first-of-type {
  font-size: 0;
}
form[data-form="support-queue-filter"] label + label {
  font-size: 13px;
  flex: 0 1 220px;
}
form[data-form="support-search"] input,
form[data-form="support-tickets-search"] input,
form[data-form="support-queue-filter"] input,
form[data-form="support-order-search"] input,
form[data-form="support-search"] select,
form[data-form="support-tickets-search"] select,
form[data-form="support-queue-filter"] select,
form[data-form="support-order-search"] select {
  font-size: 15px;
  height: 50px;
  margin: 0;
}
form[data-form="support-search"] .btn,
form[data-form="support-tickets-search"] .btn,
form[data-form="support-queue-filter"] .btn,
form[data-form="support-order-search"] .btn {
  height: 50px;
  margin: 0;
  width: auto;
  padding: 0 22px;
}
form[data-form="support-search"] .form-error:empty,
form[data-form="support-tickets-search"] .form-error:empty,
form[data-form="support-queue-filter"] .form-error:empty,
form[data-form="support-order-search"] .form-error:empty {
  display: none;
}
.support-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.support-action {
  display: grid;
  gap: 4px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s;
}
.support-action:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.support-action small {
  color: var(--muted);
}
.support-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--soft);
  display: grid;
  place-items: center;
  font-size: 18px;
  margin-bottom: 6px;
}
.kb-mini {
  display: grid;
  gap: 2px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.kb-mini:last-of-type {
  border-bottom: 0;
}
.kb-mini small {
  color: var(--muted);
}
.kb-mini:hover b {
  color: var(--accent);
}
.kb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}
.kb-article p {
  line-height: 1.65;
  margin: 0 0 14px;
}
.kb-summary {
  font-weight: 600;
  font-size: 17px;
}
.kb-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.support-suggest {
  border: 1px solid var(--accent);
  background: var(--soft);
  border-radius: 16px;
  padding: 14px 16px;
}
.support-suggest[hidden] {
  display: none;
}
.support-files {
  display: grid;
  gap: 8px;
}
.support-files .btn {
  justify-self: start;
  cursor: pointer;
}
.order-pick,
.ticket-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  text-decoration: none;
  color: inherit;
}
.order-pick:hover,
.ticket-row:hover {
  border-color: var(--accent);
}
.order-pick span,
.ticket-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.order-pick small,
.ticket-row small {
  color: var(--muted);
}
.order-pick-side,
.ticket-side {
  display: flex !important;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  text-align: right;
  flex-shrink: 0;
}
.ticket-row.needs {
  border-color: var(--coral);
  box-shadow: inset 4px 0 0 var(--coral);
}
.support-order {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg);
  margin-bottom: 14px;
}
.support-order h3 {
  margin: 2px 0 0;
}
.ticket-head-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.ticket-head-top h2 {
  margin: 0;
  font-size: 22px;
  margin-right: auto;
}
.support-banner {
  border-radius: 18px;
  padding: 16px 18px;
  background: var(--soft);
  border: 1px solid var(--soft);
}
.support-banner p {
  margin: 6px 0 0;
}
.support-banner .btn {
  margin-top: 10px;
}
.support-banner.need {
  background: #fdeee8;
  border-color: var(--coral);
}
.support-banner.done {
  background: var(--mint);
  border-color: var(--mint);
}
.support-chat {
  max-height: 560px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}
.support-chat .bubble {
  max-width: 82%;
  background: var(--panel);
}
.support-chat .bubble.mine {
  background: var(--soft);
}
.support-chat .bubble.support {
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}
.support-chat .bubble.internal {
  align-self: stretch;
  max-width: none;
  background: #fff7dc;
  border: 1px dashed #d9b94a;
}
.bubble-author {
  font-weight: 700;
  color: var(--ink) !important;
  margin: 0 0 4px !important;
}
.support-ticket details {
  border-top: 1px solid var(--line);
  padding: 10px 0;
}
.support-ticket summary {
  cursor: pointer;
  font-weight: 600;
}
.case-chat-mini {
  max-height: 360px;
  overflow: auto;
  font-size: 13px;
}
.case-chat-mini small {
  color: var(--muted);
}
.user-card h3 small {
  color: var(--muted);
  font-weight: 400;
  font-size: 12px;
}
.decision-panel {
  border-color: var(--accent);
}
.two-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.chat-system {
  align-self: center;
  max-width: 90%;
  text-align: center;
  font-size: 13px;
  background: #fdeee8;
  border: 1px solid var(--coral);
  border-radius: 14px;
  padding: 8px 14px;
}
.chat-system a {
  font-weight: 700;
}
@media (max-width: 850px) {
  .support-actions {
    grid-template-columns: 1fr 1fr;
  }
  .support-action {
    padding: 14px;
  }
  .order-pick,
  .ticket-row {
    flex-direction: column;
  }
  .order-pick-side,
  .ticket-side {
    align-items: flex-start;
    text-align: left;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .two-inputs {
    grid-template-columns: 1fr;
  }
  .support-chat .bubble {
    max-width: 92%;
  }
  form[data-form="support-search"] .btn {
    padding: 0 14px;
  }
}
@media (min-width: 851px) and (max-width: 1100px) {
  .support-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.support-page .page-head h1 {
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.1;
}
@media (max-width: 560px) {
  #navActions a[href="#support"] {
    display: none;
  }
}
/* Support conversation: readable size, like the messenger */
.support-chat {
  max-height: 560px;
  padding: 16px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.support-chat .bubble {
  max-width: min(80%, 640px);
  padding: 12px 16px;
}
.support-chat .bubble p {
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.support-chat .bubble small {
  font-size: 11px;
  color: var(--muted);
}
.support-chat .bubble .bubble-author {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 4px;
}
.support-chat .msg-image img {
  max-height: 260px;
  border-radius: 12px;
  margin-top: 6px;
}
@media (max-width: 850px) {
  .support-chat .bubble {
    max-width: 90%;
  }
}
