/* Shared layout, typography and component treatment. */
:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif;font-size:15.6px;--site-bg:#f3f5f6;--site-text:#25332f;--site-muted:#78867f;--site-border:#dfe5e2}
body{line-height:1.55;-webkit-font-smoothing:antialiased}h1{font-size:28.8px;font-weight:650;letter-spacing:0;margin-bottom:7px}h2{font-size:20.4px;font-weight:600}h3{font-size:16.8px;font-weight:600}p{line-height:1.65}.note,small{font-size:13.2px}.subtitle{font-size:14.4px;color:var(--site-muted)}aside{width:208px;padding:26px 14px 90px;overflow-y:auto}.brand{gap:12px;padding:0 12px 23px;font-size:22.8px;border-color:var(--site-border)}.brand>b{font-size:36.0px}.brand small{font-size:12.0px;letter-spacing:1.4px}.nav-label,nav .separator{font-size:12.0px;letter-spacing:.5px;margin:25px 14px 10px}nav a{position:relative;gap:12px;margin:3px 0;padding:10px 13px;border-radius:4px;font-size:14.4px;font-weight:450}nav a.selected{font-weight:600;color:var(--site-accent)}nav a.selected:before{content:"";position:absolute;left:0;width:3px;height:18px;border-radius:0 2px 2px 0;background:var(--site-accent)}nav a:hover{background:var(--site-soft)}.nav-icon{display:flex;width:17px;height:17px;align-items:center;justify-content:center}.nav-icon svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.55;stroke-linecap:round;stroke-linejoin:round}aside footer{position:static;margin:38px 13px 0;padding-top:16px;border-top:1px solid var(--site-border);font-size:12.0px;line-height:1.8}.shell{margin-left:208px}header{height:58px;padding:0 32px;border-color:var(--site-border);font-size:13.2px}#breadcrumb{color:var(--site-text);font-weight:500}.status{font-size:12.0px}.header-right{gap:22px}.user{font-size:13.2px;padding:6px 11px;border-color:var(--site-border)}main{max-width:1510px;padding:30px 34px 42px}.page-head{margin-bottom:23px;gap:16px}.panel,.card{border-radius:7px;border-color:var(--site-border);box-shadow:none}.panel{padding:22px;margin-bottom:18px}.card{padding:20px}.cards{gap:16px}.card>.picker{gap:10px}.card h3{font-size:16.8px}.person-avatar{width:42px;height:42px;border-radius:11px}.person-hit-rate{font-size:13.2px;padding:3px 6px;background:var(--site-soft);font-weight:600}.public-numbers{gap:5px}.public-numbers span{width:26px;height:29px;border-radius:3px;font-size:15.6px;font-variant-numeric:tabular-nums}.public-number-line{gap:10px}.excluded-badge{font-size:13.2px;padding:4px 7px;border-radius:4px}.excluded-badge b{font-size:20.4px}.card>p>strong{font-size:15.6px;font-variant-numeric:tabular-nums}.card>p.note{margin:12px 0}.card>.toolbar{padding-top:12px;margin-top:16px;gap:8px}.picker>label{font-size:13.2px}.picker select{min-height:34px}.draw-strip{border:1px solid var(--site-border);background:var(--site-surface);border-radius:7px;padding:17px 20px;margin:20px 0}.hall-draw-current{gap:18px}.hall-draw-current strong{font-size:15.6px}.hall-draw-current .note{margin:5px 0 0}.ball{box-shadow:none;border:1px solid var(--site-border);background:var(--site-soft);color:var(--site-accent);width:31px;height:31px;font-size:15.6px}.draw-toggle-group{gap:10px}.balls{gap:6px}.toolbar{margin:18px 0 15px}.search{font-size:14.4px}.tabs{background:var(--site-soft);padding:3px;border:1px solid var(--site-border);border-radius:5px}.tabs button{font-size:13.2px;padding:6px 12px;min-height:29px}.tabs button.selected{color:var(--site-accent);box-shadow:0 1px 2px #00000008;background:var(--site-surface)}input,select,textarea{font-size:14.4px;padding:9px 11px;border:1px solid var(--site-border);box-shadow:none}input:focus,select:focus,textarea:focus{outline:2px solid color-mix(in srgb,var(--site-accent) 18%,transparent);border-color:var(--site-accent)}textarea{line-height:1.7}.field{gap:7px;margin:16px 0}.field label,.form-row>label{color:var(--site-muted);font-size:13.2px}.form-row{padding:13px 0;border-color:var(--site-border)}.digits{gap:5px}.digits button{width:31px;height:31px;min-height:31px;border-radius:4px;font-variant-numeric:tabular-nums}.two-col{gap:18px;grid-template-columns:minmax(0,2fr) minmax(240px,1fr)}table{font-size:14.4px;font-variant-numeric:tabular-nums}th{background:var(--site-soft);color:var(--site-muted);font-size:13.2px;font-weight:500}th,td{padding:12px 15px;border-color:var(--site-border)}tbody tr:hover{background:color-mix(in srgb,var(--site-soft) 50%,transparent)}.table-wrap{border-radius:4px}#hall-history{padding-top:15px;margin-top:16px;border-color:var(--site-border)}#hall-history h3{font-size:14.4px}.metric-grid{gap:15px}.metric{padding:19px}.metric strong{font-size:32.4px;font-weight:600;color:var(--site-accent)}.tool{border-radius:7px}.tool p{font-size:14.4px}.section-head{margin:25px 0 16px}.chat-layout{gap:17px;grid-template-columns:minmax(0,1fr) 260px}.chat-panel .page-head{padding-bottom:14px;margin-bottom:0;border-bottom:1px solid var(--site-border)}.server-feed{height:440px;padding:12px 3px}.message-row{margin:19px 0;gap:9px}.message-row small{font-size:12.0px}.message-bubble{border-radius:5px;padding:11px 13px;box-shadow:none}.avatar{font-size:14.4px;width:29px;height:29px}.shared-plan{padding:13px;border:1px solid var(--site-border);border-radius:5px}.shared-plan strong{font-size:14.4px}.shared-plan .public-numbers{margin:12px 0}.shared-plan p{margin:7px 0}.saved-item{padding:14px 0;border-color:var(--site-border)}#server-task-list>.panel{border-radius:5px;padding:17px 19px}#server-task-editor{padding:20px;border-radius:5px}#server-chat>.panel:first-child>.toolbar{margin-bottom:14px}.auth-box{max-width:430px;margin:36px auto}.theme-grid{gap:17px}.theme-option{padding:15px;border-width:1px;text-align:left}.theme-option h3{margin-top:16px}.theme-preview{height:140px;border-radius:5px}.theme-option[aria-pressed=true]{box-shadow:inset 0 0 0 1px var(--site-accent)}.bottom-note{font-size:12.0px;border-top:1px solid var(--site-border);margin:0 34px;padding:18px 0;color:var(--site-muted)}#toast{font-size:14.4px;border-radius:5px;box-shadow:0 4px 18px #00000016;padding:10px 18px}details summary{font-size:14.4px}button,.btn{font-size:14.4px}button[style*="background:#283c32"]{background:var(--site-accent)!important;color:var(--site-surface)!important}.result{border-radius:5px}
@media(min-width:1600px){main{padding:36px 44px 48px}}
@media(max-width:1100px){main{padding:26px 25px}.cards{grid-template-columns:repeat(2,minmax(0,1fr))}.chat-layout{grid-template-columns:1fr}.two-col{grid-template-columns:1fr}.bottom-note{margin:0 25px}.card>.picker{gap:7px}.person-hit-rate{font-size:12.0px}}
@media(max-width:720px){aside{width:58px;padding:18px 5px;overflow-y:auto}.brand{padding:0 6px 18px;justify-content:center}.brand>b{font-size:33.6px}nav a{padding:12px 8px;margin:5px 0;justify-content:center}nav a.selected:before{height:16px}.nav-icon{width:19px;height:19px}.nav-icon svg{width:18px;height:18px}aside footer{display:none}.shell{margin-left:58px}header{height:52px;padding:0 15px}.header-right{gap:9px}main{padding:24px 14px 32px}h1{font-size:26.4px}.page-head{margin-bottom:20px}.subtitle{font-size:13.2px}.cards{grid-template-columns:1fr;gap:13px}.panel,.card{padding:17px;border-radius:6px}.public-numbers span{width:25px;height:29px}.public-numbers{gap:4px}.public-number-line{gap:9px}.draw-strip{padding:15px;margin:17px 0}.draw-toggle-group{margin-left:0}.hall-draw-current{gap:14px}.toolbar{gap:8px}.tabs{width:100%;justify-content:space-between}.tabs button{font-size:12.0px;padding:6px 8px}.search{width:100%;flex-basis:100%}.card .toolbar{justify-content:flex-start}.card .toolbar .btn,.card .toolbar button{font-size:13.2px}.metric-grid{gap:8px}.metric{padding:13px}.metric strong{font-size:27.6px}.theme-grid{grid-template-columns:1fr}.server-feed{height:390px}.message-row.mine>div{max-width:88%}.shared-plan{min-width:0}.shared-plan .public-numbers{gap:3px}.shared-plan .public-numbers span{width:22px}.chat-panel .page-head{gap:8px}.bottom-note{margin:0 14px;text-align:left;font-size:10.8px}.picker select{max-width:100%}.person-hit-rate{font-size:13.2px}}

.brand small{letter-spacing:.5px;white-space:nowrap}.brand{gap:9px}.brand>b{font-size:32px}

/* Stronger theme surfaces. */
:root,:root[data-theme=green]{--site-bg:#dce8e1;--site-soft:#d5e5db;--site-border:#c2d4c8;--site-muted:#627568}
:root[data-theme=blue]{--site-bg:#d3e2f4;--site-soft:#ccdef3;--site-border:#b4cbe5;--site-muted:#586e88}
:root[data-theme=apricot]{--site-bg:#eedbc3;--site-soft:#efdbc0;--site-border:#d9c0a0;--site-muted:#826c54}
:root[data-theme=purple]{--site-bg:#e0d4ed;--site-soft:#ddcdec;--site-border:#cbb6df;--site-muted:#7c678f}
:root[data-theme=night]{--site-bg:#101823;--site-surface:#202c3b;--site-soft:#314356;--site-border:#42566b;--site-text:#e8eef5;--site-muted:#afbed0;--site-accent:#9bd7bf}
.mobile-only,#mobile-nav,#mobile-shade{display:none}
@media(max-width:720px){
 body{padding-bottom:calc(70px + env(safe-area-inset-bottom))}body.menu-open{overflow:hidden}
 aside{position:fixed;inset:0 auto 0 0;width:244px;z-index:110;padding:27px 15px;transform:translateX(-100%);transition:transform .18s ease;box-shadow:none;overflow-y:auto;background:var(--site-surface)}.menu-open aside{transform:translateX(0);box-shadow:8px 0 32px #0000001a}aside .brand{justify-content:flex-start;gap:12px;padding:0 12px 23px}aside .brand span,aside .brand small,aside .nav-label,aside nav .separator,aside .nav-text{display:block}aside nav a{justify-content:flex-start;padding:12px 14px;gap:13px}aside footer{display:block}#mobile-shade:not([hidden]){display:block;position:fixed;inset:0;background:#101a2359;border:0;border-radius:0;z-index:105;width:100%;height:100%;padding:0;box-shadow:none}
 .shell{margin-left:0}header{height:62px;padding:0 18px;gap:16px;position:sticky;top:0;z-index:50;background:var(--site-surface)}.mobile-only{display:inline-flex}#mobile-menu{padding:0;background:transparent;border:0;box-shadow:none;width:25px;height:34px;font-size:22px;color:var(--site-muted)}.mobile-brand{font-size:28px;font-family:serif;font-weight:700;color:var(--site-accent)}header #breadcrumb,header .status{display:none}.header-right{margin-left:auto}.header-right .user{padding:7px 10px;font-size:12px}.header-right>a:first-child{display:none}
 main{padding:24px 15px 28px}h1{font-size:25px}.page-head{margin-bottom:23px;align-items:center}.page-head .subtitle{font-size:12px;line-height:1.6}.page-head>.btn{font-size:12px;min-height:34px}.picker{gap:9px}.picker #lottery,.picker #play{min-width:0;width:100%;height:43px;font-size:14px}.picker:has(#lottery){display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px 10px}.picker:has(#lottery)>label:first-child{grid-column:1;grid-row:1}.picker:has(#lottery)>#lottery{grid-column:1;grid-row:2}.picker:has(#lottery)>label:nth-of-type(2){grid-column:2;grid-row:1}.picker:has(#lottery)>#play{grid-column:2;grid-row:2}.picker:has(#lottery)>.note{display:none}.picker:has(#lottery)>.link{grid-column:1/-1;justify-self:end;font-size:13px;padding-top:3px}
 .draw-strip{margin:19px 0 15px;padding:16px 13px;border-radius:9px}.hall-draw-current{flex-wrap:nowrap;gap:10px}.hall-draw-current strong{font-size:14px}.hall-draw-current p.note{font-size:10px;max-width:145px}.draw-toggle-group{margin-left:auto;gap:3px}.balls{gap:3px}.ball{width:27px;height:29px;font-size:13px}#hall-history-toggle{width:23px;height:30px}.draw-chevron{width:8px;height:8px}.hall-draw-current>.note{display:none}
 .toolbar{margin:15px 0 12px;gap:9px}.tabs{width:100%;min-height:43px;gap:0;padding:3px}.tabs button{flex:1;min-height:35px;padding:7px 5px;font-size:12px}.search{height:43px;min-width:0;font-size:14px}.cards{grid-template-columns:1fr;gap:14px}.card{padding:17px;border-radius:9px}.person-avatar{width:43px;height:43px}.card h3{font-size:16px}.person-hit-rate{font-size:12px}.card>.picker{flex-wrap:nowrap;gap:9px}.card>.picker>button{font-size:12px;min-height:30px}.card>p.note{font-size:12px;margin:13px 0}.card>p>strong{font-size:15px}.public-number-line{gap:8px;flex-wrap:wrap}.public-numbers{gap:4px}.public-numbers span{width:26px;height:32px;font-size:15px}.excluded-badge{font-size:12px}.excluded-badge b{font-size:19px}.card .toolbar{padding-top:13px;margin-top:15px}.card .toolbar button,.card .toolbar .btn{font-size:13px;min-height:34px}.card .toolbar button:first-child{background:var(--site-accent);color:var(--site-surface);padding:7px 13px}
 #mobile-nav{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));position:fixed;bottom:0;left:0;right:0;height:calc(65px + env(safe-area-inset-bottom));padding:7px 5px calc(5px + env(safe-area-inset-bottom));z-index:90;border-top:1px solid var(--site-border);background:var(--site-surface);box-shadow:0 -2px 10px #00000004}#mobile-nav a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-size:10px;color:var(--site-muted);padding:0;margin:0;border-radius:0;background:transparent!important}#mobile-nav a:before{display:none}#mobile-nav a.selected{color:var(--site-accent);font-weight:600}.mobile-nav-icon{display:flex;align-items:center;justify-content:center;width:28px;height:27px}.mobile-nav-icon svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}#mobile-nav [data-mobile-route=publish] .mobile-nav-icon{background:var(--site-accent);color:var(--site-surface);width:31px;height:30px;border-radius:9px}.bottom-note{margin:0 15px;font-size:10px}#toast{bottom:calc(82px + env(safe-area-inset-bottom));width:max-content;max-width:90%;text-align:center}.chat-layout{gap:12px}.message-row.mine>div{max-width:85%}.shared-plan .public-numbers span{width:23px;font-size:13px}#server-send .toolbar{flex-wrap:wrap}.theme-grid{grid-template-columns:1fr}.panel{border-radius:8px}#server-task-list>.panel>.picker{flex-wrap:wrap}.metric-grid{gap:8px}.metric strong{font-size:24px}
}
@media(max-width:370px){.public-numbers span{width:23px}.hall-draw-current p.note{max-width:115px}.ball{width:24px}.card>.picker{gap:6px}.person-hit-rate{font-size:11px}}

@media(max-width:720px){
 aside nav a .nav-text{display:block!important;font-size:14px;line-height:1.5;white-space:nowrap;color:inherit}
 aside .brand>span{display:block!important;font-size:20px;line-height:1.4;white-space:nowrap}
 aside .brand small{display:block!important;font-size:11px;margin-top:5px;white-space:nowrap}
 aside{padding-top:calc(24px + env(safe-area-inset-top));padding-bottom:calc(24px + env(safe-area-inset-bottom))}
 .mobile-brand{gap:8px;align-items:center;font-family:inherit;font-size:18px;white-space:nowrap}.mobile-brand b{font-family:serif;font-size:27px}.mobile-brand span{font-weight:650}
}
.friend-item{display:flex;align-items:center;gap:12px;width:100%;text-align:left;border:0;border-radius:5px;padding:12px;margin:5px 0;background:transparent;box-shadow:none}.friend-item.selected{background:var(--site-soft);color:var(--site-accent)}.friend-item small{display:block;margin-top:3px}#direct-form textarea{width:100%;min-height:80px}#friends-root>.chat-layout{grid-template-columns:minmax(260px,1fr) minmax(0,2fr)}@media(max-width:720px){#friends-root>.chat-layout{grid-template-columns:1fr}#friend-list{display:flex;gap:8px;overflow-x:auto}.friend-item{min-width:145px;width:auto;flex-shrink:0}#add-friend{flex-wrap:wrap}#friend-username{flex:1;min-width:140px}}

.unread-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border-radius:10px;background:#e34d50;color:#fff;font-size:10px;font-weight:600;line-height:1;flex-shrink:0}.unread-badge[hidden]{display:none!important}aside .nav-unread{margin-left:auto}.friend-item .unread-badge{margin-left:7px}#mobile-nav a{position:relative}#mobile-nav .nav-unread{position:absolute;top:0;left:calc(50% + 6px);min-width:16px;height:16px;font-size:9px}

.account-avatar{width:80px;height:80px;object-fit:cover;border-radius:12px;border:1px solid var(--site-border)}#account-root form{margin:16px 0 25px}#account-root .two-col{grid-template-columns:1fr 1fr;gap:40px}#account-root input{max-width:100%}@media(max-width:720px){#account-root .two-col{grid-template-columns:1fr;gap:18px}}

.account-session-row{display:flex;align-items:center;justify-content:space-between;gap:15px;padding-bottom:18px;margin-bottom:23px;border-bottom:1px solid var(--site-border)}#account-logout{color:#b84d46;border-color:#dcbdb8;background:transparent}

.official-badge{display:inline-block;margin-left:6px;padding:1px 5px;border-radius:3px;background:#3679bf;color:#fff;font-size:10px;font-weight:500;vertical-align:middle}

#direct-back{display:none}.friend-item{padding:15px 3px;border-bottom:1px solid var(--site-border);border-radius:0;gap:13px}.friend-avatar{position:relative;width:47px;height:47px;border-radius:8px;flex-shrink:0;background:var(--site-soft);display:grid;place-items:center;font-size:21px;color:var(--site-accent)}.friend-avatar img{width:100%;height:100%;border-radius:8px;object-fit:cover}.friend-avatar .unread-badge{position:absolute;right:-6px;top:-5px;margin:0}.friend-row-content{flex:1;min-width:0}.friend-row-title{display:flex;align-items:center;gap:4px;text-align:left}.friend-row-title strong{font-size:14px}.friend-row-title time{margin-left:auto;font-size:10px;color:var(--site-muted);font-weight:400}.friend-row-content>small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;text-align:left;margin-top:6px;max-width:100%}#friend-list{min-width:0}#official-body{width:100%;min-height:85px}
@media(max-width:720px){#friend-list{display:block;overflow:visible}.friend-item{width:100%;min-width:0;margin:0;min-height:82px;padding:14px 0;background:transparent}.friend-row-title strong{font-size:16px}.friend-row-content>small{font-size:13px}.friend-row-title time{font-size:11px}.friend-avatar{width:48px;height:48px}#friends-root .direct-column{display:none}#friends-root.direct-open .direct-column{display:block}#friends-root.direct-open .friend-list-column{display:none}#friends-root.direct-open>.panel,#friends-root.direct-open>section{display:none}#friends-root.direct-open>.chat-layout{display:block}.direct-open #direct-back{display:inline-flex;margin-bottom:16px}#friends-root .server-feed{height:calc(100dvh - 390px);min-height:240px}.friend-list-column>.panel{padding-top:15px}#friends-root>.chat-layout{gap:0}.friend-item.selected{background:transparent}}
