
/* 共通フッター */
.site-footer {
    width: 100%;
    box-sizing: border-box;
    margin-top: 40px;
    padding: 28px 15px 22px;
    border-top: 1px solid #e1e6ec;
    background: #153b65;
    color: #ffffff;
    text-align: center;
    font-family: "Meiryo", sans-serif;
}

.site-footer .footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.site-footer a {
    color: #ffffff;
    font-size: 14px;
    text-decoration: none;
}

.site-footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.site-footer .footer-copy {
    margin: 0;
    font-size: 14px;
    line-height: 1.8;
}

.site-footer .footer-divider {
    margin: 0 5px;
    color: #aab4be;
}

@media (max-width: 600px) {
    .site-footer {
        padding: 24px 12px 18px;
    }

    .site-footer .footer-links {
        gap: 8px;
    }

    .site-footer a {
        font-size: 13px;
    }

    .site-footer .footer-copy {
        font-size: 13px;
    }
}


/* 共通ヘッダー */
.site-header {
    width: 100%;
    box-sizing: border-box;
    background: #153b65;
    color: white;
    padding: 16px 20px;
}

.site-header .header-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-header .site-logo {
    color: white;
    font-size: 20px;
    font-weight: bold;
    text-decoration: none;
    white-space: nowrap;
}

.site-header .header-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.site-header .header-nav a {
    color: white;
    font-size: 13px;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255,255,255,.12);
    white-space: nowrap;
}

.site-header .header-nav a:hover {
    background: rgba(255,255,255,.25);
}

@media (max-width: 600px) {
    .site-header {
        padding: 14px;
    }

    .site-header .header-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .site-header .header-nav {
        width: 100%;
        gap: 6px;
    }

    .site-header .header-nav a {
        font-size: 12px;
        padding: 7px 10px;
    }
}


/* 共通領域：ページ固有の旧スタイルより優先 */
.site-header .header-inner { padding: 0; flex-wrap: wrap; }
.site-header .site-logo { margin: 0; }
.site-footer .footer-brand { font-size: 20px; font-weight: bold; margin: 0 0 8px; color: white; }
.site-footer .footer-links { margin: 16px auto; max-width: 1100px; }
.site-footer .footer-links a { color: white; padding: 6px 8px; margin: 0; text-decoration: underline; }
.site-footer .footer-copy { color: #e1ebf7; }
.site-header a:focus-visible, .site-footer a:focus-visible { outline: 2px solid white; outline-offset: 3px; }
.site-page-heading { max-width: 1100px; margin: 24px auto 0; padding: 0 20px; box-sizing: border-box; }
.site-page-heading h1 { font-size: clamp(22px, 4vw, 30px); color: #153b65; margin: 0; }

/* 共通パンくずリスト */
.site-breadcrumb { box-sizing: border-box; max-width: 1100px; margin: 20px auto 0; padding: 0 20px; color: #263238; font-size: 14px; line-height: 1.8; text-align: left; }
.site-breadcrumb ol { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; list-style: none; padding: 0; margin: 0; }
.site-breadcrumb li { display: inline-flex; align-items: baseline; gap: 8px; margin: 0; padding: 0; max-width: 100%; overflow-wrap: anywhere; }
.site-breadcrumb a { display: inline; margin: 0; padding: 0; background: transparent; color: #24568e; text-decoration: underline; font-size: inherit; font-weight: normal; border: 0; border-radius: 0; }
.site-breadcrumb a:focus-visible { outline: 2px solid #24568e; outline-offset: 3px; }
.site-breadcrumb [aria-hidden="true"] { color: #52647a; }
@media (max-width: 600px) { .site-breadcrumb { margin-top: 14px; padding: 0 14px; font-size: 13px; } }

/* キーボード操作と狭い画面での共通ナビゲーション */
.site-header .header-nav a, .site-footer .footer-links a { overflow-wrap: anywhere; }
button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid #1769aa; outline-offset: 2px; }
@media (max-width: 360px) { .site-header .site-logo { white-space: normal; } .site-header .header-nav a { white-space: normal; } }

/* 過去結果の検索フォーム（ロト6・ロト7共通） */
.search-box .search-grid { grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); }
.search-box .search-field { min-width: 0; }
.search-box .search-field input {
    display: block; width: 100%; min-width: 0; max-width: 100%;
    box-sizing: border-box; height: 46px; padding: 10px;
    font-family: inherit; font-size: 16px; color: #263238; background: #fff;
}
.search-box .search-field input[type="date"] { -webkit-appearance: none; appearance: none; }
.search-box .search-field input[type="date"]::-webkit-date-and-time-value { min-height: 1.2em; text-align: left; }
.search-box .search-buttons { flex-wrap: wrap; }
@media (max-width: 600px) {
    .search-box .search-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 380px) {
    .search-box .search-grid { grid-template-columns: minmax(0, 1fr); }
}

/* 公開機能の操作ボタン：用途別の共通デザイン */
:is(.primary-button, .secondary-button, .delete-button, .generate-button, .simulation-submit-button, .search-buttons button, .search-buttons a, .pagination a, .saved-actions button, .selection-actions button, .generator-simulation button, .sort-form button) {
    box-sizing: border-box; min-height: 44px; max-width: 100%;
    padding: 10px 14px; border: 1px solid #153b65; border-radius: 8px;
    font-family: inherit; font-size: 15px; font-weight: 600; line-height: 1.5;
    text-align: center; text-decoration: none; cursor: pointer;
    background: #fff; color: #153b65;
}
:is(.primary-button, .generate-button, .simulation-submit-button, .search-buttons button, .pagination a, .generator-simulation button[type="submit"], .sort-form button) { background: #153b65; color: #fff; }
:is(.primary-button, .generate-button, .simulation-submit-button, .search-buttons button, .pagination a, .generator-simulation button[type="submit"], .sort-form button):hover { background: #245b8f; color: #fff; }
:is(.secondary-button, .search-buttons a, .saved-actions button, .selection-actions button, .generator-simulation button[type="button"]):hover { background: #edf3fa; color: #153b65; }
:is(button.delete-button, .saved-actions button.delete-button) { background: #fff0f0; color: #b91c1c; border-color: #efc4c4; }
:is(button.delete-button, .saved-actions button.delete-button):hover { background: #ffe0e0; color: #b91c1c; }
:is(.primary-button, .secondary-button, .delete-button, .generate-button, .simulation-submit-button, .search-buttons button, .saved-actions button, .selection-actions button, .generator-simulation button, .sort-form button):disabled, .pagination a.disabled { background: #e5e7eb; color: #667085; border-color: #d1d5db; opacity: 1; cursor: not-allowed; }
.primary-button.submit-button { width: 100%; min-height: 52px; font-size: 17px; }
.save-selected-row { margin-top: 10px; }
.save-selected-row .save-selected-button { width: 100%; }
@media (max-width: 600px) {
    .button-row > .secondary-button { flex: 1 1 auto; }
    .saved-actions button { min-width: 0; padding: 8px 6px; font-size: 13px; }
}

/* 公開ページ共通の免責事項 */
.site-disclaimer {
    box-sizing: border-box;
    width: 100%;
    margin: 26px 0 0;
    padding: 16px 18px;
    border-radius: 12px;
    background: #eaf0f8;
    color: #52647a;
    font-size: 13px;
    font-weight: normal;
    line-height: 1.8;
    text-align: left;
    overflow-wrap: anywhere;
}


/* Access analytics consent */
#lotolab-consent-panel {
    position: fixed;
    z-index: 10000;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    width: min(720px, calc(100% - 24px));
    max-height: 70vh;
    overflow: auto;
    box-sizing: border-box;
    padding: 18px;
    border: 1px solid #ccd5df;
    border-radius: 12px;
    background: #fff;
    color: #263238;
    box-shadow: 0 4px 24px rgba(21,59,101,.18);
    font-size: 14px;
    line-height: 1.6;
    text-align: left;
}
#lotolab-consent-panel strong { color: #153b65; font-size: 17px; }
#lotolab-consent-panel p { margin: 8px 0; }
#lotolab-consent-panel a { color: #153b65; text-decoration: underline; }
.lotolab-consent-actions, .lotolab-privacy-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}
#lotolab-consent-panel button, .lotolab-privacy-actions button {
    flex: 1 1 130px;
    min-height: 44px;
    margin: 0;
    padding: 10px 14px;
    border: 1px solid #153b65;
    border-radius: 8px;
    background: #fff;
    color: #153b65;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
#lotolab-consent-panel button:focus-visible, .lotolab-privacy-actions button:focus-visible {
    outline: 3px solid #3978c4;
    outline-offset: 2px;
}
@media (max-width: 480px) {
    #lotolab-consent-panel { padding: 14px; }
}
