/* DnDoodle: a tavern notice board. Hand-written; modern-normalize.css loads first. */

/* Crimson Pro and Source Sans 3 (SIL OFL), self-hosted copies of the Google Fonts files */
/* vietnamese */
@font-face {
  font-family: 'Crimson Pro';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/static/fonts/q5uDsoa5M_tv7IihmnkabARUoYF6CsKjnlQ.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Crimson Pro';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/static/fonts/q5uDsoa5M_tv7IihmnkabARVoYF6CsKjnlQ.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Crimson Pro';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/static/fonts/q5uDsoa5M_tv7IihmnkabARboYF6CsKj.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* vietnamese */
@font-face {
  font-family: 'Crimson Pro';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/static/fonts/q5uDsoa5M_tv7IihmnkabARUoYF6CsKjnlQ.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Crimson Pro';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/static/fonts/q5uDsoa5M_tv7IihmnkabARVoYF6CsKjnlQ.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Crimson Pro';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/static/fonts/q5uDsoa5M_tv7IihmnkabARboYF6CsKj.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* vietnamese */
@font-face {
  font-family: 'Crimson Pro';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/static/fonts/q5uDsoa5M_tv7IihmnkabARUoYF6CsKjnlQ.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Crimson Pro';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/static/fonts/q5uDsoa5M_tv7IihmnkabARVoYF6CsKjnlQ.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Crimson Pro';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/static/fonts/q5uDsoa5M_tv7IihmnkabARboYF6CsKj.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* vietnamese */
@font-face {
  font-family: 'Crimson Pro';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/static/fonts/q5uDsoa5M_tv7IihmnkabARUoYF6CsKjnlQ.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Crimson Pro';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/static/fonts/q5uDsoa5M_tv7IihmnkabARVoYF6CsKjnlQ.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Crimson Pro';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/static/fonts/q5uDsoa5M_tv7IihmnkabARboYF6CsKj.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/static/fonts/nwpStKy2OAdR1K-IwhWudF-R3wIaZejf5HdF8Q.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/static/fonts/nwpStKy2OAdR1K-IwhWudF-R3wsaZejf5HdF8Q.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/static/fonts/nwpStKy2OAdR1K-IwhWudF-R3wMaZejf5HdF8Q.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/static/fonts/nwpStKy2OAdR1K-IwhWudF-R3wwaZejf5HdF8Q.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/static/fonts/nwpStKy2OAdR1K-IwhWudF-R3wAaZejf5HdF8Q.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/static/fonts/nwpStKy2OAdR1K-IwhWudF-R3wEaZejf5HdF8Q.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/static/fonts/nwpStKy2OAdR1K-IwhWudF-R3w8aZejf5Hc.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/static/fonts/nwpStKy2OAdR1K-IwhWudF-R3wIaZejf5HdF8Q.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/static/fonts/nwpStKy2OAdR1K-IwhWudF-R3wsaZejf5HdF8Q.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/static/fonts/nwpStKy2OAdR1K-IwhWudF-R3wMaZejf5HdF8Q.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/static/fonts/nwpStKy2OAdR1K-IwhWudF-R3wwaZejf5HdF8Q.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/static/fonts/nwpStKy2OAdR1K-IwhWudF-R3wAaZejf5HdF8Q.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/static/fonts/nwpStKy2OAdR1K-IwhWudF-R3wEaZejf5HdF8Q.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/static/fonts/nwpStKy2OAdR1K-IwhWudF-R3w8aZejf5Hc.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/static/fonts/nwpStKy2OAdR1K-IwhWudF-R3wIaZejf5HdF8Q.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/static/fonts/nwpStKy2OAdR1K-IwhWudF-R3wsaZejf5HdF8Q.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/static/fonts/nwpStKy2OAdR1K-IwhWudF-R3wMaZejf5HdF8Q.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/static/fonts/nwpStKy2OAdR1K-IwhWudF-R3wwaZejf5HdF8Q.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/static/fonts/nwpStKy2OAdR1K-IwhWudF-R3wAaZejf5HdF8Q.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/static/fonts/nwpStKy2OAdR1K-IwhWudF-R3wEaZejf5HdF8Q.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/static/fonts/nwpStKy2OAdR1K-IwhWudF-R3w8aZejf5Hc.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Base
   ═══════════════════════════════════════════════════════════════════════════ */

*,
::before,
::after {
  margin: 0;
  padding: 0;
  border: 0 solid;
}

:root {
  /* Parchment base tones */
  --dnd-parchment-100: oklch(96% 0.02 80);
  --dnd-parchment-200: oklch(92% 0.025 78);
  --dnd-parchment-300: oklch(88% 0.03 76);

  /* Ink colors */
  --dnd-ink: oklch(25% 0.03 50);
  --dnd-ink-muted: oklch(45% 0.02 50);
  --dnd-ink-light: oklch(65% 0.015 50);

  /* Availability states */
  --dnd-available: oklch(52% 0.14 155);
  --dnd-available-bg: oklch(92% 0.06 155);
  --dnd-maybe: oklch(70% 0.14 85);
  --dnd-maybe-bg: oklch(94% 0.06 85);
  --dnd-unavailable: oklch(55% 0.10 25);
  --dnd-unavailable-bg: oklch(94% 0.03 25);

  /* Accent - burnished bronze/copper */
  --dnd-accent: oklch(55% 0.12 55);
  --dnd-accent-hover: oklch(50% 0.14 55);

  /* Surfaces inside cards: the calendar and result rows */
  --dnd-inset-bg: oklch(98% 0.005 80);
  --dnd-inset-border: oklch(88% 0.02 75);
  --dnd-rule: oklch(90% 0.01 75);

  --font-display: 'Crimson Pro', Georgia, serif;
  --font-body: 'Source Sans 3', system-ui, sans-serif;

  /* Shadows with warm tint */
  --shadow-sm: 0 1px 2px oklch(25% 0.02 50 / 0.08);
  --shadow-md: 0 4px 6px -1px oklch(25% 0.02 50 / 0.1), 0 2px 4px -2px oklch(25% 0.02 50 / 0.1);
  --shadow-lg: 0 10px 15px -3px oklch(25% 0.02 50 / 0.12), 0 4px 6px -4px oklch(25% 0.02 50 / 0.1);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  background-color: oklch(96% 0.02 80);
  color: oklch(21% 0.006 285.885);
  scrollbar-color: oklch(21% 0.006 285.885 / 0.35) transparent;
}

html {
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-size: inherit;
  font-weight: inherit;
}

a {
  color: inherit;
  text-decoration: inherit;
}

svg {
  display: block;
  vertical-align: middle;
}

button, input, select, textarea {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  border-radius: 0;
  background-color: transparent;
}

::placeholder {
  opacity: 1;
}

/* Date inputs in Chrome and Safari: no inner padding, text sits on one line */
::-webkit-date-and-time-value {
  min-height: 1lh;
  text-align: inherit;
}
::-webkit-datetime-edit {
  display: inline-flex;
  padding-top: 0;
  padding-bottom: 0;
}
::-webkit-datetime-edit-fields-wrapper {
  padding: 0;
}
::-webkit-calendar-picker-indicator {
  line-height: 1;
}

[hidden] {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Page Shells
   ═══════════════════════════════════════════════════════════════════════════ */

.dnd-bg {
  position: relative;
  min-height: 100vh;
  padding: 1rem;
  background: linear-gradient(
    165deg,
    var(--dnd-parchment-100) 0%,
    var(--dnd-parchment-200) 50%,
    var(--dnd-parchment-300) 100%
  );
}

/* Subtle paper texture overlay */
.dnd-bg::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.02;
  pointer-events: none;
  border-radius: inherit;
}

.dnd-bg-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.dnd-bg-poll {
  padding-bottom: 2rem;
}

.narrow {
  width: 100%;
  max-width: 28rem;
}

.wide {
  max-width: 72rem;
  margin: 0 auto;
}

.dnd-card {
  position: relative;
  padding: 1.5rem;
  background: linear-gradient(
    145deg,
    oklch(99.5% 0.005 80 / 0.97) 0%,
    oklch(98.5% 0.008 75 / 0.97) 100%
  );
  border: 1.5px solid oklch(75% 0.03 55 / 0.35);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-md);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.dnd-card::before {
  content: '';
  position: absolute;
  top: 6px;
  right: 6px;
  bottom: 6px;
  left: 6px;
  border: 1px solid oklch(75% 0.03 55 / 0.12);
  border-radius: 0.5rem;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Headings and Text
   ═══════════════════════════════════════════════════════════════════════════ */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
}

.page-head {
  margin-bottom: 2rem;
  text-align: center;
}

.page-title {
  font-family: var(--font-display);
  font-size: 2.25rem;
  line-height: 2.5rem;
  font-weight: 700;
  color: var(--dnd-ink);
}

.back-link + .page-title {
  margin-top: 1rem;
}

.title-dice {
  display: inline-block;
  margin-right: 0.75rem;
}

.dnd-section-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--dnd-ink);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--dnd-rule);
}

.empty-state {
  padding: 2rem 0;
  text-align: center;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--dnd-ink-muted);
}

.empty-state-title {
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
  line-height: 1.75rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Home
   ═══════════════════════════════════════════════════════════════════════════ */

.hero {
  margin-bottom: 2.5rem;
  text-align: center;
}

.hero-title {
  margin-bottom: 0.75rem;
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--dnd-ink);
}

.hero-tagline {
  font-size: 1.125rem;
  line-height: 1.75rem;
  font-weight: 300;
  color: var(--dnd-ink-muted);
}

/* The dice is thrown in on load and wobbles when touched */
.dnd-dice {
  display: inline-block;
  cursor: default;
  animation: dnd-dice-throw 0.9s 0.15s var(--ease-out) backwards;
}

.dnd-dice:hover,
.dnd-dice:active {
  animation: dnd-dice-roll 0.6s ease;
}

@keyframes dnd-dice-throw {
  0% { transform: translate(-0.6em, -0.5em) rotate(-280deg) scale(0.6); opacity: 0; }
  55% { transform: translate(0, 0.08em) rotate(12deg) scale(1.05); opacity: 1; }
  75% { transform: translateY(-0.04em) rotate(-5deg); }
  100% { transform: none; }
}

@keyframes dnd-dice-roll {
  0% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(-15deg) scale(1.1); }
  50% { transform: rotate(15deg) scale(1.1); }
  75% { transform: rotate(-10deg) scale(1.05); }
  100% { transform: rotate(0deg) scale(1); }
}

.home-card {
  margin-bottom: 1.25rem;
  padding: 2rem;
  text-align: center;
}

.home-card-title {
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 600;
  color: var(--dnd-ink);
}

.home-card-lede {
  margin-bottom: 1.5rem;
  color: var(--dnd-ink-muted);
}

.icon {
  width: 1.25rem;
  height: 1.25rem;
}

.divider {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--dnd-ink-light);
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--dnd-ink-light);
  opacity: 0.3;
}

.divider::before { margin-right: 0.75rem; }
.divider::after { margin-left: 0.75rem; }

.join-form {
  display: flex;
  gap: 0.5rem;
}

.join-form .dnd-code {
  flex: 1;
}

.join-error {
  margin-top: 0.5rem;
  text-align: center;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  color: var(--dnd-unavailable);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Form Elements
   ═══════════════════════════════════════════════════════════════════════════ */

.field {
  margin-bottom: 1rem;
}

.create-form .field {
  margin-bottom: 1.25rem;
}

.create-form .field-duration {
  margin-bottom: 1.5rem;
}

.label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  color: var(--dnd-ink);
}

.label-loose {
  margin-bottom: 0.75rem;
}

.tag-required,
.tag-optional {
  margin-left: 0.5rem;
  font-size: 0.75rem;
  line-height: 1rem;
}

.tag-required {
  font-weight: 500;
  color: var(--dnd-accent);
}

.tag-optional {
  font-weight: 400;
  color: var(--dnd-ink-muted);
}

.field-error,
.field-hint {
  margin-top: 0.375rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.field-error { color: var(--dnd-unavailable); }
.field-hint { color: var(--dnd-ink-light); }

.form-error {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--dnd-unavailable);
}

.dnd-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: oklch(99% 0.005 80);
  border: 1.5px solid oklch(75% 0.02 75);
  border-radius: 0.5rem;
  color: var(--dnd-ink);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.dnd-input:focus {
  outline: none;
  border-color: var(--dnd-accent);
  box-shadow: 0 0 0 3px oklch(55% 0.12 55 / 0.15);
}

.dnd-input::placeholder {
  color: var(--dnd-ink-light);
}

/* Compact code input for the join form */
.dnd-input-code-compact {
  padding: 0.625rem 0.75rem;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: var(--font-display);
  background: oklch(98% 0.005 80 / 0.7);
  border: 1px solid oklch(80% 0.02 75 / 0.6);
}

.dnd-input-code-compact::placeholder {
  letter-spacing: 0.05em;
  font-weight: 400;
}

/* Six-tile code entry. The real input sits invisibly on top. */
.dnd-code.is-tiled {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.375rem;
}

.dnd-code.is-tiled input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: text;
}

.dnd-code-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.875rem;
  border-radius: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--dnd-ink);
  background: oklch(98% 0.005 80 / 0.7);
  border: 1px solid oklch(80% 0.02 75 / 0.6);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.dnd-code-tile.is-active {
  border-color: var(--dnd-accent);
  box-shadow: 0 0 0 3px oklch(55% 0.12 55 / 0.15);
}

/* On/off switch: the button's aria-checked drives it */
.switch-row {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 2.75rem;
  height: 1.5rem;
  border-radius: 9999px;
  background: oklch(85% 0.02 75);
  transition: background-color 0.15s var(--ease);
}

.switch[aria-checked="true"] {
  background: var(--dnd-accent);
}

.switch-knob {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border-radius: 9999px;
  background: #fff;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  transform: translateX(0.25rem);
  transition: transform 0.25s var(--spring);
}

.switch[aria-checked="true"] .switch-knob {
  transform: translateX(1.5rem);
}

.switch-label {
  margin-left: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--dnd-ink-muted);
}

.check {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.check input {
  width: 1.25rem;
  height: 1.25rem;
}

.check span {
  margin-left: 0.75rem;
  color: var(--dnd-ink);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Buttons and Links
   ═══════════════════════════════════════════════════════════════════════════ */

.dnd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--dnd-accent);
  color: white;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: var(--shadow-sm);
}

.dnd-btn:hover {
  background: var(--dnd-accent-hover);
  box-shadow: var(--shadow-md);
}

.dnd-btn:active {
  transform: scale(0.98);
}

.dnd-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.dnd-btn-block {
  width: 100%;
}

.dnd-btn-secondary {
  background: oklch(92% 0.02 75);
  color: var(--dnd-ink);
  border: 1.5px solid oklch(80% 0.02 75);
}

.dnd-btn-secondary:hover {
  background: oklch(88% 0.025 75);
}

/* Hero button - larger, more prominent */
.dnd-btn-hero {
  padding: 1rem 1.5rem;
  font-size: 1.125rem;
  background: linear-gradient(
    145deg,
    var(--dnd-accent) 0%,
    oklch(50% 0.13 55) 100%
  );
  box-shadow:
    var(--shadow-md),
    inset 0 1px 0 oklch(100% 0 0 / 0.15);
  transition: all 0.2s ease;
}

.dnd-btn-hero:hover {
  background: linear-gradient(
    145deg,
    var(--dnd-accent-hover) 0%,
    oklch(45% 0.14 55) 100%
  );
  box-shadow:
    var(--shadow-lg),
    inset 0 1px 0 oklch(100% 0 0 / 0.15);
  transform: translateY(-1px);
}

.dnd-btn-hero:active {
  transform: translateY(0);
}

/* Compact secondary button */
.dnd-btn-secondary-compact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  background: oklch(94% 0.015 75 / 0.8);
  color: var(--dnd-ink);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  border: 1px solid oklch(80% 0.02 75 / 0.6);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.15s;
}

.dnd-btn-secondary-compact:hover {
  background: oklch(90% 0.02 75);
  border-color: oklch(70% 0.03 75);
}

.dnd-link {
  color: var(--dnd-accent);
  text-decoration: none;
  transition: color 0.15s;
}

.dnd-link:hover {
  color: var(--dnd-accent-hover);
  text-decoration: underline;
}

.dnd-link-muted {
  color: var(--dnd-ink-muted);
}

.dnd-link-muted:hover {
  color: var(--dnd-ink);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Poll Header
   ═══════════════════════════════════════════════════════════════════════════ */

.poll-header {
  margin-bottom: 1.5rem;
}

.poll-title-block {
  margin-top: 1rem;
  text-align: center;
}

.poll-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.dnd-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: oklch(96% 0.01 75);
  border: 1px solid oklch(88% 0.02 75);
  border-radius: 2rem;
  font-size: 0.875rem;
  color: var(--dnd-ink-muted);
}

.dnd-stat:hover {
  background: oklch(92% 0.02 75);
}

.dnd-stat-code {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.05em;
  color: var(--dnd-ink);
}

/* Copy button: the label slides up and the check slides in */
.dnd-copy-btn {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: background-color 0.15s var(--ease);
}

.dnd-copy-btn .copy-icon,
.dnd-copy-btn .check-icon {
  transition: transform 0.2s, opacity 0.2s;
}

.dnd-copy-btn.copied .copy-icon {
  transform: translateY(-100%);
  opacity: 0;
}

.dnd-copy-btn .check-icon {
  position: absolute;
  transform: translateY(100%);
  opacity: 0;
}

.dnd-copy-btn.copied .check-icon {
  transform: translateY(0);
  opacity: 1;
}

.poll-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 64rem) {
  .poll-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Calendar
   ═══════════════════════════════════════════════════════════════════════════ */

.calendar-hint {
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--dnd-ink-light);
}

/* Instructions that depend on the pointer: click-and-drag vs hold-and-drag */
.dnd-hint-coarse { display: none; }
@media (pointer: coarse) {
  .dnd-hint-fine { display: none; }
  .dnd-hint-coarse { display: inline; }
}

.calendar {
  padding: 0.75rem;
  background: var(--dnd-inset-bg);
  border: 1px solid var(--dnd-inset-border);
  border-radius: 0.5rem;
}

.calendar-weekdays,
.calendar-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.25rem;
  margin-bottom: 0.25rem;
}

.calendar-weekdays {
  margin-bottom: 0.5rem;
}

.weekday {
  padding: 0.25rem 0;
  text-align: center;
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 600;
  color: var(--dnd-ink-muted);
}

.dnd-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border-radius: 0.5rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-body);
  position: relative;
  /* No text selection, callouts or double-tap zoom while tapping and dragging */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

.dnd-date-blank {
  width: 100%;
  aspect-ratio: 1;
}

.date-month {
  font-size: 0.65rem;
  opacity: 0.7;
}

.date-day {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
}

.date-icon {
  font-size: 0.75rem;
  line-height: 1rem;
}

.dnd-date-none {
  background: oklch(96% 0.01 75);
  border-color: oklch(88% 0.02 75);
  color: var(--dnd-ink-muted);
}

.dnd-date-none:hover {
  background: oklch(94% 0.015 75);
  border-color: oklch(80% 0.02 75);
}

.dnd-date-available {
  background: var(--dnd-available-bg);
  border-color: var(--dnd-available);
  color: oklch(30% 0.08 155);
}

.dnd-date-available:hover {
  background: oklch(88% 0.08 155);
}

.dnd-date-maybe {
  background: var(--dnd-maybe-bg);
  border-color: var(--dnd-maybe);
  color: oklch(35% 0.08 85);
}

.dnd-date-maybe:hover {
  background: oklch(90% 0.08 85);
}

/* Selection summary badges */
.summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.dnd-summary-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
}

.dnd-summary-available {
  background: var(--dnd-available-bg);
  color: oklch(35% 0.1 155);
}

.dnd-summary-maybe {
  background: var(--dnd-maybe-bg);
  color: oklch(40% 0.08 85);
}

.dnd-summary-none {
  background: oklch(94% 0.01 75);
  color: var(--dnd-ink-muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Submitting
   ═══════════════════════════════════════════════════════════════════════════ */

.warning {
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--dnd-maybe-bg);
  border: 1px solid var(--dnd-maybe);
  border-radius: 0.5rem;
}

.warning p {
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: oklch(35% 0.08 85);
}

.warning-actions {
  display: flex;
  gap: 0.5rem;
}

.warning-actions .dnd-btn {
  line-height: 1.4286;
}

.not-you {
  margin-top: 0.75rem;
  text-align: center;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--dnd-ink-light);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Toast Notifications
   ═══════════════════════════════════════════════════════════════════════════ */

.dnd-toast {
  position: fixed;
  top: 1rem;
  right: 1rem;
  max-width: 24rem;
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow: hidden;
  animation: toast-in 0.4s var(--spring);
  z-index: 100;
}

/* Shrinks over the toast's lifetime, which app.js sets as --life */
.dnd-toast::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: currentColor;
  opacity: 0.3;
  transform-origin: left;
  animation: toast-life var(--life, 5s) linear forwards;
}

@keyframes toast-life {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

.dnd-toast-success {
  background: oklch(98% 0.02 155);
  border: 1px solid var(--dnd-available);
  color: oklch(25% 0.08 155);
}

.dnd-toast-info {
  background: oklch(98% 0.02 85);
  border: 1px solid var(--dnd-maybe);
  color: oklch(30% 0.06 85);
}

.dnd-toast-error {
  background: oklch(98% 0.02 25);
  border: 1px solid var(--dnd-unavailable);
  color: oklch(30% 0.08 25);
}

.toast-icon {
  font-size: 1.125rem;
  line-height: 1.75rem;
}

.toast-text {
  flex: 1;
}

.toast-close {
  margin-left: 0.5rem;
  opacity: 0.6;
  cursor: pointer;
}

.toast-close:hover {
  opacity: 1;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(1.5rem) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.dnd-toast-exit {
  animation: toast-out 0.2s ease-in forwards;
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateX(1rem);
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Results
   ═══════════════════════════════════════════════════════════════════════════ */

.respondents {
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--dnd-ink-muted);
}

.respondents-label {
  font-weight: 500;
}

.respondents-updated {
  color: var(--dnd-ink-light);
}

.result-section {
  margin-bottom: 1rem;
}

.result-section-title {
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.125rem;
  line-height: 1.75rem;
  font-weight: 600;
  color: var(--dnd-ink);
}

.result-rows > * + * {
  margin-top: 0.5rem;
}

.result-more {
  cursor: pointer;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--dnd-ink-muted);
  transition: color 0.15s var(--ease);
}

.result-more:hover {
  color: var(--dnd-ink);
}

.result-more + .result-rows {
  margin-top: 0.5rem;
}

.result-row {
  padding: 0.75rem;
  background: oklch(99% 0.003 80);
  border: 1px solid var(--dnd-inset-border);
  border-radius: 0.5rem;
}

.result-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.result-date {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--dnd-ink);
}

.result-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.result-count {
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--dnd-ink-muted);
}

/* DM status badges */
.dm-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 500;
}

.dnd-badge-available {
  background: var(--dnd-available-bg);
  color: oklch(30% 0.08 155);
}

.dnd-badge-maybe {
  background: var(--dnd-maybe-bg);
  color: oklch(35% 0.08 85);
}

.dnd-badge-unavailable {
  background: var(--dnd-unavailable-bg);
  color: oklch(35% 0.08 25);
}

/* Progress bar */
.dnd-progress {
  display: flex;
  height: 0.5rem;
  border-radius: 1rem;
  overflow: hidden;
  background: oklch(94% 0.01 75);
}

.dnd-progress-available {
  background: var(--dnd-available);
}

.dnd-progress-maybe {
  background: var(--dnd-maybe);
}

/* Participant chips */
.result-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.5rem;
}

.dnd-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.dnd-chip-available {
  background: var(--dnd-available-bg);
  color: oklch(30% 0.08 155);
}

.dnd-chip-maybe {
  background: var(--dnd-maybe-bg);
  color: oklch(35% 0.08 85);
}

.dnd-chip-dm {
  box-shadow: inset 0 0 0 1.5px var(--dnd-accent);
}

.result-missing {
  margin-left: 0.25rem;
  font-size: 0.75rem;
  line-height: 1rem;
  color: var(--dnd-ink-light);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Motion
   ═══════════════════════════════════════════════════════════════════════════ */

/* Cards rise in on load, the second a beat after the first */
.dnd-card,
.hero {
  animation: rise 0.5s var(--ease-out) backwards;
}

.dnd-card + .dnd-card,
.hero + .dnd-card {
  animation-delay: 0.07s;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(0.75rem); }
}

/* A date pops when its status changes; app.js adds is-popping */
.dnd-date.is-popping {
  animation: date-pop 0.32s var(--spring);
}

.dnd-date.is-popping [data-icon] {
  animation: icon-in 0.3s var(--spring);
}

@keyframes date-pop {
  0% { transform: scale(1); }
  40% { transform: scale(0.88); }
  100% { transform: scale(1); }
}

@keyframes icon-in {
  from { transform: scale(0.2) rotate(-30deg); opacity: 0; }
}

@media (hover: hover) {
  .dnd-date:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
  }
}

/* Calendar tiles while being painted: no hover lift under the finger */
.is-painting .dnd-date:hover {
  transform: none;
  box-shadow: none;
}

/* Code tiles pop as characters land, with a blinking caret where the next goes */
.dnd-code-tile.is-filled {
  animation: tile-pop 0.22s var(--spring);
}

@keyframes tile-pop {
  from { transform: scale(0.82); }
}

.dnd-code-tile.is-active:empty::after {
  content: '';
  width: 2px;
  height: 1.2em;
  background: var(--dnd-accent);
  animation: caret-blink 1s steps(1) infinite;
}

@keyframes caret-blink {
  50% { opacity: 0; }
}

/* Small bump for the copy button and the response count when it changes */
.dnd-copy-btn.copied,
.dnd-stat.is-bumped {
  animation: bump 0.4s var(--spring);
}

@keyframes bump {
  40% { transform: scale(1.08); }
}

/* Result bars fill from the left, and opened sections slide their rows in */
.dnd-progress > div {
  transform-origin: left;
  animation: bar-grow 0.7s var(--ease-out) backwards;
}

.dnd-progress > div + div {
  animation-delay: 0.12s;
}

@keyframes bar-grow {
  from { transform: scaleX(0); }
}

details[open] > .result-rows {
  animation: reveal 0.3s var(--ease-out);
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(-0.375rem); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  ::before,
  ::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Dark Mode (OS Preference)
   ═══════════════════════════════════════════════════════════════════════════ */

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    background-color: oklch(18% 0.02 55);
    color: oklch(97.807% 0.029 256.847);
    scrollbar-color: oklch(97.807% 0.029 256.847 / 0.35) transparent;

    --dnd-ink: oklch(92% 0.02 75);
    --dnd-ink-muted: oklch(70% 0.015 70);
    --dnd-ink-light: oklch(55% 0.01 70);

    --dnd-available: oklch(65% 0.16 155);
    --dnd-available-bg: oklch(28% 0.06 155);
    --dnd-maybe: oklch(75% 0.14 85);
    --dnd-maybe-bg: oklch(30% 0.06 85);
    --dnd-unavailable: oklch(65% 0.12 25);
    --dnd-unavailable-bg: oklch(28% 0.04 25);

    --dnd-accent: oklch(70% 0.12 55);
    --dnd-accent-hover: oklch(75% 0.14 55);

    --dnd-inset-bg: oklch(18% 0.012 55);
    --dnd-inset-border: oklch(30% 0.02 55);
    --dnd-rule: oklch(28% 0.01 55);

    --shadow-sm: 0 1px 2px oklch(10% 0.02 50 / 0.3);
    --shadow-md: 0 4px 6px -1px oklch(10% 0.02 50 / 0.4), 0 2px 4px -2px oklch(10% 0.02 50 / 0.3);
    --shadow-lg: 0 10px 15px -3px oklch(10% 0.02 50 / 0.5), 0 4px 6px -4px oklch(10% 0.02 50 / 0.4);
  }

  .dnd-bg {
    background: linear-gradient(
      165deg,
      oklch(18% 0.02 55) 0%,
      oklch(15% 0.018 50) 50%,
      oklch(12% 0.015 45) 100%
    );
  }

  .dnd-card {
    background: linear-gradient(
      145deg,
      oklch(26% 0.015 55 / 0.95) 0%,
      oklch(22% 0.012 50 / 0.95) 100%
    );
    border-color: oklch(42% 0.03 55 / 0.35);
  }

  .dnd-card::before {
    border-color: oklch(42% 0.03 55 / 0.1);
  }

  .dnd-input {
    background: oklch(18% 0.015 55);
    border-color: oklch(35% 0.02 55);
  }

  .dnd-input:focus {
    border-color: var(--dnd-accent);
    box-shadow: 0 0 0 3px oklch(70% 0.12 55 / 0.2);
  }

  .dnd-input-code-compact,
  .dnd-code-tile {
    background: oklch(18% 0.015 55 / 0.8);
    border-color: oklch(35% 0.02 55 / 0.6);
  }

  .dnd-code-tile.is-active {
    border-color: var(--dnd-accent);
    box-shadow: 0 0 0 3px oklch(70% 0.12 55 / 0.2);
  }

  .dnd-btn-secondary {
    background: oklch(28% 0.02 55);
    border-color: oklch(38% 0.02 55);
  }

  .dnd-btn-secondary:hover {
    background: oklch(32% 0.025 55);
  }

  .dnd-btn-hero {
    background: linear-gradient(
      145deg,
      var(--dnd-accent) 0%,
      oklch(60% 0.11 55) 100%
    );
  }

  .dnd-btn-hero:hover {
    background: linear-gradient(
      145deg,
      var(--dnd-accent-hover) 0%,
      oklch(65% 0.12 55) 100%
    );
  }

  .dnd-btn-secondary-compact {
    background: oklch(28% 0.02 55 / 0.8);
    border-color: oklch(40% 0.02 55 / 0.6);
  }

  .dnd-btn-secondary-compact:hover {
    background: oklch(32% 0.025 55);
    border-color: oklch(45% 0.03 55);
  }

  .dnd-stat {
    background: oklch(25% 0.015 55);
    border-color: oklch(35% 0.02 55);
  }

  .dnd-stat:hover {
    background: oklch(28% 0.018 55);
  }

  .dnd-date-none {
    background: oklch(22% 0.015 55);
    border-color: oklch(32% 0.02 55);
  }

  .dnd-date-none:hover {
    background: oklch(26% 0.018 55);
    border-color: oklch(38% 0.02 55);
  }

  .dnd-date-available {
    color: oklch(85% 0.08 155);
  }

  .dnd-date-available:hover {
    background: oklch(32% 0.08 155);
  }

  .dnd-date-maybe {
    color: oklch(88% 0.08 85);
  }

  .dnd-date-maybe:hover {
    background: oklch(34% 0.08 85);
  }

  .dnd-summary-available { color: oklch(80% 0.1 155); }
  .dnd-summary-maybe { color: oklch(85% 0.08 85); }
  .dnd-summary-none { background: oklch(25% 0.01 55); }

  .warning p {
    color: oklch(88% 0.08 85);
  }

  .dnd-toast-success {
    background: oklch(22% 0.04 155);
    color: oklch(85% 0.06 155);
  }

  .dnd-toast-info {
    background: oklch(24% 0.04 85);
    color: oklch(88% 0.05 85);
  }

  .dnd-toast-error {
    background: oklch(22% 0.04 25);
    color: oklch(85% 0.06 25);
  }

  .result-row {
    background: var(--dnd-inset-bg);
  }

  .dnd-badge-available { color: oklch(85% 0.1 155); }
  .dnd-badge-maybe { color: oklch(88% 0.1 85); }
  .dnd-badge-unavailable { color: oklch(85% 0.08 25); }

  .dnd-chip-available { color: oklch(85% 0.08 155); }
  .dnd-chip-maybe { color: oklch(88% 0.08 85); }

  .dnd-progress {
    background: oklch(25% 0.01 55);
  }
}
