/* Mixed Messages's table (docs/mixed-messages.md; the approved mockups): the
   pad on the desk, the seats strip above it, the dock below. Loaded after
   the room's structure (room.css); tokens from mixed-messages.css. */

.mmgame { gap: 6px; }
/* (the bar's title in the words' face: Caveat sits a pixel off the back arrow) */
.mmgame .bar .title { font-family: var(--ui-font); font-weight: 800; }
.mmgame .bar .titlerow { flex: 1 1 auto; }
.mmgame .bar .tools { flex-wrap: nowrap; align-items: center; }
/* (its tools keep their words on one line, as the room's do, so beside the way home the title gives way first: docs/adr/0100) */
.mmgame .bar > .tools { flex: none; }
.mmgame .bar .tools .btn { white-space: nowrap; }
/* (and where its tools and talk crowd it, as on a phone on its side, the title takes two lines rather than lose its words: docs/adr/0052) */
.mmgame .bar .titlerow .title { white-space: normal; line-height: 1.05; overflow: visible; text-wrap: balance; }
.mmgame .watchbar:empty { display: none; }
.mmgame .watchbar { font-size: var(--t-note); display: flex; align-items: center; gap: var(--s2); }
@media (max-width: 760px) {
  .mmgame .bar .tools { display: none; }
  .mmgame .bar .more { display: inline-flex; min-width: 44px; font-size: 22px; text-decoration: none; }
}

/* the seats: a strip of chips, each the seat's color and shape */
.mmseats { display: flex; gap: 6px; padding: 2px 0; overflow-x: auto; scrollbar-width: none; }
.mmchip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px 4px 5px; border-radius: 999px; background: var(--chip); border: var(--chip-edge); font-size: var(--t-note); font-weight: 700; white-space: nowrap; flex: none; }
.mmchip.me { box-shadow: 0 0 0 2px var(--turn); }
.mmchip.gone { opacity: .55; }
.mmchip.turning { box-shadow: 0 0 0 2px var(--ink); }

/* a pencil by a name while they're still going: it wiggles */
.mmpencilicon { display: inline-block; width: 16px; height: 16px; background: linear-gradient(135deg, transparent 0 42%, var(--pencil) 42% 70%, var(--wood-tip) 70% 82%, var(--ink) 82%); border-radius: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .mmchip.busy .mmpencilicon, .mmlist .mmpencilicon { animation: mmwiggle 1.1s ease-in-out infinite; }
}
@keyframes mmwiggle { 0%, 100% { transform: rotate(-12deg); } 50% { transform: rotate(10deg) translateX(1px); } }

/* the pad: white cartridge paper, its spiral along the top */
.mmdesk { flex: 1; display: flex; justify-content: center; padding-top: 10px; min-height: 0; }
.mmpad { margin-bottom: 10px; position: relative; width: 100%; max-width: 640px; background: var(--paper); border-radius: 6px 6px 0 0; box-shadow: 0 1px 0 #e9e1d1, 0 3px 0 #f1ebdf, 0 4px 0 #e4dac7, 0 10px 24px rgba(60, 40, 15, .25); padding: 32px 8px 14px; box-sizing: border-box; }
.mmpad::before { content: ""; position: absolute; top: -9px; left: 18px; right: 18px; height: 22px; background: radial-gradient(circle at 50% 70%, transparent 4px, #6f6a62 4.5px, #9a958c 6px, transparent 6.5px) 0 0 / 22px 22px repeat-x; }
.mmpad::after { content: ""; position: absolute; top: 10px; left: 22px; right: 22px; height: 8px; background: radial-gradient(circle, var(--kraft-lo) 3px, transparent 3.5px) 0 0 / 22px 8px repeat-x; opacity: .55; }
.mmscene { position: relative; }
.mmstep { display: flex; flex-direction: column; gap: 10px; }
.mmkicker { margin: 0; font-size: var(--t-note); font-weight: 700; color: var(--soft); }
.mmword { margin: 0; font-family: var(--display); font-weight: 700; font-size: var(--t-display); line-height: .95; color: var(--graphite); overflow-wrap: anywhere; }
.mmword.mmask { font-size: clamp(30px, 7vw, 40px); }
.mmword.mmbig { font-size: clamp(44px, 12vw, 64px); text-align: center; padding: 24px 0; }
.mmnote { margin: 0; font-size: var(--t-note); font-weight: 600; color: var(--soft); }
.mmnote a { color: var(--turn); }
.mmlabel { font-weight: 700; font-size: 15px; }

/* the pencil timer: a yellow pencil that wears down */
.mmtimer { display: flex; align-items: center; gap: 10px; padding-left: 26px; }
.mmpencil { position: relative; flex: 1; height: 16px; }
.mmpencil .body { position: absolute; left: 0; top: 0; height: 16px; border-radius: 2px 0 0 2px; background: linear-gradient(180deg, var(--pencil-hi) 0 30%, var(--pencil) 30% 70%, var(--pencil-lo) 70%); transition: width .2s linear; }
.mmpencil .ferrule { position: absolute; left: -14px; top: 0; width: 10px; height: 16px; background: repeating-linear-gradient(90deg, var(--ferrule) 0 2px, var(--ferrule-hi) 2px 4px); }
.mmpencil .rubber { position: absolute; left: -24px; top: 0; width: 10px; height: 16px; background: var(--rubber); border-radius: 4px 0 0 4px; }
.mmpencil .tip { position: absolute; top: 0; width: 0; height: 0; border-top: 8px solid transparent; border-bottom: 8px solid transparent; border-left: 22px solid var(--wood-tip); transition: left .2s linear; }
.mmpencil .lead { position: absolute; top: 5px; width: 0; height: 0; border-top: 3px solid transparent; border-bottom: 3px solid transparent; border-left: 8px solid var(--graphite); transition: left .2s linear; }
.mmtime { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 18px; min-width: 3.2em; text-align: right; }
.mmtimer.low .mmtime { color: var(--bad); }
@media (prefers-reduced-motion: reduce) { .mmpencil .body, .mmpencil .tip, .mmpencil .lead { transition: none; } }

/* the drawing: the kit's canvas, square, as big as the pad allows */
/* (on a phone it leaves room for the word, the clock, the tools and the dock) */
.mmcanvas { width: 100%; aspect-ratio: 1 / 1; max-height: max(220px, min(calc(100dvh - 450px), 560px)); margin: 0 auto; }
.mmcanvas.mmseen { max-width: 420px; }
.mmfrom { width: 132px; aspect-ratio: 1 / 1; }
.mmtray { padding-top: 2px; }

/* dealt words: three index cards */
.mmcards { display: flex; flex-direction: column; gap: 10px; }
.mmcard { display: flex; align-items: center; gap: 12px; width: 100%; box-sizing: border-box; text-align: left; padding: 12px 14px; border-radius: 8px; border: 1.5px solid var(--paper-edge); background: #fff linear-gradient(transparent 0 9px, #f2b8b4 9px 10px, transparent 10px) no-repeat; font: inherit; color: var(--ink); cursor: pointer; min-height: 76px; }
.mmcard .w { font-family: var(--display); font-weight: 700; font-size: 32px; line-height: 1; }
.mmcard .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--soft); flex: none; box-sizing: border-box; }
.mmcard[aria-checked="true"] { box-shadow: inset 0 0 0 2.5px var(--turn); border-color: var(--turn); }
.mmcard[aria-checked="true"] .dot { border: 6px solid var(--turn); }
.mmown, .mmguess { display: flex; flex-direction: column; gap: 6px; }
.mmfield { font: 600 18px/1.2 var(--ui-font); padding: 12px; border: var(--field-edge); border-radius: 8px; background: #fff; color: var(--ink); min-height: 48px; box-sizing: border-box; width: 100%; }
.mmleft { font-size: 13px; color: var(--soft); text-align: right; }

/* who's still going */
.mmlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mmlist li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; background: #fff; border: 1px solid var(--paper-edge); font-weight: 700; }
.mmlist li .st { margin-left: auto; font-weight: 600; color: var(--soft); display: inline-flex; align-items: center; gap: 6px; }
.mmlist li.done .st { color: var(--good); }

/* the unveiling */
.mmstrip { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--soft); flex-wrap: wrap; }
.mmstrip .pg { padding: 3px 8px; border-radius: 6px; border: 1px solid var(--paper-edge); background: #fff; color: var(--ink); }
.mmstrip .pg.now { box-shadow: 0 0 0 2px var(--turn); }
.mmstrip .pg.later { color: var(--soft); }
.mmpage { display: flex; flex-direction: column; gap: 8px; }
.mmwho { margin: 0; font-size: 15px; font-weight: 700; }
.mmguessed { margin: 0; font: 800 clamp(26px, 7vw, 34px)/1.15 var(--ui-font); min-height: 1.2em; }
.mmheart { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 2px solid var(--ink); background: #fff; font: 700 15px var(--ui-font); color: var(--ink); cursor: pointer; }
.mmheart .heart { width: 18px; height: 16px; background: currentColor; clip-path: path("M9 16C9 16 0 10.5 0 5A4.6 4.6 0 0 1 9 3.2 4.6 4.6 0 0 1 18 5C18 10.5 9 16 9 16Z"); opacity: .25; }
.mmheart[aria-pressed="true"] { background: var(--heart-tint); border-color: var(--heart); color: var(--heart-ink); }
.mmheart[aria-pressed="true"] .heart { opacity: 1; }
.mmend { display: flex; flex-direction: column; gap: 10px; }
.mmpair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.mmends { border: 1.5px solid var(--paper-edge); border-radius: 8px; background: #fff; padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.mmends .k { font-size: 12px; font-weight: 700; color: var(--soft); }
.mmends .v { font-family: var(--display); font-weight: 700; font-size: 30px; line-height: 1; overflow-wrap: anywhere; }
.mmback { margin: 0; font-family: var(--display); font-size: 34px; font-weight: 700; color: var(--good); text-align: center; }
.mmdrift { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.5; }
.mmdrift b { font-weight: 800; }

/* the unveiling on a wide screen (David's call 4): the pages so far down
   the left, the page big in the middle, hearts and the books down the right */
.mmunveil > .mmsofarbox, .mmunveil > .mmside { display: none; }
.mmsofar { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mmsofar li { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; background: #fff; border: 1px solid var(--paper-edge); font-size: 14px; font-weight: 600; }
.mmsofar li.now { box-shadow: 0 0 0 2px var(--turn); }
.mmsofar li.later { color: var(--soft); }
.mmsofar .k { display: block; font-size: 12px; font-weight: 700; color: var(--soft); }
.mmsofartext { font-size: 18px; font-weight: 800; overflow-wrap: anywhere; }
.mmthumb { width: 72px; aspect-ratio: 1 / 1; flex: none; }
.mmside { display: flex; flex-direction: column; gap: 10px; }
.mmsidehearts { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 800; color: var(--heart); }
.mmsidehearts .heart { width: 24px; height: 21px; background: currentColor; clip-path: path("M12 21C12 21 0 14 0 6.6A6.1 6.1 0 0 1 12 4.3 6.1 6.1 0 0 1 24 6.6C24 14 12 21 12 21Z"); }
.mmbooklist li { padding: 7px 10px; }
.mmbooklist li.now { box-shadow: 0 0 0 2px var(--turn); }
@media (min-width: 1100px) {
  .mmgame[data-phase="unveil"] .mmpad, .mmgame[data-phase="unveil"] .mmdock { max-width: 1180px; }
  .mmunveil { display: grid; grid-template-columns: 240px minmax(0, 1fr) 240px; gap: 22px; align-items: start; }
  .mmunveil > .mmsofarbox, .mmunveil > .mmside { display: flex; flex-direction: column; gap: 10px; }
  .mmunveil .mmstrip { display: none; }
}

/* the ribbons and the books */
.mmribbon { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 8px; background: #fff; border: 1px solid var(--paper-edge); }
.mmribbon .rosette { width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle, var(--paper) 0 34%, var(--pencil) 35% 100%); box-shadow: 0 0 0 2px var(--pencil-lo); flex: none; }
.mmribbon .what { font-size: 13px; font-weight: 700; color: var(--soft); }
.mmribbon .name { font-weight: 800; font-size: 16px; }
.mmbooks { display: flex; flex-direction: column; gap: 6px; }
.mmbook { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; }
.mmbook .btn { margin-left: auto; flex: none; }

/* the dock: the status line and what to press */
.mmdock { position: sticky; bottom: 0; background: var(--paper); border-top: 1px solid var(--paper-edge); padding: 12px 14px calc(14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; box-shadow: 0 -6px 16px rgba(60, 40, 15, .12); }
/* the host's seat bar (someone away: their turn passing on), atop the dock */
.mmseatslot:empty { display: none; }
.mmseatslot > .seatbar { padding: 10px 12px; border-radius: 6px; border: 1px solid var(--paper-edge); }
.mmstatus { margin: 0; font-size: 16px; line-height: 1.35; font-weight: 600; min-height: 1.35em; }
.mmactions { display: flex; gap: 8px; flex-wrap: wrap; }
.mmactions > .btn { flex: 1; }
.mmactions > .btn.quiet { flex: none; }

/* a laptop: the pad wider, the dock within its column */
@media (min-width: 900px) {
  /* the tools beside the drawing, so the drawing can be big */
  .mmdraw { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 18px; row-gap: 10px; align-items: start; }
  .mmdraw > :not(.mmcanvas):not(.mmtray) { grid-column: 1 / -1; }
  .mmdraw > .mmcanvas { max-height: max(260px, min(calc(100dvh - 330px), 560px)); }
  .mmdraw .draw-tray { gap: 10px; }
  .mmdraw .draw-tray > .draw-group { display: grid; grid-template-columns: repeat(4, 44px); }
  .mmdraw .draw-line { flex-direction: column; gap: 10px; }
  .mmdraw .draw-acts { flex-direction: column; width: 100%; }
  .mmdraw .draw-acts .btn { width: 100%; }
  .mmdesk { padding-top: 18px; }
  .mmpad { padding: 36px 28px 20px; }
  .mmdock { align-self: center; width: 100%; max-width: 640px; box-sizing: border-box; border-radius: 0 0 6px 6px; }
}

