:root {
  color-scheme: light;
  --bg: #f6f1e9;
  --bg-contrast: #fff5e4;
  --ink: #1b1b1b;
  --muted: #615b52;
  --accent: #d86a3a;
  --accent-strong: #b5532c;
  --card: #fff9f1;
  --shadow: 0 30px 60px rgba(20, 20, 20, 0.12);
  --radius: 26px;
  --mono: "Space Mono", "SFMono-Regular", ui-monospace, "Cascadia Code", "Source Code Pro", monospace;
  --display: "Fraunces", "Iowan Old Style", "Palatino Linotype", serif;
  --body: "Work Sans", "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body);
  color: var(--ink);
  background: radial-gradient(circle at top, #ffe9d1 0%, #f5dcc2 36%, #f3d9bc 65%, #f6f1e9 100%);
}

.app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 32px 80px;
  display: grid;
  gap: 32px;
}

.app-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  margin: 0 0 12px;
  color: var(--accent-strong);
  font-weight: 600;
}

h1 {
  font-family: var(--display);
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  margin: 0 0 12px;
}

.subhead {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.upload {
  background: var(--accent);
  color: white;
  padding: 12px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.upload input {
  display: none;
}

.upload:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 40px rgba(216, 106, 58, 0.25);
}

.hint {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}


.deck {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 44px 52px 28px;
  min-height: 420px;
  display: grid;
  gap: 24px;
  overflow: hidden;
}

.deck.dragging {
  outline: 2px dashed rgba(216, 106, 58, 0.6);
  outline-offset: -10px;
  background: #fff2e2;
}

.deck:fullscreen {
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  box-shadow: none;
  padding: 72px 12vw 48px;
  background: #fff3e4;
  font-size: 2rem;
}

.deck:fullscreen .slide {
  font-size: 2rem;
  line-height: 1.5;
}

.deck:fullscreen h1 {
  font-size: clamp(3.5rem, 6vw, 5rem);
}

.deck:fullscreen h2 {
  font-size: clamp(2.6rem, 4.5vw, 3.8rem);
}

.deck:fullscreen h3 {
  font-size: clamp(2.2rem, 3.5vw, 3rem);
}

.deck:fullscreen .slide-footer {
  font-size: 1.2rem;
}

body.presenting .app {
  max-width: none;
  padding: 0;
}

body.presenting .app-header,
body.presenting .tips {
  display: none;
}

body.presenting .deck {
  margin: 0;
}

.deck::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 90% 0%, rgba(216, 106, 58, 0.12), transparent 60%),
    radial-gradient(circle at 10% 100%, rgba(27, 27, 27, 0.08), transparent 55%);
  pointer-events: none;
}

.slide {
  position: relative;
  z-index: 1;
  font-size: 1.1rem;
  line-height: 1.6;
}

.slide h1,
.slide h2,
.slide h3 {
  font-family: var(--display);
  margin-top: 0;
}

.slide pre {
  background: #1c1c1c;
  color: #f5f2ea;
  padding: 16px;
  border-radius: 18px;
  overflow-x: auto;
  font-family: var(--mono);
}

.slide code {
  font-family: var(--mono);
}

.slide blockquote {
  margin: 16px 0;
  padding-left: 16px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}

.slide img {
  max-width: 100%;
  border-radius: 18px;
  box-shadow: 0 16px 30px rgba(20, 20, 20, 0.15);
}

.slide table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.98em;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 10px 20px rgba(20, 20, 20, 0.08);
}

.slide thead {
  background: rgba(216, 106, 58, 0.16);
}

.slide th,
.slide td {
  padding: 12px 16px;
  text-align: left;
  border: 1px solid rgba(97, 91, 82, 0.18);
}

.slide tbody tr:nth-child(even) {
  background: rgba(216, 106, 58, 0.06);
}

.slide tbody tr:nth-child(odd) {
  background: rgba(255, 249, 241, 0.75);
}

.slide-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--muted);
  z-index: 1;
}

#slide-title {
  font-weight: 600;
  color: var(--accent-strong);
}

.tips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.tip-card {
  background: var(--bg-contrast);
  padding: 18px 20px;
  border-radius: 18px;
  box-shadow: 0 14px 26px rgba(20, 20, 20, 0.08);
}

.tip-card h3 {
  margin: 0 0 10px;
  font-family: var(--display);
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(216, 106, 58, 0.15);
  color: var(--accent-strong);
  font-weight: 600;
  font-family: var(--mono);
  font-size: 0.8rem;
}

@media (max-width: 720px) {
  .app {
    padding: 32px 20px 64px;
  }

  .deck {
    padding: 32px 26px 22px;
  }
}

.reveal {
  animation: fadeUp 0.5s ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
