@import url("https://fonts.googleapis.com/css2?family=Caveat:wght@500;600;700&display=swap");

:root {
  color-scheme: dark;
  --wall: #c9c0ae;
  --board: #173c39;
  --wood: #79553a;
  --wood-dark: #4d3223;
  --chalk: #fffdf2;
  --blue-chalk: #7fd4ff;
  --yellow-chalk: #ffe082;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { min-width: 20rem; }

body {
  margin: 0;
  color: var(--chalk);
  background: var(--wall);
  font-family: "Caveat", "Segoe Print", cursive;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

a:focus-visible {
  outline: 3px solid var(--blue-chalk);
  outline-offset: 4px;
}

.chalk-wall {
  display: grid;
  min-height: 100vh;
  padding: clamp(0.85rem, 4vw, 4rem);
  place-items: center;
  background:
    linear-gradient(90deg, rgb(255 255 255 / 4%) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(rgb(255 255 255 / 4%) 1px, transparent 1px) 0 0 / 34px 34px,
    var(--wall);
}

.chalk-board {
  position: relative;
  width: min(76rem, 100%);
  min-height: 42rem;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 4.8rem);
  border: clamp(0.75rem, 1.8vw, 1.45rem) solid var(--wood);
  outline: 2px solid var(--wood-dark);
  background:
    radial-gradient(ellipse at 12% 15%, rgb(255 255 255 / 5%), transparent 23%),
    radial-gradient(ellipse at 74% 67%, rgb(255 255 255 / 4%), transparent 29%),
    repeating-linear-gradient(178deg, transparent 0 24px, rgb(255 255 255 / 1.8%) 25px 26px),
    var(--board);
  box-shadow: 0 18px 45px rgb(60 40 23 / 28%), inset 0 0 55px rgb(0 0 0 / 28%);
}

.chalk-board::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.14;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.34'/%3E%3C/svg%3E");
}

.chalk-heading,
.chalk-days,
.chalk-status,
.chalk-actions {
  position: relative;
  z-index: 2;
}

.chalk-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: center;
  padding-bottom: 4.5rem;
  border-bottom: 2px solid rgb(255 253 242 / 68%);
}

.chalk-kicker,
.chalk-subtitle,
.chalk-title h1,
.chalk-updated,
.chalk-status { margin: 0; }

.chalk-kicker {
  color: var(--blue-chalk);
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  font-weight: 700;
  transform: rotate(-1deg);
}

.chalk-title h1 {
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: 700;
  line-height: 0.75;
  letter-spacing: -0.035em;
  text-shadow: 1px 1px 0 rgb(255 255 255 / 22%);
}

.chalk-subtitle {
  margin-top: 1rem;
  font-size: 1.1rem;
}

.chalk-actions {
  display: contents;
}

.chalk-action-copy {
  position: absolute;
  z-index: 3;
  right: clamp(2rem, 5vw, 4.8rem);
  bottom: clamp(1.75rem, 3vw, 3rem);
  display: grid;
  justify-items: end;
  text-align: right;
}

.chalk-price {
  position: absolute;
  z-index: 3;
  top: 1.5rem;
  right: 1.5rem;
  display: grid;
  width: clamp(9.5rem, 12vw, 10.75rem);
  aspect-ratio: 1;
  align-content: center;
  padding: 0.75rem;
  border: 2px solid var(--yellow-chalk);
  border-radius: 50%;
  text-align: center;
  transform: rotate(2deg);
}

.chalk-price::before {
  position: absolute;
  inset: 0.42rem;
  border: 1px dashed rgb(255 224 130 / 70%);
  border-radius: 50%;
  content: "";
}

.chalk-price span,
.chalk-price small,
.chalk-price strong {
  position: relative;
  z-index: 1;
}

.chalk-price span {
  color: var(--yellow-chalk);
  font-size: 1.05rem;
}

.chalk-price strong {
  display: block;
  width: 100%;
  font-size: clamp(1.75rem, 3.05vw, 2.3rem);
  line-height: 1;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.chalk-price small { font-size: 0.95rem; }

.chalk-original {
  display: inline-flex;
  min-height: 44px;
  gap: 0.45rem;
  align-items: center;
  margin-top: 0.55rem;
  padding: 0.35rem 0.55rem;
  color: var(--blue-chalk);
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration-color: rgb(127 212 255 / 45%);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.24em;
  transform: rotate(-1deg);
}

.chalk-original[hidden] { display: none; }

.chalk-original svg {
  width: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.chalk-original:hover { color: var(--chalk); }

.chalk-updated {
  min-height: 1em;
  color: rgb(255 253 242 / 56%);
  font-size: 0.76rem;
  text-align: center;
}

.chalk-days {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(1.3rem, 3vw, 2.5rem);
  padding-block: 2.7rem 2rem;
}

.chalk-day {
  grid-column: span 2;
  padding: 0.25rem 0.3rem 1rem;
  border-bottom: 2px dashed rgb(255 255 255 / 30%);
}

.chalk-day:nth-child(4) { grid-column: 2 / span 2; }

.chalk-day h2 {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  margin: 0 0 0.8rem;
  color: var(--blue-chalk);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1;
  text-transform: lowercase;
}

.chalk-day p {
  display: grid;
  grid-template-columns: 1.25rem 1fr;
  gap: 0.3rem;
  margin: 0.55rem 0 0;
  font-size: clamp(1.15rem, 2vw, 1.42rem);
  line-height: 1.12;
}

.chalk-day p span {
  color: var(--yellow-chalk);
  font-size: 0.85em;
}

.chalk-day:nth-child(2n) { transform: rotate(0.5deg); }
.chalk-day:nth-child(3n) { transform: rotate(-0.6deg); }

.chalk-cup {
  position: absolute;
  z-index: 1;
  top: 0.6rem;
  right: 34%;
  width: 8.5rem;
  fill: none;
  stroke: rgb(255 255 255 / 48%);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
  transform: rotate(-5deg);
}

.chalk-cup__detail {
  stroke-width: 1.25;
  opacity: 0.58;
}

.chalk-loading {
  grid-column: 1 / -1;
  margin: 2rem 0;
  color: rgb(255 253 242 / 70%);
  font-size: 1.25rem;
  text-align: center;
}

.chalk-status {
  color: var(--yellow-chalk);
  font-size: 0.9rem;
  text-align: center;
}

.noscript {
  position: fixed;
  z-index: 10;
  right: 1rem;
  bottom: 1rem;
  margin: 0;
  padding: 0.75rem 1rem;
  color: #172f31;
  background: var(--yellow-chalk);
  font: 600 1rem system-ui, sans-serif;
}

@media (max-width: 70rem) {
  .chalk-days { grid-template-columns: repeat(2, 1fr); }
  .chalk-day,
  .chalk-day:nth-child(4) { grid-column: auto; }
  .chalk-day:last-child { grid-column: 1 / -1; }
}

@media (max-width: 48rem) {
  .chalk-heading {
    display: block;
    padding-bottom: 1.25rem;
  }
  .chalk-title h1 {
    white-space: nowrap;
  }
  .chalk-days {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding-block: 1.35rem 0.65rem;
  }
  .chalk-day:last-child { grid-column: auto; }
  .chalk-cup { display: none; }
  .chalk-actions {
    position: relative;
    display: grid;
    top: auto;
    right: auto;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.8rem;
    align-items: center;
    width: 100%;
    margin-top: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid rgb(255 253 242 / 42%);
    justify-items: stretch;
  }
  .chalk-action-copy {
    position: relative;
    z-index: auto;
    right: auto;
    bottom: auto;
    min-width: 0;
    justify-items: start;
    text-align: left;
  }
  .chalk-price {
    position: relative;
    z-index: auto;
    top: auto;
    right: auto;
    justify-self: end;
    width: clamp(6.25rem, 27vw, 7rem);
    padding: 0.45rem;
    background: rgb(23 60 57 / 48%);
    box-shadow: 0 0 0 0.25rem rgb(23 60 57 / 28%);
  }
  .chalk-price::before { inset: 0.3rem; }
  .chalk-price span { font-size: 0.72rem; }
  .chalk-price strong { font-size: clamp(1.4rem, 5.8vw, 1.7rem); }
  .chalk-price small { font-size: 0.65rem; }
  .chalk-original { margin-top: 0; }
  .chalk-updated { text-align: left; }
}

@media (max-width: 32rem) {
  .chalk-board { padding: 1.5rem 1.15rem; }
  .chalk-title h1 { font-size: 3.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
