/* Independent tier builder UI; all classes scoped to this tool. */
.tier-maker-page{background:#f7f5fb!important;background-attachment:scroll!important;color:#26233a;min-height:100vh}
.tier-maker-page .tier-shell{width:min(100% - 32px,1190px);margin:0 auto;padding:89px 0 54px}
.tier-maker-page .tier-breadcrumb{display:flex;align-items:center;gap:10px;margin:0 0 15px;font-size:12px;color:#968eab}
.tier-maker-page .tier-breadcrumb a{color:#6f52b8;text-decoration:none}
.tier-maker-page .tier-hero{position:relative;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:34px 37px;background:linear-gradient(115deg,#28194d,#4b287f 62%,#7151ac);border:1px solid #5a4683;border-radius:24px;box-shadow:0 18px 50px rgba(53,24,91,.13);overflow:hidden}
.tier-maker-page .tier-hero::after{content:'';position:absolute;width:380px;height:380px;border-radius:50%;right:-110px;top:-150px;background:rgba(255,255,255,.05)}
.tier-maker-page .tier-hero-text{position:relative;z-index:1;max-width:710px}
.tier-maker-page .tier-kicker{display:block;color:#8a62c7;font-size:10px;font-weight:900;letter-spacing:.14em}
.tier-maker-page .tier-hero .tier-kicker{color:#dabfff}
.tier-maker-page .tier-hero h1{margin:9px 0 12px;color:#fff;font-size:clamp(27px,3.6vw,40px);font-weight:900;letter-spacing:-.047em;line-height:1.27;text-align:left}
.tier-maker-page .tier-hero h1 em{font-style:normal;color:#fbd0ff}
.tier-maker-page .tier-hero p{max-width:660px;color:#dcd3eb;font-size:13px;line-height:1.75}
.tier-maker-page .tier-hero-pills{display:flex;flex-wrap:wrap;gap:7px;margin-top:19px}
.tier-maker-page .tier-hero-pills span{padding:7px 10px;border:1px solid rgba(245,240,255,.18);border-radius:999px;background:rgba(255,255,255,.08);color:#e9dff5;font-size:11px;font-weight:800}
.tier-maker-page .tier-hero-art{z-index:1;display:flex;align-items:center;justify-content:center;gap:0;flex:none;padding:0 12px}
.tier-maker-page .tier-hero-art img{width:93px;height:93px;object-fit:contain;background:#fff;border:3px solid #f5f0ff;border-radius:21px;box-shadow:0 12px 23px #1e0b3e70;transform:rotate(-10deg)}
.tier-maker-page .tier-hero-art img:nth-child(2){transform:translateY(-15px) rotate(8deg);z-index:1}
.tier-maker-page .tier-hero-art img:nth-child(3){transform:rotate(15deg)}
.tier-maker-page .tier-maker-workspace,.tier-maker-page .tier-bank-panel{margin-top:21px;padding:26px;background:#fff;border:1px solid #e6e2ed;border-radius:22px;box-shadow:0 12px 35px #35204a0c}
.tier-maker-page .tier-maker-heading,.tier-maker-page .tier-bank-head{display:flex;align-items:center;justify-content:space-between;gap:18px}
.tier-maker-page .tier-maker-heading h2,.tier-maker-page .tier-bank-head h2{margin:5px 0 6px;font-size:24px;font-weight:900;letter-spacing:-.04em;color:#2d2343}
.tier-maker-page .tier-maker-heading p,.tier-maker-page .tier-bank-head p{font-size:12px;line-height:1.6;color:#7f7991}
.tier-maker-page .tier-maker-actions,.tier-maker-page .tier-export-actions{display:flex;align-items:center;flex-wrap:wrap;gap:7px;justify-content:flex-end}
.tier-maker-page .tier-btn{min-height:39px;padding:8px 12px;border:1px solid #e0dbea;border-radius:10px;background:#fff;color:#534671;font:inherit;font-size:12px;font-weight:850;cursor:pointer;transition:background .15s,border-color .15s}
.tier-maker-page .tier-btn:hover:not(:disabled){background:#f4efff;border-color:#bca7e9}
.tier-maker-page .tier-btn:disabled{opacity:.45;cursor:not-allowed}
.tier-maker-page .tier-btn-subtle{color:#786d90}
.tier-maker-page .tier-btn-danger{color:#aa4053}
.tier-maker-page .tier-btn-primary{background:#6d28d9;color:#fff;border-color:#6d28d9}
.tier-maker-page .tier-btn-primary:hover:not(:disabled){background:#5724b4}
.tier-maker-page .tier-btn-purple{color:#6d28d9;border-color:#d3c4f8;background:#f6f1ff}
.tier-maker-page button:focus-visible,.tier-maker-page a:focus-visible,.tier-maker-page input:focus-visible{outline:3px solid #bba1f5;outline-offset:3px}
.tier-maker-page .tier-board-overview{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:18px 0 13px;padding:13px 18px;background:#f8f5ff;border:1px solid #eee9f8;border-radius:14px}
.tier-maker-page .tier-board-overview>div{display:flex;gap:8px;align-items:baseline;padding-right:15px;border-right:1px solid #e7def3}
.tier-maker-page .tier-board-overview>div span{font-size:11px;font-weight:850;color:#817594}
.tier-maker-page .tier-board-overview strong{color:#5b32a8;font-size:22px;font-variant-numeric:tabular-nums}
.tier-maker-page .tier-board-overview strong small{font-size:11px;color:#b1a6c5}
.tier-maker-page .tier-board-overview p{flex:1;text-align:right;font-size:11px;color:#9589a6}
.tier-maker-page .tier-board{display:flex;flex-direction:column;gap:8px}
.tier-maker-page .tier-row{display:grid;grid-template-columns:101px minmax(0,1fr) 42px;min-width:0;min-height:91px;background:#f7f6fa;border:1px solid #e8e5ed;border-radius:13px;overflow:visible}
.tier-maker-page .tier-label{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;padding:9px 3px;border-radius:12px 0 0 12px}
.tier-maker-page .tier-label input[type=text]{display:block;width:86px;min-width:0;max-width:100%;height:39px;padding:4px;background:transparent;border:1px solid transparent;border-radius:7px;text-align:center;font-weight:950;font-size:27px;letter-spacing:-.035em;color:#29253c}
.tier-maker-page .tier-label input.tier-name-long{font-size:17px}
.tier-maker-page .tier-label input.tier-name-very-long{font-size:12px}
.tier-maker-page .tier-label input[type=text]:hover,.tier-maker-page .tier-label input[type=text]:focus{background:#ffffff88;border-color:#ffffffb5}
.tier-maker-page .tier-color-picker{position:relative;display:flex;justify-content:center;align-items:center;width:29px;height:23px;border:1px solid #00000020;background:#ffffffae;border-radius:7px;font-size:15px;color:#47355a;cursor:pointer}
.tier-maker-page .tier-color-picker input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.tier-maker-page .tier-dropzone{display:flex;align-content:flex-start;align-items:flex-start;flex-wrap:wrap;gap:7px;min-height:88px;padding:10px;transition:background .15s;position:relative}
.tier-maker-page .tier-dropzone.is-over,.tier-maker-page .tier-unit-tray.is-over{background:#eee7ff;box-shadow:inset 0 0 0 2px #9b79e1}
.tier-maker-page .tier-empty{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;margin:0;color:#b0aabf;font-size:12px;font-weight:850;pointer-events:none}
.tier-maker-page .tier-empty span{margin-right:7px;font-size:15px}
.tier-maker-page .tier-row-controls{display:flex;flex-direction:column;gap:3px;align-items:center;justify-content:center;padding:4px 3px;border-left:1px solid #eae7f0}
.tier-maker-page .tier-row-controls button{display:grid;place-items:center;width:32px;height:30px;padding:0;border:1px solid transparent;border-radius:7px;color:#716589;background:transparent;font-size:16px;font-weight:900;cursor:pointer}
.tier-maker-page .tier-row-controls button:hover:not(:disabled){background:#e8defc;color:#5621ac}
.tier-maker-page .tier-row-controls button:disabled{opacity:.28;cursor:not-allowed}
.tier-maker-page .tier-row-controls .tier-row-delete{color:#b0525d}
.tier-maker-page .tier-unit-slot{position:relative;flex:0 0 72px;width:72px;min-width:0}
.tier-maker-page .tier-unit-button{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;gap:4px;width:72px;height:90px;min-height:0;border:1px solid #ddd9e7;border-radius:10px;background:#fff;color:#312c41;padding:4px 4px 6px;cursor:grab;transition:border-color .12s,transform .12s,box-shadow .12s}
.tier-maker-page .tier-unit-button:hover{border-color:#9272df;transform:translateY(-1px);box-shadow:0 4px 12px #442c6328}
.tier-maker-page .tier-unit-button[aria-expanded=true]{border:1px solid #703bd7;background:#f8f3ff;box-shadow:0 0 0 2px #bca9fa5f}
.tier-maker-page .tier-unit-button.is-dragging{opacity:.4}
.tier-maker-page .tier-unit-button img{display:block;width:60px;height:60px;border-radius:7px;object-fit:contain;object-position:center}
.tier-maker-page .tier-unit-name{display:block;flex:0 0 14px;height:14px;max-width:66px;width:100%;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center;font-size:9px;font-weight:850;line-height:14px}
.tier-maker-page .tier-unit-name-long{font-size:7.5px}
.tier-maker-page .tier-choice-panel{position:relative;z-index:20;flex:1 0 100%;width:100%;min-width:0;padding:12px 14px;border:1px solid #d7c5ff;border-radius:11px;background:#fff;box-shadow:0 7px 25px #34245d17;animation:tier-panel-in .12s ease}
.tier-maker-page .tier-choice-title{display:flex;align-items:center;gap:8px;margin-bottom:10px}
.tier-maker-page .tier-choice-title strong{font-size:13px;color:#33265a}
.tier-maker-page .tier-choice-title span{font-size:11px;color:#9185a0}
.tier-maker-page .tier-choice-close{margin-left:auto;width:30px;height:30px;border:0;border-radius:8px;background:#f3f0f9;font-size:19px;color:#695d7e;cursor:pointer}
.tier-maker-page .tier-choice-list{display:flex;flex-wrap:wrap;gap:7px}
.tier-maker-page .tier-choice-button{display:flex;align-items:center;justify-content:center;gap:6px;min-height:38px;padding:7px 13px;border:1px solid #ded9ec;border-radius:9px;background:#fff;color:#423451;font-weight:850;font-size:12px;cursor:pointer}
.tier-maker-page .tier-choice-button i{width:10px;height:10px;flex:none;border-radius:3px}
.tier-maker-page .tier-choice-button:hover,.tier-maker-page .tier-choice-button.is-current{border-color:#926ce5;background:#f4efff}
.tier-maker-page .tier-choice-return{color:#b65360}
.tier-maker-page .tier-export-bar{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:16px;padding:16px 17px;border:1px solid #e6dffa;border-radius:14px;background:#faf8ff}
.tier-maker-page .tier-export-bar>div:first-child{display:flex;flex-direction:column;gap:4px}
.tier-maker-page .tier-export-bar strong{color:#453070;font-size:13px}
.tier-maker-page .tier-export-bar span{color:#9385a5;font-size:11px;line-height:1.5}
.tier-maker-page .tier-cloud-note{margin:9px 2px 0;color:#948ba0;font-size:11px;line-height:1.65}
.tier-maker-page .tier-bank-head{align-items:center}
.tier-maker-page .tier-bank-search{display:flex;align-items:center;gap:8px;width:min(290px,100%);height:44px;padding:0 13px;border:1px solid #ddd6e8;border-radius:11px;background:#faf9fc;color:#9884b1}
.tier-maker-page .tier-bank-search input{flex:1;min-width:0;font:inherit;font-size:14px;border:0;outline:none!important;background:transparent;color:#342947}
.tier-maker-page .tier-bank-filter-summary{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:15px;margin-bottom:10px;font-size:12px;color:#756688}
.tier-maker-page .tier-bank-all{padding:5px 8px;border:1px solid #e6dfea;background:#fff;border-radius:8px;color:#7247a7;font-size:11px;font-weight:850;cursor:pointer}
.tier-maker-page .tier-rarity-tabs{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;margin:0 0 14px}
.tier-maker-page .tier-rarity-tab{display:flex;justify-content:center;align-items:center;gap:7px;min-height:47px;padding:8px 6px;border:1px solid #e7e2ee;border-radius:11px;background:#f9f8fc;color:#635b72;font:inherit;cursor:pointer}
.tier-maker-page .tier-rarity-tab strong{font-size:13px;font-weight:900}
.tier-maker-page .tier-rarity-tab small{min-width:22px;padding:2px 4px;background:#ede9f3;border-radius:6px;font-size:10px;font-weight:900}
.tier-maker-page .tier-rarity-indicator{width:9px;height:9px;border-radius:50%;flex:none}
.tier-maker-page .tier-rarity-tab.is-active{border-color:#8755dc;background:#efe8fc;color:#4e2c93;box-shadow:inset 0 0 0 1px #a783e9}
.tier-maker-page .tier-unit-tray{display:grid;grid-template-columns:repeat(auto-fill,minmax(90px,1fr));justify-items:center;align-items:start;gap:9px;min-height:132px;padding:16px;border:1px solid #e8e4ef;border-radius:13px;background:#fbfaff}
.tier-maker-page .tier-unit-tray .tier-unit-slot{width:100%;flex:none;display:flex;justify-content:center}
.tier-maker-page .tier-unit-tray .tier-unit-button{width:100%;max-width:97px;height:111px;min-height:0;padding:8px 4px}
.tier-maker-page .tier-unit-tray .tier-unit-button img{width:68px;height:68px}
.tier-maker-page .tier-unit-tray .tier-unit-name{font-size:10px;max-width:88px;flex-basis:16px;height:16px;line-height:16px}
.tier-maker-page .tier-unit-tray .tier-unit-name-long{font-size:9px}
.tier-maker-page .tier-unit-tray .tier-choice-panel{grid-column:1/-1;width:100%;justify-self:stretch}
.tier-maker-page .tier-bank-empty{grid-column:1/-1;align-self:center;text-align:center;color:#8f839c;font-size:12px;line-height:1.9;padding:20px 6px}
.tier-maker-page .tier-tray-help{margin:13px 1px 0;color:#8d819d;font-size:11px;line-height:1.6}
.tier-maker-page .tier-note{margin:16px 0 0;padding:17px 18px;border:1px solid #e6e1ee;border-radius:13px;background:#fff;color:#7f748f;line-height:1.7;font-size:12px}
.tier-maker-page .tier-note strong{margin-right:7px;color:#5f487c}
.tier-maker-page .tier-note a{margin-left:7px;color:#7740c0;font-weight:850;text-decoration:none}
.tier-maker-page .tier-toast{position:fixed;bottom:20px;left:50%;z-index:2000;transform:translate(-50%,20px);padding:12px 19px;border-radius:12px;background:#33234e;color:#fff;font-size:13px;font-weight:850;box-shadow:0 8px 26px #20152b46;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;text-align:center;max-width:min(92vw,490px)}
.tier-maker-page .tier-toast.show{opacity:1;transform:translate(-50%,0)}
@keyframes tier-panel-in{from{opacity:.7;transform:translateY(-3px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:1000px){
  .tier-maker-page .tier-maker-heading{flex-direction:column;align-items:stretch}
  .tier-maker-page .tier-maker-actions{justify-content:flex-start}
  .tier-maker-page .tier-hero-art img{width:75px;height:75px}
  .tier-maker-page .tier-export-bar{flex-direction:column;align-items:stretch}
  .tier-maker-page .tier-export-actions{justify-content:flex-start}
  .tier-maker-page .tier-rarity-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:650px){
  .tier-maker-page .tier-shell{width:min(100% - 18px,1190px);padding:77px 0 28px}
  .tier-maker-page .tier-hero{padding:23px 18px;border-radius:17px}
  .tier-maker-page .tier-hero h1{font-size:27px}
  .tier-maker-page .tier-hero p{font-size:12px}
  .tier-maker-page .tier-hero-art{display:none}
  .tier-maker-page .tier-hero-pills span{font-size:10px}
  .tier-maker-page .tier-maker-workspace,.tier-maker-page .tier-bank-panel{margin-top:13px;padding:16px 11px;border-radius:16px}
  .tier-maker-page .tier-maker-heading h2,.tier-maker-page .tier-bank-head h2{font-size:19px}
  .tier-maker-page .tier-maker-heading p,.tier-maker-page .tier-bank-head p{font-size:11px}
  .tier-maker-page .tier-maker-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  .tier-maker-page .tier-maker-actions .tier-btn{width:100%;min-height:40px;padding:7px 6px;font-size:11px}
  .tier-maker-page .tier-maker-actions .tier-btn:last-child{grid-column:1/-1}
  .tier-maker-page .tier-board-overview{gap:9px;padding:9px 10px}
  .tier-maker-page .tier-board-overview>div{padding-right:7px;gap:4px}
  .tier-maker-page .tier-board-overview strong{font-size:17px}
  .tier-maker-page .tier-board-overview strong small{font-size:9px}
  .tier-maker-page .tier-board-overview>div span{font-size:10px}
  .tier-maker-page .tier-board-overview p{flex:0 0 100%;text-align:left;font-size:10px}
  .tier-maker-page .tier-row{grid-template-columns:53px minmax(0,1fr) 27px;min-height:83px;gap:0}
  .tier-maker-page .tier-label{padding:6px 0}
  .tier-maker-page .tier-label input[type=text]{height:37px;width:50px;padding:2px;font-size:21px}
  .tier-maker-page .tier-label input.tier-name-long{font-size:11px}
  .tier-maker-page .tier-label input.tier-name-very-long{font-size:9px}
  .tier-maker-page .tier-color-picker{width:24px;height:22px}
  .tier-maker-page .tier-dropzone{min-height:78px;gap:5px;padding:5px}
  .tier-maker-page .tier-empty{font-size:10px;text-align:center}
  .tier-maker-page .tier-unit-slot{flex-basis:58px;width:58px}
  .tier-maker-page .tier-unit-button{width:58px;height:80px;padding:3px}
  .tier-maker-page .tier-unit-button img{width:50px;height:50px}
  .tier-maker-page .tier-unit-name{font-size:8px;max-width:53px;flex-basis:12px;height:12px;line-height:12px}
  .tier-maker-page .tier-unit-name-long{font-size:7px}
  .tier-maker-page .tier-row-controls{padding:3px 0;gap:3px}
  .tier-maker-page .tier-row-controls button{width:25px;height:26px;font-size:15px}
  .tier-maker-page .tier-choice-panel{padding:9px 7px}
  .tier-maker-page .tier-choice-title{flex-wrap:wrap;gap:5px}
  .tier-maker-page .tier-choice-title strong{font-size:11px}
  .tier-maker-page .tier-choice-title span{font-size:10px}
  .tier-maker-page .tier-choice-list{gap:5px}
  .tier-maker-page .tier-choice-button{min-width:55px;min-height:38px;padding:6px 8px;font-size:11px}
  .tier-maker-page .tier-export-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  .tier-maker-page .tier-export-actions .tier-btn{min-height:43px;font-size:11px;padding:6px}
  .tier-maker-page .tier-bank-head{flex-direction:column;align-items:stretch;gap:10px}
  .tier-maker-page .tier-bank-search{width:100%}
  .tier-maker-page .tier-rarity-tabs{gap:6px}
  .tier-maker-page .tier-rarity-tab{min-height:44px;gap:4px}
  .tier-maker-page .tier-rarity-tab strong{font-size:12px}
  .tier-maker-page .tier-unit-tray{grid-template-columns:repeat(auto-fill,minmax(76px,1fr));gap:7px;padding:9px}
  .tier-maker-page .tier-unit-tray .tier-unit-button{height:105px;min-height:0}
  .tier-maker-page .tier-unit-tray .tier-unit-button img{width:58px;height:58px}
  .tier-maker-page .tier-unit-tray .tier-unit-name{font-size:9px;flex-basis:14px;height:14px;line-height:14px}
  .tier-maker-page .tier-unit-tray .tier-unit-name-long{font-size:8px}
}
@media(max-width:350px){
  .tier-maker-page .tier-row{grid-template-columns:47px minmax(0,1fr) 25px}
  .tier-maker-page .tier-label input[type=text]{width:46px;font-size:20px}
  .tier-maker-page .tier-dropzone{gap:3px;padding:4px}
  .tier-maker-page .tier-unit-slot{flex-basis:53px;width:53px}
  .tier-maker-page .tier-unit-button{width:53px;height:75px}
  .tier-maker-page .tier-unit-button img{width:46px;height:46px}
  .tier-maker-page .tier-unit-name{max-width:49px}
  .tier-maker-page .tier-board-overview>div{padding-right:4px}
  .tier-maker-page .tier-choice-button{padding:6px 5px;min-width:49px}
}
@media(prefers-reduced-motion:reduce){
 .tier-maker-page .tier-btn,.tier-maker-page .tier-unit-button,.tier-maker-page .tier-toast{transition:none}
 .tier-maker-page .tier-choice-panel{animation:none}
}
