/* CVS v3 — break room. Scoped under .br; uses tokens from core.css only. */

.br {
  --bg: var(--hl-mint);
  --fg: var(--ink);
  --accent: var(--hl-pink);
  --hl: var(--hl-yellow);
  --shadow: var(--ink);
  --bw: 3px;
  --top: max(12px, env(safe-area-inset-top));
  --bot: max(14px, env(safe-area-inset-bottom));
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 360px;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-display);
  font-weight: 800;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  overscroll-behavior: contain;
  isolation: isolate;
}
.br[data-mode="facts"] { --shadow: var(--hl-yellow); }
.br *, .br *::before, .br *::after { box-sizing: border-box; }
:where(.br) button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  margin: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
:where(.br) button:focus-visible { outline: 3px dashed var(--ink); outline-offset: 4px; }
.br[data-mode="facts"] .br-field button:focus-visible { outline-color: var(--paper); }

/* ---------- stages ---------- */
.br-stage { position: absolute; inset: 0; overflow: hidden; }
.br-stage[hidden] { display: none; }
.br-stage--flick { background: var(--hl-mint); }
.br-stage--moods { background: var(--hl-pink); }
.br-stage--facts { background: var(--ink); color: var(--paper); }
.br-stage.is-enter { animation: br-flood .5s cubic-bezier(.3, .8, .3, 1) both; }
@keyframes br-flood {
  from { clip-path: circle(0 at var(--ox, 50%) var(--oy, 0)); }
  to { clip-path: circle(150vmax at var(--ox, 50%) var(--oy, 0)); }
}

.br-aside {
  position: absolute;
  z-index: 4;
  left: max(18px, calc(50% - 272px));
  top: calc(var(--top) + 70px);
  margin: 0;
  font-family: var(--f-hand);
  font-weight: 700;
  font-size: clamp(22px, 5.6vw, 29px);
  line-height: 1;
  transform: rotate(-2.5deg);
  transform-origin: left center;
  pointer-events: none;
  white-space: nowrap;
}

/* ---------- tabs ---------- */
.br-tabs {
  position: absolute;
  z-index: 10;
  top: var(--top);
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% - 24px), 560px);
  display: flex;
  gap: 10px;
}
.br-tab {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 52px;
  padding: 0 6px;
  border: var(--bw) solid var(--ink);
  border-radius: 14px 5px 14px 5px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 800;
  font-size: clamp(17px, 4.6vw, 24px);
  letter-spacing: -.02em;
  line-height: 1;
  text-transform: uppercase;
  box-shadow: 3px 4px 0 var(--shadow);
  transform: rotate(var(--tr));
  transition: transform .3s cubic-bezier(.3, 1.7, .5, 1), box-shadow .2s, background-color .2s;
  animation: br-drop .55s cubic-bezier(.3, 1.6, .5, 1) backwards;
  animation-delay: calc(var(--i) * 70ms);
}
.br-tab:nth-child(1) { --tr: -2deg; --tc: var(--hl-yellow); }
.br-tab:nth-child(2) { --tr: 1.4deg; --tc: var(--hl-mint); }
.br-tab:nth-child(3) { --tr: -1deg; --tc: var(--hl-pink); }
.br-tab svg { width: 1em; height: 1em; flex: none; }
.br-tab[aria-selected="true"] {
  background: var(--tc);
  transform: translateY(-3px) rotate(calc(var(--tr) * 1.7)) scale(1.05);
  box-shadow: 5px 7px 0 var(--shadow);
}
.br-tab:active { transform: translate(2px, 3px) rotate(var(--tr)); box-shadow: 1px 1px 0 var(--shadow); transition-duration: .08s; }
@keyframes br-drop {
  from { transform: translateY(-70px) rotate(-12deg); }
}

/* ---------- shared buttons ---------- */
.br-btn {
  border: var(--bw) solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -.01em;
  line-height: 1;
  padding: 12px 18px 13px;
  box-shadow: 3px 4px 0 var(--ink);
  transition: transform .12s, box-shadow .12s;
  white-space: nowrap;
}
.br-btn--go { background: var(--hl-yellow); }
.br-btn--ink { background: var(--ink); color: var(--hl-yellow); }
.br-btn:active { transform: translate(2px, 3px); box-shadow: 1px 1px 0 var(--ink); }

/* ---------- FLICK ---------- */
.br-cv {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
}
.br-cv.is-grabbing { cursor: grabbing; }
.br-hint {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%) rotate(-4deg);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: opacity .5s, transform .6s cubic-bezier(.5, 0, .7, .4);
  animation: br-bob 2.6s ease-in-out infinite;
}
.br-hint span {
  font-family: var(--f-hand);
  font-weight: 700;
  font-size: clamp(28px, 7.5vw, 40px);
  line-height: 1;
  background: var(--hl-yellow);
  border: 2px solid var(--ink);
  padding: 4px 14px 6px;
  box-shadow: 3px 3px 0 var(--ink);
  white-space: nowrap;
}
.br-hint svg { width: 74px; height: 42px; margin-top: 4px; margin-left: 70px; transform: scaleY(-1); }
.br-hint.is-gone { opacity: 0; transform: translate(-50%, -80%) rotate(-10deg) scale(.8); animation: none; }
@keyframes br-bob {
  0%, 100% { margin-top: 0; }
  50% { margin-top: -8px; }
}
.br-pops {
  position: absolute;
  z-index: 5;
  left: 14px;
  bottom: calc(var(--bot) + 11px);
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  white-space: nowrap;
}
.br-pops-n {
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 15px;
  line-height: 1;
  background: var(--ink);
  color: var(--hl-mint);
  padding: 6px 8px;
  transform: rotate(-3deg);
}
.br-pops-n.is-bump { animation: br-bump .35s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes br-bump { 40% { transform: rotate(4deg) scale(1.25); } }
.br-pops-l { font-family: var(--f-hand); font-weight: 700; font-size: 21px; line-height: 1; }

/* ---------- MOODS ---------- */
.br-moods {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: calc(var(--top) + 116px) 22px calc(var(--bot) + 76px);
}
.br-deck {
  position: relative;
  width: min(100%, 540px);
  flex: 0 1 480px;
  min-height: 300px;
}
.br-deck-u { position: absolute; inset: 0; border: var(--bw) solid var(--ink); }
.br-deck-u:nth-child(1) { background: var(--u2, var(--hl-yellow)); transform: translate(10px, 8px) rotate(4deg); }
.br-deck-u:nth-child(2) { background: var(--u1, var(--paper)); transform: translate(-8px, 6px) rotate(-3.2deg); }
.br-card {
  --card-hl: var(--hl-yellow);
  --tape: var(--hl-yellow);
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: clamp(20px, 5.5vw, 36px);
  border: var(--bw) solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 8px 10px 0 var(--ink);
  transform: rotate(-1deg);
  touch-action: none;
  cursor: grab;
  will-change: transform;
}
.br-card:active { cursor: grabbing; }
.br-card.is-snap { transition: transform .42s cubic-bezier(.3, 1.6, .5, 1); }
.br-card.is-out { transition: transform .26s cubic-bezier(.6, 0, .9, .5); }
.br-card.is-hold { transition: none; }
.br-card::before {
  content: "";
  position: absolute;
  top: -17px;
  left: 50%;
  width: 118px;
  height: 32px;
  margin-left: -59px;
  background: var(--tape);
  border: 2px solid var(--ink);
  transform: rotate(-4deg);
  clip-path: polygon(0 8%, 6% 0, 12% 8%, 18% 0, 24% 8%, 30% 0, 36% 8%, 42% 0, 48% 8%, 54% 0, 60% 8%, 66% 0, 72% 8%, 78% 0, 84% 8%, 90% 0, 96% 8%, 100% 0, 100% 92%, 94% 100%, 88% 92%, 82% 100%, 76% 92%, 70% 100%, 64% 92%, 58% 100%, 52% 92%, 46% 100%, 40% 92%, 34% 100%, 28% 92%, 22% 100%, 16% 92%, 10% 100%, 4% 92%, 0 100%);
}
.br-card.is-alt { transform: rotate(1.2deg); }
.br-card.is-alt::before { left: 22%; transform: rotate(6deg); }
.br-card[data-th="yellow"] { background: var(--hl-yellow); --card-hl: var(--hl-pink); --tape: var(--hl-mint); }
.br-card[data-th="ink"] { background: var(--ink); color: var(--paper); --card-hl: var(--hl-pink); --tape: var(--hl-yellow); }
.br-card[data-th="mint"] { background: var(--hl-mint); --card-hl: var(--hl-yellow); --tape: var(--hl-pink); }
.br-card[data-th="orange"] { background: var(--hl-orange); --card-hl: var(--paper); --tape: var(--hl-yellow); }
.br-card[data-th="blue"] { background: var(--hl-blue); color: var(--paper); --card-hl: var(--ink); --tape: var(--hl-yellow); }
.br-card[data-th="violet"] { background: var(--hl-violet); --card-hl: var(--hl-yellow); --tape: var(--hl-mint); }
.br-card[data-th="ink"] mark { color: var(--ink); }
.br-card[data-th="blue"] mark { color: var(--hl-yellow); }
.br-card-kick {
  align-self: flex-start;
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1;
  background: var(--ink);
  color: var(--paper);
  padding: 6px 9px;
  transform: rotate(-1.5deg);
}
.br-card[data-th="ink"] .br-card-kick { background: var(--paper); color: var(--ink); }
.br-card-no {
  position: absolute;
  top: clamp(20px, 5.5vw, 36px);
  right: clamp(20px, 5.5vw, 36px);
  font-family: var(--f-mono);
  font-weight: 400;
  font-size: 13px;
  line-height: 1;
}
.br-card-big {
  margin: auto 0;
  padding: 14px 0;
  font-weight: 800;
  font-size: calc(var(--fs, 1) * clamp(38px, 11.6vw, 64px));
  line-height: .98;
  letter-spacing: -.035em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.br-card.is-alt .br-card-big { text-align: right; }
.br-card-big mark {
  background: var(--card-hl);
  color: inherit;
  padding: 0 .1em;
  margin: 0 -.04em;
  border-radius: .12em .3em .14em .26em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.br-card-big s { text-decoration-color: var(--art); text-decoration-thickness: .12em; }
.br-card[data-th="blue"] .br-card-big s, .br-card[data-th="ink"] .br-card-big s { text-decoration-color: var(--hl-yellow); }
.br-card-hand {
  margin: 0;
  align-self: flex-end;
  max-width: 90%;
  display: flex;
  align-items: flex-start;
  gap: 4px;
  font-family: var(--f-hand);
  font-weight: 700;
  font-size: clamp(24px, 6.6vw, 34px);
  line-height: 1;
  text-align: right;
  transform: rotate(-2.5deg);
}
.br-card-hand svg { width: 42px; height: 32px; flex: none; margin-top: -18px; }
.br-card.is-alt .br-card-hand { align-self: flex-start; text-align: left; flex-direction: row-reverse; transform: rotate(2deg); }
.br-card.is-alt .br-card-hand svg { transform: scaleX(-1); }
.br-mctl { display: flex; align-items: center; gap: 10px; flex: none; }
.br-mcount {
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 14px;
  line-height: 1;
  background: var(--ink);
  color: var(--hl-pink);
  padding: 8px 9px;
  transform: rotate(-3deg);
}

/* ---------- FACTS ---------- */
.br-field { position: absolute; inset: 0; touch-action: none; }
.br-stk {
  --sc: var(--hl-yellow);
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 10px 16px;
  text-align: center;
  color: var(--ink);
  background: var(--sc);
  border: 2.5px solid var(--ink);
  border-radius: 8px;
  box-shadow: 0 0 0 5px var(--paper);
  cursor: grab;
  will-change: transform;
  touch-action: none;
  transform-origin: 50% 50%;
}
.br-stk.is-dk { color: var(--paper); }
.br-stk.is-drag { cursor: grabbing; box-shadow: 0 0 0 5px var(--paper), 8px 12px 0 5px var(--hl-pink); }
.br-stk-no { font-family: var(--f-mono); font-weight: 500; font-size: 11px; letter-spacing: .05em; line-height: 1; opacity: .85; }
.br-stk-t { font-weight: 800; line-height: 1; letter-spacing: -.02em; text-wrap: balance; }
.br-stk--circle { border-radius: 50%; padding: 14px; }
.br-stk--pill { border-radius: 999px; padding: 8px 22px; }
.br-stk--tape { border-radius: 3px; }
.br-stk--tape::before {
  content: "";
  position: absolute;
  top: -16px;
  left: 50%;
  width: 56%;
  height: 24px;
  margin-left: -28%;
  background: var(--paper);
  border: 2px solid var(--ink);
  transform: rotate(-5deg);
}
.br-stk--tag { border-radius: 10px 999px 999px 10px; padding-left: 34px; }
.br-stk--tag::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border-radius: 50%;
  background: var(--ink);
  border: 3px solid var(--paper);
}
.br-stk--ticket { border-radius: 4px; padding: 10px 26px; }
.br-stk--ticket::before, .br-stk--ticket::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 5px var(--paper);
}
.br-stk--ticket::before { left: -14px; clip-path: inset(-6px -6px -6px 50%); }
.br-stk--ticket::after { right: -14px; clip-path: inset(-6px 50% -6px -6px); }
.br-stk-read {
  position: absolute;
  top: -12px;
  right: -8px;
  display: none;
  font-family: var(--f-hand);
  font-weight: 700;
  font-size: 19px;
  line-height: 1;
  color: var(--art);
  background: var(--paper);
  border: 2px solid var(--art);
  padding: 1px 7px 3px;
  transform: rotate(12deg);
}
.br-stk.is-read .br-stk-read { display: block; }
.br-fcount {
  position: absolute;
  z-index: 5;
  left: 16px;
  bottom: calc(var(--bot) + 12px);
  font-family: var(--f-mono);
  font-weight: 400;
  font-size: 14px;
  line-height: 1;
  color: var(--paper);
  pointer-events: none;
}
.br-fcount b { font-weight: 500; background: var(--hl-yellow); color: var(--ink); padding: 3px 6px; margin-right: 2px; }

.br-fopen {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: calc(var(--top) + 76px) 20px calc(var(--bot) + 74px);
}
.br-fopen[hidden] { display: none; }
.br-fopen-bg { position: absolute; inset: 0; background: color-mix(in srgb, var(--ink) 80%, transparent); }
.br-fcard { --sc: var(--hl-yellow); position: relative; width: min(100%, 470px); perspective: 1400px; }
.br-fcard-in { display: grid; transform-style: preserve-3d; transform: rotateY(180deg); }
.br-fface {
  grid-area: 1 / 1;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border: var(--bw) solid var(--ink);
  box-shadow: 0 0 0 6px var(--paper);
  padding: 26px 24px 22px;
}
.br-fface--front {
  background: var(--sc);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  border-radius: 10px;
}
.br-fcard.is-dk .br-fface--front { color: var(--paper); }
.br-ff-t { font-weight: 800; font-size: clamp(30px, 8vw, 44px); line-height: 1; letter-spacing: -.03em; }
.br-fface--back {
  transform: rotateY(180deg);
  background: var(--paper);
  color: var(--ink);
  border-radius: 4px;
}
.br-fface--back::before {
  content: "";
  position: absolute;
  top: -15px;
  right: 30px;
  width: 92px;
  height: 28px;
  background: var(--sc);
  border: 2px solid var(--ink);
  transform: rotate(7deg);
}
.br-f-no {
  display: inline-block;
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1;
  background: var(--ink);
  color: var(--paper);
  padding: 6px 9px;
  transform: rotate(-1.5deg);
}
.br-f-text {
  margin: 16px 0 18px;
  font-family: var(--f-quote);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(27px, 7vw, 36px);
  line-height: 1.08;
  letter-spacing: -.005em;
  -webkit-user-select: text;
  user-select: text;
}
.br-f-src {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-top: 12px;
  border-top: 2px dashed var(--ink);
  font-family: var(--f-mono);
  font-weight: 400;
  font-size: 13px;
  line-height: 1.35;
}
.br-f-src span { font-family: var(--f-hand); font-weight: 700; font-size: 21px; color: var(--art); flex: none; }
.br-f-src b { font-weight: 500; }
.br-f-act { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* ---------- timer + nudge ---------- */
.br-timer {
  position: absolute;
  z-index: 10;
  right: 14px;
  bottom: var(--bot);
  display: flex;
  align-items: center;
  gap: 7px;
  height: 52px;
  padding: 0 14px 0 8px;
  border: var(--bw) solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 3px 4px 0 var(--shadow);
  cursor: default;
}
.br-timer.is-done { background: var(--hl-yellow); cursor: pointer; }
.br-timer svg { width: 30px; height: 30px; transform: rotate(-90deg); flex: none; }
.br-ring-bg { fill: none; stroke: var(--ink); stroke-width: 2; stroke-dasharray: 2 3.2; }
.br-ring { fill: none; stroke: var(--hl-pink); stroke-width: 7; transition: stroke-dashoffset .25s linear; }
.br-timer-t { font-family: var(--f-mono); font-weight: 500; font-size: 16px; line-height: 1; }
.br-timer-l { font-family: var(--f-hand); font-weight: 700; font-size: 21px; line-height: 1; }

.br-nudge {
  position: absolute;
  z-index: 30;
  left: 50%;
  bottom: calc(var(--bot) + 68px);
  width: min(calc(100% - 32px), 390px);
  padding: 16px 18px 18px;
  background: var(--hl-yellow);
  color: var(--ink);
  border: var(--bw) solid var(--ink);
  box-shadow: 6px 8px 0 var(--shadow);
  transform: translateX(-50%) rotate(-1.5deg);
}
.br-nudge[hidden] { display: none; }
.br-nudge.is-in { animation: br-nudge-in .65s cubic-bezier(.3, 1.5, .5, 1) both; }
@keyframes br-nudge-in {
  from { transform: translate(-50%, 160%) rotate(8deg); }
  to { transform: translateX(-50%) rotate(-1.5deg); }
}
.br-nudge-h { margin: 0; font-weight: 800; font-size: 34px; letter-spacing: -.035em; line-height: 1; }
.br-nudge-p { margin: 6px 40px 14px 0; font-family: var(--f-hand); font-weight: 700; font-size: 23px; line-height: 1.02; }
.br-nudge-a { display: flex; flex-wrap: wrap; gap: 10px; }
.br-nudge-x {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 38px;
  height: 38px;
  padding: 8px;
  border: 0;
  background: none;
}
.br-nudge-x svg { width: 100%; height: 100%; display: block; }

/* ---------- small screens ---------- */
@media (min-width: 900px) {
  .br-tabs { width: 620px; gap: 14px; }
  .br-tab { height: 62px; font-size: 27px; }
  .br-aside { top: calc(var(--top) + 82px); left: calc(50% - 300px); }
  .br-moods { padding-top: calc(var(--top) + 128px); }
  .br-deck { width: 620px; }
  .br-card-big { font-size: calc(var(--fs, 1) * 74px); }
}
@media (max-width: 480px) {
  .br-pops-x { display: none; }
  .br-deck { flex-basis: 440px; }
  .br-timer-l { display: none; }
  .br-timer { padding-right: 12px; }
  .br-btn { font-size: 17px; padding: 11px 15px 12px; }
}
@media (max-width: 360px) {
  .br-pops-l { display: none; }
}
@media (max-height: 640px) {
  .br-moods { padding-top: calc(var(--top) + 100px); gap: 16px; }
  .br-card-big { font-size: calc(var(--fs, 1) * clamp(28px, 8vw, 50px)); }
}

/* ---------- calm variant ---------- */
@media (prefers-reduced-motion: reduce) {
  .br *, .br *::before, .br *::after { animation: none !important; transition: none !important; }
}
.br--calm .br-hint { animation: none; }
