:root {
  --bg-page: #ffffff;
  --panel: #ffffff;
  --text-main: #696f8c;
  --text-soft: #696f8c;
  --accent: #501dad;
  --accent-strong: #501dad;
  --border-soft: #d7dbea;
  --shadow: 0 10px 28px rgba(80, 29, 173, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text-main);
  background: var(--bg-page);
}

.site-logo {
  position: fixed;
  top: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: inline-flex;
  padding: 0.3rem 0.6rem;
  background: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.site-logo img {
  display: block;
  width: clamp(200px, 16vw, 250px);
  height: auto;
}

.landing-page {
  display: grid;
  place-items: center;
  padding: 2rem;
}

.landing-wrapper {
  width: min(1080px, 100%);
}

.hero-card {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: 24px;
  padding: clamp(1.5rem, 3vw, 3rem);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  margin: 0.75rem 0 0;
  font-size: clamp(1.6rem, 3vw, 2.8rem);
}

.hero-text {
  margin: 0.75rem 0 0;
  max-width: 60ch;
  color: var(--text-soft);
  line-height: 1.5;
}

.deck-grid {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.deck-card {
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 1.2rem;
  background: #ffffff;
  text-decoration: none;
  color: inherit;
  transition: transform 120ms ease, border-color 120ms ease, background-color 120ms ease;
}

.deck-card:hover,
.deck-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: #f6f1ff;
}

.deck-card h2 {
  margin: 0;
  font-size: 1.1rem;
}

.deck-card p {
  margin: 0.5rem 0 0;
  color: var(--text-soft);
  line-height: 1.4;
}

.hint-text {
  margin-top: 1.25rem;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.deck-page {
  margin: 0;
  padding: 0.75rem;
  overflow: hidden;
}

.deck-header {
  height: 9vh;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.4rem;
}

.deck-header h1 {
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.5rem);
  text-align: right;
}

.back-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.95rem;
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--accent-strong);
}

.slides-track {
  position: relative;
  height: calc(100vh - 11vh);
  overflow: hidden;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  border-radius: 18px;
  border: 1px solid var(--border-soft);
}

.slide-timer {
  position: sticky;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  width: 100%;
  pointer-events: none;
}

.slide-timer__bar {
  width: 100%;
  height: 7px;
  border-radius: 0;
  background: #ede8f8;
  overflow: hidden;
}

.slide-timer__fill {
  width: 100%;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
}

.slides-track::-webkit-scrollbar {
  display: none;
}

.slide-frame {
  min-height: calc(100vh - 11vh);
  scroll-snap-align: start;
  display: grid;
  place-items: center;
  padding: 0.1rem;
}

.embed-placeholder {
  width: 98%;
  height: calc(100vh - 14vh);
  border: 1px dashed var(--accent);
  border-radius: 16px;
  background: #ffffff;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1rem;
}

.embed-placeholder h2 {
  margin: 0;
}

.embed-placeholder p {
  margin: 0.1rem 0 0;
  color: var(--text-soft);
}

.qrcode-box {
  position: fixed;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  background: #ffffff;
  padding: 2rem;
  border-radius: 20px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow);
  text-align: center;
  width: clamp(200px, 15vw, 350px);
}

.qrcode-box img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.qrcode-box span {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.2;
}

@media (max-width: 700px) {
  .deck-header {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.05rem;
    height: auto;
    margin-bottom: 0.5rem;
  }

  .deck-header h1 {
    text-align: left;
  }

  .slides-track,
  .slide-frame,
  .embed-placeholder {
    height: calc(100vh - 120px);
    min-height: calc(100vh - 120px);
  }

  .qrcode-box {
    position: static;
    margin: 1rem auto;
    width: 140px;
  }

  body.deck-page {
    overflow-y: auto;
  }
}
