:root {
  --bg: #f6f7f5;
  --paper: #ffffff;
  --ink: #1d2233;
  --line: #d6dde4;
  --brand: #0f4c5c;
  --brand-strong: #103f4d;
  --tab-bg: #e8f0f3;
  --tab-hover-bg: #dce9ee;
  --tab-text: #2f495c;
  --panel-bg: #ffffff;
  --popup-bg: #ffffff;
  --popup-text: #4f647a;
  --footer-text: #6b7780;
  --shell-bg-accent-1: rgba(15, 76, 92, 0.14);
  --shell-bg-accent-2: rgba(217, 125, 84, 0.12);
  --shadow: 0 14px 40px rgba(13, 42, 53, 0.12);
  --radius-xl: 20px;
}

.tb-shell-body[data-ui-theme="standard-2"] {
  --bg: #f7f1ea;
  --paper: #fffaf4;
  --ink: #2f3446;
  --line: #d9c7b6;
  --brand: #f2b264;
  --brand-strong: #2f3446;
  --tab-bg: #f6dfc7;
  --tab-hover-bg: #f0d1b2;
  --tab-text: #534455;
  --panel-bg: rgba(255, 250, 244, 0.96);
  --popup-bg: #fffaf5;
  --popup-text: #5e6170;
  --footer-text: #5d6170;
  --shell-bg-accent-1: rgba(242, 178, 100, 0.24);
  --shell-bg-accent-2: rgba(111, 119, 137, 0.16);
  --shadow: 0 18px 46px rgba(47, 52, 70, 0.14);
}

.tb-shell-body[data-ui-theme="standard-3"] {
  --bg: #f1f6f3;
  --paper: #fbfefd;
  --ink: #365661;
  --line: #cfded9;
  --brand: #8fbfad;
  --brand-strong: #365661;
  --tab-bg: #dfebe5;
  --tab-hover-bg: #d2e3dc;
  --tab-text: #406068;
  --panel-bg: rgba(251, 254, 253, 0.96);
  --popup-bg: #fcfffd;
  --popup-text: #627b80;
  --footer-text: #63757a;
  --shell-bg-accent-1: rgba(143, 191, 173, 0.26);
  --shell-bg-accent-2: rgba(174, 201, 205, 0.22);
  --shadow: 0 18px 46px rgba(54, 86, 97, 0.14);
}

.tb-shell-body[data-ui-theme="standard-4"] {
  --bg: #f7f0e8;
  --paper: #fff9f2;
  --ink: #31463d;
  --line: #d8c6b7;
  --brand: #c98957;
  --brand-strong: #31463d;
  --tab-bg: #ecd8c4;
  --tab-hover-bg: #e3ccb6;
  --tab-text: #5b5247;
  --panel-bg: rgba(255, 249, 242, 0.96);
  --popup-bg: #fffaf4;
  --popup-text: #72665d;
  --footer-text: #6d635c;
  --shell-bg-accent-1: rgba(201, 137, 87, 0.2);
  --shell-bg-accent-2: rgba(94, 118, 97, 0.14);
  --shadow: 0 18px 46px rgba(49, 70, 61, 0.14);
}

.tb-shell-body[data-ui-theme="standard-5"] {
  --bg: #eef6fb;
  --paper: #f9fdff;
  --ink: #274e77;
  --line: #caddea;
  --brand: #5da8c8;
  --brand-strong: #274e77;
  --tab-bg: #dbeaf4;
  --tab-hover-bg: #cfe2ee;
  --tab-text: #335f83;
  --panel-bg: rgba(249, 253, 255, 0.96);
  --popup-bg: #fcfeff;
  --popup-text: #637d97;
  --footer-text: #61788d;
  --shell-bg-accent-1: rgba(93, 168, 200, 0.22);
  --shell-bg-accent-2: rgba(143, 215, 232, 0.18);
  --shadow: 0 18px 46px rgba(39, 78, 119, 0.14);
}

.tb-shell-body[data-ui-theme="standard-6"] {
  --bg: #edf5fb;
  --paper: #f8fcff;
  --ink: #173754;
  --line: #c6d8e5;
  --brand: #2e6e96;
  --brand-strong: #173754;
  --tab-bg: #d7e6f0;
  --tab-hover-bg: #c7ddea;
  --tab-text: #2e5671;
  --panel-bg: rgba(248, 252, 255, 0.96);
  --popup-bg: #fbfdff;
  --popup-text: #597287;
  --footer-text: #5e7383;
  --shell-bg-accent-1: rgba(46, 110, 150, 0.2);
  --shell-bg-accent-2: rgba(102, 184, 217, 0.16);
  --shadow: 0 18px 46px rgba(23, 55, 84, 0.14);
}

.tb-shell-body[data-ui-theme="standard-7"] {
  --bg: #faf1f3;
  --paper: #fff9fa;
  --ink: #5b2a38;
  --line: #e1c8cf;
  --brand: #d46067;
  --brand-strong: #5b2a38;
  --tab-bg: #f2dde2;
  --tab-hover-bg: #eccfd7;
  --tab-text: #744351;
  --panel-bg: rgba(255, 249, 250, 0.96);
  --popup-bg: #fffafb;
  --popup-text: #866772;
  --footer-text: #7b6770;
  --shell-bg-accent-1: rgba(212, 96, 103, 0.2);
  --shell-bg-accent-2: rgba(229, 139, 134, 0.14);
  --shadow: 0 18px 46px rgba(91, 42, 56, 0.14);
}

.tb-shell-body[data-ui-theme="standard-8"] {
  --bg: #fbf2ed;
  --paper: #fffaf7;
  --ink: #6a352c;
  --line: #e2cdc3;
  --brand: #e67e5b;
  --brand-strong: #6a352c;
  --tab-bg: #f2ddd2;
  --tab-hover-bg: #eccfc1;
  --tab-text: #815248;
  --panel-bg: rgba(255, 250, 247, 0.96);
  --popup-bg: #fffaf8;
  --popup-text: #89695e;
  --footer-text: #7e675d;
  --shell-bg-accent-1: rgba(230, 126, 91, 0.18);
  --shell-bg-accent-2: rgba(240, 160, 111, 0.14);
  --shadow: 0 18px 46px rgba(106, 53, 44, 0.14);
}

* {
  box-sizing: border-box;
}

.tb-shell-body[data-ui-theme="standard-1"] #teacherbuddy-shell .banner::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 100vw;
  height: 186px;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg) 16%, #d2e6ec 34%, rgba(191, 221, 230, 0.92) 52%, #b4d4de 74%, #8eb7c4 100%) top / 100% 54% no-repeat;
  background-color: #8daebb;
  z-index: -1;
  pointer-events: none;
}

.tb-shell-body {
  margin: 0;
  font-family: "Sora", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 10%, var(--shell-bg-accent-1), transparent 35%),
    radial-gradient(circle at 5% 90%, var(--shell-bg-accent-2), transparent 30%),
    var(--bg);
  min-height: 100vh;
}

#teacherbuddy-shell {
  max-width: 1680px;
  margin: 0 auto 24px;
  padding: 0 10px 26px;
  animation: fade-up 450ms ease;
}
#teacherbuddy-shell .banner {
  display: flex;
  align-items: center;
  gap: 18px;
  background: transparent;
  color: inherit;
  border-radius: var(--radius-xl);
  /* padding: 18px 18px 10px 18px;*/
  margin-bottom: 0px;
  overflow: visible;
  position: relative;
  z-index: 1;
  justify-content: center;
}

/* Ensure any banner images don't grow too large and push tabs into overlap */
#teacherbuddy-shell .banner img,
#teacherbuddy-shell .logo-mark img {
  max-height: 186px;
  height: auto;
  width: auto;
  display: block;
}

/* Give tabs clear separation below banner */
#teacherbuddy-shell .tool-tabs {
  margin-top: 10px;
  position: relative;
  z-index: 3;
}

#teacherbuddy-shell .banner {
  flex-direction: column;
  gap: 12px;
  padding: 0 18px 0 18px;
  margin-bottom: 20px;
}

#teacherbuddy-shell .banner .tb-brand-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  position: relative;
}

/* remove decorative overlay to avoid layout/overlap issues */
#teacherbuddy-shell .banner::after {
  display: none;
  content: none;
}

.tb-shell-body[data-ui-theme="standard-2"] #teacherbuddy-shell .banner::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 100vw;
  height: 186px;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg) 16%, #f7df96 28%, rgba(247, 200, 120, 0.92) 46%, #f0a35f 72%, #df825d 100%) top / 100% 54% no-repeat;
  background-color: #566076;
  z-index: -1;
  pointer-events: none;
}

.tb-shell-body[data-ui-theme="standard-3"] #teacherbuddy-shell .banner::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 100vw;
  height: 186px;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg) 18%, #c7e1d7 34%, rgba(183, 220, 207, 0.94) 48%, #92bcb1 72%, #5f8188 100%) top / 100% 54% no-repeat;
  background-color: #365661;
  z-index: -1;
  pointer-events: none;
}

.tb-shell-body[data-ui-theme="standard-4"] #teacherbuddy-shell .banner::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 100vw;
  height: 186px;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg) 18%, #e4bf9b 36%, rgba(201, 137, 87, 0.92) 50%, #b4714d 72%, #8a5947 100%) top / 100% 54% no-repeat;
  background-color: #31463d;
  z-index: -1;
  pointer-events: none;
}

.tb-shell-body[data-ui-theme="standard-5"] #teacherbuddy-shell .banner::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 100vw;
  height: 186px;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg) 18%, #b7deef 34%, rgba(143, 215, 232, 0.92) 50%, #72bdd6 72%, #447ca7 100%) top / 100% 54% no-repeat;
  background-color: #274e77;
  z-index: -1;
  pointer-events: none;
}

.tb-shell-body[data-ui-theme="standard-6"] #teacherbuddy-shell .banner::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 100vw;
  height: 186px;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg) 18%, #a9cde0 34%, rgba(102, 184, 217, 0.9) 50%, #3b89b7 72%, #1f4e73 100%) top / 100% 54% no-repeat;
  background-color: #173754;
  z-index: -1;
  pointer-events: none;
}

.tb-shell-body[data-ui-theme="standard-7"] #teacherbuddy-shell .banner::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 100vw;
  height: 186px;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg) 18%, #e8a9a8 34%, rgba(229, 139, 134, 0.9) 50%, #d46067 72%, #8f3f50 100%) top / 100% 54% no-repeat;
  background-color: #5b2a38;
  z-index: -1;
  pointer-events: none;
}

.tb-shell-body[data-ui-theme="standard-8"] #teacherbuddy-shell .banner::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 100vw;
  height: 186px;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg) 18%, #f1b692 34%, rgba(240, 160, 111, 0.9) 50%, #e67e5b 72%, #9f5745 100%) top / 100% 54% no-repeat;
  background-color: #6a352c;
  z-index: -1;
  pointer-events: none;
}

.tb-shell-body[data-ui-theme="standard-2"] #teacherbuddy-shell .banner::after {
  display: none;
  content: none;
}

.tb-banner-support {
  display: none;
  margin: 0;
}

.tb-shell-body[data-ui-theme="standard-1"] .tb-banner-support,
.tb-shell-body[data-ui-theme="standard-2"] .tb-banner-support {
  display: block;
  width: min(100%, 936px);
  position: absolute;
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
  padding: 0 28px;
  color: rgba(255, 250, 244, 0.92);
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: clamp(12px, 1.35vw, 18px);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.02em;
  text-align: right;
  overflow-wrap: anywhere;
}

.tb-shell-body[data-ui-theme="standard-1"] .tb-banner-support {
  color: rgba(16, 63, 77, 0.92);
  text-shadow: 0 2px 10px rgba(141, 174, 187, 0.2);
}

.tb-shell-body[data-ui-theme="standard-2"] .tb-banner-support {
  text-shadow: 0 2px 10px rgba(47, 52, 70, 0.28);
}

.tb-shell-body[data-ui-theme="standard-3"] .tb-banner-support,
.tb-shell-body[data-ui-theme="standard-4"] .tb-banner-support,
.tb-shell-body[data-ui-theme="standard-5"] .tb-banner-support,
.tb-shell-body[data-ui-theme="standard-6"] .tb-banner-support,
.tb-shell-body[data-ui-theme="standard-7"] .tb-banner-support,
.tb-shell-body[data-ui-theme="standard-8"] .tb-banner-support {
  display: block;
  width: min(100%, 936px);
  position: absolute;
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
  padding: 0 28px;
  color: rgba(255, 250, 244, 0.92);
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: clamp(12px, 1.35vw, 18px);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.02em;
  text-align: right;
  overflow-wrap: anywhere;
}

.tb-shell-body[data-ui-theme="standard-3"] .tb-banner-support {
  color: rgba(246, 251, 250, 0.94);
  text-shadow: 0 2px 10px rgba(54, 86, 97, 0.28);
}

.tb-shell-body[data-ui-theme="standard-4"] .tb-banner-support {
  color: rgba(255, 246, 237, 0.94);
  text-shadow: 0 2px 10px rgba(49, 70, 61, 0.28);
}

.tb-shell-body[data-ui-theme="standard-5"] .tb-banner-support,
.tb-shell-body[data-ui-theme="standard-6"] .tb-banner-support {
  color: rgba(244, 250, 255, 0.95);
  text-shadow: 0 2px 10px rgba(23, 55, 84, 0.28);
}

.tb-shell-body[data-ui-theme="standard-7"] .tb-banner-support,
.tb-shell-body[data-ui-theme="standard-8"] .tb-banner-support {
  color: rgba(255, 246, 242, 0.95);
  text-shadow: 0 2px 10px rgba(91, 42, 56, 0.28);
}
/* Make the logo take the full available width of the header */
#teacherbuddy-shell .logo-mark {
  width: 100%;
  max-width: none;
  height: auto;
  border-radius: 8px;
  background: transparent;
  display: block;
  padding: 0;
  text-align: left;
}

#teacherbuddy-shell .logo-mark img {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  object-fit: contain;
  display: block;
}


#teacherbuddy-shell .tool-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
  border-bottom: 1px solid #bfd0d9;
  padding-left: 4px;
}

#teacherbuddy-shell .tool-tabs button.tool-tab {
  border: 1px solid #bfd0d9;
  border-bottom: 0;
  background: var(--tab-bg);
  color: var(--tab-text);
  border-radius: 12px 12px 0 0;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease, transform 140ms ease;
}

#teacherbuddy-shell .tool-tabs .tool-tab-icon {
  font-size: 1.18rem;
  line-height: 1;
}

#teacherbuddy-shell .tool-tabs button.tool-tab:hover {
  background: var(--tab-hover-bg);
  transform: translateY(-1px);
}

#teacherbuddy-shell .tool-tabs button.tool-tab.is-active {
  background: var(--panel-bg);
  color: var(--brand-strong);
  position: relative;
  top: 1px;
}

#teacherbuddy-shell .tool-tabs button.tool-tab:focus-visible {
  outline: 3px solid rgba(15, 76, 92, 0.25);
  outline-offset: 2px;
}

#teacherbuddy-shell .tool-panel[hidden] {
  display: none;
}

#teacherbuddy-shell .tool-panel.is-active {
  animation: tb-panel-fade 360ms ease;
}

.tb-shell-body.tb-tools-initializing #teacherbuddy-shell .tools-shell {
  visibility: hidden;
}

#teacherbuddy-shell .panel {
  background: var(--panel-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

#teacherbuddy-shell .tool-host {
  width: 100%;
  min-height: 78vh;
  padding: 15px;
}

#teacherbuddy-shell .tool-loading,
#teacherbuddy-shell .tool-load-error {
  border: 1px dashed #9bb1bd;
  border-radius: 12px;
  padding: 14px;
  background: #f8fcfd;
  color: #2d4f62;
  font-size: 0.92rem;
}

#teacherbuddy-shell .tool-load-error {
  border-color: #d58d8d;
  color: #7f2020;
  background: #fff7f7;
}

.tb-popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 3100;
  background: rgba(11, 26, 38, 0.5);
  display: grid;
  place-items: center;
  padding: 16px;
}

.tb-popup-backdrop[hidden] {
  display: none;
}

.tb-popup-card {
  width: min(560px, 100%);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--popup-bg);
  padding: 16px;
  box-shadow: 0 22px 50px rgba(17, 31, 42, 0.24);
}

.tb-popup-title {
  margin: 0 0 8px;
  color: var(--brand-strong);
  font-size: 1.04rem;
}

.tb-popup-message {
  margin: 0;
  color: var(--popup-text);
  line-height: 1.42;
  white-space: pre-wrap;
}

.tb-popup-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.tb-popup-btn {
  border-radius: 999px;
  padding: 10px 14px;
  border: 1px solid #9dbac3;
  background: #eaf4f6;
  color: var(--brand-strong);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.tb-media-overlay {
  position: fixed;
  inset: 0;
  z-index: 2800;
}

.tb-media-overlay[hidden] {
  display: none;
}

.tb-media-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 26, 38, 0.58);
  backdrop-filter: blur(2px);
}

.tb-media-overlay-dialog {
  position: relative;
  z-index: 1;
  width: min(96vw, 1480px);
  height: min(92vh, 1100px);
  margin: 4vh auto;
  border: 1px solid rgba(214, 221, 228, 0.92);
  border-radius: 24px;
  background: var(--panel-bg);
  box-shadow: 0 24px 60px rgba(13, 42, 53, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tb-media-overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(15, 76, 92, 0.12);
  background: linear-gradient(180deg, rgba(15, 76, 92, 0.05), rgba(15, 76, 92, 0.015));
}

.tb-media-overlay-header h2 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--brand-strong);
}

.tb-media-overlay-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px;
}

.tb-media-overlay-body .sticky-element {
  position: static;
  top: auto;
}

.tb-overlay-open {
  overflow: hidden;
}

.tb-popup-btn-secondary {
  background: #ffffff;
  border-color: #bfd0d9;
  color: #2f495c;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes tb-panel-fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Footer */
.tb-footer {
  display: block;
  width: 100%;
  margin: 24px 0 0 0;
  padding: 14px 0;
  border-top: 1px solid rgba(27, 43, 52, 0.06);
  background: transparent;
  box-shadow: none;
}

.tb-footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-align: center;
  color: var(--footer-text);
  font-size: 0.75rem;
}

.tb-footer-note {
  color: var(--footer-text);
  font-size: 0.8rem;
  letter-spacing: 0.01em;
}

.settings-shell {
  padding: 28px;
}

.settings-section {
  display: grid;
  gap: 22px;
}

.settings-eyebrow {
  margin: 0 0 8px;
  color: var(--brand-strong);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.settings-section h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  color: var(--brand-strong);
}

.settings-intro {
  margin: 8px 0 0;
  color: var(--footer-text);
  max-width: 70ch;
  line-height: 1.5;
}

.theme-option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.theme-option-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  cursor: pointer;
  transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.tb-shell-body[data-ui-theme="standard-2"] .theme-option-card {
  background: rgba(255, 248, 239, 0.88);
}

.theme-option-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(17, 31, 42, 0.08);
}

.theme-option-card input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--brand-strong);
}

.theme-option-card:has(input:checked) {
  border-color: var(--brand-strong);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent);
}

.theme-option-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 16px;
  border-radius: 14px;
  min-height: 92px;
}

.theme-option-preview-standard-1 {
  background: linear-gradient(135deg, #eaf4f6 0%, #f7fbfc 52%, #ffffff 100%);
}

.theme-option-preview-standard-2 {
  background: linear-gradient(180deg, #f7c878 0%, #ef9e60 45%, #787f91 46%, #2f3446 100%);
}

.theme-option-preview-standard-3 {
  background: linear-gradient(180deg, #eaf4ee 0%, #cfe5db 45%, #8ea8ab 46%, #365661 100%);
}

.theme-option-preview-standard-4 {
  background: linear-gradient(180deg, #f4e7d8 0%, #dfb48b 45%, #637969 46%, #31463d 100%);
}

.theme-option-preview-standard-5 {
  background: linear-gradient(180deg, #eaf5fd 0%, #bfe0ee 45%, #7bb7ce 46%, #274e77 100%);
}

.theme-option-preview-standard-6 {
  background: linear-gradient(180deg, #eaf3fb 0%, #adcfe1 45%, #4f88ab 46%, #173754 100%);
}

.theme-option-preview-standard-7 {
  background: linear-gradient(180deg, #faecef 0%, #e6b3b0 45%, #a15b6b 46%, #5b2a38 100%);
}

.theme-option-preview-standard-8 {
  background: linear-gradient(180deg, #fdf0e8 0%, #f0bc96 45%, #b97561 46%, #6a352c 100%);
}

.theme-preview-chip {
  display: block;
  min-height: 58px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.theme-option-preview-standard-2 .theme-preview-chip:nth-child(1) {
  background: #fff6ed;
}

.theme-option-preview-standard-2 .theme-preview-chip:nth-child(2) {
  background: #f2b264;
}

.theme-option-preview-standard-2 .theme-preview-chip:nth-child(3) {
  background: #555b6c;
}

.theme-option-preview-standard-3 .theme-preview-chip:nth-child(1) {
  background: #f9fdfb;
}

.theme-option-preview-standard-3 .theme-preview-chip:nth-child(2) {
  background: #b7dccf;
}

.theme-option-preview-standard-3 .theme-preview-chip:nth-child(3) {
  background: #55757d;
}

.theme-option-preview-standard-4 .theme-preview-chip:nth-child(1) {
  background: #fff8f0;
}

.theme-option-preview-standard-4 .theme-preview-chip:nth-child(2) {
  background: #c98957;
}

.theme-option-preview-standard-4 .theme-preview-chip:nth-child(3) {
  background: #586d5f;
}

.theme-option-preview-standard-5 .theme-preview-chip:nth-child(1) {
  background: #f7fcff;
}

.theme-option-preview-standard-5 .theme-preview-chip:nth-child(2) {
  background: #8fd7e8;
}

.theme-option-preview-standard-5 .theme-preview-chip:nth-child(3) {
  background: #5b92b1;
}

.theme-option-preview-standard-6 .theme-preview-chip:nth-child(1) {
  background: #f6fbff;
}

.theme-option-preview-standard-6 .theme-preview-chip:nth-child(2) {
  background: #66b8d9;
}

.theme-option-preview-standard-6 .theme-preview-chip:nth-child(3) {
  background: #34688b;
}

.theme-option-preview-standard-7 .theme-preview-chip:nth-child(1) {
  background: #fff8fa;
}

.theme-option-preview-standard-7 .theme-preview-chip:nth-child(2) {
  background: #e58b86;
}

.theme-option-preview-standard-7 .theme-preview-chip:nth-child(3) {
  background: #8e5263;
}

.theme-option-preview-standard-8 .theme-preview-chip:nth-child(1) {
  background: #fff8f3;
}

.theme-option-preview-standard-8 .theme-preview-chip:nth-child(2) {
  background: #f0a06f;
}

.theme-option-preview-standard-8 .theme-preview-chip:nth-child(3) {
  background: #9d614f;
}

.theme-option-copy {
  display: grid;
  gap: 6px;
}

.theme-option-copy strong {
  font-size: 1rem;
  color: var(--brand-strong);
}

.theme-option-copy span {
  color: var(--footer-text);
  line-height: 1.45;
}

@media (max-width: 900px) {
  #teacherbuddy-shell {
    margin: 0 auto 16px;
    padding: 0 8px 22px;
  }

  #teacherbuddy-shell .tool-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding-left: 0;
  }

  #teacherbuddy-shell .tool-tabs button.tool-tab {
    width: 100%;
    justify-content: center;
    min-width: 0;
  }

  .settings-shell {
    padding: 20px;
  }

  .tb-shell-body[data-ui-theme="standard-2"] .tb-banner-support {
    width: min(100%, 760px);
    bottom: 8px;
    padding: 0 20px;
  }

  .tb-shell-body[data-ui-theme="standard-1"] .tb-banner-support,
  .tb-shell-body[data-ui-theme="standard-3"] .tb-banner-support,
  .tb-shell-body[data-ui-theme="standard-4"] .tb-banner-support,
  .tb-shell-body[data-ui-theme="standard-5"] .tb-banner-support,
  .tb-shell-body[data-ui-theme="standard-6"] .tb-banner-support,
  .tb-shell-body[data-ui-theme="standard-7"] .tb-banner-support,
  .tb-shell-body[data-ui-theme="standard-8"] .tb-banner-support {
    width: min(100%, 760px);
    bottom: 8px;
    padding: 0 20px;
  }
}

@media (max-width: 760px) {
  #teacherbuddy-shell .tool-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-intro {
    max-width: none;
  }
}

@media (max-width: 640px) {
  #teacherbuddy-shell .banner {
    gap: 8px;
    padding-left: 10px;
    padding-right: 10px;
  }

  #teacherbuddy-shell .banner img,
  #teacherbuddy-shell .logo-mark img {
    max-height: none;
  }

  .tb-shell-body[data-ui-theme="standard-2"] #teacherbuddy-shell .banner::before {
    height: 150px;
  }

  .tb-shell-body[data-ui-theme="standard-1"] #teacherbuddy-shell .banner::before,
  .tb-shell-body[data-ui-theme="standard-3"] #teacherbuddy-shell .banner::before,
  .tb-shell-body[data-ui-theme="standard-4"] #teacherbuddy-shell .banner::before,
  .tb-shell-body[data-ui-theme="standard-5"] #teacherbuddy-shell .banner::before,
  .tb-shell-body[data-ui-theme="standard-6"] #teacherbuddy-shell .banner::before,
  .tb-shell-body[data-ui-theme="standard-7"] #teacherbuddy-shell .banner::before,
  .tb-shell-body[data-ui-theme="standard-8"] #teacherbuddy-shell .banner::before {
    height: 150px;
  }

  .tb-shell-body[data-ui-theme="standard-2"] .tb-banner-support {
    width: 100%;
    bottom: 6px;
    padding: 0 10px;
    font-size: 11px;
    line-height: 1.25;
  }

  .tb-shell-body[data-ui-theme="standard-1"] .tb-banner-support,
  .tb-shell-body[data-ui-theme="standard-3"] .tb-banner-support,
  .tb-shell-body[data-ui-theme="standard-4"] .tb-banner-support,
  .tb-shell-body[data-ui-theme="standard-5"] .tb-banner-support,
  .tb-shell-body[data-ui-theme="standard-6"] .tb-banner-support,
  .tb-shell-body[data-ui-theme="standard-7"] .tb-banner-support,
  .tb-shell-body[data-ui-theme="standard-8"] .tb-banner-support {
    width: 100%;
    bottom: 6px;
    padding: 0 10px;
    font-size: 11px;
    line-height: 1.25;
  }

  .settings-shell {
    padding: 14px;
  }

  .theme-option-grid {
    grid-template-columns: 1fr;
  }

  .theme-option-card {
    padding: 14px;
  }
}

@media (max-width: 520px) {
  #teacherbuddy-shell .tool-tabs {
    grid-template-columns: 1fr;
  }

  .tb-shell-body[data-ui-theme="standard-2"] .tb-banner-support {
    text-align: left;
  }

  .tb-shell-body[data-ui-theme="standard-1"] .tb-banner-support,
  .tb-shell-body[data-ui-theme="standard-3"] .tb-banner-support,
  .tb-shell-body[data-ui-theme="standard-4"] .tb-banner-support,
  .tb-shell-body[data-ui-theme="standard-5"] .tb-banner-support,
  .tb-shell-body[data-ui-theme="standard-6"] .tb-banner-support,
  .tb-shell-body[data-ui-theme="standard-7"] .tb-banner-support,
  .tb-shell-body[data-ui-theme="standard-8"] .tb-banner-support {
    text-align: left;
  }
}

#teacherbuddy-shell button,
#teacherbuddy-shell .button,
#teacherbuddy-shell .tool-tab,
#teacherbuddy-shell .tb-popup-btn {
  border-radius: 10px !important;
}
