@charset "UTF-8";
/* 東港日曆：日式。清爽、乾淨、簡單。生成り（米白）的底、墨色的字、藍（藍染）一個主色、朱紅只用在一個小點；細線、小圓角、多留白、字距放寬。
   類別用低飽和的傳統色（若草、藍、山吹、紅梅、藤），只用在日期塊上。字不用太細，給長輩看。 */
:root {
  --bg: #faf8f4; --surface: #fffefb; --ink: #2d2a26; --muted: #55514a; --line: #e7e2d8; --hover: #f1ede4;
  --primary: #2f4b6e; --on-primary: #fff; --link: #2f4b6e; --sel: #e6ecf2; --on-sel: #213a56; --accent: #c0472f;
  --yamabuki: #f0c75e; --on-yamabuki: #2d2a26; --hl: rgba(240, 199, 94, .55);
}
.c-green { --c: #36522a; --cc: #eaf0e1; } .c-blue { --c: #2f4b6e; --cc: #e6ecf2; } .c-yellow { --c: #604508; --cc: #f7efd6; }
.c-red { --c: #7f2f20; --cc: #f6e4df; } .c-purple { --c: #4e3b69; --cc: #ece6f1; }
@media (prefers-color-scheme: dark) {
  :root { --bg: #1e1d1a; --surface: #272622; --ink: #ece8df; --muted: #b9b3a7; --line: #3b3933; --hover: #302f2a; --primary: #a9bfd8; --on-primary: #1e1d1a; --link: #a9bfd8; --sel: #34414f; --on-sel: #dbe6f2; --accent: #e08a74; --yamabuki: #e6cf8a; --hl: rgba(230, 207, 138, .32); }
  .c-green { --c: #b2cd9a; --cc: #2a3523; } .c-blue { --c: #bfd0e4; --cc: #2b3644; } .c-yellow { --c: #e6cf8a; --cc: #3a3320; }
  .c-red { --c: #efbcae; --cc: #3d2b26; } .c-purple { --c: #c9b6df; --cc: #342d3d; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1.125rem/1.85 "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans TC", "Noto Sans JP", "PingFang TC", system-ui, "Microsoft JhengHei", sans-serif; letter-spacing: .04em; }
main { max-width: 40rem; margin: 0 auto; padding: 1.2rem 1.1rem 4rem; }
a { color: var(--link); text-decoration: none; } a:hover { text-decoration: underline; text-underline-offset: .25em; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: .3rem; }
p { margin: 0 0 .8rem; } .note { color: var(--muted); font-size: 1rem; }
h1 { margin: 2rem 0 1.8rem; font-size: 1.65rem; line-height: 1.65; font-weight: 500; letter-spacing: .08em; }
h2 { margin: 2.6rem 0 1rem; padding-bottom: .5rem; border-bottom: 1px solid var(--line); font-size: 1.1rem; font-weight: 500; letter-spacing: .12em; }
h3 { margin: 0 0 .3rem; font-size: 1.05rem; font-weight: 500; }
.top { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); font-size: 1.15rem; font-weight: 500; letter-spacing: .1em; text-decoration: none; }
.brand:hover { text-decoration: none; }

/* 語言選單：右上角一個地球圖示，點開是一排語言（<details>，沒有 JavaScript 也能用）。點擊區 44px */
.lang { position: relative; flex: none; }
.lang summary { display: flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; list-style: none; }
.lang summary::-webkit-details-marker { display: none; } .lang summary:hover { color: var(--ink); background: var(--hover); }
.lang ul { position: absolute; right: 0; top: 3.1rem; z-index: 5; min-width: 9.5rem; margin: 0; padding: .3rem; list-style: none; border-radius: .6rem; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 .3rem 1rem rgba(0,0,0,.08); }
.lang li { margin: 0; } .lang a { display: block; padding: .55rem .9rem; border-radius: .4rem; color: var(--ink); text-decoration: none; }
.lang a:hover { background: var(--hover); } .lang a[aria-current] { background: var(--sel); color: var(--on-sel); font-weight: 500; }

/* 月曆：一次一個月（/app.js 負責切換）。日期格是方的（小圓角）。今天＝實心藍方，有事＝數字下面一個朱紅小點，選到＝淡藍底＋藍框 */
.cal { padding: .6rem .6rem .8rem; border-radius: .6rem; background: var(--surface); border: 1px solid var(--line); }
.cal:not(.js) .month ~ .month { display: none; }
.cal.js .month h3 { display: none; }
.calnav { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .3rem; }
.calttl { font-size: 1.15rem; font-weight: 500; letter-spacing: .1em; }
.calnav button { width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 0; background: none; color: var(--muted); font: inherit; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.calnav button:hover:not(:disabled) { background: var(--hover); color: var(--ink); } .calnav button:disabled { opacity: .3; cursor: default; }
.wk, .cells { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.wk span { padding: .2rem 0; font-size: .95rem; color: var(--muted); }
.cells { row-gap: .1rem; align-items: start; } /* start：有名稱的那一列比較高，其他格的數字不要被拉著往下掉 */
.cells .c, .cells i { position: relative; display: grid; place-items: center; }
/* 連假的螢光筆：畫在整欄寬的 .c 後面，數字在上面；一行的頭尾畫圓角，換行就各自收尾 */
.cells .c.hl::before { content: ''; position: absolute; left: 0; right: 0; top: 38%; bottom: 12%; background: var(--hl); }
.cells .c.hl-s::before { left: .2rem; border-radius: 999px 0 0 999px; } .cells .c.hl-e::before { right: .2rem; border-radius: 0 999px 999px 0; } .cells .c.hl-s.hl-e::before { border-radius: 999px; }
/* 連假的名稱：標在那段螢光筆的正下方。l＝從這格往右長、r＝掛在最後一格往左長、c＝以這段的中央為中心。有名稱的那一列多留一行的高度 */
.cells .c.cap { margin-bottom: 1.5rem; }
.hl-name { position: absolute; top: calc(100% - .1rem); z-index: 1; font-size: .95rem; font-weight: 500; line-height: 1.3; letter-spacing: 0; white-space: nowrap; color: var(--ink); pointer-events: none; }
.cap-l .hl-name { left: 0; } .cap-r .hl-name { right: 0; } .cap-c .hl-name { left: calc(var(--k) * 50%); transform: translateX(-50%); }
.runs { list-style: none; margin: .7rem .2rem 0; padding: .7rem 0 0; border-top: 1px solid var(--line); display: grid; gap: .3rem; color: var(--muted); font-size: 1rem; line-height: 1.6; }
.runs li { display: flex; align-items: baseline; gap: .55rem; } .runs b { color: var(--ink); font-weight: 500; }
.sw { flex: none; width: 1.2rem; height: .6rem; border-radius: 999px; background: var(--hl); transform: translateY(.05rem); }
.cells b, .cells i, .cells button { position: relative; display: grid; place-items: center; width: 100%; max-width: 2.9rem; aspect-ratio: 1; margin: 0 auto; padding: 0; border: 0; border-radius: .25rem; background: none; color: inherit; font: inherit; font-weight: 400; font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: inherit; text-transform: none; -webkit-appearance: none; appearance: none; }
.cells .on { font-weight: 500; cursor: pointer; }
.cells .on::after { content: ''; position: absolute; bottom: .24rem; left: 50%; width: .34rem; height: .34rem; margin-left: -.17rem; border-radius: 50%; background: var(--accent); }
.cells .on:hover { background: var(--hover); }
.cells .now { background: var(--primary); color: var(--on-primary); font-weight: 500; }
.cells .now.on::after { background: var(--on-primary); } .cells .now.on:hover { background: var(--primary); }
.cells .on[aria-pressed="true"] { background: var(--sel); color: var(--on-sel); box-shadow: inset 0 0 0 1.5px var(--primary); }

/* 選到某一天時，清單上方的提示列 */
.filter { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin: 0 0 .8rem; padding: .3rem .5rem .3rem 1rem; border-radius: .5rem; background: var(--sel); color: var(--on-sel); }
.clear { min-height: 2.75rem; padding: .4rem 1rem; border: 0; border-radius: .4rem; background: none; color: var(--link); font: inherit; cursor: pointer; } .clear:hover { background: var(--hover); }

#list { margin-top: 1.8rem; scroll-margin-top: .8rem; }
/* 事項：細線的卡片，左邊日期（用這個類別的淡色），右邊標題、單位、地點、加入行事曆 */
.evs { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.item { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1.1rem; padding: 1rem 1.1rem; border-radius: .6rem; background: var(--surface); border: 1px solid var(--line); }
.when { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem; align-self: start; padding: .6rem .4rem; border-radius: .4rem; background: var(--cc); color: var(--c); text-align: center; line-height: 1.5; }
.when .d { font-size: 1.05rem; font-weight: 500; } .when .t { font-size: 1rem; font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; } .when .r { font-size: .95rem; font-weight: 500; white-space: nowrap; }
.what { display: flex; flex-direction: column; gap: .15rem; min-width: 0; overflow-wrap: anywhere; }
.what strong { font-size: 1.15rem; line-height: 1.6; font-weight: 500; }
/* 標籤膠囊維持兩色：「活動」山吹（黃）底墨字，其他（機關申請、繳稅、衛生、選舉）藍底白字 */
.tag { display: inline-block; margin-right: .5rem; padding: 0 .65rem; border-radius: 999px; background: var(--primary); color: var(--on-primary); font-size: .95rem; font-weight: 500; letter-spacing: .06em; line-height: 1.7; vertical-align: .1em; }
.c-green .tag { background: var(--yamabuki); color: var(--on-yamabuki); }
@media (prefers-color-scheme: dark) { .c-green .tag { --on-yamabuki: #1e1d1a; } }
.ttl { color: var(--link); font-weight: 500; }
.orig { color: var(--muted); font-size: 1rem; line-height: 1.6; } .zhp { margin-left: .4rem; color: var(--muted); font-size: .95rem; font-weight: 400; }
.org { color: var(--muted); font-size: 1rem; } .tel { font-weight: 500; } .org .tel { display: inline-block; padding: .35rem 0; }
.adds { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .5rem; } .adds > span { margin-right: .3rem; font-size: 1rem; color: var(--muted); }
.app { display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--muted); }
.app:hover { background: var(--hover); color: var(--ink); text-decoration: none; } .app svg { display: block; flex: none; }

.help { margin-top: 2.2rem; color: var(--muted); } .help summary { cursor: pointer; min-height: 2.75rem; padding: .4rem 0; }
footer { margin-top: 1.6rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 1rem; line-height: 1.8; }

@media (max-width: 30rem) {
  .item { grid-template-columns: minmax(0, 1fr); gap: .6rem; }
  .when { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; gap: .1rem .9rem; padding: .35rem .8rem; text-align: left; }
}

/* 往下滑的提示：事項清單還在畫面下方時，底部浮出一顆小藥丸，箭頭輕輕上下跳。點它捲到清單，捲到清單後就不再出現。 */
.cue { position: fixed; left: 50%; bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 20; display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; padding: .45rem 1.1rem .45rem .9rem; border-radius: 999px; background: var(--primary); color: var(--on-primary); box-shadow: 0 .3rem 1rem rgba(0,0,0,.18); font-size: 1rem; letter-spacing: .06em; text-decoration: none; transform: translateX(-50%); animation: cue-in .5s ease both; }
.cue:hover { text-decoration: none; filter: brightness(1.08); }
.cue .chev { animation: cue-bob 1.5s ease-in-out infinite; }
@keyframes cue-in { from { opacity: 0; transform: translate(-50%, 1rem); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes cue-bob { 0%, 100% { transform: translateY(-.15rem); } 50% { transform: translateY(.2rem); } }
@media (prefers-reduced-motion: reduce) { .cue, .cue .chev { animation: none; } }

/* 英文、越南文、印尼文：拉丁字母不需要中文那種寬字距，行高也不用那麼鬆 */
:lang(en) body, :lang(vi) body, :lang(id) body { letter-spacing: .005em; line-height: 1.65; }
:lang(en) h1, :lang(vi) h1, :lang(id) h1 { letter-spacing: .01em; line-height: 1.4; }
:lang(en) h2, :lang(vi) h2, :lang(id) h2, :lang(en) .calttl, :lang(vi) .calttl, :lang(id) .calttl, :lang(en) .brand, :lang(vi) .brand, :lang(id) .brand { letter-spacing: .02em; }
