html,
body.screen-shell-builder.screen-builder-fullscreen {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body.screen-shell-builder.screen-builder-fullscreen {
  overflow: hidden;
  background: #0b1220;
  color: #ffffff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-builder {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-stage {
  position: absolute;
  inset: 0;
  background: #ffffff;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-stage-grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(37, 99, 235, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.05) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.12), transparent 32rem),
    radial-gradient(circle at bottom right, rgba(45, 212, 191, 0.10), transparent 34rem);
  pointer-events: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-stage-content {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 6vw;
  text-align: center;
  color: #10213f;
}

body.screen-shell-builder.screen-builder-fullscreen #stageScreenTitle {
  margin: 0;
  font-size: clamp(54px, 7.8vw, 124px);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-top-left,
body.screen-shell-builder.screen-builder-fullscreen .fs-top-right,
body.screen-shell-builder.screen-builder-fullscreen .fs-bottom-right {
  position: fixed;
  z-index: 20;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-top-left {
  top: 18px;
  left: 18px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-home-chip {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
  text-decoration: none;
  background: rgba(15, 23, 42, 0.58);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(16px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-top-right {
  top: 18px;
  right: 18px;
  display: flex;
  gap: 10px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-icon-btn,
body.screen-shell-builder.screen-builder-fullscreen .fs-close-btn,
body.screen-shell-builder.screen-builder-fullscreen .fs-mini-action,
body.screen-shell-builder.screen-builder-fullscreen .fs-card-mini,
body.screen-shell-builder.screen-builder-fullscreen .fs-page-btn,
body.screen-shell-builder.screen-builder-fullscreen .fs-page-center,
body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-close {
  border: 0;
  font: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-icon-btn:active,
body.screen-shell-builder.screen-builder-fullscreen .fs-page-btn:active,
body.screen-shell-builder.screen-builder-fullscreen .fs-page-center:active {
  transform: translateY(1px);
}



body.screen-shell-builder.screen-builder-fullscreen .fs-save-cloud-btn {
  border: 0;
  height: 42px;
  min-width: 74px;
  padding: 0 18px;
  border-radius: 14px;
  color: #fff;
  font-size: 14px;
  font-weight: 950;
  cursor: pointer;
  background: linear-gradient(135deg, #2478ff, #14b8a6);
  box-shadow: 0 14px 34px rgba(36, 120, 255, 0.22);
  transition: transform 0.15s ease, opacity 0.15s ease;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-save-cloud-btn:disabled {
  cursor: wait;
  opacity: 0.68;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-save-cloud-btn:active {
  transform: translateY(1px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-icon-btn {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  color: #ffffff;
  font-size: 24px;
  background: rgba(15, 23, 42, 0.60);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(16px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-accent-btn {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.92), rgba(13, 148, 136, 0.92));
}

body.screen-shell-builder.screen-builder-fullscreen .fs-dock {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 22;
  width: min(380px, calc(100vw - 24px));
  height: 100vh;
  box-sizing: border-box;
  padding: 20px;
  overflow: auto;
  color: #10213f;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: -24px 0 60px rgba(15, 23, 42, 0.18);
  transform: translateX(104%);
  transition: transform 0.24s ease;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-dock.is-open {
  transform: translateX(0);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-dock-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-kicker {
  margin: 0 0 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-dock-head h2,
body.screen-shell-builder.screen-builder-fullscreen .fs-inline-head h3,
body.screen-shell-builder.screen-builder-fullscreen .fs-block h3 {
  margin: 0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #334155;
  font-size: 24px;
  background: #e2e8f0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-block {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 20px;
  background: #ffffff;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-inline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-mini-action {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 800;
  background: #2563eb;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-label {
  display: block;
  margin: 12px 0 8px;
  color: #334155;
  font-size: 13px;
  font-weight: 850;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-input {
  width: 100%;
  min-height: 42px;
  box-sizing: border-box;
  padding: 0 12px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 14px;
  color: #10213f;
  font: inherit;
  background: #ffffff;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-color-row {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 10px;
  align-items: center;
}

body.screen-shell-builder.screen-builder-fullscreen input[type="color"] {
  width: 52px;
  height: 42px;
  padding: 3px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 14px;
  background: #ffffff;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-card {
  position: relative;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 18px;
  background: #f8fafc;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-card.is-active {
  border-color: rgba(37, 99, 235, 0.42);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.10);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-hit {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: transparent;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-preview,
body.screen-shell-builder.screen-builder-fullscreen .fs-screen-card-body {
  position: relative;
  z-index: 1;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-preview {
  width: 64px;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 12px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-name {
  color: #10213f;
  font-size: 14px;
  font-weight: 850;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-meta {
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-menu-trigger {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-menu-trigger span {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #475569;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-menu-trigger.is-pop {
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.10);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-item.is-active .fs-screen-menu-trigger.is-pop {
  background: rgba(255,255,255,.18);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-menu-trigger.is-pop span {
  background: #e2e8f0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-menu {
  position: absolute;
  top: 50px;
  right: 10px;
  z-index: 4;
  min-width: 168px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.18);
  display: grid;
  gap: 4px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-item .fs-screen-menu {
  top: 48px;
  right: 10px;
  background: rgba(15, 23, 42, 0.98);
  border-color: rgba(255,255,255,.10);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-menu-item {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  background: #f8fafc;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-menu-item:hover {
  background: #eef2ff;
  color: #1e3a8a;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-item .fs-screen-menu-item {
  color: #e2e8f0;
  background: rgba(255,255,255,.08);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-item .fs-screen-menu-item:hover {
  color: #ffffff;
  background: rgba(59,130,246,.32);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-menu-item.is-danger,
body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-item .fs-screen-menu-item.is-danger {
  color: #ef4444;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-menu-item.is-danger:hover,
body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-item .fs-screen-menu-item.is-danger:hover {
  color: #ffffff;
  background: rgba(239, 68, 68, 0.22);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-card-mini {
  min-height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  color: #334155;
  font-size: 11px;
  font-weight: 800;
  background: #e2e8f0;
  position: relative;
  z-index: 2;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-card-mini.is-danger {
  color: #991b1b;
  background: #fee2e2;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-placeholder {
  background: #f8fafc;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-placeholder p:last-child {
  margin-bottom: 0;
  color: #64748b;
  line-height: 1.6;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-status {
  padding: 12px 14px;
  border-radius: 16px;
  color: #0f766e;
  font-weight: 850;
  background: #ccfbf1;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-bottom-right {
  right: 18px;
  bottom: 18px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop {
  position: absolute;
  right: 0;
  bottom: 78px;
  width: min(280px, calc(100vw - 36px));
  max-height: 52vh;
  display: none;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop.is-open {
  display: block;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  color: #ffffff;
  font-weight: 850;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-close {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.10);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-item {
  position: relative;
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px 48px 12px 12px;
  border: 0;
  border-radius: 14px;
  color: #e2e8f0;
  text-align: left;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-hit {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: transparent;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-item.is-active {
  color: #ffffff;
  background: rgba(59, 130, 246, 0.28);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-item span {
  font-size: 12px;
  color: #93c5fd;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-item strong {
  position: relative;
  z-index: 1;
  font-size: 14px;
  padding-right: 6px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-tray {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.66);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-btn,
body.screen-shell-builder.screen-builder-fullscreen .fs-page-center {
  min-height: 42px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.10);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-btn {
  min-width: 42px;
  font-size: 24px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-center {
  display: grid;
  gap: 2px;
  min-width: 112px;
  padding: 0 14px;
  text-align: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-center-label {
  color: #93c5fd;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.screen-shell-builder.screen-builder-fullscreen #pageProgress {
  font-size: 14px;
  font-weight: 900;
}

@media (max-width: 860px) {
  body.screen-shell-builder.screen-builder-fullscreen .fs-dock {
    width: min(100vw, 420px);
  }

  body.screen-shell-builder.screen-builder-fullscreen #stageScreenTitle {
    font-size: clamp(42px, 13vw, 88px);
  }
}


body.screen-shell-builder.screen-builder-fullscreen.fs-style-dark .fs-stage {
  background: #101827;
}

body.screen-shell-builder.screen-builder-fullscreen.fs-style-dark .fs-stage-content {
  color: #f8fafc;
}

body.screen-shell-builder.screen-builder-fullscreen.fs-style-dark #stageScreenTitle {
  color: #f8fafc;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-stage.ratio-fill {
  inset: 0;
  transform: none;
  width: auto;
  aspect-ratio: auto;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-stage.ratio-fixed-16-9,
body.screen-shell-builder.screen-builder-fullscreen .fs-stage.ratio-fixed-4-3 {
  inset: auto;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.34);
  transform: translate(-50%, -50%);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-stage.ratio-fixed-16-9 {
  width: min(100vw, calc(100vh * 16 / 9));
  aspect-ratio: 16 / 9;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-stage.ratio-fixed-4-3 {
  width: min(100vw, calc(100vh * 4 / 3));
  aspect-ratio: 4 / 3;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-more-menu {
  position: absolute;
  top: 62px;
  right: 0;
  display: none;
  width: 220px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-more-menu.is-open {
  display: grid;
  gap: 6px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-more-menu button {
  min-height: 40px;
  border: 0;
  border-radius: 12px;
  padding: 0 12px;
  color: #f8fafc;
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-more-menu button:hover {
  background: rgba(59, 130, 246, 0.32);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-add {
  display: inline-grid;
  place-items: center;
  min-width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
  cursor: pointer;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.32);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(12px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-modal-backdrop.is-open {
  display: flex;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-modal {
  width: min(620px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  box-sizing: border-box;
  padding: 22px;
  border-radius: 26px;
  color: #10213f;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.26);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-modal-head h2 {
  margin: 0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-modal-grid {
  display: grid;
  gap: 8px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-textarea {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  min-height: 84px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 14px;
  color: #10213f;
  font: inherit;
  background: #ffffff;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-primary-action,
body.screen-shell-builder.screen-builder-fullscreen .fs-secondary-action {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-primary-action {
  color: #ffffff;
  background: #2563eb;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-secondary-action {
  color: #334155;
  background: #e2e8f0;
}


/* M5.2B refinements: smaller controls, transparent page tray, drag reorder. */
body.screen-shell-builder.screen-builder-fullscreen .fs-home-chip,
body.screen-shell-builder.screen-builder-fullscreen .fs-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 18px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-top-left,
body.screen-shell-builder.screen-builder-fullscreen .fs-top-right { top: 12px; }

body.screen-shell-builder.screen-builder-fullscreen .fs-top-left { left: 12px; }
body.screen-shell-builder.screen-builder-fullscreen .fs-top-right { right: 12px; gap: 7px; }

body.screen-shell-builder.screen-builder-fullscreen .fs-page-tray {
  gap: 6px;
  padding: 6px;
  border-color: rgba(255,255,255,.16);
  background: rgba(15,23,42,.46);
  box-shadow: 0 14px 34px rgba(0,0,0,.20);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-btn,
body.screen-shell-builder.screen-builder-fullscreen .fs-page-center {
  min-height: 34px;
  background: rgba(255,255,255,.12);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-btn {
  min-width: 34px;
  font-size: 20px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-center {
  grid-template-columns: auto auto;
  align-items: center;
  gap: 6px;
  min-width: 82px;
  padding: 0 11px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  font-size: 15px;
  color: #bfdbfe;
}

body.screen-shell-builder.screen-builder-fullscreen #pageProgress { font-size: 13px; }

body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop {
  width: min(260px, calc(100vw - 28px));
  bottom: 62px;
  background: rgba(15,23,42,.60);
  box-shadow: 0 16px 36px rgba(0,0,0,.22);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-head { padding: 10px 12px; }

body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-list {
  gap: 7px;
  padding: 9px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-item {
  min-height: clamp(38px, 6.2vh, 52px);
  padding: 11px 48px 11px 12px;
  background: rgba(255,255,255,.10);
  cursor: grab;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-item:active,
body.screen-shell-builder.screen-builder-fullscreen .fs-screen-card:active { cursor: grabbing; }

body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-item strong { font-size: 15px; }

body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-item.is-active {
  background: rgba(59,130,246,.44);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-add-card {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 76px;
  width: 100%;
  border: 0;
  border-radius: 14px;
  color: #dbeafe;
  cursor: pointer;
  background: rgba(255,255,255,.10);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-add-card span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: #fff;
  font-size: 25px;
  font-weight: 900;
  background: linear-gradient(135deg,#2563eb,#0ea5e9);
  box-shadow: 0 10px 22px rgba(37,99,235,.26);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-add-card strong { font-size: 13px; }
body.screen-shell-builder.screen-builder-fullscreen .fs-screen-card { cursor: grab; }


/* M5.2C micro-cleanup: cleaner add card and quieter metadata. */
body.screen-shell-builder.screen-builder-fullscreen .fs-page-add-card {
  min-height: 66px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-add-card span {
  width: 42px;
  height: 42px;
  font-size: 28px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-meta {
  font-size: 11px;
  opacity: 0.78;
}


/* M6 Widget Dock skeleton */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-layer {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget {
  position: absolute;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  box-sizing: border-box;
  border-radius: 24px;
  padding: 18px;
  color: #10213f;
  text-align: center;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(18px);
  pointer-events: auto;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text {
  font-size: clamp(28px, 4vw, 58px);
  font-weight: 900;
  outline: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer strong,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-clock strong {
  display: block;
  font-size: clamp(34px, 4vw, 72px);
  line-height: 1;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-label {
  display: block;
  margin-bottom: 10px;
  color: #64748b;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-dock {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 21;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(560px, calc(100vw - 360px));
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.48);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-tool {
  display: grid;
  place-items: center;
  gap: 4px;
  min-width: 74px;
  min-height: 58px;
  border: 0;
  border-radius: 18px;
  color: #ffffff;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.10);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-tool:hover {
  background: rgba(59, 130, 246, 0.34);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-tool span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 24px;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-tool .fs-tool-icon {
  display: block;
  width: 24px;
  height: 24px;
  background: currentColor;
  opacity: .96;
  -webkit-mask: var(--fs-tool-icon) center / contain no-repeat;
  mask: var(--fs-tool-icon) center / contain no-repeat;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-tool:hover .fs-tool-icon,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-tool:focus-visible .fs-tool-icon {
  opacity: 1;
  transform: translateY(-1px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-tool strong {
  font-size: 12px;
  font-weight: 850;
}

@media (max-width: 980px) {
  body.screen-shell-builder.screen-builder-fullscreen .fs-widget-dock {
    left: 18px;
    right: 18px;
    max-width: none;
    transform: none;
    justify-content: center;
  }

  body.screen-shell-builder.screen-builder-fullscreen .fs-widget-tool {
    min-width: 64px;
  }
}


/* M6.1 widget interaction polish */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-layer {
  z-index: 9;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget {
  border-radius: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
  cursor: move;
  user-select: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget.is-locked {
  cursor: default;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget.is-selected {
  outline: 2px solid #6366f1;
  outline-offset: 0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text-content {
  width: 100%;
  outline: 0;
  cursor: text;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text {
  border-radius: 10px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-clock {
  align-content: center;
  gap: 6px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer strong,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-clock strong {
  font-size: clamp(24px, 4vw, 62px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-label {
  margin-bottom: 2px;
  font-size: 11px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-toolbar {
  position: absolute;
  left: 50%;
  top: -44px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border-radius: 10px;
  color: #334155;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
  transform: translateX(-50%);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-toolbar button,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-toolbar summary {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 7px;
  color: #334155;
  font: inherit;
  font-weight: 900;
  list-style: none;
  cursor: pointer;
  background: transparent;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-toolbar button:hover,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-toolbar summary:hover {
  background: #e2e8f0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-more {
  position: relative;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-more summary::-webkit-details-marker {
  display: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-more-menu {
  position: absolute;
  top: 34px;
  right: 0;
  display: grid;
  gap: 4px;
  width: 190px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-more-menu button {
  width: 100%;
  min-height: 32px;
  justify-content: start;
  padding: 0 9px;
  font-size: 13px;
  font-weight: 750;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-resize-handle {
  position: absolute;
  z-index: 3;
  width: 13px;
  height: 13px;
  border: 2px solid #6366f1;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-resize-nw { top: -7px; left: -7px; cursor: nwse-resize; }
body.screen-shell-builder.screen-builder-fullscreen .fs-resize-ne { top: -7px; right: -7px; cursor: nesw-resize; }
body.screen-shell-builder.screen-builder-fullscreen .fs-resize-sw { bottom: -7px; left: -7px; cursor: nesw-resize; }
body.screen-shell-builder.screen-builder-fullscreen .fs-resize-se { bottom: -7px; right: -7px; cursor: nwse-resize; }

body.screen-shell-builder.screen-builder-fullscreen .fs-clock-face {
  position: relative;
  width: min(70%, 170px);
  aspect-ratio: 1;
  margin: 0 auto 8px;
  border: 4px solid #6366f1;
  border-radius: 999px;
  background: #ffffff;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-clock-mark {
  position: absolute;
  color: #334155;
  font-size: 12px;
  font-weight: 850;
}

body.screen-shell-builder.screen-builder-fullscreen .mark-12 { top: 6%; left: 50%; transform: translateX(-50%); }
body.screen-shell-builder.screen-builder-fullscreen .mark-3 { top: 50%; right: 7%; transform: translateY(-50%); }
body.screen-shell-builder.screen-builder-fullscreen .mark-6 { bottom: 5%; left: 50%; transform: translateX(-50%); }
body.screen-shell-builder.screen-builder-fullscreen .mark-9 { top: 50%; left: 7%; transform: translateY(-50%); }

body.screen-shell-builder.screen-builder-fullscreen .fs-clock-hand {
  position: absolute;
  left: 50%;
  bottom: 50%;
  width: 3px;
  border-radius: 999px;
  transform-origin: 50% 100%;
  background: #0f172a;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-clock-hour {
  height: 28%;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-clock-minute {
  height: 38%;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-clock-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #ef4444;
  transform: translate(-50%, -50%);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-clock-digital,
body.screen-shell-builder.screen-builder-fullscreen .fs-clock-digital-only {
  font-size: clamp(20px, 2.8vw, 42px);
  line-height: 1;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-setting-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-secondary-action.is-danger {
  color: #991b1b;
  background: #fee2e2;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-muted {
  color: #64748b;
  line-height: 1.55;
}


/* M6.2 widget polish */
body.screen-shell-builder.screen-builder-fullscreen .fs-dock.is-widget-mode #deckMetaBlock,
body.screen-shell-builder.screen-builder-fullscreen .fs-dock.is-widget-mode #screenListBlock,
body.screen-shell-builder.screen-builder-fullscreen .fs-dock.is-widget-mode #currentScreenBlock {
  display: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget {
  overflow: visible;
  color: var(--widget-text, #10213f);
  background: var(--widget-bg, rgba(255,255,255,.92));
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget::before {
  border-color: var(--widget-accent, #6366f1);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget.is-selected {
  outline-color: var(--widget-accent, #6366f1);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-resize-handle {
  border-color: var(--widget-accent, #6366f1);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-toolbar {
  top: -38px;
  gap: 3px;
  padding: 4px;
  border-radius: 9px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-toolbar button,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-toolbar summary {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  font-size: 13px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text-content {
  display: block;
  width: 100%;
  min-height: 100%;
  box-sizing: border-box;
  color: var(--widget-text, #10213f);
  user-select: text;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text-content[contenteditable="true"] {
  cursor: text;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-clock {
  overflow: hidden;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-clock-face {
  width: min(58%, 150px);
  max-height: 52%;
  border-color: var(--widget-accent, #6366f1);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-clock-digital,
body.screen-shell-builder.screen-builder-fullscreen .fs-clock-digital-only {
  color: var(--widget-text, #10213f);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget.is-compact {
  display: grid;
  place-items: center;
  padding: 8px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget.is-compact .fs-clock-digital-only {
  font-size: clamp(20px, 3.2vw, 44px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-timer-widget {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  height: 100%;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-timer-progress {
  width: min(86px, 18vw);
  aspect-ratio: 1;
  border: 7px solid var(--widget-accent, #6366f1);
  border-radius: 999px;
  box-sizing: border-box;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-timer-main {
  display: grid;
  gap: 4px;
  align-items: center;
  justify-items: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-timer-main strong {
  color: var(--widget-text, #10213f);
  font-size: clamp(34px, 5.4vw, 82px);
  line-height: 1;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-timer-plus,
body.screen-shell-builder.screen-builder-fullscreen .fs-timer-minus {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  color: var(--widget-text, #10213f);
  font-weight: 900;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-inline-control {
  border: 0;
  color: var(--widget-text, #10213f);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  background: transparent;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-timer-actions {
  display: grid;
  gap: 8px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-timer-play,
body.screen-shell-builder.screen-builder-fullscreen .fs-timer-reset {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(15,23,42,.20);
  border-radius: 999px;
  background: #fff;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-timer-play {
  color: #fff;
  background: var(--widget-accent, #6366f1);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-button-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-format-btn {
  min-width: 40px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  color: #334155;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  background: #e2e8f0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-format-btn.is-active {
  color: #fff;
  background: #2563eb;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-theme-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-theme-swatch {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(148,163,184,.35);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-theme-swatch.is-active {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99,102,241,.18);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-theme-swatch span {
  position: relative;
  display: block;
  height: 38px;
  border: 2px solid;
  border-radius: 10px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-theme-swatch span i,
body.screen-shell-builder.screen-builder-fullscreen .fs-theme-swatch span b {
  position: absolute;
  left: 9px;
  right: 18px;
  height: 6px;
  border-radius: 99px;
  content: "";
}

body.screen-shell-builder.screen-builder-fullscreen .fs-theme-swatch span i { top: 12px; }
body.screen-shell-builder.screen-builder-fullscreen .fs-theme-swatch span b {
  top: 23px;
  background: currentColor;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-theme-swatch small {
  color: #334155;
  font-size: 12px;
  font-weight: 850;
}


/* M6.3 micro polish */
body.screen-shell-builder.screen-builder-fullscreen .fs-dock.is-background-mode #deckMetaBlock,
body.screen-shell-builder.screen-builder-fullscreen .fs-dock.is-background-mode #screenListBlock,
body.screen-shell-builder.screen-builder-fullscreen .fs-dock.is-background-mode #widgetSettingsPanel {
  display: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-dock.is-background-mode #currentScreenBlock .fs-kicker,
body.screen-shell-builder.screen-builder-fullscreen .fs-dock.is-background-mode #currentScreenBlock h3,
body.screen-shell-builder.screen-builder-fullscreen .fs-dock.is-background-mode #currentScreenBlock .fs-screen-title-row {
  display: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-bg-swatches {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-top: 12px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-bg-swatches button {
  height: 34px;
  border: 1px solid rgba(148, 163, 184, .42);
  border-radius: 10px;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.45);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-theme-grid {
  grid-template-columns: repeat(2, 118px);
  justify-content: start;
  gap: 10px 12px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-theme-swatch {
  width: 118px;
  min-height: 76px;
  padding: 7px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-theme-swatch span {
  width: 76px;
  height: 30px;
  margin: 0 auto;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-theme-swatch span i,
body.screen-shell-builder.screen-builder-fullscreen .fs-theme-swatch span b {
  left: 50%;
  right: auto;
  width: 58px;
  transform: translateX(-50%);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-theme-swatch small {
  text-align: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget {
  container-type: size;
  overflow: visible;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text {
  cursor: text;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text-content {
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: pre-wrap;
  overflow: hidden;
  padding: 8px;
  border-radius: 8px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text-content:focus {
  outline: 0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-toolbar.is-text-toolbar {
  gap: 2px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-toolbar.is-text-toolbar .fs-text-tool {
  width: 32px;
  font-size: 11px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-toolbar .is-active {
  color: #fff;
  background: #2563eb;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-timer-widget {
  grid-template-columns: minmax(52px, 22%) minmax(120px, 1fr) 42px;
  gap: 10px;
  overflow: hidden;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-timer-main {
  width: 100%;
  min-width: 0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-timer-main strong {
  font-size: clamp(26px, 17cqw, 78px);
  white-space: nowrap;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-timer-plus,
body.screen-shell-builder.screen-builder-fullscreen .fs-timer-minus {
  width: 100%;
  grid-template-columns: repeat(4, minmax(16px, 1fr));
  gap: 0;
  justify-items: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-timer-progress {
  width: min(72px, 70cqh, 18cqw);
  border-width: clamp(4px, 2cqw, 7px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-compact .fs-timer-widget {
  grid-template-columns: 1fr 38px;
  gap: 6px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-compact .fs-timer-progress {
  display: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-compact .fs-timer-main strong {
  font-size: clamp(20px, 23cqw, 46px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-compact .fs-timer-plus,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-compact .fs-timer-minus {
  gap: 0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-tiny .fs-timer-plus,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-tiny .fs-timer-minus,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-tiny .fs-timer-reset {
  display: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-tiny .fs-timer-widget {
  grid-template-columns: 1fr auto;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-clock-face {
  width: min(42cqw, 42cqh, 142px);
  max-height: none;
  aspect-ratio: 1 / 1;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-clock-digital {
  font-size: clamp(22px, 12cqw, 58px);
  max-width: 100%;
  white-space: nowrap;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-clock-digital-only {
  display: block;
  max-width: 100%;
  overflow: hidden;
  font-size: clamp(18px, 26cqw, 48px);
  white-space: nowrap;
  text-overflow: clip;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-clock.is-tiny .fs-clock-digital-only {
  font-size: clamp(16px, 22cqw, 34px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-resize-handle {
  width: 13px;
  height: 13px;
  border-radius: 999px !important;
}


/* M6.4 refine */
body.screen-shell-builder.screen-builder-fullscreen #stageScreenTitle {
  display: none !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-theme-grid {
  grid-template-columns: repeat(4, 68px);
  gap: 10px;
  justify-content: start;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-theme-swatch {
  position: relative;
  width: 68px;
  min-height: 82px;
  padding: 8px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, .35);
  display: grid;
  place-items: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-theme-swatch::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 6px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: transparent;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-theme-swatch.is-active::after {
  content: "✓";
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  display: grid;
  place-items: center;
  background: #6366f1;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-theme-swatch span {
  width: 42px;
  height: 56px;
  margin: 0;
  border-radius: 12px;
  border-width: 2px;
  position: relative;
  overflow: hidden;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-theme-swatch span i,
body.screen-shell-builder.screen-builder-fullscreen .fs-theme-swatch span b {
  width: 24px;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  height: 6px;
  border-radius: 999px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-theme-swatch span i {
  top: 16px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-theme-swatch span b {
  top: 32px;
  background: currentColor;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-theme-swatch small {
  display: none !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-toolbar {
  align-items: center;
  gap: 4px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-toolbar-drag {
  cursor: move;
  font-weight: 900;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text {
  cursor: move;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text-content {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  padding: 18px;
  white-space: pre-wrap;
  word-break: break-word;
  overflow: auto;
  line-height: 1.25;
  cursor: text;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text-content:focus {
  outline: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.is-selected .fs-widget-text-content {
  caret-color: #111827;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-toolbar.is-text-toolbar button {
  min-width: 28px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-timer-widget {
  grid-template-columns: 64px minmax(140px,1fr) 54px;
  gap: 10px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-timer-main {
  width: 100%;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-timer-main strong {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-timer-plus,
body.screen-shell-builder.screen-builder-fullscreen .fs-timer-minus {
  width: 100%;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-timer-plus button,
body.screen-shell-builder.screen-builder-fullscreen .fs-timer-minus button {
  min-width: 0;
  width: 100%;
  text-align: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-timer-actions {
  width: 54px;
  display: grid;
  justify-items: center;
  gap: 10px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-compact .fs-timer-widget {
  grid-template-columns: 1fr 40px;
  gap: 8px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-compact .fs-timer-progress,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-compact .fs-timer-reset {
  display: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-compact .fs-timer-main {
  gap: 0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-compact .fs-timer-main strong {
  font-size: clamp(20px, 30cqw, 38px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-compact .fs-timer-plus,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-compact .fs-timer-minus {
  gap: 0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-tiny .fs-timer-plus,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-tiny .fs-timer-minus {
  display: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-tiny .fs-timer-widget {
  grid-template-columns: 1fr 34px;
  gap: 8px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-tiny .fs-timer-main strong {
  font-size: clamp(16px, 28cqw, 30px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-clock-face {
  width: min(52cqw, 44cqh, 160px);
  margin: 0 auto 14px;
  display: block;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-clock-hand {
  left: calc(50% - 1.5px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-clock-dot {
  width: 10px;
  height: 10px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-clock .fs-clock-digital {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-clock.is-compact .fs-clock-face {
  width: min(36cqw, 34cqh, 100px);
  margin-bottom: 10px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-clock.is-tiny .fs-clock-face {
  display: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-clock.is-tiny .fs-clock-digital-only {
  font-size: clamp(16px, 26cqw, 26px);
  width: 100%;
  text-align: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-clock .fs-resize-handle,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer .fs-resize-handle,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text .fs-resize-handle {
  border-radius: 999px !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-block .fs-primary-action {
  margin-top: 12px;
}


/* M6.5 targeted polish */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text-content {
  white-space: pre-wrap;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text-content:empty::before {
  content: attr(data-placeholder);
  color: rgba(15,23,42,.48);
  font-style: italic;
  font-weight: 500;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text-content:focus:empty::before {
  content: attr(data-placeholder);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-page-center {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 118px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-page-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-timer-widget {
  grid-template-columns: 54px minmax(0,1fr) 64px;
  gap: 12px;
  overflow: visible;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-timer-main {
  width: 100%;
  justify-items: stretch;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-timer-main strong {
  text-align: center;
  white-space: nowrap;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-timer-plus,
body.screen-shell-builder.screen-builder-fullscreen .fs-timer-minus {
  width: 100%;
  gap: 0;
  justify-items: center;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-timer-plus button,
body.screen-shell-builder.screen-builder-fullscreen .fs-timer-minus button {
  width: 100%;
  min-width: 0;
  line-height: 1;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-timer-actions {
  width: 64px;
  justify-items: center;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-timer-play,
body.screen-shell-builder.screen-builder-fullscreen .fs-timer-reset {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-toolbar button[title='删除'] {
  font-size: 15px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-more-menu {
  width: 208px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-clock .fs-clock-digital-only {
  font-size: clamp(26px, 4vw, 72px);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-clock.is-tiny .fs-clock-face,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-clock.is-compact .fs-clock-face {
  display: none;
}


/* M6.6: focused stability and cleaner widget settings */
body.screen-shell-builder.screen-builder-fullscreen .fs-status {
  display: none !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text-content {
  width: 100%;
  height: 100%;
  min-height: 100%;
  box-sizing: border-box;
  border: 0;
  outline: none;
  resize: none;
  background: transparent;
  color: var(--widget-text, #10213f);
  font: inherit;
  line-height: 1.25;
  white-space: pre-wrap;
  overflow: auto;
  cursor: text;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text-content::placeholder {
  color: rgba(15,23,42,.45);
  font-style: italic;
  font-weight: 500;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-full-action {
  width: 100%;
  justify-content: center;
  margin: 2px 0 14px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-placeholder h3 {
  margin-top: 0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-timer-widget {
  grid-template-columns: 56px minmax(0, 1fr) 54px;
  gap: 10px;
  align-items: center;
  overflow: hidden;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-timer-main {
  min-width: 0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-timer-main strong {
  width: 100%;
  text-align: center;
  font-size: clamp(30px, 13cqw, 78px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-timer-plus,
body.screen-shell-builder.screen-builder-fullscreen .fs-timer-minus {
  width: 100%;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-timer-plus button,
body.screen-shell-builder.screen-builder-fullscreen .fs-timer-minus button {
  width: 100%;
  min-width: 0;
  padding: 0;
  text-align: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-timer-actions {
  width: 54px;
  min-width: 54px;
  justify-items: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-timer-play,
body.screen-shell-builder.screen-builder-fullscreen .fs-timer-reset {
  width: 40px;
  height: 40px;
  font-size: 18px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-compact .fs-timer-widget,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-tiny .fs-timer-widget {
  grid-template-columns: minmax(0, 1fr) 42px;
  padding: 0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-compact .fs-timer-progress,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-tiny .fs-timer-progress,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-tiny .fs-timer-plus,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-tiny .fs-timer-minus {
  display: none !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-compact .fs-timer-main strong,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-tiny .fs-timer-main strong {
  font-size: clamp(18px, 18cqw, 38px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-compact .fs-timer-actions,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-tiny .fs-timer-actions {
  width: 42px;
  min-width: 42px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-compact .fs-timer-play,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-tiny .fs-timer-play {
  width: 36px;
  height: 36px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-center {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-icon {
  line-height: 1;
}


/* M6.7: text-save stability, timer alignment, clock + alarm polish */
body.screen-shell-builder.screen-builder-fullscreen .fs-toolbar-drag {
  display: none !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text-content {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  border: 0;
  outline: none;
  resize: none;
  background: transparent;
  color: var(--widget-text, #10213f);
  font: inherit;
  font-family: inherit;
  line-height: 1.22;
  white-space: pre-wrap;
  overflow: auto;
  cursor: text;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text-content::placeholder {
  color: rgba(15, 23, 42, .44);
  font-style: italic;
  font-weight: 500;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-timer-widget {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 54px;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  padding: 0 18px;
  box-sizing: border-box;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-timer-progress {
  width: 58px;
  height: 58px;
  justify-self: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-timer-main {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-rows: 20px auto 20px;
  align-items: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-timer-main strong {
  display: block;
  width: 100%;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: clamp(34px, 13cqw, 78px);
  line-height: .98;
  white-space: nowrap;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-timer-plus,
body.screen-shell-builder.screen-builder-fullscreen .fs-timer-minus {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 100%;
  gap: 0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-timer-plus button,
body.screen-shell-builder.screen-builder-fullscreen .fs-timer-minus button {
  width: 100%;
  min-width: 0;
  height: 18px;
  padding: 0;
  text-align: center;
  line-height: 18px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-timer-actions {
  width: 54px;
  min-width: 54px;
  display: grid;
  justify-items: center;
  gap: 8px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-timer-play,
body.screen-shell-builder.screen-builder-fullscreen .fs-timer-reset {
  width: 38px;
  height: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-compact .fs-timer-widget {
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
  padding: 0 10px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-compact .fs-timer-progress,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-tiny .fs-timer-progress {
  display: none !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-compact .fs-timer-main {
  grid-template-rows: 16px auto 16px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-compact .fs-timer-main strong {
  font-size: clamp(20px, 24cqw, 42px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-tiny .fs-timer-plus,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-tiny .fs-timer-minus,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-tiny .fs-timer-reset {
  display: none !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-tiny .fs-timer-widget {
  grid-template-columns: minmax(0, 1fr) 34px;
  padding: 0 8px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-tiny .fs-timer-main {
  grid-template-rows: 1fr;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-tiny .fs-timer-main strong {
  font-size: clamp(16px, 24cqw, 30px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-tiny .fs-timer-play {
  width: 30px;
  height: 30px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-clock .fs-clock-face {
  width: min(46cqw, 46cqh, 160px);
  max-width: 75%;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-clock.is-compact .fs-clock-face {
  width: min(58cqw, 58cqh, 120px);
  max-width: 76%;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-clock.is-tiny .fs-clock-face {
  display: none !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-clock .fs-clock-digital-only {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-alarm-draft {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  background: rgba(15,23,42,.38);
  backdrop-filter: blur(4px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-alarm-card {
  width: min(420px, calc(100vw - 40px));
  border-radius: 22px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 28px 90px rgba(15,23,42,.26);
  padding: 24px;
  color: #10213f;
  position: relative;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-alarm-card h3 {
  margin: 0 0 18px;
  font-size: 24px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-alarm-card label {
  display: block;
  margin: 14px 0 8px;
  font-weight: 800;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-alarm-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-alarm-card input,
body.screen-shell-builder.screen-builder-fullscreen .fs-alarm-card select {
  width: 100%;
  height: 46px;
  border: 1px solid rgba(148,163,184,.45);
  border-radius: 14px;
  padding: 0 14px;
  font: inherit;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-alarm-close {
  position: absolute;
  right: 16px;
  top: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: #eef2f7;
  font-size: 24px;
  cursor: pointer;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-alarm-save {
  margin-top: 18px;
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #2563eb, #14b8a6);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}


/* M6.8: text focus, simpler timer, alarm row, clock fit */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text {
  user-select: text;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text-content {
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-timer-simple {
  grid-template-columns: 64px minmax(0, 1fr) 50px;
  gap: 10px;
  padding: 0 18px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-timer-simple .fs-timer-main {
  display: grid;
  grid-template-rows: 1fr;
  align-items: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-timer-simple .fs-timer-main strong {
  font-size: clamp(28px, 13cqw, 78px);
  line-height: 1;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-timer-simple .fs-timer-actions {
  width: 50px;
  min-width: 50px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-timer-simple .fs-timer-play,
body.screen-shell-builder.screen-builder-fullscreen .fs-timer-simple .fs-timer-reset {
  width: 38px;
  height: 38px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-compact .fs-timer-simple,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-tiny .fs-timer-simple {
  grid-template-columns: minmax(0, 1fr) 38px;
  padding: 0 8px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-compact .fs-timer-simple .fs-timer-main strong,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-tiny .fs-timer-simple .fs-timer-main strong {
  font-size: clamp(16px, 22cqw, 34px);
  text-align: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer.is-tiny .fs-timer-simple .fs-timer-reset {
  display: none !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-time-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-time-input-row span {
  font-weight: 800;
  color: #475569;
  white-space: nowrap;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-clock .fs-clock-digital-only {
  font-size: clamp(15px, 12cqw, 64px);
  max-width: 100%;
  padding: 0 8px;
  box-sizing: border-box;
  overflow: visible;
  white-space: nowrap;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-alarm-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-alarm-row span {
  white-space: nowrap;
  font-weight: 800;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-alarm-sound-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  gap: 10px;
  align-items: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-alarm-sound-row button {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: #eef2ff;
  color: #2563eb;
  font-weight: 900;
  cursor: pointer;
}


/* M6.9: simpler clock, safer minimum sizes, clearer timer/audio */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-clock {
  min-width: 118px;
  min-height: clamp(38px, 6.2vh, 52px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer {
  min-width: 148px;
  min-height: 58px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-clock .fs-clock-face,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-clock .fs-clock-digital {
  display: none !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-clock .fs-clock-digital-only {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 0 10px;
  box-sizing: border-box;
  overflow: visible;
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.035em;
  font-size: clamp(18px, 10cqw, 62px);
  line-height: 1;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer .fs-timer-simple {
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
  padding: 0 12px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer .fs-timer-progress {
  display: none !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer .fs-timer-main strong {
  width: 100%;
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-size: clamp(22px, 18cqw, 54px);
  letter-spacing: -0.02em;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer .fs-timer-actions {
  width: 42px;
  min-width: 42px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer .fs-timer-play {
  width: 36px;
  height: 36px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-timer .fs-timer-reset {
  display: none !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-alarm-card {
  padding: 26px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-alarm-sound-row button {
  box-shadow: 0 10px 24px rgba(37,99,235,.12);
}


/* M7 background system */
body.screen-shell-builder.screen-builder-fullscreen .fs-dock.is-background-mode #currentScreenBlock {
  display: block;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-bg-section-label {
  margin-top: 18px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-file-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  border: 1px dashed rgba(100,116,139,.42);
  border-radius: 16px;
  color: #334155;
  background: #f8fafc;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-bg-image-preview {
  display: grid;
  place-items: center;
  min-height: 112px;
  margin-top: 10px;
  border: 1px solid rgba(148,163,184,.28);
  border-radius: 18px;
  color: #64748b;
  font-weight: 850;
  background: linear-gradient(45deg, rgba(226,232,240,.55) 25%, transparent 25%),
              linear-gradient(-45deg, rgba(226,232,240,.55) 25%, transparent 25%),
              linear-gradient(45deg, transparent 75%, rgba(226,232,240,.55) 75%),
              linear-gradient(-45deg, transparent 75%, rgba(226,232,240,.55) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  overflow: hidden;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-bg-image-preview.has-image {
  min-height: 132px;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0,0,0,.45);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-bg-image-preview span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15,23,42,.42);
  backdrop-filter: blur(10px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-bg-action-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-bg-action-row .fs-secondary-action {
  width: 100%;
  justify-content: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-bg-preset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-bg-preset {
  position: relative;
  min-height: 76px;
  border: 1px solid rgba(148,163,184,.36);
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  background-size: cover;
  background-position: center center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.55);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-bg-preset.is-active {
  outline: 3px solid #6366f1;
  outline-offset: 2px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-bg-preset span {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(15,23,42,.46);
  backdrop-filter: blur(12px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-preview {
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}


/* M7.1 background UI cleanup */
body.screen-shell-builder.screen-builder-fullscreen .fs-color-row-simple {
  display: block;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-color-row-simple input[type="color"] {
  width: 48px;
  height: 44px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-bg-upload-tile {
  display: grid;
  place-items: center;
  width: 118px;
  height: 74px;
  margin: 8px 0 12px;
  border-radius: 16px;
  border: 1px dashed rgba(148,163,184,.42);
  background: rgba(248,250,252,.82);
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-bg-upload-tile:hover {
  transform: translateY(-1px);
  border-color: rgba(99,102,241,.70);
  background: #ffffff;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-bg-upload-tile span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 30px;
  line-height: 1;
  font-weight: 900;
  background: linear-gradient(135deg, #2563eb, #14b8a6);
  box-shadow: 0 14px 30px rgba(37,99,235,.28);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-bg-image-preview {
  min-height: 76px;
  margin-top: 8px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-bg-image-preview:not(.has-image) {
  display: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-bg-preset {
  min-height: 78px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-bg-preset span {
  display: none !important;
}


/* M7.2: simplify background panel */
body.screen-shell-builder.screen-builder-fullscreen .fs-color-row-simple {
  display: flex;
  align-items: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-color-row-simple input[type="color"] {
  width: 48px;
  height: 44px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-background-row > .fs-bg-image-preview:not(.has-image) {
  display: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-background-row > .fs-bg-image-preview.has-image {
  display: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-bg-preset span {
  display: none !important;
}

/* M7.2: less intrusive page tray */
body.screen-shell-builder.screen-builder-fullscreen .fs-bottom-right {
  right: 16px;
  bottom: 14px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-tray {
  gap: 5px;
  padding: 5px;
  border-radius: 999px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-btn {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  font-size: 20px !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-center {
  width: 42px !important;
  min-width: 42px !important;
  height: 34px !important;
  padding: 0 !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-center strong {
  display: none !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-icon {
  margin: 0 !important;
  font-size: 15px;
}

/* M7.2: collapsible widget toolbar */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-dock {
  gap: 7px;
  padding: 7px;
  border-radius: 22px;
  transition: width .18s ease, padding .18s ease, opacity .18s ease, transform .18s ease;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-dock-toggle {
  min-width: 48px !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-dock-toggle span {
  font-size: 18px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-dock-toggle strong {
  font-size: 11px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-dock.is-collapsed {
  padding: 5px;
  border-radius: 18px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-dock.is-collapsed .fs-widget-tool:not(.fs-widget-dock-toggle) {
  display: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-dock.is-collapsed .fs-widget-dock-toggle {
  min-width: 48px !important;
  min-height: 42px !important;
  border-radius: 14px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-dock.is-collapsed .fs-widget-dock-toggle strong {
  display: none;
}


/* M8 Image Widget */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-image {
  background: transparent !important;
  overflow: visible;
  box-shadow: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-image-frame {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 18px 45px rgba(15,23,42,.18);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-image-frame.has-no-shadow {
  box-shadow: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-image-content {
  display: block;
  width: 100%;
  height: 100%;
  user-select: none;
  object-position: center center;
  background: transparent;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-image-empty {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #64748b;
  font-weight: 900;
  background: rgba(255,255,255,.82);
  border: 1px dashed rgba(148,163,184,.5);
  border-radius: 12px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-image-widget-preview {
  display: grid;
  place-items: center;
  min-height: 128px;
  margin-bottom: 12px;
  border: 1px solid rgba(148,163,184,.28);
  border-radius: 18px;
  overflow: hidden;
  background: #f8fafc;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-image-widget-preview img {
  display: block;
  width: 100%;
  max-height: 190px;
  object-fit: contain;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-image-widget-preview span {
  color: #64748b;
  font-weight: 850;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-weight: 800;
  color: #334155;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-switch-row {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  white-space: nowrap;
  font-weight: 800;
  color: #334155;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-switch {
  position: relative;
  display: inline-flex;
  width: 52px;
  height: 30px;
  flex: 0 0 auto;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-switch i {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: #dbe2ee;
  transition: background .18s ease;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-switch i::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(15,23,42,.18);
  transition: transform .18s ease;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-switch input:checked + i {
  background: linear-gradient(135deg, #4f7cff, #2ac7b7);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-switch input:checked + i::after {
  transform: translateX(22px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-tool[data-widget-tool="image"] span {
  font-size: 24px;
}


/* M8.3: make widget three-dot menu readable and stable */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-toolbar .fs-widget-more-menu {
  z-index: 90 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 5px !important;
  width: 218px !important;
  min-width: 218px !important;
  padding: 9px !important;
  border-radius: 14px !important;
  color: #0f172a !important;
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(18px) !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-toolbar .fs-widget-more-menu button {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 100% !important;
  height: auto !important;
  min-height: 36px !important;
  padding: 0 12px !important;
  border-radius: 10px !important;
  color: #0f172a !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  text-align: left !important;
  writing-mode: horizontal-tb !important;
  background: transparent !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-toolbar .fs-widget-more-menu button:hover {
  background: #eef4ff !important;
}

/* M8.3: avoid white side blocks for contain-mode image widgets */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-image-frame {
  background: transparent !important;
}


/* M8.4: Spotlight overlay and calmer widget selection */
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 56px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-card {
  position: relative;
  display: grid;
  place-items: center;
  width: min(74vw, 980px);
  min-height: min(64vh, 620px);
  max-height: 76vh;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-content {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 360px;
  color: var(--widget-text, #10213f);
  border-radius: 18px;
  background: var(--widget-bg, rgba(255,255,255,.96));
  box-shadow: 0 28px 90px rgba(0,0,0,.35);
  overflow: hidden;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-image {
  background: transparent;
  box-shadow: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-image .fs-widget-image-frame {
  width: 100%;
  height: 100%;
  min-height: 360px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-text {
  padding: 56px;
  white-space: pre-wrap;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-timer strong,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-clock strong {
  display: block;
  padding: 64px 96px;
  font-size: clamp(64px, 10vw, 150px);
  line-height: 1;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-close {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10001;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.66);
  box-shadow: 0 12px 30px rgba(0,0,0,.22);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget.is-selected .fs-widget-toolbar {
  z-index: 120;
}


/* M8.5 Spotlight polish: keep spotlight fully visible inside the viewport */
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-layer {
  overflow: hidden;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-card {
  max-width: min(88vw, 1180px);
  max-height: min(82vh, 760px);
  width: auto;
  height: auto;
  display: grid;
  place-items: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-card .fs-widget {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  transform: none !important;
  max-width: min(84vw, 1120px);
  max-height: min(76vh, 700px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-card .fs-widget-image {
  width: auto !important;
  height: auto !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-card .fs-widget-image-frame {
  width: auto;
  height: auto;
  max-width: min(84vw, 1120px);
  max-height: min(76vh, 700px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-card .fs-widget-image-content {
  width: auto;
  height: auto;
  max-width: min(84vw, 1120px);
  max-height: min(76vh, 700px);
  object-fit: contain !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-card .fs-widget-text,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-card .fs-widget-timer,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-card .fs-widget-clock {
  width: min(84vw, 980px) !important;
  max-height: min(76vh, 700px);
}


/* M9.1: widget operation polish */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget.is-locked {
  cursor: default;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-toolbar.is-locked-toolbar {
  border: 1px solid rgba(100,116,139,.14);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-toolbar.is-locked-toolbar .fs-toolbar-drag {
  color: #64748b;
  background: #f8fafc;
  cursor: default;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-toolbar .fs-widget-more-menu button[data-action="showall"] {
  color: #1d4ed8 !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-toolbar .fs-widget-more-menu button[data-action="lock"] {
  color: #475569 !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-toolbar .fs-widget-more-menu button[data-action="front"],
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-toolbar .fs-widget-more-menu button[data-action="back"] {
  color: #0f766e !important;
}


/* M10: Randomizer Widget */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-tool[data-widget-tool="randomizer"] span {
  font-size: 22px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-randomizer {
  padding: 14px;
  overflow: visible;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-randomizer-widget {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  color: var(--widget-text, #10213f);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-randomizer-widget small {
  color: color-mix(in srgb, var(--widget-text, #10213f) 62%, transparent);
  font-size: clamp(11px, 1.6cqw, 15px);
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-randomizer-widget strong {
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 4px 10px;
  color: var(--widget-text, #10213f);
  font-size: clamp(22px, 10cqw, 72px);
  font-weight: 950;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-randomizer-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-randomizer-footer span {
  padding: 6px 9px;
  border-radius: 999px;
  color: color-mix(in srgb, var(--widget-text, #10213f) 78%, transparent);
  font-size: 12px;
  font-weight: 900;
  background: rgba(255,255,255,.48);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-randomizer-roll {
  min-width: 74px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--widget-accent, #6366f1), #21b7c7);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--widget-accent, #6366f1) 32%, transparent);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-randomizer.is-compact .fs-randomizer-widget {
  gap: 4px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-randomizer.is-compact .fs-randomizer-widget small,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-randomizer.is-tiny .fs-randomizer-footer span {
  display: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-randomizer.is-tiny .fs-randomizer-footer {
  display: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-randomizer-items-input {
  min-height: 180px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-help-text {
  margin: 8px 0 12px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}


body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-randomizer {
  width: min(84vw, 980px);
  min-height: 260px;
  display: grid;
  place-items: center;
  gap: 16px;
  padding: 48px;
  box-sizing: border-box;
  border-radius: 28px;
  color: var(--widget-text, #10213f);
  background: var(--widget-bg, #fff);
  box-shadow: 0 24px 70px rgba(15,23,42,.22);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-randomizer small {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--widget-text, #10213f) 62%, transparent);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-randomizer strong {
  font-size: clamp(46px, 7vw, 108px);
  font-weight: 950;
  line-height: 1.08;
  text-align: center;
}


/* M10.1 Randomizer experience upgrade */
body.screen-shell-builder.screen-builder-fullscreen .fs-randomizer-widget {
  grid-template-rows: minmax(0, 1fr) auto;
  justify-items: center;
  gap: 12px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-randomizer-widget small {
  align-self: end;
  margin-bottom: -2px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-randomizer-widget strong {
  width: 100%;
  align-self: center;
  padding: 2px 10px;
  text-align: center;
  transition: transform .16s ease, filter .16s ease, opacity .16s ease;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-randomizer-widget strong.is-rolling {
  transform: scale(1.035);
  filter: blur(.25px);
  opacity: .86;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-randomizer-footer {
  width: 100%;
  justify-content: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-randomizer-footer span {
  display: none !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-randomizer-roll {
  min-width: 88px;
  height: 40px;
  padding: 0 18px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-randomizer-roll:disabled {
  opacity: .86;
  cursor: wait;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-randomizer.is-compact .fs-randomizer-widget {
  grid-template-rows: 1fr;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-randomizer.is-compact .fs-randomizer-roll,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-randomizer.is-tiny .fs-randomizer-roll {
  display: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-randomizer .fs-randomizer-widget {
  width: min(84vw, 980px);
  min-height: 260px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  place-items: center;
  gap: 24px;
  padding: 48px;
  box-sizing: border-box;
  border-radius: 28px;
  color: var(--widget-text, #10213f);
  background: var(--widget-bg, #fff);
  box-shadow: 0 24px 70px rgba(15,23,42,.22);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-randomizer .fs-randomizer-widget strong {
  font-size: clamp(46px, 7vw, 108px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-randomizer .fs-randomizer-roll {
  height: 48px;
  min-width: 118px;
  font-size: 16px;
}


/* M10.2 Randomizer sound + spotlight polish */
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-content.fs-spotlight-randomizer {
  overflow: visible;
  background: transparent;
  box-shadow: none;
  width: min(78vw, 980px);
  max-width: calc(100vw - 144px);
  min-height: 0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-content.fs-spotlight-randomizer .fs-randomizer-widget {
  width: 100%;
  max-width: 100%;
  min-height: clamp(220px, 32vh, 340px);
  overflow: visible;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-content.fs-spotlight-randomizer .fs-randomizer-widget strong {
  max-width: 100%;
  overflow-wrap: anywhere;
}


/* M11 Work Symbols widget */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-work-symbol {
  padding: 10px;
  color: var(--widget-text, #10213f);
  background: var(--widget-bg, #fff) !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-work-symbol-widget {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  place-items: center;
  gap: 10px;
  width: 100%;
  height: 100%;
  min-height: 0;
  color: var(--widget-text, #10213f);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-work-symbol-main {
  display: grid;
  place-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-work-symbol-circle {
  display: grid;
  place-items: center;
  width: min(62cqw, 140px);
  height: min(62cqw, 140px);
  min-width: 72px;
  min-height: 72px;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.72), 0 14px 32px rgba(15,23,42,.12);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-work-symbol-circle span {
  font-size: clamp(38px, 11cqw, 82px);
  line-height: 1;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-work-symbol-main strong {
  font-size: clamp(18px, 4.8cqw, 34px);
  font-weight: 950;
  line-height: 1.1;
  text-align: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-work-symbol-options {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  width: 100%;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-work-symbol-option {
  display: grid;
  place-items: center;
  width: clamp(32px, 8cqw, 48px);
  height: clamp(32px, 8cqw, 48px);
  padding: 0;
  border: 2px solid rgba(255,255,255,.9);
  border-radius: 999px;
  color: var(--widget-text, #10213f);
  background: rgba(255,255,255,.9);
  box-shadow: 0 8px 20px rgba(15,23,42,.12);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-work-symbol-option span {
  font-size: clamp(18px, 4.5cqw, 28px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-work-symbol-option.is-active {
  border-color: var(--widget-accent, #6366f1);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--widget-accent, #6366f1) 20%, transparent), 0 8px 20px rgba(15,23,42,.12);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-work-symbol.is-compact .fs-work-symbol-circle {
  width: 72px;
  height: 72px;
  min-width: 56px;
  min-height: 56px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-work-symbol.is-compact .fs-work-symbol-options,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-work-symbol.is-tiny .fs-work-symbol-options {
  display: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-work-symbol.is-tiny .fs-work-symbol-circle {
  display: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-work-symbol-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
  margin-bottom: 14px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-work-symbol-setting {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 92px;
  padding: 12px 8px;
  border: 1px solid rgba(148,163,184,.32);
  border-radius: 16px;
  color: #10213f;
  background: #fff;
  cursor: pointer;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-work-symbol-setting span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  font-size: 26px;
  background: #f8fafc;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-work-symbol-setting strong {
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-work-symbol-setting.is-active {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99,102,241,.18);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-work-symbol .fs-work-symbol-widget {
  width: min(78vw, 760px);
  min-height: min(72vh, 560px);
  padding: clamp(28px, 5vw, 54px);
  box-sizing: border-box;
  border-radius: 30px;
  background: var(--widget-bg, #fff);
  box-shadow: 0 24px 70px rgba(15,23,42,.22);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-work-symbol .fs-work-symbol-circle {
  width: clamp(150px, 24vw, 260px);
  height: clamp(150px, 24vw, 260px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-work-symbol .fs-work-symbol-circle span {
  font-size: clamp(72px, 11vw, 140px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-work-symbol .fs-work-symbol-main strong {
  font-size: clamp(32px, 5vw, 64px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-work-symbol .fs-work-symbol-option {
  width: 58px;
  height: 58px;
}


/* M11.1 Work Symbols spotlight cursor */
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-work-symbol .fs-work-symbol-option {
  cursor: pointer;
}


/* M12.1 toolbar width fix: keep all widget buttons inside the bottom bar */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-dock {
  width: max-content;
  max-width: calc(100vw - 160px);
  overflow: visible;
  padding-right: 10px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-dock.is-collapsed {
  width: auto;
  max-width: max-content;
  padding-right: 6px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-dock-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  overflow: visible;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-dock-action,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-dock-collapse {
  flex: 0 0 auto;
}

@media (max-width: 980px) {
  body.screen-shell-builder.screen-builder-fullscreen .fs-widget-dock {
    max-width: calc(100vw - 48px);
  }

  body.screen-shell-builder.screen-builder-fullscreen .fs-widget-dock-actions {
    gap: 6px;
  }
}


/* M13 Calendar widget */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar {
  container-type: size;
  background: var(--widget-bg);
  color: var(--widget-text);
  border-radius: 18px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .12);
  overflow: visible;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-widget {
  width: 100%;
  height: 100%;
  padding: 14px;
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-items: center;
  justify-items: center;
  gap: 8px;
  user-select: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-nav {
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
  color: var(--widget-accent);
  font-weight: 900;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-nav strong {
  text-align: center;
  font-size: clamp(14px, 6cqw, 22px);
  letter-spacing: .03em;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-nav-btn {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 0;
  background: color-mix(in srgb, var(--widget-accent) 14%, white);
  color: var(--widget-accent);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-main {
  display: grid;
  place-items: center;
  gap: 2px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-day {
  font-size: clamp(44px, 24cqw, 118px);
  line-height: .9;
  font-weight: 950;
  letter-spacing: -.06em;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-weekday {
  font-size: clamp(14px, 7cqw, 28px);
  font-weight: 900;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-year {
  font-size: clamp(11px, 4cqw, 16px);
  font-weight: 800;
  opacity: .56;
  letter-spacing: .08em;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-today {
  border: 0;
  border-radius: 999px;
  padding: 7px 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--widget-accent), #22b8c7);
  font-size: clamp(12px, 5cqw, 16px);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--widget-accent) 24%, transparent);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-compact .fs-calendar-widget {
  padding: 10px;
  gap: 4px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-compact .fs-calendar-nav {
  grid-template-columns: 28px minmax(0, 1fr) 28px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-compact .fs-calendar-nav-btn {
  width: 26px;
  height: 26px;
  font-size: 18px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-compact .fs-calendar-day {
  font-size: clamp(32px, 22cqw, 72px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-compact .fs-calendar-today {
  display: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-tiny .fs-calendar-nav,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-tiny .fs-calendar-year,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-tiny .fs-calendar-today {
  display: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-tiny .fs-calendar-widget {
  display: grid;
  place-items: center;
  padding: 8px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-tiny .fs-calendar-main {
  gap: 0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-tiny .fs-calendar-day {
  font-size: clamp(28px, 28cqw, 56px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-tiny .fs-calendar-weekday {
  font-size: 12px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-setting-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-setting-row .fs-secondary-action {
  min-height: 42px;
  padding: 8px 10px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-calendar {
  min-width: min(720px, 78vw);
  min-height: min(420px, 58vh);
}


/* M13.1 Adaptive Calendar widget */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar,
body.screen-shell-present .present-widget-calendar {
  overflow: visible;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar > .fs-widget-content,
body.screen-shell-present .present-widget-calendar {
  border-radius: 18px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-widget,
body.screen-shell-present .present-calendar {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: clamp(10px, 4cqw, 22px);
  display: grid;
  place-items: center;
  overflow: hidden;
  user-select: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-day-card,
body.screen-shell-present .present-calendar-day-card {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  place-items: center;
  gap: clamp(2px, 1.8cqw, 10px);
  text-align: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-day-eyebrow,
body.screen-shell-present .present-calendar-day-eyebrow {
  color: var(--widget-accent);
  font-size: clamp(12px, 4.4cqw, 22px);
  font-weight: 900;
  letter-spacing: .04em;
  line-height: 1;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-day-number,
body.screen-shell-present .present-calendar-day-number {
  color: var(--widget-text);
  font-size: clamp(44px, 28cqw, 132px);
  line-height: .78;
  font-weight: 950;
  letter-spacing: -.06em;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-day-meta,
body.screen-shell-present .present-calendar-day-meta {
  color: var(--widget-text);
  opacity: .62;
  font-size: clamp(11px, 3.6cqw, 18px);
  font-weight: 850;
  letter-spacing: .06em;
  line-height: 1;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-holiday-pill,
body.screen-shell-present .present-calendar-holiday-pill {
  display: inline-grid;
  place-items: center;
  min-height: 22px;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, #ef4444 12%, white);
  color: #dc2626;
  font-size: clamp(10px, 3cqw, 14px);
  font-weight: 900;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-month-view,
body.screen-shell-present .present-calendar-month-view {
  display: none;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: clamp(8px, 2.4cqw, 14px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-month .fs-calendar-day-card,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-calendar.is-month .fs-calendar-day-card,
body.screen-shell-present .present-widget-calendar.is-month .present-calendar-day-card {
  display: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-month .fs-calendar-month-view,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-calendar.is-month .fs-calendar-month-view,
body.screen-shell-present .present-widget-calendar.is-month .present-calendar-month-view {
  display: grid;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-month-head,
body.screen-shell-present .present-calendar-month-head {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 10px;
  color: var(--widget-text);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-month-head strong,
body.screen-shell-present .present-calendar-month-head strong {
  text-align: center;
  font-size: clamp(15px, 3.8cqw, 26px);
  font-weight: 950;
  letter-spacing: .02em;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-month-btn,
body.screen-shell-present .present-calendar-month-btn {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--widget-accent) 12%, white);
  color: var(--widget-accent);
  font-size: 24px;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-week-row,
body.screen-shell-present .present-calendar-week-row,
body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-grid,
body.screen-shell-present .present-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-week-row,
body.screen-shell-present .present-calendar-week-row {
  color: var(--widget-text);
  opacity: .52;
  font-size: clamp(10px, 2.1cqw, 13px);
  font-weight: 900;
  text-align: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-grid,
body.screen-shell-present .present-calendar-grid {
  height: 100%;
  min-height: 0;
  border: 1px solid color-mix(in srgb, var(--widget-text) 15%, transparent);
  border-radius: 10px;
  overflow: hidden;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-cell,
body.screen-shell-present .present-calendar-cell {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-right: 1px solid color-mix(in srgb, var(--widget-text) 12%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--widget-text) 12%, transparent);
  background: transparent;
  color: var(--widget-text);
  font-size: clamp(11px, 2.5cqw, 17px);
  font-weight: 850;
  cursor: pointer;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-cell:nth-child(7n),
body.screen-shell-present .present-calendar-cell:nth-child(7n) {
  border-right: 0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-cell:nth-last-child(-n + 7),
body.screen-shell-present .present-calendar-cell:nth-last-child(-n + 7) {
  border-bottom: 0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-cell.is-muted,
body.screen-shell-present .present-calendar-cell.is-muted {
  opacity: .28;
  background: color-mix(in srgb, var(--widget-text) 3%, transparent);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-cell.is-today span,
body.screen-shell-present .present-calendar-cell.is-today span {
  display: inline-grid;
  place-items: center;
  min-width: 1.8em;
  height: 1.8em;
  border-radius: 999px;
  background: color-mix(in srgb, var(--widget-accent) 18%, white);
  color: var(--widget-accent);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-cell.is-selected-day,
body.screen-shell-present .present-calendar-cell.is-selected-day {
  background: color-mix(in srgb, var(--widget-accent) 16%, transparent);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-cell.is-selected-day span,
body.screen-shell-present .present-calendar-cell.is-selected-day span {
  color: var(--widget-accent);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-cell i,
body.screen-shell-present .present-calendar-cell i {
  position: absolute;
  right: 4px;
  top: 4px;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
  line-height: 1;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-compact .fs-calendar-widget,
body.screen-shell-present .present-widget-calendar.is-compact .present-calendar {
  padding: clamp(8px, 3cqw, 14px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-compact .fs-calendar-day-number,
body.screen-shell-present .present-widget-calendar.is-compact .present-calendar-day-number {
  font-size: clamp(34px, 28cqw, 72px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-tiny .fs-calendar-day-eyebrow,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-tiny .fs-calendar-day-meta,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-tiny .fs-calendar-holiday-pill,
body.screen-shell-present .present-widget-calendar.is-tiny .present-calendar-day-eyebrow,
body.screen-shell-present .present-widget-calendar.is-tiny .present-calendar-day-meta,
body.screen-shell-present .present-widget-calendar.is-tiny .present-calendar-holiday-pill {
  display: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-tiny .fs-calendar-day-card,
body.screen-shell-present .present-widget-calendar.is-tiny .present-calendar-day-card {
  display: grid;
  place-items: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-tiny .fs-calendar-day-number,
body.screen-shell-present .present-widget-calendar.is-tiny .present-calendar-day-number {
  font-size: clamp(28px, 32cqw, 58px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-calendar {
  width: min(900px, 80vw);
  height: min(560px, 70vh);
  min-width: min(760px, 80vw);
  min-height: min(460px, 70vh);
}


/* M13.2 Calendar visual + adaptive polish */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar > .fs-widget-content,
body.screen-shell-present .present-widget-calendar {
  overflow: hidden;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-widget,
body.screen-shell-present .present-calendar {
  padding: clamp(12px, 3.4cqw, 26px);
  align-items: stretch;
  justify-items: stretch;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-day-card,
body.screen-shell-present .present-calendar-day-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(5px, 1.6cqw, 12px);
  min-width: 0;
  min-height: 0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-day-eyebrow,
body.screen-shell-present .present-calendar-day-eyebrow {
  font-size: clamp(13px, 4cqw, 24px);
  letter-spacing: .02em;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-day-number,
body.screen-shell-present .present-calendar-day-number {
  line-height: .86;
  letter-spacing: -.045em;
  font-size: clamp(46px, 27cqw, 128px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-day-meta,
body.screen-shell-present .present-calendar-day-meta {
  font-size: clamp(12px, 3.4cqw, 19px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-compact .fs-calendar-day-card,
body.screen-shell-present .present-widget-calendar.is-compact .present-calendar-day-card {
  gap: clamp(3px, 1cqw, 7px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-compact .fs-calendar-day-number,
body.screen-shell-present .present-widget-calendar.is-compact .present-calendar-day-number {
  font-size: clamp(38px, 25cqw, 82px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-tiny .fs-calendar-widget,
body.screen-shell-present .present-widget-calendar.is-tiny .present-calendar {
  display: grid;
  place-items: center;
  padding: 8px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-tiny .fs-calendar-day-card,
body.screen-shell-present .present-widget-calendar.is-tiny .present-calendar-day-card {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-tiny .fs-calendar-day-number,
body.screen-shell-present .present-widget-calendar.is-tiny .present-calendar-day-number {
  font-size: clamp(30px, 24cqh, 62px);
  line-height: 1;
  transform: translateY(-1px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-month-view,
body.screen-shell-present .present-calendar-month-view {
  width: 100%;
  height: 100%;
  align-self: stretch;
  justify-self: stretch;
  grid-template-rows: auto minmax(24px, auto) minmax(0, 1fr);
  gap: clamp(8px, 1.6cqh, 16px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-month-head,
body.screen-shell-present .present-calendar-month-head {
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  min-height: 38px;
  align-items: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-month-head strong,
body.screen-shell-present .present-calendar-month-head strong {
  font-size: clamp(18px, 4.4cqw, 32px);
  line-height: 1.05;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-month-btn,
body.screen-shell-present .present-calendar-month-btn {
  width: clamp(30px, 5cqw, 42px);
  height: clamp(30px, 5cqw, 42px);
  font-size: clamp(20px, 3.8cqw, 30px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-week-row,
body.screen-shell-present .present-calendar-week-row {
  min-height: clamp(22px, 4cqh, 34px);
  align-items: center;
  font-size: clamp(11px, 2cqw, 15px);
  letter-spacing: .04em;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-week-row span,
body.screen-shell-present .present-calendar-week-row span {
  display: grid;
  place-items: center;
  min-height: inherit;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-grid,
body.screen-shell-present .present-calendar-grid {
  height: 100%;
  min-height: clamp(190px, 42cqh, 420px);
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: repeat(6, minmax(34px, 1fr));
  border-radius: 12px;
  align-self: stretch;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-cell,
body.screen-shell-present .present-calendar-cell {
  min-height: 34px;
  font-size: clamp(12px, 2.4cqw, 20px);
  line-height: 1;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-cell span,
body.screen-shell-present .present-calendar-cell span {
  transform: translateY(1px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-calendar-cell i,
body.screen-shell-present .present-calendar-cell i {
  right: clamp(3px, .8cqw, 7px);
  top: clamp(3px, .8cqw, 7px);
  width: clamp(14px, 2.8cqw, 18px);
  height: clamp(14px, 2.8cqw, 18px);
  font-size: clamp(9px, 1.6cqw, 11px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-calendar {
  width: min(900px, 78vw);
  height: min(610px, 72vh);
  min-width: min(760px, 78vw);
  min-height: min(500px, 72vh);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-calendar .fs-calendar-widget {
  padding: clamp(26px, 3vw, 42px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-calendar .fs-calendar-grid {
  min-height: clamp(300px, 44vh, 430px);
}


/* M13.4 Calendar fit polish
   Month view keeps full width and vertically centres, but the grid now caps itself
   against the real available height so the last row is not clipped.
   Day-card minimum is narrower, closer to ClassroomScreen's compact card. */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar {
  min-width: 150px;
  min-height: 118px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar:not(.is-month) .fs-calendar-widget {
  display: flex;
  align-items: center;
  justify-content: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar:not(.is-month) .fs-calendar-day-card {
  width: 100%;
  height: auto;
  flex: 0 0 auto;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-month .fs-calendar-widget,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-calendar.is-month .fs-calendar-widget {
  display: flex;
  align-items: center;
  justify-content: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-month .fs-calendar-month-view,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-calendar.is-month .fs-calendar-month-view {
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(6px, 1.2vh, 14px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-month .fs-calendar-month-head,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-month .fs-calendar-week-row,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-month .fs-calendar-grid,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-calendar.is-month .fs-calendar-month-head,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-calendar.is-month .fs-calendar-week-row,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-calendar.is-month .fs-calendar-grid {
  width: 100%;
  max-width: 100%;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-month .fs-calendar-month-head,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-calendar.is-month .fs-calendar-month-head {
  flex: 0 0 auto;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-month .fs-calendar-week-row,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-calendar.is-month .fs-calendar-week-row {
  flex: 0 0 auto;
  min-height: clamp(18px, 3vh, 30px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-month .fs-calendar-grid,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-calendar.is-month .fs-calendar-grid {
  height: min(300px, max(132px, calc(100% - 126px)));
  min-height: 0;
  flex: 0 1 auto;
  align-self: auto;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-calendar.is-month .fs-calendar-grid {
  height: min(410px, max(280px, calc(100% - 142px)));
}

/* Safety net: if an old saved widget is still marked tiny, keep all core info visible. */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-tiny .fs-calendar-day-eyebrow,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-tiny .fs-calendar-day-meta,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-tiny .fs-calendar-holiday-pill {
  display: block;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-tiny .fs-calendar-widget {
  padding: 8px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-tiny .fs-calendar-day-card {
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-tiny .fs-calendar-day-eyebrow {
  font-size: clamp(10px, 3.2cqw, 14px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-tiny .fs-calendar-day-number {
  font-size: clamp(28px, 18cqh, 54px);
  line-height: .92;
  transform: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-tiny .fs-calendar-day-meta {
  font-size: clamp(9px, 2.8cqw, 13px);
  line-height: 1.05;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-calendar.is-tiny .fs-calendar-holiday-pill {
  font-size: clamp(9px, 2.5cqw, 12px);
  min-height: 18px;
  padding: 2px 8px;
}


/* M14.1 Noise Level widget polish */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-noise {
  min-width: 150px;
  min-height: 108px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-noise-widget {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: clamp(9px, 2.2cqw, 18px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(5px, 1.35cqh, 10px);
  color: var(--widget-text);
  overflow: hidden;
  user-select: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-noise-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: clamp(12px, 2.5cqw, 18px);
  font-weight: 950;
  line-height: 1.05;
  min-height: 18px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-noise-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-noise-value {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  line-height: .86;
  flex: 0 0 auto;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-noise-value strong {
  font-size: clamp(36px, min(15cqw, 32cqh), 92px);
  letter-spacing: -.055em;
  font-weight: 950;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-noise-value span {
  font-size: clamp(12px, min(3.5cqw, 8cqh), 22px);
  font-weight: 900;
  opacity: .65;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-noise-meter {
  position: relative;
  height: clamp(8px, 2.2cqh, 14px);
  border-radius: 999px;
  overflow: hidden;
  background: color-mix(in srgb, var(--widget-text) 10%, transparent);
  flex: 0 0 auto;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-noise-meter i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #f59e0b, #ef4444);
  transition: width .16s ease;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-noise-meter b {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 3px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--widget-text) 72%, transparent);
  opacity: .55;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-noise-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: clamp(10px, 2.05cqw, 13px);
  font-weight: 850;
  line-height: 1.05;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-noise-meta span:first-child {
  color: var(--widget-accent);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-noise-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(6px, 1.6cqw, 12px);
  max-width: min(100%, 260px);
  width: 100%;
  margin: 0 auto;
  flex: 0 0 auto;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-noise-icon-btn {
  width: clamp(34px, min(8cqw, 13cqh), 48px);
  height: clamp(34px, min(8cqw, 13cqh), 48px);
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--widget-text) 14%, transparent);
  display: inline-grid;
  place-items: center;
  color: var(--widget-text);
  background: color-mix(in srgb, var(--widget-bg) 78%, white);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
  font-size: clamp(15px, 3cqw, 22px);
  cursor: pointer;
  padding: 0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-noise-icon-btn:hover {
  background: color-mix(in srgb, var(--widget-accent) 10%, white);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-noise-count {
  color: var(--widget-accent);
  background: color-mix(in srgb, var(--widget-accent) 12%, white);
  grid-template-columns: auto auto;
  column-gap: 4px;
  min-width: clamp(44px, 11cqw, 62px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-noise-count b {
  font-size: clamp(12px, 2.6cqw, 18px);
  line-height: 1;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-noise-widget small {
  text-align: center;
  font-weight: 800;
  font-size: clamp(9px, 1.8cqw, 12px);
  line-height: 1.05;
  opacity: .55;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-noise-widget.is-counter-hidden .fs-noise-count {
  display: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-noise-widget.is-loud {
  animation: fsNoisePulse .5s ease-in-out infinite alternate;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-noise-widget.is-loud .fs-noise-meta span:first-child,
body.screen-shell-builder.screen-builder-fullscreen .fs-noise-widget.is-loud .fs-noise-value strong {
  color: #ef4444;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-noise.is-compact .fs-noise-widget,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-noise.is-tiny .fs-noise-widget {
  gap: 5px;
  padding: 8px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-noise.is-compact .fs-noise-head,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-noise.is-compact .fs-noise-widget small,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-noise.is-tiny .fs-noise-head,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-noise.is-tiny .fs-noise-meta,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-noise.is-tiny .fs-noise-controls,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-noise.is-tiny .fs-noise-widget small {
  display: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-noise.is-tiny .fs-noise-value strong {
  font-size: clamp(34px, min(18cqw, 42cqh), 72px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-noise-setting-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-noise-setting-row .fs-secondary-action {
  min-height: 42px;
  white-space: nowrap;
}

@keyframes fsNoisePulse {
  from { filter: none; }
  to { filter: drop-shadow(0 0 18px rgba(239,68,68,.35)); }
}


/* M14.3 Noise projection crop fix
   Earlier compact breakpoint was too late, so present/project mode could clip the top
   or bottom while the component was still using the full layout. */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-noise.is-compact .fs-noise-widget {
  padding: clamp(5px, 1.1cqh, 8px);
  gap: clamp(3px, .8cqh, 5px);
  justify-content: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-noise.is-compact .fs-noise-value {
  line-height: .82;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-noise.is-compact .fs-noise-value strong {
  font-size: clamp(34px, min(14cqw, 26cqh), 62px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-noise.is-compact .fs-noise-value span {
  font-size: clamp(11px, min(3cqw, 6cqh), 18px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-noise.is-compact .fs-noise-meter {
  height: clamp(6px, 1.6cqh, 10px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-noise.is-compact .fs-noise-meta {
  font-size: clamp(9px, 1.7cqw, 12px);
  line-height: 1;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-noise.is-compact .fs-noise-controls {
  max-width: min(100%, 220px);
  gap: clamp(4px, 1cqw, 8px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-noise.is-compact .fs-noise-icon-btn {
  width: clamp(28px, min(7cqw, 9.5cqh), 38px);
  height: clamp(28px, min(7cqw, 9.5cqh), 38px);
  font-size: clamp(13px, 2.5cqw, 18px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-noise.is-compact .fs-noise-count {
  min-width: clamp(38px, 10cqw, 52px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-noise.is-tiny .fs-noise-widget {
  padding: 6px;
  gap: 4px;
  justify-content: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-noise.is-tiny .fs-noise-value {
  line-height: .84;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-noise.is-tiny .fs-noise-value strong {
  font-size: clamp(30px, min(17cqw, 36cqh), 58px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-noise.is-tiny .fs-noise-meter {
  height: 7px;
}



/* M15.1 Scoreboard widget */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-scoreboard {
  overflow: visible;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-widget {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: clamp(12px, 2.4cqw, 24px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: clamp(8px, 1.5cqh, 14px);
  background: var(--widget-bg);
  color: var(--widget-text);
  border-radius: inherit;
  user-select: none;
  overflow: hidden;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: clamp(12px, 2cqw, 18px);
  font-weight: 950;
  flex: 0 0 auto;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-points {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: clamp(8px, 1.8cqw, 14px);
  align-content: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-team {
  min-width: 0;
  min-height: 0;
  padding: clamp(8px, 1.6cqw, 14px);
  border: 2px solid color-mix(in srgb, var(--team-accent) 72%, white);
  border-radius: 12px;
  background: color-mix(in srgb, var(--team-accent) 8%, white);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  place-items: center;
  gap: clamp(4px, 1cqh, 8px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-team-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--widget-text);
  font-weight: 950;
  font-size: clamp(12px, 2cqw, 17px);
  text-align: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-team-top span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-score {
  color: var(--team-accent);
  font-size: clamp(42px, 10cqw, 96px);
  line-height: .9;
  font-weight: 950;
  letter-spacing: -.06em;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-actions button,
body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-reset {
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  color: var(--widget-accent);
  font-weight: 950;
  box-shadow: 0 8px 20px rgba(15,23,42,.10);
  cursor: pointer;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-actions button {
  width: clamp(28px, 4.4cqw, 40px);
  height: clamp(28px, 4.4cqw, 40px);
  font-size: clamp(16px, 2.6cqw, 24px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-reset {
  align-self: center;
  min-height: 30px;
  padding: 0 16px;
  font-size: 13px;
  flex: 0 0 auto;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-homeaway {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(99,102,241,.12);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-home-side {
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  place-items: center;
  padding: clamp(8px, 1.8cqw, 16px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-digital {
  color: var(--team-accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(58px, 15cqw, 140px);
  line-height: .82;
  font-weight: 950;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-home-side > span {
  font-size: clamp(16px, 3cqw, 28px);
  font-weight: 950;
  letter-spacing: .03em;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-race {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(6px, 1cqh, 12px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-race-row {
  display: grid;
  grid-template-columns: minmax(64px, 1fr) minmax(90px, 3fr) auto;
  align-items: center;
  gap: clamp(8px, 1.5cqw, 14px);
  min-height: 0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-race-name strong {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: clamp(12px, 2cqw, 18px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-race-name span {
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-race-name button {
  border: 0;
  background: transparent;
  color: var(--widget-text);
  font-size: clamp(15px, 2.2cqw, 22px);
  cursor: pointer;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-track {
  position: relative;
  height: clamp(18px, 3cqh, 28px);
  border-radius: 999px;
  background: color-mix(in srgb, var(--team-accent) 10%, #e8eaf6);
  overflow: visible;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-track::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: var(--race-progress);
  height: 3px;
  transform: translateY(-50%);
  background: var(--team-accent);
  border-radius: 999px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-track i {
  position: absolute;
  left: var(--race-progress);
  top: 50%;
  transform: translate(-50%, -50%);
  font-style: normal;
  font-size: clamp(18px, 3cqw, 30px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-race-score {
  font-size: clamp(18px, 3cqw, 30px);
  min-width: 1.4em;
  text-align: right;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-scoreboard.is-compact .fs-scoreboard-widget,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-scoreboard.is-tiny .fs-scoreboard-widget {
  padding: 10px;
  gap: 7px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-scoreboard.is-compact .fs-scoreboard-head,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-scoreboard.is-tiny .fs-scoreboard-head,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-scoreboard.is-tiny .fs-scoreboard-reset {
  display: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-scoreboard.is-compact .fs-scoreboard-score {
  font-size: clamp(32px, 10cqw, 70px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-scoreboard.is-tiny .fs-scoreboard-actions,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-scoreboard.is-tiny .fs-scoreboard-race-name span {
  display: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-scoreboard.is-tiny .fs-scoreboard-score {
  font-size: clamp(28px, 12cqw, 56px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-mode-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-mode-card {
  border: 1px solid rgba(99,102,241,.24);
  border-radius: 12px;
  background: #fff;
  padding: 10px 6px;
  display: grid;
  gap: 5px;
  place-items: center;
  cursor: pointer;
  color: var(--widget-text);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-mode-card.is-active {
  border-color: var(--widget-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--widget-accent) 14%, transparent);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-mode-preview {
  width: 46px;
  height: 30px;
  border-radius: 8px;
  background: rgba(99,102,241,.10);
  position: relative;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-mode-preview::before,
body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-mode-preview::after {
  content: '';
  position: absolute;
  border-radius: 4px;
  background: var(--widget-accent);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-mode-preview::before { left: 7px; top: 7px; width: 12px; height: 16px; }
body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-mode-preview::after { right: 7px; top: 7px; width: 12px; height: 16px; }
body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-mode-preview.is-race::before { left: 5px; top: 14px; width: 36px; height: 3px; }
body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-mode-preview.is-race::after { right: 4px; top: 8px; width: 12px; height: 12px; border-radius: 999px; }
body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-mode-card strong { font-size: 12px; }
body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-mode-card small { font-size: 10px; opacity: .62; }

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-team-editor {
  display: grid;
  gap: 10px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-setting-card {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 42px 34px;
  gap: 8px;
  align-items: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-team-dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-score-color {
  width: 42px;
  height: 38px;
  border: 0;
  background: transparent;
  padding: 0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-score-remove-team {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: #fee2e2;
  color: #dc2626;
  font-size: 18px;
  cursor: pointer;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-score-increment-row,
body.screen-shell-builder.screen-builder-fullscreen .fs-score-sound-row,
body.screen-shell-builder.screen-builder-fullscreen .fs-score-goal-row {
  display: grid;
  gap: 10px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-score-increment-row {
  grid-template-columns: repeat(4, auto) minmax(72px, 1fr);
  align-items: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-score-increment-row label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 750;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-score-sound-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-score-goal-row {
  grid-template-columns: minmax(0, 1fr) 76px auto;
  align-items: center;
}

/* M15.2 Scoreboard layout polish
   Fixes: points button clipping, race row alignment, race maximum scaling,
   settings panel wrapping, and spotlight width. */
body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-widget {
  padding: clamp(10px, 2cqw, 20px);
  gap: clamp(6px, 1.1cqh, 12px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-points {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: center;
  align-items: stretch;
  gap: clamp(8px, 1.3cqw, 14px);
  overflow: visible;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-points.is-count-3,
body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-points.is-count-6 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-points.is-count-4,
body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-points.is-count-7,
body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-points.is-count-8 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-points.is-count-5 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-team {
  min-height: clamp(82px, 18cqh, 150px);
  padding: clamp(7px, 1.25cqw, 12px);
  grid-template-rows: auto minmax(32px, 1fr) auto;
  gap: clamp(3px, .7cqh, 6px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-score {
  font-size: clamp(34px, min(8cqw, 18cqh), 76px);
  line-height: .82;
  align-self: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-points.is-count-5 .fs-scoreboard-score,
body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-points.is-count-6 .fs-scoreboard-score,
body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-points.is-count-7 .fs-scoreboard-score,
body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-points.is-count-8 .fs-scoreboard-score {
  font-size: clamp(26px, min(5.4cqw, 13cqh), 54px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-actions {
  gap: 6px;
  flex: 0 0 auto;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-actions button {
  width: clamp(24px, min(3.6cqw, 6cqh), 34px);
  height: clamp(24px, min(3.6cqw, 6cqh), 34px);
  font-size: clamp(14px, 2.1cqw, 20px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-race {
  gap: clamp(5px, .8cqh, 10px);
  justify-content: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-race-row {
  grid-template-columns: minmax(76px, 18%) 54px minmax(160px, 1fr) minmax(42px, auto);
  align-items: center;
  column-gap: clamp(8px, 1.2cqw, 14px);
  min-height: clamp(28px, 5.8cqh, 46px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-race-name {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: clamp(12px, 2cqw, 18px);
  font-weight: 950;
  line-height: 1.1;
  align-self: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-race-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  align-items: center;
  justify-items: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-race-actions button {
  border: 0;
  background: transparent;
  color: var(--widget-text);
  font-size: clamp(15px, 2.2cqw, 22px);
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-track {
  width: 100%;
  height: clamp(16px, 2.6cqh, 24px);
  align-self: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-track i {
  font-size: clamp(17px, 2.8cqw, 28px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-race-score {
  min-width: 2.2em;
  font-size: clamp(18px, 2.8cqw, 30px);
  text-align: right;
  line-height: 1;
  align-self: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-scoreboard.is-compact .fs-scoreboard-team {
  min-height: 72px;
  padding: 7px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-scoreboard.is-compact .fs-scoreboard-actions button {
  width: 24px;
  height: 24px;
  font-size: 15px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-scoreboard.is-compact .fs-scoreboard-race-row,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-scoreboard.is-tiny .fs-scoreboard-race-row {
  grid-template-columns: minmax(62px, 20%) 42px minmax(100px, 1fr) minmax(34px, auto);
  min-height: 26px;
  column-gap: 7px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-scoreboard.is-tiny .fs-scoreboard-race-actions {
  display: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-scoreboard.is-tiny .fs-scoreboard-race-row {
  grid-template-columns: minmax(58px, 22%) minmax(86px, 1fr) minmax(30px, auto);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-scoreboard.is-tiny .fs-scoreboard-race-name {
  grid-column: 1;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-scoreboard.is-tiny .fs-scoreboard-track {
  grid-column: 2;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-scoreboard.is-tiny .fs-scoreboard-race-score {
  grid-column: 3;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-score-goal-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(99,102,241,.14);
  border-radius: 14px;
  background: rgba(99,102,241,.04);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-score-goal-switch {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: 0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-score-goal-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-score-goal-line input {
  max-width: 110px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-score-sound-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-score-sound-row .fs-secondary-action {
  min-height: 42px;
  white-space: nowrap;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-scoreboard {
  width: min(980px, 78vw);
  min-width: min(760px, 78vw);
  min-height: min(520px, 72vh);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-scoreboard .fs-scoreboard-widget {
  padding: clamp(22px, 3vw, 38px);
}


/* M15.3 Scoreboard simplification + controls polish
   Keeps only Points/Race, fixes spotlight interaction sizing, goal setting wrap,
   and restricts increments to 1/2/5/10. */
body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-mode-picker {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.screen-shell-builder.screen-builder-fullscreen .fs-score-increment-row {
  grid-template-columns: repeat(4, auto);
  justify-content: start;
  column-gap: 18px;
  row-gap: 8px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-score-goal-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-score-goal-switch > span:first-child {
  min-width: 0;
  white-space: normal;
  overflow: visible;
  line-height: 1.25;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-score-goal-line {
  flex-wrap: wrap;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-score-sound-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-score-sound-row select {
  min-width: 0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-race-score {
  font-variant-numeric: tabular-nums;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-scoreboard {
  width: min(1080px, 82vw);
  min-width: min(820px, 82vw);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-scoreboard .fs-scoreboard-widget {
  width: 100%;
  min-width: 0;
}


/* M15.5 Scoreboard final polish: no title/reset in widget, flatter controls, tighter race fit */
body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-widget {
  padding: clamp(8px, 1.8cqw, 18px);
  gap: clamp(5px, 1cqh, 9px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-actions button,
body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-race-actions button {
  box-shadow: none;
  filter: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-actions button {
  background: rgba(255,255,255,.72);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-score {
  font-size: clamp(26px, 6.8cqw, 68px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-points.is-count-3 .fs-scoreboard-score,
body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-points.is-count-4 .fs-scoreboard-score {
  font-size: clamp(24px, 5.6cqw, 56px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-points.is-count-5 .fs-scoreboard-score,
body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-points.is-count-6 .fs-scoreboard-score,
body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-points.is-count-7 .fs-scoreboard-score,
body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-points.is-count-8 .fs-scoreboard-score {
  font-size: clamp(20px, 4.8cqw, 46px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-race {
  justify-content: center;
  gap: clamp(5px, .85cqh, 9px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-race-row {
  grid-template-columns: minmax(76px, 116px) minmax(42px, 54px) minmax(0, 1fr) minmax(28px, 46px);
  gap: clamp(7px, 1.1cqw, 11px);
  line-height: 1;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-race-name {
  font-size: clamp(12px, 1.5cqw, 16px);
  font-weight: 900;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-race-actions button {
  background: transparent;
  border: 0;
  width: auto;
  height: auto;
  padding: 0 2px;
  color: var(--widget-text);
  font-size: clamp(15px, 1.9cqw, 19px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-track {
  height: 14px;
  background: transparent;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-track::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  background: color-mix(in srgb, var(--team-accent) 18%, #d9dcea);
  border-radius: 999px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-track::before {
  top: 50%;
  height: 3px;
  transform: translateY(-50%);
  z-index: 1;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-track i {
  z-index: 2;
  font-size: clamp(15px, 2.1cqw, 22px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-race-score {
  min-width: 2em;
  font-size: clamp(17px, 2.4cqw, 24px);
  font-variant-numeric: tabular-nums;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-score-goal-switch > span:first-child {
  white-space: nowrap;
}


/* M15.6 Scoreboard final interaction + cleaner controls */
body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-actions button,
body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-race-actions button {
  box-shadow: none !important;
  filter: none !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-scoreboard-actions button {
  background: rgba(255,255,255,.58);
}


/* M16 Projection mode: one clear classroom display path. */
body.screen-shell-builder.screen-builder-fullscreen .fs-project-btn {
  width: auto;
  min-width: 76px;
  padding: 0 16px;
  font-size: 16px;
  letter-spacing: .02em;
  font-weight: 950;
}

body.screen-shell-builder.screen-builder-fullscreen .is-hidden-by-m16 {
  display: none !important;
}

body.screen-shell-builder.screen-builder-fullscreen.is-projecting {
  background: #000;
}

body.screen-shell-builder.screen-builder-fullscreen.is-projecting .fs-top-left,
body.screen-shell-builder.screen-builder-fullscreen.is-projecting .fs-top-right,
body.screen-shell-builder.screen-builder-fullscreen.is-projecting .fs-dock,
body.screen-shell-builder.screen-builder-fullscreen.is-projecting .fs-widget-dock,
body.screen-shell-builder.screen-builder-fullscreen.is-projecting .fs-bottom-right,
body.screen-shell-builder.screen-builder-fullscreen.is-projecting .fs-modal-backdrop,
body.screen-shell-builder.screen-builder-fullscreen.is-projecting .fs-widget-toolbar,
body.screen-shell-builder.screen-builder-fullscreen.is-projecting .fs-resize-handle,
body.screen-shell-builder.screen-builder-fullscreen.is-projecting #stageScreenTitle {
  display: none !important;
}

body.screen-shell-builder.screen-builder-fullscreen.is-projecting .fs-widget {
  cursor: default;
}

body.screen-shell-builder.screen-builder-fullscreen.is-projecting .fs-widget.is-selected,
body.screen-shell-builder.screen-builder-fullscreen.is-projecting .fs-widget:hover {
  outline: none !important;
  box-shadow: none !important;
}

body.screen-shell-builder.screen-builder-fullscreen.is-projecting .fs-widget::before {
  display: none !important;
}

body.screen-shell-builder.screen-builder-fullscreen.is-projecting .fs-widget * {
  user-select: none;
}

body.screen-shell-builder.screen-builder-fullscreen.is-projecting .fs-stage-grid {
  opacity: .55;
}

/* M17 Stopwatch widget */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-tool[data-widget-tool="stopwatch"] span {
  font-size: 20px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-stopwatch-widget {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: clamp(12px, 2.2cqw, 22px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: clamp(8px, 1.4cqh, 14px);
  background: var(--widget-bg);
  color: var(--widget-text);
  border-radius: inherit;
  user-select: none;
  overflow: hidden;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-stopwatch-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 950;
  font-size: clamp(12px, 2cqw, 17px);
  line-height: 1;
  min-height: 18px;
  flex: 0 0 auto;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-stopwatch-main {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(10px, 1.5cqh, 16px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-stopwatch-time {
  font-variant-numeric: tabular-nums;
  color: var(--widget-text);
  font-size: clamp(38px, 9.5cqw, 92px);
  line-height: .88;
  font-weight: 950;
  letter-spacing: -.06em;
  flex: 0 0 auto;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-stopwatch-widget.is-running .fs-stopwatch-time {
  color: var(--widget-accent);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-stopwatch-actions {
  width: min(88%, 520px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 18px;
  flex: 0 0 auto;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-stopwatch-actions button {
  width: clamp(34px, 5cqw, 46px);
  height: clamp(34px, 5cqw, 46px);
  border-radius: 999px;
  border: 0;
  background: color-mix(in srgb, var(--widget-accent) 12%, #fff);
  color: var(--widget-accent);
  font-size: clamp(16px, 2.6cqw, 24px);
  font-weight: 950;
  box-shadow: none;
  cursor: pointer;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-stopwatch-actions button:first-child {
  justify-self: start;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-stopwatch-actions button:last-child {
  justify-self: end;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-stopwatch-toggle {
  background: var(--widget-accent) !important;
  color: #fff !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-stopwatch.is-compact .fs-stopwatch-widget,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-stopwatch.is-tiny .fs-stopwatch-widget {
  padding: 9px;
  gap: 6px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-stopwatch.is-compact .fs-stopwatch-head,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-stopwatch.is-tiny .fs-stopwatch-head {
  display: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-stopwatch.is-compact .fs-stopwatch-time {
  font-size: clamp(30px, 9cqw, 68px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-stopwatch.is-tiny .fs-stopwatch-time {
  font-size: clamp(24px, 10cqw, 48px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-stopwatch.is-tiny .fs-stopwatch-actions button {
  width: 26px;
  height: 26px;
  font-size: 14px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-stopwatch {
  width: min(720px, 72vw);
  min-width: min(520px, 72vw);
  min-height: min(340px, 58vh);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-stopwatch .fs-stopwatch-widget {
  padding: clamp(28px, 4vw, 48px);
}

/* M17.1 Stopwatch lap / split polish */
body.screen-shell-builder.screen-builder-fullscreen .fs-stopwatch-widget {
  gap: clamp(6px, 1.1cqh, 12px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-stopwatch-actions {
  gap: clamp(16px, 6cqw, 140px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-stopwatch-lap,
body.screen-shell-builder.screen-builder-fullscreen .fs-stopwatch-reset {
  background: #fff;
  color: var(--widget-text);
  border: 1px solid rgba(15,23,42,.18);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-stopwatch-laps-shell {
  width: min(92%, 520px);
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-stopwatch-laps {
  width: 100%;
  min-height: clamp(70px, 18cqh, 170px);
  height: 100%;
  border: 2px solid rgba(15,23,42,.76);
  border-radius: 8px;
  overflow: auto;
  background: rgba(255,255,255,.74);
  color: var(--widget-text);
  font-size: clamp(11px, 1.4cqw, 14px);
  font-variant-numeric: tabular-nums;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-stopwatch-laps-shell.is-empty .fs-stopwatch-laps {
  border-color: transparent;
  background: transparent;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-stopwatch-lap-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 4px 12px;
  line-height: 1.25;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-stopwatch-lap-row:nth-child(even) {
  background: color-mix(in srgb, var(--widget-accent) 8%, transparent);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-stopwatch-lap-row b {
  font-weight: 700;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-stopwatch.is-compact .fs-stopwatch-actions,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-stopwatch.is-tiny .fs-stopwatch-actions {
  width: min(100%, 320px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-stopwatch.is-compact .fs-stopwatch-laps-shell {
  width: 100%;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-stopwatch.is-compact .fs-stopwatch-laps {
  min-height: 56px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-stopwatch.is-tiny .fs-stopwatch-laps-shell {
  display: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-stopwatch .fs-stopwatch-laps {
  min-height: 140px;
  max-height: 220px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-radio-stack label {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--fs-text);
  text-align: left;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-radio-stack label span {
  text-align: left;
}


/* M17.3 Stopwatch settings alignment + instant controls */
body.screen-shell-builder.screen-builder-fullscreen .fs-radio-stack {
  justify-items: stretch;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-radio-stack label {
  width: 100%;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  justify-content: start;
  column-gap: 8px;
  text-align: left;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-radio-stack label input {
  margin: 0;
  justify-self: start;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-radio-stack label span {
  display: block;
  min-width: 0;
  text-align: left;
  line-height: 1.25;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-stopwatch-actions button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* M18 Sticker library + sticker widget */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-tool[data-widget-tool="sticker"] span {
  font-size: 20px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-sticker-widget,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-sticker .fs-sticker-widget {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  user-select: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-sticker-widget svg,
body.screen-shell-builder.screen-builder-fullscreen .fs-sticker-widget img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  overflow: visible;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-sticker-panel-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  justify-content: flex-end;
  background: rgba(15, 23, 42, .18);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-sticker-panel {
  width: min(430px, 92vw);
  height: 100%;
  background: #fff;
  box-shadow: -20px 0 60px rgba(15, 23, 42, .18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #0f172a;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-sticker-panel-head {
  flex: 0 0 auto;
  min-height: 66px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(148, 163, 184, .22);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-sticker-panel-head div {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 950;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-sticker-close {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, .4);
  background: #fff;
  color: #64748b;
  font-size: 24px;
  cursor: pointer;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-sticker-categories,
body.screen-shell-builder.screen-builder-fullscreen .fs-sticker-items {
  flex: 1 1 auto;
  overflow: auto;
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-content: start;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-sticker-category,
body.screen-shell-builder.screen-builder-fullscreen .fs-sticker-item {
  border: 1px solid rgba(148, 163, 184, .35);
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 8px;
  cursor: pointer;
  color: #0f172a;
  text-align: center;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .04);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-sticker-category:hover,
body.screen-shell-builder.screen-builder-fullscreen .fs-sticker-item:hover {
  border-color: rgba(99, 102, 241, .65);
  box-shadow: 0 12px 28px rgba(99, 102, 241, .12);
  transform: translateY(-1px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-sticker-category-preview {
  aspect-ratio: 1 / 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 6px;
  align-items: center;
  justify-items: center;
  border-radius: 10px;
  background: #f8fafc;
  padding: 8px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-sticker-category-preview div,
body.screen-shell-builder.screen-builder-fullscreen .fs-sticker-preview {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-sticker-category-preview svg,
body.screen-shell-builder.screen-builder-fullscreen .fs-sticker-preview svg,
body.screen-shell-builder.screen-builder-fullscreen .fs-sticker-category-preview img,
body.screen-shell-builder.screen-builder-fullscreen .fs-sticker-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-sticker-category strong,
body.screen-shell-builder.screen-builder-fullscreen .fs-sticker-item span {
  font-size: 14px;
  font-weight: 750;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-sticker-item .fs-sticker-preview {
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  background: #f8fafc;
  padding: 8px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-sticker-breadcrumb {
  flex: 0 0 auto;
  padding: 14px 18px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-size: 14px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-sticker-breadcrumb button {
  border: 0;
  background: rgba(99, 102, 241, .1);
  color: #4f46e5;
  padding: 8px 12px;
  border-radius: 9px;
  cursor: pointer;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-sticker-settings-card {
  display: grid;
  gap: 10px;
  justify-items: start;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 14px;
  background: #f8fafc;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-sticker-settings-card .fs-sticker-preview {
  width: 110px;
  height: 110px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-sticker-settings-card p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

/* M18.2 Seamless canvas: remove extra widget cards/shadows */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget * {
  box-shadow: none !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-image-frame {
  box-shadow: none !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-sticker {
  padding: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-sticker .fs-sticker-widget,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-sticker .fs-sticker-widget {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-sticker .fs-sticker-widget svg,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-sticker .fs-sticker-widget svg,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-sticker .fs-sticker-widget img,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-sticker .fs-sticker-widget img {
  filter: none !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-sticker:not(.is-selected) {
  outline: 0 !important;
}


/* M18.4 Sticker fit: widget percent units are not square on 16:9 screens.
   The JS now gives stickers a taller percentage height, and this keeps art inside that box. */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-sticker .fs-sticker-widget {
  overflow: hidden !important;
}

/* M19.1 Template Library MVP */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-tool[data-widget-tool="templates"] span {
  background: linear-gradient(135deg, #fef3c7, #fce7f3 45%, #dbeafe);
  color: #7c2d12;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-panel-overlay {
  position: fixed;
  inset: 0;
  z-index: 10030;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(15, 23, 42, .38);
  backdrop-filter: blur(14px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-panel {
  width: min(1040px, calc(100vw - 42px));
  max-height: min(760px, calc(100vh - 42px));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 16px;
  padding: 22px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.96));
  border: 1px solid rgba(255,255,255,.78);
  box-shadow: 0 28px 88px rgba(15, 23, 42, .26);
  overflow: hidden;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-panel-head p,
body.screen-shell-builder.screen-builder-fullscreen .fs-template-panel-head h2,
body.screen-shell-builder.screen-builder-fullscreen .fs-template-panel-head span {
  margin: 0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-panel-head h2 {
  margin-top: 2px;
  color: #0f172a;
  font-size: 25px;
  letter-spacing: -.03em;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-panel-head span {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 14px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-close {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 14px;
  background: #f1f5f9;
  color: #334155;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-close:hover {
  background: #e2e8f0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 8px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-tab {
  min-width: 132px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 8px;
  row-gap: 1px;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, .25);
  border-radius: 18px;
  background: #ffffff;
  color: #0f172a;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-tab .fs-template-tab-icon {
  grid-row: 1 / span 2;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #f8fafc;
  color: #4f46e5;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-tab .fs-template-tab-icon .fs-tool-icon {
  width: 18px;
  height: 18px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-tab strong {
  font-size: 13px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-tab small {
  color: #64748b;
  font-size: 11px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-tab.is-active {
  border-color: rgba(99, 102, 241, .36);
  background: linear-gradient(135deg, #eef2ff, #fff7ed);
  box-shadow: 0 14px 34px rgba(99, 102, 241, .16);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-grid {
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 2px 4px 4px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-card {
  min-height: 160px;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 24px;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 16px 38px rgba(15, 23, 42, .08);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, .38);
  box-shadow: 0 22px 52px rgba(15, 23, 42, .13);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb {
  position: relative;
  height: 104px;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 16%, rgba(251, 207, 232, .86), transparent 32%),
    radial-gradient(circle at 86% 18%, rgba(191, 219, 254, .8), transparent 34%),
    linear-gradient(135deg, #fff7ed, #eef2ff);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb-emoji {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: rgba(255,255,255,.82);
  color: var(--template-accent, #6366f1);
  font-size: 24px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .10);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb-emoji .fs-tool-icon {
  width: 22px;
  height: 22px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb i {
  position: absolute;
  display: block;
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb i:nth-child(2) {
  left: 18px;
  right: 22px;
  top: 72px;
  height: 16px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb i:nth-child(3) {
  left: 18px;
  width: 72px;
  bottom: 28px;
  height: 42px;
  border-radius: 16px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb i:nth-child(4) {
  right: 18px;
  width: 48px;
  bottom: 28px;
  height: 42px;
  border-radius: 16px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-card-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  gap: 7px;
  padding-top: 0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 25px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 12px;
  font-weight: 800;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-card-body strong {
  max-width: 100%;
  color: #0f172a;
  font-size: 17px;
  line-height: 1.22;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-card-body small {
  display: -webkit-box;
  max-width: 100%;
  color: #64748b;
  font-size: 12.5px;
  line-height: 1.42;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-card-body em {
  margin-top: 2px;
  max-width: 100%;
  color: #94a3b8;
  font-style: normal;
  font-size: 11.5px;
  line-height: 1.25;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-empty {
  grid-column: 1 / -1;
  padding: 28px;
  border-radius: 20px;
  background: #f8fafc;
  color: #64748b;
  text-align: center;
}

@media (max-width: 860px) {
  body.screen-shell-builder.screen-builder-fullscreen .fs-template-panel-overlay {
    padding: 14px;
  }

  body.screen-shell-builder.screen-builder-fullscreen .fs-template-grid {
    grid-template-columns: 1fr;
  }

  body.screen-shell-builder.screen-builder-fullscreen .fs-template-card {
    grid-template-columns: 112px minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  body.screen-shell-builder.screen-builder-fullscreen .fs-template-card {
    grid-template-columns: 1fr;
  }

  body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb {
    height: 112px;
  }
}

/* M19.2.1 — screen management visual polish */
body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop {
  background: rgba(255, 255, 255, 0.94) !important;
  border: 1px solid rgba(203, 213, 225, 0.88) !important;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14) !important;
  backdrop-filter: blur(18px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-head {
  color: #334155 !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9) !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-close,
body.screen-shell-builder.screen-builder-fullscreen .fs-screen-menu-trigger,
body.screen-shell-builder.screen-builder-fullscreen .fs-screen-menu-trigger.is-pop {
  background: rgba(255, 255, 255, 0.96) !important;
  border: 1px solid rgba(203, 213, 225, 0.95) !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10) !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-close,
body.screen-shell-builder.screen-builder-fullscreen .fs-screen-menu-trigger.is-pop span {
  color: #64748b !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-menu-trigger span {
  background: #64748b !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-item,
body.screen-shell-builder.screen-builder-fullscreen .fs-screen-card {
  background: rgba(248, 250, 252, 0.98) !important;
  border: 1px solid rgba(203, 213, 225, 0.92) !important;
  box-shadow: none !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-item strong,
body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-item,
body.screen-shell-builder.screen-builder-fullscreen .fs-screen-card {
  color: #334155 !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-item.is-active,
body.screen-shell-builder.screen-builder-fullscreen .fs-screen-card.is-active {
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%) !important;
  border-color: rgba(96, 165, 250, 0.9) !important;
  box-shadow: 0 12px 28px rgba(59, 130, 246, 0.12) !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-menu {
  background: #ffffff !important;
  border: 1px solid rgba(203, 213, 225, 0.98) !important;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16) !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-menu.is-up {
  top: auto !important;
  bottom: 50px !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-item .fs-screen-menu.is-up {
  top: auto !important;
  bottom: 48px !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-menu-item,
body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-item .fs-screen-menu-item {
  color: #334155 !important;
  background: #ffffff !important;
  border: 1px solid rgba(226, 232, 240, 0.96);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-menu-item:hover,
body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-item .fs-screen-menu-item:hover {
  color: #1d4ed8 !important;
  background: #eff6ff !important;
  border-color: rgba(147, 197, 253, 0.95);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-menu-item.is-danger,
body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-item .fs-screen-menu-item.is-danger {
  color: #ef4444 !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-menu-item.is-danger:hover,
body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-item .fs-screen-menu-item.is-danger:hover {
  color: #ffffff !important;
  background: #ef4444 !important;
  border-color: #ef4444;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-rename-form {
  position: relative;
  z-index: 4;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-rename-input {
  width: 100%;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(96, 165, 250, 0.9);
  background: rgba(255, 255, 255, 0.98);
  color: #0f172a;
  font: inherit;
  font-weight: 800;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-title .fs-screen-rename-input {
  min-height: 36px;
  font-size: 15px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-add-card {
  background: rgba(248, 250, 252, 0.98) !important;
  border: 1px dashed rgba(191, 219, 254, 0.95) !important;
  color: #334155 !important;
}

/* M19.2.2 — inline rename click fix and softer page-list borders */
body.screen-shell-builder.screen-builder-fullscreen .fs-screen-hit,
body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-hit {
  z-index: 0 !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-preview,
body.screen-shell-builder.screen-builder-fullscreen .fs-screen-card-body,
body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-item > strong,
body.screen-shell-builder.screen-builder-fullscreen .fs-screen-rename-form {
  position: relative !important;
  z-index: 2 !important;
  pointer-events: auto !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-rename-form {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-menu-trigger {
  z-index: 5 !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-menu {
  z-index: 20 !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-item,
body.screen-shell-builder.screen-builder-fullscreen .fs-screen-card {
  border-color: rgba(203, 213, 225, 0.62) !important;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.045) !important;
  outline: none !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-item:hover,
body.screen-shell-builder.screen-builder-fullscreen .fs-screen-card:hover {
  border-color: rgba(148, 163, 184, 0.72) !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06) !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-item.is-active,
body.screen-shell-builder.screen-builder-fullscreen .fs-screen-card.is-active {
  border-color: rgba(96, 165, 250, 0.62) !important;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.08) !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-menu-trigger:focus,
body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-item:focus,
body.screen-shell-builder.screen-builder-fullscreen .fs-screen-card:focus {
  outline: none !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-rename-input:focus {
  outline: none !important;
  border-color: rgba(59, 130, 246, 0.85) !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12) !important;
}


/* M19.2.3 — hard fix inline rename click target + lighter page card stroke */
body.screen-shell-builder.screen-builder-fullscreen .fs-screen-card.is-renaming .fs-screen-hit,
body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-item.is-renaming .fs-page-pop-hit {
  display: none !important;
  pointer-events: none !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-card.is-renaming,
body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-item.is-renaming {
  cursor: text !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-rename-form,
body.screen-shell-builder.screen-builder-fullscreen .fs-screen-rename-input {
  pointer-events: auto !important;
  user-select: text !important;
  -webkit-user-select: text !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-item,
body.screen-shell-builder.screen-builder-fullscreen .fs-screen-card {
  border-color: rgba(203, 213, 225, 0.48) !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.035) !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-item:hover,
body.screen-shell-builder.screen-builder-fullscreen .fs-screen-card:hover {
  border-color: rgba(148, 163, 184, 0.56) !important;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.045) !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-item.is-active,
body.screen-shell-builder.screen-builder-fullscreen .fs-screen-card.is-active {
  border-color: rgba(96, 165, 250, 0.54) !important;
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.07) !important;
}

/* M19.2.4 — robust rename popover + lighter page list */
body.screen-shell-builder.screen-builder-fullscreen .fs-screen-rename-popover-layer {
  position: fixed;
  inset: 0;
  z-index: 30000;
  background: transparent;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-rename-popover {
  position: fixed;
  width: 280px;
  max-width: calc(100vw - 32px);
  padding: 12px;
  border: 1px solid rgba(203, 213, 225, 0.96);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
  display: grid;
  gap: 10px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-rename-popover label {
  color: #475569;
  font-size: 12px;
  font-weight: 850;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-rename-popover-input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(147, 197, 253, 0.96);
  border-radius: 12px;
  background: #f8fafc;
  color: #0f172a;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.10);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-rename-popover-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-rename-popover-actions button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(203, 213, 225, 0.96);
  border-radius: 12px;
  color: #475569;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  background: #ffffff;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-rename-popover-actions button.is-primary {
  border-color: rgba(59, 130, 246, 0.85);
  color: #ffffff;
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop {
  border-color: rgba(226, 232, 240, 0.92) !important;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.10) !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-item,
body.screen-shell-builder.screen-builder-fullscreen .fs-screen-card {
  border: 1px solid rgba(203, 213, 225, 0.46) !important;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.025) !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-item:hover,
body.screen-shell-builder.screen-builder-fullscreen .fs-screen-card:hover {
  border-color: rgba(148, 163, 184, 0.50) !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.035) !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-page-pop-item.is-active,
body.screen-shell-builder.screen-builder-fullscreen .fs-screen-card.is-active {
  border-color: rgba(96, 165, 250, 0.52) !important;
  box-shadow: 0 5px 14px rgba(59, 130, 246, 0.06) !important;
}

/* M19.2.2 — floating screen menu avoids clipping inside the page list */
body.screen-shell-builder.screen-builder-fullscreen .fs-screen-menu.fs-screen-floating-menu {
  position: fixed !important;
  top: auto;
  right: auto;
  bottom: auto;
  z-index: 10050;
  min-width: 172px;
  max-width: min(240px, calc(100vw - 24px));
  background: #ffffff !important;
  border: 1px solid rgba(203, 213, 225, 0.96) !important;
  border-radius: 16px !important;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16) !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-menu.fs-screen-floating-menu .fs-screen-menu-item {
  background: #ffffff !important;
  color: #334155 !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-menu.fs-screen-floating-menu .fs-screen-menu-item:hover {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-menu.fs-screen-floating-menu .fs-screen-menu-item.is-danger {
  color: #ef4444 !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-screen-menu.fs-screen-floating-menu .fs-screen-menu-item.is-danger:hover {
  color: #ffffff !important;
  background: #ef4444 !important;
}


/* M19.3 Transparent Text Themes */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.is-text-transparent-theme {
  background: transparent;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.is-text-transparent-theme .fs-widget-text-content {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 2px 4px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text .fs-widget-text-content {
  background: transparent;
  color: var(--widget-text);
  line-height: 1.08;
  letter-spacing: -0.01em;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text .fs-widget-text-content::placeholder {
  color: var(--text-placeholder, rgba(15,23,42,.42));
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text[data-text-role="title"] .fs-widget-text-content {
  font-weight: 900;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text[data-text-role="subtitle"] .fs-widget-text-content {
  font-weight: 800;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text[data-text-role="body"] .fs-widget-text-content,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text[data-text-role="caption"] .fs-widget-text-content {
  font-weight: 500;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-chip-btn {
  appearance: none;
  border: 1px solid rgba(148, 163, 184, 0.34);
  background: #fff;
  color: #0f172a;
  border-radius: 999px;
  padding: 8px 12px;
  font: 600 13px/1.1 Inter, system-ui, sans-serif;
  cursor: pointer;
  transition: all .16s ease;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-chip-btn:hover {
  border-color: rgba(99, 102, 241, 0.45);
  transform: translateY(-1px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-chip-btn.is-active {
  background: #eef4ff;
  border-color: rgba(99, 102, 241, 0.72);
  color: #1d4ed8;
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.16);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-text-appearance-btn[data-text-appearance="transparent-dark"] {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color: #0f172a;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-text-appearance-btn[data-text-appearance="transparent-light"] {
  background: linear-gradient(180deg, #475569 0%, #0f172a 100%);
  color: #ffffff;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-text-appearance-btn[data-text-appearance="transparent-outline"] {
  background: linear-gradient(180deg, #dbeafe 0%, #eff6ff 100%);
  color: #0f172a;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-text-appearance-btn[data-text-appearance="transparent-accent"] {
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  color: #0f172a;
}


/* M19.3.1 — transparent text swatches inside theme grid */
body.screen-shell-builder.screen-builder-fullscreen .fs-theme-swatch.is-transparent-option span {
  position: relative;
  overflow: hidden;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-theme-swatch.is-transparent-option span::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(45deg, rgba(148,163,184,.28) 25%, transparent 25%, transparent 75%, rgba(148,163,184,.28) 75%),
                    linear-gradient(45deg, rgba(148,163,184,.28) 25%, transparent 25%, transparent 75%, rgba(148,163,184,.28) 75%);
  background-size: 14px 14px;
  background-position: 0 0, 7px 7px;
  z-index: 0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-theme-swatch.is-transparent-option span i,
body.screen-shell-builder.screen-builder-fullscreen .fs-theme-swatch.is-transparent-option span b {
  position: absolute;
  z-index: 1;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-theme-swatch.is-transparent-option[title*='白字'] span i,
body.screen-shell-builder.screen-builder-fullscreen .fs-theme-swatch.is-transparent-option[title*='白字'] span b,
body.screen-shell-builder.screen-builder-fullscreen .fs-theme-swatch.is-transparent-option[title*='描边'] span i,
body.screen-shell-builder.screen-builder-fullscreen .fs-theme-swatch.is-transparent-option[title*='描边'] span b {
  box-shadow: 0 0 0 1px rgba(15,23,42,.4);
}


/* M19.3.1 — transparent text sharpness refinement */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.is-text-transparent-theme .fs-widget-text-content {
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  background: transparent !important;
  box-shadow: none !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.is-text-transparent-theme .fs-widget-text-content::placeholder {
  opacity: 1;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.fs-text-appearance-transparent-dark .fs-widget-text-content {
  color: #0f172a !important;
  text-shadow: 0 1px 1px rgba(255,255,255,.46) !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.fs-text-appearance-transparent-light .fs-widget-text-content {
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(15,23,42,.56) !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.fs-text-appearance-transparent-outline .fs-widget-text-content {
  color: #ffffff !important;
  text-shadow:
    -1px -1px 0 #0f172a,
     1px -1px 0 #0f172a,
    -1px  1px 0 #0f172a,
     1px  1px 0 #0f172a,
     0   -1px 0 #0f172a,
     0    1px 0 #0f172a,
    -1px  0   0 #0f172a,
     1px  0   0 #0f172a !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.fs-text-appearance-transparent-accent .fs-widget-text-content {
  color: #0f172a !important;
  text-shadow: 0 1px 1px rgba(255,255,255,.54) !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.is-text-transparent-theme.is-selected {
  outline-color: rgba(99,102,241,.76);
}

/* M19.3.2 — transparent text operation safety */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.is-text-transparent-theme {
  min-width: 48px;
  min-height: 32px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.is-text-transparent-theme::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 12px;
  border: 1px dashed rgba(99, 102, 241, 0);
  background: transparent;
  pointer-events: none;
  transition: border-color .14s ease, background .14s ease;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.is-text-transparent-theme:hover::before {
  border-color: rgba(99, 102, 241, .24);
  background: rgba(99, 102, 241, .035);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.is-text-transparent-theme.is-selected::before {
  border-color: rgba(99, 102, 241, .72);
  background: rgba(99, 102, 241, .045);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-transparent-drag-handle {
  position: absolute;
  left: -10px;
  top: -10px;
  z-index: 7;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, .42);
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: #475569;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  cursor: move;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .16);
  opacity: 0;
  transform: scale(.92);
  pointer-events: none;
  transition: opacity .14s ease, transform .14s ease, background .14s ease;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.is-text-transparent-theme:hover .fs-transparent-drag-handle,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.is-text-transparent-theme.is-selected .fs-transparent-drag-handle {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-transparent-drag-handle:hover {
  background: #eef2ff;
  border-color: rgba(99, 102, 241, .62);
  color: #2563eb;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.is-text-transparent-theme.is-selected {
  outline-offset: 6px;
}


/* M19.3.3 — two frosted themes + two true transparent themes */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.is-text-frosted-theme {
  padding: 0;
  border-radius: 16px;
  box-shadow: 0 14px 38px rgba(15, 23, 42, .14);
  backdrop-filter: blur(14px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.fs-text-appearance-transparent-dark.is-text-frosted-theme {
  background: rgba(255,255,255,.54) !important;
  border: 1px solid rgba(255,255,255,.36);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.fs-text-appearance-transparent-outline.is-text-frosted-theme {
  background: rgba(15,23,42,.46) !important;
  border: 1px solid rgba(255,255,255,.16);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.is-text-frosted-theme .fs-widget-text-content {
  background: transparent !important;
  box-shadow: none !important;
  border: 0;
  padding: 10px 12px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.fs-text-appearance-transparent-dark .fs-widget-text-content {
  color: #0f172a !important;
  text-shadow: 0 1px 1px rgba(255,255,255,.34) !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.fs-text-appearance-transparent-outline .fs-widget-text-content {
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0,0,0,.22) !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.fs-text-appearance-transparent-light.is-text-transparent-theme,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.fs-text-appearance-transparent-accent.is-text-transparent-theme {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  padding: 0 !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.fs-text-appearance-transparent-light.is-text-transparent-theme .fs-widget-text-content,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.fs-text-appearance-transparent-accent.is-text-transparent-theme .fs-widget-text-content {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  padding: 2px 4px !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-theme-swatch.is-frosted-option span::before {
  display: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-theme-swatch.is-frosted-option span {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.22);
}


/* M19.3.3.1 — keep transparent text editable without falling back to boxed textarea styles */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text .fs-widget-text-content {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  resize: none !important;
  overflow: hidden !important;
  scrollbar-width: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text .fs-widget-text-content::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.is-text-frosted-theme .fs-widget-text-content,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.is-text-transparent-theme .fs-widget-text-content {
  background: transparent !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.fs-text-appearance-transparent-dark.is-text-frosted-theme,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.fs-text-appearance-transparent-outline.is-text-frosted-theme {
  background: var(--widget-bg) !important;
}

/* Move the transparent-text drag handle away from the resize corners. */
body.screen-shell-builder.screen-builder-fullscreen .fs-transparent-drag-handle {
  left: -34px !important;
  top: 50% !important;
  transform: translateY(-50%) scale(.92) !important;
  z-index: 6 !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.is-text-transparent-theme:hover .fs-transparent-drag-handle,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.is-text-transparent-theme.is-selected .fs-transparent-drag-handle {
  transform: translateY(-50%) scale(1) !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text .fs-resize-handle {
  z-index: 9 !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.is-text-transparent-theme .fs-resize-handle {
  width: 15px !important;
  height: 15px !important;
  border-width: 2px !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .18) !important;
}

/* M19.4.1 + M19.4.2 — marquee multi-select and multi-drag */
body.screen-shell-builder.screen-builder-fullscreen .fs-marquee-selection {
  position: absolute;
  z-index: 9997;
  pointer-events: none;
  border: 2px solid rgba(37, 99, 235, 0.72);
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.12);
  box-shadow: 0 0 0 1px rgba(255,255,255,.72) inset;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget.is-selected {
  outline: 2px solid rgba(99, 102, 241, 0.92);
  outline-offset: 0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget.is-selected::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 12px;
  border: 1px dashed rgba(37, 99, 235, 0.36);
  pointer-events: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget.is-selected.is-text-transparent-theme::after,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget.is-selected.is-text-frosted-theme::after {
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.32);
}

/* M19.4.3 — Group / Ungroup for multi-selected widgets */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget.is-grouped:not(.is-selected)::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 12px;
  border: 1px dotted rgba(20, 184, 166, 0.38);
  pointer-events: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget.is-grouped.is-selected {
  outline-color: rgba(20, 184, 166, 0.98);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-multi-widget-toolbar {
  position: absolute;
  z-index: 9998;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 16px;
  border: 1px solid rgba(203, 213, 225, 0.9);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
  transform: translate(-50%, -100%);
  backdrop-filter: blur(16px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-multi-widget-toolbar button {
  min-height: 32px;
  padding: 0 11px;
  border: 0;
  border-radius: 11px;
  background: #f1f5f9;
  color: #334155;
  font: 800 12px/1 Inter, system-ui, sans-serif;
  cursor: pointer;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-multi-widget-toolbar button:hover:not(:disabled) {
  background: #e0f2fe;
  color: #075985;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-multi-widget-toolbar button:disabled {
  opacity: .42;
  cursor: not-allowed;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-multi-widget-toolbar button.is-danger {
  color: #ef4444;
  background: #fff1f2;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-multi-widget-toolbar button.is-danger:hover {
  color: #ffffff;
  background: #ef4444;
}

/* M19.4.3.1 — make floating multi-selection toolbar clickable inside pointer-events:none widget layer */
body.screen-shell-builder.screen-builder-fullscreen .fs-multi-widget-toolbar,
body.screen-shell-builder.screen-builder-fullscreen .fs-multi-widget-toolbar * {
  pointer-events: auto !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-multi-widget-toolbar {
  user-select: none;
}

/* M20.1 List / Checklist Widget */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-list {
  background: var(--widget-bg);
  color: var(--widget-text);
  overflow: visible;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-widget {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 16px;
  color: var(--widget-text);
  background: var(--widget-bg);
  overflow: hidden;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-title {
  flex: 0 0 auto;
  padding-bottom: 9px;
  border-bottom: 1px solid color-mix(in srgb, var(--widget-text) 12%, transparent);
  font-size: clamp(18px, calc(var(--list-font-size) * 1.05), 42px);
  font-weight: 900;
  line-height: 1.08;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-items {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  overflow: hidden;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-item {
  min-height: calc(var(--list-font-size) * 1.72);
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 7px 4px;
  border-bottom: 1px solid color-mix(in srgb, var(--widget-text) 8%, transparent);
  font-size: var(--list-font-size);
  font-weight: 760;
  line-height: 1.12;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-widget.is-list .fs-list-item {
  grid-template-columns: auto minmax(0, 1fr);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-item:last-child {
  border-bottom: 0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-item.is-checked .fs-list-text {
  opacity: 0.55;
  text-decoration: line-through;
  text-decoration-thickness: 0.12em;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-check {
  width: calc(var(--list-font-size) * 1.2);
  height: calc(var(--list-font-size) * 1.2);
  border-radius: 8px;
  border: 2px solid var(--widget-accent);
  color: #fff;
  background: transparent;
  font-size: calc(var(--list-font-size) * .8);
  font-weight: 900;
  line-height: 1;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-item.is-checked .fs-list-check {
  background: var(--widget-accent);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-icon,
body.screen-shell-builder.screen-builder-fullscreen .fs-list-bullet {
  width: calc(var(--list-font-size) * 1.35);
  height: calc(var(--list-font-size) * 1.35);
  display: inline-grid;
  place-items: center;
  font-size: calc(var(--list-font-size) * 0.95);
  font-weight: 900;
  color: var(--widget-accent);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-bullet {
  width: calc(var(--list-font-size) * .7);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-settings {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-setting-row {
  display: grid;
  grid-template-columns: 26px 54px minmax(120px, 1fr) 34px 38px;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 12px;
  background: #fff;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-setting-row.is-dragging {
  opacity: .55;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-setting-drag {
  height: 44px;
  border: 0;
  border-radius: 8px;
  color: #64748b;
  background: #f1f5f9;
  font-size: 18px;
  cursor: grab;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-setting-drag:active {
  cursor: grabbing;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-setting-icon,
body.screen-shell-builder.screen-builder-fullscreen .fs-list-setting-text {
  min-width: 0;
  height: 44px;
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font: 700 14px/1.1 Inter, system-ui, sans-serif;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-setting-icon {
  text-align: center;
  font-size: 22px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-setting-text {
  padding: 0 12px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-setting-check {
  display: grid;
  place-items: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-setting-check input {
  display: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-setting-check span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 2px solid #cbd5e1;
  color: transparent;
  font-weight: 900;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-setting-check input:checked + span {
  color: #fff;
  border-color: #6366f1;
  background: #6366f1;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-setting-delete {
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(226,232,240,.95);
  background: #fff;
  color: #ef4444;
  cursor: pointer;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-add-action {
  margin: 2px 0 14px;
  width: max-content;
  padding: 10px 16px;
  border-radius: 999px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-mode-stack {
  margin-bottom: 16px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-list.is-compact .fs-list-widget {
  gap: 5px;
  padding: 10px 12px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-list.is-compact .fs-list-title {
  font-size: clamp(15px, calc(var(--list-font-size) * .9), 28px);
  padding-bottom: 5px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-list.is-compact .fs-list-item {
  min-height: calc(var(--list-font-size) * 1.35);
  gap: 6px;
  padding: 3px 2px;
}

/* M20.1.1 — List / Checklist alignment polish */
body.screen-shell-builder.screen-builder-fullscreen .fs-list-widget,
body.screen-shell-builder.screen-builder-fullscreen .fs-list-title,
body.screen-shell-builder.screen-builder-fullscreen .fs-list-item,
body.screen-shell-builder.screen-builder-fullscreen .fs-list-text {
  text-align: left !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-item {
  justify-items: start;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-check,
body.screen-shell-builder.screen-builder-fullscreen .fs-list-icon,
body.screen-shell-builder.screen-builder-fullscreen .fs-list-bullet {
  justify-self: start;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-text {
  justify-self: stretch;
  align-self: center;
}


/* M20.1.2 — sticker preview fit + list icon picker */
body.screen-shell-builder.screen-builder-fullscreen .fs-sticker-category-preview,
body.screen-shell-builder.screen-builder-fullscreen .fs-sticker-category-preview div,
body.screen-shell-builder.screen-builder-fullscreen .fs-sticker-preview,
body.screen-shell-builder.screen-builder-fullscreen .fs-sticker-item .fs-sticker-preview {
  overflow: hidden !important;
  min-width: 0;
  min-height: 0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-sticker-category-preview svg,
body.screen-shell-builder.screen-builder-fullscreen .fs-sticker-preview svg,
body.screen-shell-builder.screen-builder-fullscreen .fs-sticker-category-preview img,
body.screen-shell-builder.screen-builder-fullscreen .fs-sticker-preview img {
  max-width: 100% !important;
  max-height: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-icon-art,
body.screen-shell-builder.screen-builder-fullscreen .fs-list-icon-emoji,
body.screen-shell-builder.screen-builder-fullscreen .fs-list-setting-icon-btn span {
  width: 100%;
  height: 100%;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-icon-art svg,
body.screen-shell-builder.screen-builder-fullscreen .fs-list-icon-art img,
body.screen-shell-builder.screen-builder-fullscreen .fs-list-setting-icon-btn svg,
body.screen-shell-builder.screen-builder-fullscreen .fs-list-setting-icon-btn img,
body.screen-shell-builder.screen-builder-fullscreen .fs-list-icon-picker-item svg,
body.screen-shell-builder.screen-builder-fullscreen .fs-list-icon-picker-item img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-setting-icon-btn {
  min-width: 0;
  height: 44px;
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 12px;
  background: #f8fafc;
  color: #6366f1;
  font: 900 22px/1 Inter, system-ui, sans-serif;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 6px;
  overflow: hidden;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-setting-icon-btn:hover {
  border-color: rgba(99, 102, 241, 0.75);
  background: #eef2ff;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-setting-icon-btn.has-icon {
  background: #fff;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-icon-picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 1450;
  display: flex;
  justify-content: flex-end;
  background: rgba(15, 23, 42, .16);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-icon-picker-panel {
  width: min(430px, 92vw);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #fff;
  color: #0f172a;
  box-shadow: -20px 0 60px rgba(15, 23, 42, .18);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-icon-picker-head {
  min-height: 66px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(148, 163, 184, .22);
  background: #f8fafc;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-icon-picker-head div {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 950;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-icon-picker-close {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, .4);
  background: #fff;
  color: #64748b;
  font-size: 24px;
  cursor: pointer;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-icon-picker-cats {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 16px 8px;
  border-bottom: 1px solid rgba(226,232,240,.85);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-icon-cat,
body.screen-shell-builder.screen-builder-fullscreen .fs-list-icon-picker-actions button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(203, 213, 225, .9);
  background: #fff;
  color: #475569;
  font-weight: 750;
  cursor: pointer;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-icon-cat.is-active {
  color: #4338ca;
  background: #eef2ff;
  border-color: rgba(99,102,241,.55);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-icon-picker-actions {
  flex: 0 0 auto;
  padding: 10px 16px 0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-icon-picker-actions button {
  color: #ef4444;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-icon-picker-items {
  flex: 1 1 auto;
  overflow: auto;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-content: start;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-icon-picker-item {
  border: 1px solid rgba(148, 163, 184, .35);
  border-radius: 14px;
  padding: 10px;
  display: grid;
  gap: 8px;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  text-align: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-icon-picker-item:hover {
  border-color: rgba(99, 102, 241, .65);
  box-shadow: 0 12px 28px rgba(99, 102, 241, .12);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-icon-picker-item > span {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: #f8fafc;
  padding: 8px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-list-icon-picker-item strong {
  font-size: 13px;
  font-weight: 800;
}

/* M20.2 Group Maker Widget */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-group-maker {
  overflow: visible;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-group-maker-widget {
  width: 100%;
  height: 100%;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px;
  border-radius: 18px;
  color: var(--widget-text, #10213f);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-group-empty {
  height: 100%;
  min-height: 180px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  text-align: center;
  color: var(--widget-text, #10213f);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-group-empty-icon {
  position: relative;
  width: 64px;
  height: 64px;
  border: 3px solid currentColor;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 34px;
  background: rgba(255,255,255,.52);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-group-empty-icon span {
  position: absolute;
  right: -10px;
  bottom: -10px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #22c55e;
  color: #fff;
  font-size: 18px;
  border: 3px solid #fff;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-group-empty p {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-group-empty button,
body.screen-shell-builder.screen-builder-fullscreen .fs-group-actions button {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  background: linear-gradient(135deg, #6366f1, #3b82f6);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(37,99,235,.2);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-group-grid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-group-grid.is-count-2,
body.screen-shell-builder.screen-builder-fullscreen .fs-group-grid.is-count-3 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.screen-shell-builder.screen-builder-fullscreen .fs-group-grid.is-count-5,
body.screen-shell-builder.screen-builder-fullscreen .fs-group-grid.is-count-6,
body.screen-shell-builder.screen-builder-fullscreen .fs-group-grid.is-count-7,
body.screen-shell-builder.screen-builder-fullscreen .fs-group-grid.is-count-8 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.screen-shell-builder.screen-builder-fullscreen .fs-group-card {
  min-height: 110px;
  border: 2px solid var(--widget-accent, #6366f1);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,.88);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-group-card header {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 14px;
  background: var(--widget-accent, #6366f1);
  color: #fff;
  font-size: calc(var(--group-font-size, 20px) * .86);
  font-weight: 900;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-group-names {
  padding: 6px 0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-group-name {
  padding: 6px 16px;
  font-size: var(--group-font-size, 20px);
  line-height: 1.15;
  font-weight: 700;
  color: #0f172a;
  text-transform: uppercase;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-group-name:nth-child(even) {
  background: rgba(15, 23, 42, 0.06);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-group-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-group-actions button {
  padding: 8px 16px;
  background: #fff;
  color: #0f172a;
  border: 1px solid rgba(15,23,42,.28);
  box-shadow: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-group-actions button[data-group-refresh] {
  width: 38px;
  height: 38px;
  padding: 0;
  font-size: 20px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-group-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 0 0 18px;
  border-bottom: 1px solid rgba(148,163,184,.35);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-group-tab {
  min-height: 46px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #64748b;
  font-weight: 800;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-group-tab.is-active {
  color: #4f46e5;
  border-bottom-color: #6366f1;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-group-names-input {
  min-height: 160px;
  border-color: rgba(99,102,241,.7);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-group-continue {
  float: right;
  width: auto;
  margin-top: 10px;
  padding-inline: 22px;
  border-radius: 999px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-range-input {
  padding: 0;
  accent-color: #6366f1;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-group-count-note {
  display: grid;
  gap: 4px;
  margin: 4px 0 20px;
  color: #64748b;
  font-size: 13px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-group-count-note strong {
  color: #0f172a;
  font-size: 16px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-group-setting-actions {
  align-items: center;
  margin-top: 18px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-secondary-action.is-danger {
  color: #ef4444;
  background: #fff1f2;
  border-color: rgba(248,113,113,.35);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-tool[data-widget-tool="group-maker"] span {
  background: rgba(236,253,245,.9);
}

/* M20.2.2 — Group Maker settings stability polish */
body.screen-shell-builder.screen-builder-fullscreen .fs-group-continue {
  float: none !important;
  display: inline-flex !important;
  width: max-content !important;
  margin: 12px 0 18px auto !important;
  position: relative;
  z-index: 3;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-group-setting-actions {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-group-tab,
body.screen-shell-builder.screen-builder-fullscreen #widgetGroupContinue,
body.screen-shell-builder.screen-builder-fullscreen #widgetGroupCreate,
body.screen-shell-builder.screen-builder-fullscreen #widgetGroupEmpty {
  pointer-events: auto !important;
  cursor: pointer;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-group-names-input {
  resize: vertical;
  min-height: 150px;
  max-height: 260px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-group-tabs + .fs-label {
  clear: both;
}


/* M20.2.3 Group Maker empty-shell and in-widget create action */
body.screen-shell-builder.screen-builder-fullscreen .fs-group-grid.is-empty-groups .fs-group-card {
  background: rgba(255, 255, 255, 0.72);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-group-placeholder {
  padding: 12px 16px;
  color: rgba(15, 23, 42, 0.38);
  font-size: calc(var(--group-font-size, 20px) * .82);
  font-weight: 700;
  font-style: italic;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-group-actions button[data-group-create] {
  background: linear-gradient(135deg, #6366f1, #2563eb);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 12px 28px rgba(37,99,235,.20);
}

/* M20.2.4 — Group Maker interaction/layout fix */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-group-maker {
  overflow: visible;
  align-items: stretch;
  justify-items: stretch;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-group-maker .fs-group-maker-widget {
  align-self: stretch;
  justify-self: stretch;
  box-sizing: border-box;
  overflow: hidden;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-group-grid {
  overflow: auto;
  align-content: start;
  padding-right: 2px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-group-actions {
  flex: 0 0 auto;
  width: 100%;
  justify-content: center;
  padding-top: 2px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-group-actions button[data-group-create] {
  min-width: 142px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-group-continue {
  float: none !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: auto !important;
  margin: 12px 0 24px 0 !important;
  padding: 0 22px !important;
  vertical-align: top;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-group-names-input + .fs-group-continue {
  clear: both;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-group-tabs {
  margin-bottom: 14px;
}

/* M20.2.5 — Group Maker content-fit and minimum usable size */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-group-maker .fs-group-maker-widget {
  min-width: 0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-group-maker .fs-group-grid {
  grid-auto-rows: max-content;
  align-items: start;
  align-content: start;
  overscroll-behavior: contain;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-group-maker .fs-group-card {
  height: max-content;
  min-height: 104px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-group-maker .fs-group-names {
  min-height: 0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-group-maker.is-compact .fs-group-maker-widget {
  gap: 10px;
  padding: 10px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-group-maker.is-compact .fs-group-grid {
  gap: 10px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-group-maker.is-compact .fs-group-card {
  min-height: 86px;
  border-radius: 10px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-group-maker.is-compact .fs-group-card header {
  min-height: 34px;
  padding: 0 12px;
  font-size: calc(var(--group-font-size, 20px) * .78);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-group-maker.is-compact .fs-group-names {
  padding: 4px 0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-group-maker.is-compact .fs-group-name {
  padding: 4px 12px;
  font-size: calc(var(--group-font-size, 20px) * .88);
  line-height: 1.08;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-group-maker.is-tiny .fs-group-maker-widget {
  gap: 8px;
  padding: 8px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-group-maker.is-tiny .fs-group-grid {
  gap: 8px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-group-maker.is-tiny .fs-group-card header {
  min-height: 30px;
  padding: 0 10px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-group-maker.is-tiny .fs-group-name {
  padding: 3px 10px;
  font-size: calc(var(--group-font-size, 20px) * .78);
}


/* M20.2.6 — Spotlight width stability
   Previous M8.5 rules changed the card to width:auto, which lets grid content
   collapse to min-content and makes many spotlight previews look too narrow. */
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-card {
  width: min(88vw, 1180px) !important;
  max-width: min(88vw, 1180px) !important;
  min-height: min(64vh, 620px);
  max-height: min(82vh, 760px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-content:not(.fs-spotlight-image):not(.fs-spotlight-sticker) {
  width: 100% !important;
  min-width: min(74vw, 980px);
  max-width: 100%;
  min-height: min(64vh, 620px);
  max-height: min(82vh, 760px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-list .fs-list-widget,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-group-maker .fs-group-maker-widget,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-randomizer .fs-randomizer-widget,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-scoreboard .fs-scoreboard-widget,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-stopwatch .fs-stopwatch-widget,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-noise .fs-noise-widget {
  width: 100%;
}

/* M20.2.7 — Canvas click and Spotlight natural height polish
   Spotlight should stay wide, but content-heavy widgets should not get stretched
   into a tall white board with empty space at the bottom. */
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-card {
  width: min(82vw, 1060px) !important;
  max-width: min(88vw, 1180px) !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: min(84vh, 760px) !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-content:not(.fs-spotlight-image):not(.fs-spotlight-sticker) {
  width: 100% !important;
  min-width: min(72vw, 920px);
  height: auto !important;
  min-height: 0 !important;
  max-height: min(84vh, 760px) !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-list,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-group-maker,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-randomizer,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-scoreboard,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-noise {
  place-items: stretch !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-list .fs-list-widget,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-group-maker .fs-group-maker-widget,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-randomizer .fs-randomizer-widget,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-scoreboard .fs-scoreboard-widget,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-noise .fs-noise-widget {
  height: auto !important;
  min-height: 0 !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-group-maker .fs-group-grid {
  flex: 0 0 auto !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-text,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-timer,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-clock,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-stopwatch,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-calendar {
  min-height: min(48vh, 460px) !important;
}

/* M20.5 Template visual preview polish */
body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb {
  background: var(--template-thumb-bg, linear-gradient(135deg, #fff7ed, #eef2ff));
  border: 1px solid rgba(255,255,255,.78);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.45);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(37, 99, 235, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, .045) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: .7;
  pointer-events: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb-title {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 14px;
  z-index: 2;
  color: var(--template-accent, #6366f1);
  font-size: 16px;
  line-height: 1.05;
  letter-spacing: -.04em;
  font-weight: 950;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb-emoji {
  z-index: 4;
  top: auto;
  left: auto;
  right: 12px;
  bottom: 12px;
  width: 34px;
  height: 34px;
  border-radius: 13px;
  font-size: 18px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb-frame {
  position: absolute;
  z-index: 1;
  left: 9%;
  right: 9%;
  top: 28%;
  width: 82%;
  height: 45%;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(15,23,42,.08));
  pointer-events: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-mini-card {
  position: absolute;
  z-index: 3;
  display: grid;
  gap: 5px;
  padding: 8px;
  border-radius: 13px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 12px 26px rgba(15,23,42,.08);
  backdrop-filter: blur(8px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-mini-card b,
body.screen-shell-builder.screen-builder-fullscreen .fs-template-mini-card span,
body.screen-shell-builder.screen-builder-fullscreen .fs-template-mini-row i {
  display: block;
  border-radius: 999px;
  background: rgba(15,23,42,.12);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-mini-card b {
  width: 52%;
  height: 8px;
  background: color-mix(in srgb, var(--template-accent, #6366f1) 62%, white);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-mini-card span {
  height: 7px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-mini-card-main {
  left: 13%;
  right: 13%;
  bottom: 22px;
  min-height: 48px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-mini-card-side {
  right: 12%;
  top: 52px;
  width: 35%;
  min-height: 44px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-mini-row {
  position: absolute;
  z-index: 3;
  left: 13%;
  right: 13%;
  bottom: 15px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-mini-row i {
  position: static !important;
  width: auto !important;
  height: 16px !important;
  min-height: 0 !important;
  background: color-mix(in srgb, var(--template-accent, #6366f1) 36%, white) !important;
  box-shadow: none !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb.is-layout-frame .fs-template-mini-card-main {
  left: 26%;
  right: 23%;
  bottom: 45px;
  min-height: 36px;
  place-items: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb.is-layout-frame .fs-template-mini-card-side,
body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb.is-layout-frame .fs-template-mini-row {
  display: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb.is-layout-columns .fs-template-mini-card-main {
  left: 10%;
  right: auto;
  bottom: 24px;
  width: 38%;
  min-height: 58px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb.is-layout-columns .fs-template-mini-card-side {
  right: 10%;
  top: auto;
  bottom: 24px;
  width: 38%;
  min-height: 58px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb.is-layout-steps .fs-template-mini-card-main {
  left: 12%;
  right: 12%;
  bottom: 18px;
  min-height: 72px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb.is-layout-steps .fs-template-mini-card-main span {
  height: 9px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb.is-layout-steps .fs-template-mini-card-side {
  display: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb.is-layout-score .fs-template-mini-card-main {
  left: 9%;
  right: 9%;
  bottom: 28px;
  min-height: 48px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb.is-layout-score .fs-template-mini-card-main b,
body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb.is-layout-score .fs-template-mini-card-main span {
  height: 30px;
  width: auto;
  border-radius: 11px;
  background: color-mix(in srgb, var(--template-accent, #6366f1) 22%, white);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb.is-layout-score .fs-template-mini-card-side,
body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb.is-layout-score .fs-template-mini-row {
  display: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb.is-layout-grid .fs-template-mini-card-main {
  left: 11%;
  right: 11%;
  bottom: 20px;
  min-height: 76px;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb.is-layout-grid .fs-template-mini-card-main b,
body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb.is-layout-grid .fs-template-mini-card-main span {
  height: 26px;
  width: auto;
  border-radius: 11px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb.is-layout-grid .fs-template-mini-card-side,
body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb.is-layout-grid .fs-template-mini-row {
  display: none;
}

/* M20.5.1 — Template library thumbnail overlap fix
   Keep the thumbnail expressive, but prevent title/cards/frame from stacking on top of each other. */
body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb {
  height: 150px;
  min-height: 150px;
  isolation: isolate;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb-title {
  top: 16px;
  left: 14px;
  right: 54px;
  max-height: 36px;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.08;
  letter-spacing: -.035em;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb-emoji {
  right: 12px;
  bottom: 12px;
  width: 32px;
  height: 32px;
  border-radius: 12px;
  font-size: 17px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb-frame {
  left: 12%;
  right: 12%;
  top: 42%;
  width: 76%;
  height: 30%;
  opacity: .92;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-mini-card {
  gap: 4px;
  padding: 7px;
  border-radius: 12px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-mini-card b {
  height: 7px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-mini-card span {
  height: 6px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-mini-card-main {
  left: 13%;
  right: 13%;
  bottom: 34px;
  min-height: 40px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-mini-card-side {
  top: 68px;
  right: 12%;
  width: 34%;
  min-height: 34px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-mini-row {
  left: 14%;
  right: 16%;
  bottom: 12px;
  gap: 6px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-mini-row i {
  height: 14px !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb.is-layout-frame .fs-template-thumb-title {
  right: 18px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb.is-layout-frame .fs-template-thumb-frame {
  top: 34%;
  height: 34%;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb.is-layout-frame .fs-template-mini-card-main {
  left: 28%;
  right: 24%;
  bottom: 28px;
  min-height: 34px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb.is-layout-columns .fs-template-mini-card-main,
body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb.is-layout-columns .fs-template-mini-card-side {
  bottom: 20px;
  min-height: 52px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb.is-layout-steps .fs-template-mini-card-main {
  left: 13%;
  right: 13%;
  bottom: 18px;
  min-height: 58px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb.is-layout-score .fs-template-mini-card-main {
  left: 9%;
  right: 9%;
  bottom: 22px;
  min-height: 42px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb.is-layout-score .fs-template-mini-card-main b,
body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb.is-layout-score .fs-template-mini-card-main span {
  height: 24px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb.is-layout-grid .fs-template-mini-card-main {
  bottom: 18px;
  min-height: 64px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb.is-layout-grid .fs-template-mini-card-main b,
body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb.is-layout-grid .fs-template-mini-card-main span {
  height: 22px;
}

/* M21.1 Speaking Recorder Widget */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-recorder {
  background: var(--widget-bg, rgba(255,255,255,.94));
  color: var(--widget-text, #10213f);
  border: 1px solid rgba(148,163,184,.24);
  box-shadow: 0 18px 46px rgba(15,23,42,.14);
  overflow: visible;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-recorder-widget {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, auto) auto;
  gap: 8px;
  align-content: center;
  text-align: left;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-recorder-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--widget-text, #10213f);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-recorder-head span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: color-mix(in srgb, var(--widget-accent, #6366f1) 16%, #fff);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-recorder-head strong {
  font-size: 17px;
  font-weight: 900;
  line-height: 1.05;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-recorder-prompt {
  margin: 0;
  color: rgba(15,23,42,.64);
  font-size: 13px;
  line-height: 1.25;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-recorder-time {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-recorder-time strong {
  font-size: clamp(26px, 3.1vw, 48px);
  font-weight: 950;
  letter-spacing: -0.04em;
  line-height: 1;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-recorder-time span {
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .08em;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-recorder-meter {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148,163,184,.20);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-recorder-meter i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #fb7185, var(--widget-accent, #6366f1));
  transition: width .2s ease;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-recorder-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-recorder-actions button {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  padding: 0 12px;
  background: #eef2ff;
  color: #25316d;
  font-weight: 900;
  cursor: pointer;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-recorder-actions button[data-recorder-action="record"] {
  background: linear-gradient(135deg, #fb7185, #6366f1);
  color: #fff;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-recorder-actions button:disabled {
  opacity: .42;
  cursor: not-allowed;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-recorder-widget audio {
  width: 100%;
  height: 32px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-recorder-widget.is-recording .fs-recorder-head span {
  animation: fsRecorderPulse 1s infinite;
}
@keyframes fsRecorderPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(251,113,133,.35); }
  50% { box-shadow: 0 0 0 10px rgba(251,113,133,0); }
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-recorder.is-compact .fs-recorder-prompt,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-recorder.is-tiny .fs-recorder-prompt,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-recorder.is-tiny audio {
  display: none;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-recorder.is-tiny .fs-recorder-head strong,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-recorder.is-tiny .fs-recorder-time span {
  display: none;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-recorder.is-tiny .fs-recorder-time strong {
  font-size: 24px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-recorder-setting-note {
  margin: 8px 0 12px;
  color: #64748b;
  font-size: 13px;
  font-weight: 750;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-tool[data-widget-tool="recorder"] span {
  background: rgba(255, 228, 230, .95);
}

/* M20.4 compatibility: bottom dock More popover */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-more-popover {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 14px);
  transform: translateX(-50%) translateY(8px);
  display: none;
  grid-template-columns: repeat(4, minmax(70px, 1fr));
  gap: 10px;
  width: min(430px, calc(100vw - 48px));
  padding: 16px;
  border: 1px solid rgba(226,232,240,.95);
  border-radius: 24px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 24px 70px rgba(15,23,42,.22);
  backdrop-filter: blur(18px);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-more-popover.is-open {
  display: grid;
  transform: translateX(-50%) translateY(0);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-more-popover .fs-widget-tool {
  min-width: 0;
  min-height: 70px;
  color: #334155;
  background: transparent;
  box-shadow: none;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-more-popover .fs-widget-tool:hover {
  background: rgba(99,102,241,.10);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-more-toggle.is-active {
  background: rgba(99,102,241,.28);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-dock.is-collapsed .fs-widget-more-popover,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-dock.is-collapsed .fs-widget-more-toggle {
  display: none;
}

/* M21.2 Recorder multiple recordings */
body.screen-shell-builder.screen-builder-fullscreen .fs-recorder-widget {
  grid-template-rows: auto auto auto auto auto auto minmax(0, 1fr);
  align-content: start;
  overflow: hidden;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-recorder {
  overflow: visible;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-recorder-list {
  min-height: 0;
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  align-items: start;
  gap: 7px;
  overflow: auto;
  padding-right: 2px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-recorder-row {
  display: grid;
  grid-template-columns: minmax(76px, .8fr) minmax(110px, 1.6fr) 28px;
  align-items: center;
  gap: 8px;
  padding: 7px;
  border: 1px solid rgba(148,163,184,.22);
  border-radius: 14px;
  background: rgba(255,255,255,.70);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-recorder-row-meta {
  min-width: 0;
  display: grid;
  gap: 2px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-recorder-row-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-recorder-row-meta span {
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-recorder-row audio {
  width: 100%;
  height: 30px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-recorder-row-main {
  min-width: 0;
  display: grid;
  gap: 5px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-recorder-row-transcript {
  max-height: 58px;
  overflow: auto;
  padding: 7px 9px;
  border-radius: 10px;
  color: #334155;
  background: rgba(241,245,249,.72);
  font-size: 11px;
  line-height: 1.28;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-recorder-live-transcript {
  display: grid;
  gap: 5px;
  padding: 9px 10px;
  border: 1px solid rgba(148,163,184,.24);
  border-radius: 14px;
  background: rgba(255,255,255,.62);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-recorder-live-transcript label {
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-recorder-live-text {
  min-height: 22px;
  color: #0f172a;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.32;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-recorder-live-text.is-empty {
  color: rgba(100,116,139,.72);
  font-weight: 700;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-recorder-live-interim {
  color: #64748b;
  font-size: 11px;
  font-style: italic;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-recorder-row > button {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 999px;
  background: #fee2e2;
  color: #ef4444;
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-recorder-empty {
  padding: 10px 12px;
  border: 1px dashed rgba(148,163,184,.42);
  border-radius: 14px;
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
  background: rgba(255,255,255,.45);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-recorder.is-compact .fs-recorder-row {
  grid-template-columns: minmax(62px, .8fr) minmax(88px, 1.5fr) 24px;
  gap: 6px;
  padding: 5px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-recorder.is-compact .fs-recorder-row-meta strong {
  font-size: 11px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-recorder.is-compact .fs-recorder-row audio {
  height: 28px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-recorder.is-tiny .fs-recorder-list,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-recorder.is-tiny .fs-recorder-meter {
  display: none;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-recorder.is-tiny .fs-recorder-actions button {
  min-height: 28px;
  padding: 0 9px;
  font-size: 11px;
}


/* M21.3.1 Recorder polish: keep widget toolbar visible above recorder content */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-recorder .fs-widget-toolbar {
  z-index: 60;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-recorder .fs-resize-handle {
  z-index: 55;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-recorder-live-transcript {
  display: grid;
}


/* M21.3.3 Recorder toolbar restore: keep edit chrome visible outside recorder content */
body.screen-shell-builder.screen-builder-fullscreen:not(.is-projecting) .fs-widget.is-selected > .fs-widget-toolbar {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 9999 !important;
  pointer-events: auto !important;
}
body.screen-shell-builder.screen-builder-fullscreen:not(.is-projecting) .fs-widget.is-selected > .fs-resize-handle {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 9998 !important;
}
body.screen-shell-builder.screen-builder-fullscreen:not(.is-projecting) .fs-widget-recorder {
  overflow: visible !important;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-recorder > .fs-recorder-widget {
  overflow: hidden;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-recorder .fs-recorder-list {
  align-content: start;
  align-items: start;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-recorder .fs-recorder-live-transcript {
  display: grid !important;
}

/* Safer spotlight padding for recorder: do not change the outer spotlight overflow/chrome rules. */
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-recorder .fs-recorder-widget {
  box-sizing: border-box;
  padding: clamp(10px, 1.6vw, 18px);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-recorder .fs-recorder-list {
  max-height: min(42vh, 360px);
  overflow: auto;
  padding-right: 6px;
}


/* M21.4 Choice Board / Prompt Cards Widget */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-choice-board {
  overflow: visible;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-choice-board-widget {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: 22px;
  background: var(--widget-bg, #ffffff);
  color: var(--widget-text, #10213f);
  box-shadow: 0 18px 40px rgba(15,23,42,.10);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-choice-board-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-choice-board-head strong {
  font-size: calc(var(--choice-font-size, 20px) * 1.28);
  font-weight: 950;
  line-height: 1.05;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-choice-board-head p {
  margin: 5px 0 0;
  color: rgba(15,23,42,.62);
  font-size: calc(var(--choice-font-size, 20px) * .72);
  font-weight: 750;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-choice-board-head > span {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(99,102,241,.10);
  color: var(--widget-accent, #6366f1);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-choice-board-grid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(var(--choice-columns, 3), minmax(0, 1fr));
  gap: 10px;
  align-content: start;
  overflow: auto;
  padding: 2px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-choice-card {
  min-height: 88px;
  border: 2px solid rgba(99,102,241,.16);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(245,247,255,.86));
  color: #10213f;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-choice-card:hover {
  transform: translateY(-1px);
  border-color: rgba(99,102,241,.42);
  box-shadow: 0 12px 26px rgba(99,102,241,.12);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-choice-card span {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(99,102,241,.12);
  color: var(--widget-accent, #6366f1);
  font-size: 13px;
  font-weight: 950;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-choice-card strong {
  font-size: var(--choice-font-size, 20px);
  line-height: 1.08;
  font-weight: 900;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-choice-card em {
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .08em;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-choice-card.is-selected {
  border-color: var(--widget-accent, #6366f1);
  box-shadow: 0 16px 32px rgba(99,102,241,.18);
  background: linear-gradient(145deg, rgba(238,242,255,.98), rgba(255,255,255,.94));
}
body.screen-shell-builder.screen-builder-fullscreen .fs-choice-card.is-done {
  opacity: .72;
  border-color: rgba(34,197,94,.44);
  background: linear-gradient(145deg, rgba(240,253,244,.96), rgba(255,255,255,.88));
}
body.screen-shell-builder.screen-builder-fullscreen .fs-choice-card.is-done span {
  background: rgba(34,197,94,.16);
  color: #16a34a;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-choice-actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-choice-actions button {
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
  background: #eef2ff;
  color: #1e2f66;
  font-weight: 900;
  cursor: pointer;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-choice-actions button:first-child {
  background: linear-gradient(135deg, #6366f1, #22c1dc);
  color: #fff;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-choice-actions button:disabled {
  opacity: .42;
  cursor: not-allowed;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-choice-board-empty {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 140px;
  border: 2px dashed rgba(99,102,241,.25);
  border-radius: 18px;
  color: #64748b;
  font-weight: 850;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-choice-board.is-compact .fs-choice-board-widget {
  padding: 12px;
  gap: 8px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-choice-board.is-compact .fs-choice-card {
  min-height: 64px;
  padding: 10px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-choice-board.is-tiny .fs-choice-board-head p,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-choice-board.is-tiny .fs-choice-actions,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-choice-board.is-tiny .fs-choice-card em {
  display: none;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-tool[data-widget-tool="choice-board"] span {
  background: rgba(238,242,255,.95);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-choice-items-input {
  min-height: 150px;
}

/* M21.4.2 Choice Board polish: stable cards, pick animation, safer default fit */
body.screen-shell-builder.screen-builder-fullscreen .fs-choice-card {
  min-width: 0;
  min-height: 108px;
  box-sizing: border-box;
  contain: layout paint;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-choice-card em {
  min-height: 14px;
  display: block;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-choice-card em.is-placeholder {
  visibility: hidden;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-choice-card.is-rolling {
  border-color: rgba(34,197,94,.75);
  background: linear-gradient(145deg, rgba(236,253,245,.98), rgba(255,255,255,.94));
  transform: translateY(-2px) scale(1.015);
  box-shadow: 0 16px 32px rgba(34,197,94,.18);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-choice-card.is-rolling-final {
  animation: fsChoiceFinalPulse .34s ease-out 1;
}
@keyframes fsChoiceFinalPulse {
  0% { transform: scale(1); }
  45% { transform: scale(1.035); }
  100% { transform: scale(1); }
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-choice-board.is-compact .fs-choice-card {
  min-height: 86px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-choice-board.is-tiny .fs-choice-card {
  min-height: 64px;
}

/* M21.4.3 Choice Board prompt detail panel */
body.screen-shell-builder.screen-builder-fullscreen .fs-choice-detail-panel {
  flex: 0 0 auto;
  border: 1px solid rgba(99,102,241,.16);
  border-radius: 16px;
  background: rgba(255,255,255,.72);
  padding: 10px 12px;
  color: #10213f;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-choice-detail-panel > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-choice-detail-panel span {
  color: #64748b;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-choice-detail-panel strong {
  font-size: calc(var(--choice-font-size, 20px) * .68);
  font-weight: 950;
  color: var(--widget-accent, #6366f1);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-choice-detail-panel p,
body.screen-shell-builder.screen-builder-fullscreen .fs-choice-detail-panel ul {
  margin: 0;
  color: rgba(15,23,42,.72);
  font-size: calc(var(--choice-font-size, 20px) * .60);
  font-weight: 750;
  line-height: 1.35;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-choice-detail-panel ul {
  padding-left: 18px;
  display: grid;
  gap: 2px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-choice-detail-panel.is-empty {
  opacity: .76;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-choice-board.is-compact .fs-choice-detail-panel {
  padding: 8px 10px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-choice-board.is-tiny .fs-choice-detail-panel {
  display: none;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-field-hint {
  margin: -4px 0 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

/* M21.5 Stability guard: safe fallback if a widget render branch throws */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget.has-render-error {
  overflow: visible;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-error {
  width: 100%;
  height: 100%;
  min-height: 90px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  border: 2px dashed rgba(239, 68, 68, .38);
  border-radius: 16px;
  background: rgba(255, 241, 242, .86);
  color: #991b1b;
  text-align: center;
  font-weight: 850;
  padding: 12px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-error span {
  color: #b91c1c;
  font-size: 12px;
  opacity: .82;
}

/* M21.5.1 Recorder performance: explicit saving state without full-screen redraw */
body.screen-shell-builder.screen-builder-fullscreen .fs-recorder-widget.is-saving .fs-recorder-head span {
  animation: none;
  opacity: .78;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-recorder-widget.is-saving .fs-recorder-meter i {
  background: linear-gradient(90deg, #94a3b8, var(--widget-accent, #6366f1));
}
body.screen-shell-builder.screen-builder-fullscreen .fs-recorder-widget.is-saving .fs-recorder-actions button:not([data-recorder-action="clear"]) {
  opacity: .42;
  cursor: wait;
}

/* M22.1 Activity Picker / 游戏活动入口 */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-tool[data-widget-tool="activity-picker"] span {
  background: rgba(254, 243, 199, .95);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-activity-picker-panel {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px 24px 118px;
  background: rgba(15, 23, 42, .18);
  backdrop-filter: blur(5px);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-activity-picker-panel.is-open {
  display: flex;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-activity-picker-card {
  width: min(760px, calc(100vw - 48px));
  max-height: min(620px, calc(100vh - 170px));
  transform: translateY(-28px);
  overflow: auto;
  border: 1px solid rgba(226, 232, 240, .92);
  border-radius: 28px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 28px 80px rgba(15, 23, 42, .26);
  padding: 20px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-activity-picker-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-activity-picker-head div {
  display: grid;
  gap: 5px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-activity-picker-head span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #fef3c7;
  font-size: 24px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-activity-picker-head strong {
  font-size: 22px;
  color: #0f172a;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-activity-picker-head p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  font-weight: 650;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-activity-picker-head button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 24px;
  cursor: pointer;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-activity-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-activity-card {
  min-height: 148px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 8px;
  text-align: left;
  border: 1px solid rgba(203, 213, 225, .84);
  border-radius: 22px;
  padding: 16px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-activity-card:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, .55);
  box-shadow: 0 16px 38px rgba(99, 102, 241, .16);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-activity-card .fs-activity-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(99, 102, 241, .10);
  font-size: 24px;
  color: #4f46e5;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-activity-picker-head .fs-tool-icon,
body.screen-shell-builder.screen-builder-fullscreen .fs-activity-card .fs-tool-icon {
  display: block;
  width: 24px;
  height: 24px;
  background: currentColor;
  -webkit-mask: var(--fs-tool-icon) center / contain no-repeat;
  mask: var(--fs-tool-icon) center / contain no-repeat;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-activity-picker-head span {
  color: #4f46e5;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-activity-card strong {
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-activity-card em {
  color: #64748b;
  font-size: 13px;
  font-style: normal;
  font-weight: 650;
  line-height: 1.35;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-activity-card i {
  width: max-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 5px 9px;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-activity-card.is-disabled {
  opacity: .54;
  cursor: not-allowed;
  box-shadow: none;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-activity-card.is-disabled i {
  background: #f1f5f9;
  color: #64748b;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-activity-picker-note {
  margin-top: 14px;
  border-radius: 18px;
  padding: 12px 14px;
  background: #f8fafc;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}
@media (max-width: 720px) {
  body.screen-shell-builder.screen-builder-fullscreen .fs-activity-picker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  body.screen-shell-builder.screen-builder-fullscreen .fs-activity-picker-panel {
    align-items: center;
    padding: 16px 12px 96px;
  }
  body.screen-shell-builder.screen-builder-fullscreen .fs-activity-picker-card {
    transform: translateY(-12px);
  }
  body.screen-shell-builder.screen-builder-fullscreen .fs-activity-picker-grid {
    grid-template-columns: 1fr;
  }
}

/* M22.2 Game FX foundation: reusable celebration feedback for classroom activities */
body.screen-shell-builder.screen-builder-fullscreen .fs-game-fx {
  position: fixed;
  inset: 0;
  z-index: 999999;
  pointer-events: none;
  overflow: hidden;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-game-fx-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.8);
  animation: fsGameFxBurst 950ms cubic-bezier(.16, .9, .22, 1) var(--delay, 0ms) forwards;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .16);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-game-fx-dot.is-star {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  transform: translate(-50%, -50%) rotate(45deg) scale(.8);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-game-fx-badge {
  position: absolute;
  transform: translate(-50%, -50%) scale(.84);
  padding: 12px 20px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  font-weight: 950;
  font-size: 24px;
  letter-spacing: .01em;
  box-shadow: 0 22px 52px rgba(37, 99, 235, .24);
  opacity: 0;
  animation: fsGameFxBadge 980ms cubic-bezier(.16, .9, .22, 1) forwards;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-game-fx-score .fs-game-fx-badge {
  background: linear-gradient(135deg, #f59e0b, #ec4899);
}
@keyframes fsGameFxBurst {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.6) rotate(0deg); }
  16% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(.18) rotate(var(--rot)); }
}
@keyframes fsGameFxBadge {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.78); }
  18% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); }
  58% { opacity: 1; transform: translate(-50%, -72%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -118%) scale(.92); }
}
@media (prefers-reduced-motion: reduce) {
  body.screen-shell-builder.screen-builder-fullscreen .fs-game-fx { display: none; }
}

/* M22.3 Trivia / Jeopardy Widget */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-trivia {
  overflow: visible;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-widget {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border-radius: 18px;
  color: var(--widget-text, #10213f);
  overflow: hidden;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-head strong {
  display: block;
  font-size: clamp(24px, 3vw, 44px);
  line-height: 1;
  font-weight: 950;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-head p {
  margin: 8px 0 0;
  color: rgba(15, 23, 42, .62);
  font-size: 15px;
  font-weight: 760;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-head > span {
  border-radius: 999px;
  padding: 9px 14px;
  background: color-mix(in srgb, var(--widget-accent, #6366f1) 12%, #fff);
  color: var(--widget-accent, #6366f1);
  font-weight: 950;
  white-space: nowrap;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-teams {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 8px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-team {
  border: 2px solid color-mix(in srgb, var(--team-accent) 55%, #fff);
  border-radius: 14px;
  padding: 8px 10px;
  background: color-mix(in srgb, var(--team-accent) 10%, #fff);
  text-align: center;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-team span {
  display: block;
  font-size: 12px;
  font-weight: 900;
  color: #475569;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-team strong {
  display: block;
  font-size: 24px;
  line-height: 1;
  margin-top: 4px;
  color: var(--team-accent);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-board {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(var(--trivia-cols, 3), minmax(0, 1fr));
  gap: 8px;
  overflow: auto;
  padding: 2px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-category,
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-cell {
  min-height: clamp(38px, 6.2vh, 52px);
  border-radius: 14px;
  display: grid;
  place-items: center;
  text-align: center;
  font-weight: 950;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-category {
  background: linear-gradient(135deg, var(--widget-accent, #6366f1), #06b6d4);
  color: #fff;
  font-size: 15px;
  padding: 8px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-cell {
  border: 2px solid color-mix(in srgb, var(--widget-accent, #6366f1) 25%, #fff);
  background: rgba(255, 255, 255, .88);
  color: var(--widget-accent, #6366f1);
  font-size: clamp(22px, 2.5vw, 38px);
  cursor: pointer;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-cell:not(.is-done):hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(99, 102, 241, .16);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-cell.is-done {
  color: #cbd5e1;
  background: #f1f5f9;
  cursor: default;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-cell.is-empty { visibility: hidden; }
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-question-panel {
  position: absolute;
  inset: 18px;
  z-index: 6;
  border-radius: 22px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 26px 70px rgba(15,23,42,.22);
  border: 1px solid rgba(148, 163, 184, .32);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-question-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--widget-accent, #6366f1);
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .08em;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-question-text {
  font-size: clamp(30px, 4vw, 58px);
  line-height: 1.08;
  font-weight: 950;
  max-width: 92%;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-option-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px;
  width: min(840px, 92%);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-option-list button {
  border: 2px solid rgba(99, 102, 241, .18);
  border-radius: 14px;
  background: #fff;
  color: #0f172a;
  min-height: 58px;
  padding: 10px 16px;
  font-size: clamp(18px, 2vw, 28px);
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-option-list button:hover {
  border-color: rgba(99, 102, 241, .48);
  box-shadow: 0 14px 30px rgba(99, 102, 241, .16);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-feedback {
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 950;
  background: #fee2e2;
  color: #991b1b;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-feedback.is-correct {
  background: #dcfce7;
  color: #166534;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-answer {
  display: none;
  border-radius: 16px;
  background: #f0fdf4;
  color: #16a34a;
  padding: 12px 18px;
  font-size: clamp(20px, 2vw, 30px);
  font-weight: 900;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-answer.is-visible { display: block; }
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-question-actions,
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-award-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-question-actions button,
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-award-row button {
  border: 0;
  border-radius: 999px;
  min-height: 40px;
  padding: 0 16px;
  font-weight: 900;
  cursor: pointer;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-question-actions button {
  background: #eef2ff;
  color: #3730a3;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-award-row button {
  background: var(--team-accent);
  color: #fff;
  box-shadow: 0 12px 24px color-mix(in srgb, var(--team-accent) 24%, transparent);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-empty {
  display: grid;
  place-items: center;
  min-height: 160px;
  border-radius: 18px;
  background: rgba(255,255,255,.7);
  font-weight: 850;
  color: #64748b;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-team-settings {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-team-settings label {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 8px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-team-settings span {
  width: 14px;
  height: 14px;
  border-radius: 999px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-trivia.is-compact .fs-trivia-widget { padding: 14px; gap: 8px; }
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-trivia.is-compact .fs-trivia-teams { display: none; }
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-trivia.is-tiny .fs-trivia-head p { display: none; }

/* M22.3.1 Trivia reliability + readability polish */
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-widget {
  background: var(--widget-bg, rgba(255, 255, 255, .96));
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-widget.has-active-question .fs-trivia-board,
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-widget.has-active-question .fs-trivia-teams,
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-widget.has-active-question .fs-trivia-head {
  opacity: .34;
  filter: blur(.2px);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-question-panel {
  inset: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,.99), rgba(248,250,252,.98));
  border: 2px solid rgba(99, 102, 241, .22);
  box-shadow: 0 28px 80px rgba(15,23,42,.28);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-question-text {
  color: #0f172a;
  text-shadow: none;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-question-meta {
  color: #f59e0b;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-answer {
  display: none;
  background: #dcfce7;
  color: #166534;
  border: 2px solid rgba(34,197,94,.26);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-award-row button:active,
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-cell:not(.is-done):active {
  transform: scale(.98);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-setting-actions {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-setting-input {
  min-height: 260px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-game-fx-dot {
  width: 14px;
  height: 14px;
  animation-duration: 1250ms;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-game-fx-dot.is-star {
  width: 20px;
  height: 20px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-game-fx-badge {
  font-size: 30px;
  padding: 16px 26px;
  box-shadow: 0 30px 70px rgba(236, 72, 153, .34);
}


/* M22.3.2 Trivia classroom polish: stable click, local FX, clearer layout */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-trivia,
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-widget {
  position: relative;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-game-fx.is-local {
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  overflow: visible;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-game-fx.is-local .fs-game-fx-badge,
body.screen-shell-builder.screen-builder-fullscreen .fs-game-fx.is-local .fs-game-fx-dot {
  left: 50%;
  top: 50%;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-game-fx.is-local .fs-game-fx-badge {
  font-size: clamp(24px, 3.2vw, 42px);
  padding: 18px 30px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-teams {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-team {
  flex: 0 1 180px;
  min-width: 132px;
  max-width: 240px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-question-panel {
  color: #0f172a;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-question-actions button[data-trivia-action="answer"] {
  min-width: 148px;
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  color: #fff;
  box-shadow: 0 14px 30px rgba(37, 99, 235, .22);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-award-row button {
  min-width: 136px;
  min-height: 44px;
  font-size: 15px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-cell:not(.is-done):focus-visible {
  outline: 4px solid rgba(99,102,241,.28);
  outline-offset: 3px;
}

/* M22.3.3 Trivia final classroom polish: click reliability, centered modal, cleaner settings */
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-widget {
  text-align: left;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-head strong,
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-head p {
  text-align: left;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-question-panel {
  inset: 0 !important;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.995), rgba(248,250,252,.992));
  border: 2px solid rgba(99,102,241,.24);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.78), 0 28px 80px rgba(15,23,42,.22);
  padding: clamp(28px, 5cqw, 70px);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-widget.has-active-question .fs-trivia-board,
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-widget.has-active-question .fs-trivia-teams,
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-widget.has-active-question .fs-trivia-head {
  opacity: .18;
  filter: blur(.35px);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-question-text {
  text-align: center;
  max-width: min(96%, 980px);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-format-hint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(241,245,249,.9);
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-format-hint strong {
  color: #334155;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-format-hint span {
  margin-left: auto;
  color: #94a3b8;
  font-weight: 900;
}


/* M22.4 Trivia AI draft + interaction fix */
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-ai-box {
  display: grid;
  gap: 8px;
  margin: 12px 0 16px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 18px;
  background: rgba(248, 250, 252, .82);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-cell {
  touch-action: manipulation;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-question-panel,
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-question-panel * {
  pointer-events: auto;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-game-fx-score .fs-game-fx-badge,
body.screen-shell-builder.screen-builder-fullscreen .fs-game-fx.is-local .fs-game-fx-badge {
  min-width: 180px;
  text-align: center;
}


/* M22.5 Activity reuse: Trivia to Choice Board */
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-reuse-box {
  display: grid;
  gap: 8px;
  margin: 12px 0 14px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(99, 102, 241, .18);
  background: linear-gradient(135deg, rgba(238,242,255,.9), rgba(240,253,250,.7));
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-reuse-box strong {
  color: #334155;
  font-size: 13px;
  font-weight: 900;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-reuse-box span {
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-reuse-box .fs-secondary-action {
  margin-top: 2px;
}

/* M22.5.1 Activity reuse planner */
body.screen-shell-builder.screen-builder-fullscreen .fs-activity-transfer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 8px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-activity-transfer-card {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, .25);
  background: rgba(255, 255, 255, .75);
  cursor: pointer;
  user-select: none;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-activity-transfer-card input {
  width: 16px;
  height: 16px;
  accent-color: #6366f1;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-activity-transfer-card b {
  display: block;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-activity-transfer-card small {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-activity-transfer-card.is-available:hover {
  border-color: rgba(99, 102, 241, .35);
  box-shadow: 0 12px 26px rgba(99, 102, 241, .12);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-activity-transfer-card.is-disabled {
  opacity: .55;
  cursor: not-allowed;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-activity-placement-row {
  display: grid;
  gap: 8px;
  margin: 10px 0 6px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(241, 245, 249, .8);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-activity-placement-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-size: 12px;
  font-weight: 850;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-activity-placement-row input {
  accent-color: #6366f1;
}

/* M22.5.2 Activity reuse panel polish */
body.screen-shell-builder.screen-builder-fullscreen .fs-trivia-setting-actions {
  margin: 12px 0 16px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-activity-placement-row {
  align-items: stretch;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-activity-placement-row label {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  justify-items: start;
  column-gap: 10px;
  width: 100%;
  text-align: left;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-activity-placement-row input {
  grid-column: 1;
  justify-self: start;
  margin: 0;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-activity-placement-row span {
  grid-column: 2;
  display: block;
  text-align: left;
  line-height: 1.25;
}

/* M22.5.3 — cross-screen widget clipboard helper. */
.fs-clipboard-panel {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(99, 102, 241, .18);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(238, 242, 255, .92), rgba(236, 253, 245, .72));
  color: #10213f;
}
.fs-clipboard-panel strong {
  display: block;
  font-size: 15px;
  margin-bottom: 6px;
}
.fs-clipboard-panel p {
  margin: 0 0 12px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

/* M22.6 Sentence Builder Widget */
body.screen-shell-builder.screen-builder-fullscreen .fs-sentence-builder-widget {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  border-radius: 22px;
  background: var(--widget-bg, #fff);
  color: var(--widget-text, #10213f);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-sentence-builder-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-sentence-builder-head strong {
  display: block;
  font-size: clamp(24px, 3vw, 46px);
  line-height: 1;
  font-weight: 950;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-sentence-builder-head p {
  margin: 8px 0 0;
  color: rgba(15,23,42,.62);
  font-size: 16px;
  font-weight: 760;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-sentence-builder-head > span {
  border-radius: 999px;
  padding: 8px 14px;
  background: color-mix(in srgb, var(--widget-accent, #6366f1) 12%, #fff);
  color: var(--widget-accent, #6366f1);
  font-weight: 950;
  white-space: nowrap;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-sentence-answer,
body.screen-shell-builder.screen-builder-fullscreen .fs-sentence-bank {
  border-radius: 18px;
  padding: 14px;
  display: flex;
  align-items: center;
  align-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-sentence-answer {
  min-height: 92px;
  background: color-mix(in srgb, var(--widget-accent, #6366f1) 7%, #fff);
  border: 2px dashed color-mix(in srgb, var(--widget-accent, #6366f1) 32%, #fff);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-sentence-answer em {
  color: rgba(15,23,42,.42);
  font-weight: 900;
  font-style: normal;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-sentence-bank {
  min-height: 76px;
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(148,163,184,.22);
  overflow: auto;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-sentence-token {
  border: 0;
  border-radius: 999px;
  padding: 10px 15px;
  font-size: var(--sentence-font-size, 24px);
  font-weight: 950;
  color: #10213f;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15,23,42,.08);
  cursor: pointer;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-sentence-token:hover:not(:disabled) {
  transform: translateY(-1px);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-sentence-token.is-built {
  color: #fff;
  background: linear-gradient(135deg, var(--widget-accent, #6366f1), #06b6d4);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-sentence-token.is-used {
  opacity: .32;
  cursor: default;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-sentence-hint {
  border-radius: 16px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(148,163,184,.24);
  padding: 12px 14px;
  display: flex;
  gap: 12px;
  align-items: center;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-sentence-hint span {
  color: #64748b;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .08em;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-sentence-hint strong {
  font-size: 16px;
  color: #10213f;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-sentence-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: auto;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-sentence-actions button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 950;
  color: #10213f;
  background: rgba(255,255,255,.86);
  cursor: pointer;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-sentence-actions button:first-child {
  color: #fff;
  background: linear-gradient(135deg, var(--widget-accent, #6366f1), #06b6d4);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-sentence-actions button:disabled {
  opacity: .45;
  cursor: default;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-sentence-builder-widget.is-correct .fs-sentence-answer {
  border-color: #22c55e;
  background: #f0fdf4;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-sentence-builder-widget.is-wrong .fs-sentence-answer {
  border-color: #fb7185;
  background: #fff1f2;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-sentence-builder.is-compact .fs-sentence-builder-widget { padding: 14px; gap: 9px; }
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-sentence-builder.is-compact .fs-sentence-hint { display: none; }
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-sentence-builder.is-tiny .fs-sentence-builder-head p,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-sentence-builder.is-tiny .fs-sentence-actions { display: none; }

/* M22.6.1 Sentence Builder polish */
body.screen-shell-builder.screen-builder-fullscreen .fs-sentence-progress {
  display: flex;
  justify-content: center;
  color: rgba(15,23,42,.55);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .03em;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-sentence-progress span {
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(148,163,184,.2);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-sentence-actions {
  flex-wrap: wrap;
  align-items: center;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-sentence-builder .fs-sentence-builder-widget {
  min-height: min(72vh, 620px);
  padding: clamp(24px, 4vw, 48px);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-sentence-builder .fs-sentence-builder-head strong {
  font-size: clamp(36px, 5vw, 72px);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-sentence-builder .fs-sentence-token {
  font-size: clamp(28px, 3vw, 48px);
}

/* M22.6.2 Sentence Builder interaction polish */
body.screen-shell-builder.screen-builder-fullscreen .fs-sentence-builder-widget.is-wrong .fs-sentence-builder-head > span {
  color: #be123c;
  background: #ffe4e6;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-sentence-builder-widget.is-correct .fs-sentence-builder-head > span {
  color: #15803d;
  background: #dcfce7;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-sentence-builder-widget.is-wrong .fs-sentence-answer {
  animation: fsSentenceTryAgainShake 360ms ease both;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-game-fx-wrong .fs-game-fx-badge {
  background: linear-gradient(135deg, #fb7185, #f97316);
  box-shadow: 0 22px 52px rgba(244, 63, 94, .24);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-game-fx-wrong .fs-game-fx-dot {
  background: #fb7185 !important;
}
@keyframes fsSentenceTryAgainShake {
  0%, 100% { transform: translateX(0); }
  24% { transform: translateX(-8px); }
  48% { transform: translateX(7px); }
  72% { transform: translateX(-4px); }
}


/* M22.6.3 Sentence Builder auto-check polish */
body.screen-shell-builder.screen-builder-fullscreen .fs-sentence-actions button {
  min-width: 112px;
  text-align: center;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-sentence-actions button:first-child {
  color: #10213f;
  background: rgba(255,255,255,.86);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-sentence-actions button:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(15,23,42,.10);
}

/* M22.7 — Cloze Race widget */
body.screen-shell-builder.screen-builder-fullscreen .fs-cloze-race-widget {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 28px 34px;
  border-radius: 22px;
  background: color-mix(in srgb, var(--widget-bg, #ffffff) 92%, #fff);
  color: var(--widget-text, #10213f);
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
  box-shadow: 0 18px 42px rgba(15,23,42,.08);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-cloze-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-cloze-head strong {
  display: block;
  font-size: clamp(24px, 3vw, 54px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: -.02em;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-cloze-head p {
  margin: 8px 0 0;
  color: rgba(15,23,42,.62);
  font-size: 17px;
  font-weight: 780;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-cloze-head > span {
  border-radius: 999px;
  padding: 8px 15px;
  background: color-mix(in srgb, var(--widget-accent, #6366f1) 12%, #fff);
  color: var(--widget-accent, #6366f1);
  font-weight: 950;
  white-space: nowrap;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-cloze-sentence {
  border-radius: 20px;
  padding: 24px;
  background: color-mix(in srgb, var(--widget-accent, #6366f1) 7%, #fff);
  border: 2px dashed color-mix(in srgb, var(--widget-accent, #6366f1) 32%, #fff);
  font-size: var(--cloze-font-size, 26px);
  font-weight: 900;
  line-height: 1.25;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-cloze-blank {
  display: inline-block;
  min-width: 120px;
  margin: 0 6px;
  padding: 6px 14px;
  border-radius: 999px;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, var(--widget-accent, #6366f1), #06b6d4);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-cloze-options {
  border-radius: 18px;
  padding: 16px;
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(148,163,184,.22);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  align-content: flex-start;
  overflow: auto;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-cloze-option {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: var(--cloze-font-size, 26px);
  font-weight: 950;
  color: #10213f;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15,23,42,.08);
  cursor: pointer;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-cloze-option.is-selected {
  color: #fff;
  background: linear-gradient(135deg, var(--widget-accent, #6366f1), #06b6d4);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-cloze-progress {
  display: flex;
  justify-content: center;
  color: rgba(15,23,42,.55);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .03em;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-cloze-progress span {
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(148,163,184,.2);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-cloze-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin-top: auto;
  flex-wrap: wrap;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-cloze-actions button {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 950;
  color: #10213f;
  background: rgba(255,255,255,.86);
  cursor: pointer;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-cloze-actions button:disabled {
  opacity: .45;
  cursor: default;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-cloze-race-widget.is-correct .fs-cloze-sentence {
  border-color: #22c55e;
  background: #f0fdf4;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-cloze-race-widget.is-wrong .fs-cloze-sentence {
  border-color: #fb7185;
  background: #fff1f2;
  animation: fsShake .22s ease-in-out 1;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-cloze-race.is-compact .fs-cloze-race-widget { padding: 14px; gap: 9px; }
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-cloze-race.is-tiny .fs-cloze-head p,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-cloze-race.is-tiny .fs-cloze-actions { display: none; }
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-cloze-race .fs-cloze-race-widget {
  box-shadow: none;
  min-height: min(62vh, 620px);
}

/* M22.8 Matching widget */
.fs-widget-matching,
.present-widget-matching {
  overflow: visible;
}
.fs-matching-widget,
.present-matching {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: clamp(14px, 2.2vw, 34px);
  border-radius: 24px;
  background: var(--widget-bg, rgba(255,255,255,.92));
  color: var(--widget-text, #0f172a);
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.4vw, 18px);
  overflow: hidden;
}
.fs-matching-head,
.present-matching-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}
.fs-matching-head strong,
.present-matching-head strong {
  display: block;
  font-size: clamp(26px, 4vw, 56px);
  line-height: 1;
  font-weight: 900;
}
.fs-matching-head p,
.present-matching-head p {
  margin: 8px 0 0;
  color: rgba(15,23,42,.62);
  font-weight: 800;
  font-size: clamp(14px, 1.5vw, 21px);
}
.fs-matching-head span,
.present-matching-head span {
  border-radius: 999px;
  background: rgba(99,102,241,.12);
  color: #6366f1;
  font-weight: 900;
  padding: 8px 14px;
  white-space: nowrap;
}
.fs-matching-columns,
.present-matching-columns {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(10px, 1.3vw, 18px);
}
.fs-matching-column,
.present-matching-column {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(6px, .85vw, 10px);
  overflow: visible;
  padding: 2px;
}
.fs-matching-card,
.present-matching-card {
  width: 100%;
  border: 2px solid rgba(99,102,241,.18);
  background: rgba(255,255,255,.88);
  color: #0f172a;
  border-radius: 18px;
  padding: clamp(8px, .9vw, 14px);
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  min-height: clamp(38px, 6.2vh, 52px);
  font-size: var(--matching-font-size, 22px);
  box-shadow: 0 10px 25px rgba(15,23,42,.06);
}
.fs-matching-card span,
.present-matching-card span {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(99,102,241,.12);
  color: #6366f1;
  font-weight: 900;
}
.fs-matching-card strong,
.present-matching-card strong { font-weight: 900; line-height: 1.12; }
.fs-matching-card:hover,
.present-matching-card:hover { transform: translateY(-1px); }
.fs-matching-card.is-selected,
.present-matching-card.is-selected {
  border-color: #6366f1;
  background: rgba(99,102,241,.10);
  box-shadow: 0 0 0 4px rgba(99,102,241,.10);
}
.fs-matching-card.is-matched,
.present-matching-card.is-matched {
  border-color: #22c55e;
  background: rgba(34,197,94,.12);
  color: #166534;
  opacity: .72;
}
.fs-matching-widget.is-wrong .fs-matching-columns,
.present-matching.is-wrong .present-matching-columns {
  animation: fs-matching-shake .25s ease-in-out;
}
@keyframes fs-matching-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}
.fs-matching-round,
.present-matching-round {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: -4px;
  color: rgba(15,23,42,.58);
  font-weight: 900;
}
.fs-matching-round span,
.present-matching-round span {
  border-radius: 999px;
  background: rgba(99,102,241,.10);
  padding: 5px 10px;
  color: #6366f1;
}
.fs-matching-actions,
.present-matching-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.fs-matching-actions button,
.present-matching-actions button {
  border: 0;
  border-radius: 999px;
  background: rgba(99,102,241,.12);
  color: #0f172a;
  font-weight: 900;
  padding: 10px 24px;
}
.fs-matching-empty,
.present-matching-empty {
  flex: 1;
  display: grid;
  place-items: center;
  color: rgba(15,23,42,.45);
  font-weight: 900;
}
.fs-widget.is-compact .fs-matching-widget,
.present-widget.is-compact .present-matching { padding: 12px; gap: 8px; }
.fs-widget.is-compact .fs-matching-head strong,
.present-widget.is-compact .present-matching-head strong { font-size: 24px; }
.fs-widget.is-compact .fs-matching-card,
.present-widget.is-compact .present-matching-card { min-height: 36px; padding: 7px; }
.fs-widget.is-compact .fs-matching-column,
.present-widget.is-compact .present-matching-column { gap: 6px; }

/* M22.9 — Gomoku / multi-team board widget */
.fs-widget-gomoku,
.fs-spotlight-gomoku {
  overflow: visible;
}

.fs-gomoku-widget {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.2vh, 12px);
  padding: clamp(12px, 2vw, 22px);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(245,248,255,.92));
  border: 2px solid rgba(99,102,241,.22);
  box-shadow: 0 18px 44px rgba(15,23,42,.13);
  color: #0f172a;
}

.fs-gomoku-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.fs-gomoku-head strong {
  display: block;
  font-size: clamp(20px, 2vw, 34px);
  font-weight: 900;
  line-height: 1.05;
}

.fs-gomoku-head p {
  margin: 5px 0 0;
  font-size: clamp(11px, 1vw, 16px);
  font-weight: 700;
  color: rgba(15,23,42,.56);
}

.fs-gomoku-head > span {
  flex: 0 0 auto;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(99,102,241,.12);
  color: #4f46e5;
  font-weight: 900;
  font-size: clamp(11px, .95vw, 14px);
}

.fs-gomoku-teambar,
.fs-gomoku-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.fs-gomoku-team {
  border: 2px solid color-mix(in srgb, var(--team-color) 42%, transparent);
  background: color-mix(in srgb, var(--team-color) 10%, white);
  color: #0f172a;
  border-radius: 999px;
  padding: 7px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  cursor: pointer;
}

.fs-gomoku-team i,
.fs-gomoku-turn span {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--team-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--team-color) 18%, transparent);
}

.fs-gomoku-team.is-current {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--team-color) 18%, transparent);
  transform: translateY(-1px);
}

.fs-gomoku-team.is-winner {
  background: color-mix(in srgb, var(--team-color) 22%, white);
}

.fs-gomoku-turn,
.fs-gomoku-winner {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 28px;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 900;
  background: rgba(15,23,42,.06);
}

.fs-gomoku-winner {
  background: color-mix(in srgb, var(--team-color) 16%, white);
  color: #0f172a;
}

.fs-gomoku-board {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(var(--gomoku-size), minmax(0, 1fr));
  gap: clamp(3px, .45vw, 8px);
  padding: clamp(8px, 1vw, 14px);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(15,23,42,.07), rgba(99,102,241,.08));
  border: 1px solid rgba(15,23,42,.1);
}

.fs-gomoku-cell {
  min-width: 0;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(15,23,42,.15);
  border-radius: 12px;
  background: rgba(255,255,255,.78);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}

.fs-gomoku-cell:hover:not(.is-filled) {
  transform: translateY(-1px);
  border-color: var(--gomoku-accent);
  box-shadow: 0 8px 16px rgba(15,23,42,.1);
}

.fs-gomoku-cell.is-filled {
  cursor: default;
  background: color-mix(in srgb, var(--cell-color) 10%, white);
  border-color: color-mix(in srgb, var(--cell-color) 46%, transparent);
}

.fs-gomoku-cell span {
  width: 64%;
  height: 64%;
  border-radius: 999px;
  background: var(--cell-color);
  box-shadow: inset 0 8px 12px rgba(255,255,255,.25), 0 5px 14px color-mix(in srgb, var(--cell-color) 34%, transparent);
}

.fs-gomoku-actions button {
  border: 1px solid rgba(15,23,42,.16);
  background: #fff;
  color: #0f172a;
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 900;
  cursor: pointer;
}

.fs-gomoku-team-settings {
  display: grid;
  gap: 8px;
  margin: 8px 0 12px;
}

.fs-gomoku-team-settings label {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  align-items: center;
}

.fs-gomoku-team-settings span {
  width: 14px;
  height: 14px;
  border-radius: 999px;
}

.fs-widget-gomoku.is-compact .fs-gomoku-widget,
.fs-spotlight-gomoku .fs-gomoku-widget {
  padding: clamp(14px, 2vw, 26px);
}

/* M22.9.1 — Gomoku classroom polish */
.fs-ai-box {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(248,250,255,.96), rgba(240,247,255,.9));
  border: 1px solid rgba(99,102,241,.16);
  margin: 14px 0;
}
.fs-ai-box > strong {
  font-size: 15px;
  font-weight: 900;
  color: #334155;
}
.fs-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.fs-two-col label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 900;
  color: #64748b;
}
.fs-switch-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 18px;
  background: rgba(248,250,252,.92);
  border: 1px solid rgba(148,163,184,.22);
  font-size: 16px;
  font-weight: 900;
  color: #334155;
  margin: 12px 0;
}
.fs-switch-line input { width: 22px; height: 22px; }
.fs-format-hint {
  display: inline-flex;
  align-items: center;
  align-self: start;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(99,102,241,.1);
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  margin: -4px 0 8px;
}
.fs-gomoku-widget {
  gap: clamp(4px, .8vh, 9px);
  padding: clamp(10px, 1.5vw, 18px);
}
.fs-gomoku-head strong { font-size: clamp(18px, 1.7vw, 28px); }
.fs-gomoku-head p { font-size: clamp(10px, .85vw, 14px); }
.fs-gomoku-teambar, .fs-gomoku-actions { gap: 6px; }
.fs-gomoku-team { padding: 5px 10px; font-size: clamp(10px, .85vw, 13px); }
.fs-gomoku-turn, .fs-gomoku-winner { min-height: 24px; padding: 5px 10px; font-size: clamp(10px, .85vw, 13px); }
.fs-gomoku-board {
  grid-template-rows: repeat(var(--gomoku-size), minmax(0, 1fr));
  gap: clamp(2px, .32vw, 6px);
  padding: clamp(6px, .75vw, 10px);
}
.fs-gomoku-cell {
  aspect-ratio: auto;
  min-height: 0;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
}
.fs-gomoku-cell em {
  display: block;
  max-width: 96%;
  width: 100%;
  padding: 0 4px;
  font-style: normal;
  font-size: clamp(8px, .78vw, 13px);
  line-height: 1.05;
  font-weight: 900;
  color: rgba(15,23,42,.58);
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  white-space: nowrap;
}
.fs-gomoku-cell.is-hidden-task em { display: none; }
.fs-gomoku-cell span {
  width: min(62%, 44px);
  height: min(62%, 44px);
}
.fs-widget-gomoku.is-compact .fs-gomoku-head p,
.fs-widget-gomoku.is-compact .fs-gomoku-head > span { display: none; }
.fs-widget-gomoku.is-compact .fs-gomoku-team { padding: 4px 8px; }
.fs-widget-gomoku.is-compact .fs-gomoku-cell em { font-size: 8px; }

/* M22.9.2 — Gomoku question gate */
.fs-gomoku-widget { position: relative; }
.fs-gomoku-question {
  position: absolute;
  inset: clamp(10px, 1.2vw, 18px);
  z-index: 8;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(99,102,241,.18);
}
.fs-gomoku-question-card {
  width: min(760px, 86%);
  min-height: 42%;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 14px;
  padding: clamp(18px, 3vw, 42px);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(248,250,255,.94));
  border: 2px solid rgba(99,102,241,.2);
  box-shadow: 0 22px 60px rgba(15,23,42,.18);
  text-align: center;
}
.fs-gomoku-question-card > span {
  color: #f59e0b;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 900;
  font-size: clamp(11px, 1.1vw, 15px);
}
.fs-gomoku-question-card strong {
  display: block;
  color: #0f172a;
  font-size: clamp(24px, 3.6vw, 54px);
  line-height: 1.08;
  font-weight: 950;
}
.fs-gomoku-question-card p {
  margin: 0;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(99,102,241,.08);
  color: #334155;
  font-weight: 800;
  font-size: clamp(14px, 1.2vw, 18px);
}
.fs-gomoku-question-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.fs-gomoku-question-actions button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 900;
  color: #172033;
  background: rgba(99,102,241,.12);
  cursor: pointer;
}
.fs-gomoku-question-actions button.is-primary {
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  box-shadow: 0 10px 20px rgba(99,102,241,.25);
}

/* M22.9.3 — Gomoku board scale, font size and Spotlight interaction polish */
.fs-gomoku-widget {
  --gomoku-font: var(--gomoku-font, 12px);
}
.fs-gomoku-cell em {
  font-size: clamp(9px, var(--gomoku-font), 28px) !important;
}
.fs-gomoku-board {
  align-self: stretch;
  min-height: 0;
}
.fs-widget-gomoku:not(.is-compact) .fs-gomoku-cell span {
  width: min(68%, 58px);
  height: min(68%, 58px);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-card:has(.fs-spotlight-gomoku) {
  width: min(94vw, 1480px) !important;
  max-width: min(94vw, 1480px) !important;
  max-height: min(88vh, 860px) !important;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-content.fs-spotlight-gomoku {
  width: min(94vw, 1480px) !important;
  min-width: min(84vw, 1180px) !important;
  height: min(82vh, 820px) !important;
  min-height: min(72vh, 680px) !important;
  max-height: min(88vh, 860px) !important;
  place-items: stretch !important;
  overflow: visible !important;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-gomoku .fs-gomoku-widget {
  width: 100%;
  height: 100%;
  min-height: 0;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-gomoku .fs-gomoku-board {
  flex: 1 1 auto;
  min-height: 0;
  gap: clamp(4px, .42vw, 9px);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-gomoku .fs-gomoku-cell em {
  font-size: clamp(11px, calc(var(--gomoku-font) * 1.08), 30px) !important;
}

/* M22.9.4 — Gomoku board proportion + choice question polish */
.fs-widget-gomoku:not(.is-compact) .fs-gomoku-widget,
.fs-spotlight-gomoku .fs-gomoku-widget {
  gap: clamp(8px, 1.1vh, 14px);
}
.fs-widget-gomoku:not(.is-compact) .fs-gomoku-board,
.fs-spotlight-gomoku .fs-gomoku-board {
  min-height: clamp(380px, 56vh, 760px);
  align-content: stretch;
}
.fs-widget-gomoku:not(.is-compact) .fs-gomoku-cell,
.fs-spotlight-gomoku .fs-gomoku-cell {
  min-height: clamp(32px, 5.6vh, 72px);
  border-radius: 12px;
}
.fs-widget-gomoku:not(.is-compact) .fs-gomoku-cell em,
.fs-spotlight-gomoku .fs-gomoku-cell em {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  text-align: center;
}
.fs-gomoku-choice-list {
  width: min(680px, 94%);
  display: grid;
  gap: 8px;
  margin: 2px 0 4px;
}
.fs-gomoku-choice-list button {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(99,102,241,.08);
  border: 1px solid rgba(99,102,241,.18);
  color: #172033;
  font-weight: 900;
  text-align: left;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-gomoku .fs-gomoku-board {
  min-height: min(62vh, 700px) !important;
}


/* M22.9.5 — Gomoku board scale, sounds and AI draft variety polish */
.fs-widget-gomoku.is-selected::after { z-index: 10002; }
.fs-widget-gomoku.is-selected > .fs-resize-handle,
.fs-widget-gomoku.is-selected > .fs-widget-toolbar { z-index: 10003 !important; }
.fs-widget-gomoku .fs-gomoku-widget { overflow: hidden; }
.fs-widget-gomoku:not(.is-compact) .fs-gomoku-board,
.fs-spotlight-gomoku .fs-gomoku-board {
  width: 100%;
  max-width: var(--gomoku-board-max, 1080px);
  margin-left: auto;
  margin-right: auto;
  min-height: calc(var(--gomoku-size) * var(--gomoku-cell-min, 54px));
}
.fs-widget-gomoku:not(.is-compact) .fs-gomoku-cell,
.fs-spotlight-gomoku .fs-gomoku-cell {
  min-height: var(--gomoku-cell-min, 54px);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-card:has(.fs-spotlight-gomoku) {
  transform: translateY(-3vh);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-content.fs-spotlight-gomoku {
  align-content: start !important;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-gomoku .fs-gomoku-board {
  max-width: var(--gomoku-board-max, 1080px) !important;
  min-height: calc(var(--gomoku-size) * var(--gomoku-cell-min, 54px)) !important;
}

/* M23.2 — Gomoku choice buttons and feedback */
.fs-gomoku-choice-list button:hover {
  border-color: rgba(99,102,241,.45);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(99,102,241,.14);
}
.fs-gomoku-feedback.is-wrong {
  margin: 0;
  color: #ef4444;
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.18);
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 950;
}

/* M24.11 — Gomoku layout and readable board labels */
.fs-gomoku-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  text-align: center;
}
.fs-gomoku-head > div {
  grid-column: 2;
  justify-self: center;
}
.fs-gomoku-head > span {
  grid-column: 3;
  justify-self: end;
}
.fs-gomoku-board {
  width: min(100%, var(--gomoku-board-max, 1080px));
  align-self: center;
  justify-self: center;
}
.fs-gomoku-cell em {
  display: flex !important;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
}


/* M25.2 — Gomoku resize polish: let the board use the widget width instead of sitting too narrow */
.fs-widget-gomoku:not(.is-compact) .fs-gomoku-widget,
.fs-spotlight-gomoku .fs-gomoku-widget {
  container-type: size;
}
.fs-widget-gomoku:not(.is-compact) .fs-gomoku-board,
.fs-spotlight-gomoku .fs-gomoku-board {
  width: min(100%, var(--gomoku-board-max, 1420px));
  max-width: min(100%, var(--gomoku-board-max, 1420px));
  min-height: min(calc(var(--gomoku-size) * var(--gomoku-cell-min, 52px)), 68cqh);
}
.fs-widget-gomoku.is-compact .fs-gomoku-board {
  width: 100%;
  max-width: 100%;
  min-height: 0;
}
.fs-widget-gomoku:not(.is-compact) .fs-gomoku-cell,
.fs-spotlight-gomoku .fs-gomoku-cell {
  min-height: 0;
}

/* M25.1A — Independent Multiple Choice Quiz widget */
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-widget {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: 22px;
  background: var(--widget-bg, #fff);
  color: var(--widget-text, #10213f);
  overflow: hidden;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-head strong {
  display: block;
  font-size: clamp(20px, 2.4vw, 38px);
  line-height: 1;
  font-weight: 950;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-head p {
  margin: 6px 0 0;
  color: rgba(15, 23, 42, .62);
  font-size: 14px;
  font-weight: 760;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-head > span {
  border-radius: 999px;
  padding: 8px 12px;
  background: color-mix(in srgb, var(--widget-accent, #6366f1) 12%, #fff);
  color: var(--widget-accent, #6366f1);
  font-weight: 950;
  white-space: nowrap;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-teams {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 8px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-team {
  border: 2px solid color-mix(in srgb, var(--team-accent) 50%, #fff);
  border-radius: 14px;
  padding: 7px 9px;
  background: color-mix(in srgb, var(--team-accent) 9%, #fff);
  text-align: center;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-team span { display: block; font-size: 11px; font-weight: 900; color: #475569; }
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-team strong { display: block; font-size: 22px; line-height: 1; color: var(--team-accent); }
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-progress { height: 8px; border-radius: 999px; overflow: hidden; background: #eef2f7; }
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-progress i { display: block; height: 100%; background: linear-gradient(135deg, var(--widget-accent, #6366f1), #06b6d4); }
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-question {
  flex: 0 0 auto;
  font-size: clamp(22px, 3vw, 46px);
  line-height: 1.16;
  font-weight: 950;
  text-align: center;
  padding: 4px 10px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-options {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  overflow: auto;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  border: 2px solid rgba(99, 102, 241, .16);
  border-radius: 16px;
  background: #fff;
  color: #0f172a;
  padding: 10px 14px;
  text-align: left;
  cursor: pointer;
  font-size: var(--mcq-font-size, 24px);
  font-weight: 900;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-option span {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #eef2ff;
  color: var(--widget-accent, #6366f1);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-option strong { font: inherit; line-height: 1.2; }
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-option:hover { border-color: rgba(99, 102, 241, .42); box-shadow: 0 14px 28px rgba(99,102,241,.12); }
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-option.is-correct { border-color: rgba(34,197,94,.44); background: #f0fdf4; color: #166534; }
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-option.is-wrong { border-color: rgba(239,68,68,.44); background: #fff1f2; color: #991b1b; }
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-feedback,
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-answer {
  align-self: center;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 950;
  background: #fee2e2;
  color: #991b1b;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-feedback.is-correct,
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-answer { background: #dcfce7; color: #166534; }
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-actions,
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-award-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-actions button,
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-award-row button { border: 0; border-radius: 999px; min-height: 38px; padding: 0 14px; font-weight: 900; cursor: pointer; }
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-actions button { background: #eef2ff; color: #3730a3; }
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-award-row button { background: var(--team-accent); color: #fff; box-shadow: 0 12px 24px color-mix(in srgb, var(--team-accent) 24%, transparent); }
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-empty { flex: 1; display: grid; place-items: center; text-align: center; border-radius: 18px; background: rgba(255,255,255,.68); font-weight: 850; color: #64748b; }
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice.is-compact .fs-mcq-widget { padding: 12px; gap: 7px; }
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice.is-compact .fs-mcq-teams { display: none; }
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice.is-tiny .fs-mcq-head p,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice.is-tiny .fs-mcq-actions,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice.is-tiny .fs-mcq-award-row { display: none; }
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice.is-tiny .fs-mcq-options { grid-template-columns: 1fr; }

/* M25.1A.2 — Multiple Choice cleaner classroom layout */
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-widget {
  display: grid;
  grid-template-rows: auto minmax(0, auto) auto auto;
  align-content: center;
  gap: clamp(14px, 3cqh, 34px);
  padding: clamp(22px, 5cqh, 64px) clamp(22px, 5cqw, 76px);
  background: var(--widget-bg, #fff);
  overflow: hidden;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-topbar {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-count {
  border-radius: 999px;
  padding: 8px 14px;
  background: color-mix(in srgb, var(--widget-accent, #6366f1) 12%, #fff);
  color: var(--widget-accent, #6366f1);
  font-weight: 950;
  white-space: nowrap;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-progress {
  height: clamp(6px, 1.2cqh, 10px);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-main {
  min-height: 0;
  display: grid;
  align-content: center;
  gap: clamp(18px, 4cqh, 42px);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-question {
  font-size: clamp(28px, 5.2cqw, 72px);
  line-height: 1.08;
  padding: 0;
  max-width: 16em;
  justify-self: center;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-options {
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 2cqh, 22px) clamp(12px, 2.2cqw, 26px);
  overflow: auto;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-option {
  min-height: clamp(58px, 10cqh, 96px);
  padding: clamp(10px, 1.7cqh, 18px) clamp(14px, 2cqw, 24px);
  border-radius: clamp(16px, 2cqw, 24px);
  font-size: clamp(20px, 2.6cqw, var(--mcq-font-size, 24px));
}
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-option span {
  width: clamp(34px, 4.2cqw, 52px);
  height: clamp(34px, 4.2cqw, 52px);
  flex-basis: clamp(34px, 4.2cqw, 52px);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-actions {
  gap: clamp(10px, 1.8cqw, 18px);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-actions button {
  min-height: clamp(38px, 5.6cqh, 50px);
  padding: 0 clamp(14px, 2cqw, 24px);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice.is-compact .fs-mcq-widget {
  gap: 12px;
  padding: 16px 20px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice.is-compact .fs-mcq-question {
  font-size: clamp(22px, 4.6cqw, 42px);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice.is-compact .fs-mcq-options {
  gap: 10px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice.is-tiny .fs-mcq-widget {
  display: flex;
  justify-content: center;
  padding: 12px;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice.is-tiny .fs-mcq-topbar,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice.is-tiny .fs-mcq-actions,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice.is-tiny .fs-mcq-feedback,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice.is-tiny .fs-mcq-answer {
  display: none;
}


/* M25.1A.3 — Multiple Choice airy classroom layout */
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-widget {
  align-content: center;
  row-gap: clamp(22px, 4.8cqh, 58px);
  padding: clamp(32px, 7cqh, 88px) clamp(30px, 6cqw, 96px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: clamp(2px, 1.2cqh, 14px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-progress {
  display: none !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-main {
  gap: clamp(30px, 6.2cqh, 74px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-question {
  font-size: clamp(30px, 4.9cqw, 68px);
  line-height: 1.1;
  margin: 0 0 clamp(6px, 1.5cqh, 18px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-options {
  gap: clamp(18px, 3cqh, 34px) clamp(16px, 2.8cqw, 34px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-actions {
  margin-top: clamp(10px, 3.8cqh, 42px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice.is-compact .fs-mcq-widget {
  row-gap: 18px;
  padding: 20px 24px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice.is-compact .fs-mcq-main {
  gap: 18px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice.is-compact .fs-mcq-question {
  margin-bottom: 4px;
}

/* M25.1A.4 — Multiple Choice no-scroll breathing layout */
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-widget {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  align-content: stretch;
  justify-content: stretch;
  padding: clamp(26px, 6cqh, 72px) clamp(34px, 6cqw, 96px) clamp(30px, 7cqh, 88px);
  overflow: hidden;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-topbar {
  position: absolute;
  top: clamp(14px, 3cqh, 34px);
  right: clamp(18px, 4cqw, 56px);
  z-index: 2;
  width: auto;
  margin: 0;
  pointer-events: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-count {
  padding: clamp(7px, 1.6cqh, 12px) clamp(11px, 1.7cqw, 18px);
  font-size: clamp(14px, 2cqh, 20px);
  box-shadow: 0 10px 22px rgba(99, 102, 241, .08);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-main {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto auto auto auto auto;
  align-content: center;
  justify-items: stretch;
  gap: clamp(22px, 4.2cqh, 52px);
  padding-top: clamp(10px, 2.2cqh, 26px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-question {
  max-width: 17em;
  font-size: clamp(30px, 4.35cqw, 60px);
  line-height: 1.1;
  margin: 0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-options {
  align-self: stretch;
  overflow: visible;
  max-height: none;
  min-height: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.4cqh, 28px) clamp(18px, 2.8cqw, 36px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-option {
  min-height: clamp(56px, 8.2cqh, 86px);
  padding-block: clamp(9px, 1.45cqh, 16px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-actions {
  align-self: start;
  margin-top: clamp(2px, 1.2cqh, 16px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice.is-compact .fs-mcq-widget {
  padding: 18px 22px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice.is-compact .fs-mcq-topbar {
  top: 10px;
  right: 12px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice.is-compact .fs-mcq-main {
  gap: 14px;
  padding-top: 16px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice.is-compact .fs-mcq-question {
  font-size: clamp(22px, 4.2cqw, 40px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice.is-compact .fs-mcq-option {
  min-height: 50px;
}

/* M25.1B — Multiple Choice stable selection + AI-generation layout polish */
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-topbar {
  top: clamp(10px, 2.2cqh, 26px);
  right: clamp(18px, 5.5cqw, 78px);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-count {
  box-shadow: none;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-question {
  max-width: min(16em, calc(100% - 160px));
}
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-option span {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  width: clamp(26px, 3.4cqw, 42px);
  height: clamp(26px, 3.4cqw, 42px);
  flex-basis: clamp(26px, 3.4cqw, 42px);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-option:hover {
  box-shadow: none;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-feedback,
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-answer {
  display: none !important;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-options {
  align-self: center;
  width: min(100%, 1180px);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-actions {
  min-height: clamp(40px, 5.2cqh, 54px);
}

/* M25.1B.1 — Multiple Choice spotlight/action stability and language-quiz spacing */
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-widget {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-content: stretch;
  row-gap: clamp(12px, 2.4cqh, 28px);
  padding: clamp(30px, 6cqh, 76px) clamp(34px, 6cqw, 96px) clamp(36px, 7cqh, 92px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-topbar {
  top: clamp(12px, 2.4cqh, 28px);
  right: clamp(18px, 4.2cqw, 64px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-main {
  height: auto;
  min-height: 0;
  width: min(100%, 1180px);
  justify-self: center;
  align-content: center;
  justify-items: center;
  gap: clamp(24px, 4.3cqh, 54px);
  padding-top: clamp(20px, 4.8cqh, 58px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-question {
  width: min(100%, 15.5em);
  max-width: min(15.5em, calc(100% - 120px));
  justify-self: center;
  text-align: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-options {
  width: min(100%, 1080px);
  justify-self: center;
  align-self: center;
  overflow: visible;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-option {
  box-shadow: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-option span {
  background: transparent;
  box-shadow: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-actions {
  align-self: end;
  justify-self: center;
  margin: 0;
  padding-bottom: 0;
  position: relative;
  z-index: 3;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice.is-compact .fs-mcq-widget {
  grid-template-rows: minmax(0, 1fr) auto;
  row-gap: 10px;
  padding: 18px 20px 22px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice.is-compact .fs-mcq-main {
  gap: 14px;
  padding-top: 18px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice.is-compact .fs-mcq-question {
  max-width: min(15em, calc(100% - 80px));
}

/* M25.1B.2 — Multiple Choice stable count + safe spotlight controls */
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-topbar {
  top: clamp(16px, 2.6cqh, 32px);
  right: clamp(22px, 3.4cqw, 52px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-count {
  min-width: clamp(58px, 6cqw, 82px);
  text-align: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-question {
  max-width: min(16em, calc(100% - 190px));
}

body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-actions {
  align-self: center;
  margin-top: clamp(6px, 1.4cqh, 18px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-card:has(.fs-spotlight-multiple-choice) {
  width: min(82vw, 1120px);
  height: min(78vh, 760px);
  min-height: min(72vh, 700px);
  max-height: min(82vh, 800px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-content.fs-spotlight-multiple-choice {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-multiple-choice .fs-mcq-widget {
  height: 100%;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr) auto;
  row-gap: clamp(10px, 2.2vh, 24px);
  padding: clamp(30px, 5vh, 62px) clamp(36px, 5.2vw, 78px) clamp(72px, 10vh, 112px);
  box-sizing: border-box;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-multiple-choice .fs-mcq-topbar {
  top: clamp(18px, 3vh, 34px);
  right: clamp(24px, 4vw, 56px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-multiple-choice .fs-mcq-main {
  width: min(100%, 980px);
  gap: clamp(20px, 3.6vh, 46px);
  padding-top: clamp(24px, 4vh, 52px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-multiple-choice .fs-mcq-question {
  max-width: min(15em, calc(100% - 160px));
  font-size: clamp(42px, 5vw, 70px);
  line-height: 1.08;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-multiple-choice .fs-mcq-options {
  width: min(100%, 880px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-multiple-choice .fs-mcq-actions {
  align-self: center;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 4;
}

/* M25.1B.3 — Multiple Choice fixed-width stage + stable spotlight controls */
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-widget {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  box-sizing: border-box;
  overflow: hidden;
  padding: clamp(30px, 5.4cqh, 64px) clamp(36px, 5cqw, 82px) clamp(82px, 10cqh, 112px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-topbar {
  position: absolute;
  top: clamp(18px, 3cqh, 34px);
  right: clamp(26px, 3.2cqw, 44px);
  width: clamp(68px, 6.2cqw, 88px);
  z-index: 6;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-count {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  text-align: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-main {
  width: min(100%, 1160px);
  height: 100%;
  justify-self: center;
  align-content: center;
  justify-items: center;
  gap: clamp(26px, 4.4cqh, 54px);
  padding: clamp(34px, 6cqh, 70px) 0 clamp(72px, 9cqh, 104px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-question {
  width: min(100%, 18.5em);
  max-width: min(18.5em, calc(100% - 180px));
  text-align: center;
  justify-self: center;
  font-size: clamp(32px, 4.15cqw, 58px);
  line-height: 1.08;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-options {
  width: min(100%, 1080px);
  justify-self: center;
  align-self: center;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-actions {
  position: absolute;
  left: 50%;
  bottom: clamp(24px, 4.2cqh, 46px);
  transform: translateX(-50%);
  z-index: 7;
  margin: 0;
  padding: 0;
  min-height: 42px;
  width: max-content;
  max-width: calc(100% - 48px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice.is-compact .fs-mcq-widget {
  padding: 18px 20px 60px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice.is-compact .fs-mcq-topbar {
  top: 10px;
  right: 12px;
  width: 58px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice.is-compact .fs-mcq-main {
  gap: 14px;
  padding: 20px 0 48px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice.is-compact .fs-mcq-question {
  max-width: min(16em, calc(100% - 76px));
  font-size: clamp(22px, 4cqw, 38px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice.is-compact .fs-mcq-options {
  width: min(100%, 920px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice.is-compact .fs-mcq-actions {
  bottom: 14px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-card:has(.fs-spotlight-multiple-choice) {
  width: min(90vw, 1280px);
  height: min(84vh, 820px);
  min-height: min(78vh, 760px);
  max-height: min(88vh, 860px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-multiple-choice .fs-mcq-widget {
  height: 100%;
  min-height: 0;
  padding: clamp(34px, 5vh, 62px) clamp(46px, 5vw, 74px) clamp(90px, 10vh, 116px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-multiple-choice .fs-mcq-topbar {
  top: clamp(22px, 3.2vh, 38px);
  right: clamp(32px, 3.8vw, 52px);
  width: clamp(70px, 6vw, 90px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-multiple-choice .fs-mcq-main {
  width: min(100%, 1160px);
  gap: clamp(26px, 4.2vh, 50px);
  padding: clamp(50px, 8vh, 82px) 0 clamp(92px, 12vh, 124px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-multiple-choice .fs-mcq-question {
  width: min(100%, 18.5em);
  max-width: min(18.5em, calc(100% - 180px));
  font-size: clamp(40px, 4.45vw, 66px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-multiple-choice .fs-mcq-options {
  width: min(100%, 1080px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-multiple-choice .fs-mcq-actions {
  position: absolute;
  left: 50%;
  bottom: clamp(28px, 4.8vh, 52px);
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 64px);
  z-index: 8;
}

/* M25.1B.4 — Multiple Choice fixed stage, bottom count, visible spotlight controls */
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-widget {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  padding: clamp(28px, 5cqh, 58px) clamp(38px, 5.2cqw, 84px) clamp(84px, 10cqh, 118px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-main {
  width: min(100%, 1160px);
  height: 100%;
  justify-self: center;
  align-self: stretch;
  display: grid;
  grid-template-rows: minmax(clamp(120px, 26cqh, 236px), auto) auto;
  align-content: center;
  justify-items: center;
  row-gap: clamp(22px, 4.2cqh, 52px);
  padding: clamp(10px, 2.4cqh, 24px) 0 clamp(26px, 4.6cqh, 50px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-question {
  width: min(100%, 18em);
  max-width: min(18em, calc(100% - 96px));
  min-height: clamp(92px, 18cqh, 196px);
  display: flex;
  align-items: end;
  justify-content: center;
  text-align: center;
  margin: 0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-options {
  width: min(1080px, calc(100% - 56px));
  max-width: 1080px;
  justify-self: center;
  align-self: start;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: visible;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-topbar {
  position: absolute;
  top: auto;
  right: clamp(28px, 4.4cqw, 72px);
  bottom: clamp(24px, 4.2cqh, 48px);
  width: clamp(66px, 5.8cqw, 86px);
  min-width: 66px;
  z-index: 9;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-count {
  width: 100%;
  text-align: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-actions {
  position: absolute;
  left: 50%;
  bottom: clamp(24px, 4.2cqh, 48px);
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  z-index: 10;
  margin: 0;
  padding: 0;
  width: max-content;
  max-width: calc(100% - 180px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice.is-compact .fs-mcq-main {
  grid-template-rows: minmax(clamp(86px, 24cqh, 150px), auto) auto;
  row-gap: 14px;
  padding: 12px 0 36px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice.is-compact .fs-mcq-question {
  min-height: clamp(62px, 18cqh, 116px);
  max-width: min(17em, calc(100% - 72px));
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice.is-compact .fs-mcq-options {
  width: min(920px, calc(100% - 24px));
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice.is-compact .fs-mcq-actions {
  bottom: 14px;
  max-width: calc(100% - 104px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice.is-compact .fs-mcq-topbar {
  bottom: 14px;
  right: 14px;
  width: 58px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-card:has(.fs-spotlight-multiple-choice) {
  width: min(92vw, 1320px);
  height: min(84vh, 840px);
  min-height: min(78vh, 760px);
  max-height: min(88vh, 880px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-multiple-choice .fs-mcq-widget {
  height: 100%;
  min-height: 0;
  padding: clamp(34px, 5vh, 60px) clamp(50px, 5vw, 82px) clamp(92px, 10vh, 122px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-multiple-choice .fs-mcq-main {
  width: min(100%, 1120px);
  grid-template-rows: minmax(clamp(150px, 27vh, 252px), auto) auto;
  row-gap: clamp(26px, 4.2vh, 52px);
  padding: clamp(10px, 2vh, 20px) 0 clamp(20px, 3vh, 42px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-multiple-choice .fs-mcq-question {
  min-height: clamp(122px, 22vh, 226px);
  width: min(100%, 17.5em);
  max-width: min(17.5em, calc(100% - 120px));
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-multiple-choice .fs-mcq-options {
  width: min(1040px, calc(100% - 40px));
  max-width: 1040px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-multiple-choice .fs-mcq-actions {
  display: flex !important;
  position: absolute;
  left: 50%;
  bottom: clamp(24px, 4vh, 44px);
  transform: translateX(-50%);
  z-index: 12;
  width: max-content;
  max-width: calc(100% - 190px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-multiple-choice .fs-mcq-topbar {
  display: flex !important;
  top: auto;
  bottom: clamp(24px, 4vh, 44px);
  right: clamp(34px, 4vw, 64px);
  width: clamp(70px, 5.8vw, 90px);
  z-index: 13;
}

/* M25.1B.5 — Multiple Choice normal-mode locked stage
   Keep normal Builder canvas stable: question length must not resize/move options or count. */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice:not(.is-compact):not(.is-tiny) .fs-mcq-widget {
  padding: clamp(28px, 4.8cqh, 56px) clamp(42px, 5cqw, 84px) clamp(82px, 10cqh, 116px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice:not(.is-compact):not(.is-tiny) .fs-mcq-main {
  inline-size: min(1080px, calc(100% - 84px)) !important;
  max-inline-size: min(1080px, calc(100% - 84px));
  justify-self: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: clamp(128px, 27cqh, 238px) clamp(144px, 25cqh, 228px);
  align-content: center;
  justify-items: stretch;
  row-gap: clamp(22px, 3.8cqh, 44px);
  padding: 0 0 clamp(44px, 7.2cqh, 72px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice:not(.is-compact):not(.is-tiny) .fs-mcq-question {
  inline-size: 100% !important;
  max-inline-size: none !important;
  block-size: 100%;
  min-block-size: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: 0;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice:not(.is-compact):not(.is-tiny) .fs-mcq-options {
  inline-size: 100% !important;
  max-inline-size: none !important;
  min-inline-size: 0;
  justify-self: stretch;
  align-self: start;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(62px, 1fr);
  gap: clamp(12px, 2.2cqh, 22px) clamp(18px, 2.4cqw, 34px);
  overflow: visible;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice:not(.is-compact):not(.is-tiny) .fs-mcq-option {
  min-block-size: clamp(58px, 9.6cqh, 82px);
  box-sizing: border-box;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice:not(.is-compact):not(.is-tiny) .fs-mcq-actions {
  left: 50%;
  bottom: clamp(24px, 4.2cqh, 48px);
  transform: translateX(-50%);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice:not(.is-compact):not(.is-tiny) .fs-mcq-topbar {
  top: auto;
  right: auto;
  bottom: clamp(24px, 4.2cqh, 48px);
  left: min(calc(100% - 72px), calc(50% + 360px));
  transform: translateX(-50%);
  inline-size: 74px;
  min-inline-size: 74px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice.is-compact .fs-mcq-main {
  inline-size: min(920px, calc(100% - 36px)) !important;
  max-inline-size: min(920px, calc(100% - 36px));
  grid-template-rows: clamp(78px, 23cqh, 142px) clamp(120px, 34cqh, 210px);
  justify-items: stretch;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice.is-compact .fs-mcq-question {
  inline-size: 100% !important;
  max-inline-size: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice.is-compact .fs-mcq-options {
  inline-size: 100% !important;
  max-inline-size: none !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-multiple-choice.is-compact .fs-mcq-topbar {
  right: auto;
  left: min(calc(100% - 48px), calc(50% + 190px));
  transform: translateX(-50%);
}

/* M25.2A — Pictionary + Pictionary Battle widgets */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-pictionary,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-pictionary-vs {
  overflow: visible;
}

.present-widget-pictionary,
.present-widget-pictionary-vs {
  overflow: hidden;
}

.fs-pictionary-widget,
.present-pictionary {
  height: 100%;
  width: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: clamp(8px, 1.4cqh, 14px);
  padding: clamp(14px, 2.4cqh, 26px);
  border-radius: inherit;
  background: var(--widget-bg, #fff);
  color: var(--widget-text, #10213f);
  box-sizing: border-box;
  container-type: size;
}

.fs-pictionary-head,
.present-pictionary-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.fs-pictionary-head strong,
.present-pictionary-head strong {
  display: block;
  font-size: clamp(18px, 3.2cqw, 32px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.fs-pictionary-head p,
.present-pictionary-head p {
  margin: 5px 0 0;
  font-size: clamp(11px, 1.5cqw, 15px);
  font-weight: 800;
  color: rgba(71, 85, 105, .78);
}

.fs-pictionary-head > span,
.present-pictionary-head > span {
  flex: 0 0 auto;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(99, 102, 241, .12);
  color: #6366f1;
  font-weight: 950;
  font-size: 14px;
}

.fs-pictionary-topline,
.present-pictionary-topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(10px, 2cqw, 18px);
}

.fs-pictionary-wordbox,
.present-pictionary-wordbox {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(99,102,241,.12), rgba(6,182,212,.12));
  border: 1px solid rgba(99,102,241,.16);
}

.fs-pictionary-wordbox strong,
.present-pictionary-wordbox strong {
  font-size: clamp(20px, 3.6cqw, 38px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.fs-pictionary-wordbox span,
.present-pictionary-wordbox span {
  font-size: clamp(12px, 1.8cqw, 18px);
  font-weight: 900;
  color: rgba(15, 23, 42, .62);
}

.fs-pictionary-wordbox.is-hidden strong,
.present-pictionary-wordbox.is-hidden strong {
  letter-spacing: .16em;
  color: rgba(15, 23, 42, .58);
}

.fs-pictionary-actions,
.present-pictionary-actions,
.fs-pictionary-vs-score,
.present-pictionary-vs-score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.fs-pictionary-actions button,
.present-pictionary-actions button,
.fs-pictionary-vs-score button,
.present-pictionary-vs-score button {
  border: 0;
  border-radius: 999px;
  padding: 9px 13px;
  background: #eef2ff;
  color: #3730a3;
  font-weight: 950;
  cursor: pointer;
  white-space: nowrap;
}

.fs-pictionary-actions button:disabled,
.present-pictionary-actions button:disabled {
  opacity: .42;
  cursor: default;
}

.fs-pictionary-draw-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border: 1px solid rgba(99,102,241,.14);
  border-radius: 18px;
  background: rgba(248,250,252,.88);
}

.fs-pictionary-clear-tool {
  margin-left: auto;
}

.fs-pictionary-tool {
  border: 1px solid rgba(99,102,241,.18);
  border-radius: 999px;
  padding: 7px 11px;
  background: #fff;
  color: #334155;
  font-size: clamp(11px, 1.4cqw, 13px);
  font-weight: 950;
  cursor: pointer;
  white-space: nowrap;
}

.fs-pictionary-tool.is-active {
  border-color: rgba(36,120,255,.35);
  background: #eef5ff;
  color: #2478ff;
}

.fs-pictionary-size {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(51,65,85,.78);
  font-size: clamp(11px, 1.3cqw, 13px);
  font-weight: 950;
  white-space: nowrap;
}

.fs-pictionary-size input {
  width: clamp(72px, 12cqw, 122px);
  accent-color: #2478ff;
}

.fs-pictionary-colors {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.fs-pictionary-color {
  width: clamp(20px, 2.2cqw, 26px);
  height: clamp(20px, 2.2cqw, 26px);
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.95);
  box-shadow: 0 0 0 1px rgba(15,23,42,.10);
  cursor: pointer;
}

.fs-pictionary-color.is-active {
  box-shadow: 0 0 0 2px rgba(36,120,255,.45), 0 0 0 5px rgba(36,120,255,.10);
  transform: scale(1.04);
}

.fs-pictionary-canvas-shell,
.present-pictionary-canvas-shell {
  min-height: 0;
  height: 100%;
  border: 2px dashed rgba(99,102,241,.22);
  border-radius: 24px;
  background: #fff;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 12px 32px rgba(15,23,42,.05);
}

.fs-pictionary-simple-widget .fs-pictionary-canvas-shell,
.present-pictionary:not(.present-pictionary-vs) .present-pictionary-canvas-shell {
  min-height: clamp(240px, 58cqh, 680px);
}

.fs-pictionary-board .fs-pictionary-canvas-shell,
.present-pictionary-board .present-pictionary-canvas-shell {
  min-height: clamp(180px, 38cqh, 520px);
}

.fs-pictionary-canvas-shell canvas,
.present-pictionary-canvas-shell canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}

.fs-pictionary-vs-widget,
.present-pictionary-vs {
  grid-template-rows: auto minmax(0, 1fr);
}

.fs-pictionary-vs-score,
.present-pictionary-vs-score {
  justify-content: center;
}

.fs-pictionary-vs-score strong,
.present-pictionary-vs-score strong {
  font-size: clamp(20px, 3.4cqw, 34px);
  font-weight: 950;
  color: #10213f;
  padding: 6px 14px;
}

.fs-pictionary-vs-score button i,
.present-pictionary-vs-score button i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-right: 7px;
}

.fs-pictionary-vs-boards,
.present-pictionary-vs-boards {
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(10px, 2cqw, 18px);
}

.fs-pictionary-board,
.present-pictionary-board {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
}

.fs-pictionary-board .fs-pictionary-draw-tools,
.present-pictionary-board .fs-pictionary-draw-tools {
  padding: 7px 8px;
  gap: 6px;
}

.fs-pictionary-board .fs-pictionary-clear-tool,
.present-pictionary-board .fs-pictionary-clear-tool {
  margin-left: 0;
}

.fs-pictionary-board .fs-pictionary-size input,
.present-pictionary-board .fs-pictionary-size input {
  width: clamp(58px, 9cqw, 96px);
}

.fs-pictionary-board > b,
.present-pictionary-board > b {
  text-align: center;
  font-size: clamp(13px, 1.6cqw, 18px);
  font-weight: 950;
  color: rgba(15, 23, 42, .78);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-pictionary.is-compact .fs-pictionary-head p,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-pictionary-vs.is-compact .fs-pictionary-head p,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-pictionary.is-tiny .fs-pictionary-head,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-pictionary-vs.is-tiny .fs-pictionary-head {
  display: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-pictionary.is-compact .fs-pictionary-topline,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-pictionary-vs.is-compact .fs-pictionary-topline,
.present-widget-pictionary.is-compact .present-pictionary-topline,
.present-widget-pictionary-vs.is-compact .present-pictionary-topline {
  grid-template-columns: 1fr;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-pictionary.is-compact .fs-pictionary-draw-tools,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-pictionary-vs.is-compact .fs-pictionary-draw-tools,
.present-widget-pictionary.is-compact .fs-pictionary-draw-tools,
.present-widget-pictionary-vs.is-compact .fs-pictionary-draw-tools {
  padding: 6px;
  gap: 5px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-pictionary.is-tiny .fs-pictionary-draw-tools,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-pictionary-vs.is-tiny .fs-pictionary-draw-tools {
  padding: 5px;
  gap: 4px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-pictionary-vs.is-compact .fs-pictionary-vs-boards,
.present-widget-pictionary-vs.is-compact .present-pictionary-vs-boards {
  grid-template-columns: 1fr;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-card:has(.fs-spotlight-pictionary),
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-card:has(.fs-spotlight-pictionary-vs) {
  width: min(92vw, 1280px);
  max-width: calc(100vw - 96px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-pictionary,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-pictionary-vs {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-pictionary .fs-pictionary-widget,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-pictionary-vs .fs-pictionary-widget {
  min-height: min(82vh, 760px);
  width: 100%;
  max-width: 100%;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-pictionary-vs .fs-pictionary-board .fs-pictionary-draw-tools {
  gap: 5px;
  padding: 6px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-pictionary-vs .fs-pictionary-tool {
  padding: 6px 9px;
}

/* M23.4 — Sticker polish: avoid clipped art, no side settings, flip-friendly wrapper */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-sticker,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-sticker .fs-sticker-widget,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-sticker .fs-sticker-widget {
  overflow: visible !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-sticker-art {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  transform-origin: center center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-sticker .fs-sticker-art svg,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-sticker .fs-sticker-art img,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-sticker .fs-sticker-art svg,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-sticker .fs-sticker-art img {
  max-width: 94% !important;
  max-height: 94% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  display: block;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-sticker .fs-widget-toolbar {
  min-width: max-content;
}

/* P0 Stopwatch split alignment polish */
body.screen-shell-builder.screen-builder-fullscreen .fs-stopwatch-main {
  align-items: stretch;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-stopwatch-time {
  text-align: center;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-stopwatch-actions {
  align-self: center;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-stopwatch-laps-shell {
  width: min(100%, 680px);
  justify-content: stretch;
  align-self: center;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-stopwatch-laps {
  min-width: 0;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-stopwatch-lap-row {
  grid-template-columns: minmax(90px, 1fr) max-content;
  align-items: center;
  text-align: left;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-stopwatch-lap-row span {
  min-width: 0;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-stopwatch-lap-row b {
  text-align: right;
  white-space: nowrap;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-stopwatch.is-compact .fs-stopwatch-lap-row {
  gap: 8px;
  padding: 3px 8px;
}

/* M24 icon refresh — keep bottom dock icons visually unified with SVG masks. */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-tool span {
  background: transparent !important;
  color: inherit !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-tool .fs-tool-icon {
  background: currentColor !important;
}


body.screen-shell-builder.screen-builder-fullscreen .fs-template-pill-icon {
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  color: currentColor;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-pill-icon .fs-tool-icon {
  width: 14px;
  height: 14px;
}

/* M25.3 — Gomoku spotlight centering stability */
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-card:has(.fs-spotlight-gomoku) {
  width: min(92vw, 1460px) !important;
  max-width: min(92vw, 1460px) !important;
  min-height: 0 !important;
  max-height: min(88vh, 860px) !important;
  transform: none !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-content.fs-spotlight-gomoku {
  width: min(92vw, 1460px) !important;
  min-width: min(82vw, 1120px) !important;
  height: auto !important;
  min-height: min(74vh, 700px) !important;
  max-height: min(88vh, 860px) !important;
  align-content: center !important;
  place-items: center !important;
  overflow: hidden !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-gomoku .fs-gomoku-widget {
  justify-content: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-gomoku .fs-gomoku-board {
  width: min(100%, var(--gomoku-board-max, 1240px)) !important;
  max-width: min(100%, var(--gomoku-board-max, 1240px)) !important;
  min-height: min(calc(var(--gomoku-size) * var(--gomoku-cell-min, 52px)), 64vh) !important;
  margin-inline: auto;
}


/* M25.3.1 — Template category icons use the same SVG mask language as the main toolbar */
body.screen-shell-builder.screen-builder-fullscreen .fs-template-tab-icon .fs-tool-icon,
body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb-emoji .fs-tool-icon,
body.screen-shell-builder.screen-builder-fullscreen .fs-template-pill-icon .fs-tool-icon {
  display: block;
  background: currentColor;
  opacity: .96;
  -webkit-mask: var(--fs-tool-icon) center / contain no-repeat;
  mask: var(--fs-tool-icon) center / contain no-repeat;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-tab-icon .fs-tool-icon {
  width: 20px;
  height: 20px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb-emoji .fs-tool-icon {
  width: 20px;
  height: 20px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-pill-icon .fs-tool-icon {
  width: 13px;
  height: 13px;
}

/* M25.3.2 — Keep selected activity widgets and their toolbar menus above large content */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget.is-selected {
  z-index: 10000 !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget.is-selected > .fs-widget-toolbar {
  z-index: 10006 !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget.is-selected > .fs-widget-toolbar .fs-widget-more-menu {
  z-index: 10008 !important;
}

/* M25.3.3 — Gomoku builder layout: avoid the board sinking below the visible area */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-gomoku:not(.is-compact) .fs-gomoku-widget {
  justify-content: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-gomoku:not(.is-compact) .fs-gomoku-board {
  max-height: min(62cqh, 620px);
}

/* M25.4 — Stable template modal height + Gomoku Spotlight layout + toolbar click reliability */
body.screen-shell-builder.screen-builder-fullscreen .fs-template-panel {
  height: min(760px, calc(100vh - 42px));
  max-height: min(760px, calc(100vh - 42px));
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-grid {
  min-height: 0;
  overflow-y: auto;
  align-content: start;
  scrollbar-gutter: stable;
  padding-bottom: 22px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-toolbar,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-toolbar * {
  pointer-events: auto;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget.is-selected {
  overflow: visible !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget.is-selected > .fs-widget-toolbar,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget.is-selected > .fs-widget-toolbar .fs-widget-more,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget.is-selected > .fs-widget-toolbar .fs-widget-more-menu {
  overflow: visible !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-card:has(.fs-spotlight-gomoku) {
  width: min(92vw, 1480px) !important;
  max-width: min(92vw, 1480px) !important;
  height: min(84vh, 820px) !important;
  min-height: min(640px, 84vh) !important;
  max-height: min(84vh, 820px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transform: none !important;
  overflow: visible !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-content.fs-spotlight-gomoku {
  display: flex !important;
  align-items: stretch !important;
  justify-content: center !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  padding: clamp(12px, 1.5vw, 22px) !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-gomoku .fs-gomoku-widget {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  justify-content: flex-start !important;
  overflow: hidden !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-gomoku .fs-gomoku-head,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-gomoku .fs-gomoku-teambar,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-gomoku .fs-gomoku-turn,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-gomoku .fs-gomoku-actions {
  flex: 0 0 auto;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-gomoku .fs-gomoku-board {
  flex: 1 1 0 !important;
  width: min(100%, var(--gomoku-board-max, 1240px)) !important;
  max-width: min(100%, var(--gomoku-board-max, 1240px)) !important;
  min-height: 0 !important;
  max-height: none !important;
  height: auto !important;
  margin: 0 auto !important;
}

@media (max-height: 760px) {
  body.screen-shell-builder.screen-builder-fullscreen .fs-template-panel {
    height: calc(100vh - 28px);
    max-height: calc(100vh - 28px);
  }

  body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-card:has(.fs-spotlight-gomoku) {
    height: calc(100vh - 80px) !important;
    min-height: 0 !important;
  }
}

/* M25.6 Stability patch — widget menu, Gomoku Spotlight, template panel, save-friendly drawing */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget.is-selected {
  overflow: visible !important;
  z-index: 18000 !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget.is-selected > .fs-widget-toolbar {
  pointer-events: auto !important;
  z-index: 22000 !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-toolbar,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-toolbar * {
  pointer-events: auto !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-floating-menu {
  position: fixed !important;
  z-index: 26000 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 6px !important;
  width: 220px !important;
  min-width: 220px !important;
  padding: 10px !important;
  border-radius: 16px !important;
  color: #0f172a !important;
  background: rgba(255, 255, 255, .98) !important;
  border: 1px solid rgba(148, 163, 184, .28) !important;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .30) !important;
  backdrop-filter: blur(18px) !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-floating-menu button {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 100% !important;
  min-height: 38px !important;
  padding: 0 12px !important;
  border: 0 !important;
  border-radius: 11px !important;
  color: #0f172a !important;
  background: transparent !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  line-height: 1.2 !important;
  cursor: pointer !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-floating-menu button:hover {
  background: rgba(99, 102, 241, .12) !important;
  color: #4f46e5 !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-more-button {
  position: relative !important;
  z-index: 22001 !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-overlay.is-gomoku-spotlight {
  overflow: hidden !important;
  place-items: center !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-overlay.is-gomoku-spotlight .fs-spotlight-card,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-card.is-gomoku-spotlight-card {
  width: min(92vw, 1480px) !important;
  max-width: min(92vw, 1480px) !important;
  height: min(84vh, 820px) !important;
  min-height: min(620px, 84vh) !important;
  max-height: min(84vh, 820px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transform: none !important;
  overflow: visible !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-content.is-gomoku-spotlight-content {
  display: flex !important;
  align-items: stretch !important;
  justify-content: center !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  padding: clamp(12px, 1.5vw, 22px) !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-content.is-gomoku-spotlight-content .fs-gomoku-widget {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  overflow: hidden !important;
  justify-content: center !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-content.is-gomoku-spotlight-content .fs-gomoku-board {
  flex: 1 1 auto !important;
  width: min(100%, var(--gomoku-board-max, 1280px)) !important;
  max-width: min(100%, var(--gomoku-board-max, 1280px)) !important;
  min-height: 0 !important;
  max-height: none !important;
  height: auto !important;
  margin: 0 auto !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-panel {
  height: min(760px, calc(100vh - 42px)) !important;
  max-height: min(760px, calc(100vh - 42px)) !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-grid {
  min-height: 0 !important;
  overflow-y: auto !important;
  align-content: start !important;
  scrollbar-gutter: stable !important;
}


/* M25.7 — Final Gomoku spotlight height override + new-widget visibility */
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-card.is-gomoku-spotlight-card,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-card:has(.fs-spotlight-gomoku) {
  width: min(92vw, 1480px) !important;
  max-width: min(92vw, 1480px) !important;
  height: min(82vh, 820px) !important;
  min-height: min(620px, 82vh) !important;
  max-height: min(82vh, 820px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transform: none !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-content.fs-spotlight-gomoku,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-content.is-gomoku-spotlight-content {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: min(78vh, 780px) !important;
  min-height: min(580px, 78vh) !important;
  max-height: min(78vh, 780px) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  padding: clamp(14px, 1.5vw, 24px) !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-content.fs-spotlight-gomoku .fs-gomoku-widget,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-content.is-gomoku-spotlight-content .fs-gomoku-widget {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  overflow: hidden !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-content.fs-spotlight-gomoku .fs-gomoku-head,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-content.fs-spotlight-gomoku .fs-gomoku-teambar,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-content.fs-spotlight-gomoku .fs-gomoku-turn,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-content.fs-spotlight-gomoku .fs-gomoku-actions,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-content.is-gomoku-spotlight-content .fs-gomoku-head,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-content.is-gomoku-spotlight-content .fs-gomoku-teambar,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-content.is-gomoku-spotlight-content .fs-gomoku-turn,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-content.is-gomoku-spotlight-content .fs-gomoku-actions {
  flex: 0 0 auto !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-content.fs-spotlight-gomoku .fs-gomoku-board,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-content.is-gomoku-spotlight-content .fs-gomoku-board {
  flex: 1 1 auto !important;
  width: min(100%, var(--gomoku-board-max, 1280px)) !important;
  max-width: min(100%, var(--gomoku-board-max, 1280px)) !important;
  height: min(58vh, 620px) !important;
  min-height: min(430px, 58vh) !important;
  max-height: min(58vh, 620px) !important;
  margin: 0 auto !important;
  display: grid !important;
  grid-template-columns: repeat(var(--gomoku-size), minmax(0, 1fr)) !important;
  grid-template-rows: repeat(var(--gomoku-size), minmax(0, 1fr)) !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-content.fs-spotlight-gomoku .fs-gomoku-cell,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-content.is-gomoku-spotlight-content .fs-gomoku-cell {
  min-height: 0 !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget.is-selected {
  z-index: 24000 !important;
}

/* M25.8 — Gomoku Spotlight independent renderer + safer new-widget placement */
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-overlay.is-gomoku-spotlight {
  display: grid !important;
  place-items: center !important;
  overflow: hidden !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-card.is-gomoku-spotlight-card {
  width: min(92vw, 1500px) !important;
  max-width: min(92vw, 1500px) !important;
  height: min(86vh, 850px) !important;
  min-height: min(72vh, 680px) !important;
  max-height: min(86vh, 850px) !important;
  transform: none !important;
  display: grid !important;
  place-items: center !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-content.is-gomoku-spotlight-content {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  display: block !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-gomoku-spotlight-safe {
  width: 100%;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.2vh, 14px);
  padding: clamp(14px, 2vw, 26px);
  border-radius: 22px;
  background: rgba(255,255,255,.96);
  color: #0f172a;
  box-shadow: 0 28px 90px rgba(0,0,0,.34);
  overflow: hidden;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-gomoku-spotlight-head {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  text-align: center;
  flex: 0 0 auto;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-gomoku-spotlight-head > div {
  grid-column: 2;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-gomoku-spotlight-head strong {
  display: block;
  font-size: clamp(20px, 2.1vw, 36px);
  line-height: 1.05;
  font-weight: 950;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-gomoku-spotlight-head p {
  margin: 6px 0 0;
  color: rgba(15,23,42,.58);
  font-size: clamp(11px, 1vw, 16px);
  font-weight: 800;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-gomoku-spotlight-head > span {
  grid-column: 3;
  justify-self: end;
  padding: 7px 12px;
  border-radius: 999px;
  color: #4f46e5;
  background: rgba(99,102,241,.12);
  font-size: clamp(11px, .95vw, 14px);
  font-weight: 950;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-gomoku-spotlight-teams,
body.screen-shell-builder.screen-builder-fullscreen .fs-gomoku-spotlight-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  flex: 0 0 auto;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-gomoku-spotlight-team,
body.screen-shell-builder.screen-builder-fullscreen .fs-gomoku-spotlight-turn,
body.screen-shell-builder.screen-builder-fullscreen .fs-gomoku-spotlight-actions button {
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 999px;
  background: rgba(255,255,255,.9);
  color: #0f172a;
  padding: 6px 12px;
  font-weight: 950;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-gomoku-spotlight-team {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border-color: color-mix(in srgb, var(--team-color) 42%, transparent);
  background: color-mix(in srgb, var(--team-color) 10%, white);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-gomoku-spotlight-team i,
body.screen-shell-builder.screen-builder-fullscreen .fs-gomoku-spotlight-turn span {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--team-color);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-gomoku-spotlight-team.is-current {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--team-color) 18%, transparent);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-gomoku-spotlight-turn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(15,23,42,.06);
  flex: 0 0 auto;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-gomoku-spotlight-board {
  flex: 1 1 auto;
  min-height: 0;
  width: min(100%, var(--gomoku-board-max, 1180px));
  max-width: min(100%, var(--gomoku-board-max, 1180px));
  height: min(62vh, 660px);
  display: grid;
  grid-template-columns: repeat(var(--gomoku-size), minmax(0, 1fr));
  grid-template-rows: repeat(var(--gomoku-size), minmax(0, 1fr));
  gap: clamp(4px, .45vw, 8px);
  padding: clamp(8px, 1vw, 14px);
  border-radius: 18px;
  border: 1px solid rgba(15,23,42,.10);
  background: linear-gradient(135deg, rgba(15,23,42,.07), rgba(99,102,241,.08));
}

body.screen-shell-builder.screen-builder-fullscreen .fs-gomoku-spotlight-cell {
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(15,23,42,.14);
  border-radius: 12px;
  background: rgba(255,255,255,.78);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.86);
  display: grid;
  place-items: center;
  cursor: pointer;
  overflow: hidden;
  padding: 4px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-gomoku-spotlight-cell.is-filled {
  background: color-mix(in srgb, var(--cell-color) 10%, white);
  border-color: color-mix(in srgb, var(--cell-color) 45%, transparent);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-gomoku-spotlight-cell span {
  width: min(62%, 44px);
  height: min(62%, 44px);
  border-radius: 999px;
  background: var(--cell-color);
  box-shadow: inset 0 8px 12px rgba(255,255,255,.25), 0 5px 14px color-mix(in srgb, var(--cell-color) 34%, transparent);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-gomoku-spotlight-cell em {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
  color: #334155;
  font-style: normal;
  font-size: clamp(9px, calc(var(--gomoku-font, 12px) * .9), 22px);
  line-height: 1.08;
  font-weight: 950;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-gomoku-spotlight-question {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: clamp(16px, 3vw, 40px);
  background: rgba(248,250,252,.78);
  backdrop-filter: blur(5px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-gomoku-spotlight-question-card {
  width: min(760px, 92%);
  display: grid;
  gap: 12px;
  padding: clamp(20px, 3vw, 36px);
  border-radius: 22px;
  border: 1px solid rgba(99,102,241,.18);
  background: rgba(255,255,255,.98);
  box-shadow: 0 28px 70px rgba(15,23,42,.18);
  text-align: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-gomoku-spotlight-choice-list {
  width: min(680px, 94%);
  display: grid;
  gap: 8px;
  margin: 0 auto;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-gomoku-spotlight-choice-list button {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(99,102,241,.18);
  background: rgba(99,102,241,.08);
  color: #172033;
  font-weight: 900;
  text-align: left;
}

/* M25.9 — Final activity placement + Gomoku Spotlight fit polish */
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-card.is-gomoku-spotlight-card {
  width: min(90vw, 1420px) !important;
  max-width: min(90vw, 1420px) !important;
  height: min(82vh, 780px) !important;
  min-height: min(640px, 82vh) !important;
  max-height: min(82vh, 780px) !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-gomoku-spotlight-safe {
  height: 100% !important;
  max-height: 100% !important;
  padding: clamp(12px, 1.5vw, 22px) !important;
  gap: clamp(6px, .9vh, 11px) !important;
  justify-content: stretch !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-gomoku-spotlight-board {
  flex: 1 1 0 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  width: min(100%, var(--gomoku-board-max, 1120px)) !important;
  max-width: min(100%, var(--gomoku-board-max, 1120px)) !important;
  overflow: hidden !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-gomoku-spotlight-head strong {
  font-size: clamp(18px, 1.8vw, 32px) !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-gomoku-spotlight-head p {
  margin-top: 4px !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-gomoku-spotlight-team,
body.screen-shell-builder.screen-builder-fullscreen .fs-gomoku-spotlight-turn,
body.screen-shell-builder.screen-builder-fullscreen .fs-gomoku-spotlight-actions button {
  padding: 5px 11px !important;
}


/* P1-G — text widget default operation safety */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text:not(.is-text-transparent-theme) {
  border-radius: 18px;
  background: var(--widget-bg, #ffffff);
  box-shadow: 0 16px 42px rgba(15, 23, 42, .11);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text:not(.is-text-transparent-theme) .fs-widget-text-content {
  padding: 14px 18px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text .fs-text-drag-handle {
  left: -34px !important;
  top: 50% !important;
  transform: translateY(-50%) scale(.92) !important;
  z-index: 10 !important;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text:hover .fs-text-drag-handle,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.is-selected .fs-text-drag-handle {
  opacity: 1;
  transform: translateY(-50%) scale(1) !important;
  pointer-events: auto;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text:not(.is-text-transparent-theme):hover {
  outline: 1px dashed rgba(99, 102, 241, .34);
  outline-offset: 4px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text:not(.is-text-transparent-theme).is-selected {
  outline-offset: 6px;
}

/* P1-J — Multiple Choice + Cloze Race stability patch */
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-option.is-selected:not(.is-correct):not(.is-wrong) {
  border-color: color-mix(in srgb, var(--widget-accent, #6366f1) 58%, #fff);
  background: color-mix(in srgb, var(--widget-accent, #6366f1) 11%, #fff);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-card:has(.fs-spotlight-multiple-choice) {
  width: min(94vw, 1320px);
  height: min(88vh, 880px);
  min-height: min(76vh, 740px);
  max-height: 92vh;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-content.fs-spotlight-multiple-choice {
  overflow: visible;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-multiple-choice .fs-mcq-widget {
  overflow: visible;
  padding: clamp(28px, 4vh, 54px) clamp(34px, 4vw, 74px) clamp(86px, 9vh, 110px);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-multiple-choice .fs-mcq-main {
  grid-template-rows: minmax(96px, auto) auto;
  row-gap: clamp(18px, 3vh, 38px);
  padding: clamp(20px, 3vh, 44px) 0 clamp(26px, 4vh, 52px);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-multiple-choice .fs-mcq-question {
  min-height: 0;
  font-size: clamp(28px, 3.6vw, 54px);
  line-height: 1.16;
  overflow-wrap: anywhere;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-multiple-choice .fs-mcq-option {
  min-block-size: clamp(56px, 7.4vh, 86px);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-multiple-choice .fs-mcq-actions,
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-multiple-choice .fs-mcq-topbar {
  bottom: clamp(18px, 3.2vh, 38px);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-cloze-race-widget {
  overflow: visible;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-cloze-sentence {
  font-size: clamp(20px, min(4cqw, 4cqh), var(--cloze-font-size, 26px));
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: normal;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-cloze-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  overflow: visible;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-cloze-option {
  width: 100%;
  min-height: clamp(42px, 7cqh, 68px);
  border-radius: 18px;
  white-space: normal;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-cloze-race .fs-cloze-race-widget {
  min-height: min(66vh, 660px);
  justify-content: center;
}

/* P1-J.1 — Multiple Choice reveal FX + long-question projection guard */
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-widget.is-question-long .fs-mcq-main {
  grid-template-rows: clamp(148px, 30cqh, 262px) clamp(144px, 24cqh, 220px);
  row-gap: clamp(16px, 3cqh, 34px);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-widget.is-question-long .fs-mcq-question {
  font-size: clamp(24px, 3.05cqw, 44px);
  line-height: 1.12;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-widget.is-question-very-long .fs-mcq-main {
  grid-template-rows: clamp(170px, 34cqh, 320px) clamp(132px, 22cqh, 204px);
  row-gap: clamp(12px, 2.2cqh, 26px);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-widget.is-question-very-long .fs-mcq-question {
  font-size: clamp(20px, 2.45cqw, 36px);
  line-height: 1.1;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-widget.is-question-long .fs-mcq-options,
body.screen-shell-builder.screen-builder-fullscreen .fs-mcq-widget.is-question-very-long .fs-mcq-options {
  align-self: start;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-multiple-choice .fs-mcq-widget.is-question-long .fs-mcq-main {
  grid-template-rows: minmax(clamp(170px, 32vh, 300px), auto) auto;
  row-gap: clamp(16px, 3vh, 34px);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-multiple-choice .fs-mcq-widget.is-question-long .fs-mcq-question {
  font-size: clamp(28px, 3.25vw, 48px);
  line-height: 1.12;
}
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-multiple-choice .fs-mcq-widget.is-question-very-long .fs-mcq-main {
  grid-template-rows: minmax(clamp(210px, 38vh, 360px), auto) auto;
  row-gap: clamp(10px, 2vh, 24px);
}
body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-multiple-choice .fs-mcq-widget.is-question-very-long .fs-mcq-question {
  font-size: clamp(22px, 2.7vw, 40px);
  line-height: 1.1;
}

/* P1-K.1 — Unified Tabler icons + Cloze blank/navigation polish */
body.screen-shell-builder.screen-builder-fullscreen .fs-ui-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: var(--fs-ui-icon) center / contain no-repeat;
  mask: var(--fs-ui-icon) center / contain no-repeat;
  flex: 0 0 auto;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-toolbar-svg {
  width: 16px;
  height: 16px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-toolbar button,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-toolbar summary {
  display: grid;
  place-items: center;
  line-height: 1;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-toolbar-drag .fs-toolbar-svg {
  width: 15px;
  height: 15px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-close-btn {
  display: grid;
  place-items: center;
  padding: 0;
  line-height: 1;
  text-align: center;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-work-symbol-svg,
body.screen-shell-builder.screen-builder-fullscreen .fs-work-symbol-option-svg,
body.screen-shell-builder.screen-builder-fullscreen .fs-work-symbol-setting-svg {
  display: block;
  background: currentColor;
  -webkit-mask: var(--fs-ui-icon) center / contain no-repeat;
  mask: var(--fs-ui-icon) center / contain no-repeat;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-work-symbol-svg {
  width: clamp(38px, 11cqw, 82px);
  height: clamp(38px, 11cqw, 82px);
  color: var(--widget-accent, #6366f1);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-work-symbol-option-svg {
  width: clamp(18px, 4.5cqw, 28px);
  height: clamp(18px, 4.5cqw, 28px);
  color: currentColor;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-work-symbol-setting-svg {
  width: 46px;
  height: 46px;
  padding: 10px;
  box-sizing: border-box;
  border-radius: 999px;
  color: #64748b;
  background-color: currentColor;
  background-clip: content-box;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-work-symbol-setting.is-active .fs-work-symbol-setting-svg {
  color: #6366f1;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-spotlight-work-symbol .fs-work-symbol-svg {
  width: clamp(72px, 11vw, 140px);
  height: clamp(72px, 11vw, 140px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-cloze-blank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: clamp(96px, 12cqw, 160px);
  margin: 0 6px;
  padding: 0 .35em;
  border-bottom: .12em solid var(--widget-accent, #6366f1);
  border-radius: 0;
  color: var(--widget-accent, #6366f1);
  background: transparent;
  line-height: 1;
  vertical-align: baseline;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-cloze-blank.is-filled {
  min-width: auto;
  color: var(--widget-text, #10213f);
  border-bottom-width: .08em;
}


/* P1-K.3 — classroom screen toolbar final order + single-line Cloze blank */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-dock {
  max-width: calc(100vw - 96px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-tool {
  min-width: 64px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-tool strong {
  font-size: 11.5px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-activity-picker-tool strong {
  color: #fff;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-more-popover .fs-widget-tool strong {
  color: #334155;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-cloze-blank {
  display: inline-block;
  width: clamp(96px, 12cqw, 160px);
  min-width: 0;
  height: .16em;
  margin: 0 8px;
  padding: 0;
  border: 0;
  border-bottom: .12em solid var(--widget-accent, #6366f1);
  border-radius: 0;
  color: var(--widget-accent, #6366f1);
  background: transparent !important;
  line-height: 0;
  vertical-align: baseline;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-cloze-blank.is-filled {
  width: auto;
  min-width: auto;
  height: auto;
  padding: 0 .12em;
  border-bottom-width: .08em;
  color: var(--widget-text, #10213f);
  line-height: 1;
}

/* P1-K.5 — rotation handles for text and sticker widgets only */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget.is-rotated > .fs-widget-toolbar {
  transform: translateX(-50%) rotate(var(--widget-counter-rotation, 0deg));
}

body.screen-shell-builder.screen-builder-fullscreen .fs-rotate-handle {
  position: absolute;
  left: 50%;
  bottom: -34px;
  z-index: 9998;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid var(--widget-accent, #6366f1);
  border-radius: 999px;
  color: var(--widget-accent, #6366f1);
  font-size: 19px;
  font-weight: 900;
  line-height: 1;
  cursor: grab;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.2);
  transform: translateX(-50%) rotate(var(--widget-counter-rotation, 0deg));
  pointer-events: auto;
  user-select: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-rotate-handle:active {
  cursor: grabbing;
  transform: translateX(-50%) rotate(var(--widget-counter-rotation, 0deg)) scale(0.96);
}

body.screen-shell-builder.screen-builder-fullscreen.is-projecting .fs-rotate-handle {
  display: none !important;
}

/* P1-K.6 — full-screen annotation mode */
body.screen-shell-builder.screen-builder-fullscreen .fs-annotation-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 70;
  overflow: visible;
  pointer-events: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-annotation-layer.is-draw-mode {
  pointer-events: auto;
  cursor: crosshair;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-annotation-path {
  filter: drop-shadow(0 1px 1px rgba(15, 23, 42, .08));
  pointer-events: stroke;
  cursor: pointer;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-annotation-layer.is-draw-mode .fs-annotation-path {
  pointer-events: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-annotation-path.is-selected {
  stroke-dasharray: 7 5;
  filter: drop-shadow(0 0 0 rgba(255,255,255,0)) drop-shadow(0 0 5px rgba(99, 102, 241, .55));
}

body.screen-shell-builder.screen-builder-fullscreen .fs-annotation-toolbar {
  position: absolute;
  left: 50%;
  bottom: max(16px, 2.2%);
  transform: translateX(-50%);
  z-index: 95;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border-radius: 20px;
  border: 1px solid rgba(226, 232, 240, .95);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 18px 42px rgba(15, 23, 42, .16);
  backdrop-filter: blur(16px);
  pointer-events: auto;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-annotation-toolbar button {
  height: 34px;
  min-width: 34px;
  border: 0;
  border-radius: 13px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 900;
  color: #1f2a44;
  background: #f8fafc;
  cursor: pointer;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-annotation-toolbar button:hover:not(:disabled),
body.screen-shell-builder.screen-builder-fullscreen .fs-annotation-toolbar button.is-active {
  color: #4f46e5;
  background: #eef2ff;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-annotation-toolbar button:disabled {
  opacity: .42;
  cursor: not-allowed;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-annotation-color {
  width: 34px;
  height: 34px;
  padding: 2px;
  border: 0;
  border-radius: 999px;
  background: #f8fafc;
  cursor: pointer;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-annotation-tool-svg {
  width: 17px;
  height: 17px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-tool[data-widget-tool="annotation"].is-active {
  color: #4f46e5;
  background: #eef2ff;
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, .16);
}

body.screen-shell-builder.screen-builder-fullscreen.is-annotation-mode .fs-stage {
  cursor: crosshair;
}

body.screen-shell-builder.screen-builder-fullscreen.is-annotation-mode .fs-widget-layer {
  pointer-events: none;
}


/* P1-K.7.1 — transparent text usability: dark accent text + larger edge drag zones */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.is-text-transparent-theme {
  cursor: move;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.is-text-transparent-theme .fs-widget-text-content {
  cursor: text;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.is-text-transparent-theme::before {
  inset: -10px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.is-text-transparent-theme:hover::before {
  border-color: rgba(15, 23, 42, .22);
  background: rgba(255, 255, 255, .08);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.is-text-transparent-theme.is-selected::before {
  border-color: rgba(99, 102, 241, .78);
  background: rgba(99, 102, 241, .045);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-transparent-drag-zone {
  position: absolute;
  z-index: 6;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: transparent;
  opacity: 0;
  pointer-events: none;
  cursor: move;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.is-text-transparent-theme:hover .fs-transparent-drag-zone,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.is-text-transparent-theme.is-selected .fs-transparent-drag-zone {
  pointer-events: auto;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-transparent-drag-zone:hover,
body.screen-shell-builder.screen-builder-fullscreen .fs-transparent-drag-zone:focus-visible {
  opacity: 1;
  outline: none;
  background: rgba(99, 102, 241, .12);
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, .45);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-transparent-drag-zone.is-top {
  left: 18px;
  right: 18px;
  top: -12px;
  height: 18px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-transparent-drag-zone.is-bottom {
  left: 18px;
  right: 18px;
  bottom: -12px;
  height: 18px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-transparent-drag-zone.is-left {
  top: 18px;
  bottom: 18px;
  left: -12px;
  width: 18px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-transparent-drag-zone.is-right {
  top: 18px;
  bottom: 18px;
  right: -12px;
  width: 18px;
}


/* P1-K.7.2 — transparent text drag hotfix
   Transparent text now behaves like a movable object: drag anywhere on the box;
   double-click to enter text editing mode. Edge zones are true full-length hit areas. */
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.is-text-transparent-theme {
  cursor: move;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.is-text-transparent-theme .fs-widget-text-content {
  position: relative;
  z-index: 2;
  cursor: text;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.is-text-transparent-theme .fs-transparent-move-surface {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: block;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  cursor: move;
  appearance: none;
  -webkit-appearance: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.is-text-transparent-theme:hover .fs-transparent-move-surface,
body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.is-text-transparent-theme.is-selected .fs-transparent-move-surface {
  background: rgba(99, 102, 241, .018);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.is-text-transparent-theme.is-editing-text .fs-transparent-move-surface {
  display: none;
  pointer-events: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.is-text-transparent-theme.is-editing-text .fs-widget-text-content {
  z-index: 8;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.is-text-transparent-theme .fs-transparent-drag-zone {
  z-index: 9;
  display: block;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  pointer-events: auto;
  cursor: move;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-widget-text.is-text-transparent-theme.is-editing-text .fs-transparent-drag-zone {
  pointer-events: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-transparent-drag-zone.is-top {
  left: 0;
  right: 0;
  top: -14px;
  width: auto;
  height: 22px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-transparent-drag-zone.is-bottom {
  left: 0;
  right: 0;
  bottom: -14px;
  width: auto;
  height: 22px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-transparent-drag-zone.is-left {
  top: 0;
  bottom: 0;
  left: -14px;
  width: 22px;
  height: auto;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-transparent-drag-zone.is-right {
  top: 0;
  bottom: 0;
  right: -14px;
  width: 22px;
  height: auto;
}

/* P1-L.1 — first-time guide / onboarding */
body.screen-shell-builder.screen-builder-fullscreen .fs-guide-launcher {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 120;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid rgba(148, 163, 184, .34);
  border-radius: 999px;
  color: #0f172a;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 18px 44px rgba(15, 23, 42, .16);
  backdrop-filter: blur(16px);
  font: 800 13px/1 Inter, system-ui, sans-serif;
  cursor: pointer;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-guide-launcher span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #14b8a6);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-guide-launcher:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 52px rgba(15, 23, 42, .2);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-guide-welcome-layer,
body.screen-shell-builder.screen-builder-fullscreen .fs-guide-layer {
  position: fixed;
  inset: 0;
  z-index: 230;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-guide-welcome-layer {
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, .10);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-guide-welcome-card,
body.screen-shell-builder.screen-builder-fullscreen .fs-guide-card {
  box-sizing: border-box;
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 28px;
  color: #10213f;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 30px 90px rgba(15, 23, 42, .24);
  backdrop-filter: blur(20px);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-guide-welcome-card {
  position: relative;
  width: min(520px, calc(100vw - 36px));
  padding: 32px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-guide-welcome-card h2,
body.screen-shell-builder.screen-builder-fullscreen .fs-guide-card h2 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 21px;
  line-height: 1.16;
  letter-spacing: -.025em;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-guide-welcome-card p,
body.screen-shell-builder.screen-builder-fullscreen .fs-guide-body {
  margin: 0;
  color: #475569;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.58;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-guide-welcome-actions,
body.screen-shell-builder.screen-builder-fullscreen .fs-guide-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-guide-primary,
body.screen-shell-builder.screen-builder-fullscreen .fs-guide-secondary,
body.screen-shell-builder.screen-builder-fullscreen .fs-guide-ghost {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  font: 850 14px/1 Inter, system-ui, sans-serif;
  cursor: pointer;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-guide-primary {
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #14b8a6);
  box-shadow: 0 14px 34px rgba(37, 99, 235, .24);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-guide-secondary {
  color: #1d4ed8;
  background: #eff6ff;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-guide-secondary:disabled {
  opacity: .45;
  cursor: default;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-guide-ghost {
  color: #64748b;
  background: transparent;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-guide-welcome-close,
body.screen-shell-builder.screen-builder-fullscreen .fs-guide-close {
  position: absolute;
  right: 18px;
  top: 18px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 14px;
  color: #475569;
  background: #eef2f7;
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-guide-scrim {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .07);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-guide-highlight {
  position: fixed;
  z-index: 231;
  border: 3px solid #3b82f6;
  border-radius: 22px;
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, .07), 0 18px 48px rgba(37, 99, 235, .18);
  pointer-events: none;
  transition: left .18s ease, top .18s ease, width .18s ease, height .18s ease;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-guide-card {
  position: fixed;
  z-index: 232;
  width: min(340px, calc(100vw - 36px));
  padding: 18px 20px 20px;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-guide-step-count {
  margin: 0 0 8px;
  color: #2563eb;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: .12em;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  body.screen-shell-builder.screen-builder-fullscreen .fs-guide-launcher strong {
    display: none;
  }
  body.screen-shell-builder.screen-builder-fullscreen .fs-guide-launcher {
    padding: 8px;
  }
}

/* P1-L.1.1 — guide selector/focus hardening */

body.screen-shell-builder.screen-builder-fullscreen .fs-guide-welcome-card .fs-kicker {
  margin: 0 0 8px;
  color: #2563eb;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .14em;
  text-transform: uppercase;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-guide-layer,
body.screen-shell-builder.screen-builder-fullscreen .fs-guide-scrim {
  pointer-events: auto;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-guide-primary:focus-visible,
body.screen-shell-builder.screen-builder-fullscreen .fs-guide-secondary:focus-visible,
body.screen-shell-builder.screen-builder-fullscreen .fs-guide-ghost:focus-visible,
body.screen-shell-builder.screen-builder-fullscreen .fs-guide-close:focus-visible,
body.screen-shell-builder.screen-builder-fullscreen .fs-guide-welcome-close:focus-visible,
body.screen-shell-builder.screen-builder-fullscreen .fs-guide-launcher:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .55);
  outline-offset: 3px;
}


/* P1-L.1.2 — guide demo widget + template thumbnail simplification */
body.screen-shell-builder.screen-builder-fullscreen .fs-guide-demo-widget {
  position: fixed;
  z-index: 233;
  box-sizing: border-box;
  width: 260px;
  height: 120px;
  padding: 22px;
  border: 2px solid #3b82f6;
  border-radius: 18px;
  color: #0f172a;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 18px 52px rgba(37, 99, 235, .22);
  pointer-events: none;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-guide-demo-widget strong {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
  font-weight: 950;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-guide-demo-widget span {
  display: block;
  color: #475569;
  font-size: 14px;
  font-weight: 800;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-guide-demo-widget i {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 3px solid #3b82f6;
  border-radius: 999px;
  background: #fff;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-guide-demo-widget .is-nw { left: -9px; top: -9px; }
body.screen-shell-builder.screen-builder-fullscreen .fs-guide-demo-widget .is-ne { right: -9px; top: -9px; }
body.screen-shell-builder.screen-builder-fullscreen .fs-guide-demo-widget .is-sw { left: -9px; bottom: -9px; }
body.screen-shell-builder.screen-builder-fullscreen .fs-guide-demo-widget .is-se { right: -9px; bottom: -9px; }


body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb.has-frame-preview .fs-template-thumb-frame {
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
  opacity: .96;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb.has-frame-preview::after {
  opacity: .18;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb-mark {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 4;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--template-accent, #6366f1);
  background: rgba(255,255,255,.86);
  box-shadow: 0 10px 22px rgba(15, 23, 42, .10);
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb-mark .fs-tool-icon,
body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb-mark .fs-template-thumb-emoji {
  width: 17px;
  height: 17px;
  font-size: 15px;
}


body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb .fs-template-mini-card-main {
  left: 16%;
  right: 16%;
  bottom: 20px;
  min-height: 42px;
  opacity: .72;
}

body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb.has-frame-preview .fs-template-mini-card-main {
  display: none;
}


body.screen-shell-builder.screen-builder-fullscreen .fs-template-thumb-mark .fs-template-thumb-emoji {
  position: static;
  inset: auto;
  display: grid;
  place-items: center;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
}



/* P1-L.3 — mobile launch readiness for Classroom Screen Builder */
body.screen-shell-builder.screen-builder-fullscreen .fs-mobile-builder-notice {
  display: none;
}

@media (max-width: 820px) and (orientation: portrait), (max-width: 700px) {
  body.screen-shell-builder.screen-builder-fullscreen .fs-mobile-builder-notice:not(.is-dismissed) {
    position: fixed;
    inset: 0;
    z-index: 30000;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(248, 250, 252, .86);
    backdrop-filter: blur(10px);
  }

  body.screen-shell-builder.screen-builder-fullscreen .fs-mobile-builder-card {
    width: min(420px, 100%);
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 28px;
    padding: 24px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 24px 70px rgba(15, 23, 42, .18);
  }

  body.screen-shell-builder.screen-builder-fullscreen .fs-mobile-builder-card h2 {
    margin: 0;
    font-size: 25px;
    line-height: 1.12;
    letter-spacing: -.04em;
    color: #0f172a;
  }

  body.screen-shell-builder.screen-builder-fullscreen .fs-mobile-builder-card p:not(.fs-kicker) {
    margin: 12px 0 0;
    color: #475569;
    font-size: 15px;
    line-height: 1.65;
    font-weight: 750;
  }

  body.screen-shell-builder.screen-builder-fullscreen .fs-mobile-builder-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 18px;
  }

  body.screen-shell-builder.screen-builder-fullscreen .fs-mobile-builder-actions button,
  body.screen-shell-builder.screen-builder-fullscreen .fs-mobile-builder-actions a {
    min-height: 46px;
    border: 0;
    border-radius: 16px;
    display: grid;
    place-items: center;
    text-decoration: none;
    font: 900 15px/1.1 Inter, system-ui, sans-serif;
    cursor: pointer;
  }

  body.screen-shell-builder.screen-builder-fullscreen .fs-mobile-builder-actions button {
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #14b8a6);
  }

  body.screen-shell-builder.screen-builder-fullscreen .fs-mobile-builder-actions a {
    color: #1e293b;
    background: #eef2ff;
  }

  body.screen-shell-builder.screen-builder-fullscreen .fs-mobile-builder-actions button:focus-visible,
  body.screen-shell-builder.screen-builder-fullscreen .fs-mobile-builder-actions a:focus-visible {
    outline: 3px solid rgba(37, 99, 235, .35);
    outline-offset: 3px;
  }

  body.screen-shell-builder.screen-builder-fullscreen .fs-widget-dock {
    max-width: calc(100vw - 20px);
    overflow-x: auto;
    justify-content: flex-start;
    scrollbar-width: none;
  }

  body.screen-shell-builder.screen-builder-fullscreen .fs-widget-dock::-webkit-scrollbar {
    display: none;
  }

  body.screen-shell-builder.screen-builder-fullscreen .fs-top-left,
  body.screen-shell-builder.screen-builder-fullscreen .fs-top-right,
  body.screen-shell-builder.screen-builder-fullscreen .fs-bottom-right {
    transform: scale(.92);
    transform-origin: top right;
  }

  body.screen-shell-builder.screen-builder-fullscreen .fs-dock {
    width: min(420px, calc(100vw - 24px));
    right: 12px;
    max-height: calc(100vh - 120px);
  }
}
