/* Party 18+: drink calls as moments.
   - .dk-who        one player's sticker: their piece, name, and the sips as glasses (or tally marks)
   - .dk-crash      the slump notice: a CRASH! burst and who drinks for it
   - .dk-memo       the Market News notice: a drinks memo with a pager strip
   - .dk-tab        the round summary: the bar tab, a receipt of the round's drinks
   - .dk-call       the floating call over the table for everything else; a compact strip on phones
   Paper and cobalt are the mains, flamingo the accent (fill only, never text). */

/* ---------- a player's sticker ---------- */
[data-theme="party"]:not(.home) .dk-who { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 8px; row-gap: 2px; align-items: center; padding: 6px 10px 6px 6px; background: var(--pt-paper); color: var(--pt-ink); border: 2px solid var(--pt-ink); box-shadow: 3px 3px 0 var(--pcol, var(--pt-ink)); min-width: 0; transform: rotate(var(--tilt, 0deg)); }
[data-theme="party"]:not(.home) .dk-who .ptoken { grid-row: span 2; width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--pt-ink); background: var(--pcol); overflow: hidden; display: block; }
[data-theme="party"]:not(.home) .dk-who .ptoken img { display: block; width: 100%; height: 100%; object-fit: contain; }
[data-theme="party"]:not(.home) .dk-who .dk-name { font: 700 14px/1.15 var(--f-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[data-theme="party"]:not(.home) .dk-who .dk-n { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; min-height: 22px; }
[data-theme="party"]:not(.home) .dk-who .dk-n svg { height: 20px; width: auto; flex: 0 0 auto; }
[data-theme="party"]:not(.home) .dk-who .dk-n b { font: 400 13px/1 var(--f-display); margin-left: 2px; white-space: nowrap; }
[data-theme="party"]:not(.home) .dk-who.shot { background: var(--pt-pink-tint); }
[data-theme="party"]:not(.home) .dk-who .dk-why { grid-column: 1 / -1; font: 500 12px/1.3 var(--f-body); color: var(--pt-muted); margin: 2px 0 0; }
[data-theme="party"]:not(.home) .dk-row { display: flex; flex-wrap: wrap; gap: 10px 10px; margin: 0; padding: 0; list-style: none; }
[data-theme="party"]:not(.home) .dk-row > li { display: contents; }
[data-theme="party"]:not(.home) .dk-row .dk-who:nth-child(3n+1) { --tilt: -1.5deg; }
[data-theme="party"]:not(.home) .dk-row .dk-who:nth-child(3n+2) { --tilt: 1deg; }

/* ---------- slump: CRASH! ---------- */
[data-theme="party"]:not(.home) .dk-crash { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 4px 14px; align-items: center; margin-top: 4px; padding: 10px 12px 12px 6px; border: var(--pt-line) solid var(--pt-ink); background: var(--pt-tint) var(--tex-squiggle, none) 0 100% / 24px 12px repeat-x; position: relative; }
[data-theme="party"]:not(.home) .dk-crash .dk-burst { width: 104px; height: 104px; grid-row: span 2; margin: -22px 0 -16px -14px; }
[data-theme="party"]:not(.home) .dk-crash .dk-burst svg { width: 100%; height: 100%; display: block; }
[data-theme="party"]:not(.home) .dk-crash .dk-head { margin: 0; font: 400 18px/1.1 var(--f-display); color: var(--pt-ink); }
[data-theme="party"]:not(.home) .dk-crash .dk-head small { display: block; font: 400 17px/1.2 var(--f-hand); color: var(--pt-cobalt); letter-spacing: 0; margin-top: 2px; }
[data-theme="party"]:not(.home) .dk-crash .dk-row { grid-column: 2; }
[data-theme="party"]:not(.home) .dk-crash.in .dk-burst { animation: dkSlap .5s cubic-bezier(.2, 1.6, .4, 1) both; }
[data-theme="party"]:not(.home) .dk-crash.in .dk-who { animation: dkPop .35s cubic-bezier(.2, 1.6, .4, 1) both; animation-delay: calc(.25s + var(--k, 0) * 90ms); }
@keyframes dkSlap { 0% { transform: scale(2.4) rotate(-20deg); opacity: 0; } 60% { transform: scale(.92) rotate(2deg); opacity: 1; } 100% { transform: none; } }
@keyframes dkPop { from { transform: scale(.4) rotate(-8deg); opacity: 0; } }

/* in a notice the heading already says why; a sticker keeps its reason only when it has more than one (a buddy's echo) */
[data-theme="party"]:not(.home) :is(.dk-crash, .dk-memo) .dk-who:not(.multi) .dk-why { display: none; }

/* the other bits of a roll: a one, a bust */
[data-theme="party"]:not(.home) .dk-also { display: grid; gap: 8px; margin-top: 4px; padding-top: 8px; border-top: 2px dashed var(--pt-ink); }
[data-theme="party"]:not(.home) .dk-also > p { margin: 0; font: 400 14px/1 var(--f-display); }

/* ---------- Market News: the drinks memo ---------- */
[data-theme="party"]:not(.home) .dk-memo { margin-top: 4px; border: var(--pt-line) solid var(--pt-ink); background: var(--pt-paper); box-shadow: 5px 5px 0 var(--pt-cobalt); position: relative; transform: rotate(-.6deg); }
[data-theme="party"]:not(.home) .dk-memo::before { content: ""; position: absolute; top: -9px; left: 50%; width: 76px; height: 16px; margin-left: -38px; background: var(--pt-pink); border: 2px solid var(--pt-ink); transform: rotate(3deg); opacity: .95; }
[data-theme="party"]:not(.home) .dk-memo .dk-pager { display: flex; align-items: center; gap: 10px; padding: 9px 12px 8px; background: var(--pt-cobalt); color: var(--pt-paper); border-bottom: var(--pt-line) solid var(--pt-ink); }
[data-theme="party"]:not(.home) .dk-memo .dk-pager b { font: 400 16px/1 var(--f-display); letter-spacing: .02em; }
[data-theme="party"]:not(.home) .dk-memo .dk-pager .dk-lcd { margin-left: auto; font: 700 12px/1 var(--f-body); letter-spacing: .08em; text-transform: uppercase; background: var(--pt-tint); color: var(--pt-ink); border: 2px solid var(--pt-ink); padding: 4px 6px; white-space: nowrap; }
[data-theme="party"]:not(.home) .dk-memo .dk-pager svg { width: 22px; height: 22px; flex: 0 0 auto; }
[data-theme="party"]:not(.home) .dk-memo .dk-body { padding: 10px 12px 12px; display: grid; gap: 10px; background: repeating-linear-gradient(transparent 0 27px, rgba(46, 63, 232, .14) 27px 28px); }
[data-theme="party"]:not(.home) .dk-memo .dk-re { margin: 0; font: 400 19px/1.15 var(--f-hand); color: var(--pt-ink); }
[data-theme="party"]:not(.home) .dk-memo .dk-re span { font: 700 12px/1 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--pt-muted); margin-right: 6px; }
[data-theme="party"]:not(.home) .dk-memo.in { animation: dkMemo .45s var(--pt-ease, ease) both; }
@keyframes dkMemo { from { transform: translateY(14px) rotate(-3deg); opacity: 0; } }

/* ---------- round end: the bar tab ---------- */
[data-theme="party"]:not(.home) .dk-tab { --edge: 10px; width: min(400px, 100%); margin: 14px auto 4px; padding: 16px 16px calc(14px + var(--edge)); background: #fff; color: var(--pt-ink); border: 2px solid var(--pt-ink); border-bottom: 0; position: relative; box-shadow: 6px 6px 0 var(--pt-pink); transform: rotate(.6deg);
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - var(--edge)) no-repeat, conic-gradient(from 135deg at 50% 0, #000 90deg, #0000 0) bottom / 20px var(--edge) repeat-x;
  mask: linear-gradient(#000 0 0) top / 100% calc(100% - var(--edge)) no-repeat, conic-gradient(from 135deg at 50% 0, #000 90deg, #0000 0) bottom / 20px var(--edge) repeat-x; }
[data-theme="party"]:not(.home) .dk-tab .dk-tab-head { display: grid; justify-items: center; gap: 2px; padding-bottom: 10px; border-bottom: 2px dashed var(--pt-ink); text-align: center; }
[data-theme="party"]:not(.home) .dk-tab .dk-tab-head b { font: 400 24px/1 var(--f-display); letter-spacing: .04em; }
[data-theme="party"]:not(.home) .dk-tab .dk-tab-head span { font: 700 12px/1.2 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--pt-muted); }
[data-theme="party"]:not(.home) .dk-tab ol { list-style: none; margin: 0; padding: 8px 0; display: grid; gap: 4px; border-bottom: 2px dashed var(--pt-ink); }
[data-theme="party"]:not(.home) .dk-tab li { display: grid; grid-template-columns: 30px auto minmax(12px, 1fr) auto; align-items: center; gap: 8px; min-height: 40px; }
[data-theme="party"]:not(.home) .dk-tab li .ptoken { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--pt-ink); background: var(--pcol); overflow: hidden; display: block; }
[data-theme="party"]:not(.home) .dk-tab li .ptoken img { display: block; width: 100%; height: 100%; object-fit: contain; }
[data-theme="party"]:not(.home) .dk-tab li .dk-name { font: 700 15px/1.2 var(--f-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 11ch; }
[data-theme="party"]:not(.home) .dk-tab li .dk-lead { border-bottom: 2px dotted var(--pt-ink); height: 0; align-self: center; margin-top: 8px; opacity: .55; }
[data-theme="party"]:not(.home) .dk-tab li .dk-n { display: flex; align-items: center; gap: 3px; justify-content: flex-end; }
[data-theme="party"]:not(.home) .dk-tab li .dk-n svg { height: 20px; width: auto; }
[data-theme="party"]:not(.home) .dk-tab li .dk-n b { font: 400 14px/1 var(--f-display); min-width: 5.5ch; text-align: right; }
[data-theme="party"]:not(.home) .dk-tab li.dry .dk-n b { font: 400 17px/1 var(--f-hand); color: var(--pt-muted); }
[data-theme="party"]:not(.home) .dk-tab li.top { background: var(--pt-pink-tint); margin: 0 -8px; padding: 0 8px; }
[data-theme="party"]:not(.home) .dk-tab li .dk-game { grid-column: 2 / -1; margin-top: -6px; font: 700 12px/1.3 var(--f-body); color: var(--pt-muted); text-align: right; }
[data-theme="party"]:not(.home) .dk-tab .dk-most { display: grid; justify-items: center; gap: 2px; margin: 10px 0 2px; padding: 10px 12px; background: var(--pt-pink); color: var(--pt-ink); border: 2px solid var(--pt-ink); text-align: center; }
[data-theme="party"]:not(.home) .dk-tab .dk-most-k { font: 700 12px/1.2 var(--f-body); letter-spacing: .1em; text-transform: uppercase; }
[data-theme="party"]:not(.home) .dk-tab .dk-most b { font: 400 26px/1.05 var(--f-display); overflow-wrap: anywhere; }
[data-theme="party"]:not(.home) .dk-tab .dk-most-n { font: 700 15px/1.2 var(--f-body); }
[data-theme="party"]:not(.home) .dk-tab .dk-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 8px; font: 400 16px/1 var(--f-display); }
[data-theme="party"]:not(.home) .dk-tab .dk-note { margin: 6px 0 0; text-align: center; font: 400 18px/1.2 var(--f-hand); color: var(--pt-cobalt); }
[data-theme="party"]:not(.home) .dk-tab .dk-stamp { position: absolute; top: 10px; right: 10px; font: 400 12px/1 var(--f-display); padding: 5px 7px; border: 2px solid var(--pt-ink); background: var(--pt-pink); color: var(--pt-ink); transform: rotate(8deg); }
[data-theme="party"]:not(.home) .dk-tab.in { animation: dkTab .5s var(--pt-ease, ease) both; }
@keyframes dkTab { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 -20px 0); } }

/* ---------- the floating call over the table ---------- */
[data-theme="party"]:not(.home) .drink-calls { pointer-events: none; }
[data-theme="party"]:not(.home) .drink-call.dk-call { pointer-events: auto; background: var(--pt-paper); padding: 0 10px 10px; border-top-width: var(--pt-line); box-shadow: 6px 6px 0 var(--pt-pink); }
[data-theme="party"]:not(.home) .drink-call.dk-call::after { display: none; }
[data-theme="party"]:not(.home) .dk-call .dk-top { display: flex; align-items: center; gap: 8px; margin: 0 -10px 10px; padding: 0 0 0 4px; background: var(--pt-cobalt); color: var(--pt-paper); border-bottom: var(--pt-line) solid var(--pt-ink); min-height: 44px; }
[data-theme="party"]:not(.home) .dk-call .dk-top .dk-burst { width: 54px; height: 54px; margin: -10px -4px -10px -12px; flex: 0 0 auto; }
[data-theme="party"]:not(.home) .dk-call .dk-top .dk-burst svg { width: 100%; height: 100%; display: block; }
[data-theme="party"]:not(.home) .dk-call .dk-top b { font: 400 16px/1.1 var(--f-display); flex: 1; min-width: 0; }
[data-theme="party"]:not(.home) .dk-call .dk-top b small { display: block; font: 600 12px/1.2 var(--f-body); letter-spacing: .02em; opacity: .95; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[data-theme="party"]:not(.home) .dk-call .dk-more { align-self: stretch; min-width: 44px; min-height: 44px; padding: 0 10px; border: 0; border-left: var(--pt-line) solid var(--pt-ink); background: var(--pt-paper); color: var(--pt-ink); font: 700 13px/1 var(--f-body); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
[data-theme="party"]:not(.home) .dk-call .dk-more::after { content: ""; width: 8px; height: 8px; border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); }
[data-theme="party"]:not(.home) .dk-call .dk-more[aria-expanded="true"]::after { transform: rotate(-135deg) translate(-2px, -2px); }
[data-theme="party"]:not(.home) .dk-call .dk-more:focus-visible { outline: 3px solid var(--pt-pink); outline-offset: -3px; }
[data-theme="party"]:not(.home) .dk-call .dk-row { gap: 8px; }
[data-theme="party"]:not(.home) .dk-call .dk-who .dk-why { display: none; }
[data-theme="party"]:not(.home) .dk-call.open .dk-who .dk-why { display: block; }
[data-theme="party"]:not(.home) .dk-call.open .dk-who { flex: 1 1 100%; }
[data-theme="party"]:not(.home) .dk-call .dk-extra { margin: 8px 0 0; font: 500 12px/1.3 var(--f-body); color: var(--pt-muted); }
[data-theme="party"]:not(.home) .dk-call.cat-crash .dk-top { background: var(--pt-ink); }
[data-theme="party"]:not(.home) .dk-call.cat-news .dk-top { background: var(--pt-cobalt); }
[data-theme="party"]:not(.home) .dk-call.cat-give { box-shadow: 6px 6px 0 var(--pt-cobalt); }

/* phones: a compact strip of stickers along the bottom of the table; tap the arrow for why */
@media (max-width: 820px) {
  [data-theme="party"]:not(.home) .drink-calls { top: auto; bottom: 56px; left: 8px; right: 8px; width: auto; gap: 6px; }
  [data-theme="party"]:not(.home) .drink-calls > .drink-call:nth-child(n+3) { display: none; }
  [data-theme="party"]:not(.home) .drink-call.dk-call { padding: 0 8px 8px; box-shadow: 4px 4px 0 var(--pt-pink); }
  [data-theme="party"]:not(.home) .dk-call .dk-top { margin: 0 -8px 8px; }
  [data-theme="party"]:not(.home) .dk-call:not(.open) .dk-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 2px 4px 5px 2px; }
  [data-theme="party"]:not(.home) .dk-call:not(.open) .dk-row::-webkit-scrollbar { display: none; }
  [data-theme="party"]:not(.home) .dk-call:not(.open) .dk-who { flex: 0 0 auto; padding: 4px 8px 4px 4px; }
  [data-theme="party"]:not(.home) .dk-call .dk-who .ptoken { width: 30px; height: 30px; }
  [data-theme="party"]:not(.home) .dk-call .dk-who .dk-name { font-size: 13px; max-width: 9ch; }
  [data-theme="party"]:not(.home) .dk-call.open .dk-row { max-height: 40dvh; overflow-y: auto; }
  /* a notice owns the bottom of the table: the strip steps aside while it's up */
  [data-theme="party"]:not(.home) .stage:has(> .notice:not([hidden])) > .drink-calls { display: none; }
}
@media (max-width: 600px) {
  [data-theme="party"]:not(.home) .dk-crash { grid-template-columns: 76px minmax(0, 1fr); padding: 8px 10px 10px 4px; gap: 4px 10px; }
  [data-theme="party"]:not(.home) .dk-crash .dk-burst { width: 82px; height: 82px; margin: -18px 0 -12px -10px; }
  [data-theme="party"]:not(.home) .dk-crash .dk-head { font-size: 15px; }
  [data-theme="party"]:not(.home) .dk-crash .dk-head small { font-size: 15px; }
  [data-theme="party"]:not(.home) .dk-crash .dk-row, [data-theme="party"]:not(.home) .dk-memo .dk-row, [data-theme="party"]:not(.home) .dk-also .dk-row { gap: 6px; }
  [data-theme="party"]:not(.home) .notice .dk-who { padding: 4px 8px 4px 4px; }
  [data-theme="party"]:not(.home) .notice .dk-who .ptoken { width: 28px; height: 28px; }
  [data-theme="party"]:not(.home) .notice .dk-who .dk-name { font-size: 13px; max-width: 9ch; }
  [data-theme="party"]:not(.home) .notice .dk-who .dk-n svg { height: 17px; }
  [data-theme="party"]:not(.home) .dk-memo .dk-pager .dk-lcd { display: none; }
  [data-theme="party"]:not(.home) .dk-memo .dk-re { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  [data-theme="party"]:not(.home) .dk-crash.in .dk-burst, [data-theme="party"]:not(.home) .dk-crash.in .dk-who,
  [data-theme="party"]:not(.home) .dk-memo.in, [data-theme="party"]:not(.home) .dk-tab.in,
  [data-theme="party"]:not(.home) .drink-call.dk-call, [data-theme="party"]:not(.home) .drink-call.dk-call:not(.out) { animation: none; }
  [data-theme="party"]:not(.home) .dk-who, [data-theme="party"]:not(.home) .dk-memo, [data-theme="party"]:not(.home) .dk-tab { transform: none; }
  [data-theme="party"]:not(.home) .drink-call.dk-call.out { transform: none; }
}

/* the crash leads the slump notice, straight under its kicker */
[data-theme="party"]:not(.home) .notice:has(> .dk-crash) > .n-kick { order: -2; }
[data-theme="party"]:not(.home) .notice > .dk-crash { order: -1; margin: 6px 0 4px 10px; }
/* keep the calls clear of the table's right edge */
@media (min-width: 821px) { [data-theme="party"]:not(.home) .drink-calls { right: 20px; } }

/* in a notice, each sticker is one line (piece, name, glasses) so the moment fits above Continue */
[data-theme="party"]:not(.home) .notice .dk-who { grid-template-columns: auto auto auto; grid-template-rows: auto; column-gap: 6px; padding: 3px 8px 3px 3px; }
[data-theme="party"]:not(.home) .notice .dk-who .ptoken { grid-row: auto; width: 30px; height: 30px; }
[data-theme="party"]:not(.home) .notice .dk-who .dk-n { min-height: 0; }
[data-theme="party"]:not(.home) .notice .dk-who .dk-n svg { height: 18px; }
[data-theme="party"]:not(.home) .notice .dk-row { gap: 8px; }
[data-theme="party"]:not(.home) .notice .dk-crash { padding-block: 8px; }
[data-theme="party"]:not(.home) .notice .dk-crash .dk-burst { width: 92px; height: 92px; margin: -14px 0 -10px -14px; }
[data-theme="party"]:not(.home) .notice .dk-crash { grid-template-columns: 88px minmax(0, 1fr); }
@media (max-width: 600px) {
  [data-theme="party"]:not(.home) .notice .dk-crash { grid-template-columns: 72px minmax(0, 1fr); }
  [data-theme="party"]:not(.home) .notice .dk-crash .dk-burst { width: 80px; height: 80px; margin: -12px 0 -8px -10px; }
  [data-theme="party"]:not(.home) .notice .dk-who .ptoken { width: 26px; height: 26px; }
  [data-theme="party"]:not(.home) .notice .dk-who .dk-n svg { height: 15px; }
}
