@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@500;600&family=Noto+Sans+JP:wght@400;500;600;700&family=Space+Grotesk:wght@500;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-text-size-adjust: 100%;
}

:root {
    --primary: #2563eb;
    --secondary: #64748b;
    --success: #067647;
    --success-soft: #dcfae6;
    --danger: #dc2626;
    --danger-soft: #fee2e2;
    --warning: #c26a05;
    --warning-soft: #fef0c7;
    --background: #f8fafc;
    --surface: #ffffff;
    --border: #e2e8f0;
    --border-strong: #b8c3d4;
    --primary-tint: #dbeafe;
    --primary-tint-soft: #eff6ff;
    --primary-tint-border: #bfdbfe;
    --female-accent: #ec4899;
    --text: #1e293b;
    --text-primary: var(--text);
    --text-muted: #64748b;
    --text-subtle: #8b99ad;
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
}

body {
    background: var(--background);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
        'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
}

.table-wrapper {
    position: relative;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.table-wrapper::-webkit-scrollbar {
    display: none;
}

.footer {
    margin-top: 40px;
    padding: 20px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    text-align: center;
}

.jockey-card .eyebrow {
    margin-bottom: 2px;
    color: #94a3b8;
    font: 600 9px 'IBM Plex Mono', monospace;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.jockey-table {
    width: 100%;
    border-collapse: collapse;
}

.jockey-table th {
    padding: 0 5px 6px;
    color: #94a3b8;
    font: 600 9px 'IBM Plex Mono', monospace;
    letter-spacing: .06em;
    text-align: right;
    white-space: nowrap;
}

.jockey-table th:first-child {
    padding-left: 0;
    text-align: left;
}

.jockey-table td {
    padding: 6px 5px;
    border-top: 1px dashed #eef2f7;
    color: #334155;
    font: 400 12px 'Noto Sans JP', sans-serif;
    text-align: right;
    white-space: nowrap;
}

.jockey-table td:first-child {
    padding-left: 0;
    color: #1e293b;
    font-weight: 500;
    text-align: left;
}

.rate-bar-cell {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}

.rate-bar {
    width: 72px;
    height: 5px;
    overflow: hidden;
    border-radius: 3px;
    background: #eef2f7;
}

.rate-bar i {
    display: block;
    height: 100%;
    border-radius: 3px;
    background: #3b82f6;
}

.jockey-insight {
    margin-top: 10px;
    padding: 8px 11px;
    border-left: 3px solid var(--primary);
    border-radius: 0 8px 8px 0;
    background: var(--primary-tint-soft);
    color: #475569;
    font-size: 11px;
    line-height: 1.45;
}

.hitokuchi-page-shell {
    overflow-x: hidden;
    background: var(--background);
    color: var(--text);
}

.hitokuchi-page {
    width: min(100%, 920px);
    min-width: 0;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI',
        sans-serif;
}

.hitokuchi-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.hitokuchi-hero {
    margin-bottom: 12px;
    padding: 18px 20px;
    text-align: center;
}

.hitokuchi-hero h1 {
    margin: 2px 0 0;
    color: var(--text);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.4;
}

.hitokuchi-toc {
    margin-bottom: 12px;
    padding: 14px 16px;
}

.hitokuchi-toc h2 {
    margin: 0 0 8px;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
}

.hitokuchi-toc ol {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 22px;
    margin: 0;
    padding-left: 22px;
}

.hitokuchi-toc li {
    padding-left: 2px;
    color: var(--text-subtle);
    font-size: 12px;
    line-height: 1.6;
}

.hitokuchi-toc a,
.hitokuchi-guide a {
    color: var(--primary);
    text-decoration: none;
}

.hitokuchi-toc a:hover,
.hitokuchi-guide a:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.hitokuchi-guide {
    min-width: 0;
    padding: 18px 20px 24px;
    color: var(--text);
    font-size: 13px;
    line-height: 1.75;
}

.hitokuchi-guide h2 {
    scroll-margin-top: 12px;
    margin: 30px 0 10px;
    padding-bottom: 7px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.5;
}

.hitokuchi-guide h2:first-child {
    margin-top: 0;
}

.hitokuchi-guide h3 {
    margin: 22px 0 8px;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.55;
}

.hitokuchi-guide p {
    margin-bottom: 10px;
    line-height: 1.8;
}

.hitokuchi-guide ul,
.hitokuchi-guide ol {
    margin: 9px 0 12px;
    padding-left: 21px;
}

.hitokuchi-guide li {
    margin-bottom: 4px;
    line-height: 1.7;
}

.hitokuchi-guide blockquote.jockey-insight {
    margin: 12px 0;
    padding: 8px 11px;
    border-left: 3px solid var(--primary);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    background: var(--primary-tint-soft);
    color: var(--text-muted);
    font-style: normal;
}

.hitokuchi-table-scroll {
    max-width: 100%;
    margin: 12px 0 16px;
}

.hitokuchi-guide .jockey-table {
    margin: 0;
}

.hitokuchi-guide .jockey-table.hitokuchi-table-wide {
    min-width: 680px;
}

.hitokuchi-guide .jockey-table th {
    padding: 0 8px 7px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    color: #94a3b8;
    font: 600 9px 'IBM Plex Mono', monospace;
    letter-spacing: .06em;
    text-align: left;
    white-space: nowrap;
}

.hitokuchi-guide .jockey-table th:first-child {
    padding-left: 0;
}

.hitokuchi-guide .jockey-table td {
    padding: 7px 8px;
    border-top: 1px dashed var(--border);
    border-bottom: 0;
    color: var(--text-muted);
    font: 400 12px 'Noto Sans JP', sans-serif;
    text-align: left;
    vertical-align: top;
    white-space: normal;
}

.hitokuchi-guide .jockey-table td:first-child {
    padding-left: 0;
    color: var(--text);
    font-weight: 500;
}

.hitokuchi-guide .jockey-table .hitokuchi-column-numeric {
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}

.hitokuchi-guide .jockey-table tr:hover td {
    background-color: var(--background);
}

.hitokuchi-club-cell {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 22px;
    white-space: nowrap;
}

.hitokuchi-silks {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    object-fit: contain;
    image-rendering: pixelated;
}

.hitokuchi-guide pre {
    max-width: 100%;
    overflow-x: auto;
    margin: 12px 0;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--background);
    font: 500 11px/1.6 'IBM Plex Mono', monospace;
}

.hitokuchi-guide code {
    font-family: 'IBM Plex Mono', monospace;
}

.hitokuchi-guide hr {
    margin: 22px 0;
    border: 0;
    border-top: 1px solid var(--border);
}

.hitokuchi-footer {
    padding: 0 20px 20px;
}

.hitokuchi-footer p + p {
    margin-top: 4px;
}

@media (max-width: 640px) {
    .hitokuchi-page {
        padding: 10px;
    }

    .hitokuchi-hero,
    .hitokuchi-toc,
    .hitokuchi-guide {
        padding-right: 12px;
        padding-left: 12px;
    }

    .hitokuchi-hero h1 {
        font-size: 20px;
    }

    .hitokuchi-toc ol {
        grid-template-columns: 1fr;
    }

    .hitokuchi-guide {
        font-size: 13px;
    }

    .hitokuchi-guide h2 {
        font-size: 16px;
    }

    .hitokuchi-footer {
        padding-bottom: 10px;
    }
}
