/* Shared player surfaces. Page layout and money rules live in their own modules. */
html[data-theme] {
 --polish-canvas:#f4f5f7; --polish-panel:#fff; --polish-raised:#f0f1f4;
 --polish-border:#dee1e7; --polish-line:#dee1e7; --polish-ink:#252a34;
 --polish-muted:#616977; --polish-accent:#80539a; --polish-focus:#80539a;
 --polish-nav:#fff; --polish-primary:#80539a; --polish-shadow:0 2px 8px #20263206;
 --polish-inset:none; --surface:var(--polish-canvas); --ink:var(--polish-ink); --muted:var(--polish-muted);
}
html[data-theme="light"] { --polish-field-border:#92849d; }
html[data-theme="dark"] {
 --polish-canvas:#14161b; --polish-panel:#20232b; --polish-raised:#292d37;
 --polish-border:#3b414d; --polish-line:#343a45; --polish-ink:#f1f3f6;
 --polish-muted:#b3bbc8; --polish-accent:#c19bd9; --polish-focus:#c19bd9;
 --polish-nav:#20232b; --polish-primary:#88519f; --polish-shadow:0 2px 10px #00000014;
 --night-canvas:var(--polish-canvas); --night-panel:var(--polish-panel); --night-raised:var(--polish-raised);
 --night-border:var(--polish-border); --night-ink:var(--polish-ink); --night-muted:var(--polish-muted); --night-accent:var(--polish-accent);
 scrollbar-color:#555f70 #14161b;
}
html[data-theme] body {
 font-family:var(--polish-font,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif);
 font-size:15px; line-height:1.55; background:#e6e8ed; color:var(--polish-ink);
 -webkit-text-size-adjust:100%; text-size-adjust:100%;
}
html[data-theme="dark"] body { background:#101216; }
html[data-theme] :is(button,input,select,textarea) { font-family:inherit; }
html[data-theme] :is(.app,.mail-app,.community-app,.official-app,.client-chat) { background:var(--polish-canvas); color:var(--polish-ink); }
html[data-theme] :is(button,a,input,select,textarea,summary):focus-visible { outline:2px solid var(--polish-focus); outline-offset:3px; }
html[data-theme] .app>header { background:var(--polish-panel); border-color:var(--polish-line); box-shadow:none; }
html[data-theme] .app>header h1 { font-weight:600; letter-spacing:-.2px; }
html[data-theme] .brand-63game img { box-shadow:none; }
html[data-theme] :is(.glass,.profile-personal-details,.profile-links,.mail-card,.mail-detail,.updates-menu-card,.updates-detail-card,.share-link-card,.share-stat) {
 border-color:var(--polish-border); box-shadow:none;
}
html[data-theme] :is(.wallet,.profile-wallet,.profile-personal-details,.profile-links,.mail-card,.updates-menu-card,.updates-detail-card) { background:var(--polish-panel); }
html[data-theme] :is(.wallet,.profile-wallet) { border-radius:15px; }
html[data-theme] :is(.wallet-actions button,.profile-money-actions>button) { background:var(--polish-raised); border-color:var(--polish-line); box-shadow:none; }
html[data-theme] :is(.wallet-actions button,.profile-money-actions>button)>b { font-weight:600; }
html[data-theme] .bottom-nav button { font-weight:500; }
html[data-theme] .bottom-nav button.active { font-weight:600; }
html[data-theme] :is(.profile-links,.updates-menu-card,.mail-card) { border-radius:13px; }
html[data-theme] .profile-links button { font-weight:500; }

html[data-theme] .mail-card-title { gap:8px; }
html[data-theme] .mail-card-title strong { min-width:0; overflow:hidden; text-overflow:ellipsis; font-size:15px; font-weight:600; }
html[data-theme] .mail-card-state { flex:none; margin-left:auto; padding:2px 6px; border-radius:4px; background:var(--polish-raised); color:var(--polish-accent); font-size:11px; font-weight:600; line-height:18px; }
html[data-theme] .mail-card.is-read .mail-card-title strong { font-weight:500; }
html[data-theme] .mail-card-meta { color:var(--polish-muted); font-size:13px; }
html[data-theme] .mail-body { font-size:16px; line-height:1.7; }

/* Profile keeps its cover and portrait; account-only details have a clear label. */
html[data-theme] body #profile-page .profile-cover:not(.has-profile-cover) { background:linear-gradient(180deg,#cbd0d7,#e0e4e9); }
html[data-theme="dark"] body #profile-page .profile-cover:not(.has-profile-cover) { background:linear-gradient(180deg,#2c303a,#363c49); }
html[data-theme] body #profile-page .avatar-edit { box-shadow:none; }
html[data-theme="dark"] body #profile-page .avatar-edit:has(#profile-avatar[hidden]),
html[data-theme="dark"] body #profile-page #avatar-placeholder { background:#343a45; color:#a2abb9; }
html[data-theme] body #profile-page .profile-info { border-radius:22px 22px 0 0; background:var(--polish-panel); }
html[data-theme] body #profile-page .profile-name-row h2 { font-weight:650; letter-spacing:-.3px; }
html[data-theme] body #profile-page .profile-identity-right :is(.profile-id-row,.profile-email-row) { min-height:28px; }
html[data-theme] body #profile-page :is(#profile-copy-id,#profile-copy-email) { flex-basis:44px; width:44px; min-width:44px; height:28px; min-height:28px; padding:6px 12px; border-radius:8px; }
html[data-theme] body #profile-page :is(#edit-name,#edit-signature) { flex-basis:44px; width:44px; min-width:44px; height:44px; min-height:44px; padding:12px; }
html[data-theme] body #profile-page .profile-story-row>#profile-add-story { min-height:44px; padding:6px 8px; border-radius:9px; line-height:1.2; white-space:normal; font-weight:600; box-shadow:none; }
html[data-theme] body #profile-page .profile-home-actions>button,
html[data-theme] body #profile-page .profile-access-row>.profile-login { min-height:44px; height:auto; border-radius:9px; box-shadow:none; font-weight:500; }
html[data-theme] body #profile-page :is(.cover-edit,.avatar-camera) { min-width:44px; min-height:44px; width:44px; height:44px; padding:10px; border-radius:10px; box-shadow:none; }
html[data-theme] body #profile-page .avatar-camera { border-radius:50%; }
html[data-theme] body #profile-page .profile-personal-details { padding:8px 12px 10px; margin-bottom:12px; border-radius:13px; }
html[data-theme] body #profile-page .profile-personal-heading { margin-bottom:0; }
html[data-theme] body #profile-page .profile-personal-heading h3 { font-size:14px; font-weight:600; line-height:1.4; }
html[data-theme] body #profile-page .profile-signature-row #profile-signature { min-height:19.5px; font-size:13px; line-height:1.5; }
html[data-theme] body #profile-page #edit-signature svg { width:16px; height:16px; }
html[data-theme] body #profile-page .profile-personal-details.has-signature { display:grid; grid-template-columns:minmax(0,1fr) 44px; column-gap:8px; align-items:start; }
html[data-theme] body #profile-page .has-signature .profile-personal-heading { display:contents; }
html[data-theme] body #profile-page .has-signature #profile-personal-title { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
html[data-theme] body #profile-page .has-signature #edit-signature { grid-column:2; grid-row:1; }
html[data-theme] body #profile-page .has-signature .profile-signature-row { grid-column:1; grid-row:1; min-width:0; padding:10px 0 6px; }
html[data-theme] body #profile-page .has-signature #signature-form { grid-column:1 / -1; min-width:0; }

/* Smaller icon artwork can still have a comfortable touch target. */
html[data-theme] :is(.modal-close,.popup-close,.daily-close,.first-deposit-back,.profile-editor-back,.profile-field-back,.mail-back,.chat-back,.official-back,.community-back) { min-width:44px; min-height:44px; }
html[data-theme] :is(dialog:not(.game-play-layer),.profile-photo-actions) { border-color:var(--polish-border); box-shadow:0 16px 48px #00000032; }
html[data-theme] dialog:not(.game-play-layer)::backdrop { backdrop-filter:none; -webkit-backdrop-filter:none; }
html[data-theme] :is(.photo-actions,.photo-actions button,.profile-photo-actions button) { box-shadow:none; }

/* The introduction is short, static and silent until Listen is chosen. */
html[data-theme] .character-welcome .welcome-speech { border-color:#ffffff29; background:linear-gradient(180deg,#1c1e27c9,#1c1e27e6); border-radius:18px; box-shadow:none; backdrop-filter:none; }
html[data-theme] .character-welcome::backdrop { background:#101219a8; }
html[data-theme] .character-welcome .welcome-speech h2 { font-size:24px; line-height:1.2; font-weight:650; letter-spacing:-.4px; }
html[data-theme] .character-welcome .welcome-speech p { font-size:14px; line-height:1.6; }
html[data-theme] .character-welcome .welcome-speech-eyebrow { letter-spacing:.7px; font-size:10px; }
html[data-theme] .character-welcome .welcome-speech-actions { display:grid; grid-template-columns:1fr; gap:8px; margin-top:16px; }
html[data-theme] .character-welcome :is(.welcome-add,.welcome-daily) { width:100%; min-height:44px; margin:0; padding:10px 14px; border-radius:9px; font-size:14px; font-weight:600; }
html[data-theme] .character-welcome .welcome-add { background:#80539a; border:1px solid #9668ae; color:#fff; box-shadow:none; }
html[data-theme] .character-welcome .welcome-daily { background:#ffffff0a; border:1px solid #ffffff35; color:#f1f3f6; box-shadow:none; }
html[data-theme] .character-welcome .welcome-voice { width:auto; min-height:44px; margin:4px 0 0; padding:10px 0; border:0; background:transparent; color:#e1d5e8; font-size:12px; box-shadow:none; }
html[data-theme] .character-welcome .welcome-guide-skip { min-width:44px; min-height:44px; font-size:13px; }

@media(max-width:360px) {
 html[data-theme] body #profile-page .profile-name-row h2 { font-size:21px; }
 html[data-theme] body #profile-page .profile-identity-right :is(.profile-id-row,.profile-email-row) { font-size:12px; }
 html[data-theme] .character-welcome .welcome-speech h2 { font-size:22px; }
}
