@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap");

:root {
  --bg: #141414;
  --bg-soft: #1a1a1a;
  --bg-elev: #1f1f1f;
  --panel: #202020;
  --panel-2: #252525;
  --line: #313131;
  --line-strong: #424242;
  --text: #ececec;
  --muted: #a7a7a7;
  --brand: #ececec;
  --accent: #7ca7ff;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow: hidden;
}

.ambient-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 2% 102%, rgba(140, 102, 255, 0.1), transparent 32%),
    radial-gradient(circle at 95% -2%, rgba(255, 164, 102, 0.12), transparent 36%);
}

.entry-screen {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  height: 100vh;
  padding: 18px;
  display: grid;
  align-items: center;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.entry-background {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 78% 20%, rgba(106, 127, 214, 0.1), transparent 46%),
    radial-gradient(circle at 18% 85%, rgba(80, 74, 170, 0.08), transparent 54%),
    linear-gradient(180deg, rgba(18, 18, 20, 0.98), rgba(14, 14, 16, 0.98));
}

.entry-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(360px, 560px);
  justify-content: center;
  align-items: center;
  min-height: min(760px, calc(100vh - 36px));
}

.entry-copy {
  border: 1px solid #2f2f2f;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(26, 26, 26, 0.92), rgba(20, 20, 20, 0.92));
  box-shadow: var(--shadow);
  backdrop-filter: blur(4px);
}

.entry-copy {
  padding: 30px 28px;
  display: grid;
  align-content: start;
  gap: 16px;
}

.entry-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
  color: #cfcfcf;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
}

.entry-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex: 0 0 auto;
  filter: drop-shadow(0 6px 14px rgba(133, 157, 255, 0.28));
}

.entry-copy h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.entry-copy p {
  margin: 0;
  color: #b8b8b8;
  font-size: 1.02rem;
  line-height: 1.5;
}

.entry-points {
  margin: 2px 0 0;
  padding-left: 18px;
  color: #cccccc;
  display: grid;
  gap: 6px;
}

.entry-actions {
  margin-top: 6px;
  display: grid;
  gap: 10px;
}

.entry-try-btn {
  min-height: 54px;
  width: fit-content;
  border-radius: 999px;
  border: 1px solid #5c76e9;
  background: linear-gradient(120deg, #edf2ff, #dfe9ff);
  color: #151515;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 0 24px;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 180ms ease;
}

.entry-try-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(155, 180, 255, 0.22);
}

.entry-auth-note {
  margin: 0;
  color: #8f8f8f;
  font-size: 0.9rem;
}

.entry-auth-note.error {
  color: #ef9d9d;
}

#entry-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.95;
}

.gpt-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  height: 100vh;
  gap: 10px;
  padding: 8px;
  overflow: hidden;
}

.gpt-shell.compact {
  grid-template-columns: 1fr;
  padding: 0;
  gap: 0;
  height: 100dvh;
}

.gpt-shell.compact .gpt-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(300px, calc(100vw - 48px));
  max-height: 100dvh;
  z-index: 31;
  border-radius: 0 18px 18px 0;
}

.gpt-shell.compact .gpt-main {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  min-width: 0;
}

.gpt-shell.compact .sidebar-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.gpt-sidebar {
  position: relative;
  background: linear-gradient(180deg, #1a1a1a, #171717);
  border: 1px solid #2f2f2f;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  min-height: 0;
  padding: 12px;
  gap: 12px;
  transition: transform 200ms ease, opacity 200ms ease;
  will-change: transform;
}

.sidebar-close-btn {
  display: none;
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid #3a3a3a;
  background: #242424;
  color: #dedede;
  font: inherit;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  border: 0;
  margin: 0;
  padding: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 24;
}

.gpt-shell.sidebar-open .sidebar-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.sidebar-header {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.sidebar-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex: 0 0 auto;
  filter: drop-shadow(0 6px 14px rgba(133, 157, 255, 0.28));
}

.sidebar-kicker,
.section-caption {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  font-weight: 700;
}

.section-title {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  font-weight: 700;
}

.sidebar-header h1 {
  margin: 2px 0 0;
  font-size: 1rem;
}

.sidebar-new {
  border: 1px solid #3a3a3a;
  background: #262626;
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.sidebar-search-wrap {
  position: relative;
}

.sidebar-search {
  width: 100%;
  border: 1px solid #323232;
  background: #212121;
  color: var(--text);
  border-radius: 10px;
  padding: 9px 11px;
  font: inherit;
}

.sidebar-search:focus {
  outline: none;
  border-color: #4a4a4a;
}

.threads-block {
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 8px;
}

.thread-list {
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 8px;
}

.thread-item {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
}

.thread-item-main {
  width: 100%;
  text-align: left;
  border: 1px solid #323232;
  background: #202020;
  color: var(--text);
  border-radius: 10px;
  padding: 9px 10px;
  font: inherit;
  cursor: pointer;
  display: grid;
  gap: 6px;
}

.thread-item-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.thread-item-head strong {
  font-size: 0.88rem;
  font-weight: 600;
}

.thread-item-head span {
  font-size: 0.74rem;
  color: var(--muted);
}

.thread-item p {
  margin: 0;
  color: #bebebe;
  font-size: 0.79rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thread-item.active .thread-item-main {
  border-color: #4f4f4f;
  background: #2a2a2a;
}

.thread-more-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid #363636;
  background: #232323;
  color: #bdbdbd;
  font: inherit;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.thread-more-btn.active,
.thread-more-btn:hover {
  border-color: #505050;
  color: #f0f0f0;
}

.thread-menu {
  position: absolute;
  top: 34px;
  right: 0;
  min-width: 172px;
  border: 1px solid #3b3b3b;
  border-radius: 10px;
  background: #1f1f1f;
  box-shadow: 0 16px 26px rgba(0, 0, 0, 0.4);
  padding: 4px;
  z-index: 10;
  display: grid;
  gap: 3px;
}

.thread-menu-item {
  border: 0;
  background: transparent;
  color: #e2e2e2;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.thread-menu-item:hover {
  background: #2c2c2c;
}

.thread-menu-item.danger {
  color: #f6b0b0;
}

.thread-menu-item.danger:hover {
  background: #3a2222;
}

.thread-empty {
  border: 1px dashed #3a3a3a;
  border-radius: 10px;
  padding: 12px;
  color: var(--muted);
  font-size: 0.86rem;
}

.account-block {
  border: 1px solid #313131;
  background: #1d1d1d;
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 9px;
}

.auth-status {
  color: #d7d7d7;
  font-size: 0.84rem;
}

.signin-wrap {
  min-height: 40px;
}

.profile-grid {
  display: grid;
  gap: 6px;
  border-top: 1px dashed #363636;
  border-bottom: 1px dashed #363636;
  padding: 8px 0;
}

.profile-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  font-size: 0.84rem;
}

.profile-row span {
  color: var(--muted);
}

.profile-row strong {
  color: #f0f0f0;
}

.profile-trigger {
  border: 1px solid #333;
  border-radius: 14px;
  background: linear-gradient(90deg, #231d1f, #1f1a1b);
  color: #e7e7e7;
  min-height: 56px;
  padding: 10px 12px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.profile-trigger-label {
  font-size: 1.05rem;
  font-weight: 600;
}

.profile-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #1172d6;
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
}

.profile-avatar::before {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
}

.profile-avatar::after {
  content: "";
  position: absolute;
  width: 15px;
  height: 9px;
  border-radius: 9px 9px 5px 5px;
  background: #fff;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
}

.profile-panel-overlay {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(0, 0, 0, 0.45);
}

.profile-panel {
  position: fixed;
  left: 18px;
  bottom: 18px;
  width: min(420px, calc(100vw - 36px));
  z-index: 60;
  border: 1px solid #3a3a3a;
  border-radius: 20px;
  background: #1c1c1f;
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.45);
  padding: 16px;
  display: grid;
  gap: 12px;
}

.profile-panel .auth-status {
  color: #e8e8e8;
  font-size: 0.95rem;
  line-height: 1.35;
  white-space: pre-line;
}

.profile-panel .profile-grid {
  border-top: 1px dashed #3a3a3a;
  border-bottom: 1px dashed #3a3a3a;
  padding: 12px 0;
}

.profile-panel .profile-row {
  font-size: 0.95rem;
}

.profile-panel .ghost-btn {
  min-height: 52px;
  font-size: 1.02rem;
  border-radius: 16px;
}

.gpt-shell.sidebar-collapsed {
  grid-template-columns: 0 minmax(0, 1fr);
}

.gpt-shell.sidebar-collapsed .gpt-sidebar {
  transform: translateX(-112%);
  opacity: 0;
  pointer-events: none;
}

.gpt-main {
  border: 1px solid #2f2f2f;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, #191919, #171717);
  box-shadow: var(--shadow);
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.main-topbar {
  border-bottom: 1px solid #2d2d2d;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #3a3a3a;
  background: #242424;
  color: #d8d8d8;
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.model-pill {
  border: 1px solid #3b3b3b;
  background: linear-gradient(90deg, #2a2222, #241f2c);
  color: #e7e7e7;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-weight: 600;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.connection-pill {
  border: 1px solid #393939;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted);
  font-size: 0.78rem;
  background: #222;
}

.conversation-stage {
  min-height: 0;
  overflow: hidden;
  display: grid;
  position: relative;
}

.messages {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px 0 18px;
  display: grid;
  align-content: start;
  gap: 14px;
}

.empty-state {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 18px;
  padding: 24px;
  pointer-events: none;
}

.empty-state-title {
  margin: 0;
  font-size: clamp(1.36rem, 2.5vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-align: center;
  color: #ececec;
  opacity: 1;
  transition: opacity 180ms ease;
}

.msg-row {
  width: min(920px, calc(100% - 32px));
  margin-inline: auto;
  display: flex;
  justify-self: center;
}

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

.msg-row.assistant {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.msg-bubble {
  width: 100%;
  max-width: min(740px, 100%);
  border: 1px solid #313131;
  border-radius: 16px;
  padding: 12px 14px;
  background: #242424;
  color: #ececec;
  line-height: 1.5;
  font-size: 0.97rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.msg-row.assistant .msg-bubble {
  border: 0;
  background: transparent;
  padding: 0;
  color: #e6e6e6;
}

.msg-row.user .msg-bubble {
  width: auto;
  max-width: min(560px, 85%);
  background: #2d2d2d;
  border-color: #464646;
}

.msg-row.thinking .msg-bubble {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  background: #212121;
}

.assistant-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 26px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 140ms ease;
}

.assistant-action-btn {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 0;
  background: transparent;
  color: #9a9a9a;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 140ms ease, color 140ms ease;
}

.assistant-action-btn:hover {
  background: #2a2a2a;
  color: #ececec;
}

.assistant-action-btn.active {
  background: #2a2a2a;
  color: #ececec;
}

.msg-row.assistant:hover .assistant-actions,
.msg-row.assistant:focus-within .assistant-actions {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.thinking-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #bcbcbc;
  opacity: 0.35;
  animation: thinking-dot 1.1s ease-in-out infinite;
}

.thinking-dot:nth-child(2) {
  animation-delay: 0.12s;
}

.thinking-dot:nth-child(3) {
  animation-delay: 0.24s;
}

@keyframes thinking-dot {
  0%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-1px);
  }
}

.msg-bubble.typing-active {
  border-color: #4a4a4a;
}

.assessment-card {
  margin-top: 10px;
  border: 1px solid #3a3a3a;
  border-radius: 12px;
  background: #1f1f1f;
  padding: 11px;
  display: grid;
  gap: 8px;
}

.assessment-card h3 {
  margin: 0;
  font-size: 0.92rem;
}

.assessment-card ul {
  margin: 0;
  padding-left: 18px;
}

.assessment-card .muted {
  color: var(--muted);
  font-size: 0.86rem;
}

.composer {
  position: sticky;
  bottom: 0;
  border-top: 1px solid #2d2d2d;
  background: linear-gradient(180deg, rgba(24, 24, 24, 0.72), rgba(24, 24, 24, 0.95));
  backdrop-filter: blur(8px);
  padding: 10px 0 14px;
}

.composer-row {
  width: min(920px, calc(100% - 32px));
  margin-inline: auto;
}

.composer-row {
  border: 1px solid #363636;
  border-radius: 18px;
  background: #202020;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 8px;
}

textarea {
  width: 100%;
  resize: none;
  min-height: 44px;
  max-height: 180px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  line-height: 1.5;
  padding: 4px 8px;
}

textarea::placeholder {
  color: #8f8f8f;
}

.send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #555;
  background: #efefef;
  color: #1b1b1b;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  align-self: end;
}

.primary-btn,
.ghost-btn {
  border-radius: 10px;
  font: inherit;
  border: 1px solid transparent;
  cursor: pointer;
}

.primary-btn {
  background: #ececec;
  color: #171717;
  padding: 10px 14px;
  font-weight: 700;
}

.ghost-btn {
  background: #242424;
  border-color: #3a3a3a;
  color: #d8d8d8;
  padding: 8px 12px;
}

.stretch {
  width: 100%;
}

.hidden {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(5px);
}

.modal-content {
  position: relative;
  width: min(940px, calc(100% - 30px));
  margin: 46px auto;
  border-radius: 18px;
  border: 1px solid #3a3a3a;
  background: #1f1f1f;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.modal-header {
  padding: 14px 16px;
  border-bottom: 1px solid #343434;
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 10px;
}

.modal-header h3 {
  margin: 2px 0 0;
  font-size: 1.04rem;
}

.pricing-grid {
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.pricing-card {
  border: 1px solid #373737;
  border-radius: 14px;
  padding: 12px;
  background: #262626;
  display: grid;
  gap: 9px;
}

.pricing-card h4 {
  margin: 0;
  font-size: 0.98rem;
}

.pricing-price {
  font-size: 1.35rem;
  font-weight: 700;
}

.pricing-note {
  color: #b6b6b6;
  font-size: 0.88rem;
}

.pricing-open {
  border: 1px solid #545454;
  border-radius: 10px;
  padding: 8px 10px;
  background: #ececec;
  color: #171717;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.checkout-body {
  min-height: 100vh;
  overflow: auto;
  background: #f4f6f9;
  color: #0f1728;
}

.checkout-shell {
  position: relative;
  z-index: 1;
  width: min(1160px, calc(100% - 28px));
  margin: 14px auto;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 14px;
}

.checkout-side,
.checkout-main {
  border: 1px solid #dde4ee;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 42px rgba(14, 23, 43, 0.08);
}

.brand-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.brand-logo {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(79, 99, 255, 0.2));
}

.brand-kicker {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #5d6c83;
  font-weight: 700;
}

.brand-card h1 {
  margin: 6px 0 8px;
  font-size: 1.45rem;
  line-height: 1.15;
}

.brand-sub {
  margin: 0;
  color: #5d6c83;
  line-height: 1.45;
  font-size: 0.95rem;
}

.tips-card {
  border: 1px solid #dde4ee;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f7f9fd);
  padding: 14px;
}

.tips-card ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: #5d6c83;
  line-height: 1.5;
}

.checkout-side {
  padding: 18px;
  display: grid;
  align-content: start;
  gap: 16px;
}

.back-link {
  font-size: 0.9rem;
  color: #0f766e;
  text-decoration: none;
}

.checkout-main {
  padding: 18px;
  display: grid;
  align-content: start;
  gap: 12px;
}

.checkout-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.checkout-header h2 {
  margin: 0;
  font-size: 1.2rem;
  color: #0f1728;
}

.checkout-main .status-pill {
  border: 1px solid #cdd6e3;
  background: #f8fbff;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 0.78rem;
  color: #5d6c83;
}

.checkout-alert {
  border-radius: 12px;
  border: 1px solid #bed3ff;
  background: #eef4ff;
  padding: 11px 12px;
  font-size: 0.95rem;
  color: #0f1728;
}

.checkout-alert.error {
  border-color: #f3b8c4;
  background: #fff3f6;
}

.checkout-card {
  border: 1px solid #dde4ee;
  border-radius: 16px;
  padding: 14px;
  background: #fbfcff;
  display: grid;
  gap: 10px;
  color: #0f1728;
}

.network-note {
  border-radius: 12px;
  border: 1px solid #bed3ff;
  background: #eef4ff;
  padding: 10px 12px;
  font-size: 0.92rem;
  color: #23344e;
}

.order-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.order-grid div {
  border: 1px solid #dde4ee;
  border-radius: 12px;
  padding: 8px;
  background: #fff;
  display: grid;
  gap: 4px;
}

.stats-label {
  color: #5d6c83;
  font-size: 0.84rem;
}

.mono-box {
  border: 1px solid #dde4ee;
  border-radius: 12px;
  background: #fff;
  padding: 10px;
  font-family: var(--mono);
  font-size: 0.88rem;
  word-break: break-all;
}

.field-label {
  font-size: 0.84rem;
  color: #5d6c83;
}

.hash-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.text-input {
  border: 1px solid #dde4ee;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
}

.review-state {
  border: 1px solid #c7d8ff;
  border-radius: 20px;
  padding: 22px 18px;
  background:
    radial-gradient(circle at 12% 10%, rgba(124, 148, 255, 0.2), transparent 42%),
    radial-gradient(circle at 92% 94%, rgba(16, 185, 129, 0.14), transparent 42%),
    linear-gradient(180deg, #fafdff, #f2f7ff);
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 10px;
}

.review-orb {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 28%, #b8d9ff 0%, #7fa7ff 38%, #4578e8 100%);
  box-shadow: 0 0 0 0 rgba(86, 125, 236, 0.34);
  animation: review-pulse 2s ease-out infinite;
  position: relative;
}

.review-orb::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 22px;
  height: 12px;
  border: 3px solid #fff;
  border-top: 0;
  border-right: 0;
  transform: rotate(-45deg) translate(1px, -2px);
}

@keyframes review-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(86, 125, 236, 0.34);
  }
  70% {
    box-shadow: 0 0 0 16px rgba(86, 125, 236, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(86, 125, 236, 0);
  }
}

.review-kicker {
  margin: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #52668e;
  font-weight: 700;
}

.review-state h3 {
  margin: 0;
  font-size: 1.24rem;
}

.review-copy {
  margin: 0;
  color: #5d6c83;
  max-width: 560px;
}

.review-progress {
  width: min(520px, 100%);
  height: 7px;
  border-radius: 999px;
  background: #dce6fb;
  overflow: hidden;
  position: relative;
}

.review-progress::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #4d84ee, #5f9cff, #7db9ff);
  transform-origin: left center;
  animation: review-progress-fill 5s linear forwards;
}

@keyframes review-progress-fill {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

.review-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  margin-top: 4px;
  color: #171717;
}

@media (max-width: 1180px) {
  .entry-screen {
    padding: 12px;
  }

  .entry-shell {
    grid-template-columns: minmax(320px, 560px);
    justify-content: center;
  }

  .gpt-shell {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .messages {
    padding-top: 18px;
  }
}

@media (max-width: 1200px) {
  .entry-screen {
    padding: 0;
    min-height: 100dvh;
    height: 100dvh;
    overflow-y: auto;
  }

  .entry-shell {
    grid-template-columns: 1fr;
    justify-content: center;
    align-content: center;
    min-height: auto;
  }

  .entry-copy {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    min-height: auto;
    padding: calc(18px + env(safe-area-inset-top, 0px)) 20px calc(18px + env(safe-area-inset-bottom, 0px));
    background: transparent;
    backdrop-filter: none;
    max-width: 640px;
    margin: 0 auto;
  }

  .entry-copy h1 {
    font-size: clamp(1.9rem, 10vw, 2.5rem);
  }

  .entry-copy p {
    font-size: 0.98rem;
  }

  .entry-points {
    font-size: 0.93rem;
  }

  .entry-try-btn {
    width: 100%;
  }

  .entry-background {
    background:
      radial-gradient(
        ellipse at 50% 46%,
        rgba(4, 6, 12, 0.92) 0%,
        rgba(4, 6, 12, 0.84) 36%,
        rgba(8, 11, 22, 0.68) 70%,
        rgba(14, 18, 32, 0.42) 100%
      ),
      radial-gradient(circle at 84% 14%, rgba(90, 108, 184, 0.1), transparent 50%),
      radial-gradient(circle at 14% 88%, rgba(68, 63, 148, 0.08), transparent 58%),
      linear-gradient(180deg, rgba(12, 12, 14, 0.995), rgba(10, 10, 12, 0.995));
  }

  #entry-canvas {
    opacity: 0.42;
    filter: blur(0.8px);
  }

  .gpt-sidebar {
    max-height: 100dvh;
    border-left: 0;
  }

  .gpt-main {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    min-height: 100dvh;
    width: 100%;
  }

  .main-topbar {
    padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 8px;
    border-bottom: 1px solid #2b2b2b;
  }

  .model-pill {
    border: 0;
    background: transparent;
    color: #ececec;
    border-radius: 0;
    padding: 0;
    font-size: 1.03rem;
    font-weight: 600;
  }

  .topbar-actions .ghost-btn {
    display: none;
  }

  .topbar-actions .connection-pill {
    display: none;
  }

  .conversation-stage {
    min-height: 0;
  }

  .messages {
    padding: 12px 0 22px;
  }

  .msg-row {
    width: calc(100% - 20px);
  }

  .msg-bubble {
    width: 100%;
    max-width: 100%;
    border-radius: 18px;
  }

  .msg-row.assistant .msg-bubble {
    border-radius: 0;
  }

  .assistant-actions {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .msg-row.user .msg-bubble {
    width: auto;
    max-width: min(82vw, 360px);
  }

  .empty-state {
    align-content: center;
    gap: 10px;
    padding: 0 24px calc(108px + env(safe-area-inset-bottom, 0px));
  }

  .empty-state-title {
    font-size: clamp(1.8rem, 8vw, 2.4rem);
    line-height: 1.14;
    max-width: 340px;
    text-align: center;
  }

  .composer {
    padding: 8px 0 calc(10px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, rgba(24, 24, 24, 0), rgba(24, 24, 24, 0.96) 34%);
  }

  .composer-row {
    width: calc(100% - 20px);
    border-radius: 20px;
    padding: 7px 7px 7px 9px;
  }

  textarea {
    min-height: 40px;
    font-size: 1rem;
    line-height: 1.35;
  }

  .send-btn {
    width: 40px;
    height: 40px;
  }

  .icon-btn {
    width: 36px;
    height: 36px;
  }

  .profile-panel {
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .checkout-shell {
    width: calc(100% - 16px);
    margin: 8px auto;
    grid-template-columns: 1fr;
  }

  .order-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hash-row {
    grid-template-columns: 1fr;
  }
}
