/* 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: 456px; }
.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 tabs */
.sp-work { display: flex; flex-direction: column; gap: 6px; height: 100%; }
.sp-empty { margin: auto; text-align: center; }
.sp-wlist { flex: 1; overflow-y: auto; padding-right: 2px; background: var(--gf-paper-dark); border: 1px solid #a88a58; border-radius: 6px; padding: 4px; min-height: 0; }
.sp-wgroup h5 { margin: 4px 0 3px; font-size: 12px; color: #6a4a22; }
.sp-wrow { padding: 3px 8px; margin-bottom: 3px; background: #e6d8b6; border: 1px solid #a88a58; border-radius: 5px; cursor: pointer; }
.sp-wrow:hover { border-color: #f6c453; }
.sp-wrow.sel { border-color: #3fbf4a; background: #d5eccb; }
.sp-wrow.bad .sp-w1 b { color: #8a5a3a; }
.sp-w1 { display: flex; justify-content: space-between; font-size: 12px; }
.sp-lv { color: #7a5a22; font-size: 11px; }
.sp-w2 { font-size: 11px; color: #6a5230; }
.sp-wsel { font-size: 11px; color: #4a2f14; min-height: 30px; }
.sp-wsel .bad { color: #b02f2f; font-weight: 700; }
.sp-go { align-self: center; }
.sp-wip { padding: 4px 8px; font-size: 11px; color: #5a3a10; background: #f6e7b0; border: 1px solid #c99a2e; border-radius: 5px; }
/* 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; }
