.tm-status-overlay { position:fixed; top:0; right:0; bottom:0; left:0; width:100%; height:100%; z-index:20000; background:rgba(20,52,72,.68); color:#c5d8e8; font:14px 'Segoe UI',Arial,sans-serif; user-select:none; }
.tm-status-overlay * { box-sizing:border-box; }
.tm-st-panel { position:absolute; left:50%; top:50%; width:1200px; height:680px; padding:32px 48px 30px; background:url('../img/ui/sapphire/panel-v1.png') center/100% 100% no-repeat; border-radius:24px; box-shadow:0 24px 80px #05244080; transform-origin:center; display:flex; flex-direction:column; }
.tm-st-header { display:flex; justify-content:space-between; align-items:center; height:80px; flex-shrink:0; padding:0 6px 8px; }
.tm-st-eyebrow { color:#eafaff; font-size:10px; font-weight:600; letter-spacing:2.5px; }
.tm-st-header h1 { color:#fff; text-shadow:0 2px #2b77ad; margin:5px 0 0; font-size:28px; letter-spacing:.5px; }
.tm-st-header-actions { display:flex; align-items:center; grid-gap:20px;gap:20px; }
.tm-st-wallet { display:flex; align-items:center; color:#fff8ca; grid-gap:8px;gap:8px; font-size:18px; text-shadow:0 1px #5089a2; }
.tm-st-wallet .tm-st-icon { width:32px; height:32px; }
.tm-status-overlay button,.tm-status-overlay input { font:inherit; }
.tm-status-overlay button { cursor:pointer; transition:background .15s,border-color .15s; }
.tm-status-overlay button:focus-visible,.tm-status-overlay input:focus { outline:2px solid #268fc5; outline-offset:3px; }
.tm-st-close { color:#fff; background:#102b46; border:1px solid #ffd5bf; border-radius:9px; width:36px; height:36px; font-size:26px!important; }
.tm-st-close:hover { background:#102b46; }
.tm-st-body { display:grid; grid-template-columns:294px 366px minmax(0,1fr); grid-gap:18px;gap:18px; flex:1; min-height:0; padding:16px 5px 0; margin-bottom:20px; }
.tm-st-character,.tm-st-attributes,.tm-st-skills { min-width:0; min-height:0; }
.tm-st-identity { display:flex; align-items:center; grid-gap:12px;gap:12px; height:54px; }
.tm-st-level { flex-shrink:0; border:1px solid #e6c56d; border-radius:10px; padding:10px 11px; background:linear-gradient(#102b46,#102b46); color:#f4a29b; font-size:16px; font-weight:800; box-shadow:inset 0 1px #fff; }
.tm-st-name { font-size:23px; margin:0; color:#c5d8e8; overflow-wrap:anywhere; max-height:30px; overflow:hidden; }
.tm-st-job { color:#e2eaf0; margin:4px 0 0; font-size:12px; }
.tm-st-stage { height:260px; position:relative; margin:10px 0 14px; border-radius:14px; border:1px solid #b4d5df; background:#102b46 url('../img/ui/sapphire/card-v1.png') center 72%/cover no-repeat; overflow:hidden; box-shadow:inset 0 0 24px #e7fbff60; }
.tm-st-battler { position:absolute; top:-2px; left:50%; transform:translateX(-50%); width:248px; height:248px; image-rendering:pixelated; filter:drop-shadow(0 4px 3px #45788e45); }
.tm-st-battler-note { position:absolute; top:45%; left:10px; right:10px; text-align:center; color:#e2eaf0; font-size:12px; }
.tm-st-pose-buttons { position:absolute; bottom:8px; left:0; right:0; display:flex; justify-content:center; grid-gap:5px;gap:5px; }
.tm-st-pose-buttons button { background:#102b46; border:1px solid #a1c5d1; color:#e2eaf0; border-radius:8px; padding:4px 11px; font-size:10px; }
.tm-st-pose-buttons button.active { background:#102b46; border-color:#d5b75e; color:#f4a29b; }
.tm-st-vital { margin-top:10px; }
.tm-st-vital>div:first-child,.tm-st-exp>div:first-child { display:flex; justify-content:space-between; align-items:center; margin-bottom:5px; font-size:11px; }
.tm-st-vital>div:first-child>span { font-weight:800; }.tm-st-vital strong { font-weight:600; }
.tm-st-bar { height:8px; border:1px solid #b8d1d7; background:#102b46; border-radius:8px; overflow:hidden; box-shadow:inset 0 1px 3px #5b839622; }
.tm-st-bar i { display:block; height:100%; border-radius:8px; background:linear-gradient(#102b46,#102b46); transition:width .25s; }
.tm-st-vital.hp .tm-st-bar i { background:linear-gradient(#102b46,#102b46); }
.tm-st-vital.hp>div:first-child>span { color:#f4a29b; }.tm-st-vital.mp>div:first-child>span { color:#e2eaf0; }
.tm-st-exp { margin-top:12px; color:#f0ce83; }.tm-st-exp>div:first-child { font-size:10px; }.tm-st-exp .tm-st-bar { height:6px; }.tm-st-exp .tm-st-bar i { background:linear-gradient(#ffe486,#c78b24); }
.tm-st-attributes,.tm-st-skills { border-left:1px solid #c7d9de; padding-left:18px; }
.tm-st-section-heading { display:flex; justify-content:space-between; align-items:center; grid-gap:8px;gap:8px; height:35px; }
.tm-st-section-heading h2 { font-size:19px; margin:0; color:#c5d8e8; }
.tm-st-tag { font-size:9px; font-weight:700; padding:5px 7px; color:#e2eaf0; background:#102b46; border:1px solid #bedce6; border-radius:7px; white-space:nowrap; }
.tm-st-radar { margin:5px 0 12px; border:1px solid #d2e2e5; background:radial-gradient(ellipse,#102b46,#102b46); border-radius:14px; padding:0 0 8px; }
.tm-st-chart { display:block; width:278px; height:196px; margin:0 auto; }
.tm-st-chart-scale { text-align:center; font-size:9px; color:#e2eaf0; }
.tm-st-stats { display:grid; grid-template-columns:1fr 1fr; grid-gap:7px;gap:7px; }
.tm-st-stat { display:flex; align-items:center; grid-gap:7px;gap:7px; height:34px; border:1px solid #e3ddc8; border-radius:9px; background:#102b46; padding:3px 8px 3px 5px; box-shadow:0 2px 3px #8e9eab08; }
.tm-st-icon { position:relative; display:block; width:28px; height:28px; overflow:hidden; flex-shrink:0; }
.tm-st-icon img { position:absolute; width:400%; height:400%; max-width:none; pointer-events:none; }
.tm-st-stat>span:not(.tm-st-icon) { color:#e2eaf0; font-size:10px; font-weight:600; }.tm-st-stat strong { margin-left:auto; color:#c5d8e8; font-size:14px; }
.tm-st-stat-note { margin:10px 0 0; font-size:10px; color:#e2eaf0; text-align:center; }
.tm-st-skills { display:flex; flex-direction:column; }
.tm-st-search { margin-top:10px; width:100%; flex-shrink:0; height:33px; padding:0 10px; border:1px solid #b6d1dc; border-radius:8px; background:#102b46; color:#c5d8e8; font-size:12px!important; }
.tm-st-search::placeholder { color:#e2eaf0; }
.tm-st-filters { display:flex; flex-shrink:0; grid-gap:5px;gap:5px; overflow-x:auto; padding:10px 1px; min-height:42px; scrollbar-width:thin; }
.tm-st-filter { padding:4px 10px; font-size:11px!important; border:1px solid #d0dfe4; background:#102b46; color:#e2eaf0; border-radius:7px; white-space:nowrap; }.tm-st-filter.active { background:#102b46; color:#e2eaf0; border-color:#91cce1; }
.tm-st-skill-list { flex:1; min-height:0; overflow:auto; padding:3px 3px 3px 0; scrollbar-width:thin; scrollbar-color:#a6c9d8 #eef5f5; }
.tm-st-skill { width:100%; display:flex; align-items:center; grid-gap:10px;gap:10px; padding:8px 10px; background:#102b46; color:#c5d8e8; border:1px solid #dedfcd; border-radius:10px; margin-bottom:7px; text-align:left; min-height:58px; }
.tm-st-skill:hover { background:#102b46; border-color:#92c6df; }.tm-st-skill.selected { background:#102b46; border-color:#73b9d4; box-shadow:inset 3px 0 #4cafd2; }
.tm-st-skill .tm-st-icon { width:34px; height:34px; }.tm-st-skill-text { flex:1; min-width:0; }.tm-st-skill-text strong { display:block; font-size:12px; overflow-wrap:anywhere; }.tm-st-skill-text small { display:block; font-size:10px; color:#e2eaf0; margin-top:3px; }
.tm-st-skill-cost { color:#e2eaf0; font-size:9px; max-width:78px; text-align:right; }
.tm-st-skill-detail { flex-shrink:0; margin-top:8px; height:119px; padding:11px 13px; background:#102b46; border:1px solid #e8d5aa; border-radius:11px; overflow:auto; scrollbar-width:thin; }
.tm-st-skill-detail>strong { font-size:12px; color:#f4a29b; }.tm-st-skill-detail p { white-space:pre-wrap; overflow-wrap:anywhere; color:#e2eaf0; font-size:11px; line-height:1.6; margin:6px 0; }.tm-st-detail-meta { font-size:9px; color:#f0ce83; }
.tm-st-empty { color:#e2eaf0; text-align:center; font-size:12px; padding:18px 12px; line-height:1.7; }
.tm-st-footer { height:41px; flex-shrink:0; display:flex; align-items:center; justify-content:space-between; padding:0 6px; margin-top:10px; font-size:11px; color:#e2eaf0; }
.tm-st-back { background:linear-gradient(#102b46,#102b46); border:1px solid #9bc7d7; color:#e2eaf0; border-radius:8px; padding:9px 15px; font-size:11px!important; }.tm-st-back:hover { background:#102b46; }
@media (prefers-reduced-motion:reduce) { .tm-st-bar i { transition:none; } }

/* Match the generated frame's header/body/footer without placing text on gold seams. */
.tm-st-panel { padding:0 52px; color:#c5d8e8; }
.tm-st-panel>.tm-st-header { position:absolute; top:6%; left:52px; right:52px; height:11%; padding:7px 14px; background:linear-gradient(90deg,rgba(10,57,96,.78),rgba(10,57,96,.25)); border-radius:10px; }
.tm-st-eyebrow { font-size:11px; line-height:15px; color:#fff; letter-spacing:1.5px; }
.tm-st-header h1 { font-size:27px; line-height:34px; margin:2px 0 0; text-shadow:0 1px 2px #123b5a; }
.tm-st-panel>.tm-st-body,.tm-st-panel>.tm-sk-body,.tm-st-panel>.tm-cloth-body { position:absolute; left:52px; right:52px; top:19%; bottom:16%; margin:0; padding:0; }
.tm-st-panel>.tm-st-footer { position:absolute; left:52px; right:52px; top:86%; height:7%; margin:0; padding:4px 12px; color:#c5d8e8; background:rgba(16,43,70,.48); border-radius:9px; font-size:12px; line-height:18px; }
.tm-st-header-actions>*+* { margin-left:16px; }.tm-st-header-actions { gap:0; grid-gap:0; }
.tm-st-identity>*+* { margin-left:12px; }.tm-st-identity { gap:0; grid-gap:0; }
.tm-st-stat>.tm-st-icon { margin-right:7px; }.tm-st-stat { gap:0; grid-gap:0; }
.tm-st-section-heading h2 { font-size:18px; color:#c5d8e8; }
.tm-st-tag { font-size:11px; color:#c5d8e8; background:#102b46; }
.tm-st-job,.tm-st-chart-scale,.tm-st-stat-note,.tm-st-stat>span:not(.tm-st-icon),.tm-st-skill-text small,.tm-st-skill-cost,.tm-st-detail-meta,.tm-st-empty { color:#c5d8e8; font-size:12px; }
.tm-st-skill-detail p { color:#c5d8e8; font-size:12px; }.tm-st-skill-detail>strong { color:#f4a29b; }
.tm-st-skill .tm-st-icon { margin-right:10px; }.tm-st-skill { gap:0; grid-gap:0; }
.tm-st-filter { color:#c5d8e8; font-size:12px!important; }.tm-st-filter+.tm-st-filter { margin-left:5px; }
.tm-st-back { min-height:40px; color:#c5d8e8; background:#102b46; border-color:#789aaf; font-size:13px!important; line-height:18px; padding:9px 14px; }
.tm-st-panel button:focus,.tm-st-panel input:focus,.tm-st-panel select:focus { outline:2px solid #165b8c; outline-offset:2px; }
.tm-st-character{overflow-y:auto;padding-bottom:8px}
.tm-st-footer-actions{display:flex;align-items:center}.tm-st-footer-actions>button+button{margin-left:10px}

/* Uses the existing generated status frame and button artwork. */
.tm-st-member-picker{display:flex;flex-direction:column;font-size:11px;color:#fff;min-width:180px;max-width:250px}
.tm-st-member-select{font:600 14px 'Segoe UI',Arial,sans-serif;min-height:36px;width:100%;padding:7px 28px 7px 12px;border:1px solid #d9be77;border-radius:8px;color:#c5d8e8;background:#102b46 url('../img/ui/sapphire/card-v1.png') center/100% 100% no-repeat}
.tm-st-member-select:disabled{opacity:.8}.tm-st-loading .tm-st-body{opacity:.45;pointer-events:none}
.tm-st-equipment h3{font-size:14px;color:#c5d8e8;margin:14px 0 6px}.tm-st-equipment-row{padding:6px 0;border-bottom:1px solid #cfdbd9;font-size:11px;display:flex;flex-direction:column;gap:3px}.tm-st-equipment-row span{color:#e2eaf0}.tm-st-equipment-row strong{color:#c5d8e8;overflow-wrap:anywhere}
.tm-st-observation{font-size:11px;color:#e2eaf0;margin:10px 0 0}.tm-st-wallet[hidden]{display:none}.tm-st-feedback{max-width:680px}

#tm-status-hud .tm-st-attributes{overflow-y:auto;padding-bottom:10px}

#tm-status-hud .tm-st-panel{background:url('../img/ui/sapphire/panel-v1.png') center/100% 100% no-repeat;isolation:isolate}
#tm-status-hud .tm-st-bottom-wallet{position:absolute;right:66px;bottom:7%;color:#f4a29b;text-shadow:none;font-size:18px}
#tm-status-hud .tm-st-feedback{position:absolute;left:66px;bottom:8%;color:#f4a29b;font-size:12px;max-width:650px}
#tm-status-hud .tm-st-feedback:empty{display:none}
#tm-status-hud .tm-st-member-picker{flex-direction:row;align-items:center;min-width:0;max-width:none;white-space:nowrap}
#tm-status-hud .tm-st-member-picker>span{margin-right:9px;font-size:12px}
#tm-status-hud .tm-st-member-select{width:210px;padding-left:24px}
#tm-status-hud .tm-st-close{display:flex;align-items:center;justify-content:center;padding:0 0 4px;line-height:1}

.tm-st-equipment-row strong{display:flex;align-items:center;gap:7px;min-width:0}
.tm-st-equipment-row .tm-st-item-icon{display:inline-block;position:relative;width:28px;height:28px;overflow:hidden;flex-shrink:0}
.tm-st-item-icon img{position:absolute;max-width:none}
/* AGI effects as short points under the stat grid. */
#tm-status-hud .tm-st-stat-note{display:flex;flex-direction:column;align-items:flex-start;gap:2px;text-align:left}
#tm-status-hud .tm-st-stat-note:empty{display:none}
#tm-status-hud .tm-st-stat-note span::before{content:'• ';color:#f0ce83}
/* Selected skill detail in the bottom band, left of the gold. */
#tm-status-hud .tm-st-skill-detail.tm-st-bottom-detail{position:absolute;left:8%;right:24%;bottom:5.5%;height:9.5%!important;margin:0!important;padding:0!important;background:none!important;border:0!important;border-radius:0;overflow:hidden;display:flex;flex-direction:column;justify-content:center;box-sizing:border-box}
#tm-status-hud .tm-st-bottom-detail .tm-st-detail-head{display:flex;align-items:baseline;gap:10px;min-width:0}
#tm-status-hud .tm-st-bottom-detail .tm-st-detail-head strong{flex-shrink:0;color:#f0ce83}
#tm-status-hud .tm-st-bottom-detail .tm-st-detail-meta{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#tm-status-hud .tm-st-bottom-detail p{margin:2px 0 0!important;white-space:normal;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
#tm-status-hud .tm-st-feedback:not(:empty)~.tm-st-bottom-detail{visibility:hidden}
