/* Grand Fantasia interface: buttons, inputs, boot screen, toasts and the shared tooltip, on the tokens of tokens.css (Esprit theme). */
/* The game font (supplied by the owner: Noto Sans Condensed Medium, SIL OFL, Latin / Greek / Cyrillic / kana subset, assets/fonts/FONT-LICENSE.txt): first of every in-game stack as `GfFont`; bold is synthesised. */
@font-face { font-family: GfFont; src: url('/client/assets/fonts/game.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: block; }
@font-face { font-family: GfCathedral; src: url('/client/assets/fonts/cathedral.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; } /* engraved gothic capitals of the theme « Cathédrale » (generated by scripts/ui/cathedral_font.py, our own drawing); loaded only when a rule of that theme uses it */
@property --cf-u { syntax: '<percentage>'; inherits: false; initial-value: 0%; } /* the unrolled part of the scroll map of the theme « Cathédrale » (themes/gothic-map.css) */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); user-select: none; -webkit-user-select: none; }
#game { position: fixed; inset: 0; }
#game canvas { display: block; }
#ui { position: fixed; inset: 0; pointer-events: none; }
#ui .screen, #ui .panel, #ui .interactive { pointer-events: auto; }
#ui #hud, #ui .overlays, #ui .overlays > * { pointer-events: none; }
#ui #hud .frame, #ui #hud .teamframes, #ui #hud .panel { pointer-events: auto; }
.hidden { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
.mute { color: var(--muted); }
input, select { font: inherit; color: var(--ink); background: #e6e5ed; border: 2px solid #524d73; border-radius: 8px; padding: 8px 10px; outline: none; box-shadow: inset 0 2px 4px rgba(40, 38, 56, 0.25); }
input:focus, select:focus { border-color: var(--accent-lo); box-shadow: inset 0 2px 4px rgba(40, 38, 56, 0.25), 0 0 0 2px rgba(143, 138, 177, 0.55); }
/* Buttons: pale steel plate with a dark rim; primary = violet; danger = ruby. */
.btn { color: var(--ink); font-weight: 700; background: linear-gradient(#d4d2e1, #9691b6 55%, #7b75a2); border: 2px solid #312e45; border-radius: 16px; padding: 7px 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), inset 0 -2px 0 rgba(49, 46, 69, 0.3), 0 2px 4px rgba(0, 0, 0, 0.4); transition: transform 0.08s, filter 0.12s; }
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); filter: brightness(0.95); }
.btn.primary { background: linear-gradient(#c9c6d9, #8f8ab1 50%, #625c89); color: #1c1a28; border-color: #312e45; text-shadow: 0 1px 0 rgba(223, 222, 233, 0.6); }
.btn.danger { background: linear-gradient(#f08a82, #c2343a 55%, #8c1f26); color: #edecf3; border-color: #4a0f12; text-shadow: 0 1px 2px #4a0f12; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; filter: grayscale(0.4); }
#boot { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 40%, #322f47, #0e0d14 70%); z-index: var(--z-boot); }
.boot-card { text-align: center; width: min(420px, 80vw); }
.logo { font-size: clamp(26px, 3.2vw, 36px); font-weight: 800; letter-spacing: 1px; margin-bottom: 18px; color: #ebeaf1; text-shadow: var(--outline), 0 0 18px rgba(143, 138, 177, 0.45); }
.logo b { color: var(--accent); }
.boot-bar { height: 12px; padding: 2px; background: #100f17; border: 2px solid var(--edge); border-radius: 8px; box-shadow: inset 0 1px 3px #000; }
.boot-bar i { display: block; height: 100%; width: 0; background: linear-gradient(#d6d4e3, #8f8ab1 50%, #504b71); border-radius: 4px; transition: width 0.15s; }
#boot-text { margin-top: 10px; color: var(--muted); font-size: var(--fs-strong); }
#toasts { position: absolute; left: 50%; top: 14%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; width: max-content; max-width: 92vw; }
.toast { position: relative; background: linear-gradient(rgba(40, 38, 56, 0.94), rgba(19, 18, 26, 0.94)); color: #ebeaf1; padding: 7px 20px; border-radius: 6px; font-size: var(--fs-lead); font-weight: 700; text-shadow: var(--outline);
  box-shadow: var(--bevel), var(--drop); animation: toastIn 0.2s ease-out; }
.toast.warn { color: #ffd98a; box-shadow: var(--bevel), 0 0 14px rgba(245, 158, 11, 0.4), var(--drop); }
.toast.bad { color: #ffb4ae; box-shadow: var(--bevel), 0 0 14px rgba(239, 68, 68, 0.45), var(--drop); }
.toast.good { color: #c9f7b8; }
/* a refused action ("Fire Arrow : Cible invalide"): plain red text, no box, readable on any ground by its dark outline */
.toast.reject { background: none; box-shadow: none; border-radius: 0; padding: 1px 8px; color: #ff4a3d; font-size: calc(15px * var(--ui-text)); text-shadow: -1px -1px 0 #2a0600, 1px -1px 0 #2a0600, -1px 1px 0 #2a0600, 1px 1px 0 #2a0600, 0 2px 4px rgba(0, 0, 0, 0.8); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
/* Tooltip: translucent dark plate with a lilac rim, rarity-coloured title, white values (Screenchots weapons / skills). */
#tooltip { position: fixed; left: 0; top: 0; z-index: var(--z-tooltip); /* always above every window, whatever the focus order (GfWindow raises its z-index inline) */  max-width: min(340px, 90vw); background: linear-gradient(rgba(49, 47, 65, 0.95), rgba(24, 23, 34, 0.96)); color: #ebeaf1; border-radius: 6px; padding: 10px 13px; font-size: var(--fs-strong); line-height: 1.4; pointer-events: none;
  box-shadow: 0 0 0 2px var(--surface-deep), inset 0 0 0 1px #bbb8d0, inset 0 0 0 2px #3c3854, var(--drop); }
#tooltip h4, .link-card h4 { margin: 0 0 4px; font-size: calc(15px * var(--ui-text)); color: #8e89b0; text-shadow: 0 1px 2px #000; }
#tooltip .sk-dot, .link-card .sk-dot { display: inline-block; width: 9px; height: 9px; margin-right: 7px; transform: rotate(45deg); border: 1px solid #100f17; box-shadow: 0 0 5px currentColor; vertical-align: 1px; }
#tooltip .row, .link-card .row { display: flex; justify-content: space-between; gap: 14px; color: #b4b1cb; }
#tooltip .row span:last-child, .link-card .row span:last-child { color: #fff; text-align: right; }
#tooltip .row.on span, .link-card .row.on span { color: #9ae67a; }
#tooltip .row.bad span, .link-card .row.bad span { color: #f57a7c; font-weight: 600; }
#tooltip .row span.fort-bonus, .link-card .row span.fort-bonus, .ms-info .row span.fort-bonus { color: #7be07b; font-weight: 600; } /* the fortification gain after the original number: "120 (+36)" */
#tooltip h4.setname, .link-card h4.setname { color: #7ee9d6; font-size: var(--fs-strong); margin-top: 8px; }
#tooltip p, .link-card p { margin: 6px 0 0; color: #dad8e5; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(40, 38, 56, 0.15); border-radius: 5px; }
::-webkit-scrollbar-thumb { background: linear-gradient(90deg, #908bb2, #605a88); border: 1px solid #312e45; border-radius: 5px; }
