/* Telegram CARD↔COIN switch, real BALI receipts and WORK missions.
   Original card source remains unchanged. This stylesheet only affects /telegram-app. */
.tg-card-switcher{
 flex:none;display:flex;align-items:center;justify-content:space-between;gap:7px;
 min-height:clamp(45px,7.4dvh,61px);margin:0 0 clamp(4px,1dvh,9px);
 padding:4px 7px;border-radius:16px;
 border:1px solid rgba(249,210,140,.3);background:linear-gradient(160deg,#29232a,#111720 66%);
 box-shadow:inset 0 1px #ffdf9937,0 4px 0 #0e1116;
}
.tg-card-switcher>button{
 display:flex;align-items:center;justify-content:center;flex:1;gap:clamp(5px,2vw,12px);
 min-height:38px;padding:5px 6px;border:1px solid transparent;border-radius:12px;
 color:#a9a7a0;background:transparent;letter-spacing:.10em;font:900 10px/1 Inter,sans-serif;
}
.tg-card-switcher>button.selected{
 border-color:rgba(250,201,110,.56);color:#ffdf96;
 background:linear-gradient(145deg,#77502fbb,#2a2328 76%);
 box-shadow:inset 0 1px #ffe1a159,0 2px 0 #4b311f;
}
.tg-card-switcher>button svg{width:clamp(27px,6dvh,38px);height:auto;flex:none;filter:drop-shadow(0 3px 2px #0009)}
.tg-switch-divider{width:1px;height:26px;flex:none;background:linear-gradient(transparent,#ac8759,transparent)}
.tg-coin-icon{
 display:block;flex:none;width:clamp(30px,6dvh,42px);height:clamp(30px,6dvh,42px);
 border-radius:50%;border:2px solid #d6a44e;
 background-image:url('/assets/bali-coin-atlas-hd.webp');background-size:200% 100%;background-position:left center;
 box-shadow:inset 0 1px 3px #fff4c17c,0 2px 7px #000a,0 0 12px #d99d3852;
}
.tg-page-card .tg-card-stage{flex:none}
.tg-page-card .tg-card-plinth{padding:2px 0 4px!important}
.tg-page-card .tg-card-plinth::before{opacity:.7}
.tg-page-card .tg-gesture-hint{margin:3px 0 2px}
.tg-page-card .card-switch{padding:1px 2px 6px!important}
.tg-card-benefits{
 flex:1;min-height:0;display:flex;flex-direction:column;justify-content:center;
 gap:7px;margin:2px 0 8px;padding:clamp(7px,1.5dvh,13px);
 border:1px solid rgba(198,221,156,.22);border-radius:15px;
 background:linear-gradient(152deg,#1c2320,#11171c 65%,#0b1118);
 box-shadow:inset 0 1px #e7e9bc18,0 3px 0 #101416;
}
.tg-card-benefits-title{display:flex;align-items:center;justify-content:space-between;gap:7px}
.tg-card-benefits-title b{font:800 12px/1.15 Inter,sans-serif;color:#f5d297}
.tg-card-benefits-title span{font:800 9px/1 Inter,sans-serif;color:#acc5ae;letter-spacing:.12em}
.tg-card-benefits-grid{
 display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;align-items:stretch;
 font-size:10px;color:#b3b0a7;
}
.tg-benefit-stat{
 display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;
 min-width:0;border-radius:9px;border:1px solid rgba(211,222,165,.18);
 background:linear-gradient(150deg,#35403a,#1b2527);padding:6px 2px;
}
.tg-benefit-stat strong{font:900 clamp(15px,2.8dvh,23px)/1 Inter,sans-serif;color:#ffe0a5}
.tg-benefit-stat small{font-size:clamp(8px,1.3dvh,10px);color:#c4c8bc}
.tg-card-receipts{
 width:100%;min-height:35px!important;flex:none;margin-bottom:4px;
 border-color:#9cb17d8f!important;background:linear-gradient(160deg,#4c6340,#28382e)!important;
 color:#f4ffdb!important;font-weight:850!important;
}
.tg-home-coin{
 display:flex;flex:1;min-height:0;flex-direction:column;align-items:center;
 justify-content:space-between;gap:4px;margin:0 0 4px;
}
.tg-home-coin-label{flex:none;text-align:center;padding-top:4px}
.tg-home-coin-label h2{
 margin:2px 0 0;font:950 clamp(29px,5.3dvh,43px)/1 Inter,sans-serif;color:#ffda88;
 text-shadow:0 3px #5d351c,0 0 25px #eaba5c35;
}
.tg-home-coin-label small{font:800 12px/1 Inter,sans-serif;letter-spacing:.1em}
.tg-home-coin-model{
 flex:1;display:flex;align-items:center;justify-content:center;
 min-height:0;width:100%;isolation:isolate;
 background:radial-gradient(circle,rgba(212,147,61,.15),transparent 49%);
}
.tg-home-coin-model #tgHomeCoin{
 width:min(66vw,calc((100dvh - 280px) * .95),280px)!important;
 max-width:280px!important;max-height:100%!important;
 height:auto!important;aspect-ratio:1;
 margin:0 auto!important;--coin-size:min(66vw,calc((100dvh - 280px) * .95),280px);
}
.tg-home-coin .tg-gesture-hint{flex:none;margin:0 0 4px;font-size:9px}
.tg-home-coin-actions{
 flex:none;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
 gap:8px;width:100%;
}
.tg-home-coin-actions .button{font-size:clamp(10px,1.65dvh,12px)!important;font-weight:850}
.tg-home-coin-actions .tg-home-transfer{grid-column:1/-1;min-height:30px!important}
.tg-page-work #screen{
 display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden;
}
.tg-work-heading{flex:none}
.tg-work-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px;flex:none;margin:7px 0 9px}
.tg-work-tabs .selected,.tg-receipt-tabs .selected{
 background:linear-gradient(145deg,#847044,#38342a 76%)!important;border-color:#ecc781!important;color:#ffe3a4!important;
}
.tg-work-content{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}
.tg-work-stats{
 display:grid;grid-template-columns:1fr 1fr;gap:8px;flex:none;
 margin:0 0 8px;
}
.tg-work-stats>div{
 border-radius:13px;padding:clamp(7px,1.35dvh,12px);border:1px solid #d8bc8466;
 background:linear-gradient(154deg,#3f3026,#161c22);
}
.tg-work-stats span{display:block;font-size:9px;font-weight:800;color:#d6bf96}
.tg-work-stats strong{font:900 clamp(20px,3.7dvh,31px)/1.2 Inter,sans-serif;color:#ffde91}
.tg-work-stats small{font-size:9px}
.tg-work-missions{display:grid;flex:1;min-height:0;grid-template-rows:repeat(3,minmax(0,1fr));gap:7px}
.tg-work-mission{
 display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:7px;align-items:center;
 min-height:0;border:1px solid rgba(238,205,144,.29);border-radius:14px;
 background:linear-gradient(146deg,#39302c,#1b2029 73%);padding:7px;
 box-shadow:inset 0 1px #fff0c327,0 2px 0 #131015;
}
.tg-work-icon{width:32px;height:32px;display:grid;place-items:center;border-radius:11px;
 background:linear-gradient(142deg,#a07840,#392d25);font-size:23px;color:#ffdd9b;
 text-shadow:0 3px #6e3e1c;box-shadow:inset 0 1px #ffefb280,0 3px 0 #201911;
}
.tg-work-mission-main{min-width:0}
.tg-work-mission h3{font-size:clamp(10px,1.75dvh,13px);margin:0;color:#ffdb9c;line-height:1.1}
.tg-work-mission p{font-size:clamp(9px,1.38dvh,11px);line-height:1.2;margin:3px 0;color:#cebfab}
.tg-work-mission small{font-size:clamp(8px,1.25dvh,10px);line-height:1.1;color:#b5ccaa}
.tg-work-mission>.button{font-size:9px!important;min-height:30px!important;max-width:91px;padding:5px!important}
.tg-work-disclaimer{flex:none;color:#b6a9a0;font-size:9px;line-height:1.3;margin:7px 0 1px;text-align:center}
.tg-work-content>.tg-crew{
 flex:1;min-height:0;max-height:100%;overflow:hidden;
}
.tg-page-history #screen>.tg-receipt-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px;flex:none;margin:9px 0}
.tg-receipt-list .tg-receipt-item{
 display:flex;align-items:center;justify-content:flex-start;gap:7px;width:100%;text-align:left;
 padding:8px!important;
}
.tg-receipt-symbol{
 flex:none;width:27px;height:27px;display:grid;place-items:center;border:1px solid #a88854;
 color:#fbd18c;background:#553a2c;border-radius:9px;font-size:18px;
}
.tg-receipt-copy{display:flex;flex:1;min-width:0;flex-direction:column;gap:3px}
.tg-receipt-copy b{font-size:10px;line-height:1.15;color:#fff1d4;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.tg-receipt-copy small{font-size:9px;line-height:1.1;color:#b8afa1}
.tg-receipt-amount{
 text-align:right;max-width:40%;font-size:clamp(10px,1.6dvh,12px);color:#ffbb9e;
}
.tg-receipt-amount[data-positive="true"]{color:#b5efa8}
.tg-receipt-detail>p{display:flex;justify-content:space-between;gap:13px;padding:9px 0;margin:0;border-bottom:1px solid #ffe5bb22}
.tg-receipt-detail>p span{color:#bda990}
.tg-receipt-detail>p b{text-align:right;overflow-wrap:anywhere}
.tg-receipt-dialog>[data-close]{width:100%;margin:13px 0 0}
@media(max-height:600px){
 .tg-card-switcher{min-height:43px;padding:3px}
 .tg-card-benefits{gap:4px;padding:6px}
 .tg-benefit-stat{padding:4px 2px}
 .tg-card-receipts{min-height:30px!important}
 .tg-work-mission{padding:4px 5px}
 .tg-work-mission>.button{min-height:28px!important}
}

.tg-work-mission .tg-work-reward-label{
 display:block;font-size:clamp(8px,1.28dvh,9px);line-height:1.12;margin-top:3px;
 color:#ffcf85;font-weight:800;white-space:normal;
}
@media(max-height:590px){
 .tg-work-mission .tg-work-reward-label{font-size:8px;line-height:1}
 .tg-work-mission p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
}

.tg-page-work.tg-page-crew .tg-crew>.tg-eyebrow,.tg-page-work.tg-page-crew .tg-crew>.tg-title,.tg-page-work.tg-page-crew .tg-crew>.tg-lead{display:none!important}
.tg-page-work.tg-page-crew .tg-crew{margin:0!important;height:100%!important}

/* WORK -> BALI CREW: true viewport-constrained subpages instead of clipped management. */
.tg-page-work.tg-page-crew .tg-work-content>.tg-crew{
 width:100%;max-width:100%;height:100%!important;min-height:0;
 display:flex;flex-direction:column;padding:0!important;gap:3px;margin:0!important;overflow:hidden;
}
.tg-page-work.tg-page-crew .tg-crew-party{flex:none;min-height:0;margin:2px 0!important}
.tg-page-work.tg-page-crew .tg-crew-panel-tabs{flex:none;margin:2px 0!important;gap:4px}
.tg-page-work.tg-page-crew .tg-crew-panel-tabs button{min-height:29px;padding:5px 2px;font-size:8px}
.tg-page-work.tg-page-crew .tg-crew-pane{
 flex:1 1 0!important;min-height:0!important;
 padding:clamp(6px,1.1dvh,10px)!important;margin:1px 0!important;
 overflow:hidden!important;
}
.tg-page-work.tg-page-crew .tg-crew-account{
 display:flex!important;flex-direction:column;gap:5px;justify-content:flex-start;
}
.tg-page-work.tg-page-crew .tg-crew-account[hidden]{display:none!important}
.tg-page-work.tg-page-crew .tg-crew-stage-tabs{
 display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;
 flex:none;margin:0;
}
.tg-page-work.tg-page-crew .tg-crew-stage-tabs:has([data-crew-entry]){grid-template-columns:repeat(2,minmax(0,1fr))}
.tg-page-work.tg-page-crew .tg-crew-stage-tabs .button{
 min-height:28px!important;padding:5px 2px!important;font-size:clamp(8px,1.3dvh,10px)!important;
 border-color:#6e513b;background:#1d1b23;color:#d8c3a8;
 border-radius:8px!important;
}
.tg-page-work.tg-page-crew .tg-crew-stage-tabs .selected{
 background:linear-gradient(135deg,#765334,#322630)!important;
 border-color:#e9c588!important;color:#ffe8b4!important;
}
.tg-page-work.tg-page-crew .tg-crew-stage-content{
 flex:1 1 0;min-height:0;display:flex;flex-direction:column;gap:5px;overflow:hidden;
}
.tg-page-work.tg-page-crew .tg-crew-stage-content .tg-crew-hero{
 padding:clamp(5px,1dvh,9px)!important;min-height:0;
}
.tg-page-work.tg-page-crew .tg-crew-stage-content .tg-crew-numbers{
 margin:0!important;gap:5px!important;
}
.tg-page-work.tg-page-crew .tg-crew-stage-content .tg-crew-levels{
 margin:0!important;gap:4px!important;
}
.tg-page-work.tg-page-crew .tg-crew-stage-content .tg-crew-level{
 min-height:0!important;padding:2px!important;gap:1px;
}
.tg-page-work.tg-page-crew .tg-crew-stage-content .tg-crew-buttons{gap:5px;flex:none}
.tg-page-work.tg-page-crew .tg-crew-stage-content .tg-crew-buttons>.button{
 min-height:30px!important;padding:5px 2px!important;font-size:9px!important;
}
.tg-page-work.tg-page-crew .tg-crew-stage-content .tg-crew-verified{
 padding:5px 7px;margin:0!important;font-size:9px;line-height:1.2;
}
.tg-page-work.tg-page-crew .tg-crew-stage-content .tg-crew-captain-tools{
 display:flex!important;flex-direction:column;flex-wrap:nowrap;align-items:stretch;
 padding:5px 0 0;margin:3px 0 0;gap:5px;
}
.tg-page-work.tg-page-crew .tg-crew-captain-tools label{min-width:0;flex:none;font-size:9px;gap:4px}
.tg-page-work.tg-page-crew .tg-crew-captain-tools input{height:32px;min-height:32px;font-size:12px;padding:5px 8px}
.tg-page-work.tg-page-crew .tg-crew-captain-tools .button{min-height:29px!important;font-size:9px}
.tg-page-work.tg-page-crew .tg-crew-ranks{overflow:hidden}
.tg-page-work.tg-page-crew .tg-crew-rank{padding:clamp(4px,1dvh,9px) 0!important}
.tg-page-work.tg-page-crew .tg-crew-rank span{font-size:9px}
.tg-page-work.tg-page-crew .tg-crew>.tg-engagement-note{display:none!important}
.tg-page-work.tg-page-crew .tg-crew>[data-crew-message]{flex:none;margin:2px 0 0;font-size:9px}
@media(max-height:620px){
 .tg-page-work.tg-page-crew .tg-crew-party>label{font-size:8px}
 .tg-page-work.tg-page-crew .tg-crew-stage-tabs{gap:3px}
 .tg-page-work.tg-page-crew .tg-crew-account{gap:4px}
 .tg-page-work.tg-page-crew .tg-crew-stage-content{gap:3px}
 .tg-page-work.tg-page-crew .tg-crew-stage-content .tg-crew-hero h2{font-size:14px}
 .tg-page-work.tg-page-crew .tg-crew-stage-content .tg-crew-shield{font-size:23px}
 .tg-page-work.tg-page-crew .tg-crew-stage-content .tg-crew-numbers>div{padding:3px 2px}
 .tg-page-work.tg-page-crew .tg-crew-stage-content .tg-crew-numbers strong{font-size:14px}
 .tg-page-work.tg-page-crew .tg-crew-stage-content .tg-crew-level>span{font-size:10px}
 .tg-page-work.tg-page-crew .tg-crew-stage-content .tg-crew-level strong{font-size:9px}
}
