* { box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  margin: 0;
  background: #2c2c2c;
  color: #f6f4ef;
  font-family: "Golos Text", "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.45;
  overflow-wrap: break-word;
}

::selection { background: #c6a15b; color: #2c2c2c; }

[hidden] { display: none !important; }

.sheet {
  max-width: 960px;
  margin: 1.5rem auto 3rem;
  background: #121212;
  border: 1px solid rgba(198, 161, 91, 0.4);
  padding: 0 2rem 2.6rem;
}

html, body { height: 100%; }

body { overflow: hidden; }

.app-shell {
  position: relative;
  height: 100vh;
  display: flex;
  background: #2c2c2c;
  overflow: hidden;
}

.chat {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #2c2c2c;
  overflow: hidden;
}

.side {
  flex: none;
  width: 17.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #383838;
  border-right: 1px solid rgba(198, 161, 91, 0.22);
}

.app-shell.is-side-closed .side { display: none; }

.side-backdrop { display: none; }

.side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.95rem 0.85rem 0.15rem;
}

.side-head .brand { font-size: 1.7rem; }

.side-hide {
  border: 0;
  background: transparent;
  color: #b9b3a6;
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  padding: 0.2rem 0.15rem;
}

.side-hide:hover { color: #f6f4ef; }

.side-tools { padding: 0.7rem 0.75rem 0.15rem; }

.side-label {
  margin: 0.85rem 0.95rem 0.15rem;
  color: #b9b3a6;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.side-new,
.side-toggle {
  font: inherit;
  color: #f6f4ef;
  cursor: pointer;
  background: transparent;
}

.side-new {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(198, 161, 91, 0.45);
  border-radius: 0.8rem;
  padding: 0.55rem 0.75rem;
}

.side-new:hover { border-color: #e4c98a; }

.side-toggle {
  border: 0;
  border-bottom: 1px solid rgba(198, 161, 91, 0.55);
  padding: 0.2rem 0;
  color: #b9b3a6;
}

.side-toggle:hover,
.side-toggle[aria-expanded="true"] { color: #f6f4ef; }

.side-new:focus-visible,
.side-toggle:focus-visible,
.side-item:focus-visible,
.side-x:focus-visible {
  outline: 1px solid #e4c98a;
  outline-offset: 3px;
}

.side-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0.35rem 0.55rem 1rem;
  scrollbar-width: thin;
  scrollbar-color: #5a5a5a transparent;
}

.side-row {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  border-radius: 0.7rem;
}

.side-row:hover { background: #424242; }

.side-row.is-on,
.side-row.is-on:hover {
  background: #4a4a4a;
  box-shadow: inset 2px 0 0 #c6a15b;
}

.side-item {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border: 0;
  background: transparent;
  color: #f6f4ef;
  font: inherit;
  font-size: 0.95rem;
  text-align: left;
  padding: 0.55rem 0.35rem 0.55rem 0.7rem;
  cursor: pointer;
}

.side-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-dot {
  flex: none;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #e4c98a;
  animation: pulse 1.3s ease-out infinite;
}

.side-x,
.side-yes,
.side-no {
  border: 0;
  background: transparent;
  color: #b9b3a6;
  cursor: pointer;
  font: inherit;
}

.side-x {
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 0.45rem;
  font-size: 1rem;
  line-height: 1;
}

.side-x:hover { color: #f6f4ef; }

.side-confirm {
  padding: 0.45rem 0.7rem 0.55rem;
}

.side-confirm p {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
}

.side-yes { color: #e4c98a; margin-right: 0.7rem; }

.side-list-empty {
  margin: 0.6rem 0.4rem;
  color: #b9b3a6;
  font-size: 0.92rem;
}

.drop-veil {
  display: none;
  position: absolute;
  inset: 0.7rem;
  z-index: 6;
  align-items: center;
  justify-content: center;
  border: 1px dashed #e4c98a;
  border-radius: 1rem;
  background: rgba(36, 36, 36, 0.9);
  color: #f6f4ef;
  font-size: 1.35rem;
  text-align: center;
  padding: 1rem;
  pointer-events: none;
}

.chat.is-drag .drop-veil { display: flex; }

.chat.is-drag .composer-box { border-color: #e4c98a; }

.chat-top {
  flex: none;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  margin: 0;
  padding: 0.85rem 1.1rem 0.7rem;
  background: #2c2c2c;
  border-bottom: 1px solid rgba(198, 161, 91, 0.18);
}

.thread {
  flex: 1;
  min-height: 0;
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #5a5a5a transparent;
}

.thread::-webkit-scrollbar,
.side-list::-webkit-scrollbar {
  width: 10px;
  height: 0;
}

.thread::-webkit-scrollbar-thumb,
.side-list::-webkit-scrollbar-thumb {
  background: #5a5a5a;
  border: 2px solid #2c2c2c;
  border-radius: 999px;
}

.side-list::-webkit-scrollbar-thumb { border-color: #383838; }

.thread::-webkit-scrollbar-track,
.side-list::-webkit-scrollbar-track { background: transparent; }

.thread-col {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  width: min(52rem, 100%);
  margin: 0 auto;
  padding: 1.15rem 1.35rem 1.5rem;
}

.chat.is-empty { justify-content: center; }

.chat.is-empty .thread {
  flex: 0 1 auto;
  overflow: auto;
}

.chat.is-empty .thread-col {
  min-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.chat.is-empty .dock { padding-top: 0; }

.chat.is-empty .composer-box,
.chat.is-empty .dock .fine {
  width: min(40rem, calc(100% - 2rem));
}

.board {
  flex: 1;
  min-height: 0;
  width: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #5a5a5a transparent;
}

.board::-webkit-scrollbar { width: 10px; }

.board::-webkit-scrollbar-thumb {
  background: #5a5a5a;
  border: 2px solid #2c2c2c;
  border-radius: 999px;
}

.is-board .dock {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.is-board .ui-btn-gold {
  border-radius: 999px;
  cursor: pointer;
  padding: 0.75rem 1.25rem;
}

.is-board .ui-btn-gold:disabled { cursor: default; opacity: 0.4; }

.is-board .thread-col {
  width: max-content;
  min-width: 100%;
  max-width: none;
  margin: 0;
  align-items: center;
}

.board::-webkit-scrollbar { height: 10px; }

.draw {
  display: flex;
  justify-content: center;
  padding: 1.4rem 1.6rem 2rem;
}

.draw-node {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stage-head {
  text-align: center;
  padding: 1.15rem 1rem 0;
}

.step {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  color: #f6f4ef;
  font-size: 0.95rem;
}

.step span {
  width: 1.4rem;
  height: 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #c6a15b;
  border-radius: 50%;
  color: #e4c98a;
  font-size: 0.78rem;
}

.stage-note {
  margin: 0.35rem 0 0;
  color: #b9b3a6;
  font-size: 0.9rem;
}

.draw-card {
  position: relative;
  width: 14.2rem;
  padding: 0.75rem 0.8rem 0.65rem;
  background: #3a3a3a;
  border: 1px solid rgba(198, 161, 91, 0.55);
  border-radius: 14px;
  color: #f6f4ef;
  cursor: grab;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.draw-card.is-company {
  width: 16rem;
  padding: 0.85rem 0.9rem;
  cursor: default;
  border-color: #c6a15b;
  background: #3f3f3f;
}

.draw-card.is-over {
  border-color: #e4c98a;
  box-shadow: 0 0 0 1px #e4c98a;
}

.draw-num {
  position: absolute;
  top: 0.4rem;
  left: 0.5rem;
  color: #c6a15b;
  font-family: "Cormorant Garamond", Palatino, serif;
  font-size: 1.05rem;
  line-height: 1;
}

.draw-x {
  position: absolute;
  top: 0.15rem;
  right: 0.3rem;
  border: 0;
  background: transparent;
  color: #b9b3a6;
  cursor: pointer;
  font: inherit;
  font-size: 1.05rem;
  line-height: 1;
  padding: 0.15rem 0.25rem;
}

.draw-x:hover { color: #f6f4ef; }

.draw-title,
.draw-ish {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  border: 0;
  background: transparent;
  color: #f6f4ef;
  font: inherit;
  outline: none;
}

.draw-title {
  padding: 0 1.15rem;
  font-weight: 600;
}

.draw-title:focus,
.draw-ish:focus { box-shadow: inset 0 -1px 0 #c6a15b; }

.draw-company {
  padding: 0;
  text-align: center;
  font-family: "Cormorant Garamond", Palatino, serif;
  font-size: 1.55rem;
  font-weight: 600;
}

.draw-count {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 0.4rem 0 0.15rem;
  color: #b9b3a6;
  font-size: 0.9rem;
}

.draw-step,
.draw-plus {
  width: 1.65rem;
  height: 1.65rem;
  border: 1px solid rgba(198, 161, 91, 0.55);
  border-radius: 50%;
  background: #2c2c2c;
  color: #e4c98a;
  cursor: pointer;
  font: inherit;
  line-height: 1;
  padding: 0;
}

.draw-plus {
  position: relative;
  z-index: 1;
  margin-top: 0.75rem;
  flex: none;
}

.draw-plus::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 100%;
  height: 0.75rem;
  border-left: 1px solid rgba(198, 161, 91, 0.8);
}

.draw-ish {
  min-height: 1.5rem;
  margin-top: 0.35rem;
  padding: 0.28rem 0 0;
  border-top: 1px solid rgba(198, 161, 91, 0.22);
  resize: none;
  color: #b9b3a6;
  font-size: 0.86rem;
}

.draw-chip {
  display: block;
  margin: 0.4rem auto 0;
  border: 0;
  background: transparent;
  color: #e4c98a;
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0;
}

.paper-wrap {
  width: min(44rem, calc(100% - 2.4rem));
  margin: 0.4rem auto 2rem;
}

.paper-bar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.7rem;
}

.paper-bar .step { margin-right: auto; }

.paper-dl,
.paper-print {
  border-radius: 999px;
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  padding: 0.45rem 0.9rem;
}

.paper-dl {
  border: 0;
  background: #c6a15b;
  color: #1c1c1c;
  font-weight: 600;
}

.paper-print {
  border: 1px solid rgba(198, 161, 91, 0.55);
  background: transparent;
  color: #e4c98a;
}

.paper-empty {
  border: 1px dashed rgba(198, 161, 91, 0.45);
  border-radius: 16px;
  padding: 1.25rem 1.3rem;
  text-align: center;
  color: #b9b3a6;
}

.paper-empty p { margin: 0.7rem 0 0; }

.paper {
  background: #f6f4ef;
  color: #1c1c1c;
  padding: 2.3rem 2.4rem 2.5rem;
  border-radius: 18px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.28);
}

.paper-kicker {
  margin: 0;
  color: #8c7040;
  letter-spacing: 0.16em;
  font-size: 0.74rem;
  text-transform: uppercase;
}

.paper h1 {
  margin: 0.3rem 0 0;
  font-family: "Cormorant Garamond", Palatino, serif;
  font-size: 2.7rem;
  font-weight: 600;
  line-height: 1.05;
  outline: none;
}

.paper-rule {
  height: 1px;
  margin: 1rem 0 1.1rem;
  border: 0;
  background: #c6a15b;
}

.paper-edit {
  outline: none;
  border-radius: 8px;
}

.paper-edit:focus,
.paper h1:focus,
.kp-section h2:focus {
  background: rgba(198, 161, 91, 0.16);
}

.paper-edit p {
  margin: 0 0 0.65rem;
  line-height: 1.55;
}

.paper-close { margin-top: 1.2rem; }

.kp-section {
  margin-top: 1.05rem;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(140, 112, 64, 0.28);
}

.kp-head {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
}

.kp-num {
  color: #8c7040;
  font-family: "Cormorant Garamond", Palatino, serif;
  font-size: 1.45rem;
  line-height: 1;
}

.kp-section h2 {
  margin: 0;
  flex: 1;
  font-family: "Cormorant Garamond", Palatino, serif;
  font-size: 1.65rem;
  font-weight: 600;
  line-height: 1.15;
  outline: none;
}

.kp-meta {
  margin: 0.2rem 0 0.55rem;
  color: #6b6560;
  font-size: 0.88rem;
}

.answers {
  width: min(40rem, calc(100% - 2rem));
  margin: 0.2rem auto 1.6rem;
}

@media print {
  body, .app-shell, .chat, .board {
    height: auto;
    overflow: visible;
    background: white;
    display: block;
  }
  .side, .dock, .chat-top, .paper-bar, .stage-head, .draw, .side-backdrop { display: none !important; }
  .paper-wrap { width: auto; margin: 0; }
  .paper { box-shadow: none; border-radius: 0; padding: 0; }
}

.answers-kicker {
  margin: 0 0 0.75rem;
  color: #c6a15b;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.answer {
  margin: 0 0 0.75rem;
  padding: 0.85rem 1rem 1rem;
  background: #3a3a3a;
  border: 1px solid rgba(198, 161, 91, 0.4);
}

.answer h3 {
  margin: 0;
  font-family: "Cormorant Garamond", Palatino, serif;
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.15;
}

.answer-num {
  color: #c6a15b;
  margin-right: 0.45rem;
}

.answer .agent-line {
  font-size: 0.98rem;
  line-height: 1.45;
}

.draw-kids {
  display: flex;
  justify-content: center;
  list-style: none;
  position: relative;
  margin: 0;
  padding: 1.15rem 0 0;
}

.draw-kids::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  height: 1.15rem;
  border-left: 1px solid rgba(198, 161, 91, 0.8);
}

.draw-kids > li {
  display: flex;
  position: relative;
  padding: 1.15rem 0.55rem 0;
}

.draw-kids > li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  height: 1.15rem;
  border-left: 1px solid rgba(198, 161, 91, 0.8);
  transform: translateX(-0.5px);
}

.draw-kids > li::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  border-top: 1px solid rgba(198, 161, 91, 0.8);
}

.draw-kids > li:first-child::after { left: calc(50% - 1px); }

.draw-kids > li:last-child::after { right: calc(50% - 1px); }

.draw-kids > li:only-child::after { border-top: 0; }



.empty-wrap {
  margin: 0 auto 1.15rem;
  max-width: 34rem;
  text-align: center;
  padding: 0;
}

.empty-wrap h1 {
  margin: 0 0 0.7rem;
  font-size: 2.5rem;
}

.empty-wrap p {
  margin: 0;
  color: #b9b3a6;
}

.msg { display: flex; }

.msg-user { justify-content: flex-end; }

.user-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  max-width: min(36rem, 92%);
}

.user-bubble {
  background: #4a4a4a;
  border-radius: 1.35rem;
  padding: 0.7rem 0.95rem;
}

.user-text { margin: 0; white-space: pre-wrap; }

.msg-ai { justify-content: flex-start; }

.ai-body { width: min(46rem, 100%); }

.say { margin: 0 0 0.75rem; line-height: 1.6; }

.say:last-child { margin-bottom: 0; }

.wait-line { color: #8c7040; }

.caret {
  display: inline-block;
  width: 0.45rem;
  height: 1.05rem;
  margin-left: 0.15rem;
  background: #c6a15b;
  vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
}

.answer-card { margin-top: 0.4rem; }

.ask-more { margin-top: 0.9rem; }

.draw-btn {
  margin-top: 0.95rem;
  border: 0;
  background: #c6a15b;
  color: #1c1c1c;
  font: inherit;
  font-weight: 600;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  cursor: pointer;
}

.draw-btn:hover { background: #e4c98a; }

.draw-btn:focus-visible {
  outline: 1px solid #e4c98a;
  outline-offset: 3px;
}

.draw-note {
  margin: 0.4rem 0 0;
  color: #b9b3a6;
  font-size: 0.92rem;
}

.think {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0.15rem 0 0.35rem;
}

.think-orb {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  background: #e4c98a;
  animation: pulse 1.3s ease-out infinite;
}

.think-word {
  font-size: 1.08rem;
  background: linear-gradient(90deg, #8d877c 0%, #f6f4ef 42%, #e4c98a 50%, #f6f4ef 58%, #8d877c 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 1.5s linear infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(228, 201, 138, 0.55); transform: scale(0.86); }
  70% { box-shadow: 0 0 0 0.6rem rgba(228, 201, 138, 0); transform: scale(1); }
  100% { box-shadow: 0 0 0 0 rgba(228, 201, 138, 0); transform: scale(0.86); }
}

@keyframes shine {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

@keyframes blink {
  0%, 80%, 100% { opacity: 0.25; }
  40% { opacity: 1; }
}

.dock {
  flex: none;
  z-index: 3;
  width: 100%;
  margin: 0;
  padding: 0.35rem 0 0.85rem;
  background: #2c2c2c;
}

.composer-box {
  width: min(52rem, calc(100% - 2.6rem));
  margin: 0 auto;
  background: #3f3f3f;
  border: 1px solid rgba(198, 161, 91, 0.45);
  border-radius: 1.35rem;
  padding: 0.7rem 0.75rem 0.55rem 0.95rem;
}

.draft {
  display: block;
  width: 100%;
  min-height: 1.6rem;
  max-height: 11rem;
  margin: 0;
  padding: 0.15rem 0.2rem 0.35rem;
  border: 0;
  background: transparent;
  color: #f6f4ef;
  font: inherit;
  line-height: 1.45;
  resize: none;
  outline: none;
}

.composer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.icon-btn,
.send-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  border-radius: 50%;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.icon-btn:focus-visible,
.send-btn:focus-visible {
  outline: 1px solid #e4c98a;
  outline-offset: 3px;
}

.icon-btn {
  border: 1px solid rgba(198, 161, 91, 0.45);
  background: transparent;
  color: #e4c98a;
}

.send-btn {
  border: 0;
  background: #c6a15b;
  color: #0c0c0c;
  font-weight: 600;
}

.send-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.send-btn.is-stop {
  background: transparent;
  border: 1px solid rgba(198, 161, 91, 0.7);
}

.send-btn.is-stop::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  background: #f6f4ef;
}

.jump-end {
  position: absolute;
  right: 1.15rem;
  bottom: calc(100% + 0.85rem);
  z-index: 4;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid rgba(198, 161, 91, 0.55);
  border-radius: 50%;
  background: #3f3f3f;
  color: #e4c98a;
  cursor: pointer;
}

.dock { position: relative; }

.dock::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 2rem;
  background: linear-gradient(to bottom, rgba(44, 44, 44, 0), #2c2c2c);
  pointer-events: none;
}

.chat.is-empty .dock::before { display: none; }

.shots,
.docs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.user-stack .shots,
.user-stack .docs { justify-content: flex-end; }

.composer-box .shots,
.composer-box .docs { margin-bottom: 0.45rem; }

.shot {
  position: relative;
  margin: 0;
}

.shot img {
  display: block;
  width: 12.5rem;
  max-width: 70vw;
  height: 12.5rem;
  object-fit: cover;
  border-radius: 0.9rem;
  background: #3a3a3a;
}

.composer-box .shot img {
  width: 4.6rem;
  height: 4.6rem;
}

.shot-x {
  position: absolute;
  top: 0.28rem;
  right: 0.28rem;
  width: 1.35rem;
  height: 1.35rem;
  border: 0;
  border-radius: 50%;
  background: rgba(12, 12, 12, 0.8);
  color: #f6f4ef;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.doc {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  max-width: 16rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid rgba(198, 161, 91, 0.4);
  border-radius: 0.75rem;
  background: #3f3f3f;
}

.doc-kind {
  color: #e4c98a;
  font-size: 0.75rem;
  font-weight: 600;
}

.doc-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.85rem;
}

.doc .shot-x {
  position: static;
  background: transparent;
  color: #e4c98a;
  width: auto;
  height: auto;
}

.file-in { display: none; }

.dock .fine {
  width: min(52rem, calc(100% - 2.6rem));
  margin: 0.45rem auto 0;
  text-align: center;
  color: #8c7040;
  font-size: 0.82rem;
}

.top {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.8rem 1.2rem;
  margin: 0 -2rem;
  padding: 0.9rem 2rem 0.75rem;
  background: #121212;
  border-bottom: 1px solid rgba(198, 161, 91, 0.4);
}

.brand {
  margin: 0;
  font-family: "Cormorant Garamond", Palatino, "Palatino Linotype", serif;
  font-size: 1.85rem;
  font-weight: 600;
  line-height: 1;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.35rem 1.1rem;
}

h1, h2, h3, .prose, .brand {
  font-family: "Cormorant Garamond", Palatino, "Palatino Linotype", serif;
}

h1 {
  font-size: 2.2rem;
  font-weight: 600;
  line-height: 1.15;
  margin: 1.25rem 0 0.7rem;
}

.lead {
  max-width: 38rem;
  margin: 0 0 1.2rem;
  color: #b9b3a6;
}

.kicker {
  margin: 1.15rem 0 0;
  color: #c6a15b;
  font-size: 0.92rem;
  font-weight: 600;
}

.kicker + h1 { margin-top: 0.3rem; }

.group-toggle {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  margin: 0.35rem 0 0;
  padding: 0.9rem 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(198, 161, 91, 0.4);
  color: #f6f4ef;
  font-family: "Cormorant Garamond", Palatino, serif;
  font-size: 1.65rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
}

.group-meta {
  flex: 0 0 auto;
  font-family: "Golos Text", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: #b9b3a6;
}

.group-toggle:focus { outline: none; }

.group-toggle:focus-visible {
  outline: 1px solid #e4c98a;
  outline-offset: 3px;
}

.custom-ask {
  max-width: 36rem;
  margin: 0.35rem 0 0.2rem;
  color: #b9b3a6;
}

h2 {
  font-size: 1.65rem;
  font-weight: 600;
  line-height: 1.2;
  margin: 1.7rem 0 0.15rem;
}

h3 {
  font-size: 1.45rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
}

h2 span, h3 span {
  font-family: "Golos Text", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: #b9b3a6;
  margin-left: 0.45rem;
}

h4 {
  font-family: "Golos Text", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
}

.choices { margin: 0.2rem 0 0.4rem; }

.seat {
  display: grid;
  grid-template-columns: minmax(12rem, 1.05fr) minmax(14rem, 2fr) auto;
  gap: 0.4rem 1rem;
  align-items: start;
  padding: 0.85rem 0 0.9rem 0.75rem;
  border-bottom: 1px solid rgba(198, 161, 91, 0.28);
  border-left: 2px solid transparent;
}

.seat.is-on { border-left-color: #c6a15b; }

.seat.custom { display: block; }

.seat.custom > * + * { margin-top: 0.85rem; }

.seat-title {
  margin: 0;
  color: #f6f4ef;
  font-weight: 600;
}

.seat-plain, .hint, .fine, .meta-line, .sent summary {
  color: #b9b3a6;
}

.seat-plain, .hint, .fine {
  margin: 0.15rem 0 0;
  font-size: 0.95rem;
}

.hint { grid-column: 1 / 3; }

.note { grid-column: 1 / -1; }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.2rem;
  margin-top: 1.5rem;
}

.confirm-slot { margin: 1rem 0 0.2rem; }

.tally {
  margin: 1rem 0 0.35rem;
  color: #b9b3a6;
}

.problem {
  color: #e4c98a;
  margin: 0.8rem 0 0;
}

.waiting {
  margin: 1rem 0 0.2rem;
  color: #f6f4ef;
  font-weight: 600;
}

.custom-grid {
  display: grid;
  grid-template-columns: minmax(0, 36rem);
  gap: 0.85rem;
  align-items: end;
  padding: 0.9rem 0 0.35rem;
}

.prose {
  max-width: 38rem;
  margin: 0 0 0.85rem;
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.5;
}

.card {
  padding: 1.15rem 0 0.3rem;
  border-top: 1px solid rgba(198, 161, 91, 0.28);
  scroll-margin-top: 4.5rem;
}

.fit {
  margin: 0 0 0.55rem;
  color: #c6a15b;
}

.fit-low, .fit-none { color: #b9b3a6; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem 1.6rem;
  margin: 0.8rem 0;
}

.task {
  margin: 0.35rem 0;
  padding: 0.15rem 0 0.15rem 0.7rem;
  border-left: 2px solid rgba(198, 161, 91, 0.28);
}

.task.is-agent { border-left-color: #c6a15b; }

.task.is-human { border-left-color: #f6f4ef; }

.first { margin: 0.2rem 0 0.6rem; }

.start {
  max-width: 38rem;
  margin: 0.3rem 0 1.2rem;
  padding-left: 1.2rem;
}

.start li { margin: 0.45rem 0; }

.sent { margin-top: 1.4rem; }

.sent-body { margin-top: 0.8rem; }

.sent p { margin: 0.35rem 0; }

.role-list { max-width: 44rem; margin-top: 0.6rem; }

.role-note {
  padding: 0.95rem 0 0.2rem;
  border-top: 1px solid rgba(198, 161, 91, 0.28);
}

.role-note h3 { margin: 0 0 0.35rem; }

.role-num {
  color: #c6a15b;
  margin-right: 0.35rem;
}

.role-label {
  margin: 0.55rem 0 0.1rem;
  color: #c6a15b;
  font-size: 0.92rem;
  font-weight: 600;
}

.role-note p { margin: 0.2rem 0 0; line-height: 1.5; }

.agent-line {
  margin: 0.7rem 0 0;
  padding: 0.15rem 0 0.15rem 0.85rem;
  border-left: 2px solid #c6a15b;
  line-height: 1.55;
}

.meta-line {
  margin: 1.4rem 0 0;
  font-size: 0.92rem;
}

.sample {
  margin: 0.8rem 0 0;
  color: #e4c98a;
}

summary:focus-visible {
  outline: 1px solid #e4c98a;
  outline-offset: 3px;
}

@media (max-width: 760px) {
  .sheet {
    margin: 0;
    border-left: 0;
    border-right: 0;
    padding: 0 1rem 2.2rem;
  }

  .empty-wrap h1 { font-size: 2rem; }

  .top {
    margin: 0 -1rem;
    padding: 0.8rem 1rem 0.7rem;
  }

  h1 { font-size: 1.85rem; }

  .seat, .custom-grid, .split { grid-template-columns: 1fr; }

  .hint, .note { grid-column: auto; }
}

@media (min-width: 761px) {
  .app-shell:not(.is-side-closed) .chat-top { display: none; }
}

@media (max-width: 760px) {
  .side {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 8;
    width: min(18rem, 86vw);
    border-right: 1px solid rgba(198, 161, 91, 0.22);
    border-left: 0;
    box-shadow: 16px 0 36px rgba(0, 0, 0, 0.35);
  }

  .chat-top { display: flex !important; }

  .app-shell:not(.is-side-closed) .side-backdrop {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 7;
    border: 0;
    background: rgba(0, 0, 0, 0.45);
  }
}

@media (prefers-reduced-motion: reduce) {
  .caret, .think-orb, .think-word, .side-dot { animation: none; }
  .think-word { color: #f6f4ef; background: none; }
}

@media print {
  body {
    background: #fff;
    color: #000;
    overflow: visible;
  }

  .chat, .thread { height: auto; overflow: visible; }

  .sheet {
    margin: 0;
    max-width: none;
    background: #fff;
    color: #000;
    border: 0;
    padding: 0;
  }

  .top {
    position: static;
    margin: 0;
    padding: 0 0 0.5rem;
    background: #fff;
    border-bottom: 1px solid #000;
  }

  .lead, .tally, .fine, .hint, .seat-plain, .seat-title, .meta-line, .kicker, .group-meta, .custom-ask,
  h2 span, h3 span, .fit, .fit-low, .fit-none, .problem,
  .waiting, .sample, .sent summary, .start li, .brand, .group-toggle, .role-num, .role-label, .agent-line {
    color: #000;
  }

  .seat, .card, .custom-grid { border-color: #000; }

  .seat.is-on, .task, .task.is-agent, .task.is-human, .agent-line { border-left-color: #000; }

  .no-print, .print-gold, .ui-btn-gold { display: none !important; }

  .card, .seat { break-inside: avoid; }
}
