/* FunHockey - Clean instructional hockey site style */

/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
    color: #333;
    background: #f4f4f4;
    line-height: 1.6;
}

/* Docs-style design tokens (manual hub + docs reader) */
:root {
    --docs-bg-page: #f5f7fa;
    --docs-bg-surface: #ffffff;
    --docs-bg-muted: #fbfcfe;
    --docs-border: #e1e6ed;
    --docs-border-strong: #cdd6e1;
    --docs-text: #1b2b44;
    --docs-text-muted: #5f6f86;
    --docs-accent: #0b5bd3;
    --docs-accent-soft: #eef4ff;
    --docs-radius-lg: 12px;
    --docs-shadow-card: 0 1px 2px rgba(15, 39, 67, 0.06), 0 4px 16px rgba(15, 39, 67, 0.06);
    --docs-shadow-card-hover: 0 4px 24px rgba(15, 39, 67, 0.1);
}
a { color: #1a5276; text-decoration: none; }
a:hover { color: #2980b9; text-decoration: underline; }

/* Top Nav Bar */
.top-nav {
    background: #1a5276;
    padding: 0 20px;
    display: flex;
    align-items: stretch;
    min-height: 50px;
    flex-wrap: nowrap;
}
.top-nav .logo {
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    margin-right: 24px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.top-nav .logo a { color: #fff; }
.top-nav .logo a:hover { text-decoration: none; }
.top-nav nav {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    flex: 1 1 auto;
    min-width: 0;
    overflow: visible;
}
.top-nav nav a {
    color: #d5e8f3;
    padding: 15px 12px;
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}
.top-nav nav a:hover {
    background: #154360;
    color: #fff;
    text-decoration: none;
}
.top-nav nav a.active {
    background: #0e2f44;
    color: #fff;
}

/* Section dropdowns in top nav — match primary nav link styling */
.top-nav nav .nav-dropdown,
.top-nav nav .tools-dropdown {
    position: relative;
    display: flex;
    align-items: stretch;
    flex-shrink: 0;
    padding: 0;
    margin: 0;
}
.top-nav nav .nav-dropdown > .lang-dropdown-toggle,
.top-nav nav .tools-dropdown > .lang-dropdown-toggle {
    appearance: none;
    background: transparent;
    border: none;
    border-radius: 0;
    margin: 0;
    color: #d5e8f3;
    padding: 15px 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.6;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.top-nav nav .nav-dropdown > .lang-dropdown-toggle:hover,
.top-nav nav .tools-dropdown > .lang-dropdown-toggle:hover {
    background: #154360;
    color: #fff;
}
.top-nav nav .nav-dropdown.active > .lang-dropdown-toggle,
.top-nav nav .tools-dropdown.active > .lang-dropdown-toggle {
    background: #0e2f44;
    color: #fff;
}
.top-nav nav .nav-dropdown.open > .lang-dropdown-toggle,
.top-nav nav .tools-dropdown.open > .lang-dropdown-toggle {
    background: #154360;
    color: #fff;
}
.top-nav nav .nav-dropdown.active.open > .lang-dropdown-toggle,
.top-nav nav .tools-dropdown.active.open > .lang-dropdown-toggle {
    background: #0e2f44;
    color: #fff;
}
.top-nav nav .nav-dropdown .lang-dropdown-menu,
.top-nav nav .tools-dropdown .lang-dropdown-menu {
    top: 100%;
    left: 0;
    right: auto;
    min-width: 180px;
    z-index: 1100;
}
.top-nav nav .nav-dropdown .lang-dropdown-menu a,
.top-nav nav .tools-dropdown .lang-dropdown-menu a {
    text-transform: none;
    letter-spacing: normal;
    display: block;
    padding: 10px 15px;
    font-size: 14px;
    color: #1b2b44;
    background: transparent;
}
.top-nav nav .nav-dropdown .lang-dropdown-menu a:hover,
.top-nav nav .tools-dropdown .lang-dropdown-menu a:hover {
    background: #f5f5f5;
    color: #1a5276;
    text-decoration: none;
}
.top-nav nav .nav-dropdown .lang-dropdown-menu a.active,
.top-nav nav .tools-dropdown .lang-dropdown-menu a.active {
    background: #1a5276;
    color: #fff;
}

.top-nav .nav-divider {
    display: inline-flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.35);
    padding: 0 4px;
    flex-shrink: 0;
}

.lang-switcher {
    margin-left: auto;
    padding: 0 15px;
}
.lang-switcher a {
    color: #d5e8f3;
    font-size: 13px;
    padding: 5px 8px;
}
.lang-switcher a:hover, .lang-switcher a.active {
    color: #fff;
    font-weight: bold;
    text-decoration: none;
}

/* Language Dropdown (header account area only) */
.top-nav > .lang-dropdown {
    position: relative;
    padding: 0 10px;
    margin-left: 0;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.lang-dropdown {
    position: relative;
}
.lang-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    color: #d5e8f3;
    font-size: 13px;
    transition: background 0.2s;
}
.lang-dropdown-toggle:hover {
    background: rgba(255,255,255,0.15);
}
.lang-dropdown-toggle .dropdown-arrow {
    font-size: 10px;
    transition: transform 0.2s;
}
.lang-dropdown.open .dropdown-arrow,
.nav-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}
.lang-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    min-width: 150px;
    z-index: 1000;
    overflow: hidden;
}
.lang-dropdown.open .lang-dropdown-menu,
.nav-dropdown.open .lang-dropdown-menu {
    display: block;
}
.lang-dropdown-menu a {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}
.lang-dropdown-menu a:hover {
    background: #f5f5f5;
    color: #1a5276;
    text-decoration: none;
}
.lang-dropdown-menu a.active {
    background: #1a5276;
    color: #fff;
}
.user-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    flex-shrink: 0;
    padding: 8px 0;
}

/* User Dropdown */
.user-dropdown {
    position: relative;
}
.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    color: #d5e8f3;
    font-size: 13px;
    transition: background 0.2s;
}
.user-dropdown-toggle:hover {
    background: rgba(255,255,255,0.15);
}
.user-avatar {
    width: 28px;
    height: 28px;
    background: #1a5276;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 13px;
}
.user-name {
    font-weight: 500;
}
.dropdown-arrow {
    font-size: 10px;
    transition: transform 0.2s;
}
.user-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}
.user-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    min-width: 200px;
    z-index: 1000;
    overflow: hidden;
}
.user-dropdown.open .user-dropdown-menu {
    display: block;
}
.user-dropdown-menu a {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}
.user-dropdown-menu a:hover {
    background: #f5f5f5;
    color: #1a5276;
    text-decoration: none;
}
.dropdown-divider {
    border-top: 1px solid #eee;
}
.dropdown-logout {
    color: #e74c3c !important;
}
.dropdown-logout:hover {
    background: #fdf2f2 !important;
    color: #c0392b !important;
}
.lang-switcher {
    margin-left: auto;
    padding: 0 15px;
}
.user-role-badge {
    color: #d5e8f3;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.user-role-badge .badge {
    font-size: 11px;
    padding: 2px 6px;
}
.user-nav a {
    color: #d5e8f3;
    font-size: 13px;
    padding: 5px 10px;
    white-space: nowrap;
}
.user-nav a:hover {
    color: #fff;
    text-decoration: none;
}
.btn-new-article {
    background: #27ae60;
    color: #fff !important;
    border-radius: 3px;
    font-weight: bold;
    padding: 6px 12px !important;
}
.btn-new-article:hover {
    background: #219a52;
}
.btn-logout {
    border-left: 1px solid rgba(255,255,255,0.2);
    padding-left: 15px !important;
}
.admin-nav-link {
    color: #ffd700 !important;
    font-weight: bold;
}
.admin-nav-link:hover {
    color: #fff !important;
}

/* Admin statistics console */
.admin-stats-filters {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
    font-size: 14px;
}
.admin-stats-filters a {
    padding: 4px 10px;
    border-radius: 4px;
    background: #e8eef3;
    color: #1a5276;
    text-decoration: none;
}
.admin-stats-filters a.active,
.admin-stats-filters a:hover {
    background: #1a5276;
    color: #fff;
}
.admin-stats-section {
    margin: 28px 0;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.admin-stats-section h3 {
    margin-bottom: 8px;
    color: #1a5276;
}
.admin-stats-section h4 {
    margin: 16px 0 8px;
    font-size: 15px;
}
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
    margin-top: 14px;
}
.admin-stats-grid--compact {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.admin-stat-card {
    background: #f5f9fc;
    border: 1px solid #d5e3ef;
    border-radius: 8px;
    padding: 14px;
    text-align: center;
}
.admin-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: #154360;
}
.admin-stat-label {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}
.admin-stats-table {
    width: 100%;
    margin-top: 12px;
    border-collapse: collapse;
    font-size: 14px;
}
.admin-stats-table th,
.admin-stats-table td {
    border: 1px solid #ddd;
    padding: 8px 10px;
    text-align: left;
}
.admin-stats-table th {
    background: #eef4f8;
}

.nav-divider {
    color: rgba(255,255,255,0.3);
    padding: 0 5px;
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 10px 20px;
    background: #e8e8e8;
    font-size: 13px;
    color: #666;
}
.breadcrumbs a { color: #1a5276; font-size: 13px; }
.breadcrumbs span { margin: 0 5px; color: #999; }

/* Flash Messages */
.flash {
    background: #fff3cd;
    border: 1px solid #ffc107;
    padding: 12px 15px;
    margin: 15px 20px;
    border-radius: 4px;
}
.flash p { margin: 0; color: #856404; }

/* Main Layout with Sidebar */
.layout {
    display: flex;
    max-width: 1200px;
    margin: 20px auto;
    gap: 25px;
    padding: 0 15px;
}
.main-content {
    flex: 1;
    min-width: 0;
    background: #fff;
    padding: 25px 30px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.sidebar {
    width: 280px;
    flex-shrink: 0;
}

/* Sidebar Widgets */
.sidebar-widget {
    background: #fff;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.sidebar-widget h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #1a5276;
    border-bottom: 2px solid #1a5276;
    padding-bottom: 8px;
    margin-bottom: 12px;
}
.sidebar-widget ul { list-style: none; padding: 0; }
.sidebar-widget li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}
.sidebar-widget li:last-child { border-bottom: none; }
.sidebar-widget a {
    color: #333;
    display: block;
    font-size: 14px;
}
.sidebar-widget a:hover {
    color: #1a5276;
    text-decoration: none;
    padding-left: 5px;
}

/* Search Box */
.search-box {
    display: flex;
    gap: 5px;
}
.search-box input[type="text"] {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
}
.search-box button {
    padding: 8px 15px;
    background: #1a5276;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
}
.search-box button:hover { background: #154360; }

/* Article / Content Styling */
.article-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}
.article-header h2 {
    font-size: 26px;
    color: #1a5276;
    margin-bottom: 8px;
    text-transform: uppercase;
}
.article-meta {
    font-size: 13px;
    color: #888;
}
.article-content {
    font-size: 15px;
    line-height: 1.8;
}
.article-content p { margin-bottom: 15px; }
.article-content h3 {
    font-size: 18px;
    color: #333;
    margin: 25px 0 12px;
}
.article-content ol, .article-content ul {
    margin: 15px 0;
    padding-left: 25px;
}
.article-content li { margin-bottom: 8px; }
.article-content ol li {
    padding: 5px 0;
}

/* GFM markdown tables (manual pages, articles, activities) */
.article-content table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin: 1.25rem 0;
    font-size: 14px;
    line-height: 1.45;
}
.article-content th,
.article-content td {
    border: 1px solid #cfd8dc;
    padding: 10px 12px;
    vertical-align: top;
    word-wrap: break-word;
}
.article-content thead th {
    background: #eef5f8;
    color: #1a5276;
    font-weight: 600;
}
.article-content tbody tr:nth-child(even) {
    background: #fafcfd;
}
.docs-content.article-content {
    overflow-x: auto;
}

/* Video Embed */
.video-embed {
    margin: 25px 0;
    text-align: center;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
}
.video-embed iframe {
    max-width: 100%;
    border-radius: 4px;
}

/* Inline embeds (Bilibili / YouTube / Vimeo iframe pasted in article body) */
.article-content .article-embed-wrap {
    width: 100%;
    max-width: 720px;
    margin: 1.25rem auto;
    aspect-ratio: 16 / 9;
    background: #0f1724;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(15, 39, 67, 0.12);
}
.article-content .article-embed-wrap iframe.article-embed-iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Category Listing */
.category-list {
    list-style: none;
    padding: 0;
}
.category-list li {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}
.category-list li:last-child { border-bottom: none; }
.category-list h3 {
    font-size: 18px;
    margin-bottom: 5px;
}
.category-list h3 a {
    color: #1a5276;
}
.category-list p {
    font-size: 14px;
    color: #666;
}

/* Forms */
form label {
    display: block;
    margin: 10px 0 5px;
    font-weight: bold;
    font-size: 14px;
}
form input[type="text"],
form input[type="password"],
form input[type="email"] {
    width: 100%;
    max-width: 350px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
}
form button {
    margin-top: 15px;
    padding: 10px 25px;
    background: #1a5276;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
}
form button:hover { background: #154360; }

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    background: #fff;
}
th, td {
    padding: 10px 12px;
    border: 1px solid #ddd;
    text-align: left;
    font-size: 14px;
}
th {
    background: #1a5276;
    color: #fff;
    font-weight: bold;
}
tr:nth-child(even) { background: #f9f9f9; }
tr:hover { background: #e8f4f8; }

/* Footer */
.site-footer {
    background: #1a5276;
    color: #d5e8f3;
    padding: 25px 20px;
    text-align: center;
    margin-top: 40px;
    font-size: 13px;
}
.site-footer a { color: #fff; }
.site-footer .footer-icp {
    margin-top: 10px;
    font-size: 12px;
    opacity: 0.95;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 12px;
}
.site-footer .footer-icp-sep {
    opacity: 0.7;
}
.site-footer .footer-psb-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.site-footer .footer-psb-icon {
    display: inline-block;
    vertical-align: middle;
}

/* Utility */
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    color: #fff;
}
.badge-user { background: #95a5a6; }
.badge-player { background: #3498db; }
.badge-coach { background: #27ae60; }
.badge-organizer { background: #8e44ad; }
.badge-admin { background: #e74c3c; }
.badge-publisher { background: #27ae60; }
.badge-developer { background: #8e44ad; }

/* Responsive */
@media (max-width: 768px) {
    .layout { flex-direction: column; }
    .sidebar { width: 100%; }
    .top-nav {
        flex-wrap: wrap;
        padding: 8px 12px;
    }
    .top-nav .logo { margin: 0 0 6px; width: 100%; }
    .top-nav nav {
        order: 2;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .top-nav .user-nav {
        order: 3;
        margin-left: 0;
        width: 100%;
        justify-content: flex-end;
    }
    .top-nav > .lang-dropdown {
        order: 4;
        margin-left: auto;
    }
}

/* Form Styles for Article Editor */
.form-group {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}
.form-group:last-of-type { border-bottom: none; }
.form-group h3 {
    font-size: 16px;
    color: #1a5276;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.form-group label {
    display: block;
    margin: 10px 0 8px;
    font-weight: bold;
    font-size: 14px;
}
.form-input {
    width: 100%;
    max-width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
    box-sizing: border-box;
}
.form-input[type="text"], .form-input[type="password"], .form-input[type="email"] {
    max-width: 100%;
}
select.form-input {
    max-width: 400px;
}
.btn-submit {
    margin-top: 20px;
    padding: 12px 30px;
    background: #1a5276;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}
.btn-submit:hover { background: #154360; }

/* Manual page — Training Lab markdown insert toolbar */
.manual-tl-toolbar {
    background: #f4f8fb;
    border: 1px solid #d4e4f0;
    border-radius: 4px;
    padding: 14px 16px;
    margin-bottom: 16px;
}
.manual-tl-toolbar .tl-hint {
    font-size: 13px;
    color: #555;
    margin: 0 0 12px;
    line-height: 1.45;
    font-weight: normal;
}
.manual-tl-toolbar .tl-target {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    margin-bottom: 12px;
    font-size: 14px;
}
.manual-tl-toolbar .tl-target label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    font-weight: normal;
    cursor: pointer;
}
.manual-tl-toolbar .tl-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
}
.manual-tl-toolbar .tl-checks label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-weight: normal;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}
.manual-tl-toolbar .tl-drill-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #c5d8e8;
    font-size: 13px;
}
.manual-tl-toolbar .tl-drill-row input.form-input {
    max-width: 180px;
    padding: 6px 8px;
    font-size: 13px;
}

/* Training Lab — start program page */
.tl-track-new-intro {
    max-width: 640px;
    margin: 0 0 24px;
    line-height: 1.65;
    color: #444;
    font-size: 15px;
}
.tl-track-new-intro p {
    margin: 0;
}
.form-card label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 14px;
}
.form-card select.form-input {
    max-width: 100%;
}

/* EasyMDE overrides */
.EasyMDEContainer {
    border: 1px solid #ccc;
    border-radius: 3px;
}
.EasyMDEContainer .CodeMirror {
    min-height: 300px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 14px;
}
.EasyMDEContainer .editor-toolbar {
    border: none;
    border-bottom: 1px solid #eee;
    background: #f9f9f9;
}
.EasyMDEContainer .editor-toolbar button {
    color: #333 !important;
}
.EasyMDEContainer .editor-toolbar button:hover {
    background: #e8e8e8;
    border: none;
}
.EasyMDEContainer .editor-preview,
.EasyMDEContainer .editor-preview-side {
    padding: 15px;
    font-size: 15px;
    line-height: 1.8;
}

/* Image grid */
.existing-images { margin-bottom: 15px; }
.existing-images p { font-size: 14px; color: #666; margin-bottom: 10px; }
.image-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.image-item {
    position: relative;
    display: inline-block;
}
.image-item input[type="checkbox"] {
    position: absolute;
    top: 5px;
    left: 5px;
    z-index: 1;
}
.image-item img {
    max-width: 150px;
    max-height: 100px;
    border-radius: 3px;
    border: 1px solid #ddd;
}

/* Manuals Grid (legacy + hub) */
.manuals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.manual-card {
    display: block;
    background: var(--docs-bg-surface);
    border: 1px solid var(--docs-border);
    border-radius: var(--docs-radius-lg);
    padding: 22px 22px 18px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--docs-shadow-card);
}
.manual-card:hover {
    box-shadow: var(--docs-shadow-card-hover);
    border-color: #b9d2ff;
    text-decoration: none;
    transform: translateY(-2px);
}
.manual-card-body h3 {
    font-size: 18px;
    color: var(--docs-text);
    margin-bottom: 8px;
    font-weight: 650;
    letter-spacing: -0.02em;
}
.manual-card-body p {
    font-size: 14px;
    color: var(--docs-text-muted);
    margin-bottom: 12px;
    line-height: 1.55;
}
.manual-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #8b97a8;
}

/* Per-category manuals hub, manuals landing, article category (shared docs surface) */
body.manual-hub-page,
body.manuals-landing-page,
body.docs-category-page {
    background: var(--docs-bg-page);
}

body.manual-hub-page .layout,
body.manuals-landing-page .layout,
body.docs-category-page .layout {
    max-width: 1220px;
}

body.manual-hub-page .sidebar,
body.manuals-landing-page .sidebar,
body.docs-category-page .sidebar {
    display: none;
}

body.manual-hub-page .main-content,
body.manuals-landing-page .main-content,
body.docs-category-page .main-content {
    width: 100%;
    max-width: 100%;
}

.manual-hub {
    padding-bottom: 48px;
}

.manual-hub-hero {
    margin-bottom: 28px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--docs-border);
}

.manual-hub-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #607089;
    margin: 0 0 10px;
}

.manual-hub-title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    color: var(--docs-text);
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin: 0 0 12px;
}

.manual-hub-description {
    font-size: 17px;
    line-height: 1.55;
    color: var(--docs-text-muted);
    max-width: 720px;
    margin: 0 0 10px;
}

.manual-hub-note {
    font-size: 14px;
    color: #7d8a9c;
    margin: 0;
    max-width: 720px;
}

.manual-hub-toolbar {
    margin-bottom: 24px;
}

.manual-hub-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.manual-hub-btn-primary {
    background: #1a5276;
    color: #fff;
}

.manual-hub-btn-primary:hover {
    background: #154360;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(26, 82, 118, 0.35);
}

.manual-hub-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 24px;
    margin-top: 8px;
}

.manual-hub-card .manual-card-body {
    display: flex;
    flex-direction: column;
    min-height: 160px;
}

.manual-hub-badge {
    display: inline-block;
    align-self: flex-start;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.manual-hub-badge--warn {
    background: #fff8e6;
    color: #b54708;
    border: 1px solid #f5d896;
}

.manual-hub-badge--danger {
    background: #fdecea;
    color: #c0392b;
    border: 1px solid #f5c2bc;
}

.manual-hub-card-excerpt {
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.manual-hub-card-meta {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--docs-border);
}

.manual-hub-card-cta {
    display: block;
    margin-top: 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--docs-accent);
}

.manual-hub-card:hover .manual-hub-card-cta {
    text-decoration: underline;
}

.manual-hub-empty {
    text-align: center;
    padding: 56px 24px;
    background: var(--docs-bg-muted);
    border: 1px dashed var(--docs-border-strong);
    border-radius: var(--docs-radius-lg);
    color: var(--docs-text-muted);
}

.manual-hub-empty p {
    font-size: 16px;
    margin-bottom: 20px;
}

@media (max-width: 640px) {
    .manual-hub-hero {
        margin-bottom: 20px;
    }
    .manual-hub-grid {
        grid-template-columns: 1fr;
    }
}

/* Manual Actions Bar */
.manual-actions {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}
.btn-edit, .btn-add-page, .btn-next-page, .btn-prev-page {
    display: inline-block;
    padding: 8px 15px;
    border-radius: 3px;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
}
.btn-edit { background: #27ae60; color: #fff; }
.btn-edit:hover { background: #219a52; text-decoration: none; }
.btn-add-page { background: #3498db; color: #fff; }
.btn-add-page:hover { background: #2980b9; text-decoration: none; }
.btn-next-page { background: #1a5276; color: #fff; margin-top:20px; }
.btn-next-page:hover { background: #154360; text-decoration: none; }
.btn-prev-page { background: #95a5a6; color: #fff; margin-top:20px; }
.btn-prev-page:hover { background: #7f8c8d; text-decoration: none; }
.btn-delete {
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
}
.btn-delete:hover { background: #c0392b; }

.page-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* Activities */
.activities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    margin-top: 15px;
}
.activity-card-new {
    display: block;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s;
}
.activity-card-new:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-decoration: none;
}
.activity-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px 15px 0;
    position: relative;
}
.activity-date-badge {
    background: #1a5276;
    color: #fff;
    border-radius: 6px;
    padding: 8px 10px;
    text-align: center;
    min-width: 55px;
    flex-shrink: 0;
}
.act-month { font-size: 11px; text-transform: uppercase; display: block; }
.act-day { font-size: 22px; font-weight: bold; display: block; line-height: 1; }
.activity-header-info h4 {
    font-size: 16px;
    color: #1a5276;
    margin: 0 0 4px;
}
.act-location { font-size: 12px; color: #666; }
.act-status {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 3px;
    font-weight: bold;
}
.act-upcoming { background: #27ae60; color: #fff; }
.act-finished { background: #95a5a6; color: #fff; }
.act-cancelled { background: #e74c3c; color: #fff; }
.activity-card-body { padding: 12px 15px 15px; }
.act-desc { font-size: 13px; color: #666; margin: 0 0 8px; line-height: 1.5; }
.act-meta { display: flex; gap: 15px; font-size: 12px; color: #999; flex-wrap: wrap; }

/* Activity Detail */
.activity-detail-layout {
    display: flex;
    gap: 25px;
}
.activity-detail-main { flex: 1; min-width: 0; }
.activity-detail-sidebar {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.activity-info-card {
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 15px;
}
.activity-info-card h3 {
    font-size: 14px;
    color: #1a5276;
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 6px;
}
.activity-info-card p {
    font-size: 14px;
    color: #333;
    margin: 5px 0;
}
.act-status-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.btn-map {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 12px;
    background: #3498db;
    color: #fff;
    border-radius: 3px;
    font-size: 13px;
    text-decoration: none;
}
.btn-map:hover { background: #2980b9; text-decoration: none; }
.btn-join {
    display: block;
    width: 100%;
    padding: 12px;
    background: #27ae60;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
}
.btn-join:hover { background: #219a52; }
.btn-leave {
    display: block;
    width: 100%;
    padding: 12px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}
.btn-leave:hover { background: #c0392b; }
.activity-admin-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

/* Roster */
.roster-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}
.roster-section h3 {
    font-size: 16px;
    color: #1a5276;
    margin-bottom: 12px;
}
.roster-table {
    width: 100%;
    border-collapse: collapse;
}
.roster-table th, .roster-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    text-align: left;
    font-size: 14px;
}
.roster-table th {
    background: #f5f5f5;
    font-weight: bold;
    color: #333;
}

@media (max-width: 768px) {
    .activity-detail-layout { flex-direction: column; }
    .activity-detail-sidebar { width: 100%; }
}

/* Registration / Profile Forms */
.register-form { max-width: 600px; }
.form-section {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px 20px;
    margin-bottom: 20px;
    background: #fafafa;
}
.form-section legend {
    font-size: 15px;
    font-weight: bold;
    color: #1a5276;
    padding: 0 8px;
}
.form-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}
.form-row label {
    flex: 1;
    min-width: 200px;
    display: block;
    margin: 8px 0;
    font-weight: normal;
}
.form-row .form-input {
    width: 100%;
    display: block;
    margin-top: 4px;
}
.form-row small {
    font-size: 12px;
    color: #999;
    display: block;
    margin-top: 3px;
}
.checkbox-label {
    display: flex !important;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
    margin-top: 3px;
}

.editor-storage {
    display: none;
}

.markdown-editor-shell {
    margin-top: 8px;
}

.markdown-editor-shell .toastui-editor-defaultUI {
    border: 1px solid #d8e1ee;
    border-radius: 8px;
    overflow: hidden;
}

.markdown-editor-shell .toastui-editor-toolbar {
    border-bottom: 1px solid #e5ebf3;
    background: #f7f9fc;
}

.markdown-editor-shell .toastui-editor-mode-switch {
    border-top: 1px solid #e5ebf3;
    background: #fbfcfe;
}

/* Docs-style manual layout (reader) */
body.docs-page {
    background: var(--docs-bg-page);
}

body.docs-page .layout {
    max-width: 1460px;
}

body.docs-page .sidebar {
    display: none;
}

body.docs-page .main-content {
    width: 100%;
    max-width: 100%;
}

.docs-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr) 230px;
    gap: 24px;
    align-items: start;
}

.docs-mobile-nav-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    margin: 0 0 4px;
    border-radius: 8px;
    border: 1px solid var(--docs-border);
    background: var(--docs-bg-surface);
    color: var(--docs-text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--docs-shadow-card);
}

.docs-mobile-nav-toggle:focus-visible {
    outline: 2px solid var(--docs-accent);
    outline-offset: 2px;
}

.docs-mobile-nav-toggle .docs-mobile-nav-icon {
    font-size: 16px;
    line-height: 1;
}

.docs-left-nav,
.docs-right-toc {
    position: sticky;
    top: 16px;
    background: var(--docs-bg-muted);
    border: 1px solid var(--docs-border);
    border-radius: 10px;
    padding: 16px;
}

.docs-nav-title,
.docs-toc-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #607089;
    margin-bottom: 12px;
    font-weight: 700;
}

.docs-nav-title a {
    color: #1a5276;
    text-decoration: none;
}

.docs-page-nav,
.docs-page-toc,
#docs-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.docs-page-nav li {
    margin: 2px 0;
}

.docs-nav-group.has-children {
    margin: 6px 0;
}

.docs-page-nav-children > .docs-nav-group.has-children {
    margin: 2px 0;
}

.docs-nav-item-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.docs-nav-fold-slot {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.docs-nav-fold {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border: none;
    background: transparent;
    color: #607089;
    cursor: pointer;
    border-radius: 4px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.docs-nav-fold:hover {
    background: #e8eef5;
    color: #1a5276;
}

.docs-nav-fold-icon {
    display: inline-block;
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 6px solid currentColor;
    transition: transform 0.15s ease;
}

.docs-nav-group.is-open > .docs-nav-item-row .docs-nav-fold-icon {
    transform: rotate(90deg);
}

.docs-nav-group:not(.is-open) > .docs-page-nav-children {
    display: none;
}

.docs-page-nav-children {
    list-style: none;
    margin: 2px 0 0;
    padding: 0 0 0 8px;
}

.docs-page-nav-children .docs-page-nav-children {
    margin: 2px 0 0 26px;
    padding: 0 0 0 8px;
    border-left: 1px solid #e8ecef;
}

.docs-nav-link {
    flex: 1;
    min-width: 0;
}

.docs-nav-parent-link,
.docs-nav-leaf-link {
    flex: 1;
    min-width: 0;
}

.docs-page-nav li.sub-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.docs-nav-leaf-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.docs-page-nav li.sub-item > a,
.docs-nav-leaf-row > .docs-nav-leaf-link {
    flex: 1;
    min-width: 0;
}

.docs-page-nav li.sub-item a,
.docs-page-nav li.sub-item .docs-nav-page-link {
    padding-left: 20px;
}

.docs-page-nav li.active > a {
    color: #0b5bd3;
    background: #eef4ff;
    border-radius: 6px;
    font-weight: 600;
}

.docs-page-nav .page-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
    margin-left: 0;
    vertical-align: middle;
}

@media (hover: hover) and (pointer: fine) {
    .docs-page-nav .page-actions {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.15s ease, visibility 0s linear 0.15s;
    }

    .docs-page-nav li.sub-item:hover .page-actions,
    .docs-page-nav li.sub-item:focus-within .page-actions,
    .docs-page-nav .docs-nav-item-row:hover .page-actions,
    .docs-page-nav .docs-nav-item-row:focus-within .page-actions,
    .docs-page-nav .docs-nav-group-head:hover .page-actions,
    .docs-page-nav .docs-nav-group-head:focus-within .page-actions,
    .docs-page-nav .docs-nav-leaf-row:hover .page-actions,
    .docs-page-nav .docs-nav-leaf-row:focus-within .page-actions {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transition: opacity 0.15s ease 0.5s, visibility 0s linear 0.5s;
    }

    .docs-page-nav li.sub-item:focus-within .page-actions,
    .docs-page-nav .docs-nav-item-row:focus-within .page-actions,
    .docs-page-nav .docs-nav-group-head:focus-within .page-actions,
    .docs-page-nav .docs-nav-leaf-row:focus-within .page-actions {
        transition-delay: 0s;
    }
}

.page-edit-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    color: #607089;
    text-decoration: none;
}

.page-edit-link:hover {
    background: #e8eef5;
    color: #1a5276;
    text-decoration: none;
}

.page-edit-icon {
    display: block;
    width: 14px;
    height: 14px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.docs-page-nav .page-actions form {
    display: inline;
    margin: 0;
}

.docs-page-nav .page-delete-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 2px 4px;
    font-size: 14px;
    line-height: 1;
    opacity: 0.75;
}

.docs-page-nav .page-delete-btn:hover {
    opacity: 1;
}

.docs-page-nav a,
.docs-page-toc a,
#docs-toc-list a {
    display: block;
    padding: 7px 10px;
    color: #2d3f59;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
}

.docs-page-nav a:hover,
.docs-page-toc a:hover,
#docs-toc-list a:hover {
    background: #eef4ff;
    color: #0b5bd3;
    text-decoration: none;
}

.docs-page-nav a:focus-visible,
.docs-page-toc a:focus-visible,
#docs-toc-list a:focus-visible {
    outline: 2px solid var(--docs-accent);
    outline-offset: 2px;
}

#docs-toc-list a.active {
    background: #e9f1ff;
    color: #0b5bd3;
    font-weight: 600;
}

.docs-page-toc li.active > a {
    background: #e9f1ff;
    color: #0b5bd3;
    font-weight: 600;
}

.docs-nav-link.active,
.docs-nav-parent-link.active,
.docs-nav-leaf-link.active {
    color: #0b5bd3;
    background: #eef4ff;
    border-radius: 6px;
    font-weight: 600;
}

.docs-toc-divider {
    height: 1px;
    background: var(--docs-border);
    margin: 14px 0;
}

.docs-toc-title--secondary {
    margin-top: 0;
}

.docs-chapter-hint {
    font-size: 13px;
    line-height: 1.45;
    margin: 0;
}

#docs-toc-list li.toc-h3 a {
    padding-left: 22px;
    font-size: 13px;
}

.docs-main {
    min-width: 0;
    max-width: 860px;
    width: 100%;
    margin: 0 auto;
}

.docs-header {
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e8edf3;
}

.docs-header h1 {
    margin: 0;
    font-size: 34px;
    line-height: 1.2;
    color: #0f2743;
}

.docs-header p {
    margin-top: 10px;
    color: #5f6f86;
    font-size: 16px;
}

.docs-content h1,
.docs-content h2,
.docs-content h3 {
    scroll-margin-top: 90px;
}

.docs-content h1 { font-size: 28px; margin-top: 28px; }
.docs-content h2 {
    font-size: 22px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #edf1f6;
}
.docs-content h3 { font-size: 18px; margin-top: 20px; }
.docs-content p,
.docs-content li {
    color: #2a3b54;
    font-size: 16px;
    line-height: 1.7;
}

/* Markdown / prose (docs reader) */
.docs-content pre {
    background: #f6f8fa;
    border: 1px solid var(--docs-border);
    border-radius: 8px;
    padding: 14px 16px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.5;
    margin: 16px 0;
}
.docs-content code {
    background: rgba(11, 91, 211, 0.08);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #143d66;
}
.docs-content pre code {
    background: none;
    padding: 0;
    font-size: inherit;
    color: inherit;
}
.docs-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 18px 0;
    font-size: 15px;
}
.docs-content table th,
.docs-content table td {
    border: 1px solid var(--docs-border);
    padding: 10px 14px;
    text-align: left;
    vertical-align: top;
}
.docs-content table th {
    background: #f0f4f8;
    font-weight: 600;
    color: var(--docs-text);
}
.docs-content blockquote {
    margin: 18px 0;
    padding: 12px 16px 12px 18px;
    border-left: 4px solid var(--docs-accent);
    background: #f8fafc;
    border-radius: 0 8px 8px 0;
    color: #4a5b73;
}
.docs-content blockquote p {
    margin: 0;
}
.docs-content ul,
.docs-content ol {
    margin: 12px 0 12px 1.25em;
    padding: 0;
}
.docs-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.docs-overview-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.docs-overview-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #e6ecf3;
    border-radius: 8px;
    color: #22344d;
    text-decoration: none;
    background: #fff;
}

.docs-overview-item:hover {
    border-color: #b9d2ff;
    background: #f7faff;
    text-decoration: none;
}

.docs-overview-index {
    min-width: 24px;
    height: 24px;
    border-radius: 12px;
    background: #eef4ff;
    color: #0b5bd3;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.docs-action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 14px 0 4px;
}

.docs-action-bar form {
    display: inline-flex;
    margin: 0;
    align-items: center;
}

.docs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    white-space: nowrap;
    font-family: inherit;
}

button.docs-btn {
    appearance: none;
    -webkit-appearance: none;
}

.docs-btn-accent {
    background: linear-gradient(165deg, #117a65 0%, #16a085 100%);
    color: #fff;
    box-shadow: 0 2px 6px rgba(22, 160, 133, 0.22);
}

.docs-btn-accent:hover {
    filter: brightness(1.06);
    color: #fff;
    text-decoration: none;
}

.docs-action-bar form button.docs-btn {
    margin: 0;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    font-family: inherit;
    cursor: pointer;
}

.docs-admin-actions {
    margin-top: 14px;
    display: grid;
    gap: 8px;
}

.docs-admin-actions form {
    margin: 0;
}

.docs-empty {
    color: #7b889c;
    font-size: 13px;
}

@media (max-width: 1200px) {
    .docs-layout {
        grid-template-columns: 260px minmax(0, 1fr);
    }
    .docs-right-toc {
        display: none;
    }
}

@media (max-width: 900px) {
    .docs-layout {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .docs-mobile-nav-toggle {
        display: inline-flex;
        align-self: flex-start;
        order: 1;
    }

    .docs-main {
        order: 2;
        width: 100%;
    }

    .docs-left-nav {
        order: 3;
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        width: min(300px, 86vw);
        max-height: 100vh;
        overflow-y: auto;
        z-index: 200;
        margin: 0;
        border-radius: 0 12px 12px 0;
        transform: translateX(-100%);
        transition: transform 0.22s ease, box-shadow 0.22s ease;
        box-shadow: none;
    }

    .docs-layout.docs-nav-open .docs-left-nav {
        transform: translateX(0);
        box-shadow: 8px 0 32px rgba(15, 39, 67, 0.18);
    }

    .docs-layout.docs-nav-open .docs-main {
        filter: brightness(0.94);
        transition: filter 0.2s ease;
    }

    .docs-right-toc {
        order: 4;
        position: static;
    }
}

/* Article author card */
.article-author-card {
    margin-top: 2rem;
    padding: 1.25rem 1.35rem;
    background: #fff;
    border: 1px solid #e1e6ed;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(15, 39, 67, 0.06);
}
.article-author-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1a5276;
    margin-bottom: 0.85rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eef2f6;
}
.article-author-inner {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}
.article-author-photo {
    flex-shrink: 0;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e8eef3;
}
.article-author-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #1a5276, #2980b9);
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
}
.article-author-text {
    flex: 1;
    min-width: 0;
}
.article-author-name {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 0.35rem;
    color: #222;
}
.article-author-short {
    font-size: 0.95rem;
    color: #444;
    line-height: 1.55;
    margin-bottom: 0.5rem;
}
.article-author-muted {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    margin-bottom: 0;
}
.article-author-long-wrap {
    margin-top: 0.35rem;
    font-size: 0.92rem;
}
.article-author-long-wrap summary {
    cursor: pointer;
    color: #1a5276;
    font-weight: 500;
}
.article-author-long {
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px dashed #e1e6ed;
    font-size: 0.95rem;
    color: #333;
}
.article-author-long :first-child {
    margin-top: 0;
}

/* --- Profile portrait editor & crop modal --- */
.portrait-visually-hidden {
    display: none !important;
}

body.portrait-modal-open {
    overflow: hidden;
}

.profile-portrait-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.profile-portrait-editor {
    margin-bottom: 1rem;
}

.profile-portrait-preview-card {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: center;
    padding: 1.15rem 1.25rem;
    background: var(--docs-bg-surface, #fff);
    border: 1px solid var(--docs-border, #e1e6ed);
    border-radius: var(--docs-radius-lg, 12px);
    box-shadow: var(--docs-shadow-card, 0 1px 3px rgba(15, 39, 67, 0.06));
}

.profile-portrait-preview-ring {
    position: relative;
    width: 128px;
    height: 128px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #dbe7ef;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.85),
        0 6px 20px rgba(26, 82, 118, 0.18);
    background: linear-gradient(160deg, #eef5fb 0%, #dfeaf5 100%);
}

.profile-portrait-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-portrait-preview-ph {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.75rem;
    font-weight: 700;
    color: #1a5276;
    letter-spacing: 0.02em;
}

.profile-portrait-preview-meta {
    flex: 1;
    min-width: 180px;
}

.profile-portrait-preview-caption {
    font-weight: 600;
    color: #1a5276;
    margin-bottom: 0.35rem;
    font-size: 1rem;
}

.profile-portrait-hint-text {
    font-size: 0.88rem;
    color: #5f6f86;
    line-height: 1.45;
    margin-bottom: 0.75rem;
}

.profile-portrait-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.btn-portrait-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.55rem 1.1rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(165deg, #1a5276 0%, #2471a3 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(26, 82, 118, 0.35);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn-portrait-edit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(26, 82, 118, 0.4);
    text-decoration: none;
}

.btn-portrait-edit:active {
    transform: translateY(0);
}

.profile-portrait-clear-row {
    margin-top: 0.75rem;
}

.profile-portrait-clear-hint {
    margin: 0.35rem 0 0;
    font-size: 0.85rem;
    color: #b54708;
}

.portrait-preview-dimmed {
    opacity: 0.38;
    filter: grayscale(0.35);
}

.portrait-crop-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    padding: 16px;
    box-sizing: border-box;
}

.portrait-crop-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 39, 67, 0.52);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    cursor: pointer;
}

.portrait-crop-modal-panel {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: min(440px, 100%);
    max-height: min(92vh, 640px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(225, 230, 237, 0.98);
    box-shadow:
        0 24px 48px rgba(15, 39, 67, 0.22),
        0 0 0 1px rgba(255, 255, 255, 0.08) inset;
    overflow: hidden;
    animation: portrait-modal-in 0.28s ease-out;
}

@keyframes portrait-modal-in {
    from {
        opacity: 0;
        transform: translate(-50%, -46%) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.portrait-crop-modal-head {
    padding: 1rem 1.15rem 0.65rem;
    border-bottom: 1px solid #eef2f6;
}

.portrait-crop-modal-head h3 {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a5276;
}

.portrait-crop-modal-hint {
    margin: 0;
    font-size: 0.82rem;
    color: #5f6f86;
    line-height: 1.45;
}

.portrait-crop-stage-wrap {
    flex: 1;
    min-height: 280px;
    max-height: 46vh;
    background: #0e2433;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portrait-crop-image-el {
    display: block;
    max-width: 100%;
    max-height: 46vh;
}

.portrait-crop-modal .cropper-modal {
    opacity: 0.92;
}

.portrait-crop-modal .cropper-view-box,
.portrait-crop-modal .cropper-face {
    border-radius: 50%;
}

.portrait-crop-toolbar {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    padding: 10px 12px;
    background: #f8fafc;
    border-bottom: 1px solid #eef2f6;
}

.portrait-tool-btn {
    min-width: 42px;
    height: 40px;
    padding: 0 12px;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1;
    border: 1px solid #cdd6e1;
    border-radius: 8px;
    background: #fff;
    color: #1b2b44;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease;
}

.portrait-tool-btn:hover {
    background: #eef4ff;
    border-color: #1a5276;
}

.portrait-tool-btn-text {
    font-size: 0.88rem;
    font-weight: 600;
}

.portrait-crop-modal-foot {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 12px 14px 14px;
    background: #fff;
}

.portrait-foot-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid transparent;
}

.portrait-foot-cancel {
    background: #fff;
    border-color: #cdd6e1;
    color: #334155;
}

.portrait-foot-cancel:hover {
    background: #f8fafc;
}

.portrait-foot-apply {
    background: linear-gradient(165deg, #1a5276 0%, #2471a3 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(26, 82, 118, 0.35);
}

.portrait-foot-apply:hover {
    filter: brightness(1.05);
}

@media (max-width: 520px) {
    .profile-portrait-preview-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .portrait-crop-stage-wrap {
        min-height: 240px;
    }
}

/* --- Role-based home facade (visitor / player) --- */
.home-facade {
    max-width: 960px;
}

.home-facade-header h1 {
    margin: 0 0 0.35rem;
    font-size: 1.65rem;
    color: #1a5276;
}

.home-facade-section {
    margin-top: 2rem;
}

.home-facade-section h2,
.home-section-head h2 {
    margin: 0 0 0.85rem;
    font-size: 1.15rem;
    color: #22344d;
}

.home-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 0.85rem;
}

.home-section-head h2 {
    margin: 0;
}

.home-continue-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.home-continue-list a {
    display: block;
    padding: 10px 12px;
    border: 1px solid #e6ecf3;
    border-radius: 8px;
    background: #fff;
    color: #1a5276;
    text-decoration: none;
}

.home-continue-list a:hover {
    border-color: #b9d2ff;
    background: #f7faff;
}

.home-card-grid {
    display: grid;
    gap: 12px;
}

.home-card-grid--articles {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.home-card-grid--manuals,
.home-card-grid--programs {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.home-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    border: 1px solid #e6ecf3;
    border-radius: 10px;
    background: #fff;
    color: #22344d;
    text-decoration: none;
    min-height: 88px;
}

.home-card:hover {
    border-color: #b9d2ff;
    background: #f7faff;
    text-decoration: none;
}

.home-card-kicker {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #5f6f86;
}

.home-card-title {
    font-size: 1rem;
    line-height: 1.35;
    color: #1b2b44;
}

.home-card-meta {
    font-size: 0.82rem;
    color: #5f6f86;
}

.home-category-list {
    margin-top: 0;
}

.home-player-hero {
    margin-top: 1.25rem;
    border: 1px solid #c5daf5;
    border-radius: 14px;
    background: linear-gradient(165deg, #f7faff 0%, #eef4ff 100%);
    box-shadow: 0 4px 18px rgba(26, 82, 118, 0.08);
}

.home-player-hero-inner {
    padding: 1.35rem 1.5rem 1.5rem;
}

.home-player-hero-title {
    margin: 0.25rem 0 0.5rem;
    font-size: 1.45rem;
    color: #1a5276;
}

.home-player-hero-meta,
.home-player-week,
.home-player-next {
    margin: 0.35rem 0 0;
    color: #334155;
}

.home-player-next-label {
    font-weight: 600;
}

.home-player-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 1.1rem;
}

.home-facade-cta {
    display: inline-block;
    padding: 0.55rem 1.1rem;
    border-radius: 8px;
    background: linear-gradient(165deg, #1a5276 0%, #2471a3 100%);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(26, 82, 118, 0.25);
}

.home-facade-cta:hover {
    filter: brightness(1.05);
    color: #fff;
    text-decoration: none;
}

.home-facade-link {
    color: #1a5276;
    font-weight: 600;
    text-decoration: none;
}

.home-facade-link:hover {
    text-decoration: underline;
}

.home-player-empty {
    margin-top: 1.25rem;
    padding: 1.35rem 1.5rem;
    border: 1px dashed #cdd6e1;
    border-radius: 12px;
    background: #fafbfc;
}

.home-player-empty h2 {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
    color: #22344d;
}

@media (max-width: 640px) {
    .home-card-grid--articles,
    .home-card-grid--manuals,
    .home-card-grid--programs {
        grid-template-columns: 1fr;
    }
}
