/* 八卦対応表。線の形と表の基本表示は64.cssを共用する。 */
.hakke-page .main-w { display: flex; flex-direction: column; min-width: 0; min-height: 100dvh; padding-bottom: 0.15rem; }
.hakke-page .main-w > * { flex-shrink: 0; }
.hakke-page .gua-lookup-scroll { margin-top: 0; }
.hakke-intro { padding-top: 4em; margin-bottom: 0.5em; line-height: 1.7; }
.hakke-intro p + p { margin-top: 0.5em; }
.hakke-table { min-width: 48em; }
.hakke-table thead { position: sticky; top: 0; z-index: 3; }
.hakke-table thead th { position: static; }
.hakke-table thead .lookup-corner,
.hakke-table .hakke-detail-corner { position: sticky; left: 0; z-index: 1; background: var(--bg-color); }
.hakke-table .hakke-detail-row td {
    height: auto;
    padding: 0.15em 0.4em;
    background: var(--bg-color);
    line-height: 1.2;
}
.hakke-table tbody th,
.hakke-table td {
    height: 3.5em;
    padding: 0.3em 0.4em;
    vertical-align: middle;
    box-sizing: border-box;
}
.hakke-table td { background-color: #fff; overflow-wrap: anywhere; }
.hakke-table td:has(.hakke-cell-select) { padding: 0; }
.hakke-cell-select {
    display: block;
    width: 100%;
    min-height: 3.5em;
    padding: 0.3em 0.4em;
    box-sizing: border-box;
    color: inherit;
    font: inherit;
    font-size: 0.9em !important;
    line-height: inherit;
    text-align: center;
    overflow-wrap: anywhere;
}
.hakke-cell-select:focus-visible { outline: 2px solid var(--text-color); outline-offset: -2px; }
.hakke-detail-wrap { position: relative; display: block; width: max-content; margin: 0 auto; line-height: 1.2; }
.hakke-detail-pending {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    padding: 0.15em 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #777;
    cursor: default;
    font-size: 0.65em !important;
    font-weight: 400 !important;
    line-height: 1.2;
    white-space: nowrap;
}
.hakke-detail-pending img { position: absolute; left: calc(100% + 0.35em); top: 50%; width: 0.8em; height: 0.8em; transform: translateY(-50%); }
.hakke-detail-pending:focus-visible { outline: 2px solid var(--text-color); outline-offset: 2px; }
.hakke-detail-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 0.35em 0.6em;
    border: 1px solid var(--border-color);
    border-radius: 0.3em;
    background: #fff;
    color: var(--text-color);
    font-size: 0.75em;
    white-space: nowrap;
    visibility: hidden;
    pointer-events: none;
    z-index: 5;
}
.hakke-detail-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    width: 6px;
    height: 6px;
    background: #fff;
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    transform: translate(-50%, -50%) rotate(45deg);
}
.hakke-detail-wrap:hover .hakke-detail-tooltip,
.hakke-detail-wrap:focus-within .hakke-detail-tooltip { visibility: visible; }
.hakke-table .hakke-name { display: block; font-weight: 500; }
.hakke-table .hakke-yomi { display: block; font-size: 0.7em; font-weight: 400; }
.hakke-table .lookup-corner { font-size: 1em; }
.hakke-page .site-footer { margin-top: auto; padding-top: 1.2rem; }
@media (max-width: 767px) {
    .hakke-page .main-w { min-height: calc(100dvh - 40px); }
    .hakke-intro { font-size: 0.85rem; }
    .hakke-table { min-width: 45em; }
}
