* {
    box-sizing: border-box;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
/* ========================================
   無障礙：跳至主要內容區
   ======================================== */

.skip-link {
    position: absolute;
    top: 0;
    left: 0.5rem;

    /* 平常移出畫面，但仍保留在鍵盤 Tab 順序中 */
    transform: translateY(-150%);

    padding: 0.75rem 1rem;

    background-color: #ffffff;
    color: #000000;

    border: 3px solid #0056b3;

    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.5;

    text-decoration: none;

    z-index: 99999;

    transition: transform 0.1s ease;
}


/* 按 Tab 移到快速連結時顯示 */
.skip-link:focus {
    transform: translateY(0);

    outline: 3px solid #0056b3;
    outline-offset: 2px;
}


/* 跳轉後標示主要內容區 */
#main-content:focus {
    outline: 4px solid #0066cc;
    outline-offset: -4px;
}

/* 無障礙：手機版漢堡選單焦點外框 */
#mobile-menu-button:focus-visible {
    outline: 3px solid #005fcc;
    outline-offset: 2px;
}

#mobile-menu .menu a:focus-visible,
#mobile-menu .menu summary:focus-visible,
#mobile-menu .menu button:focus-visible {
    /* 覆寫 DaisyUI menu 的 outline-style: none */
    outline: 3px solid #005fcc !important;
    /* 內縮，避免被選單的 overflow 裁掉 */
    outline-offset: -3px !important;
    background-color: #e6efff;
}

/* 開啟時立即可見，讓焦點能直接移入選單 */
#my-drawer-4:checked ~ #mobile-menu {
    transition-delay: 0s;
}

/* 無障礙：列表卡片鍵盤焦點 */
.a11y-focus-card:focus-visible {
    outline: 4px solid #005fcc !important;
    outline-offset: 4px !important;
    border-color: #005fcc !important;
}
/* 無障礙：活動報名卡片鍵盤焦點 */
.activity-registration-card:focus,
.activity-registration-card:focus-visible {
    outline: 4px solid #005FCC !important;
    outline-offset: 4px !important;
}

/* 無障礙：桌機版主選單下拉觸發鈕焦點框
   （覆寫 DaisyUI .dropdown>:not(summary):focus 的 outline-style: none） */
.dropdown > [role="button"]:focus-visible {
    outline: 3px solid #005fcc !important;
    outline-offset: 2px !important;
}

.bg-shapes {
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.no-tailwind {
    all: unset !important;
}

:root {
    --color-base-100: oklch(100% 0 0);
    --color-base-200: #f4f4f4;
    --color-base-300: #eee;
    --color-base-content: oklch(21% 0.006 285.885);
    --color-primary: #586334;
    --color-primary-content: oklch(98% 0.003 247.858);
    --color-secondary: oklch(65% 0.241 354.308);
    --color-secondary-content: oklch(94% 0.028 342.258);
    --color-accent: oklch(77% 0.152 181.912);
    --color-accent-content: oklch(38% 0.063 188.416);
    /* 無障礙 1.4.3：頁尾 bg-neutral 配 neutral-content，原 #818f4c 只有 3.33:1，改為 5.52:1 */
    --color-neutral: #5f6a37;
    --color-neutral-content: oklch(98% 0.003 247.858);
    --color-info: oklch(74% 0.16 232.661);
    --color-info-content: white;
    --color-success: rgb(67, 191, 67);
    --color-success-content: white;
    --color-warning: oklch(82% 0.189 84.429);
    --color-warning-content: oklch(41% 0.112 45.904);
    --color-error: red;
    --color-error-content: white;
    --radius-selector: 2rem;
    --radius-field: .35rem;
    --radius-box: 1rem;
    --size-selector: 0.25rem;
    --size-field: 0.25rem;
    --border: 1px;
    --depth: 1;
    --noise: 0;

    --color-homepage-background: rgb(250, 246, 240);
}

.jsCalendar.custom-theme tbody td.jsCalendar-current {
    background-color: var(--color-primary);
}
.jsCalendar.custom-theme *::selection {
    background-color: var(--color-primary);
}
.jsCalendar.custom-theme *::-moz-selection {
    background-color: var(--color-primary);
}
.jsCalendar.material-theme.custom-theme thead {
    background-color: var(--color-primary);
}
.jsCalendar.material-theme.custom-theme thead .jsCalendar-nav-left:hover,
.jsCalendar.material-theme.custom-theme thead .jsCalendar-nav-right:hover {
    background-color: var(--color-base-300);
}
.jsCalendar.classic-theme.custom-theme thead {
    background-color: var(--color-primary);
}
.jsCalendar.classic-theme.custom-theme thead .jsCalendar-nav-left:hover,
.jsCalendar.classic-theme.custom-theme thead .jsCalendar-nav-right:hover {
    background-color: var(--color-base-300);
}

.jsCalendar table {
    margin: 0 !important;
    border-radius: 0 !important;
}
.jsCalendar tbody td, .jsCalendar thead th {
    margin: 3px !important;
    border-radius: var(--radius-field) !important;
}
.jsCalendar tbody td[disabled]:hover {
    background-color: unset !important;
}
.jsCalendar thead th, .jsCalendar thead .jsCalendar-title-name {
    font-weight: normal !important;
}


.fieldset-legend {
    font-size: 1rem;
}

.page-max-width {
    margin-left: auto;
    margin-right: auto;
    max-width: 1500px;
}
.psychological-resources-btn {
    background-color: #9C0B0B !important;
    color: #ffffff !important;
    border-color: #9C0B0B !important;
}

.psychological-resources-btn:hover,
.psychological-resources-btn:focus {
    background-color: #9b1010 !important;
    color: #ffffff !important;
    border-color: #990000 !important;
}

.page-padding {
    padding: clamp(1rem, 5vw, 2.5rem);
}

.page-padding-x {
    padding-left: clamp(1rem, 5vw, 2.5rem);
    padding-right: clamp(1rem, 5vw, 2.5rem);
}

img {
    object-fit: cover;
}

@media only screen and (max-width: 600px) {
    :root {
        --page-padding-x: calc(var(--spacing) * 4);
        --card-p: calc(var(--spacing) * 4);
    }
    table {
        & :where(th,td) {
            padding-inline: 0 !important;
        }
    }
}

@media only screen and (min-width: 600px) {
    :root {
        --page-padding-x: calc(var(--spacing) * 10);
    }
}

/* 無障礙 1.4.3／2.4.7：首頁與活動頁月曆（覆寫 jsCalendar.min.css） */
.jsCalendar thead .jsCalendar-nav-left,
.jsCalendar thead .jsCalendar-nav-right {
    color: #595959; /* 白底 7.0:1，原 #999 2.85:1 */
}
.jsCalendar tbody td.jsCalendar-next,
.jsCalendar tbody td.jsCalendar-previous,
.jsCalendar tbody td.jsCalendar-unselectable {
    color: #707070; /* 白底 4.95:1，原 #cacaca 1.64:1 */
}
.jsCalendar tbody td[tabindex]:focus-visible,
.jsCalendar thead .jsCalendar-nav-left:focus-visible,
.jsCalendar thead .jsCalendar-nav-right:focus-visible {
    outline: 3px solid #005fcc !important;
    outline-offset: 2px;
}
