/* Esprit rémanent windows (F1 / F2 / F3, P): a fixed-size frame whatever the tab (reference: Screenchots Ui sprite window): tabs, a 290 px pane, the button zone at the bottom. */
.sp-body { padding: 6px 8px 8px; }
.sp-pane { position: relative; height: 290px; overflow: hidden; border-radius: 6px; }
.sp-footwrap { margin-top: 6px; }
.sp-pane.sp-popup { height: 400px; }
.sp-popstatus { margin-top: 6px; padding: 5px 6px; background: var(--gf-paper-dark); border: 1px solid #a88a58; border-radius: 6px; }
.sp-emptyslot { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; text-align: center; color: #7a6544; padding: 0 24px; background: var(--gf-paper-dark); border: 1px solid #a88a58; border-radius: 6px; box-sizing: border-box; }
.sp-big { font-size: 38px; color: #b9a06a; }
/* Esprit tab: the cabin stage */
.sp-stage { position: relative; height: 100%; border: 2px solid #5b3a18; border-radius: 6px; overflow: hidden; background: #2a1c12; box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.45); box-sizing: border-box; }
.sp-canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.sp-canvas:active { cursor: grabbing; }
.sp-stage.away .sp-canvas { filter: grayscale(0.5) brightness(0.85); }
.sp-stage-note { position: absolute; left: 0; right: 0; bottom: 4px; text-align: center; font-size: 11px; color: #f7ecd2; text-shadow: 0 1px 2px #000; pointer-events: none; }
.sp-stage.away .sp-stage-note { color: #ffd84a; }
.sp-bubble { position: absolute; left: 14px; right: 14px; top: 34px; padding: 10px 12px; text-align: center; font-size: 13px; line-height: 1.35; color: #f4ead2; background: rgba(60, 46, 36, 0.86); border: 1px solid #8a6a46; border-radius: 6px; pointer-events: none; }
.sp-bubble.hidden { display: none; }
.sp-corners { position: absolute; right: 6px; bottom: 22px; display: flex; flex-direction: column; gap: 4px; }
.sp-corner { width: 26px; height: 26px; padding: 0; font-size: 14px; line-height: 1; color: #4a2f14; background: linear-gradient(#f0e1b8, #c3a96f); border: 2px solid #7a5a2a; border-radius: 6px; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7); }
.sp-corner:hover:not(:disabled) { background: linear-gradient(#f4e4bb, #d6bd82); }
.sp-corner:disabled { opacity: 0.45; cursor: not-allowed; }
.sp-corner.on { background: linear-gradient(#d5eccb, #8fcb7f); border-color: #3a7a2a; }
/* Button zone */
.sp-foot { display: flex; gap: 6px; height: 104px; }
.sp-cmds { display: flex; flex-direction: column; gap: 3px; width: 112px; }
.sp-side { flex: 1; display: flex; flex-direction: column; gap: 3px; padding: 4px; min-width: 0; background: var(--gf-paper-dark); border: 1px solid #a88a58; border-radius: 6px; }
.sp-top { display: flex; gap: 4px; }
.sp-bbtn { flex: 1; min-width: 0; height: 22px; padding: 0 4px; font: inherit; font-size: 11px; font-weight: 700; color: #4a2f14; background: linear-gradient(#f0e1b8, #c3a96f); border: 2px solid #7a5a2a; border-radius: 6px; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 1px 2px rgba(0, 0, 0, 0.3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-bbtn:hover:not(:disabled) { background: linear-gradient(#f4e4bb, #d6bd82); }
.sp-top .sp-bbtn { padding: 0 2px; font-size: 10px; height: 20px; }
.sp-bbtn.on { background: linear-gradient(#d5eccb, #8fcb7f); border-color: #3a7a2a; }
.sp-bbtn.wip, .sp-bbtn:disabled { opacity: 0.5; cursor: not-allowed; }
.sp-job { display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
.sp-job.idle { opacity: 0.7; }
.sp-job-t { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-job-s { color: #6a5230; font-size: 11px; }
.sp-job-bar { height: 8px; background: #3a2a18; border-radius: 4px; overflow: hidden; box-shadow: inset 0 1px 2px #000; }
.sp-job-bar i { display: block; height: 100%; background: linear-gradient(#8fe08a, #3fbf4a); }
/* Détail tab (reference: name plate, stars + experience bar, bars and four skill lines on the left, 2 x 2 worn places, an arrow and the three cabin places on the right) */
.sp-detail { display: flex; flex-direction: column; gap: 5px; height: 100%; }
.sp-plate { align-self: center; min-width: 190px; padding: 3px 22px; text-align: center; font-weight: 800; font-size: 14px; color: #4a2f14; background: linear-gradient(#f3e6c4, #d2b983); border: 2px solid #8a6636; border-radius: 14px; box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(0, 0, 0, 0.3); }
.sp-lvrow { display: flex; align-items: center; gap: 6px; padding: 0 4px; }
.sp-lvrow .sp-bar { flex: 1; height: 12px; }
.sp-lvrow .sp-bar span { line-height: 12px; font-size: 10px; }
.sp-stars { display: flex; gap: 1px; font-style: normal; color: #8a7a5a; }
.sp-stars i { font-style: normal; font-size: 16px; line-height: 1; }
.sp-stars i.on { color: #ffc21a; text-shadow: 0 0 2px #a56a00; }
.sp-cols { display: flex; gap: 8px; flex: 1; min-height: 0; }
.sp-dl { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 4px; background: var(--gf-paper-dark); border: 1px solid #a88a58; border-radius: 6px; box-sizing: border-box; }
.sp-dr { width: 150px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; background: var(--gf-paper-dark); border: 1px solid #a88a58; border-radius: 6px; box-sizing: border-box; }
.sp-barrow { display: flex; align-items: center; gap: 4px; }
.sp-barrow .sp-bar { flex: 1; }
.sp-bar { position: relative; height: 16px; background: #3a2a18; border-radius: 8px; overflow: hidden; box-shadow: inset 0 1px 2px #000; }
.sp-bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(#8ec5ff, #3d7fd6); }
.sp-bar.xp i { background: linear-gradient(#ffe98a, #e0a91e); }
.sp-bar span { position: absolute; inset: 0; text-align: center; font-size: 11px; line-height: 16px; font-weight: 700; color: #fff; text-shadow: 0 1px 1px #000; }
.sp-mini { padding: 0 5px; height: 20px; font-size: 12px; background: linear-gradient(#f0e1b8, #c3a96f); border: 2px solid #7a5a2a; border-radius: 8px; cursor: pointer; }
.sp-mini:disabled { opacity: 0.45; cursor: not-allowed; }
.sp-skills { display: flex; flex-direction: column; gap: 4px; }
.sp-skill { display: flex; align-items: center; gap: 6px; }
.sp-skill.off { opacity: 0.4; }
.sp-sk-i { position: relative; display: flex; width: 38px; height: 38px; flex: none; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 40%, #e3d8ff, var(--gf-tile)); border: 2px solid var(--gf-tile-edge); border-radius: 5px; box-sizing: border-box; }
.sp-sk-i b { position: absolute; right: 2px; bottom: 0; font-size: 12px; color: #fff; text-shadow: 0 0 3px #000, 0 0 3px #000; }
.sp-sk-r { flex: 1; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; min-width: 0; }
.sp-sk-n { font-size: 13px; font-weight: 800; color: #4a2f14; }
.sp-sk-bar { align-self: stretch; height: 5px; background: #3a2a18; border-radius: 3px; overflow: hidden; }
.sp-sk-bar i { display: block; height: 100%; background: linear-gradient(#c9a3ff, #8a4fd6); }
.sp-eq { display: grid; grid-template-columns: repeat(2, 48px); gap: 6px 8px; }
.sp-eq .gf-tile { width: 44px; height: 44px; }
.sp-eq .gf-tile img { width: 38px; height: 38px; }
.sp-sep { align-self: stretch; height: 0; margin: 8px 4px; border-top: 2px solid #a88a58; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6); }
.sp-cabin { display: grid; grid-template-columns: repeat(3, 40px); gap: 0 2px; align-items: start; }
.sp-cabin .gf-tile { width: 38px; height: 38px; }

/* Collecte / Fabrication pop-ups (reference: the original Collect window): list + filters on the left, detail on the right, OK / Fermer under them */
.sp-work { display: flex; flex-direction: column; gap: 6px; height: 100%; }
.sp-empty { margin: auto; text-align: center; }
.sp-cols { flex: 1; display: flex; gap: 8px; min-height: 0; }
.sp-cl, .sp-cr { display: flex; flex-direction: column; min-height: 0; padding: 6px; background: var(--gf-paper-dark); border: 1px solid #a88a58; border-radius: 6px; box-sizing: border-box; }
.sp-cl { width: 268px; flex: none; gap: 4px; }
.sp-cr { flex: 1; min-width: 0; gap: 3px; overflow-y: auto; }
.sp-clhead { display: flex; justify-content: space-between; align-items: flex-start; font-size: 13px; color: #4a2f14; }
.spw-filters { display: flex; flex-direction: column; font-size: 11px; color: #4a2f14; }
.spw-filter { display: flex; align-items: center; gap: 4px; cursor: pointer; }
.spw-filter input { width: 13px; height: 13px; margin: 0; padding: 0; border: 0; box-shadow: none; appearance: auto; flex: none; }
.sp-wlist { flex: 1; overflow-y: auto; min-height: 0; padding: 3px; background: #e6d8b6; border: 1px solid #a88a58; border-radius: 5px; }
.sp-gh { display: flex; align-items: center; gap: 5px; margin: 2px 0; font-size: 12px; color: #4a2f14; cursor: pointer; user-select: none; }
.sp-pm { width: 12px; text-align: center; }
.sp-wrow { padding: 2px 6px 2px 18px; font-size: 12px; color: #3a2410; border-radius: 3px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-wrow:hover { background: #f3e8c8; }
.sp-wrow.sel { background: #fbf3dc; box-shadow: inset 0 0 0 1px #c99a2e; font-weight: 700; }
.sp-wrow.bad { color: #8a6a4a; }
.sp-cr h6 { margin: 4px 0 0; font-size: 12px; color: #8a5a10; }
.sp-desc { margin: 0 0 2px; font-size: 11px; line-height: 1.35; color: #3a2410; }
.sp-gets { display: flex; flex-direction: column; gap: 4px; }
.sp-get { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.sp-gtile { position: relative; width: 36px; height: 36px; flex: none; background: #2b2118; border: 1px solid #7a5a2a; border-radius: 4px; }
.sp-gtile img { width: 34px; height: 34px; display: block; margin: 1px; }
.sp-qty { position: absolute; right: -4px; bottom: -4px; min-width: 16px; padding: 0 3px; font-size: 10px; font-weight: 800; line-height: 16px; text-align: center; color: #2a1a05; background: #f0a060; border-radius: 8px; }
.sp-gname { font-weight: 700; color: #3a2410; }
.sp-needs p { margin: 0; font-size: 11px; }
.sp-mats { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.sp-mat { display: flex; align-items: center; gap: 6px; font-size: 11px; }
.sp-mat .sp-qty { right: -6px; }
.sp-mat.short .sp-qty { color: #fff; background: #c0392b; }
.sp-prob { margin: 2px 0; font-size: 11px; font-weight: 700; color: #b02f2f; }
.sp-cost { margin-top: auto; padding-top: 4px; }
.sp-costh, .sp-costv { display: flex; justify-content: space-between; align-items: center; }
.sp-time { font-size: 12px; font-weight: 700; color: #3a2410; }
.sp-wbtns { display: flex; justify-content: flex-end; gap: 8px; }
.sp-wip { padding: 3px 8px; font-size: 11px; color: #5a3a10; background: #f6e7b0; border: 1px solid #c99a2e; border-radius: 5px; }
/* The Sprite back from its mission (spriteReturn.js) */
.sp-return { position: absolute; left: 10px; right: 10px; top: 10px; z-index: 2; padding: 8px 10px; font-size: 12px; line-height: 1.35; color: #f4ead2; background: rgba(60, 46, 36, 0.92); border: 1px solid #c9a46a; border-radius: 8px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); }
.sp-return p { margin: 0 0 4px; }
.sp-rfoot { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; margin-top: 6px; }
.sp-rtiles { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-rtile { position: relative; width: 36px; height: 36px; background: #2b2118; border: 1px solid #c9a46a; border-radius: 4px; }
.sp-rtile img { width: 34px; height: 34px; display: block; margin: 1px; }
.sp-rbtns { display: flex; flex-direction: column; gap: 4px; width: 92px; }
/* Slot picker (overlay of the pane) */
.sp-picker { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; gap: 4px; padding: 6px; background: var(--gf-paper); border: 2px solid #5b3a18; border-radius: 6px; box-sizing: border-box; }
.sp-picker-h { display: flex; justify-content: space-between; align-items: center; }
.sp-x { width: 20px; height: 20px; padding: 0; border: 2px solid #3b2412; border-radius: 5px; background: linear-gradient(#f6ead0, #cdb27a); cursor: pointer; font-weight: 800; }
.sp-off { align-self: flex-start; }
.sp-list { display: flex; flex-direction: column; gap: 3px; flex: 1; overflow-y: auto; min-height: 0; }
.sp-item { display: flex; align-items: center; gap: 8px; padding: 3px 6px; background: #e6d8b6; border: 1px solid #a88a58; border-radius: 5px; cursor: pointer; }
.sp-item:hover { border-color: #f6c453; }
.sp-item img { width: 30px; height: 30px; flex: none; }
.sp-info { display: flex; flex-direction: column; min-width: 0; font-size: 11px; }
.sp-info b { font-size: 12px; }
/* Initial sprite kit choice (character creation) */
.kit-picker { margin: 8px 0; }
.kit-grid { display: flex; flex-wrap: wrap; gap: 4px; }
.kit-chip { display: flex; align-items: center; gap: 5px; padding: 2px 8px; font: inherit; font-size: 12px; color: #4a2f14; background: #e6d8b6; border: 1px solid #a88a58; border-radius: 12px; cursor: pointer; }
.kit-chip i { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5); }
.kit-chip.on { background: #d5eccb; border-color: #3fbf4a; font-weight: 700; }
.kit-desc { margin: 4px 0 0; }
.sp-bbtn.gap { visibility: hidden; border: 0; }
