@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700;800&display=swap');
:root{color-scheme:dark;--ink:#eef0ff;--muted:#a2a6bf;--bg:#090911;--frame:#121121;--frame2:#18172a;--line:#33314c;--purple:#a45bfd;--violet:#7659e9;--blue:#526fff;--aqua:#29cb9c}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:radial-gradient(ellipse at top left,#231338 0%,transparent 44%),radial-gradient(ellipse at 100% 30%,#121b35 0%,transparent 50%),var(--bg);color:var(--ink);font:15px/1.55 'Be Vietnam Pro',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;min-height:100dvh}
button,input{font:inherit}button{cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}button:focus-visible,input:focus-visible,a:focus-visible{outline:2px solid #af88fc;outline-offset:3px}[hidden]{display:none!important}
.app{width:min(940px,100%);margin:0 auto;padding-bottom:95px}.sitehead{display:flex;align-items:center;gap:11px;padding:19px max(18px,env(safe-area-inset-left));background:#0b0b14dc;border-bottom:1px solid #2e274c;position:sticky;top:0;z-index:8;backdrop-filter:blur(14px)}
.logo{display:grid;place-items:center;height:45px;width:45px;flex:none;border-radius:13px;background:linear-gradient(145deg,#292049,#1a1b36);border:1px solid #5e4e93;color:#9ff2e0;font-size:26px;font-weight:800}.brand{flex:1;min-width:0}.brand strong{font-size:17px;letter-spacing:2.7px;white-space:nowrap}.brand span{display:block;font-size:10px;letter-spacing:2px;color:#8d8eaa}.state{border:1px solid #333442;background:#11121f;border-radius:99px;display:flex;align-items:center;gap:8px;padding:9px 12px;font-weight:700;font-size:12px;white-space:nowrap}.status-dot{width:9px;height:9px;border-radius:50%;background:#eab267;box-shadow:0 0 12px #eab26788}.status-dot.ok{background:#32d1a4;box-shadow:0 0 12px #32d1a478}
.stephead{padding:29px 20px 19px;background:linear-gradient(128deg,#171326,#0f1324);border-bottom:1px solid #292741}.stephead .step-title{display:flex;justify-content:space-between;gap:12px;align-items:center}.stephead h1{font-size:clamp(21px,5vw,29px);font-weight:600;margin:0}.step-number{font-size:21px;font-weight:800}.step-number small{font-size:13px;font-weight:500;color:#777993}.stepbar{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-top:20px}.step-seg{height:5px;border-radius:8px;background:#292739}.step-seg.active{background:linear-gradient(90deg,#bb60f8,#5485fc)}
.screen{padding:24px 20px 25px}.intro{color:#9895ae;margin:0 0 22px}.section-heading{font-size:18px;font-weight:600;margin:0 0 8px}.sub{font-size:13px;color:var(--muted);margin:0 0 17px}.character-grid{display:grid;grid-template-columns:minmax(0,1fr);max-width:410px;gap:16px}.character-card{display:block;position:relative;border:1px solid #ec5b46;border-radius:24px;overflow:hidden;background:linear-gradient(#4c1320,#1a0b16 70%,#110e16);box-shadow:0 0 22px #e8564042;padding:0;text-align:left;width:100%}.character-image{position:relative;min-height:255px;overflow:hidden;background:radial-gradient(ellipse at 48% 35%,#d13735 0,#58101b 42%,#180c14 72%);display:flex;justify-content:center}.character-image img{width:87%;height:288px;object-fit:cover;object-position:center 34%;mask-image:linear-gradient(#000 74%,transparent)}.character-tag{position:absolute;top:13px;right:13px;border-radius:99px;padding:6px 11px;background:linear-gradient(#ffad3c,#e23e19);color:white;font-weight:800;box-shadow:0 2px 10px #0009}.character-info{padding:14px 17px 20px;border-top:3px solid #ec5941;background:#100f1a}.character-info strong{font-size:23px}.character-info span{display:block;color:#ffb56a;font-size:12px;margin-top:3px;font-weight:700}.character-select{display:inline-block;margin-top:13px;background:#302243;border:1px solid #6f4c7e;color:#e6caff;font-size:12px;border-radius:22px;padding:5px 12px}
.info-panel{border:1px solid #39304d;background:#171323;margin-top:18px;border-radius:15px;padding:14px;color:#c7bbdb;font-size:12px}.status{font-size:12px;color:#bec2d9;white-space:pre-wrap;overflow-wrap:anywhere}.status.ok{color:#4de1b0}.status.error{color:#ff969f}progress{height:8px;width:100%;margin:12px 0 2px;accent-color:#ab69f7}.loading-ring{display:inline-block;width:13px;height:13px;border:2px solid #6f5c99;border-top-color:#c6a6ff;border-radius:50%;animation:spin 0.9s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
.primary{color:white;background:linear-gradient(110deg,#8d4ce4,#5475ed);border:0;border-radius:15px;min-height:53px;padding:12px 18px;font-weight:700;box-shadow:0 7px 24px #493ad944}.secondary{color:#e4ddf3;background:transparent;border:1px solid #52476a;border-radius:15px;min-height:50px;padding:12px 17px;font-weight:600}.btnrow{display:flex;gap:12px;margin-top:15px}.btnrow>*{flex:1}.wide{width:100%;margin-top:18px}.page-note{color:#807f9a;font-size:12px;margin:16px 0}
.context-card{display:flex;align-items:center;gap:13px;padding:14px;border:1px solid #403659;border-radius:19px;background:linear-gradient(120deg,#1b1930,#141629);margin-bottom:18px}.context-image{width:57px;height:57px;border-radius:14px;object-fit:cover;object-position:center 38%;border:1px solid #bc584b}.context-main{flex:1}.context-main small{color:#7f7a9e}.context-main strong{display:block;font-size:17px}.context-main span{font-size:12px;color:#e7ad77}.change-link{background:transparent;color:#bd92ef;border:1px solid #674779;border-radius:14px;padding:9px 12px;min-height:40px;font-size:12px}
.tabs{display:flex;flex-wrap:wrap;gap:9px;margin:0 0 16px}.category-pill{padding:10px 16px;min-height:44px;border-radius:99px;border:1px solid #3e394d;background:#171722;color:#9996ae;font-weight:700;font-size:13px}.category-pill[aria-selected=true]{color:#eed6ff;border-color:#9a5cfa;background:linear-gradient(#33234d,#221a33);box-shadow:0 0 0 1px #6c3ba066}
.searchline{display:flex;gap:9px;margin:13px 0 19px}.searchline input{flex:1;min-width:0;border:1px solid #454059;background:#19182c;color:white;border-radius:14px;padding:12px 14px;min-height:51px}.filter{background:#201d33;border:1px solid #464061;border-radius:13px;color:#dbd7e8;padding:0 15px;white-space:nowrap;font-size:13px}.list-title{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin:15px 0 12px}.list-title small{color:#8484a0}
.item-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.item-card{padding:0 0 10px;border:2px solid #443b53;background:linear-gradient(#22182f,#14121e);border-radius:18px;text-align:left;overflow:hidden;min-width:0;color:white}.item-card.chosen{border-color:#fa79c2;box-shadow:0 0 13px #d75abb73;background:#241831}.card-image{height:130px;background:radial-gradient(circle at center,#503134,#18101c 75%);display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden}.card-image img{max-height:100%;max-width:100%;width:100%;height:100%;object-fit:cover}.tag{position:absolute;top:6px;right:5px;background:linear-gradient(110deg,#ed853a,#ce563c);color:#fff;border-radius:99px;padding:3px 8px;font-size:10px;font-weight:800}.tag.picked{background:#17614d}.item-label{padding:10px 9px 0;font-size:12px;font-weight:750;line-height:1.42;min-height:44px;overflow-wrap:anywhere}.item-code{padding:0 9px;color:#86819b;font-size:10px}.empty{grid-column:1/-1;padding:45px 12px;color:#aaa;text-align:center;border:1px dashed #504569;border-radius:18px}
.sticky{position:sticky;bottom:0;background:#10101bee;backdrop-filter:blur(15px);border:1px solid #45376d;border-radius:20px;padding:13px 16px;margin-top:18px;z-index:3;box-shadow:0 -8px 28px #0b051a88}.sticky-top{text-align:center}.sticky-top small{color:#8e8fa7;font-size:11px;letter-spacing:2px}.sticky-top strong{display:block;font-size:14px}.sticky .wide{margin-top:10px}
.sheet-screen{position:fixed;inset:0;z-index:30;display:flex;align-items:flex-end;justify-content:center;background:#06060bb8;backdrop-filter:blur(4px)}.sheet{width:min(940px,100%);max-height:94dvh;overflow:hidden;background:#10121e;border:1px solid #49435e;border-radius:29px 29px 0 0;display:flex;flex-direction:column;padding-bottom:env(safe-area-inset-bottom)}.handle{align-self:center;width:42px;height:5px;border-radius:20px;background:#424454;margin:13px 0 17px}.sheet-head{padding:0 20px 17px;border-bottom:1px solid #2c2c40;display:flex;justify-content:space-between;align-items:center}.sheet-head h2{margin:0;font-size:20px}.sheet-head p{font-size:12px;color:#9390ab;margin:3px 0}.icon-close{border:0;color:#c0b8c9;background:transparent;font-size:26px}.sheet-items{padding:12px 20px;overflow:auto;display:flex;flex-direction:column;gap:9px}.sheet-row{border:1px solid #4a356d;border-radius:15px;background:#181526;display:flex;align-items:center;gap:12px;padding:8px 12px}.sheet-thumb{height:60px;width:60px;border-radius:12px;background:#302034;overflow:hidden;flex:none}.sheet-thumb img{width:100%;height:100%;object-fit:cover}.sheet-label{flex:1;min-width:0}.sheet-label small{color:#9d99ad;font-size:10px;display:block;letter-spacing:1px}.sheet-label strong{display:block;font-size:13px;overflow-wrap:anywhere}.check-pill{padding:5px 8px;background:#15473e;color:#86e8c4;border-radius:10px;font-size:10px;font-weight:700;white-space:nowrap}.sheet-actions{border-top:1px solid #2c2c40;padding:15px 20px;background:#10111e;display:flex;gap:10px}.sheet-actions>*{flex:1}
.platform-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;margin:10px 0 19px}.platform{min-height:88px;background:#191a2b;border:1px solid #4d405f;border-radius:15px;color:#eeefff;padding:14px;text-align:left}.platform[aria-pressed=true]{border-color:#ab6dff;background:#2c2242;box-shadow:inset 0 0 0 1px #a06de5}.platform small{display:block;color:#a1a2b8}.platform strong{display:block;font-size:15px}.final-panel{border:1px solid #48405b;background:#171629;border-radius:17px;padding:17px;margin:16px 0}.final-panel strong{display:block;margin-bottom:10px}.final-chips{display:flex;flex-wrap:wrap;gap:7px}.final-chip{font-size:11px;padding:6px 9px;color:#d8d5e9;background:#27213d;border-radius:9px}.audio-tag{color:#b2eadf;font-size:12px;display:flex;align-items:center;gap:7px;margin-top:12px}.download{display:flex;align-items:center;justify-content:center;padding:14px;text-decoration:none;background:linear-gradient(100deg,#239d81,#4be0b0);color:#04221e;border-radius:15px;font-weight:800;margin-top:10px;min-height:49px}.smallnotice{font-size:12px;color:#908ea7;margin:12px 0}.thin{font-size:11px;color:#8f8b9d}
@media(min-width:690px){.card-image{height:195px}.item-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.brand strong{font-size:21px}.screen{padding:30px}.sitehead{padding:20px 30px}.stephead{padding:30px}.character-grid{max-width:410px}.item-label{font-size:14px}}@media(max-width:390px){.item-grid{gap:8px}.item-label{font-size:11px}.card-image{height:104px}.tag{font-size:9px;padding:3px 5px}.sheet-thumb{height:48px;width:48px}.check-pill{font-size:9px}.brand strong{font-size:14px;letter-spacing:1.7px}.state{padding:6px 8px;font-size:10px}}

.isolation-hint{display:flex;flex-wrap:wrap;gap:10px;align-items:center;padding:11px 13px;background:#1e1829;border:1px solid #5a4378;border-radius:12px;color:#c9b9e8;font-size:12px;margin:12px 0}.isolation-hint span{flex:1 1 210px}.isolation-hint button{border:1px solid #7760ad;background:#29203c;color:#dfceff;border-radius:10px;min-height:38px;padding:7px 14px;font-weight:700}

/* V6.2 SAFE: image-card style only; the rest of V6.1 remains unchanged. */
.tag.fist-tag{background:linear-gradient(105deg,#8861ee,#5774ef)}
.card-image img{object-fit:contain}


/* === V6.3 STUDIO: giao diện công khai, không thay đổi ENGINE/AudioClip === */
.studio-footer{padding:32px 16px max(40px,env(safe-area-inset-bottom));color:#8b86a9;text-align:center;font-size:12px;letter-spacing:2.2px;font-weight:800;border-top:1px solid #242039}
.studio-footer span{color:#ac75fb;padding:0 5px}
/* Tab: dấu tích chỉ hiện khi đã chọn vật phẩm khác mặc định. */
.category-pill{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:9px 13px;min-height:43px;transition:background .18s,border-color .18s}
.category-pill .tab-check{display:none;align-items:center;justify-content:center;min-width:17px;height:17px;border-radius:50%;background:#157d65;color:#bbffe3;font-size:12px;line-height:1;font-weight:900}
.category-pill.has-choice .tab-check{display:inline-flex}
.category-pill.has-choice{color:#e8deff;border-color:#71559b;background:#211b35}
.category-pill[aria-selected=true]{color:#f4e7ff;border-color:#aa70f3;background:#35264d}
.category-pill[aria-selected=true].has-choice{box-shadow:inset 0 0 0 1px #9270d6,0 0 10px #9d67f729}
/* Compact version selector. Only affects visual buttons, not platform IDs. */
.platform-grid{gap:9px;margin:12px 0 18px}
.platform{min-height:65px;padding:10px 12px;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto auto;gap:0 7px;align-items:center;border-radius:13px;position:relative;transition:background .15s,border-color .15s}
.platform-os{display:block;grid-column:1;grid-row:1;color:#a5a0bd;font-size:11px;font-weight:600;line-height:1.3}
.platform strong{grid-column:1;grid-row:2;font-size:13px;line-height:1.5;font-weight:800}
.platform-check{grid-column:2;grid-row:1/3;display:grid;place-items:center;width:22px;height:22px;border-radius:50%;border:1px solid #53506b;color:transparent;font-weight:900;font-size:13px}
.platform[aria-pressed=true]{border-color:#a574f0;background:linear-gradient(125deg,#33264c,#221e38)}
.platform[aria-pressed=true] .platform-check{background:#9270f1;color:white;border-color:#9270f1}
/* Final preview: two-column, concise labels, no wall of text. */
.final-panel{padding:15px;margin:12px 0 16px}
.final-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:12px}
.final-heading strong{display:block;margin:0;font-size:15px;font-weight:800}
.final-count{color:#cbb6ed;background:#322445;border-radius:99px;padding:4px 9px;font-size:11px;white-space:nowrap}
.final-chips{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.final-chip{display:flex;flex-direction:column;justify-content:center;gap:3px;min-width:0;min-height:59px;padding:9px 11px;background:#201d30;border:1px solid #373048;border-radius:11px}
.final-chip.selected{background:#241e37;border-color:#614b89}
.final-label{color:#a99bca;font-size:11px;font-weight:700}
.final-value{color:#e8e2f4;font-size:12px;font-weight:700;line-height:1.35;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow-wrap:anywhere}
.final-chip:not(.selected) .final-value{color:#7b7891;font-weight:500}
/* Clean start screen: all load details live inside one centered splash. */
.boot-overlay{position:fixed;inset:0;z-index:100;display:flex;align-items:center;justify-content:center;background:radial-gradient(ellipse at 50% 30%,#2b1745 0%,#111021 60%,#090911 100%);padding:20px;min-height:100dvh}
.boot-card{width:min(370px,100%);padding:29px 23px 26px;text-align:center;border:1px solid #4b386c;border-radius:24px;background:linear-gradient(140deg,#21182f,#10121f);box-shadow:0 25px 90px #0008}
.boot-logo{width:68px;height:68px;display:grid;place-items:center;margin:0 auto 14px;border-radius:20px;background:linear-gradient(135deg,#613fac,#303c79);color:#a4ffdf;border:1px solid #795fbf;box-shadow:0 0 30px #9868f333;font-size:38px;font-weight:900}
.boot-card h2{font-size:23px;letter-spacing:2px;margin:0;font-weight:800;color:#f0edff}
.boot-subtitle{margin-top:2px;font-size:10px;letter-spacing:3.4px;color:#9f9ab4}
.boot-pulse{display:flex;align-items:center;justify-content:center;gap:5px;height:53px;margin:12px auto 5px}
.boot-pulse i{width:5px;height:17px;border-radius:9px;background:linear-gradient(#9d62ee,#69a4ff);animation:bootBars 1s ease-in-out infinite alternate}
.boot-pulse i:nth-child(2){animation-delay:.12s;height:27px}.boot-pulse i:nth-child(3){animation-delay:.24s;height:36px}.boot-pulse i:nth-child(4){animation-delay:.36s;height:22px}.boot-pulse i:nth-child(5){animation-delay:.48s;height:14px}
@keyframes bootBars{to{transform:scaleY(.3);opacity:.5}}
.boot-status-row{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:7px 0 3px;text-align:left}
.boot-status-row .status{font-size:12px;color:#d6ccea}
.boot-status-row .status.error{color:#ff9da4}
.boot-status-row strong{font-size:15px;color:#cba8ff;font-variant-numeric:tabular-nums}
.boot-card progress{display:block;accent-color:#a175ff;margin:11px 0 12px;width:100%;height:7px;border:0;border-radius:99px;overflow:hidden}
.boot-card progress::-webkit-progress-bar{background:#393049;border-radius:99px}
.boot-card progress::-webkit-progress-value{background:linear-gradient(90deg,#a85df5,#567bff);border-radius:99px}
.boot-hint{margin:7px 0 0;color:#8e8aa6;font-size:11px;line-height:1.6}
.boot-card #reloadData{margin-top:14px;width:100%;min-height:44px}
@media(min-width:690px){.platform{min-height:71px;padding:12px 16px}.platform strong{font-size:14px}.final-chips{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:390px){.category-pill{padding:9px 10px;gap:5px}.final-chip{min-height:57px;padding:8px 9px}.final-value{font-size:11px}.final-heading strong{font-size:14px}}
@media(prefers-reduced-motion:reduce){.boot-pulse i{animation:none}html{scroll-behavior:auto}}

.final-chip .final-value{display:block;margin-bottom:0}

.link4m-gate{background:linear-gradient(105deg,#9959ff,#4b73e5);color:#fff}.gate-info{color:#9791aa;font-size:12px;text-align:center;margin:10px 0 0}
