:root {
    --temple-primary: #9A3B3B;
    --temple-gold: #FFC107;
    --temple-bg: #F8F5F2;
}

body {
    background-color: var(--temple-bg);
    font-family: "Microsoft JhengHei", sans-serif;
    font-size: 13pt;
    color: #444;
    line-height: 1.6;
}

/* 13pt 行政標準與無底線規範 */
a {
    text-decoration: none !important;
    transition: 0.3s;
}

/* Common Header/Logo Styles */
.header-logo {
    max-width: 280px;
    width: 100%;
    height: auto;
}

.animated {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Common Button Styles */
.btn-temple-primary {
    background: var(--temple-primary) !important;
    color: white !important;
    border: none !important;
    padding: 14px !important;
    border-radius: 12px !important;
    font-weight: bold !important;
    font-size: 13pt !important;
    box-shadow: 0 4px 15px rgba(154, 59, 59, 0.2);
    transition: 0.3s;
}

.btn-temple-primary:hover {
    background: #7d2f2f !important;
    color: #fff !important;
    transform: translateY(-2px);
}

.btn-temple-outline {
    color: var(--temple-primary) !important;
    border: 2px solid var(--temple-primary) !important;
    padding: 12px !important;
    border-radius: 12px !important;
    font-weight: bold !important;
}

/* Common Form Styles */
.form-label {
    font-weight: bold;
    color: #555;
    margin-bottom: 8px;
}

.form-control,
.form-select {
    border: 2px solid #eee;
    border-radius: 12px;
    padding: 12px;
    font-size: 1.1rem;
    transition: 0.3s;
}

.form-control-lg {
    border-radius: 12px;
    border: 1px solid #DDD;
    font-size: 13pt;
}

.form-control:focus,
.form-select:focus,
.form-control-lg:focus {
    border-color: var(--temple-primary);
    box-shadow: 0 0 0 0.25rem rgba(154, 59, 59, 0.1);
}

/* Common Elder Select Group */
.elder-select-group {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 10px;
    padding: 5px 12px;
}

.elder-input {
    border: none !important;
    flex: 1;
    box-shadow: none !important;
    background: transparent !important;
    padding: 10px 5px !important;
    font-weight: bold;
    font-size: 14pt;
    width: 100%;
}

.label-hint,
.unit-text {
    background: #fff5f5;
    padding: 12px 15px;
    font-weight: bold;
    color: #dc3545;
    font-size: 13.5pt;
    white-space: nowrap;
}

/* index.php specific styles */
.participant-header {
    background: #F0E6D2;
}

.query-btn {
    background: #fff;
    color: var(--temple-primary);
    border: 2px solid var(--temple-primary);
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.2rem;
    transition: 0.3s;
    text-decoration: none;
}

.query-btn:hover {
    background: var(--temple-primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(154, 59, 59, 0.3);
}

.step-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    max-width: 500px;
    margin: 40px auto 20px;
}

.step-line {
    position: absolute;
    top: 20px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #E0E0E0;
    z-index: 0;
}

.step-item {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 33.33%;
}

.step-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #E0E0E0;
    color: #999;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 1.2rem;
    border: 3px solid #fff;
    transition: 0.3s;
}

.step-label {
    font-size: 0.9rem;
    color: #999;
    font-weight: bold;
}

.step-item.active .step-dot {
    background: var(--temple-primary);
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 0 0 5px rgba(154, 59, 59, 0.1);
}

.step-item.active .step-label {
    color: var(--temple-primary);
}

.temple-grand-seal-v2 {
    position: absolute;
    font-family: "KaiTi", "BiauKai", serif;
    color: #d63333;
    border: 8px solid #d63333;
    width: 160px;
    height: 160px;
    padding: 25px 15px;
    text-align: center;
    font-size: 26px;
    font-weight: 900;
    line-height: 1.3;
    border-radius: 12px;
    transform: rotate(-12deg);
    pointer-events: none;
    letter-spacing: 5px;
    writing-mode: vertical-rl;
    text-orientation: upright;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.line-float-wrapper {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.line-float-wrapper:hover {
    transform: scale(1.05);
}

.line-icon-circle {
    width: 65px;
    height: 65px;
    background-color: #06C755;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(6, 199, 85, 0.4);
    color: #fff;
    font-size: 32px;
    margin-bottom: 5px;
}

.line-text-tag {
    background-color: #333;
    color: #fff;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    font-weight: bold;
    white-space: nowrap;
}

.footer-info {
    margin-top: 50px;
    padding: 30px;
    background: linear-gradient(135deg, #fff 0%, #fefcf9 100%);
    border-left: 5px solid var(--temple-primary);
    border-radius: 12px;
    text-align: center;
}

.footer-address-box a:hover {
    color: #0d6efd !important;
    opacity: 0.8;
}

/* query.php specific styles */
.query-card {
    border: none;
    border-radius: 24px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.08);
}

.alert-lock {
    background: #FDF2F2;
    color: #9A3B3B;
    border: 1px dashed #9A3B3B;
    border-radius: 12px;
    font-size: 11pt;
}

/* 上帝公強效發光動畫規範 */
.deity-animation-container {
    text-align: center;
    padding: 50px 20px;
    background: radial-gradient(circle, rgba(154, 59, 59, 0.05) 0%, transparent 70%);
}

.deity-logo-anim {
    width: 110px;
    height: auto;
    margin-bottom: 25px;
    filter: drop-shadow(0 0 15px rgba(154, 59, 59, 0.6)) drop-shadow(0 0 30px rgba(154, 59, 59, 0.3));
    animation: divineGlow 3.5s infinite ease-in-out;
}

@keyframes divineGlow {

    0%,
    100% {
        transform: translateY(0) scale(1);
        filter: drop-shadow(0 0 15px rgba(154, 59, 59, 0.6)) drop-shadow(0 0 30px rgba(154, 59, 59, 0.3));
    }

    50% {
        transform: translateY(-20px) scale(1.05);
        filter: drop-shadow(0 0 25px rgba(154, 59, 59, 0.9)) drop-shadow(0 0 50px rgba(154, 59, 59, 0.5)) drop-shadow(0 0 10px rgba(255, 215, 0, 0.3));
    }
}

.fail-instruction {
    font-size: 15pt;
    color: #9A3B3B;
    font-weight: 800;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* 刪除安全遮罩規範 */
.admin-dimmer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: none;
    transition: opacity 0.3s;
}

.confirm-dialog-active {
    overflow: hidden;
}

/* edit_member.php specific styles */
.main-container {
    max-width: 700px;
    margin: auto;
    padding-bottom: 50px;
}

.info-header {
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    color: #2e7d32;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 25px;
}

/* append_member.php specific styles */
.addr-hidden {
    display: none;
}

.btn-uniform {
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14pt !important;
    font-weight: bold !important;
    border-radius: 15px !important;
    padding: 10px !important;
}

/* =========================================
   Consolidated Inline Styles (Extracted)
   ========================================= */

/* --- Container & Layout --- */
.container-main {
    max-width: 800px;
    padding-bottom: 70px;
}

.container-query {
    max-width: 600px;
}

.container-append {
    max-width: 800px;
    padding-bottom: 120px;
}

/* --- Header & Logo --- */
.notice-header {
    background: #9A3B3B;
}

.notice-header-title {
    font-size: 13pt;
    opacity: 0.9;
}

.query-logo {
    max-width: 260px;
}

.logo-append {
    max-width: 280px;
}

.page-title {
    color: var(--temple-primary);
    letter-spacing: 2px;
}

/* --- Cards & Alerts --- */
.clean-notice-card {
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
}

.date-box {
    background: #FFF5F5;
    border: 1px solid #FFE0E0;
}

.reminder-box {
    background: #FFF9F0;
    border: 1px solid #FFE4B5;
}

.voucher-card {
    background: #FFF;
    border: 2px solid #F0E6D2;
    border-radius: 16px;
}

.participant-card-rounded {
    border-radius: 20px;
}

.alert-lock-card {
    border: 2px dashed #9A3B3B !important;
}

/* --- Text Typography --- */
.clothes-highlight {
    background: #FFD700;
}

.seal-text {
    letter-spacing: 2px;
}

.date-text {
    font-size: 12pt;
}

.date-highlight {
    font-size: 22pt;
    color: #E63946;
    letter-spacing: 1px;
}

.date-time {
    color: #9A3B3B;
}

.alert-font {
    font-size: 12pt;
}

.service-notes {
    font-size: 12pt;
    color: #555;
    line-height: 1.8;
}

.text-15pt {
    font-size: 15pt;
}

.reminder-list {
    font-size: 12pt;
    line-height: 1.5;
}

.reminder-alert {
    font-size: 12pt;
    border-color: #FFC107 !important;
}

.item-readonly {
    font-size: 14pt;
    border: 1px solid #dc3545;
}

.label-lg-red {
    color: #9A3B3B;
    font-size: 14pt;
}

.btn-font-13 {
    font-size: 13pt;
    font-weight: bold;
    color: #444;
    min-width: 100px;
}

.lock-title {
    color: #9A3B3B;
}

.lock-text {
    font-size: 13pt;
    color: #666;
}

.fail-hint {
    font-size: 13pt;
    color: #666;
    font-weight: 500;
}

/* --- Form Elements --- */
.leap-check {
    transform: scale(1.5);
}

.leap-check-append {
    transform: scale(1.3);
}

.check-label-lg {
    font-size: 13pt;
}

.check-label-lg-pointer {
    font-size: 13pt;
    cursor: pointer;
    color: #333;
}

.copy-check-box {
    cursor: pointer;
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
}

.copy-check-input {
    width: 1.4rem;
    height: 1.4rem;
    cursor: pointer;
    margin-top: 0;
}

.copy-check-label {
    font-size: 13pt;
    cursor: pointer;
    user-select: none;
    padding: 2px 5px;
}

/* --- Footer --- */
.footer-bg {
    background: #FDFDFD;
    border-top: 1px solid #F0F0F0;
}

.footer-link-box {
    text-align: center;
}

.footer-map-link {
    color: #9A3B3B;
    text-decoration: none;
    font-size: 13pt;
    font-weight: bold;
    transition: 0.3s;
}

.footer-map-hint {
    font-size: 10pt;
    color: #888;
    font-weight: normal;
    margin-left: 5px;
}

.copyright-link {
    color: inherit;
}

/* --- Modal & Components --- */
.modal-content-custom {
    border-radius: 24px;
    overflow: hidden;
    border: none;
}

.modal-header-custom {
    background: #444;
}

.modal-success-content {
    border-radius: 24px;
    background: #FDFDFD;
    overflow: hidden;
}

.modal-body-z {
    position: relative;
    z-index: 2;
}

.temple-seal-pos {
    z-index: 5;
    opacity: 0.1;
    top: 20px;
    right: 20px;
}

.icon-lg-success {
    font-size: 3.5rem;
}

.icon-lg-lock {
    font-size: 3rem;
    color: #9A3B3B;
}

.btn-lg-custom {
    font-size: 14pt;
}

.procedure-container {
    max-width: 400px;
}

.btn-trash {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================= */

/* Additional Utility Classes */
.text-temple-red {
    color: #9A3B3B;
}

.text-temple-red-bold {
    color: #9A3B3B;
    font-weight: bold;
}

.text-15pt-h {
    font-size: 15pt;
    line-height: 1.6;
}

.cursor-pointer {
    cursor: pointer;
}

.modal-title-append {
    color: #9A3B3B;
    font-weight: bold;
    font-size: 22pt;
}

.bg-watermark {
    position: absolute;
    right: -10px;
    bottom: -10px;
    opacity: 0.05;
    font-size: 60pt;
    color: #9A3B3B;
    font-weight: bold;
    pointer-events: none;
    transform: rotate(-15deg);
}

.append-name {
    font-size: 16pt;
    letter-spacing: 1px;
}

.text-14pt {
    font-size: 14pt;
}

/* =========================================
   Admin Panel Styles (Consolidated)
   ========================================= */

:root {
    --admin-zoom: 1rem;
    --temple-red: #9A3B3B;
}

/* --- Layout & Navbar --- */
.admin-navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-bottom: 3px solid #dc3545;
}

.reg-group {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 25px;
    border: 1px solid #dee2e6;
    overflow: hidden;
}

.reg-header {
    background: #fdfdfd;
    padding: 0.8rem 1.2rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-card {
    background: #ffffff;
    border-right: 5px solid #198754;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* --- Buttons & Navigation --- */
.admin-nav-btn {
    font-size: 0.95em;
    padding: 5px 15px;
    border-radius: 4px;
    background: #f8f9fa;
    color: #555;
    border: 1px solid #ddd;
    text-decoration: none;
}

.admin-nav-btn.active {
    background: #dc3545;
    color: #fff;
    border-color: #dc3545;
}

.zoom-group {
    display: inline-flex;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
}

.zoom-item {
    border: none;
    background: none;
    padding: 4px 15px;
    cursor: pointer;
    font-weight: bold;
    border-right: 1px solid #eee;
}

/* --- Tags & Highlights --- */
.city-tag {
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 15px;
    padding: 2px 12px;
    font-size: 0.85em;
    margin-right: 8px;
    margin-top: 5px;
    display: inline-block;
    color: #0d6efd;
    text-decoration: none;
}

.city-tag.active {
    background: #0d6efd;
    color: #fff;
    font-weight: bold;
}

.ticket-highlight {
    color: #d63384;
    text-decoration: underline;
    font-weight: 800;
    cursor: pointer;
}

.pager-container {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 8px 20px;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* --- Synchronization Widget --- */
.sync-timer-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #FFF;
    border-radius: 50%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.5s;
    opacity: 0.8;
    cursor: pointer;
}

.sync-timer-container:hover {
    opacity: 1;
    transform: scale(1.1);
}

.progress-ring__circle {
    transition: stroke-dashoffset 0.35s;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    stroke-linecap: round;
}

.sync-text {
    position: absolute;
    font-family: "Arial", sans-serif;
    font-weight: bold;
    font-size: 13pt;
    color: #9A3B3B;
}

.sync-timer-paused .progress-ring__circle {
    stroke: #CCC;
}

.sync-timer-paused .sync-text {
    color: #CCC;
}

/* --- Admin Utility Classes --- */
.admin-body {
    background-color: #f4f7f6;
    font-family: "Microsoft JhengHei", sans-serif;
    font-size: var(--admin-zoom);
    text-align: left;
}

.text-admin-main-title {
    font-size: 13pt;
    letter-spacing: 2px;
}

.text-sm-85 {
    font-size: 0.85rem;
}