/*
 * D3_RESTRAINED_AI_COACH
 * Customer visual-review candidate only. These values are not an approved Design System.
 */

:root {
  color-scheme: light;
  font-family: "Aptos", "Segoe UI Variable Text", "Noto Sans SC", sans-serif;
  --d3-mineral: #eee8df;
  --d3-paper: #fcfaf6;
  --d3-paper-strong: #fffefa;
  --d3-ink: #18252a;
  --d3-ink-soft: #314248;
  --d3-muted: #67757a;
  --d3-muted-readable: #536064;
  --d3-muted-on-dark: #bdc8c8;
  --d3-line: rgba(24, 37, 42, 0.17);
  --d3-line-strong: rgba(24, 37, 42, 0.34);
  --d3-optic: #7aa5a5;
  --d3-optic-readable: #55797a;
  --d3-optic-soft: rgba(122, 165, 165, 0.2);
  --d3-warm: #b28b52;
  --d3-warm-readable: #8a6432;
  --d3-warm-soft: rgba(178, 139, 82, 0.16);
  --d3-shadow: 0 20px 60px rgba(35, 42, 41, 0.09);
  --d3-shadow-soft: 0 10px 30px rgba(35, 42, 41, 0.065);
  --sf-canvas: var(--d3-mineral);
  --sf-surface: var(--d3-paper);
  --sf-surface-subtle: #f4f0e9;
  --sf-ink: var(--d3-ink);
  --sf-muted: var(--d3-muted);
  --sf-line: var(--d3-line);
  --sf-strong-line: var(--d3-line-strong);
  --sf-focus: #315f63;
  --sf-radius-sm: 8px;
  --sf-radius-md: 18px;
}

html {
  background: var(--d3-mineral);
}

body[data-direction-id="D3_RESTRAINED_AI_COACH"] {
  overflow-x: clip;
  background:
    radial-gradient(circle at 82% -8%, rgba(122, 165, 165, 0.2), transparent 34rem),
    linear-gradient(128deg, #e8e0d5 0%, var(--d3-mineral) 46%, #e6e9e5 100%);
  color: var(--d3-ink);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
iframe:focus-visible {
  outline-color: var(--d3-optic);
  outline-width: 3px;
  outline-offset: 3px;
}

.sf-skeleton {
  position: relative;
  isolation: isolate;
}

.sf-shell {
  isolation: isolate;
  overflow-x: hidden;
  background:
    linear-gradient(90deg, transparent 0 73%, rgba(122, 165, 165, 0.045) 73% 73.2%, transparent 73.2%),
    var(--d3-paper);
  box-shadow: var(--d3-shadow);
}

.sf-shell::before {
  position: absolute;
  z-index: 0;
  top: -12rem;
  right: -13rem;
  width: 30rem;
  height: 30rem;
  border: 1px solid rgba(122, 165, 165, 0.28);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.sf-shell > :not(.sf-nav) {
  position: relative;
  z-index: 1;
}

.sf-review-notice {
  padding-block: 7px;
  border-bottom-color: rgba(24, 37, 42, 0.11);
  background: #e8e4dd;
  color: var(--d3-muted-readable);
  font-size: 0.62rem;
  letter-spacing: 0.015em;
}

.sf-eyebrow,
.sf-meta,
.sf-state-badge,
.sf-identity,
.sf-dialogue__speaker,
.sf-signal-list__item {
  font-family: "Bahnschrift", "Aptos", sans-serif;
}

.sf-eyebrow {
  color: #65767a;
  font-size: 0.64rem;
  font-weight: 650;
  letter-spacing: 0.13em;
}

.sf-title {
  max-width: 15ch;
  margin-bottom: 10px;
  font-family: "Bahnschrift", "Aptos", sans-serif;
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 520;
  letter-spacing: -0.045em;
  line-height: 0.96;
}

.sf-card-title {
  margin-bottom: 8px;
  font-family: "Bahnschrift", "Aptos", sans-serif;
  font-weight: 560;
  letter-spacing: -0.025em;
}

.sf-supporting,
.sf-card-detail,
.sf-helper {
  color: var(--d3-muted);
}

.sf-state-badge,
.sf-identity {
  border-color: rgba(49, 95, 99, 0.26);
  background: #eff3f0;
  color: #315f63;
  letter-spacing: 0.055em;
}

.sf-progress__track {
  height: 4px;
  background: rgba(24, 37, 42, 0.1);
}

.sf-progress__fill {
  background: linear-gradient(90deg, var(--d3-optic), var(--d3-warm));
}

.sf-action,
.sf-mode {
  min-height: 44px;
  border-color: var(--d3-line-strong);
  border-radius: 8px;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease;
}

.sf-action--primary {
  position: relative;
  overflow: hidden;
  border-color: var(--d3-ink);
  background: var(--d3-ink);
  box-shadow: 0 8px 20px rgba(24, 37, 42, 0.14);
  color: #fffdf7;
}

.sf-action--primary::after {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--d3-warm);
  content: "";
}

.sf-action--secondary,
.sf-mode {
  background: transparent;
}

.sf-asset-slot {
  border: 0;
  border-radius: 14px;
  background: #f6f1e9;
}

.sf-asset {
  object-fit: contain;
}

.sf-asset-placeholder {
  border: 1px dashed var(--d3-line-strong);
  border-radius: inherit;
}

/* Today · precise invitation, not a dashboard. */

.sf-today__header {
  padding: 36px 24px 18px;
}

.sf-today__main {
  gap: 14px;
  padding: 0 24px 94px;
}

.sf-primary-card {
  position: relative;
  grid-template-columns: minmax(0, 1.08fr) minmax(122px, 0.72fr);
  min-height: 300px;
  gap: 14px;
  overflow: hidden;
  border-color: rgba(24, 37, 42, 0.12);
  border-radius: 24px 24px 24px 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(244, 239, 231, 0.92)),
    var(--d3-paper-strong);
  box-shadow: var(--d3-shadow-soft);
}

.sf-primary-card::before {
  position: absolute;
  top: 13%;
  right: -44%;
  width: 94%;
  aspect-ratio: 1;
  border: 1px solid rgba(122, 165, 165, 0.28);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.sf-primary-card__copy {
  z-index: 1;
}

.sf-primary-card .sf-asset-slot {
  z-index: 1;
  align-self: stretch;
  min-height: 0;
  background: #f8f3eb;
}

.sf-primary-card .sf-asset {
  object-position: 50% 42%;
}

.sf-supporting-grid {
  gap: 0;
  border-top: 1px solid var(--d3-line);
  border-bottom: 1px solid var(--d3-line);
}

.sf-supporting-card {
  min-height: 176px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.sf-supporting-card + .sf-supporting-card {
  border-left: 1px solid var(--d3-line);
}

.sf-supporting-card .sf-action {
  justify-content: flex-start;
  min-height: 44px;
  padding-inline: 0;
  border: 0;
  color: var(--d3-ink-soft);
}

.sf-nav {
  min-height: 72px;
  border-top-color: rgba(24, 37, 42, 0.13);
  background: rgba(252, 250, 246, 0.97);
  box-shadow: 0 -12px 30px rgba(24, 37, 42, 0.045);
}

.sf-nav__item {
  position: relative;
  color: #7a8588;
  letter-spacing: 0.01em;
}

.sf-nav__item.is-active {
  color: var(--d3-ink);
  text-decoration: none;
}

.sf-nav__item.is-active::before {
  position: absolute;
  top: 8px;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--d3-optic);
  content: "";
}

/* AI classroom · one calm learning stage, not an operations console. */

.sf-classroom {
  height: 100svh;
  min-height: 360px;
  overflow: hidden;
}

.sf-classroom__header {
  padding: 18px 24px 12px;
  border-bottom-color: rgba(24, 37, 42, 0.11);
}

.sf-classroom__header .sf-title {
  font-size: clamp(1.7rem, 4vw, 2.7rem);
}

.sf-classroom__status {
  max-width: 320px;
}

.sf-classroom__progress {
  padding: 10px 24px 0;
}

.sf-classroom__workspace {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.27fr);
  gap: 12px;
  overflow: hidden;
  padding: 12px 24px;
}

.sf-classroom__stage,
.sf-classroom__side {
  border-color: rgba(24, 37, 42, 0.13);
  box-shadow: var(--d3-shadow-soft);
}

.sf-classroom__stage {
  grid-template-columns: minmax(160px, 0.42fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
  border-radius: 20px 20px 20px 7px;
  background: #f8f3eb;
}

.sf-classroom__stage::after {
  position: absolute;
  z-index: 0;
  top: -58%;
  right: -14%;
  width: 64%;
  aspect-ratio: 1;
  border: 1px solid rgba(122, 165, 165, 0.38);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.sf-scene-slot {
  inset: 0;
  border-radius: inherit;
  opacity: 0.28;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 38%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 38%, #000 100%);
}

.sf-scene-slot .sf-asset {
  object-fit: cover;
  object-position: 55% center;
}

.sf-teacher-slot {
  z-index: 2;
  min-height: 0;
  background: #f8f3eb;
}

.sf-teacher-slot .sf-asset {
  object-position: 70% 35%;
}

.sf-dialogue {
  z-index: 2;
  align-content: center;
  min-width: 0;
}

.sf-dialogue__turn {
  border-color: rgba(24, 37, 42, 0.13);
  border-radius: 14px 14px 14px 5px;
  background: rgba(255, 254, 250, 0.93);
  box-shadow: 0 8px 24px rgba(24, 37, 42, 0.065);
}

.sf-dialogue__turn[data-speaker="Maya"] {
  margin-left: 8%;
  border-left: 2px solid var(--d3-optic);
}

.sf-dialogue__turn[data-speaker="MiTuTu"] {
  margin-right: 8%;
  border-left: 2px solid var(--d3-warm);
}

.sf-dialogue__text {
  font-family: "Yu Gothic UI", "Microsoft YaHei UI", sans-serif;
  font-weight: 520;
}

.sf-classroom__side {
  overflow: hidden;
  border-radius: 7px 20px 20px 20px;
  background:
    radial-gradient(circle at 100% 0%, rgba(122, 165, 165, 0.2), transparent 52%),
    var(--d3-ink);
  color: #f7f2e9;
}

.sf-classroom__side .sf-eyebrow,
.sf-classroom__side .sf-card-detail,
.sf-classroom__side .sf-signal-list__item {
  color: #bdc8c8;
}

.sf-classroom__side .sf-card-title {
  color: #fffdf7;
}

.sf-classroom__side .sf-signal-list__item {
  border-top-color: rgba(255, 255, 255, 0.14);
}

.sf-classroom__controls {
  padding: 10px 24px 14px;
  border-top-color: rgba(24, 37, 42, 0.11);
  background: rgba(252, 250, 246, 0.95);
}

.sf-mode.is-selected {
  border-color: var(--d3-ink);
  background: var(--d3-ink);
  color: #fffdf7;
}

.sf-mode[aria-pressed="false"] {
  color: var(--d3-ink-soft);
}

/* One deliberate entrance; never an infinite AI pulse. */

.sf-shell > .sf-today__header,
.sf-shell > .sf-today__main,
.sf-shell > .sf-classroom__header,
.sf-shell > .sf-classroom__progress,
.sf-shell > .sf-classroom__workspace,
.sf-shell > .sf-classroom__controls {
  animation: d3-clarify 480ms cubic-bezier(0.22, 0.8, 0.22, 1) both;
}

.sf-shell > .sf-today__main,
.sf-shell > .sf-classroom__workspace {
  animation-delay: 70ms;
}

.sf-shell > .sf-classroom__controls {
  animation-delay: 120ms;
}

@keyframes d3-clarify {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

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

@media (hover: hover) {
  .sf-action:hover,
  .sf-mode:hover {
    transform: translateY(-1px);
  }

  .sf-action--secondary:hover,
  .sf-mode[aria-pressed="false"]:hover {
    border-color: var(--d3-optic);
    background: var(--d3-optic-soft);
  }
}

/* Today target viewport: 390 x 844. Keep the character beside the single task. */

@media (max-width: 760px) {
  .sf-shell::before {
    top: -9rem;
    right: 12px;
    width: 18rem;
    height: 18rem;
  }

  .sf-today__header {
    align-items: flex-start;
    flex-direction: row;
    padding: 32px 18px 14px;
  }

  .sf-today__header .sf-state-badge {
    margin-top: 2px;
  }

  .sf-today__main {
    padding-right: 18px;
    padding-left: 18px;
  }

  .sf-primary-card {
    grid-template-columns: minmax(0, 1fr) minmax(112px, 0.7fr);
    min-height: 286px;
    padding: 15px;
  }

  .sf-primary-card .sf-asset-slot {
    order: initial;
    min-height: 0;
  }

  .sf-supporting-grid {
    grid-template-columns: 1fr;
  }

  .sf-supporting-card {
    min-height: 150px;
    padding-inline: 8px;
  }

  .sf-supporting-card + .sf-supporting-card {
    border-top: 1px solid var(--d3-line);
    border-left: 0;
  }

  .sf-classroom {
    height: auto;
    min-height: 100svh;
    overflow-x: hidden;
    overflow-y: visible;
  }

  .sf-classroom__header {
    gap: 10px;
    padding-top: 30px;
  }

  .sf-classroom__workspace {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .sf-classroom__stage {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(220px, 38svh) auto;
  }

  .sf-teacher-slot {
    grid-column: 1;
    grid-row: 1;
    min-height: 220px;
  }

  .sf-dialogue {
    grid-column: 1;
    grid-row: 2;
  }

  .sf-classroom__side {
    border-radius: 7px 20px 20px;
  }

  .sf-classroom__controls {
    grid-template-columns: 1fr;
  }

  .sf-mode-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* AI classroom target viewport: 844 x 390. Preserve 44px controls and avoid body overflow. */

@media (min-width: 761px) and (max-height: 480px) {
  .sf-classroom {
    height: 100svh;
    min-height: 360px;
  }

  .sf-classroom .sf-review-notice {
    padding-block: 4px;
    font-size: 0.54rem;
    line-height: 1.2;
  }

  .sf-classroom__header {
    gap: 12px;
    padding: 7px 18px 4px;
  }

  .sf-classroom__header .sf-title {
    margin-bottom: 3px;
    font-size: 1.35rem;
  }

  .sf-classroom__header .sf-eyebrow {
    margin-bottom: 2px;
    font-size: 0.54rem;
  }

  .sf-classroom__header .sf-supporting {
    max-width: 48ch;
    margin-bottom: 0;
    overflow: hidden;
    font-size: 0.68rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sf-classroom__status {
    align-content: flex-start;
    flex-wrap: nowrap;
  }

  .sf-classroom__status .sf-state-badge,
  .sf-classroom__status .sf-identity {
    min-height: 24px;
    padding-block: 2px;
    font-size: 0.58rem;
  }

  .sf-classroom__progress {
    padding: 3px 18px 0;
  }

  .sf-classroom__progress .sf-meta {
    margin-bottom: 1px;
    font-size: 0.58rem;
  }

  .sf-classroom__progress .sf-progress {
    margin: 1px 0 3px;
  }

  .sf-classroom__workspace {
    grid-template-columns: minmax(0, 1fr) minmax(176px, 0.25fr);
    gap: 8px;
    padding: 4px 18px 6px;
  }

  .sf-classroom__stage {
    grid-template-columns: minmax(118px, 0.36fr) minmax(0, 1fr);
    gap: 8px;
    padding: 8px;
  }

  .sf-teacher-slot {
    min-height: 0;
  }

  .sf-dialogue {
    gap: 5px;
  }

  .sf-dialogue__turn {
    padding: 5px 8px;
  }

  .sf-dialogue__speaker,
  .sf-dialogue__support,
  .sf-dialogue__translation {
    font-size: 0.55rem;
    line-height: 1.15;
  }

  .sf-dialogue__text {
    margin: 2px 0;
    font-size: 0.82rem;
    line-height: 1.15;
  }

  .sf-classroom__side {
    padding: 9px;
  }

  .sf-classroom__side .sf-eyebrow {
    margin-bottom: 4px;
    font-size: 0.52rem;
  }

  .sf-classroom__side .sf-card-title {
    margin-bottom: 4px;
    font-size: 0.88rem;
  }

  .sf-classroom__side .sf-card-detail {
    margin-bottom: 3px;
    font-size: 0.61rem;
    line-height: 1.2;
  }

  .sf-signal-list {
    gap: 0;
    margin-top: 4px;
  }

  .sf-signal-list__item {
    padding: 3px 0;
    font-size: 0.55rem;
    line-height: 1.1;
  }

  .sf-classroom__controls {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 5px 18px 7px;
  }

  .sf-mode-list {
    flex-wrap: nowrap;
    gap: 5px;
  }

  .sf-mode,
  .sf-classroom__controls .sf-action {
    min-height: 44px;
    padding: 5px 10px;
    font-size: 0.65rem;
  }

  .sf-primary-control {
    gap: 8px;
  }

  .sf-primary-control__helper {
    max-width: 150px;
  }

  .sf-primary-control__helper .sf-helper {
    font-size: 0.52rem;
    line-height: 1.15;
  }
}

/* Direction proposal board. */

.direction-board {
  min-width: 320px;
  background:
    radial-gradient(circle at 84% 0%, rgba(122, 165, 165, 0.22), transparent 32rem),
    var(--d3-mineral);
}

.board-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0 64px;
}

.board-header {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: clamp(32px, 7vw, 96px);
  align-items: end;
  padding: clamp(28px, 6vw, 72px);
  overflow: hidden;
  border-radius: 36px 36px 36px 10px;
  background: var(--d3-paper);
  box-shadow: var(--d3-shadow);
}

.board-header::after {
  position: absolute;
  right: -8%;
  bottom: -84%;
  width: 58%;
  aspect-ratio: 1;
  border: 1px solid rgba(122, 165, 165, 0.42);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.board-kicker,
.board-section-label,
.board-chip,
.preview-label,
.board-status {
  font-family: "Bahnschrift", "Aptos", sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.board-kicker,
.board-section-label {
  color: #65767a;
  font-size: 0.68rem;
  font-weight: 650;
}

.board-title {
  max-width: 10ch;
  margin: 10px 0 20px;
  font-family: "Bahnschrift", "Aptos", sans-serif;
  font-size: clamp(3rem, 8vw, 7.6rem);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.84;
}

.board-title span {
  display: block;
  color: var(--d3-optic-readable);
}

.board-lede {
  max-width: 55ch;
  margin: 0;
  color: var(--d3-muted);
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  line-height: 1.65;
}

.board-signature {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.board-signature li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding-top: 12px;
  border-top: 1px solid var(--d3-line);
  color: var(--d3-ink-soft);
  line-height: 1.45;
}

.board-signature strong {
  color: var(--d3-warm-readable);
  font-family: "Bahnschrift", "Aptos", sans-serif;
  font-weight: 560;
}

.board-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.board-chip,
.board-status {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--d3-line-strong);
  border-radius: 999px;
  color: var(--d3-ink-soft);
  font-size: 0.6rem;
  font-weight: 620;
}

.board-status {
  border-color: rgba(49, 95, 99, 0.28);
  background: #eef3ef;
  color: #315f63;
}

.board-decision-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 1px;
  margin-top: 24px;
  overflow: hidden;
  border: 1px solid var(--d3-line);
  border-radius: 10px 28px 28px;
  background: var(--d3-line);
}

.board-panel {
  min-width: 0;
  padding: clamp(22px, 4vw, 42px);
  background: var(--d3-paper);
}

.board-panel--rationale {
  background: var(--d3-ink);
  color: #f7f2e9;
}

.board-panel--rationale .board-section-label {
  color: var(--d3-muted-on-dark);
}

.board-panel h2 {
  margin: 12px 0 18px;
  font-family: "Bahnschrift", "Aptos", sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 520;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.board-panel p,
.board-list {
  margin-top: 0;
  color: var(--d3-muted);
  line-height: 1.6;
}

.board-panel.board-panel--rationale p {
  color: var(--d3-muted-on-dark);
}

.board-list {
  display: grid;
  gap: 12px;
  padding: 0;
  list-style: none;
}

.board-list li {
  position: relative;
  padding-left: 18px;
}

.board-list li::before {
  position: absolute;
  top: 0.63em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--d3-optic);
  content: "";
}

.board-panel--risk .board-list li::before {
  background: var(--d3-warm);
}

.board-exclusions {
  margin-top: 24px;
  padding: clamp(22px, 4vw, 40px);
  border: 1px solid var(--d3-line);
  border-radius: 28px 10px 28px 28px;
  background: rgba(252, 250, 246, 0.68);
}

.board-exclusion-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.board-exclusion-list li {
  padding: 8px 12px;
  border: 1px solid rgba(24, 37, 42, 0.16);
  border-radius: 999px;
  background: var(--d3-paper);
  color: var(--d3-ink-soft);
  font-size: 0.8rem;
}

.board-previews {
  margin-top: 54px;
}

.board-preview-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.board-preview-heading h2 {
  max-width: 15ch;
  margin: 8px 0 0;
  font-family: "Bahnschrift", "Aptos", sans-serif;
  font-size: clamp(2rem, 5vw, 4.4rem);
  font-weight: 510;
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.board-preview-heading p {
  max-width: 48ch;
  margin: 0;
  color: var(--d3-muted);
  line-height: 1.55;
}

.preview-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.76fr) minmax(460px, 1.24fr);
  gap: 22px;
  align-items: start;
}

.preview-card {
  padding: 18px;
  border: 1px solid var(--d3-line);
  border-radius: 26px 26px 26px 8px;
  background: var(--d3-paper);
  box-shadow: var(--d3-shadow-soft);
}

.preview-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.preview-label {
  color: var(--d3-ink-soft);
  font-size: 0.62rem;
  font-weight: 620;
}

.preview-size {
  color: var(--d3-muted);
  font-family: "Bahnschrift", "Aptos", sans-serif;
  font-size: 0.65rem;
}

.preview-viewport {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(24, 37, 42, 0.18);
  border-radius: 18px;
  background: var(--d3-mineral);
}

.preview-viewport--portrait {
  width: 100%;
  aspect-ratio: 390 / 844;
}

.preview-viewport--landscape {
  width: 100%;
  aspect-ratio: 844 / 390;
}

.preview-viewport iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--d3-paper);
}

.board-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 26px;
  padding: 20px 4px 0;
  border-top: 1px solid var(--d3-line);
  color: var(--d3-muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.board-footer strong {
  color: var(--d3-ink-soft);
}

@media (max-width: 860px) {
  .board-header,
  .board-decision-grid,
  .preview-grid {
    grid-template-columns: 1fr;
  }

  .board-header {
    align-items: start;
  }

  .preview-card--landscape {
    min-width: 0;
  }
}

@media (max-width: 560px) {
  .board-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 54px;
  }

  .board-header {
    padding: 28px 22px;
    border-radius: 24px 24px 24px 8px;
  }

  .board-title {
    font-size: clamp(3rem, 18vw, 5.2rem);
  }

  .board-preview-heading,
  .board-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .preview-card {
    padding: 10px;
    border-radius: 18px 18px 18px 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sf-shell > .sf-today__header,
  .sf-shell > .sf-today__main,
  .sf-shell > .sf-classroom__header,
  .sf-shell > .sf-classroom__progress,
  .sf-shell > .sf-classroom__workspace,
  .sf-shell > .sf-classroom__controls {
    animation: none;
  }

  .sf-action,
  .sf-mode {
    transition: none;
  }
}

@media (forced-colors: active) {
  .board-chip,
  .board-status,
  .preview-card,
  .board-panel,
  .board-exclusions {
    border: 1px solid CanvasText;
  }

  .sf-classroom__side,
  .board-panel--rationale {
    background: Canvas;
    color: CanvasText;
  }
}
