/* Header account buttons, personal cabinet with levels — Mochi style */

/* ---------- Header pills ---------- */
.header-account{display:flex;gap:10px;align-items:center}
.header-account button{display:inline-flex;align-items:center;gap:9px;max-width:330px;padding:9px 18px 9px 14px;border-radius:999px;border:1px solid #ffadd666;background:linear-gradient(135deg,#3b2444e6,#271a31e6);color:#ffe9f4;font-size:12px;font-weight:700;letter-spacing:.2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-shadow:0 8px 22px #0005,inset 0 1px 0 #ffffff14;transition:transform .25s,border-color .25s,box-shadow .25s,background .25s}
.header-account button:hover{transform:translateY(-1px);border-color:#ffadd6cc;box-shadow:0 12px 28px #0006,0 0 24px #ff9ec41f,inset 0 1px 0 #ffffff1f}
.header-account button:focus-visible{outline:2px solid #ffadd6;outline-offset:3px}
/* logged out: login pill with an arrow */
#account-open:not(.signed-in):after{content:'';width:24px;height:24px;flex:none;border-radius:50%;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233a1630' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center/13px no-repeat,linear-gradient(135deg,#ffc3de,#ff9ec4);box-shadow:0 2px 8px #ff9ec455;transition:transform .25s}
#account-open:not(.signed-in):hover:after{transform:translateX(2px)}
#account-open:not(.signed-in){padding-right:10px;gap:12px}
/* logged in: mint pill with the level icon */
.header-account #account-open.signed-in{background:linear-gradient(135deg,#223f38e6,#18282cf0);border-color:#7dffb77a;color:#dcffec;padding-left:6px;gap:10px}
#account-open.signed-in:before{content:'';width:38px;height:38px;margin:-5px 0;flex:none;background:var(--lvl,url('assets/mochi/level-bud.webp')) center/contain no-repeat;filter:drop-shadow(0 0 7px #ff9ec499) drop-shadow(0 2px 4px #000a)}
#account-open[data-level=bud]{--lvl:url('assets/mochi/level-bud.webp')}
#account-open[data-level=flower]{--lvl:url('assets/mochi/level-flower.webp')}
#account-open[data-level=branch]{--lvl:url('assets/mochi/level-branch.webp')}
#account-open[data-level=tree]{--lvl:url('assets/mochi/level-tree.webp')}
/* admin pill: gold with a gear */
.header-account .admin-open{border-color:#ffd36b88;background:linear-gradient(135deg,#43331ce6,#2a2117e6);color:#ffe6a8;padding-left:12px}
.header-account .admin-open:before{content:'';width:16px;height:16px;flex:none;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffd36b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l7 3v5c0 4.4-3 8.2-7 10-4-1.8-7-5.6-7-10V6l7-3z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E") center/contain no-repeat}
.header-account .admin-open:hover{border-color:#ffd36bcc;box-shadow:0 12px 28px #0006,0 0 24px #ffd36b22,inset 0 1px 0 #ffffff1f}

/* ---------- Profile card ---------- */
#cabinet{padding-top:30px}
.profile-card{position:relative;display:grid;grid-template-columns:170px minmax(0,1fr) auto;gap:24px;align-items:center;padding:28px 30px;border-radius:28px;border:1px solid #ffadd633;overflow:hidden;
background:radial-gradient(ellipse at 10% 0%,#ff9ec42b,transparent 55%),radial-gradient(ellipse at 100% 100%,#ffd36b14,transparent 50%),linear-gradient(150deg,#2d2039,#1c1425);box-shadow:0 26px 60px #0008}
.profile-mochi{width:170px;height:170px;object-fit:contain;filter:drop-shadow(0 14px 22px #000a);animation:coach-bob 3.4s ease-in-out infinite}
.profile-main h2{font-size:34px;margin:10px 0 4px}
.profile-main h2 em{color:#ffadd6}
.profile-main #cabinet-identity{margin:0;font-size:12px;color:#c9b3d3}
.profile-card .cabinet-actions{flex-direction:column;align-self:start;width:auto}
.profile-card .cabinet-actions button{border-radius:999px;padding:9px 18px;font-size:12px;font-weight:700;background:#ffffff0a;border:1px solid #ffffff1f;color:#f1dcf0;transition:background .2s,border-color .2s}
.profile-card .cabinet-actions button:hover{background:#ffffff14;border-color:#ffadd666}

/* ---------- Level box ---------- */
.level-box{margin-top:18px;padding:16px 18px;border-radius:18px;background:#130d1980;border:1px solid #ffffff12}
.level-top{display:flex;align-items:center;gap:18px}
.level-icon{width:88px;height:88px;object-fit:contain;filter:drop-shadow(0 0 18px #ff9ec466) drop-shadow(0 6px 12px #000a)}
.level-text{display:flex;flex-direction:column;gap:2px}
.level-text b{font-size:20px;color:#ffd0e8}
.level-text small{font-size:12px;color:#b8fbd8}
.level-bar{position:relative;height:10px;margin:14px 0 8px;border-radius:999px;background:#3d2c48;overflow:hidden}
.level-bar i{display:block;height:100%;width:0;border-radius:inherit;background:linear-gradient(90deg,#ff92c1,#ffd36b);box-shadow:0 0 14px #ff92c155;transition:width .9s cubic-bezier(.2,.8,.2,1)}
.level-next{display:block;font-size:12px;color:#d9c5e5}
.level-steps{list-style:none;margin:14px 0 0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(138px,1fr));gap:8px}
.level-step{display:flex;align-items:center;gap:10px;padding:8px 12px;border-radius:14px;background:#ffffff06;border:1px solid #ffffff0f;opacity:.8;filter:grayscale(.3);transition:opacity .3s,filter .3s}
.level-step img{width:46px;height:46px;object-fit:contain;flex:none;filter:drop-shadow(0 2px 6px #000a)}
.level-step span{display:flex;flex-direction:column;min-width:0}
.level-step b{font-size:12px;color:#f1dcf0}
.level-step small{font-size:10px;color:#b9a3c5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.level-step.done{opacity:.9;filter:none;border-color:#7dffb744}
.level-step.current{opacity:1;filter:none;background:linear-gradient(135deg,#ff9ec424,#ffd36b14);border-color:#ffadd6aa;box-shadow:0 0 22px #ff9ec422}
.level-step.current img{filter:drop-shadow(0 0 10px #ff9ec488) drop-shadow(0 2px 6px #000a)}

/* ---------- Note, tabs, orders ---------- */
#cabinet .cabinet-note{margin:18px 0 22px;border-radius:16px;border-color:#ffd36b44;background:#ffd36b0d;color:#f0d9a8}
#cabinet .account-tabs{gap:6px;padding:6px;border-radius:999px;background:#130d19;border:1px solid #ffffff12}
#cabinet .account-tabs button{border-radius:999px;padding:11px 20px;font-weight:700;transition:background .25s,color .25s}
#cabinet .account-tabs button.active{background:linear-gradient(135deg,#ff9ec4,#ff6fa5);color:#2b0f22;box-shadow:0 8px 20px #ff6fa544}
#cabinet .order-toolbar>span{font-size:12px;color:#c9b3d3}
#cabinet .field-note{display:none}
.orders-empty{border-radius:24px!important;border:1px dashed #ffadd655!important;background:linear-gradient(155deg,#2a1f35,#1b1424)!important;padding:42px 25px!important}
.orders-empty-mochi{width:150px;height:150px;object-fit:contain;margin-bottom:10px;filter:drop-shadow(0 12px 20px #000a);animation:coach-bob 3.4s ease-in-out infinite}
.order-card{position:relative;border-radius:22px!important;border:1px solid #5b406599!important;background:linear-gradient(155deg,#2c2038,#1c1425)!important;box-shadow:0 14px 34px #0006;transition:transform .3s,border-color .3s,box-shadow .3s}
.order-card:hover{transform:translateY(-3px);border-color:#ffadd688!important;box-shadow:0 22px 46px #0008,0 0 30px #ff9ec41a}
.order-card-head{justify-content:flex-start!important;align-items:center}
.order-card-head:before{content:'';width:46px;height:46px;flex:none;margin-right:12px;background:var(--st,url('assets/mochi/mochi-calm.webp')) center/contain no-repeat;filter:drop-shadow(0 4px 8px #0008)}
.order-card-head>span:first-child{margin-right:auto}
.order-card.demo_created{--st:url('assets/mochi/mochi-calm.webp')}
.order-card.demo_processing{--st:url('assets/mochi/mochi-think.webp')}
.order-card.demo_pending{--st:url('assets/mochi/mochi-sleep.webp')}
.order-card.demo_completed{--st:url('assets/mochi/mochi-love.webp')}
.order-card.cancelled{--st:url('assets/mochi/mochi-bag-sad.webp')}
.order-card.refund_requested,.order-card.refund_approved,.order-card.refund_rejected,.order-card.demo_refunded{--st:url('assets/mochi/mochi-worry.webp')}
.order-badge{border-radius:999px!important;padding:6px 12px!important;font-size:11px!important;font-weight:700}
.order-card.demo_completed .order-badge{color:#b8fbd8;background:#163326;border-color:#7dffb766}
.order-card.demo_processing .order-badge{color:#ffd36b;background:#3a2a14;border-color:#ffd36b66}
.order-card h3{color:#ffe7a8!important}
.order-card-bottom button{border-radius:999px!important;font-weight:700}

@media(max-width:900px){.profile-card{grid-template-columns:130px minmax(0,1fr);padding:22px}.profile-mochi{width:130px;height:130px}.profile-card .cabinet-actions{grid-column:1/-1;flex-direction:row;width:100%}.profile-card .cabinet-actions button{flex:1}}
@media(max-width:560px){.profile-card{grid-template-columns:1fr;justify-items:center;text-align:center}.profile-mochi{width:120px;height:120px}.level-top{justify-content:center}.header-account{width:100%;justify-content:center;flex-wrap:wrap}.header-account button,.header-account button.outline,.header-account .signed-in{max-width:100%;padding:8px 12px 8px 10px;font-size:11px}}
@media(prefers-reduced-motion:reduce){.profile-mochi,.orders-empty-mochi{animation:none}.level-bar i{transition:none}}

/* level discount line under the total */
.level-discount{display:block;margin-top:4px;font-size:12px;font-weight:700;color:#b8fbd8}
.level-discount[hidden]{display:none}

/* the signed-in pill may grow to show the full name (older rules capped it at ~200px) */
.header-account #account-open.signed-in{max-width:340px}
@media(min-width:1000px){.header-account{flex:none}}
@media(max-width:560px){.header-account #account-open.signed-in{max-width:100%}}

/* ---------- Pick a level and see what it gives ---------- */
.level-steps li{margin:0;min-width:0}
.level-step{width:100%;appearance:none;-webkit-appearance:none;font:inherit;color:inherit;text-align:left;cursor:pointer}
.level-step:hover{opacity:1;filter:none;border-color:#ffd36b88;transform:translateY(-1px)}
.level-step:focus-visible{outline:2px solid #ffd36b;outline-offset:2px}
.level-step.sel{opacity:1;filter:none;border-color:#ffd36bcc;box-shadow:0 0 0 1px #ffd36b66,0 0 22px #ffd36b26}
.level-detail{margin-top:12px;padding:16px 18px;border-radius:18px;background:#0f0a15b3;border:1px solid #ffd36b33;animation:ld-in .3s ease}
@keyframes ld-in{from{opacity:0;transform:translateY(6px)}}
.ld-head{display:flex;align-items:center;gap:16px}
.ld-medal{width:88px;height:88px;object-fit:contain;flex:none;filter:drop-shadow(0 0 16px #ffd36b44) drop-shadow(0 6px 12px #000a)}
.ld-title{display:flex;flex-direction:column;gap:6px;align-items:flex-start}
.ld-title b{font-size:20px;color:#ffe7a8}
.ld-chip{padding:4px 12px;border-radius:999px;font-size:11px;font-weight:800}
.ld-chip.now{background:#ff9ec426;color:#ffd0e8;border:1px solid #ffadd688}
.ld-chip.done{background:#163326;color:#b8fbd8;border:1px solid #7dffb766}
.ld-chip.next{background:#2e2238;color:#d9c5e5;border:1px solid #8d6b9a}
.ld-rows{display:grid;gap:0;margin-top:12px}
.ld-row{display:grid;grid-template-columns:130px minmax(0,1fr);gap:12px;padding:9px 0;border-top:1px solid #ffffff10;font-size:13px;line-height:1.55}
.ld-row small{color:#b9a3c5;font-size:12px}
.ld-row span{color:#f1dcf0}
.ld-bar{height:8px;margin:8px 0 2px;border-radius:999px;background:#3d2c48;overflow:hidden}
.ld-bar i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#ffd36b,#ff9ec4);box-shadow:0 0 12px #ffd36b44}
@media(max-width:560px){.ld-head{flex-direction:column;text-align:center}.ld-title{align-items:center}.ld-row{grid-template-columns:1fr;gap:2px}}
@media(prefers-reduced-motion:reduce){.level-detail{animation:none}}
/* compact cabinet: mascot and buttons at the top, smaller blocks */
.profile-card{grid-template-columns:120px minmax(0,1fr);align-items:start;gap:20px;padding:22px 26px}
.profile-mochi{width:120px;height:120px}
.profile-card .cabinet-actions{position:absolute;top:22px;right:26px;flex-direction:row;gap:8px}
.profile-card .cabinet-actions button{padding:7px 14px}
.profile-main h2{margin-bottom:4px}
.level-box{margin-top:12px;padding:12px 14px}
.level-detail{margin-top:10px;padding:12px 14px}
.level-detail .ld-medal{width:52px;height:52px}
.level-detail .ld-row{padding:8px 0}
@media(max-width:900px){.profile-card{grid-template-columns:90px minmax(0,1fr)}.profile-mochi{width:90px;height:90px}.profile-card .cabinet-actions{position:static;grid-column:1/-1}}
@media(max-width:560px){.profile-card{grid-template-columns:1fr}}
/* level block spans the full card width, under the mascot */
@media(min-width:561px){
.profile-card{grid-template-rows:auto auto auto auto;column-gap:20px;row-gap:0}
.profile-main{display:contents}
.profile-mochi{grid-column:1;grid-row:1/4;align-self:center}
.profile-main>.eyebrow,.profile-main>h2,.profile-main>p{grid-column:2}
.profile-main>.eyebrow{grid-row:1;align-self:end}.profile-main>h2{grid-row:2}.profile-main>p{grid-row:3;align-self:start}
.profile-main>.level-box{grid-column:1/-1;grid-row:4}
}
#account-open[data-level=friend]{--lvl:url('assets/mochi/level-friend.webp')}
.level-step img[src*=level-friend],.ld-medal[src*=level-friend]{filter:drop-shadow(0 0 8px #7fe3ffaa)}
.gift-row{display:flex;gap:10px;align-items:center;margin-top:10px;padding:10px 14px;border-radius:14px;border:1px dashed #ffd36a88;background:#ffd36a14;color:#ffe6a8;font-size:13px;font-weight:600;cursor:pointer}.gift-row input{accent-color:#ffd36a;width:18px;height:18px;flex:none}
.consent-label{display:flex!important;flex-direction:row!important;gap:10px;align-items:flex-start;font-size:12px;line-height:1.45;color:#d9c6dc;font-weight:500;margin:4px 0}.consent-label[hidden]{display:none!important}.consent-label input{width:18px;height:18px;flex:none;margin-top:1px;accent-color:#ff8fc4}.consent-label a{color:#ffb3d9;text-decoration:underline}
.tg-login{margin-top:12px}.tg-or{display:flex;align-items:center;gap:10px;color:#b9a3bd;font-size:12px;margin:6px 0 10px}.tg-or:before,.tg-or:after{content:"";flex:1;height:1px;background:#ffffff1f}
.tg-login-btn{width:100%;display:flex;align-items:center;justify-content:center;gap:10px;padding:12px 16px;border-radius:999px;border:1px solid #6cc4ff66;background:linear-gradient(180deg,#2aa6e61f,#2aa6e10d);color:#d8f0ff;font-weight:700;font-size:14px;cursor:pointer;transition:background .2s,border-color .2s}.tg-login-btn:hover:not(:disabled){background:#2aa6e633;border-color:#6cc4ffaa}.tg-login-btn:disabled{opacity:.6;cursor:default}
.tg-login .field-note a,.tg-card a{color:#ffb3d9;text-decoration:underline}
.tg-card{display:flex;align-items:center;gap:14px;margin:14px 0;padding:14px 18px;border-radius:20px;border:1px solid #6cc4ff40;background:#2aa6e60f}.tg-card>div{flex:1;min-width:0}.tg-card b{display:block;color:#e4f4ff}.tg-card small{display:block;color:#bcd2e3;line-height:1.4;margin-top:2px}.tg-card-icon{font-size:22px;color:#6cc4ff}.tg-card button{flex:none;border-radius:999px;padding:8px 16px;font-size:12px;font-weight:700}
@media(max-width:560px){.tg-card{flex-wrap:wrap}.tg-card button{width:100%}}
#auth-form label.consent-label{display:flex;flex-direction:row;gap:10px;align-items:flex-start;margin:10px 0 4px;font-size:12px;line-height:1.45;font-weight:500}
#auth-form label.consent-label[hidden]{display:none}
#auth-form .consent-label input{display:inline-block;width:18px;height:18px;min-width:18px;padding:0;margin:1px 0 0;flex:none}
.tg-login-btn{background:#2aabee;border-color:#2aabee;color:#fff;font-size:15px}.tg-login-btn:hover:not(:disabled){background:#1f98d9;border-color:#1f98d9}.tg-login-btn img{flex:none;display:block}
.tg-card-icon{width:30px;height:30px;flex:none;border-radius:50%}
/* Support button: one green "online" dot in the top-right corner, always shown when the Telegram bot is connected */
.header-support.support-live{position:relative}
.header-support.support-live:after{content:"";position:absolute;top:-2px;right:-9px;width:8px;height:8px;border-radius:50%;background:#7dffb7;box-shadow:0 0 0 0 #7dffb799,0 0 10px #7dffb7;animation:support-pulse 2.4s ease-out infinite}
@keyframes support-pulse{0%{box-shadow:0 0 0 0 #7dffb799,0 0 10px #7dffb7}70%,100%{box-shadow:0 0 0 7px #7dffb700,0 0 10px #7dffb7}}
@media(prefers-reduced-motion:reduce){.header-support.support-live:after{animation:none}}
/* new scene pictures */
.orders-empty-scene{display:block;width:min(420px,100%);height:auto;margin:0 auto 14px;border-radius:20px;box-shadow:0 14px 30px #0008}
.auth-scene{display:block;width:100%;height:126px;object-fit:cover;object-position:50% 38%;border-radius:16px;margin:-6px 0 14px;box-shadow:0 10px 24px #0006}
.payment-scene{display:block;width:min(320px,100%);height:auto;margin:0 auto 10px;border-radius:18px;box-shadow:0 12px 26px #0007}
.crypto-placeholder span{display:none}
/* amount problem box: shown right under the amount fields, with a one-tap fix */
.amount-fix{display:flex;flex-direction:column;gap:10px;margin:12px 0 4px;padding:12px 14px;border-radius:16px;border:1px solid #ffd36a88;background:#ffd36a14;color:#ffe9b3;font-size:13px;line-height:1.5}
.amount-fix[hidden]{display:none}.amount-fix p{margin:0}
.amount-fix button{align-self:flex-start;min-height:40px;padding:8px 18px;border-radius:999px;font-weight:800;font-size:13px}
@media(max-width:560px){.amount-fix button{align-self:stretch}}
