/* Denture Gel wearer pages: the tap cards (habits, workday ruler, bite test, receipt) and the small motion-kit
   drawings, shared by four pages that each sit on a different house layout. Each layout sets its own palette by
   overriding the --wk-* variables. Written 2026-10-16. */
:root {
  --wk-ink: #16201a;
  --wk-body: #26302a;
  --wk-muted: #5d6862;
  --wk-line: #e7e1d2;
  --wk-paper: #ffffff;
  --wk-cream: #fbf6ea;
  --wk-cream-2: #f6eedb;
  --wk-green: #1f7a35;
  --wk-green-d: #145a25;
  --wk-vgreen: #0e3a40;
  --wk-red: #c8321f;
  --wk-red-soft: #fdecea;
  --wk-mark: #ffe680;
  --wk-serif: Georgia, "Times New Roman", Times, serif;
  --wk-sans:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.vm-sc {
  display: block;
}
.ws-fig .va-how,
.ws-fig [id^="ws-"] {
  max-width: 100%;
}
.ws-card,
.ws-card button,
.ws-draw,
.ws-fig {
  font-family: var(--wk-sans);
}

/* ---------- drawings beside the story ---------- */
.ws-draw {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 14px;
  align-items: center;
  background: var(--wk-cream);
  border: 1px solid var(--wk-line);
  border-radius: 14px;
  padding: 10px 12px;
  margin: 2px 0 16px;
}
.ws-draw .vm-sc {
  width: 112px;
  height: 92px;
}
.ws-draw p,
.ws-fig figcaption {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  color: var(--wk-ink);
  font-weight: 600;
}
.ws-fig {
  margin: 4px 0 16px;
  background: #fff;
  border: 1px solid var(--wk-line);
  border-radius: 14px;
  padding: 12px;
}
.ws-fig figcaption {
  margin-top: 8px;
  text-align: center;
}

/* ---------- tap cards: shared frame ---------- */
.ws-card {
  background: var(--wk-cream);
  border: 2px solid var(--wk-ink);
  border-radius: 18px;
  padding: 18px 14px 16px;
  margin: 30px 0 4px;
}
.ws-card > h2 {
  font: 700 23px / 1.2 var(--wk-serif);
  color: var(--wk-ink);
  margin: 0 0 6px;
  text-align: center;
}
.ws-card > p.in {
  text-align: center;
  font-size: 16px;
  line-height: 1.45;
  color: var(--wk-muted);
  margin: 0 0 14px;
}
.ws-chip {
  appearance: none;
  border: 2px solid var(--wk-ink);
  background: #fff;
  border-radius: 12px;
  padding: 9px 10px;
  min-height: 56px;
  font: 700 15px / 1.2 var(--wk-sans);
  color: var(--wk-ink);
  cursor: pointer;
  box-shadow: 0 3px 0 var(--wk-ink);
  text-align: left;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.12s,
    box-shadow 0.12s,
    background 0.12s;
}
.ws-chip:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--wk-ink);
}
.ws-chip[aria-pressed="true"] {
  background: var(--wk-mark);
}
.ws-chip:focus-visible,
.ws-go:focus-visible {
  outline: 3px solid var(--wk-green);
  outline-offset: 2px;
}
.ws-go {
  appearance: none;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  margin: 12px 0 0;
  border: 0;
  border-radius: 12px;
  background: var(--wk-green);
  color: #fff;
  font: 800 17px / 1.2 var(--wk-sans);
  box-shadow: 0 4px 0 var(--wk-green-d);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ws-go:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--wk-green-d);
}
.ws-go.red {
  background: var(--wk-red);
  box-shadow: 0 4px 0 #8f2416;
}
.ws-go[disabled] {
  opacity: 0.45;
  cursor: default;
}
.ws-line {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: 16px;
  line-height: 1.42;
  color: var(--wk-ink);
  background: #fff;
  border-radius: 10px;
  padding: 9px 11px;
  border: 1px solid var(--wk-line);
  margin: 10px 0 0;
}
.ws-line[hidden] {
  display: none;
}
.ws-line .ic {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font: 800 13px / 1 var(--wk-sans);
  margin-top: 1px;
  background: var(--wk-red);
}
.ws-line.good .ic {
  background: var(--wk-green);
}

/* habits (the dinner invite): tap what you do, then the gel crosses them off */
.hb-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.hb-chip {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 8px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hb-chip svg {
  width: 34px;
  height: 34px;
}
.hb-chip .hb-ok {
  display: none;
}
.hb-chip::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 50%;
  height: 4px;
  margin-top: -2px;
  border-radius: 2px;
  background: var(--wk-green);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.45s ease-out;
}
.hb-chip.x::after {
  transform: scaleX(1);
}
.hb-chip.x {
  background: #f1f8ef;
  color: var(--wk-muted);
}
.hb-chip.x .hb-ic {
  display: none;
}
.hb-chip.x .hb-ok {
  display: block;
}
.hb-count {
  margin: 12px 0 0;
  text-align: center;
  font: 700 17px / 1.4 var(--wk-serif);
  color: var(--wk-ink);
  min-height: 48px;
}
.hb-count b {
  color: var(--wk-red);
  font-size: 22px;
}

/* the workday ruler (the truck stop sink) */
.ws-card .va-stats .vs-row {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-height: 56px;
}
.ws-card .va-stats .vs-row b {
  min-width: 0;
  font-size: 18px;
  line-height: 1.15;
}
.dy-week {
  margin-top: 12px;
  background: #fff;
  border: 1px solid var(--wk-line);
  border-radius: 14px;
  padding: 6px 8px 2px;
}
.dy-week[hidden] {
  display: none;
}

/* the bite test (the fit is fine) */
.bt-spots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 12px;
}
.bt-spots .ws-chip {
  text-align: center;
  min-height: 48px;
}
.bt-stage {
  background: #fff;
  border: 2px solid var(--wk-ink);
  border-radius: 14px;
  overflow: hidden;
}
.bt-stage svg {
  width: 100%;
  height: auto;
  display: block;
}
.bt-acts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.bt-acts .ws-go {
  font-size: 16px;
}
.bt-hot {
  opacity: 0;
  transition: opacity 0.25s;
}
.bt-hot.on {
  opacity: 0.85;
}
.bt-stage.press .bt-plate {
  animation: bt-press 0.9s ease-in-out;
}
.bt-stage.press .bt-hot.on {
  animation: bt-flare 0.9s ease-in-out;
}
.bt-gel {
  opacity: 0;
  transition: opacity 0.6s;
}
.bt-stage.gel .bt-gel {
  opacity: 1;
}
.bt-wave {
  opacity: 0;
}
.bt-stage.gel.press .bt-wave {
  animation: bt-wave 1s ease-out;
}
.bt-stage.gel .bt-hot.on {
  opacity: 0;
}
.bt-ok {
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0);
  transition: transform 0.35s;
}
.bt-stage.gel.calm .bt-ok {
  transform: scale(1);
}
@keyframes bt-press {
  0%,
  100% {
    transform: translateY(0);
  }
  40%,
  60% {
    transform: translateY(5px);
  }
}
@keyframes bt-flare {
  0%,
  100% {
    opacity: 0.85;
    transform: scale(1);
  }
  45% {
    opacity: 1;
    transform: scale(1.7);
  }
}
@keyframes bt-wave {
  0% {
    opacity: 0.9;
    stroke-width: 6;
  }
  100% {
    opacity: 0;
    stroke-width: 26;
  }
}
.bt-hot {
  transform-box: fill-box;
  transform-origin: center;
}

.bt-t {
  font: 800 11px / 1 var(--wk-sans);
  letter-spacing: 0.1em;
  fill: var(--wk-muted);
}

/* the second set's own drawing: her price on a swinging tag */
.ws-own svg {
  width: 100%;
  height: 100%;
  display: block;
}
.ws-swing {
  transform-box: view-box;
  transform-origin: 28px 10px;
  animation: ws-swing 2.6s ease-in-out infinite;
}
@keyframes ws-swing {
  0%,
  100% {
    transform: rotate(-7deg);
  }
  50% {
    transform: rotate(7deg);
  }
}

/* the receipt (the second set) */
.rc-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.rc-items .ws-chip {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rc-items .ws-chip small {
  font: 800 13px / 1 var(--wk-sans);
  color: var(--wk-red);
}
.rc-paper {
  margin: 14px auto 0;
  max-width: 330px;
  background: #fffef9;
  padding: 18px 16px 20px;
  font:
    500 15px / 1.5 ui-monospace,
    "SF Mono",
    Menlo,
    Consolas,
    monospace;
  color: #232323;
  box-shadow: 0 6px 18px rgba(22, 32, 26, 0.12);
  position: relative;
}
.rc-paper::before,
.rc-paper::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 10px;
  background:
    linear-gradient(-45deg, transparent 5px, #fffef9 0) 0 0 / 10px 10px repeat-x,
    linear-gradient(45deg, transparent 5px, #fffef9 0) 0 0 / 10px 10px repeat-x;
}
.rc-paper::before {
  top: -9px;
  transform: rotate(180deg);
}
.rc-paper::after {
  bottom: -9px;
}
.rc-paper h3 {
  margin: 0 0 8px;
  text-align: center;
  font:
    800 14px / 1.3 ui-monospace,
    "SF Mono",
    Menlo,
    Consolas,
    monospace;
  letter-spacing: 0.08em;
}
.rc-rows {
  border-top: 1px dashed #9a9a9a;
  border-bottom: 1px dashed #9a9a9a;
  padding: 6px 0;
  min-height: 34px;
}
.rc-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  animation: rc-print 0.35s ease-out;
}
.rc-empty {
  color: #9a9a9a;
  text-align: center;
}
@keyframes rc-print {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}
.rc-total {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  font-size: 17px;
  padding-top: 8px;
}
.rc-total b {
  color: var(--wk-red);
  font-variant-numeric: tabular-nums;
}
.rc-gel {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #e6f4e2;
  color: var(--wk-green-d);
  font-weight: 800;
}
.rc-gel[hidden] {
  display: none;
}

@media (min-width: 760px) {
  .ws-beat h2 {
    font-size: 30px;
  }
  .ws-turn,
  .ws-after-band {
    margin-left: 0;
    margin-right: 0;
    border-radius: 18px;
  }
  .ws-turn {
    border: 3px solid var(--wk-ink);
    padding: 28px 26px 12px;
  }
  .hb-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .bt-spots {
    grid-template-columns: repeat(4, 1fr);
  }
  .rc-items {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (prefers-reduced-motion: reduce) {
  .bt-stage.press .bt-plate,
  .bt-stage.press .bt-hot.on,
  .bt-stage.gel.press .bt-wave,
  .rc-row,
  .ws-swing {
    animation: none;
  }
  .hb-chip::after {
    transition: none;
  }
}
