#account-button{position:absolute;top:12px;right:14px;z-index:20;border:1px solid #b9a977;background:#11262eee;color:#fff1be;padding:10px 16px;border-radius:8px;font:600 14px system-ui;cursor:pointer}#account-button[hidden]{display:none}
#account-dialog{box-sizing:border-box;width:min(92vw,480px);max-height:88vh;overflow:auto;background:#14282e;color:#f5efd8;border:1px solid #b9a977;border-radius:16px;padding:24px;font:15px/1.55 system-ui}#account-dialog::backdrop{background:#000b}#account-dialog h2{margin:0 0 12px}#account-dialog h3{font-size:18px}#account-dialog p{color:#c3d1cf}#account-dialog label{display:block;margin:12px 0}#account-dialog input:not([type=checkbox]){box-sizing:border-box;display:block;width:100%;margin-top:5px;padding:12px;border:1px solid #879b9b;border-radius:6px;background:#091a21;color:white;font-size:18px}#account-dialog input[type=checkbox]{margin-left:12px;width:18px;height:18px}#account-dialog button{margin:5px 5px 5px 0;padding:10px 14px;border:1px solid #c8b97d;border-radius:7px;background:#294149;color:#fff3c5;font:600 15px system-ui;cursor:pointer}#account-dialog button:disabled{opacity:.5}#account-dialog code{display:block;padding:14px;background:#08191f;color:#ffe49a;word-break:break-all;user-select:all}#account-dialog ol{padding-left:24px}#account-dialog li{margin:8px 0}

#account-dialog[data-mode="home"]>button:not(:last-child){display:block;width:100%;margin:10px 0;padding:14px}#account-dialog details{margin:14px 0;color:#b7c6c5}#account-dialog summary{cursor:pointer}
#account-dialog button,#account-dialog summary{caret-color:transparent;user-select:none}#account-dialog button:focus-visible,#account-dialog summary:focus-visible{outline:2px solid #ffe49a;outline-offset:3px;box-shadow:0 0 10px #ffe49a33}

#account-sidebar{position:absolute;top:64px;bottom:0;right:14px;width:min(270px,19cqw);z-index:19;font:clamp(10px,1cqw,14px)/1.6 system-ui;color:#e7ecde;pointer-events:none}
#account-sidebar>*{pointer-events:auto}
#account-sidebar[hidden],#account-sidebar [hidden]{display:none!important}
#personal-ranking{margin:0 0 10px;padding:9px 8px;border:1px solid #bdad72;border-radius:7px;background:#152c31f2;color:#ffe7a0;text-align:center;font-weight:700;overflow-wrap:anywhere}
#personal-ranking small{display:block;margin-top:3px;font-size:.85em;font-weight:400;color:#c7d2c4}
#game-bulletin>div>p{margin:6px 0 0;word-break:keep-all}
#game-bulletin>div>p+small{display:block;margin-top:10px;padding-top:8px;border-top:1px solid #61756d55}
#game-bulletin{position:absolute;top:calc(50% - 32px);width:100%;box-sizing:border-box;transform:translateY(-50%);border:1px solid #61756d;border-radius:10px;background:#10252de8;box-shadow:0 4px 18px #0003;overflow:hidden}
#game-bulletin header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px;background:#23383c}
#game-bulletin header strong{color:#e9dcb0}#game-bulletin button{border:1px solid #8c987e;border-radius:4px;background:transparent;color:#e6e5cc;padding:3px 7px;font:inherit;cursor:pointer}
#game-bulletin button:focus-visible{outline:2px solid #ffe49a;outline-offset:2px}
#game-bulletin>div{padding:8px 10px}#game-bulletin small{color:#a7bca8}#game-bulletin ul{margin:6px 0 0;padding-left:15px}#game-bulletin li{margin:5px 0}
#game-bulletin #event-notice-button{display:block;width:100%;box-sizing:border-box;margin:0 0 10px;padding:9px 7px;background:#344039;border-color:#c8b97d;color:#fff0b7;white-space:pre-line;text-align:left;line-height:1.6;font-weight:700}
#account-dialog[data-mode="event"]{width:min(92vw,640px);padding:0;overflow:hidden}
#account-dialog[data-mode="event"]>header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px;border-bottom:1px solid #61756d;background:#23383c}
#account-dialog[data-mode="event"] h2{margin:0;font-size:clamp(18px,3vw,23px);line-height:1.45;word-break:keep-all}
#account-dialog[data-mode="event"]>header button{flex-shrink:0;margin:0;min-height:44px}
#account-dialog .event-content{box-sizing:border-box;max-height:calc(88vh - 116px);max-height:calc(88dvh - 116px);overflow:auto;overscroll-behavior:contain;touch-action:pan-y;padding:4px 22px 20px;line-height:1.75;word-break:keep-all;overflow-wrap:anywhere}
#account-dialog .event-content h3{margin:24px 0 8px;color:#ffe49a}
#account-dialog .event-content ul{padding-left:22px}#account-dialog .event-content li{margin:12px 0;color:#d4deda}
#account-dialog .event-content li strong{display:block;margin-top:5px;color:#ffe49a}
#account-dialog .event-prizes{margin:18px 0;padding:4px 14px;border:1px solid #9a8b56;border-radius:8px;background:#263938}
#account-dialog .event-prizes p{color:#fff1be;font-weight:700}
@media(orientation:portrait){
 .touch-game #account-sidebar{top:42px;bottom:auto;right:10px;width:calc(100% - 20px);font-size:11px;max-height:156px;overflow:auto;touch-action:pan-y;pointer-events:auto}
 .touch-game #game-bulletin{position:static;transform:none}
 .touch-game #personal-ranking{margin:0 0 5px;padding:4px 8px;text-align:right}
 .touch-game #game-bulletin header{padding:4px 8px}.touch-game #game-bulletin>div{padding:4px 8px}.touch-game #game-bulletin li{margin:1px 0}.touch-game #game-bulletin ul{margin:2px 0 0}
 .touch-game #game:has(#account-sidebar:not([hidden])[data-notice-open="true"]) #overlay[data-screen=title]{padding-top:215px;padding-bottom:180px;grid-template-rows:96px minmax(0,1fr) 44px;gap:6px 0}
 .touch-game #game:has(#account-sidebar:not([hidden])[data-notice-open="false"]) #overlay[data-screen=title]{padding-top:130px;padding-bottom:180px;grid-template-rows:96px minmax(0,1fr) 44px;gap:6px 0}
}
@media(orientation:portrait) and (max-height:700px){
 .touch-game #account-sidebar{font-size:10px}
 .touch-game #game:has(#account-sidebar:not([hidden])[data-notice-open="true"]) #overlay[data-screen=title]{padding-top:185px;grid-template-rows:80px minmax(0,1fr) 32px;gap:3px 0}
 .touch-game #game:has(#account-sidebar:not([hidden])) #overlay[data-screen=title] .logo{font-size:21px;margin:0 0 5px}
 .touch-game #game:has(#account-sidebar:not([hidden])) #overlay[data-screen=title] .choice{padding:3px}
 .touch-game #game:has(#account-sidebar:not([hidden])) #overlay[data-screen=title] .menu{gap:5px}
 .touch-game #game:has(#account-sidebar:not([hidden])) #overlay[data-screen=title] .menu p{margin:2px 0}
 .touch-game #game:has(#account-sidebar:not([hidden])) #overlay[data-screen=title] .menu h3{font-size:12px;line-height:1.2}
 .touch-game #game:has(#account-sidebar:not([hidden])) #overlay[data-screen=title] .menu p{font-size:9px;line-height:1.3}
 .touch-game #game:has(#account-sidebar:not([hidden])) #overlay[data-screen=title] .small{font-size:9px;margin:3px 0 0}
}

#bulletin-history{box-sizing:border-box;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;scrollbar-width:thin;scrollbar-color:#8a9985 #14282e}
#bulletin-history:focus-visible{outline:2px solid #ffe49a;outline-offset:-2px}
#bulletin-history::-webkit-scrollbar{width:6px}#bulletin-history::-webkit-scrollbar-thumb{background:#8a9985;border-radius:6px}
@media(orientation:portrait){.touch-game #account-sidebar{overflow:hidden}}
