/* Shared layout and control conventions. Page-specific artwork stays in its own stylesheet. */
:root{--ui-text:#204355;--ui-muted:#657e8c;--ui-line:#dce7eb;--ui-accent:#176a72;--ui-radius:10px}
.main,.content{min-width:0}.content{width:100%}
.page-head p{font-size:13px;color:var(--ui-muted);line-height:1.7}
.btn{min-height:40px;font-size:13px;border-radius:var(--ui-radius)}
.btn.small{min-height:34px;font-size:12px}
.muted,.request-note{color:var(--ui-muted)}
th{font-size:12px;color:var(--ui-muted)}
.work-title small,.stat-foot,.finance-description,.finance-setting-foot small,.finance-export-actions small{font-size:12px;color:var(--ui-muted)}
.badge{display:inline-flex;align-items:center;vertical-align:middle;line-height:1.5;font-size:12px}
.payout-subnav,#translation-root .translation-tabs{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:24px;border-bottom:1px solid var(--ui-line);padding:0;margin:0 0 24px;scrollbar-width:thin}
.payout-subnav .btn,#translation-root .translation-tabs .btn{flex-shrink:0;background:transparent;border:0;border-bottom:2px solid transparent;border-radius:0;padding:12px 2px;color:var(--ui-muted);font-size:14px;font-weight:500;box-shadow:none}
.payout-subnav .btn.primary,.payout-subnav .btn.primary:hover,#translation-root .translation-tabs .btn.primary,#translation-root .translation-tabs .btn.primary:hover{background:transparent;color:var(--ui-accent);border-bottom-color:var(--ui-accent);font-weight:650}
.tabs{background:transparent;padding:0;gap:6px;flex-wrap:wrap}
.tab{border-radius:8px;color:var(--ui-muted);font-size:13px;min-height:38px}
.tab.active{background:#e4f2f1;color:var(--ui-accent);box-shadow:inset 0 0 0 1px #c7e2df}
.payout-list .table-wrap,.account-list .table-wrap{max-height:none}
.home-guide{border:1px solid var(--ui-line);border-radius:14px;background:#fff;margin-bottom:24px;overflow:hidden}
.home-guide>summary{display:flex;align-items:center;justify-content:space-between;gap:16px;cursor:pointer;padding:16px 22px;color:var(--ui-text);font-size:14px;font-weight:600;list-style:none}
.home-guide>summary::-webkit-details-marker{display:none}.guide-toggle-label{color:var(--ui-accent);font-size:12px;white-space:nowrap}.guide-toggle-label:after{content:'展开引导 ＋'}.home-guide[open] .guide-toggle-label:after{content:'收起引导 −'}
.home-guide .home-creation-guide{margin:0;border:0;border-radius:0}
.finance-history .table-wrap,.financial-report-table{isolation:isolate}
.finance-history th:first-child,.finance-history td:first-child,.financial-report-table th:first-child,.financial-report-table td:first-child{position:sticky;left:0;background:#fff;z-index:1;box-shadow:1px 0 var(--ui-line)}
.financial-report-table th:first-child{z-index:3}
dialog:not(.preview):not(.chart-zoom-dialog){max-height:calc(100dvh - 32px);overscroll-behavior:contain}
@media(max-width:960px){
 .layout{display:block}.main{width:100%;margin-left:0}.sidebar{width:238px;transform:translateX(-100%);transition:transform .2s;box-shadow:none}.sidebar.open{transform:translateX(0);box-shadow:10px 0 50px #102c4622}
 .mobile-menu{display:inline-flex}.topbar{padding:0 20px;gap:12px}.top-meta{display:flex}.top-meta>span{display:none}
 .sidebar-backdrop{position:fixed;inset:0;z-index:9;background:#102c4659;padding:0;touch-action:manipulation}.sidebar.open~.sidebar-backdrop{display:block}
 body:has(.sidebar.open){overflow:hidden}
 .content{padding:24px}.icon-button.mobile-menu,.notification-button{min-width:44px;min-height:44px;align-items:center;justify-content:center}
 .sidebar .nav-item,.sidebar .nav-group>summary{min-height:44px}
}
@media(max-width:600px){
 .content{padding:22px 16px}.topbar{padding:0 12px}.page-head{flex-wrap:wrap;align-items:flex-start}.page-head p{font-size:13px;max-width:none}.page-head h1{font-size:23px;line-height:1.35}
 .btn,.btn.small,.page-head .btn,.tab,.review-toolbar .tab{min-height:44px;font-size:13px}
 input:not([type=checkbox]):not([type=radio]),select,textarea{font-size:16px}.finance-card input,.finance-card select{font-size:16px;min-height:44px}
 .stat-top,.stat-foot,.hero p,.home-creation-steps span{font-size:12px}.notice{font-size:13px;line-height:1.7}
 .panel-head{flex-wrap:wrap;gap:12px}.panel-head h2{margin:0}.tabs{justify-content:flex-start;width:auto;max-width:100%}
 .toolbar{flex-wrap:wrap}.toolbar .search{width:100%;max-width:none}
 .works-table{border:0;background:transparent;overflow:visible}.works-table table,.works-table tbody{display:block;min-width:0;width:100%}.works-table thead{display:none}
 .works-table tr{display:grid;grid-template-columns:1fr 1fr;gap:12px 16px;border:1px solid var(--ui-line);border-radius:12px;padding:16px;background:#fff;margin-bottom:12px}
 .works-table td{display:block;border:0!important;padding:0!important;min-width:0;white-space:normal;font-size:13px}
 .works-table td:first-child,.works-table .work-row-actions{grid-column:1/-1}.works-table td[data-label]:before{content:attr(data-label);display:block;font-size:12px;color:var(--ui-muted);margin-bottom:5px}
 .works-table .work-title{align-items:flex-start}.works-table .work-title b{font-size:15px;overflow-wrap:anywhere}.works-table .work-row-actions{display:flex;justify-content:flex-end;gap:8px;border-top:1px solid var(--ui-line)!important;padding-top:10px!important;flex-wrap:wrap}
 .finance-history:after,.financial-report-table:before{content:'左右滑动查看完整明细';display:block;padding:12px 16px;font-size:12px;color:var(--ui-muted);background:#f6fafb}
 .finance-history th:first-child,.finance-history td:first-child{max-width:160px;white-space:normal}
 dialog:not(.preview):not(.chart-zoom-dialog){width:calc(100vw - 24px);max-width:calc(100vw - 24px);padding:20px;border-radius:14px}
 .home-guide>summary{padding:16px;font-size:13px}.home-guide .hero{padding:20px}.home-guide .hero h2{font-size:23px}
 .forum-format-tools button{min-width:44px;height:44px}.forum-view-switch button{min-height:40px;font-size:12px}
}
@media(prefers-reduced-motion:reduce){.sidebar{transition:none}}
@media(max-width:600px){
 #works-list{border:0;background:transparent;box-shadow:none;overflow:visible}
 .toolbar>.tabs,.review-toolbar>.tabs{width:100%;flex-wrap:nowrap;overflow-x:auto;justify-content:flex-start;padding:2px 0 6px;scrollbar-width:thin}
 .toolbar>.tabs>.tab{flex-shrink:0;white-space:nowrap}
 .works-table .work-title>span>b{font-size:15px;line-height:1.5}
}

@media(max-width:600px){.finance-email-row .field{flex-basis:100%}.finance-email-row .btn{margin-left:auto}}
/* Narrow-screen content actions must stay inside their cards, including clipped containers. */
.page-head h1,.dialog-head h2,.guild-poster h3,.guild-current-head h3{overflow-wrap:anywhere;min-width:0}
.dialog-head{gap:12px}.dialog-head .icon-button{flex-shrink:0}
@media(max-width:600px){
 .forum-compose-buttons{display:grid;grid-template-columns:1fr 1fr;gap:10px;min-width:0}
 .forum-compose-buttons .btn{padding:10px 8px;min-width:0;font-size:13px}
 .forum-compose-buttons #forum-publish{grid-column:1/-1}
 .forum-compose-footer>div:first-child{flex-wrap:wrap;gap:6px;font-size:12px}
 .forum-compose-footer .forum-save-state{font-size:12px;line-height:1.6}
 .forum-source-pane textarea{font-size:16px;line-height:1.75}
 .forum-pane-label small{font-size:11px}.forum-compose-title input{font-size:19px}
 .version-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .version-actions .btn{padding:10px 6px;gap:6px;font-size:12px;min-width:0;white-space:normal}
 .version-top{gap:10px;align-items:flex-start}.version-top h3{min-width:0;overflow-wrap:anywhere}.version-top .badge{flex-shrink:0}
 .version>small,.version>p>small,.comments-head small{font-size:12px;line-height:1.6}
 .guild-manage{min-height:44px;padding:10px 8px;margin-top:4px;font-size:12px;color:#756b55}
 .guild-poster-top,.guild-poster-foot small,.guild-claimants-label,.guild-claimants-empty{font-size:12px}
 .guild-poster-foot{flex-wrap:wrap}.guild-poster-foot .btn{margin-left:auto}
 .guild-current-head{flex-wrap:wrap}.guild-current-head>div{min-width:0}
 .guild-history>div:not(.panel-head){gap:12px;flex-wrap:wrap}
 .dialog-head .icon-button{min-width:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center}
}
