.shogi-site {
    margin: 0;
    color: #263332;
    background: #f5faf7;
    font-family: system-ui, sans-serif;
}

.shogi-page {
    width: min(1120px, calc(100% - 24px));
    margin: 12px auto 28px;
}

.shogi-breadcrumb {
    color: #405750;
    font-size: .875rem;
}

.shogi-breadcrumb ol,
.shogi-breadcrumb li {
    display: flex;
    align-items: baseline;
    gap: 4px 8px;
}

.shogi-breadcrumb ol {
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
}

.shogi-breadcrumb a {
    color: #275c47;
}

.shogi-page > h1 {
    margin: 12px 0 4px;
    font-size: clamp(1.35rem, 3vw, 1.75rem);
}

.shogi-intro {
    margin: 0 0 12px;
    font-size: .9375rem;
    line-height: 1.6;
}

#shogi-frame {
    display: block;
    width: min(100%, 1000px);
    height: min(820px, calc(100svh - 12px), var(--shogi-safe-height, 100svh));
    margin: 0 auto;
    border: 0;
    border-radius: 10px;
    background: #ede5d6;
    scroll-margin-block: var(--shogi-safe-top, 0px) var(--shogi-safe-bottom, 0px);
}

html:has(#shogi-frame[data-expanded]),
body:has(#shogi-frame[data-expanded]) {
    overflow: hidden;
}

#shogi-frame[data-expanded] {
    position: fixed;
    inset: var(--shogi-safe-top, 0px) 0 auto;
    z-index: 10000;
    width: 100%;
    height: min(100dvh, var(--shogi-safe-height, 100dvh));
    margin: 0;
    border-radius: 0;
}

.shogi-info {
    margin: 24px 0;
    line-height: 1.75;
}

.shogi-info h2 {
    margin: 0 0 8px;
    font-size: 1.125rem;
}

.shogi-howto {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.shogi-howto article {
    padding: 12px;
    border: 1px solid #d3e0e5;
    border-radius: 10px;
    background: #fff;
}

.shogi-howto h3 {
    margin: 0;
    font-size: 1rem;
}

.shogi-howto p {
    margin: 4px 0 0;
    font-size: .9375rem;
}

#shogi-comments-show {
    display: none;
    min-height: 44px;
    padding: .5rem .85rem;
    border: 1px solid #b8c9c2;
    border-radius: 8px;
    font: inherit;
    color: inherit;
    background: #fff;
    cursor: pointer;
}

.shogi-comments-deferred #shogi-comments-show {
    display: inline-block;
}

.shogi-comments-deferred #shogi-comments-body {
    display: none;
}

@media (max-width: 700px) {
    .shogi-howto { grid-template-columns: 1fr; }
}
