@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

html.kosce-html,
html,
body.kosce-body {
  width: 100%;
  margin: 0;
  background: #070f1a;
  color: #12313a;
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Arial, Helvetica, sans-serif;
  line-height: 1.45;
}

body.kosce-body {
  overflow: hidden;
  min-height: 100vh;
  min-height: 100dvh;
  height: 100%;
}

body.kosce-body.admin-bar {
  margin-top: 0 !important;
}

.kosce-body #wpadminbar {
  display: none !important;
}

.kosce-body * {
  box-sizing: border-box;
}

.kosce-body button,
.kosce-body input,
.kosce-body textarea {
  font: inherit;
}

#kosce-exam-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  background: linear-gradient(180deg, #070f1a 0%, #0c4a44 38%, #ecfdf5 100%);
}

.kosce-app {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.kosce-root {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: transparent;
}

#kosce-root.kosce-root select,
#kosce-root.kosce-root input[type='text'],
#kosce-root.kosce-root input[type='number'],
#kosce-root.kosce-root textarea {
  min-height: 3rem;
}

.kosce-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.04) 0px,
    rgba(0, 0, 0, 0.04) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: multiply;
  opacity: 0.35;
}

.kosce-scanlines--scene {
  border-radius: inherit;
}

.kosce-kicker {
  margin: 0 0 8px;
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.kosce-guest,
.kosce-dash {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}

/* Pixel art assets: crisp upscaling + explicit <img> usage */
.kosce-pixel-bg {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.kosce-guest {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 2vw, 24px);
  overflow: hidden;
}

.kosce-guest-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.kosce-guest-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.kosce-guest-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(7, 15, 26, 0.75) 0%, rgba(15, 118, 110, 0.35) 50%, rgba(236, 253, 245, 0.5) 100%);
  z-index: 1;
}

.kosce-guest .kosce-scanlines {
  z-index: 2;
}

.kosce-guest .kosce-auth-card {
  position: relative;
  z-index: 3;
}

.kosce-auth-card,
.kosce-step-card,
.kosce-paper-card,
.kosce-chat-panel,
.kosce-room-brief,
.kosce-report-card {
  border: 1px solid #d6e4e8;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

.kosce-auth-card {
  width: min(560px, 100%);
  padding: 30px;
  image-rendering: auto;
}

.kosce-auth-card h1 {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: clamp(28px, 4.2vw, 44px);
  line-height: 1.05;
}

.kosce-runner {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: clamp(8px, 1.2vh, 14px);
  background: rgba(246, 251, 251, 0.92);
}

.kosce-runner[hidden],
.kosce-dash[hidden] {
  display: none !important;
}

.kosce-runner-header {
  flex: 0 0 auto;
  padding: clamp(8px, 1.2vh, 14px) clamp(10px, 1.5vw, 16px);
  border: 1px solid #d6e4e8;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
}

.kosce-runner-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.kosce-admin-runner-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.kosce-button.kosce-button--small {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.kosce-day-mode,
.kosce-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 8px;
  background: #ecfeff;
  color: #0f766e;
  font-size: 13px;
  font-weight: 800;
}

.kosce-candidate-num:not([hidden]) {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 8px;
  background: #ecfeff;
  color: #0f766e;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.kosce-dash-header-tools .kosce-candidate-num:not([hidden]) {
  background: rgba(45, 212, 191, 0.18);
  color: #ecfdf5;
  border: 1px solid rgba(94, 234, 212, 0.35);
}

.kosce-timer {
  min-width: 100px;
  padding: 8px 12px;
  border: 1px solid #99f6e4;
  border-radius: 8px;
  background: #ffffff;
  color: #0f766e;
  font-size: clamp(22px, 3.2vw, 30px);
  font-weight: 800;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.kosce-stage {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
}

.kosce-stage > * {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.kosce-rubric-panel {
  margin-top: 12px;
  padding: 10px;
  border: 1px dashed #f97316;
  border-radius: 8px;
  background: rgba(255, 247, 237, 0.95);
  font-size: 12px;
  color: #431407;
  max-height: 28vh;
  overflow-y: auto;
}

.kosce-rubric-panel summary {
  cursor: pointer;
  font-weight: 800;
  color: #9a3412;
}

.kosce-rubric-panel pre {
  margin: 10px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: inherit;
  font-size: 11px;
  line-height: 1.4;
}

.kosce-scene {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(260px, 0.92fr);
  overflow: hidden;
  border: 1px solid #d6e4e8;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.09);
}

.kosce-scene-visual {
  min-height: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(240, 253, 250, 0.18)),
    var(--kosce-scene);
  background-position: center;
  background-size: cover;
  image-rendering: pixelated;
}

.kosce-step-card {
  align-self: center;
  margin: 26px;
  padding: 26px;
}

.kosce-step-card h3,
.kosce-paper-card h3,
.kosce-chat-panel h3,
.kosce-room-brief h3,
.kosce-report-card h3 {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 28px;
  line-height: 1.15;
}

.kosce-step-card p,
.kosce-paper-card p,
.kosce-room-brief p,
.kosce-report-card p {
  color: #475569;
}

.kosce-step-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

/* Ankomst, ID, scrubs, informationsmöte: dashboard-lik header, fullbredd pixel-hero, glas-kort */
.kosce-runner--logistics-shell {
  --kosce-shell: #0f2421;
  --kosce-arrival-muted: rgba(255, 255, 255, 0.72);
  padding: 0;
  background: var(--kosce-shell);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

.kosce-runner--logistics-shell .kosce-runner-header-default {
  display: none;
}

.kosce-runner--logistics-shell .kosce-stage {
  border-radius: 0;
  border: none;
  box-shadow: none;
  background: transparent;
}

.kosce-runner--logistics-shell .kosce-scene--logistics {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  overflow: hidden;
}

/* Header countdown — dark logistics shell (dash header); light theme overrides in kosce-theme-light.css */
.kosce-runner--logistics-shell .kosce-dash-header .kosce-timer.kosce-runner-timer-sync {
  background: rgba(8, 22, 20, 0.78);
  border: 1px solid rgba(45, 212, 191, 0.45);
  color: #99f6e4;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  font-variant-numeric: tabular-nums;
}

.kosce-runner--logistics-shell .kosce-practice-skip-corridor--arrival {
  border: 1px solid rgba(94, 234, 212, 0.55);
  background: rgba(8, 22, 20, 0.65);
  color: #ecfdf5;
  white-space: nowrap;
}

.kosce-runner--logistics-shell .kosce-practice-skip-corridor--arrival:hover,
.kosce-runner--logistics-shell .kosce-practice-skip-corridor--arrival:focus-visible {
  background: rgba(45, 212, 191, 0.18);
  color: #f0fdfa;
}

.kosce-arrival-hero {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.kosce-arrival-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #0a1815;
  overflow: hidden;
}

/* Korridor: <img> yerine background — tema img kuralları görseli sıfırlamaz */
.kosce-arrival-hero-bg--corridor {
  background-color: #0a1815;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  image-rendering: pixelated;
}

.kosce-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.kosce-arrival-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  image-rendering: pixelated;
}

/* Tema #kosce-root img{height:auto} kuralını ezer — koridor / ankomst hero tam alan */
#kosce-root.kosce-root .kosce-arrival-hero-img {
  max-width: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.kosce-arrival-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(8, 22, 20, 0.32) 0%,
    rgba(8, 22, 20, 0.5) 40%,
    rgba(6, 18, 16, 0.78) 100%
  );
  pointer-events: none;
}

.kosce-arrival-hero-scanlines {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.kosce-arrival-hero-inner {
  position: relative;
  z-index: 3;
  flex: 0 1 auto;
  width: min(480px, calc(100% - 24px));
  max-width: 480px;
  margin: 0 auto;
  padding: 8px 12px 14px;
  padding-bottom: max(14px, env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
}

.kosce-arrival-hero-inner--orientation {
  width: min(720px, calc(100% - 24px));
  max-width: 720px;
}

.kosce-orientation-card {
  display: flex;
  flex-direction: column;
  max-height: none;
  padding-top: 16px;
}

.kosce-orientation-card-head {
  flex-shrink: 0;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 12px;
}

.kosce-orientation-card .kosce-arrival-actions {
  flex-shrink: 0;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 4px;
}

.kosce-orientation-rules {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin: 0;
}

.kosce-orientation-rules-title {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5eead4;
}

.kosce-orientation-rules-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: visible;
  padding: 0;
}

.kosce-orientation-tabs {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.kosce-orientation-tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.kosce-orientation-tab {
  flex: 1 1 calc(33.333% - 8px);
  min-width: min(140px, 100%);
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.2);
  color: rgba(255, 255, 255, 0.88);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.kosce-orientation-tab:hover {
  border-color: rgba(94, 234, 212, 0.35);
  background: rgba(0, 0, 0, 0.28);
}

.kosce-orientation-tab:focus-visible {
  outline: 2px solid rgba(94, 234, 212, 0.55);
  outline-offset: 2px;
}

.kosce-orientation-tab--active,
.kosce-orientation-tab[aria-selected='true'] {
  background: rgba(20, 184, 166, 0.25);
  border-color: rgba(94, 234, 212, 0.5);
  color: #ecfdf5;
}

.kosce-orientation-panels {
  overflow: visible;
}

.kosce-orientation-tabpanel {
  overflow: visible;
}

.kosce-orientation-tabpanel[hidden] {
  display: none !important;
}

@media (max-height: 520px) {
  .kosce-orientation-tabpanel {
    max-height: 36vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    scrollbar-gutter: stable;
  }
}

.kosce-orientation-section {
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.kosce-orientation-section:first-of-type {
  border-top: none;
  padding-top: 0;
}

.kosce-orientation-section-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.96);
}

.kosce-orientation-text {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
}

.kosce-orientation-text:last-child {
  margin-bottom: 0;
}

.kosce-orientation-text--intro {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 8px;
}

.kosce-orientation-list {
  margin: 0 0 0 1.1em;
  padding: 0;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
}

.kosce-orientation-list li {
  margin: 0 0 8px;
  padding-left: 4px;
}

.kosce-orientation-list li::marker {
  color: #5eead4;
}

.kosce-orientation-score {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.kosce-orientation-score-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.kosce-orientation-score-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.kosce-orientation-score-row:first-child {
  padding-top: 0;
}

.kosce-orientation-score dt {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.kosce-orientation-score dd {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: #5eead4;
}

.kosce-orientation-callout {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 11px;
  line-height: 1.5;
  color: rgba(254, 243, 199, 0.95);
  background: rgba(120, 53, 15, 0.35);
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.kosce-arrival-card {
  margin: 0;
  padding: 14px 16px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(12, 28, 26, 0.42);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
}

.kosce-arrival-card-kicker {
  margin: 0 0 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5eead4;
}

.kosce-arrival-card-title {
  margin: 0 0 6px;
  font-size: clamp(17px, 2.6vw, 22px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.96);
}

.kosce-arrival-card-lead {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--kosce-arrival-muted);
}

.kosce-logistics-checklist-title {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.88);
}

.kosce-logistics-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.kosce-logistics-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.kosce-logistics-flow-list {
  margin: 0 0 16px;
  padding: 0 0 0 1.4em;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
  list-style-position: outside;
}

.kosce-logistics-flow-list li {
  margin: 0 0 0.55em;
  padding-left: 0.2em;
}

.kosce-logistics-flow-list li:last-child {
  margin-bottom: 0;
}

.kosce-arrival-checklist {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kosce-arrival-checklist-item {
  margin: 0;
}

.kosce-arrival-checklist-label {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.92);
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.14);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.kosce-arrival-checklist-label:hover {
  border-color: rgba(94, 234, 212, 0.32);
  background: rgba(0, 0, 0, 0.22);
}

.kosce-arrival-checklist-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.kosce-arrival-checklist-box {
  position: relative;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-top: 0;
  border-radius: 5px;
  border: 2px solid rgba(255, 255, 255, 0.32);
  background: rgba(0, 0, 0, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.kosce-arrival-checklist-input:checked + .kosce-arrival-checklist-box {
  border-color: #5eead4;
  background: rgba(20, 184, 166, 0.35);
}

.kosce-arrival-checklist-input:checked + .kosce-arrival-checklist-box::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 42%;
  width: 5px;
  height: 10px;
  margin: -5px 0 0 -3px;
  border: solid #ecfdf5;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.kosce-arrival-checklist-input:focus-visible + .kosce-arrival-checklist-box {
  outline: 2px solid rgba(94, 234, 212, 0.6);
  outline-offset: 2px;
}

.kosce-arrival-checklist-text {
  flex: 1 1 auto;
  min-width: 0;
}

.kosce-arrival-actions {
  display: flex;
  justify-content: stretch;
}

.kosce-arrival-actions .kosce-dash-start-btn,
.kosce-arrival-next {
  width: 100%;
  min-width: 0;
  padding-top: 9px;
  padding-bottom: 9px;
  min-height: 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
}

.kosce-arrival-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

/* Korridor: samma dash-header som Ankomst */
.kosce-scene--corridor {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Korridor v2: 3×6-rutnät (1–18) + högerpanel */
.kosce-scene--corridor-v2 {
  position: relative;
  padding: 0;
}

.kosce-corridor-v2 {
  flex: 1 1 auto;
  min-height: min(78vh, 900px);
  display: flex;
  flex-direction: column;
  position: relative;
}

.kosce-corridor-workspace {
  flex: 1 1 auto;
  min-height: min(72vh, 880px);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.kosce-corridor-workspace-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: #0a1815;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  opacity: 0.42;
}

.kosce-corridor-workspace-inner {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  gap: clamp(12px, 2vw, 20px);
  padding: clamp(10px, 1.5vw, 18px);
  align-items: stretch;
}

.kosce-corridor-left-kicker,
.kosce-corridor-right-kicker {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.72);
}

.kosce-corridor-left {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.kosce-corridor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(6, minmax(0, 1fr));
  gap: 8px;
  width: min(100%, 340px);
  max-height: min(62vh, 560px);
  aspect-ratio: 3 / 6;
}

.kosce-corridor-cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.42);
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.kosce-corridor-cell--current {
  border-color: #5eead4;
  box-shadow:
    0 0 0 2px rgba(94, 234, 212, 0.55),
    0 0 20px rgba(45, 212, 191, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.kosce-corridor-cell--current::after {
  content: 'Du';
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #042f2e;
  background: linear-gradient(180deg, #5eead4, #2dd4bf);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.kosce-corridor-cell-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
  height: 100%;
  padding: 4px 3px 16px;
  box-sizing: border-box;
}

.kosce-corridor-cell-rest-label {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 0 1px;
  font-size: 7px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  color: rgba(253, 230, 138, 0.95);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
  hyphens: auto;
  overflow-wrap: anywhere;
}

.kosce-corridor-cell--chair .kosce-corridor-cell-img {
  max-width: 48px;
  max-height: 40px;
  width: auto;
  height: auto;
}

.kosce-corridor-cell-img {
  width: 72%;
  height: 72%;
  max-width: 56px;
  max-height: 56px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

.kosce-corridor-cell-num {
  position: absolute;
  right: 5px;
  bottom: 3px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  color: #f8fafc;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

.kosce-corridor-cell-empty {
  display: block;
  width: 38%;
  height: 38%;
  border-radius: 4px;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  opacity: 0.55;
}

.kosce-corridor-right {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(12, 28, 26, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.kosce-corridor-right-title {
  margin: 0 0 4px;
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.02em;
}

.kosce-corridor-right-meta {
  margin: 0 0 12px;
  font-size: 14px;
  color: rgba(226, 232, 240, 0.88);
}

.kosce-corridor-right .kosce-step-list {
  margin: 0 0 12px;
}

.kosce-corridor-right-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 14px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.kosce-corridor-right-visual--door .kosce-corridor-door-hero {
  width: min(240px, 100%);
  height: auto;
  max-height: 280px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.45));
}

.kosce-corridor-door-hero {
  width: min(200px, 100%);
  height: auto;
  object-fit: contain;
  image-rendering: pixelated;
}

.kosce-corridor-right-lead {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(226, 232, 240, 0.82);
}

.kosce-corridor-right .kosce-dash-start-btn {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.kosce-corridor-first-note {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(155deg, rgba(20, 184, 166, 0.14) 0%, rgba(15, 23, 42, 0.55) 100%);
  border: 1px solid rgba(94, 234, 212, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 8px 22px rgba(0, 0, 0, 0.28);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.kosce-corridor-first-note__icon {
  flex-shrink: 0;
  font-size: 1.15rem;
  line-height: 1.35;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.kosce-corridor-first-note__text {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: rgba(241, 245, 249, 0.94);
}

@media (max-width: 900px) {
  .kosce-corridor-workspace-inner {
    grid-template-columns: 1fr;
  }

  .kosce-corridor-grid {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
  }
}

.kosce-arrival-hero--corridor {
  flex: 1 1 auto;
  min-height: min(72vh, 920px);
  width: 100%;
  justify-content: flex-end;
  align-items: stretch;
}

.kosce-arrival-hero-inner--corridor {
  width: min(920px, calc(100% - 24px));
  max-width: 920px;
  flex-shrink: 0;
}

.kosce-arrival-hero--corridor .kosce-arrival-hero-overlay {
  background: linear-gradient(
    180deg,
    rgba(8, 22, 20, 0.08) 0%,
    rgba(8, 22, 20, 0.28) 42%,
    rgba(6, 18, 16, 0.82) 100%
  );
}

.kosce-corridor-card .kosce-step-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.kosce-corridor-card .kosce-badge {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.92);
}

.kosce-corridor-card .kosce-corridor-doors {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 10px;
  align-items: end;
  margin: 0 0 14px;
  max-height: 40vh;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
  scrollbar-gutter: stable;
}

.kosce-corridor-card .kosce-door-card {
  min-height: 148px;
  border-color: rgba(148, 163, 184, 0.55);
  background: rgba(241, 245, 249, 0.96);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
}

.kosce-corridor-card .kosce-door-label {
  background: rgba(15, 23, 42, 0.58);
}

.kosce-corridor-card .kosce-door-label strong {
  color: #ecfdf5;
}

.kosce-corridor-card .kosce-door-label span {
  color: rgba(226, 232, 240, 0.92);
}

.kosce-corridor-next {
  width: 100%;
}

/* Kart biraz daha şeffaf — arka plan piksel sahnesi görünsün */
.kosce-corridor-card.kosce-arrival-card {
  background: rgba(12, 28, 26, 0.52);
}

.kosce-corridor-doors {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 14px;
  align-items: end;
}

.kosce-door-card {
  min-height: 196px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border: 3px solid #cbd5e1;
  border-radius: 8px 8px 4px 4px;
  background: #e2e8f0;
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.15);
}

.kosce-door-card-current {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.18), 0 20px 36px rgba(15, 23, 42, 0.18);
}

.kosce-door-card-rest {
  background: #eff6ff;
}

.kosce-door-card-missing {
  background: #fee2e2;
  border-color: #fecaca;
}

.kosce-door-window {
  min-height: 42px;
  margin: 12px;
  border: 2px solid #bfdbfe;
  background: #e0f2fe;
}

.kosce-door-paper-mini {
  min-height: 44px;
  margin: 0 18px 18px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #ffffff;
}

.kosce-door-label {
  padding: 10px;
  background: rgba(255, 255, 255, 0.88);
}

.kosce-door-label strong,
.kosce-door-label span {
  display: block;
}

.kosce-door-label strong {
  color: #0f172a;
}

.kosce-door-label span {
  color: #475569;
  font-size: 12px;
}

.kosce-door-zoom {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: block;
  overflow: hidden;
  border: 1px solid #d6e4e8;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(240, 253, 250, 0.32)),
    var(--kosce-scene);
  background-position: center;
  background-size: cover;
  image-rendering: pixelated;
}

.kosce-door-focus {
  position: absolute;
  left: 50%;
  top: 54%;
  width: 230px;
  min-height: 360px;
  transform: translate(-50%, -50%) scale(0.76);
  animation: kosce-door-approach 1300ms ease-out forwards;
  border: 5px solid #cbd5e1;
  border-radius: 8px 8px 4px 4px;
  background: #e2e8f0;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.22);
}

.kosce-door-focus .kosce-door-window {
  min-height: 70px;
  margin: 22px;
}

.kosce-door-focus-paper {
  margin: 28px auto 0;
  width: 128px;
  height: 108px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #ffffff;
  animation: kosce-paper-pop 1300ms ease-out forwards;
}

.kosce-door-zoom-panel {
  position: absolute;
  right: 24px;
  bottom: 24px;
  width: min(380px, calc(100% - 48px));
  padding: 22px;
  border: 1px solid #d6e4e8;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
  image-rendering: auto;
}

@keyframes kosce-door-approach {
  from { transform: translate(-50%, -50%) scale(0.62); }
  to { transform: translate(-50%, -50%) scale(1.08); }
}

@keyframes kosce-paper-pop {
  from { transform: scale(0.6); opacity: 0.56; }
  to { transform: scale(1.24); opacity: 1; }
}

/* Legacy tvåkolumnsläsning (osynlig path om minimal/split-scen används) */
.kosce-reading {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 300px);
  overflow: hidden;
  border: 1px solid #d6e4e8;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.92)),
    var(--kosce-scene);
  background-position: center;
  background-size: cover;
  image-rendering: pixelated;
}

/* Dörrläsning — fullskärm som korridor (närbild av papper på dörr) */
.kosce-runner--logistics-shell .kosce-reading-scene {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: #0a1815;
}

.kosce-reading-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: #0a1815;
  background-size: cover;
  /* Ramar dörren / pappret i höger — samma fokus som UI-kortet */
  background-position: 76% 40%;
  background-repeat: no-repeat;
  image-rendering: auto;
}

.kosce-reading-hero-fade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(8, 22, 20, 0.22) 0%,
    rgba(8, 22, 20, 0.42) 38%,
    rgba(6, 18, 16, 0.85) 100%
  );
}

.kosce-reading-scanlines {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0.16;
  pointer-events: none;
}

.kosce-reading-paper-stack {
  position: relative;
  z-index: 3;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.kosce-reading-paper-wrap--hero {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: flex;
  padding: clamp(12px, 3vh, 28px) clamp(14px, 4vw, 36px) clamp(24px, 5vh, 48px);
  -webkit-overflow-scrolling: touch;
}

/*
 * Minimal: kort ovanpå dörren i bakgrunden (höger, lite ovanför mitten).
 * margin:auto på kortet centrerade det trots flex-end — använd margin:0.
 */
.kosce-reading-scene:not(.kosce-reading-scene--split) .kosce-reading-paper-wrap--hero {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  flex: none;
  align-items: flex-start;
  justify-content: flex-end;
  padding:
    clamp(5vh, 10vh, 16vh)
    clamp(6px, 1.2vw, 18px)
    clamp(7vh, 12vh, 22vh)
    clamp(18%, 34vw, 46%);
}

.kosce-paper-card--door-reading {
  width: min(400px, 72%);
  max-width: 100%;
  margin: 0;
  padding: clamp(12px, 1.8vw, 20px);
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.38);
  /* Mörkt läge: varmt papper mot mörk hero */
  background: linear-gradient(180deg, rgba(255, 252, 245, 0.98) 0%, rgba(255, 255, 255, 0.99) 100%);
  box-shadow:
    0 3px 0 rgba(15, 23, 42, 0.06),
    0 28px 56px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  max-height: none;
  overflow: visible;
}

.kosce-paper-card--door-reading .kosce-kicker {
  color: #0f766e;
}

.kosce-paper-card--door-reading .kosce-door-reading-station-title,
.kosce-paper-card--door-reading h3 {
  color: #0f172a;
}

.kosce-paper-card--door-reading pre {
  color: #12313a;
}

.kosce-paper-card--door-reading .kosce-candidate-tasks {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.4);
}

.kosce-paper-card--door-reading .kosce-candidate-tasks-kicker {
  margin: 0 0 6px;
  color: #0f766e;
}

.kosce-paper-card--door-reading .kosce-candidate-tasks-list {
  margin: 0;
  padding-left: 1.35em;
  list-style-position: outside;
  list-style-type: disc;
  color: #12313a;
  font-family: inherit;
  font-size: clamp(13px, 1.35vw, 15px);
  line-height: 1.55;
}

.kosce-paper-card--door-reading .kosce-candidate-tasks-list li {
  margin: 0 0 0.5em;
  padding-left: 0.15em;
}

.kosce-paper-card--door-reading .kosce-candidate-tasks-list li:last-child {
  margin-bottom: 0;
}

.kosce-paper-card--door-reading .kosce-candidate-tasks-plain {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.kosce-paper-card--door-reading .kosce-rubric-panel {
  border-color: rgba(148, 163, 184, 0.45);
  background: rgba(241, 245, 249, 0.65);
}

.kosce-paper-card--door-reading .kosce-rubric-panel summary {
  color: #9a3412;
}

.kosce-paper-card--door-reading .kosce-ai-badge {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(148, 163, 184, 0.45);
  color: #334155;
}

/* Vilostation — samma helvy som dörrläsning (minimal), egen hero-inramning */
.kosce-rest-scene .kosce-rest-hero-bg {
  background-position: 52% 42%;
}

/* Centrerat, kompakt kort (inte dörrläsning till höger) */
.kosce-rest-scene:not(.kosce-reading-scene--split) .kosce-reading-paper-wrap--hero {
  justify-content: center;
  align-items: center;
  padding: clamp(20px, 5vh, 48px) clamp(16px, 5vw, 40px);
}

.kosce-rest-scene .kosce-paper-card--rest {
  width: min(360px, 94%);
  max-width: 100%;
  margin: 0;
  padding: 12px 16px 14px;
  border-radius: 11px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: linear-gradient(180deg, rgba(255, 253, 250, 0.97) 0%, rgba(255, 255, 255, 0.98) 100%);
  box-shadow:
    0 1px 0 rgba(15, 23, 42, 0.04),
    0 10px 28px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.kosce-rest-scene .kosce-paper-card--rest .kosce-kicker {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 4px;
  color: rgba(45, 212, 191, 0.95);
}

.kosce-rest-scene .kosce-paper-card--rest .kosce-door-reading-station-title {
  font-size: clamp(14px, 1.25vw, 16px);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
  line-height: 1.2;
}

.kosce-rest-scene .kosce-paper-card--rest .kosce-rest-lead {
  margin: 0 0 5px;
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: #0f172a;
  line-height: 1.35;
}

.kosce-rest-scene .kosce-paper-card--rest .kosce-rest-body {
  margin: 0 0 11px;
  font-size: 11.5px;
  line-height: 1.45;
  color: rgba(30, 41, 59, 0.92);
}

.kosce-rest-scene .kosce-paper-card--rest .kosce-timer-bar {
  height: 5px;
  margin: 8px 0 10px;
  border-radius: 5px;
  border-color: rgba(94, 234, 212, 0.35);
}

.kosce-rest-scene .kosce-paper-card--rest .kosce-rest-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0;
  justify-content: center;
}

.kosce-rest-scene .kosce-paper-card--rest .kosce-badge {
  min-height: 0;
  padding: 3px 8px;
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.kosce-reading-scene--split .kosce-reading-split-inner {
  position: relative;
  z-index: 3;
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
}

/* DOM: papper först, sidopanel andra — dörrinfo till höger, linjerat med dörren i bilden */
.kosce-reading-scene--split .kosce-reading-paper-wrap--hero {
  grid-column: 2;
  grid-row: 1;
  overflow: auto;
  align-items: flex-start;
  justify-content: flex-end;
  padding: clamp(5vh, 10vh, 16vh) clamp(8px, 1.5vw, 20px) clamp(8vh, 12vh, 20vh) clamp(12px, 3vw, 24px);
}

.kosce-reading-scene--split .kosce-reading-side--hero {
  grid-column: 1;
  grid-row: 1;
}

.kosce-reading-side--hero {
  border-left: none;
  border-right: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(12, 28, 26, 0.82);
  backdrop-filter: blur(8px);
  color: rgba(248, 250, 252, 0.96);
  padding: clamp(16px, 2.5vw, 28px);
  overflow: auto;
}

.kosce-reading-side--hero .kosce-kicker {
  color: #5eead4;
}

.kosce-reading-side--hero h3 {
  color: #f8fafc;
}

@media (max-width: 980px) {
  .kosce-reading-scene--split .kosce-reading-split-inner {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .kosce-reading-scene--split .kosce-reading-paper-wrap--hero,
  .kosce-reading-scene--split .kosce-reading-side--hero {
    grid-column: 1;
    grid-row: auto;
  }

  .kosce-reading-scene--split .kosce-reading-paper-wrap--hero {
    align-items: center;
    justify-content: center;
  }

  .kosce-reading-side--hero {
    border-right: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.28);
  }
}

.kosce-reading-paper-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 1.5vw, 20px);
  min-height: 0;
  overflow: hidden;
}

.kosce-paper-card {
  width: min(760px, 100%);
  max-height: 100%;
  overflow: hidden;
  padding: clamp(12px, 2vw, 20px);
  image-rendering: auto;
  display: flex;
  flex-direction: column;
}

.kosce-paper-card pre,
.kosce-room-brief pre {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #12313a;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(13px, 1.5vw, 16px);
  line-height: 1.5;
}

.kosce-paper-card pre {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.kosce-reading-side {
  padding: 24px;
  border-left: 1px solid #d6e4e8;
  background: rgba(255, 255, 255, 0.95);
  image-rendering: auto;
}

.kosce-timer-bar {
  width: 100%;
  height: 10px;
  overflow: hidden;
  margin: 18px 0;
  border: 1px solid #99f6e4;
  border-radius: 8px;
  background: #f1f5f9;
}

.kosce-timer-fill {
  width: var(--kosce-time-progress, 100%);
  height: 100%;
  background: #0f766e;
  transition: width 250ms linear;
}

/* Station — samma logistik-shell som korridor: fullbredd, pixel-hero, två glaspaneler */
.kosce-runner--logistics-shell .kosce-station-scene {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: #0a1815;
}

.kosce-station-workspace {
  flex: 1 1 auto;
  min-height: min(78vh, 920px);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.kosce-station-workspace-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: #0a1815;
  background-size: cover;
  background-position: center 38%;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  opacity: 0.48;
}

.kosce-station-workspace-fade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(8, 22, 20, 0.38) 0%,
    rgba(6, 18, 16, 0.72) 48%,
    rgba(4, 14, 12, 0.94) 100%
  );
}

.kosce-station-scanlines {
  opacity: 0.14;
}

.kosce-station-workspace-inner {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  /* Vänster: stationsbrief · mitten: chat (störst) · höger: sidopanel */
  grid-template-columns: clamp(220px, 22vw, 300px) minmax(0, 1fr) clamp(280px, 26vw, 360px);
  gap: clamp(10px, 1.2vw, 14px);
  padding: clamp(8px, 1.2vw, 14px);
  align-items: stretch;
}

.kosce-station-workspace-inner.kosce-workspace--brief-collapsed {
  grid-template-columns: 56px minmax(0, 1fr) clamp(280px, 26vw, 360px);
}

.kosce-station-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.kosce-station-col--brief {
  align-self: stretch;
  min-height: 0;
}

.kosce-station-col--brief.is-collapsed .kosce-station-brief-card {
  padding: 8px 6px;
}

.kosce-station-col--brief.is-collapsed .kosce-station-brief-title,
.kosce-station-col--brief.is-collapsed .kosce-station-brief-body,
.kosce-station-col--brief.is-collapsed .kosce-ai-badge {
  display: none;
}

.kosce-station-col--brief.is-collapsed .kosce-station-brief-head {
  justify-content: center;
  margin: 0;
}

.kosce-station-col--brief.is-collapsed .kosce-station-brief-toggle svg {
  transform: rotate(180deg);
}

.kosce-station-room-panel {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  min-height: 0;
  padding: clamp(10px, 1.4vw, 16px);
  border-radius: 12px;
  background: rgba(7, 16, 26, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  overflow-y: auto;
}

.kosce-room-head {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.kosce-room-title {
  margin: 0;
  font-size: 1rem;
  text-transform: capitalize;
  color: #f8fafc;
}

.kosce-room-section h4 {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  color: rgba(226, 232, 240, 0.92);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.kosce-room-cards,
.kosce-room-actions {
  display: grid;
  gap: 0.65rem;
}

.kosce-room-card {
  padding: 0.8rem 0.85rem;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #e2e8f0;
}

.kosce-room-card strong {
  display: block;
  margin-bottom: 0.25rem;
}

.kosce-room-card p,
.kosce-room-empty {
  margin: 0;
  color: rgba(226, 232, 240, 0.82);
  font-size: 0.92rem;
  line-height: 1.45;
}

.kosce-room-artifact-image {
  width: 100%;
  margin-top: 0.6rem;
  border-radius: 8px;
  object-fit: cover;
}

.kosce-room-artifact-details {
  margin-top: 0.55rem;
}

.kosce-room-artifact-details summary {
  cursor: pointer;
  color: #cbd5e1;
}

.kosce-room-action-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  width: 100%;
  padding: 0.85rem 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(125, 211, 252, 0.22);
  background: rgba(8, 47, 73, 0.72);
  color: #f8fafc;
  text-align: left;
  cursor: pointer;
}

.kosce-room-action-btn.is-done,
.kosce-room-action-btn:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.kosce-room-action-label {
  font-weight: 700;
}

.kosce-room-action-hint {
  font-size: 0.82rem;
  color: rgba(226, 232, 240, 0.76);
}

.kosce-station-brief-card {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  padding: clamp(10px, 1.4vw, 14px);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(12px);
}

.kosce-station-brief-card .kosce-kicker {
  color: #2dd4bf;
  font-size: 10px;
}

.kosce-station-brief-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
}

.kosce-station-brief-head .kosce-ai-badge {
  margin: 0;
}

.kosce-station-brief-head .kosce-station-brief-title {
  flex: 1 1 auto;
  margin: 0;
  min-width: 0;
}

.kosce-station-brief-toggle {
  appearance: none;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.6);
  color: rgba(226, 232, 240, 0.85);
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.kosce-station-brief-toggle:hover,
.kosce-station-brief-toggle:focus-visible {
  background: rgba(45, 212, 191, 0.16);
  border-color: rgba(94, 234, 212, 0.55);
  color: #f8fafc;
}

.kosce-station-brief-toggle svg {
  width: 16px;
  height: 16px;
  transition: transform 160ms ease;
}

.kosce-station-brief-title {
  margin: 0 0 8px;
  font-size: clamp(15px, 1.6vw, 18px);
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.kosce-station-brief-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.65);
  border: 1px solid rgba(71, 85, 105, 0.45);
}

/* Explicit klass — undvik att global .kosce-paper-card pre (mörk text) krockar */
.kosce-station-brief-pre {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: clamp(12px, 1.25vw, 14px);
  line-height: 1.55;
  color: #e2e8f0;
  background: transparent;
}

.kosce-station-brief-body .kosce-candidate-tasks {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(71, 85, 105, 0.55);
}

.kosce-station-brief-body .kosce-candidate-tasks-kicker {
  margin: 0 0 6px;
  color: #5eead4;
}

.kosce-station-brief-body .kosce-candidate-tasks-list {
  margin: 0;
  padding-left: 1.35em;
  list-style-position: outside;
  list-style-type: disc;
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: clamp(12px, 1.25vw, 14px);
  line-height: 1.55;
  color: #e2e8f0;
}

.kosce-station-brief-body .kosce-candidate-tasks-list li {
  margin: 0 0 0.45em;
  padding-left: 0.15em;
}

.kosce-station-brief-body .kosce-candidate-tasks-list li:last-child {
  margin-bottom: 0;
}

.kosce-station-brief-body .kosce-candidate-tasks-plain {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.kosce-station-brief-card .kosce-ai-badge {
  background: rgba(254, 226, 226, 0.95);
  color: #991b1b;
  border: 1px solid rgba(252, 165, 165, 0.5);
}

.kosce-station-col--chat {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0;
  border-radius: 16px;
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.92) 0%, rgba(12, 28, 26, 0.88) 100%);
  border: 1px solid rgba(94, 234, 212, 0.18);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.2),
    0 20px 50px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(14px);
  overflow: hidden;
}

.kosce-station-hygiene-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 16px 22px;
  overflow-x: hidden;
  overflow-y: auto;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.kosce-station-hygiene-overlay[hidden] {
  display: none !important;
}

.kosce-station-hygiene-overlay .kosce-station-hygiene-card {
  flex: 0 1 auto;
  max-height: min(92%, 620px);
  overflow-y: auto;
}

.kosce-station-hygiene-gate {
  flex: 1 1 auto;
  min-height: min(52vh, 560px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 16px 22px;
  overflow-y: auto;
}

.kosce-station-hygiene-card {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 18px 18px 20px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.55);
  border: 1px solid rgba(94, 234, 212, 0.22);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.kosce-station-hygiene-art {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(38vh, 360px);
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(51, 65, 85, 0.65);
  margin: 0 0 14px;
  background: rgba(15, 23, 42, 0.6);
}

.kosce-station-hygiene-kicker {
  color: rgba(94, 234, 212, 0.9) !important;
  margin-bottom: 6px !important;
}

.kosce-station-hygiene-title {
  margin: 0 0 10px;
  font-size: clamp(17px, 1.7vw, 21px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f8fafc;
  line-height: 1.25;
}

.kosce-station-hygiene-lead {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(203, 213, 225, 0.92);
}

.kosce-station-hygiene-btn {
  width: 100%;
  justify-content: center;
  padding: 12px 18px;
  font-weight: 800;
}

.kosce-station-intro-gate {
  flex: 1 1 auto;
  min-height: min(52vh, 560px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 16px 22px;
  overflow-y: auto;
}

.kosce-station-intro-card {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 18px 18px 20px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.55);
  border: 1px solid rgba(94, 234, 212, 0.22);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.kosce-station-intro-kicker {
  color: rgba(94, 234, 212, 0.9) !important;
  margin-bottom: 6px !important;
}

.kosce-station-intro-title {
  margin: 0 0 10px;
  font-size: clamp(17px, 1.7vw, 21px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f8fafc;
  line-height: 1.25;
}

.kosce-station-intro-lead {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(203, 213, 225, 0.92);
}

.kosce-station-intro-list {
  margin: 0 0 14px;
  padding-left: 1.25rem;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(226, 232, 240, 0.95);
}

.kosce-station-intro-list li {
  margin-bottom: 6px;
}

.kosce-station-intro-note {
  margin: 0 0 18px;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(148, 163, 184, 0.95);
  font-style: italic;
}

.kosce-station-intro-btn {
  width: 100%;
  justify-content: center;
  padding: 12px 18px;
  font-weight: 800;
}

.kosce-station-chat-stack {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.kosce-station-chat-head {
  display: none;
}

.kosce-station-chat-eyebrow {
  margin: 0 0 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(94, 234, 212, 0.85);
}

.kosce-station-chat-heading {
  margin: 0 0 6px;
  font-size: clamp(16px, 1.6vw, 19px);
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.02em;
}

.kosce-station-chat-lead {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(203, 213, 225, 0.88);
}

.kosce-station-chat-main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 10px 12px 8px;
}

.kosce-station-col--chat .kosce-chat {
  flex: 1 1 auto;
  min-height: min(56vh, 640px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 14px;
  border-radius: 14px;
  border: 1px solid rgba(51, 65, 85, 0.55);
  background: rgba(2, 6, 23, 0.5);
  scroll-behavior: smooth;
}

.kosce-station-col--chat .kosce-msg {
  max-width: min(92%, 520px);
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.kosce-station-col--chat .kosce-msg strong {
  display: block;
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.95);
}

.kosce-station-col--chat .kosce-msg-user {
  margin-left: auto;
  margin-right: 0;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.35) 0%, rgba(13, 148, 136, 0.28) 100%);
  border: 1px solid rgba(45, 212, 191, 0.45);
  color: #f8fafc;
}

.kosce-station-col--chat .kosce-msg-user p {
  color: #f8fafc;
}

.kosce-station-col--chat .kosce-msg-user strong {
  color: rgba(240, 253, 250, 0.92);
}

.kosce-station-col--chat .kosce-msg-ai {
  margin-right: auto;
  margin-left: 0;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(100, 116, 139, 0.4);
  color: #f1f5f9;
}

.kosce-station-col--chat .kosce-msg-ai p {
  color: inherit;
}

.kosce-station-col--chat .kosce-msg-examiner {
  max-width: min(96%, 560px);
  margin-left: auto;
  margin-right: auto;
  background: linear-gradient(135deg, rgba(120, 53, 15, 0.78) 0%, rgba(146, 64, 14, 0.85) 100%);
  border: 1px solid rgba(251, 191, 36, 0.55);
  color: #ffffff !important;
}

.kosce-station-col--chat .kosce-msg-examiner strong {
  color: #fde68a !important;
}

.kosce-station-col--chat .kosce-msg-examiner p {
  color: #ffffff !important;
}

.kosce-station-col--chat .kosce-msg-material,
.kosce-station-col--chat .kosce-msg-finding {
  max-width: min(88%, 380px);
  margin-left: auto;
  margin-right: auto;
  padding: 8px 10px;
  border-radius: 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.kosce-station-col--chat .kosce-msg-material > strong,
.kosce-station-col--chat .kosce-msg-finding > strong {
  display: none;
}

.kosce-station-col--chat .kosce-msg-system {
  max-width: min(94%, 520px);
  margin-left: auto;
  margin-right: auto;
  background: rgba(15, 23, 42, 0.52);
  border: 1px dashed rgba(148, 163, 184, 0.38);
  color: #cbd5e1;
}

.kosce-station-col--chat .kosce-msg-system strong {
  color: rgba(226, 232, 240, 0.9);
}

.kosce-station-col--chat .kosce-msg-system p {
  color: inherit;
}

/* Patient skriver — samma bubbla som meddelanden, prickar som ChatGPT/Gemini */
.kosce-station-col--chat .kosce-chat-typing.kosce-msg-ai {
  padding-bottom: 14px;
}

.kosce-station-col--chat .kosce-chat-typing__body {
  display: flex;
  align-items: center;
  min-height: 22px;
}

.kosce-station-col--chat .kosce-chat-typing__dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.kosce-station-col--chat .kosce-chat-typing__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(203, 213, 225, 0.95) 0%, rgba(148, 163, 184, 0.85) 100%);
  box-shadow: 0 0 10px rgba(94, 234, 212, 0.15);
  animation: kosce-chat-typing-wave 1.05s ease-in-out infinite;
}

.kosce-station-col--chat .kosce-chat-typing__dot:nth-child(2) {
  animation-delay: 0.16s;
}

.kosce-station-col--chat .kosce-chat-typing__dot:nth-child(3) {
  animation-delay: 0.32s;
}

@keyframes kosce-chat-typing-wave {
  0%,
  100% {
    transform: translateY(0) scale(1);
    opacity: 0.35;
  }
  50% {
    transform: translateY(-5px) scale(1.05);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kosce-station-col--chat .kosce-chat-typing__dot {
    animation: none;
    opacity: 0.75;
  }
}

.kosce-station-col--chat .kosce-empty {
  margin: 0;
  padding: 20px 12px;
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(148, 163, 184, 0.95);
}

.kosce-station-composer {
  flex: 0 0 auto;
  padding: 6px 12px 6px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(0, 0, 0, 0.28);
}

.kosce-chat-tools--station {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 0;
}

/* Station textarea: samma mått/beteende som ABA .aba-chat-input (aba-applied-exam-simulator/public/css/chat.css) */
.kosce-station-message-input {
  width: 100%;
  box-sizing: border-box;
  display: block;
  margin: 0;
  min-height: 44px;
  max-height: 120px;
  padding: 5px 16px;
  border-radius: 10px;
  border: 1px solid rgba(94, 234, 212, 0.38);
  background: rgba(15, 23, 42, 0.92);
  color: #f1f5f9;
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  resize: none;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  /* Scroll fungerar; scrollbar visas inte */
  scrollbar-width: none;
  -ms-overflow-style: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.kosce-station-message-input::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.kosce-station-message-input::placeholder {
  color: rgba(148, 163, 184, 0.8);
  opacity: 1;
}

.kosce-station-message-input:hover {
  border-color: rgba(94, 234, 212, 0.52);
  background: rgba(15, 23, 42, 0.96);
}

.kosce-station-message-input:focus {
  outline: none;
  border-color: rgba(45, 212, 191, 0.72);
  background: rgba(15, 23, 42, 0.98);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 3px rgba(45, 212, 191, 0.2);
}

.kosce-station-composer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.kosce-station-composer-quick {
  display: flex;
  gap: 6px;
  align-items: center;
  flex: 0 0 auto;
}

/* Minimalistiska ikonknappar */
.kosce-station-icon-btn {
  box-sizing: border-box;
  width: 40px;
  height: 40px;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease, opacity 0.12s ease;
}

.kosce-station-icon-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(45, 212, 191, 0.35);
}

.kosce-station-icon-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.kosce-station-icon-btn__svg {
  width: 20px;
  height: 20px;
  display: block;
  flex-shrink: 0;
}

.kosce-station-icon-btn--send {
  background: rgba(13, 148, 136, 0.35);
  color: #ccfbf1;
  border-color: rgba(45, 212, 191, 0.35);
}

.kosce-station-icon-btn--send:hover:not(:disabled),
.kosce-station-icon-btn--send:focus-visible:not(:disabled) {
  background: rgba(13, 148, 136, 0.55);
  border-color: rgba(94, 234, 212, 0.5);
  color: #f0fdfa;
}

.kosce-station-icon-btn--record {
  position: relative;
  background: transparent;
  border-color: rgba(148, 163, 184, 0.28);
  color: #cbd5e1;
}

.kosce-station-icon-btn--record:hover:not(:disabled),
.kosce-station-icon-btn--record:focus-visible:not(:disabled) {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(148, 163, 184, 0.45);
  color: #f1f5f9;
}

.kosce-station-icon-btn--record.kosce-record--recording {
  background: rgba(127, 29, 29, 0.35);
  border-color: rgba(248, 113, 113, 0.45);
  color: #fecaca;
}

.kosce-station-icon-btn--record.kosce-record--busy {
  opacity: 0.75;
}

/* Uppläsning av/på — samma storlek som övriga ikonknappar */
.kosce-station-speak-btn {
  box-sizing: border-box;
  width: 40px;
  height: 40px;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: transparent;
  color: #cbd5e1;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
  position: relative;
}

.kosce-station-speak-btn:hover,
.kosce-station-speak-btn:focus-visible {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(148, 163, 184, 0.45);
  color: #f1f5f9;
  outline: none;
  box-shadow: 0 0 0 2px rgba(45, 212, 191, 0.22);
}

.kosce-station-speak-btn__icon {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
}

.kosce-station-speak-btn__icon svg {
  width: 20px;
  height: 20px;
}

.kosce-station-speak-btn__icon--on {
  display: flex;
}

.kosce-station-speak-btn--off .kosce-station-speak-btn__icon--on {
  display: none;
}

.kosce-station-speak-btn--off .kosce-station-speak-btn__icon--off {
  display: flex;
  color: #94a3b8;
}

.kosce-station-icon-btn__layer {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
}

.kosce-station-icon-btn__layer--idle {
  display: flex;
}

.kosce-station-icon-btn--record.kosce-record--recording .kosce-station-icon-btn__layer--idle,
.kosce-station-icon-btn--record.kosce-record--busy .kosce-station-icon-btn__layer--idle {
  display: none;
}

.kosce-station-icon-btn--record.kosce-record--recording .kosce-station-icon-btn__layer--rec {
  display: flex;
}

.kosce-station-icon-btn--record.kosce-record--busy .kosce-station-icon-btn__layer--busy {
  display: flex;
}

.kosce-station-icon-btn__spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(148, 163, 184, 0.2);
  border-top-color: rgba(94, 234, 212, 0.75);
  border-radius: 50%;
  animation: kosce-spin 0.7s linear infinite;
}

@keyframes kosce-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Avsluta — minimalistisk kontur */
.kosce-station-end-btn {
  flex: 1 1 180px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  margin: 0;
  border-radius: 10px;
  border: 1px solid rgba(248, 113, 113, 0.32);
  background: transparent;
  color: #fca5a5;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.kosce-station-end-btn:hover,
.kosce-station-end-btn:focus-visible {
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.45);
  color: #fecaca;
}

.kosce-station-end-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.22);
}

.kosce-station-end-btn__icon {
  display: flex;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: inherit;
  opacity: 0.9;
}

.kosce-station-end-btn__icon svg {
  width: 100%;
  height: 100%;
}

.kosce-station-end-btn__label {
  text-align: center;
}

@media (max-width: 480px) {
  .kosce-station-end-btn {
    flex: 1 1 100%;
  }
}

.kosce-status--station {
  margin: 0;
  font-size: 12px;
  line-height: 1.25;
  min-height: 0;
}

.kosce-station-col--chat .kosce-status--station {
  color: #fbbf24;
}

.kosce-station-col--chat .kosce-status--station.kosce-error {
  color: #fca5a5;
}

@media (max-width: 900px) {
  .kosce-station-workspace-inner,
  .kosce-station-workspace-inner.kosce-workspace--brief-collapsed {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(280px, 1fr) auto;
  }

  .kosce-station-col--brief {
    max-width: none;
  }

  .kosce-station-col--side {
    max-height: 38vh;
  }

  .kosce-station-side-panel {
    max-height: 38vh;
  }

  .kosce-station-col--chat .kosce-chat {
    min-height: min(36vh, 360px);
  }
}

/* Äldre station-layout (om någon path fortfarande använder .kosce-station-rutnät) */
.kosce-chat {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px;
  border: 1px solid #d6e4e8;
  border-radius: 8px;
  background: #f8fafc;
}

.kosce-msg {
  max-width: 88%;
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 8px;
  overflow-wrap: anywhere;
}

.kosce-msg strong {
  display: block;
  margin-bottom: 4px;
  color: #0f172a;
}

.kosce-msg p {
  margin: 0;
}

.kosce-msg-user {
  margin-left: auto;
  background: #ccfbf1;
  border: 1px solid #99f6e4;
}

.kosce-msg-ai {
  background: #ffffff;
  border: 1px solid #d6e4e8;
}

.kosce-chat-tools {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.kosce-chat-tools textarea {
  width: 100%;
  min-height: 72px;
  max-height: 22vh;
  padding: 10px;
  border: 1px solid #d6e4e8;
  border-radius: 8px;
  background: #ffffff;
  color: #12313a;
  resize: vertical;
}

/* Station: mörk kompositor — återvinner efter generisk .kosce-chat-tools textarea ovan */
.kosce-chat-tools--station .kosce-station-message-input {
  min-height: 44px;
  max-height: 120px;
  padding: 5px 16px;
  line-height: 20px;
  border-radius: 10px;
  border: 1px solid rgba(94, 234, 212, 0.38);
  background: rgba(15, 23, 42, 0.92);
  color: #f1f5f9;
  resize: none;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.kosce-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.kosce-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  max-width: 100%;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #0f766e;
  color: #ffffff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.kosce-button:hover,
.kosce-button:focus-visible {
  background: #0d6d64;
  outline: none;
}

.kosce-button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  pointer-events: none;
}

.kosce-secondary {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.45);
  color: #e2e8f0;
}

.kosce-secondary:hover,
.kosce-secondary:focus {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(148, 163, 184, 0.6);
  color: #f8fafc;
}

.kosce-danger {
  background: transparent;
  border-color: rgba(248, 113, 113, 0.42);
  color: #fca5a5;
}

.kosce-danger:hover,
.kosce-danger:focus {
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.55);
  color: #fecaca;
}

.kosce-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(5px);
}

.kosce-modal-dialog {
  max-width: 440px;
  width: 100%;
  padding: 22px 24px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.38);
  color: #f1f5f9;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.kosce-modal-title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.kosce-modal-body {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(226, 232, 240, 0.95);
}

.kosce-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.kosce-report-summary {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.25);
  font-size: 14px;
  line-height: 1.5;
  color: #475569;
}

.kosce-status,
.kosce-warning,
.kosce-error {
  margin: 0;
  color: #b45309;
}

.kosce-error {
  color: #b91c1c;
}

.kosce-empty {
  margin: 0;
  color: #64748b;
}

.kosce-speak {
  color: #475569;
  font-size: 14px;
}

.kosce-ai-badge {
  display: inline-flex;
  margin: 0 0 12px;
  padding: 5px 9px;
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 800;
}

.kosce-report-scene {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 2vh, 22px);
  border: 1px solid #d6e4e8;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.72)),
    var(--kosce-scene);
  background-position: center;
  background-size: cover;
  image-rendering: pixelated;
}

.kosce-report-card {
  width: min(980px, 100%);
  max-height: 100%;
  overflow: hidden;
  padding: clamp(14px, 2vh, 22px);
  image-rendering: auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.kosce-report-card .kosce-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.kosce-score-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0 0 16px;
}

.kosce-score-line strong {
  color: #0f172a;
  font-size: 34px;
  line-height: 1;
}

.kosce-list-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.kosce-list-box {
  padding: 16px;
  border: 1px solid #d6e4e8;
  border-radius: 8px;
  background: #f8fafc;
}

.kosce-table-wrap {
  max-width: 100%;
  overflow: auto;
  margin-top: 18px;
}

.kosce-table {
  width: 100%;
  border-collapse: collapse;
}

.kosce-table th,
.kosce-table td {
  padding: 10px;
  border: 1px solid #d6e4e8;
  text-align: left;
  vertical-align: top;
}

.kosce-table th {
  background: #f0fdfa;
}

@media (max-width: 980px) {
  .kosce-scene,
  .kosce-reading {
    grid-template-columns: 1fr;
  }

  .kosce-panel-head,
  .kosce-runner-header {
    flex-direction: column;
  }

  .kosce-config-status {
    max-width: none;
    text-align: left;
  }

  .kosce-reading-side {
    border-left: 0;
    border-top: 1px solid #d6e4e8;
  }

}

@media (max-width: 680px) {
  .kosce-auth-card h1 {
    font-size: 36px;
  }

  .kosce-list-grid {
    grid-template-columns: 1fr;
  }

  .kosce-runner {
    padding: 10px;
  }

  .kosce-runner--logistics-shell {
    padding: 0;
  }

  .kosce-runner-tools {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .kosce-timer {
    width: 100%;
  }

  .kosce-runner--logistics-shell .kosce-arrival-hero:not(.kosce-arrival-hero--corridor) {
    min-height: 42vh;
  }

  .kosce-corridor-card .kosce-corridor-doors {
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  }

  .kosce-corridor-card .kosce-door-card {
    min-height: 132px;
  }

  .kosce-door-card {
    min-height: 168px;
  }

  .kosce-step-card,
  .kosce-door-zoom-panel {
    margin: 14px;
  }

  .kosce-reading-paper-wrap {
    padding: 14px;
  }

  .kosce-paper-card {
    max-height: none;
    padding: 18px;
  }

  .kosce-msg {
    max-width: 100%;
  }
}

.kosce-station-cues {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px 0;
  margin: 0;
}

.kosce-station-cues[hidden] {
  display: none;
}

.kosce-station-cue {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 214, 112, 0.36);
  background: rgba(61, 45, 12, 0.72);
  color: rgba(254, 243, 199, 0.95);
  font-size: 12px;
  line-height: 1.3;
}

.kosce-station-cue strong {
  display: inline;
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(254, 243, 199, 0.85);
}

.kosce-station-cue p {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  color: rgba(255, 251, 235, 0.92);
}

/* Sekmeli sidopanel — ersätter den gamla material-tray + room-panel kombinationen */
.kosce-station-col--side {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.kosce-station-side-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92) 0%, rgba(12, 28, 26, 0.88) 100%);
  border: 1px solid rgba(94, 234, 212, 0.18);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.kosce-side-tabs {
  flex: 0 0 auto;
  display: flex;
  gap: 2px;
  padding: 6px;
  background: rgba(0, 0, 0, 0.18);
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

/* MoCA-mall: fyra flikar (mall + Underlag + Rum + Åtgärder) — 2×2 så rubriken inte klipps. */
.kosce-side-tabs--quad {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(40px, auto);
  gap: 6px 4px;
  align-items: stretch;
}

.kosce-side-tabs--quad .kosce-side-tab {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 40px;
  padding: 8px 4px;
  font-size: 11px;
  letter-spacing: 0.02em;
}

.kosce-side-tabs--quad .kosce-side-tab__label {
  white-space: normal;
  text-align: center;
  line-height: 1.2;
  overflow: visible;
  text-overflow: unset;
  overflow-wrap: anywhere;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.kosce-side-tab {
  appearance: none;
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  padding: 8px 6px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(226, 232, 240, 0.7);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.kosce-side-tab:hover,
.kosce-side-tab:focus-visible {
  color: #f8fafc;
  background: rgba(94, 234, 212, 0.08);
}

.kosce-side-tab.is-active {
  color: #f8fafc;
  background: rgba(94, 234, 212, 0.14);
  border-color: rgba(94, 234, 212, 0.32);
}

.kosce-side-tab__label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kosce-side-tab__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(45, 212, 191, 0.28);
  color: #ccfbf1;
  font-size: 10px;
  font-weight: 800;
}

.kosce-side-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 12px;
}

.kosce-side-pane {
  display: block;
}

.kosce-side-pane[hidden] {
  display: none;
}

.kosce-side-empty {
  margin: 0;
  padding: 14px;
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.45);
  border: 1px dashed rgba(148, 163, 184, 0.28);
  color: rgba(203, 213, 225, 0.78);
  font-size: 12.5px;
  line-height: 1.55;
  text-align: center;
}

.kosce-side-group {
  margin-bottom: 14px;
}

.kosce-side-group:last-child {
  margin-bottom: 0;
}

.kosce-side-group__label {
  margin: 0 0 6px;
  padding: 0 2px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(94, 234, 212, 0.78);
}

.kosce-side-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kosce-side-card {
  display: flex;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.65);
  color: inherit;
  text-align: left;
  text-decoration: none;
  cursor: default;
}

button.kosce-side-card {
  appearance: none;
  cursor: pointer;
  font: inherit;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

button.kosce-side-card:hover,
button.kosce-side-card:focus-visible {
  border-color: rgba(94, 234, 212, 0.55);
  background: rgba(94, 234, 212, 0.1);
  transform: translateY(-1px);
}

.kosce-side-card.is-active {
  border-color: rgba(94, 234, 212, 0.7);
  background: rgba(94, 234, 212, 0.14);
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.35) inset;
}

.kosce-side-card__thumb {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.18);
  overflow: hidden;
  color: rgba(148, 163, 184, 0.85);
}

.kosce-side-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.kosce-side-card__thumb svg {
  width: 22px;
  height: 22px;
}

.kosce-side-card__thumb--avatar {
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.22), rgba(15, 118, 110, 0.32));
  color: #ccfbf1;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.kosce-side-card__thumb--zoomable {
  appearance: none;
  cursor: zoom-in;
  padding: 0;
  font: inherit;
  color: inherit;
}

.kosce-side-card__thumb--zoomable:focus-visible {
  outline: 2px solid rgba(94, 234, 212, 0.65);
  outline-offset: 2px;
}

.kosce-side-card__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-self: center;
}

.kosce-side-card__title {
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kosce-side-card__meta {
  font-size: 12px;
  line-height: 1.4;
  color: rgba(203, 213, 225, 0.72);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.kosce-side-action-btn {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(125, 211, 252, 0.28);
  background: rgba(8, 47, 73, 0.65);
  color: #f8fafc;
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.kosce-side-action-btn:hover,
.kosce-side-action-btn:focus-visible {
  background: rgba(14, 116, 144, 0.78);
  border-color: rgba(125, 211, 252, 0.55);
  transform: translateY(-1px);
}

.kosce-side-action-btn.is-done,
.kosce-side-action-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.kosce-side-action-btn__label {
  font-size: 13px;
  font-weight: 700;
}

.kosce-side-action-btn__hint {
  font-size: 11.5px;
  color: rgba(186, 230, 253, 0.85);
}

.kosce-material-preview__head,
.kosce-feed-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.kosce-material-preview__head span,
.kosce-feed-card__head span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.kosce-feed-card--compact {
  padding: 10px 12px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kosce-feed-card--compact .kosce-feed-card__head {
  margin-bottom: 0;
  gap: 8px;
}

.kosce-feed-card--compact .kosce-feed-card__head strong {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.3;
}

.kosce-feed-card--compact .kosce-feed-card__head span {
  font-size: 10.5px;
  letter-spacing: 0.06em;
}

.kosce-feed-card__thumb-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.4);
  padding: 0;
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  display: block;
  width: 100%;
  max-width: 220px;
  align-self: flex-start;
  transition: transform 120ms ease, border-color 120ms ease;
}

.kosce-feed-card__thumb-btn:hover,
.kosce-feed-card__thumb-btn:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(99, 187, 255, 0.55);
  outline: none;
}

.kosce-feed-card__thumb {
  display: block;
  width: 100%;
  height: 130px;
  object-fit: cover;
}

.kosce-feed-card--compact .kosce-feed-card__summary {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.86);
}

.kosce-feed-card--compact .kosce-feed-card__actions {
  margin-top: 2px;
}

.kosce-button--sm {
  font-size: 12px;
  padding: 6px 12px;
  min-height: 0;
  border-radius: 999px;
}

.kosce-material-preview__head-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.kosce-material-preview__dismiss {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.kosce-material-preview__dismiss:hover,
.kosce-material-preview__dismiss:focus-visible {
  color: #fff;
}

.kosce-material-preview__summary {
  margin: 0 0 10px;
}

.kosce-material-preview__hint {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
}

.kosce-material-preview__image,
.kosce-feed-card__image {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 10px;
}

.kosce-material-preview__content,
.kosce-feed-card__content {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
}

.kosce-material-preview__actions,
.kosce-feed-card__actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 10px;
}

.kosce-room-phase {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(144, 212, 255, 0.12);
  color: #d4ecff;
  border: 1px solid rgba(144, 212, 255, 0.3);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.kosce-msg-material,
.kosce-msg-finding,
.kosce-msg-cue {
  border-width: 1px;
}

.kosce-msg-material {
  background: rgba(17, 42, 74, 0.76);
  border-color: rgba(99, 187, 255, 0.42);
}

.kosce-msg-finding {
  background: rgba(20, 58, 44, 0.8);
  border-color: rgba(114, 214, 171, 0.4);
}

.kosce-msg-cue {
  background: rgba(61, 45, 12, 0.82);
  border-color: rgba(255, 214, 112, 0.42);
}

.kosce-feed-card p {
  margin: 0 0 10px;
}

.kosce-artifact-modal-overlay {
  z-index: 1100;
}

/* Fullskärms-zoom av bild (MoCA, rumsmaterial, klick på bild i underlagsmodal). */
.kosce-image-lightbox-overlay {
  z-index: 1250;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(2, 6, 23, 0.88);
}

.kosce-image-lightbox__figure {
  position: relative;
  margin: 0;
  max-width: min(96vw, 1200px);
  width: 100%;
}

.kosce-image-lightbox__frame {
  border-radius: 14px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.kosce-image-lightbox__img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: min(90vh, 920px);
  margin: 0 auto;
  object-fit: contain;
  vertical-align: middle;
}

.kosce-image-lightbox__caption {
  margin: 10px 0 0;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: rgba(226, 232, 240, 0.95);
  line-height: 1.35;
}

.kosce-image-lightbox__close {
  appearance: none;
  position: absolute;
  top: -4px;
  right: -4px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  color: rgba(255, 255, 255, 0.88);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.kosce-image-lightbox__close:hover,
.kosce-image-lightbox__close:focus-visible {
  color: #fff;
  background: rgba(30, 41, 59, 0.95);
}

.kosce-artifact-modal {
  position: relative;
  max-width: min(840px, calc(100vw - 32px));
  max-height: min(88vh, 880px);
  overflow: auto;
  padding: 22px 24px 20px;
  border-radius: 20px;
}

.kosce-artifact-modal__close {
  appearance: none;
  position: absolute;
  top: 14px;
  right: 14px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.kosce-artifact-modal__close:hover,
.kosce-artifact-modal__close:focus-visible {
  color: #fff;
}

.kosce-artifact-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-right: 28px;
}

.kosce-artifact-modal__type {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(144, 212, 255, 0.12);
  border: 1px solid rgba(144, 212, 255, 0.28);
  color: #d4ecff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kosce-artifact-modal__body {
  display: grid;
  gap: 14px;
}

.kosce-artifact-modal__image {
  display: block;
  width: 100%;
  max-height: 62vh;
  object-fit: contain;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.kosce-artifact-modal__image--zoomable {
  cursor: zoom-in;
  outline: none;
}

.kosce-artifact-modal__image--zoomable:focus-visible {
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.45);
  border-radius: 16px;
}

.kosce-artifact-modal__content {
  font-size: 14px;
  line-height: 1.65;
  color: rgba(241, 245, 249, 0.92);
}

.kosce-artifact-modal__actions {
  margin-top: 18px;
}

@media (max-width: 960px) {
  .kosce-material-tray__list {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .kosce-material-chip {
    min-width: 220px;
  }

  .kosce-artifact-modal {
    padding: 18px;
    border-radius: 18px;
  }

  .kosce-artifact-modal__head {
    flex-direction: column;
    padding-right: 36px;
  }

  .kosce-artifact-modal__image {
    max-height: 50vh;
  }
}

/* MoCA template panel — sidebar pane shown when station_blueprint.template_key === 'moca'. */
.kosce-side-tab--moca.is-active {
  background: rgba(129, 140, 248, 0.18);
  border-color: rgba(129, 140, 248, 0.4);
  color: #eef2ff;
}

.kosce-moca-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.kosce-moca-panel__header {
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(150deg, rgba(99, 102, 241, 0.18), rgba(45, 212, 191, 0.12));
  border: 1px solid rgba(129, 140, 248, 0.28);
  color: #eef2ff;
}

.kosce-moca-panel__title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(199, 210, 254, 0.95);
}

.kosce-moca-panel__progress {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.kosce-moca-progress__score {
  font-size: 18px;
  font-weight: 800;
  color: #f8fafc;
}

.kosce-moca-progress__bar {
  flex: 1 1 80px;
  min-width: 80px;
  height: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
  overflow: hidden;
}

.kosce-moca-progress__fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #818cf8, #34d399);
  transition: width 220ms ease;
}

.kosce-moca-progress__count {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(199, 210, 254, 0.85);
}

.kosce-moca-panel__form {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.kosce-moca-panel__form-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

.kosce-moca-panel__form-figure .kosce-moca-task__image-zoom {
  max-width: 100%;
}

.kosce-moca-panel__form-figure .kosce-moca-task__image-zoom img {
  display: block;
  max-height: 200px;
  width: auto;
  border-radius: 8px;
}

.kosce-moca-panel__form-figure figcaption {
  font-size: 11px;
  color: rgba(203, 213, 225, 0.85);
}

.kosce-moca-panel__tasks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kosce-moca-task {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: rgba(226, 232, 240, 0.92);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kosce-moca-task--in_progress {
  border-color: rgba(129, 140, 248, 0.45);
  background: rgba(99, 102, 241, 0.1);
}

.kosce-moca-task--done {
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(16, 185, 129, 0.08);
}

.kosce-moca-task--skipped {
  opacity: 0.65;
  border-style: dashed;
}

.kosce-moca-task__head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.kosce-moca-task__status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.5);
  flex: 0 0 auto;
}

.kosce-moca-task--in_progress .kosce-moca-task__status-dot {
  background: #818cf8;
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.22);
}

.kosce-moca-task--done .kosce-moca-task__status-dot {
  background: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.22);
}

.kosce-moca-task__title {
  flex: 1 1 auto;
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
}

.kosce-moca-task__score {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: rgba(226, 232, 240, 0.9);
  background: rgba(15, 23, 42, 0.6);
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.kosce-moca-task__instruction {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(203, 213, 225, 0.85);
}

.kosce-moca-task__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.kosce-moca-task__status-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.85);
}

.kosce-moca-task__artifact {
  appearance: none;
  border: 1px solid rgba(94, 234, 212, 0.4);
  background: rgba(20, 184, 166, 0.14);
  color: #ccfbf1;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease;
}

.kosce-moca-task__artifact:hover,
.kosce-moca-task__artifact:focus-visible {
  background: rgba(20, 184, 166, 0.24);
  border-color: rgba(94, 234, 212, 0.7);
}

.kosce-moca-task__options {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.kosce-moca-option {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px 3px 6px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.45);
  font-size: 11px;
  color: rgba(203, 213, 225, 0.78);
}

.kosce-moca-option.is-on {
  border-color: rgba(52, 211, 153, 0.55);
  background: rgba(16, 185, 129, 0.18);
  color: #ecfdf5;
}

.kosce-moca-option__dot {
  font-size: 11px;
  font-weight: 800;
  width: 14px;
  text-align: center;
  color: rgba(148, 163, 184, 0.7);
}

.kosce-moca-option.is-on .kosce-moca-option__dot {
  color: #34d399;
}

.kosce-moca-task__images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 4px;
}

.kosce-moca-task__image {
  margin: 0;
  padding: 6px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.22);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.kosce-moca-task__image-zoom {
  appearance: none;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: #fff;
  cursor: zoom-in;
  line-height: 0;
}

.kosce-moca-task__image-zoom:focus-visible {
  outline: 2px solid rgba(129, 140, 248, 0.85);
  outline-offset: 2px;
}

.kosce-moca-task__image-zoom img {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  vertical-align: middle;
}

.kosce-moca-task__image figcaption {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.95);
}

.kosce-moca-task__image--answer.is-locked {
  background: rgba(2, 6, 23, 0.7);
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.35);
}

.kosce-moca-task__image-locked {
  display: block;
  padding: 28px 10px;
  text-align: center;
  font-size: 11.5px;
  color: rgba(203, 213, 225, 0.75);
  font-style: italic;
}

.kosce-moca-task__image--answer.is-revealed {
  border-color: rgba(52, 211, 153, 0.4);
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.15) inset;
}

/* Live rubric flags strip — also reused outside MoCA panel where it makes sense. */
.kosce-moca-flags {
  padding: 12px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.kosce-moca-flags__title {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.9);
}

.kosce-moca-flags__summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.kosce-moca-flag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
}

.kosce-moca-flag-pill--satisfied {
  color: #ecfdf5;
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(52, 211, 153, 0.5);
}

.kosce-moca-flag-pill--partial {
  color: #fef3c7;
  background: rgba(234, 179, 8, 0.22);
  border-color: rgba(250, 204, 21, 0.5);
}

.kosce-moca-flag-pill--missed {
  color: #fee2e2;
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(248, 113, 113, 0.5);
}

.kosce-moca-flags__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kosce-moca-flag {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 11.5px;
  color: rgba(203, 213, 225, 0.85);
  background: rgba(15, 23, 42, 0.4);
}

.kosce-moca-flag__dot {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  font-size: 11px;
  background: rgba(148, 163, 184, 0.18);
  color: rgba(148, 163, 184, 0.9);
  flex: 0 0 auto;
}

.kosce-moca-flag--satisfied .kosce-moca-flag__dot {
  background: rgba(16, 185, 129, 0.28);
  color: #34d399;
}

.kosce-moca-flag--partial .kosce-moca-flag__dot {
  background: rgba(234, 179, 8, 0.28);
  color: #facc15;
}

.kosce-moca-flag--missed .kosce-moca-flag__dot {
  background: rgba(239, 68, 68, 0.28);
  color: #f87171;
}

.kosce-moca-flag__id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px;
  color: rgba(148, 163, 184, 0.85);
}

.kosce-moca-flag__note {
  flex: 1 1 auto;
  color: rgba(226, 232, 240, 0.95);
}
