/* 旅圖 Lutu 網站：沿用 App 的繪本風代幣（docs/DESIGN_GUIDE.md、app/src/theme.ts） */
/* 字型放在自己的網站上（不從 Google Fonts 載入，訪客的連線資料不會傳給第三方）；Huninn 為 SIL OFL 1.1 授權 */
@font-face { font-family: "Huninn"; src: url("fonts/Huninn_400Regular.ttf") format("truetype"); font-display: swap; }
:root {
  --paper: #FFFCF6;
  --card: #FFFFFF;
  --ink: #3E3A39;
  --muted: #6B6461;
  --coral: #F2A497;
  --yellow: #F6D27A;
  --aqua: #A8D3E6;
  --green: #B9DAA5;
  --line: #E6E0D8;
  --cream: #FFF3D6;
  --coral-soft: #FDEFEA;
  --lavender: #CDBFE3;
  --danger: #B5483A;
  --disabled: #D9D3CC;
  --scrim: rgba(62, 58, 57, 0.35);
  --stitch: #FFFCF6;
  --tint-line: #D9D2CB; /* theme.ts tint.line：卡片內側的淡縫線 */
  --border: 3px solid var(--ink);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Huninn", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  font-size: 16px;
  line-height: 1.75;
}
a { color: var(--ink); text-decoration-color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 3px; }
/* 只有一個字重：重點用字級與顏色區分，不用粗體 */
strong, b { font-weight: 400; }
.data-list strong { font-size: 17px; }
.wrap { max-width: 720px; margin: 0 auto; padding: 16px 16px 64px; }
header.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0 16px; }
header.top img { height: 48px; width: auto; display: block; }
nav { display: flex; gap: 8px; flex-wrap: wrap; }
nav a {
  position: relative; text-decoration: none; background: var(--cream); border: 2px solid var(--ink); border-radius: 999px;
  padding: 0 14px; font-size: 15px; box-shadow: 3px 3px 0 var(--ink);
  min-height: 44px; display: inline-flex; align-items: center;
}
nav a[aria-current="page"] { background: var(--yellow); }
/* 縫邊：和 App 的 Button 一樣，內側一圈虛線 */
nav a::after, .card::after {
  content: ""; position: absolute; inset: 4px; border: 1.5px dashed var(--stitch); border-radius: inherit; pointer-events: none;
}
.card::after { inset: 7px; border-color: var(--tint-line); border-radius: 19px; }
.card.aqua::after, .banner::after { border-color: var(--stitch); }
.card {
  background: var(--card); border: var(--border); border-radius: 26px; padding: 20px;
  box-shadow: 5px 5px 0 var(--ink); margin: 0 0 24px; position: relative;
}
.card.aqua { background: var(--aqua); }
.banner { padding: 0; overflow: hidden; position: relative; }
.banner img { display: block; width: 100%; height: auto; }
.banner .copy { position: absolute; left: 0; top: 0; padding: 16px 20px; max-width: 75%; }
h1 { font-size: 28px; line-height: 1.3; margin: 0 0 8px; font-weight: 400; }
h2 { font-size: 22px; line-height: 1.4; margin: 32px 0 12px; font-weight: 400; }
h3 { font-size: 17px; margin: 20px 0 8px; font-weight: 400; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); font-size: 14px; }
ul, ol { padding-left: 1.4em; margin: 0 0 12px; }
li { margin: 4px 0; }
.data-list li { margin: 8px 0; }
.pill { display: inline-block; background: var(--yellow); border: 2px solid var(--ink); border-radius: 999px; padding: 0 10px; font-size: 14px; }
.rabbit { display: block; width: 128px; height: auto; margin: 8px auto 0; }
footer { text-align: center; color: var(--muted); font-size: 14px; margin-top: 40px; }
@media (max-width: 480px) {
  h1 { font-size: 24px; }
  .banner .copy { position: static; max-width: none; background: var(--aqua); }
  header.top { flex-wrap: wrap; }
  nav { width: 100%; gap: 6px; }
  nav a { padding: 0 10px; font-size: 14px; }
}
h2.first { margin-top: 0; }

/* 四角貼紙：貼齊邊緣、在最底層、不壓內容（App 的規則） */
.corners { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.corners img { position: absolute; width: 150px; height: auto; }
.c-tl { top: 0; left: 0; transform: translate(-30%, -25%); }
.c-tr { top: 0; right: 0; transform: translate(30%, -25%); }
.c-bl { bottom: 0; left: 0; }
.c-br { bottom: 0; right: 0; }
@media (max-width: 480px) { .corners img { width: 110px; } }

/* 支持旅圖（T-044）：山吹黃卡片＋珊瑚粉膠囊按鈕（色底區塊裡的按鈕用另一個色票色，和頂端導覽的米白膠囊分開；墨灰框、實心陰影、內側縫線） */
.card.yellow { background: var(--yellow); }
.card.yellow::after { border-color: var(--stitch); }
.cta { margin: 20px 0 16px; }
.btn {
  position: relative; display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px;
  background: var(--coral); border: var(--border); border-radius: 999px; box-shadow: 3px 3px 0 var(--ink);
  text-decoration: none; font-size: 17px;
}
.btn::after { content: ""; position: absolute; inset: 4px; border: 1.5px dashed var(--ink); border-radius: inherit; opacity: 0.35; pointer-events: none; }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.card.yellow .muted { color: var(--ink); }

/* 頂端導覽的圖圖圖示（App 的 TAB_ART／UI 圖示，縮小放在 img/ui/）：手機上排成一列四格、圖示在字上面 */
header.top nav a img { width: 28px; height: 28px; margin: 0 6px 0 -4px; flex: none; }
@media (max-width: 480px) {
  nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
  nav a { flex-direction: column; justify-content: center; padding: 6px 2px; border-radius: 18px; font-size: 13px; line-height: 1.3; text-align: center; }
  header.top nav a img { width: 36px; height: 36px; margin: 0 0 2px; }
}

/* 標題前的圖圖圖示 */
.title-icon { display: flex; align-items: center; gap: 10px; }
.title-icon img { width: 40px; height: 40px; flex: none; }

/* 功能介紹：每格一個圖圖圖示＋標題＋一句說明 */
.features { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.features li { margin: 0; display: flex; gap: 12px; align-items: flex-start; background: var(--paper); border: 2px solid var(--ink); border-radius: 18px; padding: 12px; }
.features img { width: 48px; height: 48px; flex: none; }
.features h3 { margin: 0 0 2px; font-size: 17px; line-height: 1.4; }
.features p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--muted); }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

/* 圖圖旅報卡片 */
.feed-list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
@media (max-width: 560px) { .feed-list { grid-template-columns: 1fr; } }
.feed-card { border: 2px solid var(--ink); border-radius: 18px; overflow: hidden; background: var(--paper); box-shadow: 3px 3px 0 var(--ink); display: flex; flex-direction: column; }
.feed-card > img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-bottom: 2px solid var(--ink); }
.feed-card.yellow > img { background: var(--yellow); }
.feed-card.coral > img { background: var(--coral); }
.feed-card.aqua > img { background: var(--aqua); }
.feed-card.green > img { background: var(--green); }
.feed-text { padding: 12px 14px 14px; }
.feed-text h3 { margin: 0 0 4px; font-size: 17px; line-height: 1.45; }
.feed-meta { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.chip { display: inline-block; border: 1.5px solid var(--ink); border-radius: 999px; padding: 0 8px; color: var(--ink); background: var(--cream); }
.feed-card.yellow .chip { background: var(--yellow); }
.feed-card.coral .chip { background: var(--coral-soft); }
.feed-card.aqua .chip { background: var(--aqua); }
.feed-card.green .chip { background: var(--green); }
.feed-hook { margin: 0 0 8px; font-size: 14px; color: var(--muted); }
.feed-text details summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.feed-body { white-space: pre-line; font-size: 15px; }
.feed-body { overflow-wrap: anywhere; }
@media (max-width: 480px) { nav.three { grid-template-columns: repeat(3, 1fr); } }
/* 旅報「看更多」：沿用 .btn，置中；button 要自己帶字型 */
.more-row { text-align: center; margin: 0 0 16px; }
button.btn { font-family: inherit; color: var(--ink); cursor: pointer; }
.btn[hidden] { display: none; }
/* 旅報內文的 ==重點== 和 !!注意!!：和 App 一樣只換字的底色（theme.ts 的 colors.highlight／caution） */
.feed-body .hl { background: #FBEBC4; }
.feed-body .caution { background: #FBE3DD; }
/* 圖圖的旅行包（T-059）：國家篩選膠囊（DESIGN_GUIDE 12.4：選中＝山吹黃底＋3px 框，不加陰影）、卡片按鈕靠下對齊 */
.pack-filter[hidden] { display: none; }
.pack-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.pack-chip { font-family: inherit; font-size: 15px; color: var(--ink); min-height: 44px; padding: 0 16px; border: 2px solid var(--ink); border-radius: 999px; background: var(--card); cursor: pointer; }
.pack-chip[aria-pressed="true"] { background: var(--yellow); border-width: 3px; padding: 0 15px; }
.pack-card .feed-text { display: flex; flex-direction: column; flex: 1; }
.pack-card .feed-hook { flex: 1; }
.pack-card .btn { align-self: flex-start; min-height: 44px; font-size: 16px; padding: 0 18px; margin-top: 4px; }
.pack-section .feed-list { margin-bottom: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* 手機上旅行包卡片改成左圖右文，一屏看得到好幾張 */
@media (max-width: 560px) {
  .pack-section .feed-list { gap: 12px; }
  .pack-card { flex-direction: row; }
  .pack-card > img { flex: none; width: 112px; height: auto; aspect-ratio: auto; align-self: stretch; object-fit: cover; border-bottom: 0; border-right: 2px solid var(--ink); }
  .pack-card .feed-text { padding: 10px 12px 12px; min-width: 0; }
  .pack-card .feed-hook { font-size: 13px; }
  .pack-card .btn { font-size: 15px; padding: 0 14px; }
}
/* 首頁、旅行包、一般瀏覽器開的條款頁導覽有五格：放在 logo 下面一整列；手機上縮小字和圖示 */
header.top:has(nav.five) { flex-wrap: wrap; }
nav.five { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; width: 100%; }
nav.five a { justify-content: center; white-space: nowrap; padding: 0 8px; font-size: 15px; }
@media (max-width: 480px) {
  nav.five { gap: 6px; }
  nav.five a { font-size: 13px; padding: 6px 0; }
  header.top nav.five a img { width: 32px; height: 32px; }
  /* 一格放不下「隱私權政策」：畫面上顯示短名稱（data-short），完整名稱留給讀屏 */
  nav.five a[data-short] .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  nav.five a[data-short]::before { content: attr(data-short); content: attr(data-short) / ""; order: 2; }
}
.card.aqua .muted { color: var(--ink); }
