body {
    font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Meiryo", "Yu Gothic", "YuGothic", "MS PGothic", sans-serif;
    background: #f4f6f8;
    color: #1c1c1c;
    margin: 0;
}

body, input, button, select, textarea, h1, h2, h3, h4, h5, h6, p, a, span, label, table, th, td, li {
    font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Meiryo", "Yu Gothic", "YuGothic", "MS PGothic", sans-serif;
}

* {
    font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Meiryo", "Yu Gothic", "YuGothic", "MS PGothic", sans-serif !important;
}

body.admin-bg {
    background: #fdf1e7;
}

body.user-bg {
    font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Meiryo", "Yu Gothic", "YuGothic", "MS PGothic", sans-serif;
    background-color: #e8f6ff;
    color: #1d2333;
    background-image:
        radial-gradient(circle at 18% 14%, rgba(255, 168, 210, 0.35), transparent 45%),
        radial-gradient(circle at 82% 12%, rgba(120, 210, 255, 0.35), transparent 48%),
        radial-gradient(circle at 70% 80%, rgba(255, 240, 170, 0.35), transparent 50%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.65), rgba(232, 246, 255, 0.95));
    background-size: auto, auto, auto;
}

.container {
    width: min(1100px, 92vw);
    margin: 0 auto;
}

.site-header {
    background: #132238;
    color: #fff;
    padding: 16px 0;
    margin-bottom: 24px;
}

.user-bg .site-header {
    background: #cfeeff;
    border-bottom: 2px solid #a8ddff;
}

.admin-bg .site-header {
    background: #ffffff;
    color: #1c1c1c;
    border-bottom: 2px solid #e2e8f0;
}

.admin-bg .site-header nav a {
    color: #1c1c1c;
}

.site-header .logo {
    font-weight: 700;
    font-size: 20px;
}

.user-bg .site-header .logo {
    color: #000;
    font-size: 30px;
}

.site-disclaimer {
    margin: 6px 0 0;
    font-size: 16px;
    line-height: 1.45;
    color: #000;
}

.disclaimer-alert {
    color: #d11a2a;
    font-weight: 700;
}

.auth-page .site-header {
    margin-bottom: 0;
}

.site-header nav a {
    color: #fff;
    text-decoration: none;
    margin-left: 16px;
}

.user-bg .site-header nav .nav-button {
    background: #ffffff;
    color: #1c1c1c;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 700;
    border: 1px solid #b9ddff;
}

.footer-logout {
    margin: 24px 0 8px;
    text-align: center;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-logout .nav-button {
    background: #0b4b9e;
    color: #fff;
    padding: 8px 16px;
    border-radius: 999px;
    text-decoration: none;
    display: inline-block;
    font-weight: 700;
}

.card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
}

.user-bg .card {
    background: #ffffff;
    border: 1px solid #cfe9ff;
    color: #1d2333;
    box-shadow: 0 16px 30px rgba(31, 74, 120, 0.16);
}

form label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

form {
    max-width: 100%;
}

form input, form select, form textarea {
    width: 100%;
    max-width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    margin-bottom: 12px;
    box-sizing: border-box;
    display: block;
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px 16px;
    margin-bottom: 12px;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.option-item input[type="checkbox"] {
    width: auto;
    margin: 0;
}

button {
    background: #2b5fd9;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-danger {
    background: #d11a2a;
    box-shadow: 0 8px 16px rgba(209, 26, 42, 0.3);
}

.btn-danger:hover {
    filter: brightness(1.05);
}

.user-bg button {
    background: #4c7dff;
    color: #ffffff;
    box-shadow: 0 10px 18px rgba(76, 125, 255, 0.35);
}

button:hover,
.nav-button:hover,
.ghost-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
    filter: brightness(1.03);
}

button:active,
.nav-button:active,
.ghost-button:active {
    transform: translateY(0);
    box-shadow: none;
}

.nav-button,
.ghost-button {
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.auth-page {
    --auth-accent: #ff6b00;
    --auth-accent-2: #00c6ff;
    --auth-accent-3: #6a00ff;
    --auth-ink: #0b1b3a;
    --auth-glass: rgba(255, 255, 255, 0.75);
    --auth-glass-strong: rgba(255, 255, 255, 0.85);
    background-color: #e8f6ff;
    background-image:
        radial-gradient(circle at 18% 14%, rgba(255, 107, 0, 0.25), transparent 45%),
        radial-gradient(circle at 82% 12%, rgba(0, 198, 255, 0.25), transparent 48%),
        radial-gradient(circle at 70% 80%, rgba(255, 209, 102, 0.3), transparent 50%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(232, 246, 255, 0.95));
    background-size: auto, auto, auto;
}

.auth-page .site-header {
    background: transparent;
    border-bottom: none;
}

.auth-page .site-header nav a {
    color: #e8f4ff;
}

.page-notice {
    width: min(980px, 92%);
    margin: 0 auto 1px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #dbe6f3;
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: 0 12px 26px rgba(3, 30, 73, 0.16);
}

.page-notice h3 {
    margin: 0 0 8px;
}

.page-notice-lines p {
    margin: 0 0 6px;
}

.page-notice-lines p:last-child {
    margin-bottom: 0;
}

.notice-red {
    color: #d11a2a;
    font-weight: 700;
}

.notice-blue {
    color: #1d4ed8;
    font-weight: 700;
}

.notice-gold {
    color: #b45309;
    font-weight: 700;
}

@media (max-width: 720px) {
    .page-notice-lines .notice-red {
        color: #d11a2a !important;
    }
    .page-notice-lines .notice-blue {
        color: #1d4ed8 !important;
    }
    .page-notice-lines .notice-gold {
        color: #b45309 !important;
    }
}

.notice-preview {
    margin-top: 16px;
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
}

.notice-preview h3 {
    margin: 0 0 8px;
}

.notice-preview-body {
    font-size: 14px;
    color: #1f2937;
}

.notice-preview-note {
    margin: 10px 0 0;
    font-size: 12px;
    color: #64748b;
}

.notice-template-form {
    margin-top: 12px;
}

.notice-template-compact {
    gap: 8px;
    align-items: center;
}

.notice-template-compact label {
    margin-bottom: 0;
    font-size: 13px;
}

.notice-template-compact select {
    max-width: 320px;
}

.admin-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.auth-page .auth-card {
    margin-top: 1px;
}

.auth-shell {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    width: min(980px, 94vw);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(233, 247, 255, 0.85));
    color: var(--auth-ink);
    border: 1px solid rgba(7, 23, 61, 0.08);
    border-radius: 18px;
    box-shadow: 0 30px 60px rgba(3, 30, 73, 0.35);
    overflow: hidden;
    animation: auth-fade 0.8s ease-out forwards;
    transform: translateY(8px);
    opacity: 0;
}

.auth-card--scene {
    position: relative;
    padding: 0;
    background: #f5f9ff;
    overflow: hidden;
}

.auth-card--scene::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 107, 0, 0.15), transparent 40%),
        radial-gradient(circle at 80% 10%, rgba(0, 198, 255, 0.2), transparent 45%),
        radial-gradient(circle at 70% 80%, rgba(106, 0, 255, 0.15), transparent 45%);
    animation: scene-glow 8s ease-in-out infinite alternate;
    z-index: 1;
}

.auth-card--scene::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("fx-photo.svg") center/cover no-repeat;
    opacity: 0.2;
    z-index: 0;
}

.auth-scene {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: stretch;
    padding: 26px;
}

.auth-illustration {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(232, 246, 255, 0.85));
    border-radius: 18px;
    padding: 0;
    box-shadow: 0 20px 40px rgba(10, 40, 80, 0.25);
    overflow: hidden;
    min-height: 360px;
}

.auth-illustration-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: left center;
}

.auth-panels {
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: center;
}

.auth-panel {
    background: var(--auth-glass);
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 16px 30px rgba(3, 30, 73, 0.2);
    backdrop-filter: blur(6px);
    animation: fade-rise 0.8s ease-out forwards;
    opacity: 0;
    transform: translateY(12px);
    width: min(920px, 100%);
}

.auth-panel-login {
    animation-delay: 0.1s;
}

.auth-panel-notice {
    animation-delay: 0.25s;
}

.auth-panel h1 {
    text-align: center;
    margin-top: 0;
}

.auth-panel .page-notice-lines {
    text-align: left;
}

.auth-split {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
}

.auth-single.auth-split {
    flex-direction: column;
}
.auth-single.auth-split {
    flex-direction: row;
    padding: 0;
    gap: 0;
    align-items: stretch;
}

.auth-content.auth-content-left,
.auth-content.auth-content-right {
    flex: 1;
    margin: 0;
    border-radius: 0;
    background: var(--auth-glass);
    padding: 14px 16px;
    min-height: 440px;
    z-index: 2;
    max-width: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.auth-content.auth-content-right {
    min-height: 220px;
}

.auth-content.auth-content-left {
    transform: scale(0.9) translateX(5px);
    transform-origin: center;
}

.auth-content.auth-content-right {
    transform: scale(0.9) translateX(-5px);
    transform-origin: center;
}

.auth-content.auth-content-left,
.auth-content.auth-content-right {
    transform: scale(0.9);
    transform-origin: center;
}

.auth-content.auth-content-left {
    border-right: 1px solid rgba(219, 230, 243, 0.8);
}

.auth-content.auth-content-right {
    text-align: left;
    align-items: stretch;
}

.auth-content.auth-content-right h1 {
    text-align: center;
}

.auth-content.auth-content-right .page-notice-lines {
    text-align: left;
    width: 100%;
}

.auth-layout {
    display: flex;
    align-items: stretch;
}

.auth-layout.auth-split {
    flex-direction: column;
}

.auth-visual {
    width: 100%;
    max-width: none;
    height: auto;
    object-fit: cover;
    border-radius: 0;
    box-shadow: 0 12px 22px rgba(3, 30, 73, 0.35);
    align-self: center;
}

.auth-card h1 {
    text-align: center;
    margin-top: 0;
}

.auth-form label {
    color: var(--auth-ink);
}

.auth-form input {
    background: #ffffff;
    border: 1px solid #cfe0f2;
    color: #10325c;
}

.auth-submit {
    width: 100%;
    background: linear-gradient(135deg, var(--auth-accent), #ff9f1c);
    box-shadow: 0 10px 18px rgba(255, 107, 0, 0.35);
}

.auth-content {
    max-width: 440px;
    margin: 0 auto;
}

.auth-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.auth-box {
    background: linear-gradient(135deg, #1488ff, #2bb7ff);
    border-radius: 14px;
    padding: 16px;
    color: #eaf5ff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-box h3 {
    margin-top: 0;
}

.ghost-button {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    background: #fff2e6;
    color: #9a3f00;
    text-decoration: none;
    font-weight: 700;
}

.auth-card p {
    margin: 0 0 10px;
}

.auth-single {
    flex-direction: column;
    gap: 18px;
    padding: 28px;
    position: relative;
    min-height: 560px;
    justify-content: center;
    align-items: center;
}

.auth-visual-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 97%;
    height: 92%;
    transform: translate(-50%, -50%);
    border-radius: 16px;
    z-index: 1;
    object-position: center;
}

.auth-single .auth-content {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.8);
    padding: 20px 22px;
    border-radius: 16px;
    box-shadow: 0 16px 32px rgba(3, 30, 73, 0.2);
    text-align: left;
}

@keyframes auth-fade {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes scene-glow {
    0% {
        opacity: 0.6;
    }
    100% {
        opacity: 1;
    }
}

@keyframes fade-rise {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 860px) {
    .auth-card {
        width: min(860px, 92vw);
    }

    .auth-layout {
        flex-direction: column;
    }

    .auth-scene {
        grid-template-columns: 1fr;
    }

    .auth-content.auth-content-left {
        order: 1;
    }

    .auth-content.auth-content-right {
        order: 2;
    }

    .auth-panel {
        padding: 22px;
    }
}

@media (max-width: 720px) {
    .container {
        width: min(100%, 92vw);
    }

    .site-header .logo {
        font-size: 20px;
    }

    .user-bg .site-header .logo {
        font-size: 22px;
    }

    .site-disclaimer {
        font-size: 14px;
    }

    .card {
        padding: 16px;
    }

    .auth-card {
        border-radius: 14px;
    }

    .auth-card--scene {
        width: min(560px, 98vw);
    }

    .auth-scene {
        padding: 5px;
    }

    .auth-single {
        padding: 20px;
        min-height: 520px;
    }

    .auth-visual-bg {
        width: 100%;
        height: 88%;
    }


    .auth-options {
        grid-template-columns: 1fr;
    }

    .option-grid {
        grid-template-columns: 1fr;
    }

    .footer-logout .nav-button,
    button {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .site-header {
        padding: 12px 0;
    }

    .site-disclaimer {
        font-size: 13px;
    }

    .auth-single .auth-content {
        padding: 16px;
    }

    .auth-box {
        padding: 14px;
    }

    .auth-content.auth-content-left {
        font-size: 14px;
    }

    .auth-content.auth-content-left h1 {
        font-size: 18px;
    }

    .auth-content.auth-content-left label {
        font-size: 12px;
    }

    .auth-content.auth-content-left input,
    .auth-content.auth-content-left button {
        font-size: 14px;
    }

    .auth-content.auth-content-left .auth-box h3 {
        font-size: 14px;
    }

    .auth-content.auth-content-left .auth-box p,
    .auth-content.auth-content-left .ghost-button {
        font-size: 12px;
    }

    .card h1,
    .card h2 {
        font-size: 18px;
        white-space: nowrap;
    }

    .table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

@media (min-width: 901px) {
    .auth-panels {
        align-items: center;
    }

    .auth-panel {
        width: min(600px, 100%);
    }
}

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

.table th, .table td {
    padding: 10px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

.user-table-scroll {
    max-height: 240px;
    overflow-y: auto;
    border-radius: 8px;
}

.user-table-scroll .table {
    margin-bottom: 0;
}

.notice {
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.notice.success {
    background: #dcfce7;
    color: #166534;
}

.notice.error {
    background: #fee2e2;
    color: #991b1b;
}

.star-red {
    color: #d11a2a;
}
