/* In-game panels (Esc menu, scoreboard, results, disconnection, settings): lavender paper card in the same steel frame as the windows,
   a steel title ribbon for the first heading, ink text; tables read on paper with team-coloured headers. */
.panel { position: relative; background: linear-gradient(rgba(217, 215, 228, 0.96), rgba(179, 175, 202, 0.96)); color: var(--ink); border-radius: 8px; padding: 16px 18px;
  box-shadow: 0 0 0 2px var(--surface-deep), 0 0 0 4px #4c476b, 0 0 0 5px var(--accent), 0 0 0 7px var(--surface-deep), inset 0 0 0 1px #eae9f0, inset 0 0 0 3px rgba(96, 90, 136, 0.5), 0 10px 30px rgba(0, 0, 0, 0.55); }
.panel h3 { margin: 14px 0 8px; font-size: var(--fs-lead); letter-spacing: 1.5px; text-transform: uppercase; color: #433e5e; }
.panel h3:first-child { margin: -16px -18px 12px; padding: 7px 14px; font-size: calc(15px * var(--ui-text)); letter-spacing: 1px; color: var(--gf-title, #ffe44d); text-shadow: 0 1px 2px #1c1a28; border-radius: 6px 6px 0 0;
  background: linear-gradient(#676091, #433e5e); box-shadow: inset 0 1px 0 rgba(201, 198, 217, 0.6), 0 1px 0 var(--surface-deep); }
.panel .mute { color: #55526d; }
.panel.modal { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: var(--z-panel); min-width: min(320px, 92vw); max-width: 92vw; max-height: 86vh; overflow: auto; pointer-events: auto; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin: -16px -18px 10px; padding: 5px 8px 5px 14px; border-radius: 6px 6px 0 0; background: linear-gradient(#676091, #433e5e); box-shadow: inset 0 1px 0 rgba(201, 198, 217, 0.6); }
.modal-head h3, .panel .modal-head h3:first-child { margin: 0; padding: 0; background: none; box-shadow: none; }
.modal-head .btn { padding: 1px 9px; font-size: var(--fs-body); border-radius: 6px; }
/* The Esc menu: a small "Système" window of the interface theme (it does not stop the character) */
.gfw.menu { left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: var(--z-menu); width: 150px; }
#ui .overlays > .gfw.menu { pointer-events: auto; } /* (base.css switches the overlays' children off) */
.gfw.menu .gfw-head { cursor: default; }
.gfw.menu .gfw-body { display: flex; flex-direction: column; gap: 5px; padding: 8px 10px 10px; text-align: center; }
.gfw.menu .btn { padding: 2px 8px; font-size: var(--fs-body); font-weight: 700; line-height: 1.35; border-radius: 11px; }
.disc { text-align: center; }
.settings .keys { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 22px; margin: 8px 0 12px; }
.key-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: var(--fs-strong); }
.keybtn { min-width: 70px; padding: 4px 10px; font-weight: 700; color: var(--ink); background: linear-gradient(#d4d2e1, #9691b6); border: 2px solid #312e45; border-radius: 6px; }
.keybtn.wait { border-color: #625c89; color: #b6560a; }
.row-check { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-size: var(--fs-lead); }
.settings h4 { color: #433e5e; margin: 14px 0 4px; }
#ui .scoreboard { pointer-events: none; position: absolute; left: 50%; top: clamp(70px, 12vh, 120px); transform: translateX(-50%); width: min(780px, 94vw); z-index: var(--z-board); }
.scoreboard .human .glyph { width: 12px; height: 12px; margin-left: 4px; vertical-align: -1px; color: #433e5e; }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-strong); margin-bottom: 10px; }
th { text-align: right; color: color-mix(in srgb, var(--tc, #433e5e) 45%, #100f17); font-weight: 800; padding: 3px 6px; border-bottom: 2px solid #716c94; }
th:first-child, td.nm { text-align: left; }
td { text-align: right; padding: 3px 6px; border-bottom: 1px solid rgba(82, 77, 115, 0.3); }
tr.me td { background: rgba(143, 138, 177, 0.35); font-weight: 700; }
td.nm { color: color-mix(in srgb, var(--tc, #282638) 45%, #100f17); font-weight: 700; }
.result { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(660px, 94vw); text-align: center; z-index: var(--z-board); }
.result h2 { font-size: clamp(32px, 4vw, 52px); font-weight: 800; margin: 0 0 4px; -webkit-text-stroke: 2px #15141e; paint-order: stroke fill; }
.result h2.win { color: var(--accent); text-shadow: 0 3px 0 #433e5e, 0 0 24px rgba(143, 138, 177, 0.7); }
.result h2.lose { color: #ff9a94; text-shadow: 0 3px 0 #5a1216; }
.result .orn { inset: -6px; }
.settings { width: min(560px, 94vw); }
.set-tabs { display: flex; gap: 4px; margin-bottom: 8px; }
.set-tabs .btn, .set-presets .btn { flex: 1; padding: 4px 8px; }
.set-tabs .btn.on, .set-presets .btn.on { background: linear-gradient(#d5eccb, #9fd48f); border-color: #3a8a2c; }
.set-presets { display: flex; gap: 4px; align-items: center; margin-bottom: 6px; }
.set-custom { padding: 0 8px; font-size: var(--fs-body); color: #66637d; }
.set-custom.on { color: #b6560a; font-weight: 700; }
.set-btns { display: flex; gap: 6px; margin-bottom: 4px; }
.set-btns .btn { padding: 4px 10px; font-size: var(--fs-body); }
.set-status { margin: 2px 0 6px; }
.set-row { display: grid; grid-template-columns: 1fr 210px; align-items: center; gap: 2px 12px; margin: 4px 0; font-size: var(--fs-strong); }
.set-row .set-label { color: #282638; }
.set-ctl select { width: 100%; }
.set-slider { display: flex; align-items: center; gap: 8px; }
.set-slider input { flex: 1; }
.set-val { width: 48px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.set-hint { grid-column: 1 / -1; margin: 0 0 2px; }
.scoreboard .mvp, .result .mvp { color: #8f8ab1; font-weight: 800; margin-left: 5px; text-shadow: 0 0 6px rgba(143, 138, 177, 0.7); }
.result .arena-pts { margin: 6px 0 0; font-weight: 800; color: #8f8ab1; text-align: center; }

.scoreboard tr.look { cursor: pointer; }
.scoreboard tr.look:hover td { background: rgba(223, 222, 233, 0.18); }
/* The generic confirmation window (ui/confirmDialog.js): above the game windows, a dimmed veil that cancels when clicked */
.confirm-veil { position: absolute; inset: 0; z-index: var(--z-modal); /* above every window: GfWindow.focus raises them one by one without a ceiling */ background: rgba(20, 12, 4, 0.45); pointer-events: auto; display: flex; align-items: center; justify-content: center; }
.panel.confirm { width: min(300px, 92vw); max-height: 80vh; overflow: auto; padding: 10px 12px; font-size: var(--fs-body); }
.panel.confirm .modal-head { margin: -10px -12px 6px; padding: 3px 6px 3px 10px; }
.panel.confirm .modal-head h3 { font-size: var(--fs-body); }
.confirm-text { margin: 2px 0 6px; line-height: 1.35; }
.confirm-btns { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; margin-top: 8px; }
.confirm-btns.stack { flex-direction: column; align-items: stretch; } /* a list of coloured choices (the copies of an object to archive) */
.confirm-btns.stack .btn { text-align: left; }
.confirm-btns .btn { padding: 3px 10px; font-size: calc(11.5px * var(--ui-text)); min-height: 0; border-radius: 6px; }
