.ask-studboards {
  position: relative;
  z-index: 110;
  --ask-bg: #fff8ef;
  --ask-card: rgba(255, 255, 255, 0.94);
  --ask-ink: #08111f;
  --ask-muted: #536575;
  --ask-navy: #071120;
  --ask-mint: #26a37d;
  --ask-blue: #4f7cff;
  --ask-purple: #6d5dfc;
  --ask-orange: #f4a64a;
  --ask-border: rgba(8, 17, 31, 0.11);
  --ask-shadow: 0 22px 58px rgba(8, 17, 31, 0.16);
}

.ask-studboards-launch {
  position: fixed;
  right: 18px;
  bottom: 82px;
  z-index: 111;
  display: inline-grid;
  gap: 2px;
  min-width: 126px;
  min-height: 56px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 18px;
  background:
    radial-gradient(circle at 16% 16%, rgba(38, 163, 125, 0.4), transparent 34%),
    linear-gradient(135deg, rgba(13, 23, 36, 0.98), rgba(32, 24, 52, 0.96)),
    #111a29;
  box-shadow: 0 18px 44px rgba(3, 8, 14, 0.34);
  color: #fff;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.ask-studboards-launch span {
  color: rgba(222, 231, 241, 0.78);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.11em;
  line-height: 1;
  text-transform: uppercase;
}

.ask-studboards-launch strong {
  font-size: 0.92rem;
  line-height: 1.05;
}

.ask-studboards-panel {
  position: fixed;
  inset: 0;
  z-index: 130;
}

.ask-studboards-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  min-height: 100%;
  border: 0;
  background: rgba(3, 8, 14, 0.58);
  backdrop-filter: blur(6px);
  cursor: pointer;
}

.ask-studboards-sheet {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  width: min(600px, calc(100vw - 36px));
  max-height: min(820px, calc(100vh - 36px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 28px;
  background:
    radial-gradient(circle at 14% 0%, rgba(38, 163, 125, 0.18), transparent 34%),
    radial-gradient(circle at 92% 10%, rgba(109, 93, 252, 0.15), transparent 32%),
    linear-gradient(180deg, #fffdf7 0%, var(--ask-bg) 100%);
  box-shadow: 0 30px 90px rgba(3, 8, 14, 0.44);
  color: var(--ink, #16202b);
}

.ask-studboards-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 76px;
  padding: 14px 16px 12px;
  background:
    radial-gradient(circle at 8% 20%, rgba(38, 163, 125, 0.28), transparent 30%),
    linear-gradient(135deg, #071120 0%, #111b2a 62%, #221b36 100%);
  color: #fff;
}

.ask-studboards-title {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 2px 10px;
  min-width: 0;
}

.ask-studboards-title::before {
  content: "ST";
  grid-row: 1 / span 3;
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 15px;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.38), transparent 28%),
    linear-gradient(135deg, #26a37d, #6d5dfc);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  line-height: 1;
  box-shadow: 0 10px 22px rgba(3, 8, 14, 0.24);
}

.ask-studboards-head-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.ask-studboards-head span {
  color: #8de0bd;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
}

.ask-studboards-head h2 {
  margin: 0;
  color: #fff;
  font-size: 1.24rem;
  letter-spacing: 0;
  line-height: 1;
}

.ask-studboards-head p {
  margin: 0;
  color: rgba(245, 249, 252, 0.74);
  font-size: 0.74rem;
  font-weight: 760;
  line-height: 1.2;
}

.ask-studboards-head button,
.ask-studboards-form button,
.ask-studboards-prompts button,
.ask-studboards-start-modes button,
.ask-studboards-actions button {
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.ask-studboards-head button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.ask-studboards-head button[aria-label] {
  width: 38px;
  padding: 0;
  font-size: 1.28rem;
  line-height: 1;
}

.ask-studboards-prompts {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 18px 14px;
  background: transparent;
  scrollbar-width: none;
}

.ask-studboards-prompts::before {
  content: "Quick starts";
  flex: 0 0 auto;
  align-self: center;
  padding-right: 2px;
  color: #315e2d;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.ask-studboards-prompts::-webkit-scrollbar {
  display: none;
}

.ask-studboards-prompts button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--ask-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ask-ink);
  font-size: 0.78rem;
  box-shadow: 0 8px 22px rgba(8, 17, 31, 0.06);
}

.ask-studboards-output {
  min-height: 250px;
  overflow-y: auto;
  padding: 4px 18px 18px;
}

.ask-studboards-start-modes {
  display: grid;
  grid-template-columns: repeat(3, minmax(112px, 1fr));
  gap: 10px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.ask-studboards-start-modes::-webkit-scrollbar {
  display: none;
}

.ask-studboards-start-modes button {
  display: grid;
  gap: 6px;
  min-height: 104px;
  align-content: start;
  padding: 12px;
  border: 1px solid rgba(8, 17, 31, 0.1);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.82)),
    #fff;
  color: var(--ask-ink);
  box-shadow: 0 14px 34px rgba(8, 17, 31, 0.08);
  text-align: left;
}

.ask-studboards-start-modes button i {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #4f7cff, #6d5dfc);
  box-shadow: 0 8px 20px rgba(79, 124, 255, 0.2);
}

.ask-studboards-start-modes button i::before {
  color: #fff;
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 950;
  line-height: 1;
}

.ask-studboards-start-modes button[data-ask-studboards-mode="ideas"] i::before {
  content: "3";
}

.ask-studboards-start-modes button[data-ask-studboards-mode="pick"] i {
  background: linear-gradient(135deg, #26a37d, #4f7cff);
}

.ask-studboards-start-modes button[data-ask-studboards-mode="pick"] i::before {
  content: "1";
}

.ask-studboards-start-modes button[data-ask-studboards-mode="side"] i {
  background: linear-gradient(135deg, #f4a64a, #6d5dfc);
}

.ask-studboards-start-modes button[data-ask-studboards-mode="side"] i::before {
  content: "S";
}

.ask-studboards-start-modes button span {
  color: var(--ask-ink);
  font-size: 0.96rem;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1.06;
  text-transform: none;
}

.ask-studboards-start-modes button small {
  color: var(--ask-muted);
  font-size: 0.76rem;
  font-weight: 790;
  line-height: 1.22;
}

.ask-studboards-thread,
.ask-studboards-results {
  display: grid;
  gap: 14px;
}

.ask-studboards-turn {
  display: grid;
  gap: 10px;
}

.ask-studboards-message {
  max-width: 94%;
  padding: 12px 14px;
  border-radius: 18px;
  font-size: 0.93rem;
  font-weight: 690;
  line-height: 1.35;
}

.ask-studboards-message span,
.ask-studboards-message p {
  margin: 0;
}

.ask-studboards-message--user {
  justify-self: end;
  background: linear-gradient(135deg, #16202b, #26354d);
  color: #fff;
  box-shadow: 0 12px 28px rgba(8, 17, 31, 0.14);
}

.ask-studboards-message--assistant {
  justify-self: start;
  border: 1px solid rgba(38, 163, 125, 0.16);
  background: rgba(239, 250, 245, 0.86);
  color: var(--ask-ink);
}

.ask-studboards-context {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 92%;
}

.ask-studboards-context span {
  padding: 5px 8px;
  border: 1px solid rgba(8, 17, 31, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ask-muted);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
}

.ask-studboards-typing {
  display: inline-flex;
  gap: 4px;
}

.ask-studboards-typing i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #26a37d;
  animation: ask-studboards-pulse 1s infinite ease-in-out;
}

.ask-studboards-typing i:nth-child(2) {
  animation-delay: 0.14s;
}

.ask-studboards-typing i:nth-child(3) {
  animation-delay: 0.28s;
}

@keyframes ask-studboards-pulse {
  0%,
  80%,
  100% {
    opacity: 0.32;
    transform: translateY(0);
  }

  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.ask-studboards-card,
.ask-studboards-board-card,
.ask-studboards-plan-card,
.ask-studboards-expanded-card {
  display: grid;
  gap: 10px;
  overflow: hidden;
  padding: 14px;
  border: 1px solid var(--ask-border);
  border-radius: 22px;
  background: var(--ask-card);
  box-shadow: var(--ask-shadow);
}

.ask-studboards-card {
  grid-template-columns: 116px minmax(0, 1fr);
  align-items: start;
  gap: 13px;
  padding: 10px;
}

.ask-studboards-card img {
  width: 116px;
  height: 142px;
  border-radius: 18px;
  background: #16202b;
  object-fit: cover;
}

.ask-studboards-card > div {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.ask-studboards-card span,
.ask-studboards-board-card > span,
.ask-studboards-plan-card > span,
.ask-studboards-expanded-card > span {
  width: max-content;
  max-width: 100%;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(244, 166, 74, 0.13);
  color: #9b5628;
  font-size: 0.64rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
}

.ask-studboards-card strong,
.ask-studboards-board-card > strong,
.ask-studboards-plan-card > strong,
.ask-studboards-expanded-card > strong {
  color: var(--ask-ink);
  font-size: 1.08rem;
  line-height: 1.08;
}

.ask-studboards-card small,
.ask-studboards-expanded-body small {
  color: var(--ask-muted);
  font-size: 0.74rem;
  font-weight: 820;
}

.ask-studboards-card-board {
  width: max-content;
  max-width: 100%;
  min-height: 32px;
  padding: 7px 9px;
  border: 1px solid rgba(49, 94, 45, 0.16);
  border-radius: 999px;
  background: rgba(49, 94, 45, 0.08);
  color: #315e2d;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
}

.ask-studboards-card p,
.ask-studboards-board-card > p,
.ask-studboards-plan-card > p,
.ask-studboards-expanded-card > p {
  margin: 0;
  color: var(--ask-muted);
  font-size: 0.82rem;
  font-weight: 690;
  line-height: 1.32;
}

.ask-studboards-card--single span {
  background: rgba(38, 163, 125, 0.13);
  color: #25785f;
}

.ask-studboards-facts,
.ask-studboards-actions,
.ask-studboards-board-actions,
.ask-studboards-expanded-actions,
.ask-studboards-safe-links,
.ask-studboards-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.ask-studboards-facts em {
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(22, 32, 43, 0.06);
  color: #425468;
  font-size: 0.64rem;
  font-style: normal;
  font-weight: 900;
}

.ask-studboards-actions a,
.ask-studboards-actions button,
.ask-studboards-board-actions a,
.ask-studboards-board-actions button,
.ask-studboards-expanded-actions a,
.ask-studboards-expanded-actions button,
.ask-studboards-safe-links a,
.ask-studboards-suggestions button {
  display: inline-grid;
  place-items: center;
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid rgba(8, 17, 31, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ask-ink);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1;
  overflow-wrap: anywhere;
  text-align: center;
  text-decoration: none;
}

.ask-studboards-actions a:first-child,
.ask-studboards-board-actions a:first-child,
.ask-studboards-expanded-actions a:first-child {
  border-color: #172232;
  background: var(--ask-ink);
  color: #fff;
}

.ask-studboards-board-preview,
.ask-studboards-expanded-list,
.ask-studboards-plan-card ol {
  display: grid;
  gap: 8px;
}

.ask-studboards-board-preview a {
  display: grid;
  gap: 4px;
  padding: 9px;
  border: 1px solid rgba(8, 17, 31, 0.08);
  border-radius: 14px;
  background: rgba(255, 248, 239, 0.84);
  color: inherit;
  text-decoration: none;
}

.ask-studboards-expanded-row {
  display: grid;
  grid-template-columns: clamp(82px, 24vw, 108px) minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  padding: 10px;
  border: 1px solid rgba(8, 17, 31, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(8, 17, 31, 0.07);
}

.ask-studboards-expanded-media {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(38, 163, 125, 0.18), rgba(85, 105, 246, 0.18));
}

.ask-studboards-expanded-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ask-studboards-expanded-media span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--ask-ink);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 950;
}

.ask-studboards-expanded-body {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.ask-studboards-expanded-eyebrow {
  width: max-content;
  max-width: 100%;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(244, 166, 74, 0.13);
  color: #9b5628;
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
}

.ask-studboards-expanded-body strong {
  color: var(--ask-ink);
  font-size: 1.02rem;
  line-height: 1.08;
}

.ask-studboards-expanded-body p {
  margin: 0;
  color: var(--ask-muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
}

.ask-studboards-expanded-actions {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr) minmax(0, 1fr);
  gap: 7px;
}

.ask-studboards-plan-card ol {
  margin: 0;
  padding-left: 20px;
}

.ask-studboards-plan-card li {
  color: var(--ask-muted);
  font-size: 0.84rem;
  font-weight: 760;
  line-height: 1.34;
}

.ask-studboards-plan-card b {
  color: var(--ask-ink);
}

.ask-studboards-form {
  display: grid;
  gap: 8px;
  padding: 14px 18px 12px;
  border-bottom: 1px solid rgba(8, 17, 31, 0.08);
  background: rgba(255, 250, 241, 0.76);
}

.ask-studboards-form label {
  color: var(--ask-ink);
  font-size: 0.78rem;
  font-weight: 950;
}

.ask-studboards-form > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.ask-studboards-form textarea {
  min-width: 0;
  flex: 1;
  min-height: 44px;
  max-height: 132px;
  padding: 12px 14px;
  border: 1px solid rgba(8, 17, 31, 0.15);
  border-radius: 18px;
  background: #fff;
  color: var(--ask-ink);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 740;
  line-height: 1.35;
  overflow-y: auto;
  resize: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.ask-studboards-form textarea::placeholder {
  color: rgba(83, 101, 117, 0.58);
  font-weight: 680;
}

.ask-studboards-form button {
  min-height: 44px;
  padding: 10px 16px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, #26a37d, #4f7cff 52%, #6d5dfc);
  color: #fff;
  box-shadow: 0 12px 28px rgba(79, 124, 255, 0.24);
}

.ask-studboards-form button:disabled {
  cursor: wait;
  opacity: 0.66;
}

.ask-studboards-form p {
  min-height: 1.1em;
  margin: 0;
  color: var(--ask-muted);
  font-size: 0.74rem;
  font-weight: 800;
}

body.has-ask-studboards-open {
  overflow: hidden;
}

@media (max-width: 760px) {
  .ask-studboards-launch {
    right: 18px;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    min-width: 112px;
    min-height: 50px;
    padding: 8px 12px;
    border-radius: 16px;
  }

  .ask-studboards-launch strong {
    font-size: 0.82rem;
  }

  .ask-studboards-sheet {
    inset: auto 0 0;
    width: 100%;
    max-height: min(790px, calc(100dvh - 12px));
    border-radius: 24px 24px 0 0;
  }

  .ask-studboards-output {
    min-height: 250px;
    padding: 4px 14px max(18px, env(safe-area-inset-bottom, 0px));
  }

  .ask-studboards-start-modes {
    grid-template-columns: repeat(3, minmax(108px, 1fr));
  }

  .ask-studboards-head,
  .ask-studboards-prompts,
  .ask-studboards-form {
    padding-left: 14px;
    padding-right: 14px;
  }

  .ask-studboards-card {
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 10px;
    padding: 9px;
    border-radius: 20px;
  }

  .ask-studboards-card img {
    width: 86px;
    height: 112px;
    border-radius: 16px;
  }

  .ask-studboards-actions a,
  .ask-studboards-actions button,
  .ask-studboards-expanded-actions a,
  .ask-studboards-expanded-actions button {
    flex: 1 1 82px;
    font-size: 0.7rem;
  }
}
