/* Président: its own marks and panels, on top of the card table's kit (card-table/ui/kit.css). */

/* "that rank or nothing": the trick's chip warms and breathes, the one moment a single rank is asked */
.tchip.trick.hot > span { color: #ffe2a8; border-color: #ffb54a; box-shadow: 0 0 14px rgba(255, 170, 60, 0.45); animation: hotChip 1.6s ease-in-out infinite; }
@keyframes hotChip { 50% { box-shadow: 0 0 22px rgba(255, 170, 60, 0.75); } }
body.calm .tchip.trick.hot > span { animation: none; }

/* the versions on trial (?try): one row per trial, each version a button that chooses it (and plays it, for a sound) */
#tries {
  position: fixed; inset-inline-end: 12px; bottom: 74px; z-index: 40; max-width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 96px); overflow-y: auto; padding: 8px 10px;
  border-radius: 8px; font: 12px/1.5 var(--sans, system-ui); color: #f3ead6; background: rgba(12, 10, 8, 0.78);
}
#tries .row { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; margin: 3px 0; }
#tries .nm { min-width: 112px; margin-inline-end: 4px; opacity: 0.8; }
#tries kbd { display: inline-block; min-width: 16px; margin-inline-end: 4px; text-align: center; border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 3px; }
#tries button {
  padding: 1px 7px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.22); background: transparent;
  color: inherit; font: inherit; cursor: pointer;
}
#tries button:hover { background: rgba(255, 255, 255, 0.1); }
#tries .head { border: 0; padding: 0 2px 2px; font-weight: 700; opacity: 0.85; }
#tries .head:hover { background: transparent; opacity: 1; }
#tries .sls { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 2px 12px; margin: 0 0 6px 22px; }
#tries .sl { display: flex; align-items: center; gap: 6px; min-width: 0; }
#tries .sl span { flex: none; width: 86px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: 0.8; }
#tries .sl input { flex: 1; min-width: 60px; accent-color: #e8c56a; }
#tries .sl output { flex: none; width: 44px; text-align: end; font-variant-numeric: tabular-nums; }
#tries.shut .row { display: none; }
#tries button.on { background: #e8c56a; border-color: #e8c56a; color: #1a140a; font-weight: 700; }
/* on a phone, at the top: the bottom is the person's own (their name, their buttons, what they chose) */
@media (max-width: 480px) { #tries { bottom: auto; top: 54px; } }

/* the roles, in the scores and beside the names at the table, as one badge: the ends filled (Président gold, the
   Pouilleux rust), the vices outlined in their colour, a neutral outlined in grey */
.president-scores .who small.role { margin-inline-start: 8px; vertical-align: 2px; }
.president-scores .who small.role, .trole[data-kind] {
  padding: 1px 8px; border-radius: var(--mark-r, 8px); font-size: 12px; font-weight: 700;
  letter-spacing: 0.02em; white-space: nowrap; color: var(--ivory-dim); border: 1px solid rgba(255, 255, 255, 0.16);
}
.trole[data-kind] { background: rgba(14, 11, 8, 0.72); }
.president-scores .who small.role-president, .trole[data-kind="president"] { color: var(--good-ink, #1a1405); background: var(--good, linear-gradient(#ffe9a3, #e0b24a)); border-color: transparent; }
.president-scores .who small.role-vicePresident, .trole[data-kind="vicePresident"] { color: #ffe9b0; border-color: rgba(224, 178, 74, 0.6); }
.president-scores .who small.role-vicePouilleux, .trole[data-kind="vicePouilleux"] { color: #f0b9a6; border-color: rgba(176, 82, 58, 0.5); }
.president-scores .who small.role-pouilleux, .trole[data-kind="pouilleux"] { color: var(--bad-ink, #ffd9d4); background: var(--bad, #6a211c); border-color: transparent; }
.president-scores .sub b { color: var(--gold, #e0b24a); }

/* Settings: its tabs on one line, the Rules tab included, in the longer languages too */
.tpl-panel.options .tpl-tabs { flex-wrap: nowrap; }
.tpl-panel.options .tpl-tabs button { padding: 8px 12px; font-size: 17px; white-space: nowrap; }

/* the scores: no row stands out in gold (the first read as "you"); the person's own row is marked by its name */
.president-scores .srow.lead, .winner .srow.lead { background: none; }

/* How to play: the order as a row of small tiles, then two columns */
.ladder { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 6px 0 4px; }
.ladder span { min-width: 30px; padding: 4px 6px; text-align: center; border-radius: 6px; font-family: var(--serif); font-weight: 700; font-size: 16px; color: #1c1a14; background: linear-gradient(#fdf9ee, #efe6cf); }
.ladder span.top { color: #fff3d0; background: linear-gradient(#c8423a, #8e231c); }
.ladder i { margin-inline-start: 8px; font-size: var(--t-small, 13px); color: var(--ivory-dim); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 26px; }
.cols h3 { margin-top: 10px; }
/* How to play: a reminder read at a glance; the order of the cards on top, then the rules in two columns on a wide
   screen (a section never split), each rule its name first; a rule off at this table dimmed and marked */
.panel.howto:has(.rules-page) { width: min(980px, 100%); }
/* its buttons keep their room under them, scrolled or not: the bar carries the panel's bottom padding inside it, so
   that it sticks with that room under the buttons instead of on the panel's edge; the bar is solid and the text fades
   out above it, never running under the buttons (the fade sits in the bar's top margin once scrolled to the end) */
.panel.howto:has(.rules-page) .close { padding-bottom: 22px; margin-bottom: -22px; margin-top: 26px; background: var(--panel-solid); }
.panel.howto:has(.rules-page) .close::before { content: ""; position: absolute; inset-inline: 0; bottom: 100%; height: 26px; background: linear-gradient(transparent, var(--panel-solid)); pointer-events: none; }
.rules-page { container-type: inline-size; }
.rules-page h2 { margin-bottom: 6px; }
.rules-page .rp-goal { margin: 0 0 4px; }
@container (min-width: 620px) { .rp-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: end; } }
.rp-ladder { --card-w: 36px; width: calc(var(--card-w) * 8.16 + 6px); max-width: 100%; }
.rp-ladder .rp-ends { display: flex; justify-content: space-between; font-size: var(--t-small, 13px); color: var(--ivory-dim); margin-top: 4px; }
.rp-cols { margin-top: 4px; }
@container (min-width: 620px) { .rp-cols { columns: 2; column-gap: 34px; } .rules-page .rp-sec.end { break-before: column; } }
.rp-sec { padding-top: 2px; }
.rp-sec h3 { break-after: avoid; }
.rules-page .rp-rule { break-inside: avoid; }
.rp-sec h3 { margin: 10px 0 4px; }
.rp-sec ul { list-style: none; margin: 0; padding: 0; }
.rules-page .rp-rule { margin: 0 0 6px; }
.rules-page .rp-rule p { margin: 0; font-size: 14.5px; line-height: 1.42; color: rgba(244, 236, 216, 0.86); }
.rules-page .rp-rule p b:first-child { color: var(--ivory); }
.rules-page .rp-rule.off .rp-txt { opacity: 0.5; }
.rp-off { float: inline-end; margin-inline-start: 8px; margin-top: 1px; padding: 0 7px; border-radius: 999px; border: 1px solid var(--line); font-size: 12px; line-height: 18px; color: var(--ivory); white-space: nowrap; }
@container (max-width: 720px) { .cols { grid-template-columns: 1fr; } }

/* a player sent to the bottom: a big word, never the gold of the good moments */
.sent { position: fixed; z-index: 30; transform: translate(-50%, -50%); pointer-events: none; white-space: nowrap; }
.sent-fall span {
  display: block; color: #9a958c; font: italic 800 86px/1 var(--display, Georgia, serif);
  text-shadow: 0 8px 22px rgba(0, 0, 0, 0.7); animation: sentFall 2.1s both;
}
@keyframes sentFall {
  0% { transform: translateY(-160px); opacity: 0; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  14% { transform: translateY(0); opacity: 1; animation-timing-function: ease-out; }
  22% { transform: translateY(-16px) rotate(-3deg); }
  32% { transform: translateY(0) rotate(5deg); }
  68% { transform: translateY(0) rotate(5deg); opacity: 1; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  100% { transform: translateY(460px) rotate(16deg); opacity: 0; }
}
body.calm .sent span { animation-name: sentCalm; }
@keyframes sentCalm { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }

/* a played card's row: its choices, then its loudness filling the rest, ending where the volume above ends */
.president-snd { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; width: 100%; }
.president-snd .tpl-slider { flex: 1 1 140px; min-width: 140px; }

/* the guided game's line about the places and their points, in the coach line's gilt */
.president-scores .row { gap: 12px; }
.president-scores .limitnote { transition: opacity 0.3s ease; }
.president-scores .limitnote.later { opacity: 0; }
.president-scores .guide-tip { margin: 12px auto 16px; max-width: 30em; padding: 8px 14px; border: 1px solid rgba(240, 215, 150, 0.45); border-radius: var(--r-ctl); color: var(--ivory); text-align: center; font-size: 14.5px; line-height: 1.35; }
.president-scores .guide-tip b { color: var(--gold); }

/* Settings › Rules: the guided game offered again, a small button at the start of its row (rarely needed) */
.setting .btn.learn-again { justify-self: start; align-self: start; width: auto; min-width: 0; padding: 6px 16px; font-size: 13.5px; }


/* a révolution's choice, when it is a choice: the package's speech bubble over the chooser's name (ui.sayBubble),
   thinking, then the state chosen (warm: Revolution!; cool: Back to normal). Its looks beyond the package's three, on
   trial (choiceLook): */
@keyframes choiceGrow { 0% { opacity: 0; transform: scale(0.45); } 60% { opacity: 1; transform: scale(1.07); } 100% { transform: scale(1); } }

/* look 1, bright: deep red and teal pills, a ring bursting from them */
.say-bubble.look-1.say .cb { padding: 10px 22px; border-radius: 999px; font-weight: 800; font-size: 21px; letter-spacing: 0.3px; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); animation: choiceBubblePop 0.5s cubic-bezier(0.2, 1.6, 0.4, 1) both; }
.say-bubble.look-1.say.warm .cb { background: linear-gradient(#e2542f, #a8261a); box-shadow: 0 0 0 2px #ffcf9a, 0 6px 26px rgba(220, 70, 40, 0.7); }
.say-bubble.look-1.say.cool .cb { background: linear-gradient(#2fb3a0, #17786d); box-shadow: 0 0 0 2px #b6f2e6, 0 6px 26px rgba(40, 180, 160, 0.65); }
.say-bubble.look-1.say .cb::after { display: none; }
.say-bubble.look-1.say .cb::before { content: ""; position: absolute; inset: -2px; border-radius: inherit; border: 3px solid currentColor; opacity: 0; animation: choiceBubbleRing 0.75s ease-out 0.08s; }
.say-bubble.look-1.say.warm .cb::before { color: #ff9a6a; }
.say-bubble.look-1.say.cool .cb::before { color: #8ef0dc; }
@keyframes choiceBubblePop { 0% { opacity: 0; transform: scale(0.4); } 100% { opacity: 1; transform: scale(1); } }
@keyframes choiceBubbleRing { 0% { opacity: 0.9; transform: scale(1); } 100% { opacity: 0; transform: scale(1.5, 2.2); } }

/* look 2, table colours: the pill on the dark panel, edged in red-orange or gold */
.say-bubble.look-2.say .cb { padding: 10px 22px; border-radius: 999px; font: italic 700 21px var(--display); background: var(--panel-solid); color: var(--ivory); animation: choiceBubblePop 0.5s cubic-bezier(0.2, 1.6, 0.4, 1) both; }
.say-bubble.look-2.say.warm .cb { color: #ffd7c8; box-shadow: 0 0 0 2px #ff5c42, 0 0 22px rgba(255, 92, 66, 0.55), 0 6px 20px rgba(0, 0, 0, 0.6); }
.say-bubble.look-2.say.cool .cb { color: #f6e7bf; box-shadow: 0 0 0 2px var(--gold), 0 0 22px rgba(231, 196, 106, 0.5), 0 6px 20px rgba(0, 0, 0, 0.6); }
.say-bubble.look-2.say .cb::after { display: none; }

/* look 3, card: an ivory card with a gold inner border, turning face up */
.say-bubble.look-3.say .cb { border-radius: 8px; padding: 9px 20px 10px; background: #f6eedb; font: italic 700 22px var(--display);
  box-shadow: inset 0 0 0 3px #f6eedb, inset 0 0 0 4px #c9a75a, 0 0 18px rgba(231, 196, 106, 0.55), 0 8px 20px rgba(0, 0, 0, 0.55); animation: choiceCardTurn 0.55s cubic-bezier(0.25, 1.3, 0.45, 1) both; }
.say-bubble.look-3.say.warm .cb { color: #c2361f; }
.say-bubble.look-3.say.cool .cb { color: #0f4a33; }
.say-bubble.look-3.say .cb::after { display: none; }
@keyframes choiceCardTurn { 0% { opacity: 0; transform: rotateY(90deg) scale(0.85); } 100% { opacity: 1; transform: rotateY(0deg) scale(1); } }

/* look 4, parchment: the white bubble grows into a speech bubble of the cards' ivory, edged in deep gold, its words
   in the table's serif, the game's red for Revolution!, the felt's dark green for Back to normal */
.say-bubble.look-4.say .cb { --fill: #f6eedb; padding: 9px 20px 10px; border-radius: 18px; background: #f6eedb; font: italic 700 21px var(--display); letter-spacing: 0.2px;
  box-shadow: 0 0 0 1.5px var(--gold-deep), 0 8px 22px rgba(0, 0, 0, 0.5); animation: choiceGrow 0.46s cubic-bezier(0.3, 1.2, 0.5, 1) both; }
.say-bubble.look-4.say.warm .cb { color: var(--red); }
.say-bubble.look-4.say.cool .cb { color: #1d4a34; }

/* look 6, shout or murmur: Revolution! bursts out of a jagged ivory shout bubble, tilted, in the game's red;
   Back to normal settles in a soft round ivory bubble, upright, in the felt's green */
.say-bubble.look-6.say .cb { background: #f6eedb; font: italic 700 21px var(--display); filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.5)); }
.say-bubble.look-6.say.warm .cb { padding: 18px 28px; color: var(--red); transform: rotate(-4deg);
  clip-path: polygon(0% 22%, 9% 14%, 6% 0%, 20% 9%, 33% 1%, 41% 11%, 55% 0%, 62% 11%, 77% 2%, 80% 14%, 96% 8%, 91% 24%, 100% 36%, 92% 49%, 100% 64%, 90% 72%, 95% 90%, 79% 84%, 70% 100%, 60% 87%, 47% 98%, 40% 86%, 25% 97%, 21% 84%, 4% 92%, 9% 74%, 0% 62%, 8% 49%, 0% 35%);
  animation: choiceShout 0.42s cubic-bezier(0.2, 1.7, 0.4, 1) both; }
.say-bubble.look-6.say.cool .cb { --fill: #f6eedb; padding: 9px 20px 10px; border-radius: 22px; color: #1d4a34; animation: choiceMurmur 0.6s cubic-bezier(0.3, 1, 0.5, 1) both; }
@keyframes choiceShout { 0% { opacity: 0; transform: rotate(-12deg) scale(0.3); } 100% { opacity: 1; transform: rotate(-4deg) scale(1); } }
@keyframes choiceMurmur { 0% { opacity: 0; transform: translateY(8px) scale(0.8); } 100% { opacity: 1; transform: none; } }

/* look 7, seal: an ivory speech bubble with a round seal at its start, the seal saying the state by its sign (two
   arrows turning, for Revolution!; one arrow home, for Back to normal) and its colour (the game's red; gold) */
.say-bubble.look-7.say .cb { --fill: #f6eedb; padding: 7px 18px 7px 7px; border-radius: 999px; background: #f6eedb; font: 700 19px var(--display); color: #2a2418;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5); animation: choiceGrow 0.46s cubic-bezier(0.3, 1.2, 0.5, 1) both; }
.say-bubble.look-7.say .ic { display: block; width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35), 0 2px 5px rgba(0, 0, 0, 0.3); animation: choiceSeal 0.55s cubic-bezier(0.3, 1.4, 0.5, 1) 0.12s both; }
.say-bubble.look-7.say .ic::before { content: ""; position: absolute; width: 30px; height: 30px; background: #fff;
  -webkit-mask: var(--sign) center / 18px 18px no-repeat; mask: var(--sign) center / 18px 18px no-repeat; }
.say-bubble.look-7.say .ic { position: relative; }
.say-bubble.look-7.say.warm .ic { background: radial-gradient(circle at 35% 30%, #e8665c, var(--red) 55%, #9e2f2a); --sign: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9a8 8 0 0 1 14-3l2 2'/%3E%3Cpath d='M20 3v5h-5'/%3E%3Cpath d='M20 15a8 8 0 0 1-14 3l-2-2'/%3E%3Cpath d='M4 21v-5h5'/%3E%3C/svg%3E"); }
.say-bubble.look-7.say.cool .ic { background: radial-gradient(circle at 35% 30%, #f3dc93, var(--gold) 55%, var(--gold-deep)); --sign: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 14 4 9l5-5'/%3E%3Cpath d='M4 9h10a6 6 0 0 1 0 12h-3'/%3E%3C/svg%3E"); }
.say-bubble.look-7.say.cool .ic::before { background: #3a2a08; }
.say-bubble.look-7.say.warm .w { color: var(--red); }
.say-bubble.look-7.say.cool .w { color: #6b5320; }
@keyframes choiceSeal { 0% { transform: scale(0) rotate(-120deg); } 100% { transform: scale(1) rotate(0deg); } }

/* look 8, ribbon: the speech bubble takes the colours of the game's own buttons: the gold of the main button for Back
   to normal (its dark ink), the game's red, edged in pale gold, for Revolution! (ivory words) */
.say-bubble.look-8.say .cb { padding: 10px 22px; border-radius: 14px; font: 700 20px var(--display); letter-spacing: 0.3px; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55); animation: choiceGrow 0.46s cubic-bezier(0.3, 1.2, 0.5, 1) both; }
.say-bubble.look-8.say.warm .cb { --fill: #a83a33; background: linear-gradient(#df6259, #a83a33); color: #fff3e2; box-shadow: 0 0 0 1.5px var(--primary-edge), inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 8px 22px rgba(0, 0, 0, 0.55); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }
.say-bubble.look-8.say.cool .cb { --fill: #cfa64f; background: var(--primary); color: var(--primary-ink); box-shadow: 0 0 0 1.5px var(--primary-edge), inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 8px 22px rgba(0, 0, 0, 0.55); }

/* look 9, ink: the white bubble widens and the words write themselves in, left to right, in the table's italic serif
   (the game's red, the felt's green), a gold line drawn under them as they finish */
.say-bubble.look-9.say .cb { --fill: #fbf7ee; padding: 9px 20px 12px; border-radius: 16px; background: #fbf7ee; font: italic 700 21px var(--display); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5); animation: choiceWiden 0.3s ease-out both; }
.say-bubble.look-9.say .w { position: relative; display: inline-block; clip-path: inset(0 100% -8px 0); animation: choiceWrite 0.55s steps(14, end) 0.18s forwards; }
.say-bubble.look-9.say .w::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 2px; background: var(--gold-deep); transform: scaleX(0); transform-origin: 0 50%; animation: choiceStroke2 0.3s ease-out 0.72s forwards; }
.say-bubble.look-9.say.warm .cb { color: var(--red); }
.say-bubble.look-9.say.cool .cb { color: #1d4a34; }
@keyframes choiceWiden { 0% { transform: scaleX(0.35) scaleY(0.8); opacity: 0.6; } 100% { transform: none; opacity: 1; } }
@keyframes choiceWrite { to { clip-path: inset(0 0 -8px 0); } }
@keyframes choiceStroke2 { to { transform: scaleX(1); } }

/* the label above the trick changes its words with a soft fade, never folding */
.tchip.trick:not(.hot) > span, .tchip.trick.turn:not(.hot) > span { animation: trickLabelIn 0.32s ease-out; }
@keyframes trickLabelIn { from { opacity: 0; } }
