[data-theme] {
    --theme-primary: #2357a5; --theme-deep: #143c78; --theme-accent: #256eaf;
    --theme-tint: #eaf0f8; --theme-surface: #f5f7fb; --theme-border: #dce5f1; --theme-ink: #22344c;
}
[data-theme="innovation"] { --theme-primary: #6741bb; --theme-deep: #282252; --theme-accent: #8059ce; --theme-tint: #eee9fb; --theme-surface: #f6f4fc; --theme-border: #e2d9f5; --theme-ink: #302748; }
[data-theme="nature"] { --theme-primary: #286348; --theme-deep: #173e31; --theme-accent: #458364; --theme-tint: #e9efe4; --theme-surface: #f7f6ef; --theme-border: #d9e3d2; --theme-ink: #283d30; }
[data-theme="contemporary"] { --theme-primary: #087c83; --theme-deep: #163e50; --theme-accent: #11989b; --theme-tint: #e1f2f2; --theme-surface: #f2f8f9; --theme-border: #cee5e8; --theme-ink: #213d48; }
[data-theme="ceremony"] { --theme-primary: #843346; --theme-deep: #4b2333; --theme-accent: #a25569; --theme-tint: #f4e9e8; --theme-surface: #fbf8f2; --theme-border: #e7dcd3; --theme-ink: #482e35; }
.public-site {
    --bs-primary: var(--theme-primary); --bs-primary-rgb: 35,87,165;
    --bs-link-color: var(--theme-primary); --bs-link-hover-color: var(--theme-deep);
    background: var(--theme-surface); color: var(--theme-ink);
}
.public-site[data-theme="innovation"] { --bs-primary-rgb: 103,65,187; --bs-link-color-rgb: 103,65,187; --bs-link-hover-color-rgb: 40,34,82; }
.public-site[data-theme="nature"] { --bs-primary-rgb: 40,99,72; --bs-link-color-rgb: 40,99,72; --bs-link-hover-color-rgb: 23,62,49; }
.public-site[data-theme="contemporary"] { --bs-primary-rgb: 8,124,131; --bs-link-color-rgb: 8,124,131; --bs-link-hover-color-rgb: 22,62,80; }
.public-site[data-theme="ceremony"] { --bs-primary-rgb: 132,51,70; --bs-link-color-rgb: 132,51,70; --bs-link-hover-color-rgb: 75,35,51; }
.public-site .btn-primary { --bs-btn-bg: var(--theme-primary); --bs-btn-border-color: var(--theme-primary); --bs-btn-hover-bg: var(--theme-deep); --bs-btn-hover-border-color: var(--theme-deep); --bs-btn-active-bg: var(--theme-deep); --bs-btn-active-border-color: var(--theme-deep); }
.public-site .btn-outline-primary { --bs-btn-color: var(--theme-primary); --bs-btn-border-color: var(--theme-primary); --bs-btn-hover-bg: var(--theme-primary); --bs-btn-hover-border-color: var(--theme-primary); --bs-btn-active-bg: var(--theme-deep); --bs-btn-active-border-color: var(--theme-deep); }
.public-site .navbar .nav-link.active, .public-site .home-guide-number, .public-site .guide-aside [aria-current="location"] { color: var(--theme-primary); background: var(--theme-tint); }
.public-site .card, .public-site .public-subnav, .public-site .guide-aside .list-group-item { border-color: var(--theme-border); }
.public-site .public-subnav { background: var(--theme-tint); }
.public-site .public-subnav-icon, .public-site .guide-section summary::after { color: var(--theme-primary); }
.public-site .public-subnav .public-subnav-link { color: var(--theme-ink); }
.public-site .public-subnav .public-subnav-link.active { color: #fff; background: var(--theme-primary); border-color: var(--theme-primary); box-shadow: 0 3px 8px #00000018; }
.public-site .public-subnav-link.active .public-subnav-icon { color: inherit; }
.public-site .public-subnav .public-subnav-link.active:hover { background: var(--theme-deep); }
.public-site .hero { background: linear-gradient(125deg, var(--theme-deep), var(--theme-accent)); }
.public-site .hero .hero-certificate-closed { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; opacity: .78; border-style: dashed; }
.hero-certificate-closed svg { flex-shrink: 0; }
.public-site[data-theme="academic"] .home-guide-card { background: linear-gradient(145deg, #ffffffde, #edf4fc9e); box-shadow: 0 10px 28px #163e7310, inset 0 1px 0 #fff; border-color: #d0dfef; }
.public-site[data-theme="academic"] .home-guide-number { background: #ffffffb3; box-shadow: inset 0 0 0 1px #d6e3f3; }
.public-site .form-control:focus, .public-site .form-select:focus { border-color: var(--theme-primary); box-shadow: 0 0 0 .2rem var(--theme-tint); }
.public-site .table { --bs-table-color: var(--theme-ink); --bs-table-hover-bg: var(--theme-tint); }
.public-site .table th { background: var(--theme-tint); }
.public-site .pagination { --bs-pagination-active-bg: var(--theme-primary); --bs-pagination-active-border-color: var(--theme-primary); --bs-pagination-color: var(--theme-primary); }
.public-site .nav-tabs { --bs-nav-link-color: var(--theme-primary); }
.public-site .static-content .list-group-item.active { background: var(--theme-primary); border-color: var(--theme-primary); }
.public-site[data-theme="innovation"] .hero { border-radius: 1.5rem 1.5rem 4rem 1.5rem; background: radial-gradient(ellipse at top right, #a28bde55, transparent 60%), linear-gradient(135deg, #282252, #543488); border: 1px solid #ffffff55; }
.public-site[data-theme="innovation"] .hero h1 { max-width: 24ch; font-size: clamp(2rem, 5vw, 3.6rem); }
.public-site[data-theme="innovation"] .home-guide-card { border-top: 4px solid var(--theme-primary); }
.public-site[data-theme="nature"] .hero { color: var(--theme-deep); background: radial-gradient(ellipse at top right, #bfd3b5, transparent 65%), #e7eddf; border: 1px solid var(--theme-border); border-radius: 2.5rem .8rem 2.5rem .8rem; }
.public-site[data-theme="nature"] .hero .btn-outline-light { --bs-btn-color: var(--theme-deep); --bs-btn-border-color: var(--theme-primary); --bs-btn-hover-bg: var(--theme-primary); --bs-btn-hover-border-color: var(--theme-primary); --bs-btn-hover-color: #fff; }
.public-site[data-theme="nature"] .hero .btn-light { --bs-btn-color: #fff; --bs-btn-bg: var(--theme-primary); --bs-btn-border-color: var(--theme-primary); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--theme-deep); }
.public-site[data-theme="nature"] .home-guide-card { border-radius: 2rem; background: linear-gradient(145deg, #fffef9, #f1f5eb); box-shadow: 0 8px 24px #274e3608; }
.public-site[data-theme="nature"] .home-guide-card .card-body { padding: 2rem; }
.public-site[data-theme="contemporary"] .hero { border-radius: .7rem; border-left: 8px solid #54d2cb; }
.public-site[data-theme="contemporary"] .hero .hero-content > .badge { display: table; padding: .8rem 1rem; border-radius: .4rem; color: var(--theme-deep) !important; }
.public-site[data-theme="contemporary"] .home-guide > .row > div { width: 100%; }
.public-site[data-theme="contemporary"] .home-guide-card { border-left: 3px solid #4dbbb9; box-shadow: 0 6px 18px #123e5008; }
.public-site[data-theme="contemporary"] .home-guide-card .card-body { display: grid; grid-template-columns: 3rem minmax(0, 1fr) minmax(200px, .7fr); column-gap: 1.25rem; }
.public-site[data-theme="contemporary"] .home-guide-number { grid-column: 1; grid-row: 1 / 3; }
.public-site[data-theme="contemporary"] .home-guide-card h3 { margin-top: 0 !important; grid-column: 2; }
.public-site[data-theme="contemporary"] .home-guide-card p { grid-column: 2; margin-bottom: 0; }
.public-site[data-theme="contemporary"] .home-guide-card ul { grid-column: 3; grid-row: 1 / 3; align-self: center; }
.public-site[data-theme="ceremony"] .hero { text-align: center; border: 1px solid #bb9656; border-radius: .6rem; background: linear-gradient(150deg, #452330, #773a4a); }
.public-site[data-theme="ceremony"] .hero::before { content: ''; display: block; width: 64px; height: 3px; margin: 0 auto 1.5rem; background: #dfc084; }
.public-site[data-theme="ceremony"] .hero .d-flex { justify-content: center; }
.public-site[data-theme="ceremony"] .hero h1 { max-width: 30ch; margin-inline: auto; }
.public-site[data-theme="ceremony"] .home-guide-card { border-radius: .6rem; border-top: 3px solid #c0a36e; box-shadow: none; }
.public-site[data-theme="ceremony"] .home-guide { text-align: center; }
.public-site[data-theme="ceremony"] .home-guide-number { margin-inline: auto; color: #765325; background: #f4eddc; }
.welcome-poster.fade { transition: opacity .24s ease-in-out; }
.welcome-poster.fade .modal-dialog { transform: translateY(12px) scale(.992); transition: transform .24s cubic-bezier(.22, .61, .36, 1); }
.welcome-poster.show .modal-dialog { transform: none; }
.welcome-poster .modal-content { border: 0; }
.welcome-poster .modal-header { align-items: flex-start; gap: 1rem; padding: 1.1rem clamp(1rem, 3vw, 2.5rem); background: linear-gradient(120deg, #fff, var(--theme-surface, #f5f7fb)); border-bottom: 1px solid var(--theme-border, #dce5f1); }
.welcome-poster .modal-header > div { min-width: 0; }
.welcome-poster .modal-title { color: #22344c; }
.welcome-poster .modal-header .btn-close { flex-shrink: 0; box-sizing: border-box; width: 44px; height: 44px; margin: 0 0 0 auto; padding: 0; opacity: .85; background-color: var(--theme-tint, #eaf0f8); background-size: 14px; border: 1px solid var(--theme-border, #dce5f1); border-radius: 50%; transition: background-color .18s ease, box-shadow .18s ease, transform .18s ease, opacity .18s ease; }
.welcome-poster .modal-header .btn-close:hover { opacity: 1; transform: translateY(-1px); background-color: var(--theme-border, #dce5f1); box-shadow: 0 4px 12px #22344c12; }
.welcome-poster .modal-header .btn-close:focus-visible { opacity: 1; outline: 3px solid var(--theme-primary, #2357a5); outline-offset: 3px; box-shadow: none; }
.welcome-poster .modal-body { display: flex; flex-direction: column; background: radial-gradient(ellipse at top, #34465e, #192535 75%); text-align: center; padding: clamp(1rem, 2vw, 1.5rem); }
.welcome-poster-image { flex-shrink: 0; align-self: center; max-width: 100%; width: auto; height: auto; margin: auto; border-radius: .65rem; box-shadow: 0 18px 60px #00000030; }
.welcome-poster-image:not([hidden]) { display: block; max-width: min(100%, 1000px); }
.welcome-poster .modal-footer { background: #fff; justify-content: space-between; gap: .75rem; padding: 1rem clamp(1rem, 3vw, 2.5rem); padding-bottom: max(1rem, env(safe-area-inset-bottom)); border-top: 1px solid var(--theme-border, #dce5f1); }
.welcome-poster .modal-footer .btn { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 44px; padding-inline: 1.25rem; border-radius: 999px; }
.welcome-poster-enter { box-shadow: 0 4px 14px #22344c18; }
.welcome-poster-enter svg { flex-shrink: 0; transition: transform .18s ease; }
.welcome-poster-enter:hover svg { transform: translateX(3px); }
@media (max-width: 767.98px) {
    .public-site[data-theme="contemporary"] .home-guide-card .card-body { grid-template-columns: 2.5rem minmax(0, 1fr); gap: .25rem 1rem; }
    .public-site[data-theme="contemporary"] .home-guide-card ul { grid-column: 2; grid-row: auto; }
    .welcome-poster .modal-header { padding: .8rem; }
    .welcome-poster .modal-header p { font-size: .75rem; }
    .welcome-poster .modal-body { padding: .5rem; }
    .welcome-poster .modal-footer .btn { flex: 1; padding-inline: .5rem; }
}
@media (prefers-reduced-motion: reduce) {
    .welcome-poster.fade, .welcome-poster.fade .modal-dialog, .welcome-poster .modal-header .btn-close, .welcome-poster-enter svg { transition: none; }
    .welcome-poster.fade .modal-dialog, .welcome-poster .modal-header .btn-close:hover, .welcome-poster-enter:hover svg { transform: none; }
}
@media print { .public-site { background: #fff; color: #000; } }
