/* Wikiclash — Défi entre amis (README §5.8). */
.df-main { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr) clamp(220px, 22vw, 300px); gap: clamp(20px, 3vw, 48px); padding: clamp(14px, 2.8vh, 28px) var(--pad-x) clamp(10px, 2vh, 18px); min-height: 0; }
.df-col { display: flex; flex-direction: column; gap: clamp(8px, 1.8vh, 14px); min-height: 0; min-width: 0; }
.df-h { display: flex; flex-direction: column; gap: 4px; border-bottom: 1px solid var(--ln); padding-bottom: 6px; }
.df-h .t { font-family: var(--serif); font-size: clamp(24px, 4.2vh, 34px); line-height: 1.05; }
.df-h .t.s { font-size: clamp(20px, 3.4vh, 26px); }
.df-col > .wc-input { width: 100%; padding: 6px 10px; }
.mut { color: var(--mut); font-size: 13px; }

/* amis */
.df-recv { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--sel2); background: var(--sel); padding: 6px 10px; font-size: 13px; margin-bottom: 6px; }
.df-recv em { font-style: normal; color: var(--mut); margin-left: 6px; }
.df-recv .ac { display: flex; gap: 10px; align-items: center; flex: none; }
.df-recv .btn { font-size: 12px; padding: 4px 10px; }
.df-list { display: flex; flex-direction: column; min-height: 0; flex: 1; border-top: 1px solid var(--bg3); }
.df-fr { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: clamp(5px, 1vh, 8px) 4px; border-bottom: 1px solid var(--bg3); flex: none; transition: background 140ms ease; }
.df-fr:hover { background: var(--bg2); }
.df-fr.off { opacity: .75; }
.df-fr .av, .df-lobby .av { display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid var(--ln); background: repeating-linear-gradient(135deg, var(--bg) 0 7px, var(--bg3) 7px 8px); font-family: var(--serif); color: var(--mut); }
.df-fr .av { width: 34px; height: 34px; font-size: 17px; }
.df-fr .av img, .df-lobby .av img { width: 100%; height: 100%; object-fit: cover; }
.df-fr .tx { display: flex; flex-direction: column; min-width: 0; }
.df-fr .nm { font-family: var(--serif); font-size: 17px; line-height: 1.15; color: var(--link); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.df-fr .sb { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.df-fr .sb i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.df-fr .bt { display: flex; gap: 8px; align-items: center; }
.df-fr .btn { font-size: 12px; padding: 4px 10px; white-space: nowrap; }
.df-fr .btn:disabled { opacity: .55; cursor: default; }
.df-fr .tag { font-size: 12px; color: var(--mut); border: 1px solid var(--ln2); padding: 2px 8px; }
.df-none { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px 4px; font-size: 13px; color: var(--sub); }
.df-none .lnk { font-size: 13px; }
[data-fnote] { min-height: 18px; }

/* lien d'invitation */
.df-gen { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; border: 1px dashed var(--ln); padding: 16px; }
.df-gen p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--sub); text-wrap: pretty; }
.df-has { display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--ln); background: var(--bg2); padding: 14px; }
.df-has .cl { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.df-code { display: flex; gap: 6px; align-items: center; perspective: 600px; }
.df-code span { width: clamp(34px, 4.6vh, 46px); height: clamp(44px, 6vh, 58px); display: flex; align-items: center; justify-content: center; background: var(--bg); border: 1px solid var(--ln); border-bottom: 3px solid var(--ink); font-family: var(--serif); font-size: clamp(24px, 3.8vh, 32px); color: var(--ink); }
.df-code span.flip { animation: dfFlip 520ms var(--ease-soft) both; animation-delay: var(--d); }
@keyframes dfFlip { 0% { transform: rotateX(90deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.df-code .dash { font-style: normal; font-family: var(--serif); font-size: 24px; color: var(--mut); }
.df-url { display: flex; align-items: stretch; border: 1px solid var(--ln); background: var(--bg); }
.df-url .u { flex: 1; min-width: 0; padding: 7px 10px; font-size: 14px; color: var(--link); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; user-select: text; }
.df-url button { border: 0; border-left: 1px solid var(--ln); background: var(--link); color: var(--on); font-weight: 700; font-size: 13px; padding: 0 14px; cursor: pointer; transition: background 200ms ease; white-space: nowrap; }
.df-url button.ok { background: var(--ok); }
.df-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12px; color: var(--mut); flex-wrap: wrap; }
.df-meta b { font-weight: 400; color: var(--ink); }
.df-meta .ac { display: flex; gap: 14px; }
.df-meta .lnk { font-size: 12px; }
.df-meta .lnk.ok { color: var(--ok); }
.df-wait { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--sub); border-top: 1px solid var(--bg3); padding-top: 10px; }
.df-wait i { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); animation: dfBlink 1.2s ease-in-out infinite; flex: none; }
@keyframes dfBlink { 50% { opacity: .3; } }
.df-join { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--bg3); padding-top: clamp(10px, 2vh, 16px); }
.df-join .r { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.df-join .wc-input { width: 150px; font-family: var(--serif); font-size: 22px; letter-spacing: .12em; text-transform: uppercase; padding: 3px 10px; }
.df-join .nt { font-size: 12px; color: var(--err); }

/* règles */
.df-rules .f { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; }
.df-rules .seg { align-self: flex-start; }
.df-rules .seg button { padding: 4px 12px; }
.df-decks { display: flex; flex-direction: column; gap: 2px; }
.df-decks button { display: flex; justify-content: space-between; gap: 8px; border: 0; background: none; padding: 0; font-family: var(--serif); font-size: 16px; font-weight: 400; color: var(--link); cursor: pointer; text-align: left; text-underline-offset: 3px; }
.df-decks button.on { color: var(--ink); text-decoration: underline; }
.df-decks button:disabled { color: var(--mut); cursor: default; }
.df-decks em { font-style: normal; font-family: var(--sans); font-size: 12px; color: var(--mut); white-space: nowrap; }
.df-decks button:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.df-box { border: 1px solid var(--ln); background: var(--bg2); padding: 8px 10px; font-size: 12px; line-height: 1.5; color: var(--sub); }

/* salon */
.df-lobby { position: absolute; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; background: rgba(var(--ovr), .92); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity 420ms ease; }
.df-lobby.on { opacity: 1; }
.df-lobby .in { display: flex; flex-direction: column; align-items: center; gap: clamp(14px, 3vh, 26px); width: min(860px, 92vw); }
.df-lobby .hd { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.df-lobby .hd .t { font-family: var(--serif); font-size: clamp(30px, 5.4vh, 44px); line-height: 1.05; }
.df-lobby .hd .s { font-size: 13px; color: var(--sub); }
.df-lobby .seats { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: clamp(14px, 3vw, 40px); width: 100%; }
.df-lobby .vs { font-family: var(--serif); font-style: italic; font-size: clamp(22px, 4vh, 32px); color: var(--mut); }
.df-lobby .seat { display: flex; flex-direction: column; align-items: center; gap: 10px; min-height: clamp(150px, 26vh, 220px); justify-content: center; border: 1px solid var(--ln); background: var(--bg); padding: clamp(12px, 2.4vh, 20px); box-shadow: var(--shadow-card); transition: border-color 300ms ease; }
.df-lobby .seat.ready { border-color: var(--ok); box-shadow: 0 0 0 1px var(--ok), var(--shadow-card); }
.df-lobby .seat .av { width: clamp(56px, 10vh, 84px); height: clamp(56px, 10vh, 84px); font-size: clamp(28px, 5vh, 40px); }
.df-lobby .seat .nm { font-family: var(--serif); font-size: clamp(20px, 3.6vh, 26px); line-height: 1; }
.df-lobby .seat .sb { font-size: 12px; color: var(--mut); }
.df-lobby .seat .rd { font-size: 13px; font-weight: 700; color: var(--mut); border: 1px solid var(--ln); padding: 2px 10px; }
.df-lobby .seat.ready .rd { color: var(--ok); border-color: var(--ok); }
.df-lobby .cd { font-family: var(--serif); font-size: clamp(40px, 8vh, 64px); line-height: 1; color: var(--link); min-height: 1em; }
.df-lobby .row { display: flex; gap: 10px; align-items: center; }
.df-lobby .row .btn { padding: 8px 20px; font-size: 14px; }
.df-lobby .row .lnk { font-size: 14px; padding: 8px 10px; }
@media (prefers-reduced-motion: reduce) { .df-code span.flip, .df-wait i { animation: none; } }
