
            *, *::before, *::after { box-sizing: border-box; }
            html, body { overflow-x: clip; -webkit-text-size-adjust: 100%; }
            :root {
                --bg-main: #36393f; --bg-card: #2f3136; --bg-header: #202225; --bg-sidebar: #2f3136;
                --bg-sidebar-user: #292b2f; --bg-input: #202225; --bg-hover: #393c43;
                --text-main: #dcddde; --text-title: #ffffff; --text-muted: #8e9297; --text-label: #b9bbbe;
                --border-main: #4f545c; --border-header: #202225; --card-border: transparent;
                --accent-yellow: #f1c40f; --accent-green: #43b581; --green-bg: rgba(67, 181, 129, 0.2);
            }
            .light-theme {
                --bg-main: #f2f3f5; --bg-card: #ffffff; --bg-header: #ffffff; --bg-sidebar: #f2f3f5;
                --bg-sidebar-user: #e3e5e8; --bg-input: #ffffff; --bg-hover: #e3e5e8;
                --text-main: #2e3338; --text-title: #060607; --text-muted: #6a7480; --text-label: #4f5660;
                --border-main: #e3e5e8; --border-header: #e3e5e8; --card-border: #e3e5e8;
                --accent-yellow: #d4a000; --accent-green: #3ca374; --green-bg: rgba(67, 181, 129, 0.1);
            }
            body { font-family: 'Helvetica Neue', Arial, -apple-system, BlinkMacSystemFont, sans-serif; margin: 0; padding: 0; background-color: var(--bg-main); color: var(--text-main); transition: 0.3s; display: flex; flex-direction: column; min-height: 100vh; }
            .site-footer { margin-top: auto; padding: 18px 15px calc(18px + env(safe-area-inset-bottom, 0px)); text-align: center; font-size: 12px; line-height: 1.7; color: var(--text-muted); border-top: 1px solid var(--border-main); background-color: var(--bg-header); }
            body.app-shell .site-footer, body.pwa-standalone .site-footer { display: none !important; }
            @media (display-mode: standalone) { .site-footer { display: none !important; } }
            .markdown-link { color: #70b7ff; text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
            .markdown-link:hover { color: #a8d4ff; }
            .light-theme .markdown-link { color: #0969da; }
            .light-theme .markdown-link:hover { color: #0550ae; }
            .header { background-color: var(--bg-header); color: var(--text-title); padding: calc(10px + env(safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-right, 0px)) 10px max(12px, env(safe-area-inset-left, 0px)); min-height: 54px; display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 115; border-bottom: 1px solid var(--border-header); transition: 0.3s; }
            .menu-btn { font-size: 22px; cursor: pointer; background: none; border: none; color: var(--text-main); width: 40px; height: 40px; margin: 0; padding: 0; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; border-radius: 6px; }
            .menu-btn:hover { background-color: var(--bg-hover); }
            .header h1 { margin: 0; font-size: 17px; font-weight: bold; color: var(--text-title); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
            .header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; position: relative; }
            .notif-btn { background: none; border: 1px solid var(--border-main); font-size: 13px; font-weight: bold; cursor: pointer; color: var(--text-main); position: relative; padding: 6px 10px; border-radius: 4px; white-space: nowrap; }
            .notif-dropdown { display: none; position: absolute; right: 0; top: 44px; background: var(--bg-card); border: 1px solid var(--border-main); border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.3); width: min(300px, calc(100vw - 24px)); max-height: 70vh; overflow-y: auto; padding: 15px; z-index: 1000; text-align: left; scrollbar-width: none; -ms-overflow-style: none; }
            .notif-dropdown::-webkit-scrollbar { display: none; width: 0; height: 0; }
            .theme-toggle { background: var(--bg-input); border: 1px solid var(--border-main); color: var(--text-main); font-size: 12px; font-weight: bold; padding: 6px 10px; border-radius: 4px; cursor: pointer; transition: 0.2s; white-space: nowrap; }
            .theme-toggle:hover { background: var(--bg-hover); }
            .header-login-btn { padding: 6px 12px; font-size: 12px; white-space: nowrap; }
            .sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 112; }
            .sidebar { height: 100%; width: 260px; max-width: 82vw; position: fixed; top: 0; left: -270px; background-color: var(--bg-sidebar); padding-top: calc(60px + env(safe-area-inset-top, 0px)); padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transition: left 0.25s ease; z-index: 113; box-shadow: 2px 0 8px rgba(0,0,0,0.2); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; -ms-overflow-style: none; }
            .sidebar::-webkit-scrollbar { display: none; width: 0; height: 0; }
            .sidebar .user-info { background-color: var(--bg-sidebar-user); padding: 12px 15px; font-size: 14px; border-bottom: 1px solid var(--border-header); margin-bottom: 4px; }
            .sidebar .category { color: var(--text-muted); padding: 12px 15px 4px 15px; font-size: 12px; font-weight: bold; user-select: none; }
            .sidebar .channel { padding: 8px 15px; text-decoration: none; font-size: 15px; color: var(--text-muted); display: block; transition: 0.1s; border-radius: 4px; margin: 2px 8px; }
            .sidebar .channel:hover { background-color: var(--bg-hover); color: var(--text-title); }
            .content { padding: 20px; max-width: 840px; width: 100%; margin: 0 auto; flex: 1 0 auto; }
            .card { background: var(--bg-card); padding: 20px; border-radius: 8px; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); border: 1px solid var(--card-border); transition: 0.3s; overflow-wrap: anywhere; word-break: break-word; }
            .card img { max-width: 100%; height: auto; }
            .card pre { overflow-x: auto; max-width: 100%; }
            h2, h3, h4 { color: var(--text-title); margin-top: 0; overflow-wrap: anywhere; }
            h2 { border-bottom: 1px solid var(--border-main); padding-bottom: 10px; }
            p { color: var(--text-label); line-height: 1.6; }
            .btn-primary { background-color: #5865F2; color: white; padding: 10px 20px; text-decoration: none; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; text-align: center; font-weight: bold; font-family: inherit; font-size: 14px; line-height: 1.3; border: none; cursor: pointer; transition: 0.2s; vertical-align: middle; appearance: none; max-width: 100%; }
            .btn-primary:hover { background-color: #4752C4; }
            .input-field { width: 100%; padding: 10px 12px; margin-bottom: 15px; background: var(--bg-input); color: var(--text-title); border: 1px solid var(--border-main); border-radius: 4px; font-size: 14px; transition: 0.3s; max-width: 100%; }
            .mkb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 15px; }
            .mkb-card { background-color: var(--bg-card); border: 1px solid var(--border-main); border-radius: 8px; padding: 15px; display: flex; flex-direction: column; box-shadow: 0 2px 6px rgba(0,0,0,0.05); transition: 0.3s; min-width: 0; }
            .mkb-title { font-size: 18px; font-weight: bold; color: var(--text-title); margin-bottom: 10px; border-bottom: 1px solid var(--border-main); padding-bottom: 5px; overflow-wrap: anywhere; }
            .mkb-details { font-size: 13px; color: var(--text-label); line-height: 1.8; flex-grow: 1; overflow-wrap: anywhere; }
            .participant-list { list-style-type: none; padding: 0; margin: 0; }
            .participant-list li { border-bottom: 1px solid var(--border-main); display: flex; justify-content: space-between; align-items: flex-start; flex-direction: column; color: var(--text-main); }
            .participant-list li:last-child { border-bottom: none; }
            .participant-member-row { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 6px 8px; margin: 0 0 8px 6px; max-width: 100%; }
            .participant-member-row .participant-meta { min-width: 0; flex: 1 1 180px; overflow-wrap: anywhere; }
            .participant-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
            .table-scroll-hint { display: none; font-size: 11px; color: var(--text-muted); margin-bottom: 6px; }
            .participant-table { width: 100%; min-width: 480px; border-collapse: collapse; color: var(--text-main); font-size: 13px; }
            .participant-table th, .participant-table td { border: 1px solid var(--border-main); padding: 8px 6px; text-align: left; vertical-align: middle; }
            .participant-table th { background: var(--bg-hover); text-align: center; font-weight: bold; white-space: nowrap; }
            .participant-table .registration-no, .participant-table .team-tag { text-align: center; white-space: nowrap; }
            .participant-table td:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
            .inline-submit-row { display: flex; gap: 10px; align-items: stretch; }
            .inline-submit-row .input-field { flex: 1; min-width: 0; margin-bottom: 0; }
            .inline-submit-row .btn-primary { flex-shrink: 0; white-space: nowrap; }
            .date-range-row { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
            .date-range-row .input-field { flex: 1; min-width: 0; margin-bottom: 0; }
            .date-range-sep { color: var(--text-main); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
            .grid-2col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-bottom: 10px; }
            .card-row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
            .btn-action-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
            .invite-actions-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
            .home-card-title { padding: 24px; margin: 0; }
            .modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); z-index: 9999; align-items: center; justify-content: center; backdrop-filter: blur(2px); padding: 16px; }
            .modal-box { background: var(--bg-card); padding: 22px; border-radius: 10px; width: 100%; max-width: 400px; box-shadow: 0 4px 20px rgba(0,0,0,0.4); border: 1px solid var(--border-main); text-align: center; transform: scale(0.95); animation: modalFadeIn 0.2s forwards; }
            @keyframes modalFadeIn { to { transform: scale(1); } }
            .modal-title { margin-top: 0; margin-bottom: 12px; font-size: 18px; font-weight: bold; color: var(--text-title); }
            .modal-desc { color: var(--text-label); margin-bottom: 22px; font-size: 14px; line-height: 1.5; white-space: pre-line; }
            .modal-actions { display: flex; gap: 12px; justify-content: center; }
            .dl-info { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 8px 10px; font-size: 15px; margin-bottom: 25px; align-items: baseline; }
            .dl-info dt { color: var(--text-muted); text-align-last: justify; margin: 0; font-weight: normal; }
            .dl-info dd { margin: 0; color: var(--text-main); overflow-wrap: anywhere; }
            .flatpickr-current-month { display: flex !important; flex-direction: row-reverse !important; justify-content: center !important; align-items: center !important; }
            .flatpickr-current-month .numInputWrapper { width: 65px !important; margin-right: 5px !important; }
            .flatpickr-current-month .flatpickr-monthDropdown-months { width: auto !important; }
            .flatpickr-calendar { border-radius: 12px !important; border: 1px solid var(--border-main) !important; box-shadow: 0 8px 24px rgba(0,0,0,0.2) !important; max-width: calc(100vw - 20px); }
            .flatpickr-day { border-radius: 8px !important; }
            .flatpickr-time input { border-radius: 6px !important; }
            .mobile-bottom-nav { display: none; }
            @media (max-width: 700px) {
                body:not(.app-shell) { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
                body:not(.app-shell) .mobile-bottom-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; background-color: var(--bg-header); border-top: 1px solid var(--border-main); z-index: 108; padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)); justify-content: space-around; align-items: stretch; }
                .site-footer { padding: 12px; font-size: 11px; line-height: 1.5; }
                .mobile-nav-item { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--text-muted); font-size: 10px; line-height: 1.2; padding: 4px 2px; border-radius: 6px; }
                .mobile-nav-item.active { color: #70b7ff; font-weight: bold; }
                .light-theme .mobile-nav-item.active { color: #5865F2; }
                .content { padding: 12px 10px; }
                .card { padding: 14px; border-radius: 10px; margin-bottom: 14px; }
                .input-field { font-size: 16px; min-height: 44px; }
                .btn-primary { min-height: 42px; padding: 10px 14px; }
                .header h1 { font-size: 15px; }
                .dl-info { grid-template-columns: 92px minmax(0, 1fr); gap: 8px 8px; font-size: 14px; }
                .grid-2col { grid-template-columns: 1fr; }
                .date-range-row { flex-direction: column; align-items: stretch; gap: 6px; }
                .date-range-sep { font-size: 12px; color: var(--text-muted); }
                .table-scroll-hint { display: block; }
                .home-card-title { padding: 16px 14px !important; font-size: 19px; }
                .home-tournament-header { display: none !important; }
                .home-tournament-row { grid-template-columns: 1fr !important; gap: 8px !important; padding: 14px !important; }
                .home-tournament-row .btn-primary { width: 100% !important; }
            }
            @media (max-width: 480px) {
                .hide-xs { display: none; }
                .inline-submit-row { flex-direction: column; }
                .inline-submit-row .btn-primary { width: 100%; }
                .btn-action-row > .btn-primary, .btn-action-row > form { flex: 1 1 auto; }
                .btn-action-row > form > button { width: 100%; }
            }
