/* Subster v9: approved Figma Dark. Existing DOM and API contracts retained. */
body[data-detail] #shop-switch{display:none}
:root{color-scheme:dark;--bg:#0c0c13;--surface:#181522;--border:#2e263c;--text:#f4f1fc;--muted:#a79cb8;--blue:#8548e8;--green:#42e6aa;--bubble:#35224c;background:var(--bg);color:var(--text);font-size:14px}
body{background:var(--bg);color:var(--text)}main{max-width:480px;padding:0 20px calc(110px + env(safe-area-inset-bottom));min-height:100dvh}p{color:var(--muted)}h1,h2,h3{line-height:1.4}h2{font-size:24px;letter-spacing:-.5px}h3{font-size:16px}a{color:#c7a5ff}button{border:1px solid transparent;border-radius:12px;min-height:48px;padding:12px 16px;font-weight:500;background:var(--blue)}button:disabled{cursor:not-allowed}button:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible{outline:2px solid #c4a1ff;outline-offset:3px}
#app-header{height:84px;background:var(--bg);margin:0 -20px 20px;padding:20px;gap:12px}#app-header small{font-size:10px;letter-spacing:3px;color:var(--muted)}#screen-title{font-size:20px;letter-spacing:0;margin:2px 0 0}#app-header .icon-button{width:44px;height:44px;flex-basis:44px;border-radius:16px;background:var(--surface);border:1px solid var(--border);padding:10px}#app-header #screen-refresh{background:none;border-color:transparent}.icon-button{background:var(--surface);border:1px solid var(--border);color:var(--text)}.icon-button img,.nav-icon{width:22px;height:22px}#status{background:#342039;border:1px solid #62406e;color:#eed6fa}
.bottom-nav{bottom:calc(12px + env(safe-area-inset-bottom));width:calc(100% - 24px);max-width:456px;background:var(--surface);border:1px solid var(--border);border-radius:22px;padding:6px;min-height:70px;gap:4px;box-shadow:0 5px 24px #0005}.bottom-nav button{border:0;min-height:56px;border-radius:16px;padding:8px 2px;gap:4px;color:var(--muted);font-size:10px}.bottom-nav button[aria-current]{background:var(--blue);color:var(--text)}
.shop-switch{display:flex;width:100%;gap:12px;align-items:center;padding:12px;margin:0 0 16px;text-align:left;background:var(--surface);border:1px solid var(--border);border-radius:16px}.shop-info{flex:1;min-width:0}.shop-info strong{font-size:15px;display:block;overflow-wrap:anywhere}.shop-info small{display:block;font-size:11px;color:var(--muted);margin-top:2px}.shop-switch .avatar{width:42px;height:42px;border-radius:14px;font-size:18px}.avatar{background:var(--blue);color:var(--text);border-radius:16px}.badge{background:var(--bubble);color:#d9c2f4;border:1px solid var(--border);padding:6px 8px;font-size:11px}.badge[data-status=PAID],.badge[data-status=CONFIRMED]{color:var(--green);background:#14392e}.badge[data-status=SENT],.badge[data-status=PENDING]{color:#e6c386;background:#3a2b19}
.card{background:var(--surface);border:1px solid var(--border);border-radius:16px;box-shadow:none;padding:16px;margin:12px 0}.card h3{font-size:16px;margin:0;line-height:1.4}.entry--orders{position:relative}.entry--orders .entry-open{position:absolute;inset:0;width:100%;height:100%;opacity:0;margin:0}.entry--orders:focus-within,.entry--chats:focus-within{outline:2px solid #c4a1ff}.entry-top,.entry-bottom{display:flex;justify-content:space-between;align-items:center;gap:12px}.entry-top{margin-bottom:12px}.entry-top small{color:var(--muted);font-size:11px;overflow-wrap:anywhere;min-width:0}.entry-bottom{margin-top:14px}.entry-bottom p{margin:0;font-size:12px;min-width:0;overflow-wrap:anywhere}.price{color:var(--green);font-size:16px}.entry-body>p{color:var(--muted)}.buyer-comment{background:var(--bg)}.entry--chats{border-radius:16px;padding:16px}.entry--chats .avatar{background:var(--bubble);color:#d7b4fa}.entry--chats .chat-preview{color:var(--muted)}
.order-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0 0 16px}.order-stat{padding:12px 10px;border:1px solid var(--border);background:var(--surface);border-radius:16px;min-width:0}.order-stat strong{display:block;color:var(--green);font-size:20px;line-height:1.4;overflow-wrap:anywhere}.order-stat small{display:block;color:var(--muted);font-size:10px;margin-top:5px}.order-summary-note{font-size:10px;margin:-8px 0 14px}.order-tabs{display:flex;overflow-x:auto;gap:8px;background:none;padding:0;border-radius:0;margin:12px 0 16px;scrollbar-width:none}.order-tabs button{border:1px solid var(--border);background:var(--surface);border-radius:14px;color:var(--text);font-size:12px;min-height:38px;padding:9px;white-space:nowrap}.order-tabs button[aria-pressed=true]{background:var(--blue)}.order-tabs strong{display:none!important}.search-field input{height:48px;padding-left:44px;background-color:var(--surface);background-size:22px;border:1px solid var(--border);border-radius:16px;color:var(--text)}.list-controls>p,.list-filter>summary,.list-filter>label{color:var(--muted)}.clear-filter{color:#bf98f4!important}.list-controls>p{margin:4px 0}.list-filter>summary{min-height:32px}.list-filter[open]>summary{border:0}.list-controls{margin-bottom:12px}
input,textarea,select{background:var(--surface);color:var(--text);border:1px solid var(--border);padding:13px;min-height:48px}input::placeholder,textarea::placeholder{color:#a79cb8;opacity:1}label{color:var(--muted);font-size:12px}input,select,textarea{font-size:16px}input[type=checkbox]{min-height:20px;vertical-align:middle;accent-color:var(--blue)}.secondary{background:var(--surface);color:var(--text);border:1px solid var(--border)}details[open]>summary{border-color:var(--border)}.menu-group{background:var(--surface);border-color:var(--border);border-radius:16px}.menu-row{background:var(--surface);color:var(--text);border-color:var(--border);padding:16px;border-radius:16px;text-decoration:none}.menu-row span:last-child{color:var(--muted)}.profile-links{display:grid;gap:12px;margin:20px 0}.profile-hero{flex-direction:column;text-align:center;margin:12px 0;gap:8px}.profile-hero .avatar{width:64px;height:64px}.profile-hero p{color:var(--text);font-size:24px;margin:4px 0}.profile-plan-card{background:var(--surface);border:1px solid var(--border);padding:16px;border-radius:16px;margin-top:20px}#profile-plan{color:var(--muted);font-size:13px;text-align:center}#open-subscription{margin:12px 0 0}.balance-card{background:var(--surface);border:1px solid var(--border);border-radius:16px}.balance-card>strong{color:var(--green)}.balance-card .icon-button{border:0}#profile-connect{width:100%}
#connection{background:none;padding:0;border-radius:0}#connection>h2{margin:16px 0}#connection p{color:var(--muted)}#connection button{width:100%;margin:8px 0}#cancel-add-account{width:auto!important;font-size:12px;min-height:40px}#connect-form>details{background:var(--surface);border:1px solid var(--border);border-radius:16px;margin:18px 0;padding:0 0 10px}#connect-form>details p,#connect-form>details ol{padding-right:16px;padding-left:32px;line-height:1.6;font-size:12px;color:var(--muted)}#connect-form .proxy-settings{margin:16px 0}#connect-form .proxy-settings input{background:var(--surface)}#preview{background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:16px}#preview-name{font-size:22px!important;color:var(--text)!important;font-weight:600}#preview-id{font-size:12px}body[data-connecting] #shop-switch{display:none}
#app-menu{inset:0;margin:0 auto;width:min(480px,100%);height:100dvh;max-height:100dvh;border:1px solid var(--border);border-radius:0;background:var(--bg);color:var(--text);padding:20px;overscroll-behavior:contain}#app-menu::backdrop,.payment-dialog::backdrop{background:#000a;backdrop-filter:blur(4px)}.menu-header{position:sticky;top:-20px;padding:16px 0;background:var(--bg);z-index:3;margin-bottom:12px}.menu-header h2{font-size:20px}.menu-header button{color:var(--text)}#menu-links button{background:var(--surface);color:var(--text);border-color:var(--border);border-radius:16px;padding:16px;min-height:56px}#menu-back{width:100%}#account-list .card button,#add-account,#accounts-subscription{width:100%;margin-top:8px}.menu-page button{max-width:100%}.settings-list{display:grid;gap:12px;margin-bottom:16px}.settings-list button{text-align:left}.settings-page>summary{display:none}.settings-page{background:none;border:0;overflow:visible}.settings-page>section{padding:0}.settings-page>section>button{width:100%;margin:8px 0}.settings-page #notification-form button{width:100%}#disconnect{width:100%;color:#efb2bc;border-color:#5d3543}#update-connection-form>button{width:100%}
.detail-header{background:var(--bg);margin:0 -20px 16px;padding:20px;border-bottom:1px solid var(--border)}.detail-header h2{font-size:18px}.detail-header .avatar{background:var(--bubble)}#detail-content>section{background:var(--surface);border-color:var(--border);border-radius:16px}body[data-detail=chats] #detail-content>button{color:var(--muted);background:var(--surface);border:1px solid var(--border)}#chat-messages{gap:16px}.message{padding:14px;border-radius:16px}.message p{font-size:15px}.message--incoming{background:var(--surface)}.message--outgoing{background:var(--bubble);border:1px solid #593971}.message--system{background:none;padding:4px 8px}.message--system p{color:var(--muted);font-size:11px}.message--system time{color:var(--muted)}#send-form{max-width:480px;background:var(--bg);border-color:var(--border);padding:12px 20px calc(12px + env(safe-area-inset-bottom))}#send-form textarea{background:var(--surface);border-color:var(--border);color:var(--text)}#send-button{border-radius:14px}#send-button img{width:22px;height:22px}
.subscription-welcome>h2{font-size:24px;line-height:1.4;margin:0 0 12px}.subscription-welcome>p,.subscription-welcome>p:first-child{font-size:14px;letter-spacing:0;color:var(--muted)}.subscription-card{background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:20px}.subscription-card h3{font-size:22px}.subscription-card strong{color:var(--text);font-size:25px}.subscription-card ul{color:var(--muted);font-size:13px;line-height:1.8}.subscription-cards{gap:16px;grid-template-columns:1fr;margin:16px 0}.subscription-welcome details p{color:var(--muted)}.payment-dialog{background:var(--surface);color:var(--text);border:1px solid var(--border);padding:22px}.payment-dialog p{color:var(--muted)}.payment-dialog h2{font-size:22px}.payment-consent input{width:20px;min-width:20px}.promotion-presets button{background:var(--surface);border:1px solid var(--border);color:#d3b5fa}.promotion-days{gap:6px}.promotion-days label{background:var(--bg);border:1px solid var(--border);padding:8px;border-radius:10px;display:flex;align-items:center;gap:4px}.promotion-days input{margin:0;min-height:18px}.promotion-editor>button{width:100%;margin:8px 0}.promotion-editor>h4{font-size:20px}.promotion-save{position:sticky;bottom:12px;z-index:2;box-shadow:0 0 0 8px var(--surface)}
@media(min-width:601px){main{border-color:var(--border)}}@media(max-width:350px){main{padding-left:16px;padding-right:16px}#app-header{margin-left:-16px;margin-right:-16px;padding-left:16px;padding-right:16px}#screen-title{font-size:20px}.order-stat strong{font-size:17px}.order-stat{padding:10px 8px}.shop-switch{gap:8px}.entry-top{gap:8px}.bottom-nav{gap:0}.bottom-nav button{font-size:9px}}
