:root {
  --black: #1d1d1d;
  --red: #b20019;
  --yellow: #f1c16e;
  --ivory: #f7f1e8;
  --paper: #f2ede6;
  --muted: rgba(255, 255, 255, 0.72);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(135deg, #1d1d1d 0%, #2a2020 100%);
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ivory);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.wall-page {
  overflow: hidden;
  background: #000000;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
  border: none;
}

.app-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: linear-gradient(135deg, #1d1d1d 0%, #2a2020 100%);
}

.screen {
  display: none;
  width: 100%;
  height: 100%;
}

.screen.active {
  display: block;
}

.screen-content {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 30px;
}

.intro-content {
  justify-content: center;
  align-items: flex-start;
  background: radial-gradient(circle at top, rgba(178, 0, 25, 0.26), transparent 35%),
    linear-gradient(135deg, rgba(29, 29, 29, 0.96), rgba(39, 30, 30, 0.96));
}

.eyebrow {
  display: inline-block;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.7rem;
  color: var(--yellow);
  margin-bottom: 12px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2.2rem, 9vw, 3.4rem);
  line-height: 0.96;
  margin-bottom: 16px;
}

h2 {
  font-size: clamp(1.4rem, 5vw, 2rem);
}

.intro-content p {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ivory);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.discipline-content {
  justify-content: center;
}

.discipline-stack {
  display: grid;
  grid-template-rows: repeat(3, minmax(110px, 1fr));
  gap: 12px;
  height: 70%;
}

.discipline-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  min-height: 120px;
  padding: 18px 18px 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--ivory);
  text-align: left;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.discipline-card.selected {
  background: rgba(178, 0, 25, 0.32);
  border-color: rgba(241, 193, 110, 0.9);
}

.discipline-name {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.discipline-card small {
  color: var(--muted);
  line-height: 1.4;
  font-size: 0.92rem;
}

.drawing-content {
  justify-content: flex-start;
  gap: 12px;
}

.canvas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
}

.text-button {
  background: transparent;
  color: var(--yellow);
  border: 1px solid rgba(241, 193, 110, 0.5);
  border-radius: 999px;
  padding: 8px 12px;
}

.canvas-wrap {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 260px;
  background: linear-gradient(180deg, #dfe1e4 0%, #d2d5d9 100%);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(29, 29, 29, 0.12);
}

#drawing-canvas {
  width: 100%;
  height: 100%;
  display: block;
  background: #1d1d1d;
  touch-action: none;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 12px;
  width: 100%;
}

.field {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ivory);
}

.palette-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field-label,
.color-field span {
  color: var(--muted);
  font-size: 0.8rem;
}

.color-swatches {
  display: flex;
  align-items: center;
  gap: 10px;
}

.color-swatch {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: var(--swatch-color);
}

.color-swatch.selected {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
}

.color-field {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.color-field input {
  width: 42px;
  height: 36px;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  background: transparent;
}

.range-field {
  grid-column: 1 / -1;
}

.range-field input {
  width: 100%;
  accent-color: var(--red);
}

.actions-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.primary-button,
.secondary-button {
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 600;
}

.primary-button {
  background: var(--red);
  color: white;
}

.secondary-button {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ivory);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.undo-button {
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  line-height: 1;
}

.primary-button.wide {
  width: 100%;
}

.status-msg {
  min-height: 20px;
  font-size: 0.92rem;
  color: var(--yellow);
}

.status-msg.error {
  color: #ffb5b5;
}

.feedback-dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 28px;
  border: 1px solid rgba(178, 0, 25, 0.18);
  border-radius: 18px;
  background: #fffbe8;
  color: var(--black);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.feedback-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.feedback-check {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: var(--red);
  color: #fffbe8;
  font-size: 1.5rem;
}

.feedback-dialog .eyebrow {
  color: var(--red);
}

.feedback-dialog h2 {
  margin: 0 0 14px;
  font-size: 1.7rem;
  line-height: 1.15;
}

.feedback-joke {
  margin-bottom: 24px;
  color: #5b5146;
  line-height: 1.5;
}

.feedback-dialog .primary-button {
  min-height: 48px;
}

.wall-shell {
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  position: relative;
}

.wall-toolbar {
  position: absolute;
  right: 18px;
  top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  max-width: calc(100vw - 36px);
  z-index: 20;
}

.wall-button {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 10px 16px;
  backdrop-filter: blur(8px);
  font-weight: 600;
}

.wall-button.ghost {
  background: rgba(178, 0, 25, 0.18);
}

.wall-grid {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 30%, rgba(241, 193, 110, 0.12), transparent 20%),
    radial-gradient(circle at 80% 20%, rgba(178, 0, 25, 0.18), transparent 25%),
    linear-gradient(180deg, rgba(0, 0, 0, 1), rgba(12, 12, 12, 1));
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.floating-art {
  position: absolute;
  display: block;
  border: none;
  background: transparent;
  overflow: visible;
  filter: saturate(0.88) contrast(1.08);
  opacity: 0.96;
  will-change: transform;
  translate: 0 calc(var(--audio-pulse, 0) * -9px);
  scale: calc(1 + var(--audio-pulse, 0) * 0.07);
}

.floating-art img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.floating-art::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 0;
  background: transparent;
  pointer-events: none;
}

.empty-wall {
  display: grid;
  place-items: center;
  min-height: 200px;
  padding: 20px;
  text-align: center;
  color: var(--muted);
}

@media (min-width: 700px) {
  .discipline-stack {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: none;
    align-items: stretch;
  }

  .wall-grid {
    min-height: 100vh;
    height: 100vh;
  }
}

@media (min-width: 980px) {
  .wall-grid {
    min-height: 100vh;
    height: 100vh;
  }
}
