:root {
    --bg: #fffdf5;
    --surface: #fffef9;
    --surface-strong: #ffffff;
    --text: #4c3733;
    --muted: #7b6761;
    --border: #efd2bf;
    --border-soft: #f6e5da;
    --primary: #ff914d;
    --primary-dark: #e8742d;
    --primary-soft: #ffe5d4;
    --peach: #ffddd0;
    --cream: #fffdf0;
    --brown: #4c3733;
    --brown-deep: #342320;
    --danger: #c53d3d;
    --radius: 22px;
    --shadow: 0 18px 45px rgba(92, 59, 45, .10);
    --shadow-soft: 0 10px 30px rgba(92, 59, 45, .07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}
body.nav-open { overflow: hidden; }
a { color: var(--primary-dark); }
img { max-width: 100%; }
button, input, textarea { font: inherit; }
.container { width: min(1000px, calc(100% - 40px)); margin-inline: auto; }
.skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 10000;
    padding: 8px 14px;
    border-radius: 8px;
    background: var(--brown-deep);
    color: #fff;
    text-decoration: none;
    transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* JDBA東海 共通ヘッダー（WordPress非依存・レスポンシブ再現） */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background: #4A3F35;
    border-bottom: 1px solid #d9cbb7;
    transition: background-color .24s ease, box-shadow .24s ease, border-color .24s ease;
}
.site-header-inner {
    position: relative;
    width: min(100%, 1008px);
    min-height: 80px;
    margin: 0 auto;
    display: flex;
    align-items: stretch;
    transition: min-height .24s ease;
}
.site-header-brand-area {
    flex: 1 1 auto;
    min-width: 0;
    background: #4A3F35;
}
.site-header-brand-wrap {
    height: 100%;
    display: flex;
    align-items: center;
    padding: 6px 0 6px 6px;
    transition: padding .24s ease;
}
.site-brand {
    display: inline-flex;
    align-items: center;
    color: inherit;
    text-decoration: none;
}
.site-brand-logo {
    display: block;
    width: 149px;
    max-width: 100%;
    height: auto;
    transition: width .24s ease;
}
.site-brand-mark {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--primary-soft);
}
.site-brand-mark svg { width: 34px; height: 34px; fill: var(--primary); }
.site-brand-copy { display: flex; flex-direction: column; line-height: 1.25; }
.site-brand-copy strong { font-size: 1.32rem; letter-spacing: .04em; }
.site-brand-copy small { margin-top: 3px; color: var(--muted); font-size: .68rem; letter-spacing: .08em; }
.site-navigation,
.global-nav {
    flex: 0 0 423px;
    display: flex;
    align-items: stretch;
    background: #8A7F73;
    transition: flex-basis .24s ease, background-color .24s ease;
}
.site-navigation a,
.global-nav a {
    position: relative;
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 0 8px;
    color: #fff;
    text-decoration: none;
    font-size: .78rem;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: .01em;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: background .2s ease, border-color .2s ease;
}
.site-navigation a:hover,
.site-navigation a:focus-visible,
.site-navigation a.is-current,
.global-nav a:hover,
.global-nav a:focus-visible,
.global-nav a.is-current {
    background: rgba(255, 255, 255, .04);
    border-bottom-color: #e2a16e;
}
.site-navigation .nav-contact,
.global-nav .nav-contact {
    margin-left: 0;
    background: transparent;
    color: #fff;
}
.nav-toggle {
    display: none;
    align-items: center;
    gap: 7px;
    padding: 8px 10px;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .08em;
}
.nav-toggle-lines { width: 25px; display: grid; gap: 5px; }
.nav-toggle-lines i {
    display: block;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-lines i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-lines i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-lines i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-header.is-scrolled {
    box-shadow: 0 6px 16px rgba(38, 28, 22, .18);
}
.site-header.is-scrolled .site-header-inner {
    min-height: 52px;
    justify-content: center;
}
.site-header.is-scrolled .site-header-brand-area {
    display: none;
}
.site-header.is-scrolled .site-navigation,
.site-header.is-scrolled .global-nav {
    flex: 0 0 523px;
    margin-inline: auto;
}
.site-header.is-scrolled .site-navigation a,
.site-header.is-scrolled .global-nav a {
    font-size: .76rem;
}

/* ページ上部 */
.brand-intro {
    background: #e8e0ca;
    padding: 27px 0 16px;
}
.brand-intro-inner {
    width: min(1000px, calc(100% - 40px));
}
.brand-intro-inner p {
    margin: 0;
    color: #746454;
    font-size: .95rem;
    line-height: 1.9;
}
.brand-intro-inner strong { color: #625142; }

.feature-section {
    background: #e8e0ca;
    padding: 16px 0 38px;
}
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 34px;
}
.feature-card {
    padding: 14px 16px 18px;
    border: 2px solid #f1d0b5;
    border-radius: 20px;
    background: rgba(255, 255, 255, .24);
}
.feature-card h2 {
    margin: 0 0 8px;
    color: #60381f;
    font-size: 1rem;
    line-height: 1.35;
}
.feature-card p {
    margin: 0;
    color: #7a6858;
    font-size: .88rem;
    line-height: 1.8;
}

/* 公開ページ */
.public-main { padding: 16px 0 84px; }
.calendar-section,
.event-detail-section { scroll-margin-top: 110px; }
.event-detail-section { margin-top: 52px; }
.section-heading { margin-bottom: 22px; text-align: center; }
.section-kicker {
    margin: 0 0 2px;
    color: var(--primary-dark);
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: .16em;
    text-transform: uppercase;
}
.section-heading h2 { margin: 0; color: var(--brown); font-size: clamp(1.45rem, 3vw, 2rem); line-height: 1.35; }
.section-heading-line { display: block; width: 44px; height: 3px; margin: 12px auto 0; border-radius: 99px; background: var(--primary); }
.calendar-card,
.event-detail,
.event-form,
.table-wrap,
.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.calendar-card { position: relative; padding: 27px; overflow: hidden; background: #fffef9; }
.calendar-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), #ffbd78);
}
.event-detail {
    position: relative;
    overflow: hidden;
    background-color: var(--surface);
    background-size: cover;
    background-position: center;
    scroll-margin-top: 108px;
}
.event-detail::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 7px;
    background: var(--primary);
    z-index: 1;
}
.event-detail-inner { position: relative; z-index: 2; padding: 36px 40px 42px; }
.event-detail.empty { min-height: 160px; display: grid; place-items: center; }
.detail-placeholder,
.loading { margin: 0; color: var(--muted); text-align: center; }
.event-main-image {
    display: block;
    width: 100%;
    max-height: 570px;
    object-fit: cover;
    border: 1px solid var(--border);
    border-radius: 18px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-soft);
}
.detail-content { max-width: 880px; margin: 0 auto; }
.event-date {
    display: inline-flex;
    align-items: center;
    margin: 0 0 12px;
    padding: 6px 14px;
    border: 1px solid #ffc79f;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--brown);
    font-weight: 800;
}
.detail-content h2 {
    margin: 0 0 21px;
    color: var(--brown);
    font-size: clamp(1.65rem, 3vw, 2.55rem);
    line-height: 1.4;
}
.detail-content h2::after { content: ""; display: block; width: 58px; height: 3px; margin-top: 16px; border-radius: 99px; background: var(--primary); }
.event-body { color: var(--brown); font-size: 1.02rem; overflow-wrap: anywhere; }
.event-body p:first-child { margin-top: 0; }
.event-body a { font-weight: 700; text-underline-offset: 3px; }

/* FullCalendar */
.fc { color: var(--brown); }
.fc .fc-toolbar { margin-bottom: 1.25em; }
.fc .fc-toolbar-title { color: var(--brown); font-size: clamp(1.1rem, 2vw, 1.58rem); font-weight: 800; }
.fc .fc-button { border-radius: 10px; box-shadow: none !important; font-weight: 800; }
.fc .fc-button-primary { background: var(--primary); border-color: var(--primary); color: var(--brown-deep); }
.fc .fc-button-primary:hover,
.fc .fc-button-primary:focus,
.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.fc .fc-button-primary:disabled { background: #e9c3ac; border-color: #e9c3ac; color: #765c54; opacity: 1; }
.fc-theme-standard th,
.fc-theme-standard td,
.fc-theme-standard .fc-scrollgrid { border-color: var(--border-soft); }
.fc .fc-col-header-cell { background: #fff8ef; }
.fc .fc-col-header-cell-cushion { padding: 9px 4px; color: var(--brown); text-decoration: none; font-size: .88rem; }
.fc .fc-daygrid-day-number { padding: 7px 8px; color: var(--brown); text-decoration: none; font-weight: 700; }
.fc .fc-daygrid-day-frame { min-height: 96px; }
.fc .fc-daygrid-event {
    cursor: pointer;
    padding: 4px 6px;
    border: 0;
    border-radius: 7px;
    background: var(--primary);
    color: var(--brown-deep);
    box-shadow: 0 2px 5px rgba(92, 59, 45, .14);
}
.fc .fc-daygrid-event:hover { background: #ff8240; filter: none; }
.fc .fc-event-time,
.fc .fc-event-title { font-weight: 800; }
.fc .fc-daygrid-day.fc-day-today { background: #fff2e7; }
.fc .fc-day-sun .fc-daygrid-day-number,
.fc .fc-col-header-cell.fc-day-sun .fc-col-header-cell-cushion { color: #c84848; }
.fc .fc-day-sat .fc-daygrid-day-number,
.fc .fc-col-header-cell.fc-day-sat .fc-col-header-cell-cushion { color: #4776b8; }
.fc .fc-more-link { color: var(--primary-dark); font-weight: 800; }
.fc .fc-popover { border-color: var(--border); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.fc .fc-popover-header { background: var(--primary-soft); }

/* フッター */
.site-footer {
    min-height: 126px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background-color: #8A7F73 !important;
    color: #ffffff;
    border-top: 1px solid #FF954F;
}
.footer-copyright {
    width: min(100%, 1000px);
    margin: 0 auto;
    padding: 0 20px;
    background: transparent;
    color: #ffffff;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
}

/* 管理画面 */
.admin-body { min-height: 100vh; background: #fffaf4; }
.admin-header { padding: 22px 0; background: #fff; border-bottom: 4px solid var(--primary); box-shadow: 0 6px 20px rgba(76, 55, 51, .05); }
.admin-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.admin-header h1 { margin: 2px 0 0; color: var(--brown); line-height: 1.2; }
.admin-header nav,
.form-actions,
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.admin-main { padding: 34px 0 72px; }
.admin-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 20px; }
.admin-toolbar h2,
.admin-toolbar p { margin: 0; }
.auth-card { width: min(460px, calc(100% - 32px)); margin: 8vh auto; padding: 32px; border-top: 5px solid var(--primary); }
.auth-card h1 { margin-top: 4px; }
label { display: block; margin-bottom: 20px; font-weight: 700; }
input[type="text"],
input[type="password"],
input[type="date"],
input[type="time"],
input[type="file"],
textarea {
    width: 100%;
    margin-top: 7px;
    padding: 12px 13px;
    border: 1px solid #dfc1af;
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    font: inherit;
}
textarea { resize: vertical; }
input:focus,
textarea:focus { outline: 3px solid rgba(255, 145, 77, .18); border-color: var(--primary); }
small { display: block; margin-top: 6px; color: var(--muted); font-weight: 400; }
.event-form { padding: 28px; }
.form-grid.two { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.required { margin-left: 6px; color: var(--danger); font-size: .75rem; }
.check-line { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.check-line input { width: auto; }
.publish-check { margin: 24px 0; }
.admin-preview { display: block; width: min(100%, 360px); max-height: 250px; object-fit: cover; margin: 12px 0; border-radius: 10px; border: 1px solid var(--border); }
.admin-preview.wide { width: min(100%, 520px); }
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 16px;
    border: 1px solid transparent;
    border-radius: 10px;
    text-decoration: none;
    cursor: pointer;
    font-weight: 800;
    font-size: .94rem;
}
.button.primary { background: var(--primary); color: var(--brown-deep); }
.button.primary:hover { background: var(--primary-dark); color: #fff; }
.button.secondary { background: #fff; color: var(--text); border-color: #ddc2b2; }
.button.secondary:hover { background: #fff7f0; }
.button.ghost { background: transparent; color: var(--text); border-color: transparent; }
.button.danger { background: #fff1f1; color: var(--danger); border-color: #efbaba; }
.button.small { min-height: 34px; padding: 6px 10px; font-size: .84rem; }
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 700px; }
.admin-table th,
.admin-table td { padding: 15px 16px; border-bottom: 1px solid var(--border-soft); text-align: left; vertical-align: middle; }
.admin-table th { background: #fff5eb; color: var(--brown); font-size: .86rem; }
.admin-table tr:last-child td { border-bottom: 0; }
.actions form { margin: 0; }
.status { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: .78rem; font-weight: 800; }
.status.published { background: #e5f5e7; color: #276638; }
.status.draft { background: #ece7e4; color: #64544f; }
.empty-cell { text-align: center !important; color: var(--muted); }
.alert { margin-bottom: 18px; padding: 12px 14px; border-radius: 10px; }
.alert.success { background: #e5f5e7; color: #276638; }
.alert.error { background: #fde7e7; color: #8c2d2d; }

@media (max-width: 991px) {
    .site-header.is-scrolled {
        box-shadow: none;
    }
    .site-header.is-scrolled .site-header-brand-area {
        display: block;
    }
    .site-header.is-scrolled .site-navigation,
    .site-header.is-scrolled .global-nav {
        flex-basis: auto;
        margin-inline: 0;
    }
    .site-header-inner {
        width: 100%;
        min-height: 64px;
        padding: 0 14px;
        align-items: center;
    }
    .site-header.is-scrolled .site-header-inner { min-height: 64px; }
    .site-header-brand-area {
        flex: 1 1 auto;
        height: 64px;
    }
    .site-header-brand-wrap {
        padding: 5px 0;
    }
    .site-brand-logo { width: 149px; }
    .nav-toggle {
        display: inline-flex;
        position: relative;
        z-index: 1002;
        flex: 0 0 auto;
    }
    .site-navigation,
    .global-nav {
        position: fixed;
        inset: 65px 0 auto;
        z-index: 1001;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        flex-basis: auto;
        width: 100%;
        max-height: calc(100vh - 65px);
        overflow-y: auto;
        background: #8A7F73;
        box-shadow: 0 12px 24px rgba(44, 33, 26, .18);
        transform: translateY(-12px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
    }
    .site-navigation.is-open,
    .global-nav.is-open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    .site-navigation a,
    .global-nav a {
        flex: none;
        min-height: 56px;
        justify-content: flex-start;
        padding: 0 22px;
        border-bottom: 1px solid rgba(255, 255, 255, .12);
        font-size: .98rem;
    }
    .site-navigation a:hover,
    .site-navigation a:focus-visible,
    .site-navigation a.is-current,
    .global-nav a:hover,
    .global-nav a:focus-visible,
    .global-nav a.is-current {
        background: rgba(255, 255, 255, .08);
        border-bottom-color: rgba(255, 255, 255, .12);
    }
    .feature-grid { grid-template-columns: 1fr; gap: 16px; }
}


@media (max-width: 720px) {
    .site-footer { min-height: 112px; }
    .footer-copyright { font-size: 12px; }
    .container { width: min(100% - 20px, 1000px); }
    .brand-intro { padding: 22px 0 12px; }
    .brand-intro-inner { width: min(100% - 20px, 1000px); }
    .brand-intro-inner p { font-size: .88rem; line-height: 1.85; }
    .public-main { padding: 12px 0 62px; }
    .event-detail-section { margin-top: 42px; }
    .calendar-card { padding: 10px; border-radius: 15px; }
    .event-detail-inner,
    .event-form,
    .auth-card { padding: 21px; }
    .event-detail::before { width: 5px; }
    .event-main-image { border-radius: 12px; margin-bottom: 22px; }
    .form-grid.two { grid-template-columns: 1fr; gap: 0; }
    .admin-header-inner,
    .admin-toolbar { align-items: flex-start; flex-direction: column; }
    .fc .fc-toolbar { gap: 8px; align-items: center; }
    .fc .fc-toolbar-chunk { display: flex; }
    .fc .fc-button { padding: .36em .55em; font-size: .82rem; }
    .fc .fc-toolbar-title { font-size: 1.03rem; }
    .fc .fc-col-header-cell-cushion { padding: 7px 2px; font-size: .74rem; }
    .fc .fc-daygrid-day-number { padding: 5px; font-size: .78rem; }
    .fc .fc-daygrid-day-frame { min-height: 74px; }
    .fc .fc-event-title,
    .fc .fc-event-time { font-size: .68rem; }
    .fc .fc-daygrid-event { padding: 3px 4px; white-space: normal; }
}


@media (max-width: 390px) {
    .site-brand-logo { width: 142px; }
    .nav-toggle { right: 8px; padding-inline: 5px; }
    .nav-toggle > span:last-child { display: none; }
    .fc .fc-toolbar { flex-wrap: wrap; }
    .fc .fc-toolbar-chunk:nth-child(2) { order: -1; width: 100%; justify-content: center; }
}

