:root {
  --bg: #f3efe6;
  --surface: rgba(255, 252, 247, 0.88);
  --surface-strong: #fffdf8;
  --text: #1f2933;
  --muted: #5f6c76;
  --accent: #d95d39;
  --accent-dark: #8c2f1c;
  --accent-soft: #ffd9c9;
  --secondary: #246a73;
  --secondary-soft: #d3ecec;
  --border: rgba(31, 41, 51, 0.08);
  --shadow: 0 18px 50px rgba(74, 48, 16, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Outfit", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(217, 93, 57, 0.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(36, 106, 115, 0.2), transparent 35%),
    linear-gradient(180deg, #f9f6ef 0%, var(--bg) 100%);
  min-height: 100vh;
}

button,
input {
  font: inherit;
}

.app-shell {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 24px 16px 40px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 700;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
}

h1 {
  font-size: clamp(1.9rem, 4vw, 2.5rem);
}

h2 {
  font-size: clamp(1.6rem, 3.8vw, 2.1rem);
}

h3 {
  font-size: clamp(1.35rem, 3.2vw, 1.7rem);
}

main {
  display: grid;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero-card,
.intro-card,
.step-card,
.progress-card,
.workshop-header {
  padding: 24px;
}

.hero-card {
  padding-top: 28px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0 0 14px;
}

.lead {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 1rem;
}

.lead.compact {
  margin-top: 8px;
}

.stack-lg {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-weight: 600;
}

.field input {
  border: 1px solid rgba(31, 41, 51, 0.14);
  border-radius: 16px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.92);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 4px rgba(36, 106, 115, 0.16);
}

.primary-button,
.ghost-button {
  border: none;
  border-radius: 16px;
  padding: 14px 18px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent) 0%, #bf4326 100%);
  color: white;
  box-shadow: 0 14px 30px rgba(191, 67, 38, 0.22);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  border: 1px solid rgba(31, 41, 51, 0.08);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.primary-button:disabled,
.ghost-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.error-message {
  margin: 0;
  color: #b42318;
  font-weight: 600;
}

.hidden {
  display: none !important;
}

.workshop-grid {
  display: grid;
  gap: 16px;
}

.workshop-card {
  padding: 22px;
  display: grid;
  gap: 12px;
}

.workshop-card:has(.workshop-overlay) {
  opacity: 0.56;
  filter: grayscale(1);
}

.workshop-overlay {
  display: grid;
  gap: 12px;
}

.workshop-card .meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.workshop-card button {
  width: 100%;
}

.workshop-header {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.progress-card {
  margin-bottom: 16px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(31, 41, 51, 0.08);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--secondary) 0%, var(--accent) 100%);
  transition: width 0.25s ease;
}

.step-objective {
  color: var(--muted);
  line-height: 1.6;
  margin: 10px 0 0;
}

.context-box {
  margin: 0;
  padding: 16px;
  border-radius: 18px;
  background: rgba(36, 106, 115, 0.08);
  line-height: 1.7;
  white-space: pre-line;
}

.step-section {
  margin-top: 22px;
}

.step-section h4 {
  margin-bottom: 12px;
  font-size: 1rem;
}

.check-list,
.plain-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
  line-height: 1.6;
}

.split {
  display: grid;
  gap: 20px;
}

.timer-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(36, 106, 115, 0.12) 0%, rgba(217, 93, 57, 0.12) 100%);
  border: 1px solid rgba(36, 106, 115, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.timer-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.timer-display {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.2rem, 8vw, 3.4rem);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.timer-card.finished {
  border-color: rgba(217, 93, 57, 0.55);
  box-shadow: 0 0 0 4px rgba(217, 93, 57, 0.12);
  animation: timerPulse 0.9s ease 2;
}

.timer-alert {
  margin: -4px 0 0;
  color: var(--accent-dark);
  font-weight: 700;
}

.timer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.operation-banner {
  position: relative;
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border-radius: 24px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(9, 63, 122, 0.84) 0%, rgba(18, 99, 185, 0.72) 45%, rgba(10, 46, 93, 0.9) 100%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
  color: white;
}

.operation-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at right center, rgba(255, 255, 255, 0.18), transparent 30%),
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08));
  pointer-events: none;
}

.operation-banner__media,
.operation-banner__title-wrap {
  position: relative;
  z-index: 1;
}

.operation-logo,
.operation-logo-fallback {
  width: 76px;
  height: 76px;
  border-radius: 20px;
  object-fit: cover;
}

.operation-logo-fallback {
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
}

.operation-banner__eyebrow {
  margin: 0 0 6px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  opacity: 0.82;
}

.operation-banner__title {
  font-size: clamp(1.5rem, 5vw, 2rem);
}

.operation-controls {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.operation-timer-card {
  margin: 0;
}

.audio-button {
  min-height: 100%;
  border: none;
  border-radius: 22px;
  padding: 18px;
  background: linear-gradient(135deg, #14213d 0%, #2458a6 100%);
  color: white;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(20, 33, 61, 0.2);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.audio-button-group {
  display: grid;
  gap: 12px;
}

.audio-button:hover {
  transform: translateY(-1px);
}

.audio-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.secondary-audio-button {
  background: linear-gradient(135deg, #325f8f 0%, #4f87c0 100%);
}

.operation-info-card {
  margin-top: 16px;
  padding: 20px;
  border-radius: 24px;
}

.operation-info-card--blue {
  background: linear-gradient(180deg, #0f4c81 0%, #1b6ca8 100%);
  color: white;
}

.operation-info-card--orange {
  background: linear-gradient(180deg, #f5a15a 0%, #ee7f36 100%);
  color: #2b1d11;
}

.operation-info-card__kicker {
  margin: 0 0 10px;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.86;
}

.operation-info-card__text {
  margin: 10px 0 0;
  line-height: 1.7;
  white-space: pre-line;
}

.operation-subsection + .operation-subsection {
  margin-top: 16px;
}

.operation-subsection__title {
  margin: 0 0 8px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}

.operation-message {
  margin: 0;
  line-height: 1.7;
  white-space: pre-wrap;
}

@keyframes timerPulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.01);
  }

  100% {
    transform: scale(1);
  }
}

.nav-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

@media (min-width: 720px) {
  .app-shell {
    padding: 32px 24px 56px;
  }

  .workshop-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .split {
    grid-template-columns: 1fr 1fr;
  }

  .operation-controls {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.8fr);
    align-items: stretch;
  }
}
