/* Gartic Phone : styles du module (préfixe .gartic-). */

/* --- Fenêtre ------------------------------------------------------------------------ */

.modal.gartic-modal {
  width: min(1080px, 100%);
  height: min(800px, calc(100vh - 40px));
  padding: 18px 20px 20px;
  gap: 14px;
  overflow: hidden;
}
.gartic-modal .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.gartic-ic {
  display: inline-grid;
  place-items: center;
  flex: none;
}
.gartic-ic svg {
  width: 17px;
  height: 17px;
}
.btn.small .gartic-ic svg {
  width: 14px;
  height: 14px;
}

.gartic-head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 42px;
}
.gartic-logo {
  width: 42px;
  height: 42px;
  border-radius: var(--r-md);
  flex: none;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #ff6fae, #ff9f0a 58%, #ffd60a);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 6px 16px rgba(255, 111, 174, 0.35);
}
.gartic-logo svg {
  width: 24px;
  height: 24px;
}
.gartic-titles {
  min-width: 0;
}
.gartic-titles h2 {
  margin: 0;
  font-size: var(--fs-title);
  letter-spacing: -0.01em;
}
.gartic-sub {
  margin-top: 1px;
  font-size: var(--fs-footnote);
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gartic-head-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex: none;
}
.gartic-actions {
  display: flex;
  gap: 6px;
}

/* Étapes de la partie */
.gartic-track {
  display: flex;
  gap: var(--sp-1);
  margin: 0 auto;
  min-width: 0;
  overflow: hidden;
}
.gartic-step {
  width: 26px;
  height: 26px;
  border-radius: var(--r-sm);
  flex: none;
  display: grid;
  place-items: center;
  background: var(--fill);
  color: var(--text-3);
  transition: background var(--dur-base), color var(--dur-base);
}
.gartic-step svg {
  width: 13px;
  height: 13px;
}
.gartic-step.past {
  background: rgba(52, 199, 89, 0.18);
  color: var(--green);
}
.gartic-step.now {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 3px 10px rgba(10, 132, 255, 0.35);
}

/* Compte à rebours */
.gartic-timer {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 13px 0 5px;
  border-radius: var(--r-pill);
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  box-shadow:
    inset 0 1px 0 var(--glass-rim),
    0 2px 8px rgba(20, 24, 40, 0.08);
  font-size: var(--fs-callout);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: color var(--dur-fast);
}
.gartic-timer svg {
  width: 24px;
  height: 24px;
}
.gartic-ring-track,
.gartic-ring-bar {
  fill: none;
  stroke-width: 3;
}
.gartic-ring-track {
  stroke: var(--fill-2);
}
.gartic-ring-bar {
  stroke: var(--accent);
  stroke-linecap: round;
  transition:
    stroke-dashoffset 0.25s linear,
    stroke var(--dur-fast);
}
.gartic-timer.warn {
  color: var(--orange);
}
.gartic-timer.warn .gartic-ring-bar {
  stroke: var(--orange);
}
.gartic-timer.urgent {
  color: var(--red);
  animation: gartic-pulse 1s ease-in-out infinite;
}
.gartic-timer.urgent .gartic-ring-bar {
  stroke: var(--red);
}

.gartic-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.gartic-body > * {
  flex: 1;
  min-height: 0;
}

.gartic-foot {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
}
.gartic-buttons {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-left: auto;
}
.gartic-warn {
  color: var(--orange);
  font-weight: 600;
}
.gartic-pill {
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: var(--fill);
  font-size: var(--fs-footnote);
  font-weight: 700;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.gartic-kicker {
  font-size: var(--fs-caption);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-3);
}

.gartic-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--text-2);
  font-size: var(--fs-body);
}
.gartic-offline {
  text-align: center;
}
.gartic-offline p {
  max-width: 440px;
}
.gartic-spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--fill-2);
  border-top-color: var(--accent);
  animation: gartic-spin 0.8s linear infinite;
}

/* --- Salon -------------------------------------------------------------------------- */

.gartic-lobby {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.gartic-lobby-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(290px, 1fr);
  gap: 14px;
}
.gartic-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  overflow: auto;
}
.gartic-card {
  border-radius: var(--r-xl);
  padding: 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 var(--glass-rim);
}
.gartic-card h3 {
  margin: 0;
  font-size: var(--fs-callout);
}
.gartic-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.gartic-roster {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
}
.gartic-players {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.gartic-player {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px 10px;
  border-radius: var(--r-xl);
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  box-shadow:
    inset 0 1px 0 var(--glass-rim),
    0 2px 8px rgba(20, 24, 40, 0.06);
  animation: gartic-pop var(--dur-base) var(--ease-out) both;
  min-width: 0;
}
.gartic-player.me {
  border-color: var(--accent);
  box-shadow:
    0 0 0 3px rgba(10, 132, 255, 0.16),
    inset 0 1px 0 var(--glass-rim);
}
.gartic-slot {
  background: transparent;
  border: 1.5px dashed var(--hairline);
  box-shadow: none;
  color: var(--text-3);
  animation: none;
}
.gartic-slot .gartic-face {
  display: grid;
  place-items: center;
  background: var(--fill);
  box-shadow: none;
}
.gartic-slot .gartic-face svg {
  width: 22px;
  height: 22px;
  opacity: 0.6;
}
.gartic-slot .gartic-name {
  font-weight: 500;
}
.gartic-player.is-absent .gartic-face canvas {
  filter: grayscale(1);
  opacity: 0.45;
}
.gartic-face {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: var(--r-xl);
  flex: none;
  background: linear-gradient(160deg, #ffe0ee, #dce8ff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.gartic-face canvas,
.gartic-face-fallback {
  display: block;
  border-radius: inherit;
  image-rendering: pixelated;
}
.gartic-album-head .gartic-face {
  width: 48px;
  height: 48px;
  border-radius: var(--r-lg);
}
.gartic-name {
  max-width: 100%;
  font-size: var(--fs-sub);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gartic-tag {
  font-size: var(--fs-caption);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: #fff;
}
.gartic-tag.host {
  background: linear-gradient(160deg, #ffd60a, #ff9f0a);
  color: #4a3300;
}
.gartic-badge {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  border: 2px solid var(--glass-strong);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}
.gartic-badge svg {
  width: 11px;
  height: 11px;
  stroke-width: 2.6;
}
.gartic-host {
  top: -7px;
  right: -7px;
  background: linear-gradient(160deg, #ffd60a, #ff9f0a);
}
.gartic-ok,
.gartic-off,
.gartic-busy {
  right: -7px;
  bottom: -7px;
}
.gartic-ok {
  background: var(--green);
}
.gartic-off {
  background: #8e8e93;
}
.gartic-busy {
  background: var(--accent);
}
.gartic-dots {
  display: flex;
  gap: 2px;
}
.gartic-dots i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  animation: gartic-blink 1.2s ease-in-out infinite;
}
.gartic-dots i:nth-child(2) {
  animation-delay: 0.2s;
}
.gartic-dots i:nth-child(3) {
  animation-delay: 0.4s;
}

.gartic-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 28px 12px;
  text-align: center;
  font-size: var(--fs-body);
}
.gartic-empty-ic {
  width: 52px;
  height: 52px;
  border-radius: var(--r-xl);
  display: grid;
  place-items: center;
  background: var(--fill);
  color: var(--text-2);
  margin-bottom: 4px;
}
.gartic-empty-ic svg {
  width: 26px;
  height: 26px;
}

.gartic-how ol {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gartic-how li {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-sub);
  line-height: 1.45;
  color: var(--text-2);
}
.gartic-how-ic {
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  flex: none;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.gartic-how-ic.is-pencil {
  background: linear-gradient(160deg, #5ac8fa, #0a84ff);
}
.gartic-how-ic.is-brush {
  background: linear-gradient(160deg, #ff8fc1, #ff2d78);
}
.gartic-how-ic.is-book {
  background: linear-gradient(160deg, #ffd60a, #ff9f0a);
}
.gartic-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-top: 12px;
  font-size: var(--fs-sub);
  font-weight: 600;
}
.gartic-setting .segmented {
  width: 232px;
  flex: none;
}

/* --- Étape en cours ----------------------------------------------------------------- */

.gartic-task {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  /* Fenêtre très basse : on fait défiler plutôt que de superposer. */
  overflow-x: hidden;
  overflow-y: auto;
}
.gartic-task.is-write,
.gartic-task.is-describe {
  justify-content: center;
}
.gartic-task.is-write .gartic-foot,
.gartic-task.is-describe .gartic-foot {
  margin-top: auto;
}
.gartic-task.is-write .gartic-prompt {
  margin-top: auto;
}
.gartic-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  text-align: center;
  flex: none;
}
.gartic-prompt-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  background: var(--fill);
  font-size: var(--fs-footnote);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-2);
}
.gartic-prompt-label svg {
  width: 14px;
  height: 14px;
}
.gartic-quote {
  max-width: 820px;
  font-size: var(--fs-title-lg);
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
}
.gartic-quote::before {
  content: "« ";
  color: var(--text-3);
}
.gartic-quote::after {
  content: " »";
  color: var(--text-3);
}
.gartic-quote.plain::before,
.gartic-quote.plain::after {
  content: none;
}
.gartic-prompt-hint {
  margin: 0;
  max-width: 560px;
  font-size: var(--fs-sub);
  line-height: 1.45;
  color: var(--text-2);
}
.gartic-prompt-img {
  display: block;
  height: min(42vh, 380px);
  max-width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border-radius: var(--r-xl);
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.06),
    0 12px 32px rgba(20, 24, 40, 0.16);
}
.gartic-blank {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  text-align: center;
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--text-3);
  background: var(--fill);
  border: 2px dashed var(--hairline);
  box-shadow: none;
}
.gartic-blank svg {
  width: 30px;
  height: 30px;
}

.gartic-write {
  width: min(680px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  flex: none;
}
.gartic-task.is-write .gartic-write {
  margin-bottom: auto;
}
.gartic-field {
  position: relative;
  width: 100%;
}
.gartic-input {
  width: 100%;
  padding: 18px 84px 18px 20px;
  border-radius: var(--r-xl);
  border: 1px solid var(--hairline);
  background: var(--glass-strong);
  color: var(--text);
  font-size: var(--fs-title);
  font-weight: 600;
  outline: none;
  box-shadow:
    inset 0 1px 0 var(--glass-rim),
    0 8px 24px rgba(20, 24, 40, 0.08);
  transition:
    box-shadow var(--dur-fast),
    border-color var(--dur-fast);
}
.gartic-input:focus {
  border-color: var(--accent);
  box-shadow:
    0 0 0 4px rgba(10, 132, 255, 0.2),
    0 8px 24px rgba(20, 24, 40, 0.08);
}
.gartic-input::placeholder {
  color: var(--text-3);
  font-weight: 500;
}
.gartic-chars {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--fs-footnote);
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

/* Planche à dessin */
.gartic-draw {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.gartic-tools {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: var(--r-xl);
  position: relative;
}
.gartic-colors,
.gartic-grid {
  display: grid;
  grid-template-columns: repeat(3, 30px);
  gap: var(--sp-2);
}
.gartic-color {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.14),
    0 1px 2px rgba(0, 0, 0, 0.12);
  transition: transform var(--dur-slow) var(--ease-spring);
}
.gartic-color:hover {
  transform: scale(1.1);
}
.gartic-color.active {
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.14),
    0 0 0 2px var(--glass-strong),
    0 0 0 4px var(--accent);
}
.gartic-tool {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  background: var(--fill);
  color: var(--text);
  cursor: pointer;
  transition:
    background var(--dur-fast),
    transform var(--dur-slow) var(--ease-spring);
}
.gartic-tool:hover {
  background: var(--fill-2);
}
.gartic-tool:active {
  transform: scale(0.94);
}
.gartic-tool.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 3px 10px rgba(10, 132, 255, 0.35);
}
.gartic-tool:disabled {
  opacity: 0.35;
  cursor: default;
  transform: none;
}
.gartic-tool svg {
  width: 16px;
  height: 16px;
}
.gartic-dot {
  border-radius: 50%;
  background: currentColor;
}
.gartic-sep {
  height: 1px;
  background: var(--hairline);
}
.gartic-canvas {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  max-width: calc((min(800px, 100vh - 40px) - 262px) * 16 / 9);
  aspect-ratio: 16 / 9;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.07),
    0 12px 32px rgba(20, 24, 40, 0.16);
}
.gartic-canvas canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.gartic-live {
  touch-action: none;
  cursor: none;
}
.gartic-cursor {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  border: 1.5px solid rgba(0, 0, 0, 0.7);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.9),
    inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

/* Avancement des autres joueurs */
.gartic-progress {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-width: 0;
}
.gartic-faces {
  display: flex;
  flex-wrap: wrap;
  row-gap: 4px;
}
.gartic-mini-face {
  position: relative;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: var(--r-sm);
  border: 2px solid var(--glass-strong);
  background: linear-gradient(160deg, #ffe0ee, #dce8ff);
}
.gartic-faces .gartic-mini-face + .gartic-mini-face {
  margin-left: -6px;
}
.gartic-mini-face canvas {
  display: block;
  border-radius: var(--r-xs);
}
.gartic-mini-face.absent canvas {
  filter: grayscale(1);
  opacity: 0.45;
}
.gartic-tick {
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--green);
  border: 1.5px solid var(--glass-strong);
}
.gartic-tick.off {
  background: #8e8e93;
}
.gartic-tick svg {
  width: 8px;
  height: 8px;
  stroke-width: 3.4;
}
.gartic-progress-text {
  font-size: var(--fs-sub);
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
}
.gartic-flash {
  font-size: var(--fs-sub);
  font-weight: 600;
  color: var(--red);
}
.gartic-shake {
  animation: gartic-shake 0.4s ease;
}
.gartic-submit {
  min-width: 116px;
}

.gartic-banner {
  position: absolute;
  top: 2px;
  left: 50%;
  z-index: 3;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 8px 15px;
  border-radius: var(--r-pill);
  white-space: nowrap;
  font-size: var(--fs-sub);
  font-weight: 700;
  color: #fff;
  background: rgba(255, 149, 0, 0.94);
  box-shadow: 0 8px 22px rgba(255, 149, 0, 0.35);
  animation: gartic-drop var(--dur-base) var(--ease-out) both;
}

/* Attente (réponse envoyée) et spectateurs */
.gartic-wait {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  overflow: auto;
  padding: 10px 0;
}
.gartic-wait h3 {
  margin: 4px 0 0;
  font-size: var(--fs-title-lg);
  letter-spacing: -0.01em;
}
.gartic-big {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
  animation: gartic-bounce var(--dur-slow) var(--ease-spring) both;
}
.gartic-big svg {
  width: 32px;
  height: 32px;
  stroke-width: 2.5;
}
.gartic-big.is-ok {
  background: linear-gradient(160deg, #5ddf7a, #28a745);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 10px 26px rgba(52, 199, 89, 0.35);
}
.gartic-big.is-watch {
  background: linear-gradient(160deg, #6ab8ff, #0a6cff);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 10px 26px rgba(10, 132, 255, 0.3);
}
.gartic-mini {
  width: 260px;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border-radius: var(--r-md);
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.06),
    0 8px 22px rgba(20, 24, 40, 0.14);
}
.gartic-mini-text {
  max-width: 540px;
  padding: 10px 16px;
  border-radius: var(--r-lg);
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  font-size: var(--fs-headline);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.gartic-seats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 820px;
  margin: 8px 0 4px;
}
.gartic-seats .gartic-player {
  width: 104px;
}

/* --- Album -------------------------------------------------------------------------- */

.gartic-album {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.gartic-album-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 12px 16px;
  border-radius: var(--r-xl);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 var(--glass-rim);
}
.gartic-album-head h3 {
  margin: 1px 0 0;
  font-size: var(--fs-headline);
}
.gartic-books {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 5px;
}
.gartic-book-dot {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: var(--fill-2);
  transition:
    width var(--dur-base) var(--ease-out),
    background var(--dur-base);
}
.gartic-book-dot.past {
  background: var(--green);
}
.gartic-book-dot.now {
  width: 22px;
  background: var(--accent);
}
.gartic-album-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 2px 8px;
}
.gartic-album-list {
  max-width: 720px;
  margin: 0 auto;
  padding: 6px 0 20px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}
.gartic-entry {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  animation: gartic-rise var(--dur-sheet) var(--ease-spring) both;
}
.gartic-entry-by {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sub);
  color: var(--text-2);
}
.gartic-entry-by b {
  color: var(--text);
}
.gartic-entry-text {
  align-self: flex-start;
  max-width: 100%;
  padding: 14px 18px;
  border-radius: var(--r-xs) var(--r-xl) var(--r-xl) var(--r-xl);
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  box-shadow:
    inset 0 1px 0 var(--glass-rim),
    0 6px 18px rgba(20, 24, 40, 0.08);
  font-size: var(--fs-title);
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.gartic-entry-text.auto {
  color: var(--text-3);
  font-style: italic;
  font-weight: 500;
}
.gartic-entry-img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border-radius: var(--r-xl);
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.06),
    0 12px 32px rgba(20, 24, 40, 0.15);
}

/* --- Notifications ------------------------------------------------------------------ */

.gartic-toast-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #ff6fae, #ff9f0a);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.gartic-toast-icon svg {
  width: 17px;
  height: 17px;
}

/* --- Thème sombre et petits écrans -------------------------------------------------- */

:root[data-theme="dark"] .gartic-face,
:root[data-theme="dark"] .gartic-mini-face {
  background: linear-gradient(160deg, #4a3346, #2c3a57);
}
:root[data-theme="dark"] .gartic-tag.host {
  color: #2b1d00;
}

@media (max-width: 820px) {
  .gartic-lobby-grid {
    grid-template-columns: 1fr;
    overflow: auto;
  }
  .gartic-track {
    display: none;
  }
  .gartic-draw {
    flex-direction: column-reverse;
  }
  .gartic-tools {
    flex-direction: row;
    align-items: center;
    justify-content: center;
  }
  .gartic-colors {
    grid-auto-flow: column;
    grid-template-columns: none;
    grid-template-rows: repeat(2, 30px);
  }
  .gartic-sep {
    width: 1px;
    height: auto;
    align-self: stretch;
  }
  .gartic-canvas {
    flex: none;
    width: 100%;
    max-width: calc((min(800px, 100vh - 40px) - 340px) * 16 / 9);
    min-width: min(100%, 280px);
  }
  .gartic-quote {
    font-size: var(--fs-title);
  }
}

/* --- Animations --------------------------------------------------------------------- */

.gartic-body > * {
  animation: gartic-screen var(--dur-slow) var(--ease-out) both;
}
@keyframes gartic-screen {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

@keyframes gartic-pop {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
}
@keyframes gartic-bounce {
  from {
    opacity: 0;
    transform: scale(0.4);
  }
}
@keyframes gartic-rise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
}
@keyframes gartic-drop {
  from {
    opacity: 0;
    transform: translate(-50%, -8px);
  }
}
@keyframes gartic-pulse {
  50% {
    transform: scale(1.06);
  }
}
@keyframes gartic-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes gartic-blink {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}
@keyframes gartic-shake {
  20%,
  60% {
    transform: translateX(-4px);
  }
  40%,
  80% {
    transform: translateX(4px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .gartic-modal *,
  .gartic-modal *::before {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- Réactions de l'album --------------------------------------------------------------- */

.gartic-react {
  position: relative;
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.gartic-react-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--fill);
  color: var(--text-2);
  font: 600 var(--fs-footnote) / 1.4 var(--font);
  cursor: pointer;
  transition:
    background var(--dur-fast) var(--ease-out),
    transform var(--dur-press) var(--ease-out);
}
.gartic-react-btn:hover {
  background: var(--fill-2);
}
.gartic-react-btn:active {
  transform: scale(0.92);
}
.gartic-react-btn.on {
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  color: var(--text);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent);
}
.gartic-react-btn .emoji {
  font-size: 15px;
}
.gartic-burst {
  position: absolute;
  bottom: 18px;
  font-size: 22px;
  pointer-events: none;
  animation: gartic-burst 1.1s var(--ease-out) forwards;
}
@keyframes gartic-burst {
  from {
    opacity: 1;
    transform: translateY(0) scale(0.7);
  }
  to {
    opacity: 0;
    transform: translateY(-46px) scale(1.25);
  }
}
@media (prefers-reduced-motion: reduce) {
  .gartic-burst {
    animation: none;
    opacity: 0;
  }
}
