.treasure-stage{position:relative;aspect-ratio:1.25;max-width:690px;width:100%;margin:auto;background:#b8c7f2 center/cover no-repeat;isolation:isolate}
.treasure-slot{position:absolute;transform:translate(-50%,-50%);border:0;background:none;display:flex;flex-direction:column;align-items:center;width:27%;padding:4px;color:var(--ui-fg-344c79,#344c79);cursor:pointer;gap:5px}
.treasure-slot-1{left:22%;top:54%}.treasure-slot-2{left:50%;top:73%}.treasure-slot-3{left:78%;top:54%}
.treasure-slot strong{font-size:clamp(13px,3cqw,20px);line-height:1.3;background:#fffef4ed;border-radius:24px;padding:4px 10px;max-width:100%;overflow-wrap:anywhere}
.treasure-slot small{background:#fffef4ed;border-radius:8px;padding:3px;font-size:12px}
.treasure-bubble{width:100%;max-width:130px;aspect-ratio:1;display:grid;place-items:center;background:#cad7ff70;border:2px solid #ffffffc9;border-radius:50%;box-shadow:inset 0 0 20px #ffffff70}
.treasure-bubble img{width:57%;height:57%;object-fit:contain;filter:drop-shadow(0 2px 3px #2b3f6955)}
.treasure-slot[aria-pressed=true] .treasure-bubble{outline:2px solid #fff;outline-offset:2px;border-radius:50%}
.treasure-slot:focus-visible{outline:3px solid #145ca0;border-radius:14px}
.treasure-wish{position:absolute;left:50%;top:31%;transform:translate(-50%,-50%);border:0;background:transparent center/contain no-repeat;color:#fff8e4;width:22%;aspect-ratio:1;padding:0;font-size:clamp(17px,4cqw,26px);font-weight:700;text-shadow:0 1px 3px #96520f;cursor:pointer}
.treasure-wish:hover,.treasure-wish:active{background:transparent center/contain no-repeat}
.treasure-slot:hover,.treasure-slot:active{background:none}
.treasure-filter-reset{min-height:42px;padding:9px 13px;align-self:end;font-size:14px}
.treasure-main .index-filters select{min-height:42px}
.treasure-wish-inputs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.treasure-wish-selection{margin:14px 0;padding:12px 0;border-bottom:1px solid var(--ui-line-d7dfed,#d7dfed)}
.treasure-wish-ranges{width:100%;border-collapse:collapse;margin:12px 0;font-size:13px;text-align:left;line-height:1.5}
.treasure-wish-ranges caption{text-align:left;font-weight:700;margin-bottom:8px;color:var(--ui-fg-345975,#345975)}
.treasure-wish-ranges th,.treasure-wish-ranges td{padding:8px 10px;border-bottom:1px solid var(--ui-line-d7dfed,#d7dfed)}.treasure-wish-ranges tbody th{font-weight:400}
.treasure-wish-ranges thead{background:var(--ui-bg-edf1fd,#edf1fd)}.treasure-wish-ranges tr[aria-current=true]{background:var(--ui-bg-dfeafa,#dfeafa);color:var(--ui-fg-174d7c,#174d7c);box-shadow:inset 3px 0 #3976ac}.treasure-wish-ranges tr[aria-current=true] th,.treasure-wish-ranges tr[aria-current=true] td{font-weight:700}
.treasure-part-heading{display:flex;align-items:center;gap:8px;font-size:14px;margin:16px 0 8px}.treasure-part-heading img{object-fit:contain;flex:none}.treasure-affix-part+ .treasure-affix-part{border-top:1px solid var(--ui-line-d7dfed,#d7dfed);margin-top:14px}
.treasure-stars{display:inline-flex;flex-wrap:nowrap;gap:1px;vertical-align:middle;max-width:100%}.treasure-stars img{width:20px;height:20px;object-fit:contain;min-width:0}
.treasure-card .treasure-stars img{width:18px;height:18px}
.treasure-side-body{overflow:auto;overscroll-behavior:contain;flex:1;height:0;min-height:470px;contain:size}
.treasure-side-body .relic-choice-list{height:auto;min-height:0;contain:none;flex:none;overflow:visible}
.treasure-side-body .gear-picker{max-width:none;min-width:0;flex:initial}
.treasure-edit-group{min-width:0;border:1px solid var(--ui-line-d7dfed,#d7dfed);border-radius:8px;padding:12px;margin:14px 0}
.treasure-edit-group legend{font-weight:600;color:var(--ui-fg-345975,#345975)}
.treasure-field{display:grid;gap:6px;margin:10px 0;font-size:13px;min-width:0}
.treasure-field input,.treasure-field select,.treasure-affix-edit>input,.treasure-pool-controls>select{min-height:40px;min-width:0;width:100%;border:1px solid var(--ui-line-c3cde7,#c3cde7);border-radius:5px;background:var(--ui-bg-ffffff,#fff);color:var(--ui-fg-213e54,#213e54);padding:7px;font:inherit}
.treasure-affix-edit{display:grid;grid-template-columns:minmax(0,1fr) 86px;gap:7px;margin:14px 0;align-items:end}
.treasure-affix-edit>.gear-picker{grid-column:1/-1}
.treasure-affix-edit>input{grid-column:2;grid-row:2}
.treasure-max{display:flex;align-items:center;font-size:12px;gap:5px;grid-column:1;grid-row:2;min-height:40px}
.treasure-max input{width:18px;height:18px}.treasure-max img{object-fit:contain}
.treasure-editor-stars{display:flex;gap:16px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.treasure-editor-stars .treasure-field{margin:0;min-width:110px}
.treasure-pool-controls{display:flex;align-items:end;gap:10px;margin:12px 0;flex-wrap:wrap}
.treasure-pool-controls>.gear-picker{max-width:none;min-width:0;flex:1 1 160px}
.treasure-pool-controls>select{width:auto}
.treasure-details .gear-stats img{object-fit:contain;vertical-align:middle;margin:0 5px}
.treasure-costs{padding:0;list-style:none}.treasure-costs li{display:flex;align-items:center;gap:8px;margin:8px 0;overflow-wrap:anywhere}
.treasure-costs img{object-fit:contain}
.treasure-details .gear-affix-ranges span img{object-fit:contain;vertical-align:middle;margin-right:5px}
.treasure-details .gear-obtain-text>a{display:block}
@media(max-width:899px){.treasure-side-body{height:auto;min-height:0;max-height:780px;contain:none}.treasure-stage{max-width:620px}}
@container(max-width:380px){.treasure-slot strong{font-size:13px;padding:4px 6px}.treasure-stars img{width:18px;height:18px}}

/* Keep the fountain and bubble centres fixed while labels and stats wrap. */
.treasure-slot{aspect-ratio:1;padding:0;display:grid;place-items:center}
.treasure-bubble{max-width:none;width:100%;height:100%}
.treasure-slot strong{position:absolute;bottom:100%;left:50%;transform:translateX(-50%);width:max-content;max-width:100%;font-size:clamp(10px,3cqw,20px);padding:3px 6px}
.treasure-slot small{position:absolute;top:100%;left:50%;transform:translateX(-50%);width:max-content;max-width:110%;font-size:clamp(9px,2.5cqw,12px)}
