﻿/* 配色：暖奶油底＋深咖啡字（比純黑柔和）＋暖橘主色＋沖繩海藍輔色 */
:root {
  --bg: #FFF8EE;
  --card: #FFFFFF;
  --ink: #3B2F28;
  --mute: #6B5D53;
  --line: #EADCC8;
  --accent: #B84C1C;
  --accent-ink: #FFFFFF;
  --accent-soft: #FCE8DA;
  --sea: #1D6B70;
  --sea-ink: #FFFFFF;
  --sea-soft: #E2F1EF;
  --sun-soft: #FFF1C9;
  --warn: #8A5300;
  --warn-line: #E9C46A;
  --ok: #2E7D4F;
  --ok-soft: #E3F3E8;
  --nav: #FFFFFF;
  --shadow: 0 1px 3px rgba(80, 50, 20, .08);
  font-size: 19px;
}
/* 長輩手冊固定用淺色暖底：手機開深色模式也不跟著變黑（2026-10-13 bro 要求） */
:root { color-scheme: light; }
html.big { font-size: 22px; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}
:lang(ja) { font-family: "Hiragino Sans", "Noto Sans JP", "Yu Gothic", "Meiryo", sans-serif; }
h1, h2, h3 { text-wrap: balance; margin: 0; line-height: 1.3; }
p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--sea); }

/* 頁首 */
.top {
  position: sticky; top: 0; z-index: 5;
  background: var(--bg);
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 10px;
  border-bottom: 1px solid var(--line);
}
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
h1 { font-size: 1.35rem; letter-spacing: .02em; }
.sub { color: var(--mute); font-size: .85rem; font-variant-numeric: tabular-nums; }
.today { margin-top: 6px; font-size: .9rem; color: var(--accent); font-weight: 700; }
.today:empty { display: none; }
.offline { margin-top: 6px; font-size: .8rem; background: var(--sun-soft); border-radius: 8px; padding: 4px 10px; }
.chip {
  border: 1.5px solid var(--line); background: var(--card);
  border-radius: 999px; padding: 6px 14px; font-size: .85rem; white-space: nowrap; min-height: 40px;
}
.chip[aria-pressed="true"], .chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

main { padding: 14px 16px calc(100px + env(safe-area-inset-bottom, 0px)); max-width: 640px; margin: 0 auto; }
.tab { display: flex; flex-direction: column; gap: 16px; }

/* 底部導覽 */
.bottom {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--nav); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bottom button {
  border: 0; background: none; padding: 8px 0 10px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: .78rem; color: var(--mute);
}
.bottom .ic { font-size: 1.3rem; line-height: 1.2; }
.bottom button.on { color: var(--accent); font-weight: 700; }
.bottom button.on .ic { transform: scale(1.1); }

/* 天數選擇 */
.days { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px;
  position: sticky; top: var(--top-h, 96px); z-index: 4; background: var(--bg); padding: 8px 0; margin: -8px 0; }
.days button {
  border: 1.5px solid var(--line); background: var(--card); border-radius: 14px;
  padding: 8px 0; display: flex; flex-direction: column; align-items: center; line-height: 1.25;
}
.days b { font-size: 1rem; font-variant-numeric: tabular-nums; }
.days small { font-size: .72rem; color: var(--mute); }
.days button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.days button.on small { color: var(--accent-ink); }
.days button.now:not(.on) { border-color: var(--accent); }

.day-head h2 { font-size: 1.35rem; }
.day-head p { color: var(--mute); font-size: .9rem; }

/* 集合卡 */
.meet {
  background: var(--accent); color: var(--accent-ink);
  border-radius: 18px; padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.meet .label { font-size: .85rem; opacity: .92; letter-spacing: .05em; }
.meet .time { font-size: 2.7rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.meet .place { font-size: 1.05rem; font-weight: 700; }
.meet .note { font-size: .85rem; opacity: .95; }
.meet .btns { display: flex; flex-wrap: wrap; gap: 8px; }
.meet .btn { background: var(--accent-ink); color: var(--accent); border-color: transparent; }

/* 航班卡（登機證風格） */
.flight {
  background: var(--sea); color: var(--sea-ink);
  border-radius: 18px; padding: 16px; margin: 12px 0;
  display: flex; flex-direction: column; gap: 10px;
}
.flight .fl-top { display: flex; justify-content: space-between; align-items: baseline; }
.flight .label { font-size: .9rem; opacity: .92; letter-spacing: .05em; }
.flight .no { font-size: 1.4rem; font-weight: 800; letter-spacing: .06em; }
.flight .fl-row { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border-top: 2px dashed rgba(255,255,255,.45); border-bottom: 2px dashed rgba(255,255,255,.45); padding: 10px 0; }
.flight .fl-row > div { display: flex; flex-direction: column; align-items: center; flex: 1; }
.flight .fl-row b { font-size: 1.3rem; }
.flight .fl-row small { font-size: .8rem; opacity: .9; }
.flight .tm { font-size: 2.3rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.flight .arrow { font-size: 1.8rem; opacity: .85; }
.flight .note { font-size: .85rem; opacity: .95; margin: 0; }
.flight .btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.flight .btn { background: var(--sea-ink); color: var(--sea); border-color: transparent;
  justify-content: center; text-align: center; padding-left: 6px; padding-right: 6px; white-space: nowrap; font-size: .92rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1.5px solid var(--accent); color: var(--accent); background: var(--card);
  border-radius: 12px; padding: 8px 14px; font-size: .9rem; font-weight: 700;
  text-decoration: none; min-height: 46px;
}
.btn.solid { background: var(--accent); color: var(--accent-ink); }
.btn.sea { background: var(--sea); color: var(--sea-ink); border-color: var(--sea); }
.btn.sea-line { border-color: var(--sea); color: var(--sea); }
.btn.wide { width: 100%; }

/* 時間軸 */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; background: var(--card); border-radius: 16px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.steps li {
  display: grid; grid-template-columns: 4.8em 1fr; gap: 10px;
  padding: 14px 14px; border-bottom: 1px solid var(--line);
}
.steps li:last-child { border-bottom: 0; }
.steps .t { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent); font-size: .95rem; }
.steps .t.soft { color: var(--sea); font-weight: 700; font-size: .8rem; }
.steps h3 { font-size: 1.02rem; }
.steps p { font-size: .9rem; color: var(--mute); }
.steps .act { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.tip { margin-top: 8px; background: var(--sea-soft); border-radius: 12px; padding: 8px 12px; }
.tip summary { font-size: .88rem; font-weight: 700; color: var(--sea); cursor: pointer; min-height: 32px; display: flex; align-items: center; }
.tip p { font-size: .9rem; color: var(--ink); margin-top: 6px; }

.box { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow); }
.box h3 { font-size: 1.08rem; margin-bottom: 6px; }
.box p + p, .box ul { margin-top: 6px; }
.box ul { padding-left: 1.2em; margin-bottom: 0; }
.box li + li { margin-top: 6px; }
.box.sun { background: var(--sun-soft); border-color: var(--warn-line); }
.box.sea { background: var(--sea-soft); border-color: transparent; }
.src { font-size: .78rem; color: var(--mute); margin-top: 8px; word-break: break-all; }

.warn { background: var(--sun-soft); border: 1.5px solid var(--warn-line); border-radius: 14px; padding: 12px 14px; }
.warn b { color: var(--warn); }

/* 插畫 */
.art { border: 0; padding: 0; background: none; border-radius: 16px; overflow: hidden; display: block; width: 100%; position: relative; }
.art img { display: block; width: 100%; height: 230px; object-fit: cover; object-position: top; }
.art.sq img { height: auto; aspect-ratio: 1; }
.surprise { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 22px 16px; border: 2px dashed var(--warn-line); border-radius: 16px; background: var(--sun-soft); }
.surprise .ic { font-size: 2rem; }
.surprise b { font-size: 1.05rem; }
.surprise small { color: var(--mute); font-size: .85rem; }
.art span { position: absolute; right: 10px; bottom: 10px; background: rgba(59, 47, 40, .75); color: #fff; font-size: .78rem; padding: 3px 10px; border-radius: 999px; }

/* 附近 */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.seg button { border: 1.5px solid var(--line); background: var(--card); border-radius: 12px; padding: 10px 0; font-weight: 700; min-height: 46px; }
.seg button.on { background: var(--sea); color: var(--sea-ink); border-color: var(--sea); }
.seg.four { grid-template-columns: repeat(4, 1fr); }
.seg.four button { font-size: .85rem; padding: 10px 2px; }
.grp { font-size: 1.05rem; color: var(--accent); margin-top: 4px; }
.shop { display: flex; flex-direction: column; gap: 6px; }
.shop .sign { font-size: 1.35rem; font-weight: 800; line-height: 1.35; color: var(--ink); }
.shop .place-top h3 { font-size: .95rem; color: var(--mute); font-weight: 700; }
.kv.mini { font-size: .88rem; }
.place { display: flex; flex-direction: column; gap: 6px; }
.place-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.place-top h3 { font-size: 1.05rem; margin: 0; }
.tag { font-size: .75rem; background: var(--sea-soft); color: var(--sea); border-radius: 999px; padding: 2px 10px; white-space: nowrap; font-weight: 700; }
.place .ja { font-size: .85rem; color: var(--mute); }
.intro { color: var(--mute); font-size: .9rem; }

/* 溝通卡清單 */
.cats { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cats button { flex: 0 0 auto; border: 1.5px solid var(--line); background: var(--card); border-radius: 999px; padding: 8px 14px; font-size: .9rem; min-height: 44px; }
.cats button.on { background: var(--sea); color: var(--sea-ink); border-color: var(--sea); font-weight: 700; }
.phr { display: flex; flex-direction: column; gap: 10px; }
.phr button {
  text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 16px; box-shadow: var(--shadow);
  padding: 12px 14px; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center;
}
.phr .zh { font-weight: 700; font-size: 1.02rem; }
.phr .jp { font-size: .95rem; color: var(--sea); grid-column: 1; }
.phr .go { grid-row: 1 / span 2; grid-column: 2; font-size: .78rem; color: var(--accent); font-weight: 700; white-space: nowrap; }
details.box summary { font-weight: 700; cursor: pointer; min-height: 30px; }
details.box[open] summary { margin-bottom: 6px; }
.how { display: flex; flex-direction: column; gap: 4px; font-size: .88rem; }

.counter { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.counter button:not(.btn) { width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid var(--accent); background: var(--card); color: var(--accent); font-size: 1.5rem; font-weight: 800; }
.counter b { font-size: 1.8rem; min-width: 2.5em; text-align: center; font-variant-numeric: tabular-nums; }

.field { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.field label { font-size: .85rem; color: var(--mute); }
.field input { font: inherit; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); width: 100%; }

/* 出示卡（全螢幕） */
.card-modal { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; background: var(--bg); }
.zone-ja {
  flex: 2; min-height: 0; overflow: auto;
  background: #FFFFFF; color: #222222;
  display: flex; flex-direction: column; justify-content: center; gap: 14px;
  padding: calc(env(safe-area-inset-top, 0px) + 18px) 20px 18px;
  border-bottom: 3px dashed var(--line);
}
.zone-ja.flip { transform: rotate(180deg); }
.zone-tag { font-size: .85rem; color: #777; letter-spacing: .1em; }
.card-jp { font-size: 2.2rem; }
.card-jp.long { font-size: 1.6rem; }
.card-jp { font-weight: 800; line-height: 1.4; word-break: break-word; white-space: pre-line; }
#cardExtra img { max-width: 100%; max-height: 38vh; border-radius: 12px; display: block; margin: 0 auto; }
#cardExtra .tel { font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.zone-me {
  flex: 1; min-height: 0; overflow: auto;
  padding: 14px 16px calc(env(safe-area-inset-bottom, 0px) + 14px);
  display: flex; flex-direction: column; gap: 6px; background: var(--accent-soft);
}
.card-zh { font-size: 1.15rem; font-weight: 800; }
.card-ro { font-size: .9rem; color: var(--mute); }
.card-hint { font-size: .85rem; color: var(--sea); }
.card-msg { font-size: .85rem; color: var(--warn); }
.card-btns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: auto; padding-top: 6px; }
.card-btns .btn { padding: 8px 4px; font-size: .85rem; }

.pic-modal { position: fixed; inset: 0; z-index: 20; background: var(--bg); display: flex; flex-direction: column; padding: calc(env(safe-area-inset-top, 0px) + 12px) 12px calc(env(safe-area-inset-bottom, 0px) + 12px); gap: 10px; }
.pic-close { align-self: flex-end; }
.pic-body { flex: 1; overflow: auto; }
.pic-body img { width: 100%; height: auto; border-radius: 12px; display: block; }

/* 匯率 */
.calc-in { position: relative; }
.calc-in input {
  width: 100%; font: inherit; font-size: 1.8rem; font-weight: 800; padding: 10px 56px 10px 14px;
  border: 2px solid var(--accent); border-radius: 14px; background: var(--card); color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.calc-in .clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--line); font-size: 1rem; }
.cur { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 4px 12px; margin-top: 12px; }
.cur dt { font-size: .9rem; color: var(--mute); }
.cur dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 800; font-size: 1.3rem; }
.cur dd.main { font-size: 2.1rem; color: var(--accent); }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tax { border-radius: 14px; padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; }
.tax.yes { background: var(--ok-soft); }
.tax.maybe { background: var(--sun-soft); }
.tax.no { background: var(--sea-soft); }
.tax .ic { font-size: 1.4rem; line-height: 1.2; }
.tax b { display: block; }
.tax small { font-size: .85rem; color: var(--mute); }
.rates { display: grid; grid-template-columns: auto 1fr; gap: 8px 10px; align-items: center; font-size: .9rem; margin-top: 8px; }
.rates input { font: inherit; padding: 6px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); width: 7em; }

/* 清單 */
.check { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-direction: column; gap: 2px; }
.check label { display: flex; align-items: center; gap: 12px; padding: 8px 2px; min-height: 46px; }
.check input { width: 26px; height: 26px; accent-color: var(--ok); flex: 0 0 auto; }
.check input:checked + span { color: var(--mute); text-decoration: line-through; }

.kv { display: grid; grid-template-columns: 4.5em 1fr; gap: 4px 10px; font-size: .95rem; margin: 0; }
.kv dt { color: var(--mute); }
.kv dd { margin: 0; min-width: 0; }
.sel { user-select: all; -webkit-user-select: all; }
.row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.steps p { white-space: pre-line; }
.meet .note { white-space: pre-line; }

.spot-btn{margin-top:8px;display:inline-flex;}
.spots{padding:4px 6px 24px;}
.spots h2{font-size:1.35rem;margin:6px 0 14px;color:var(--ink);}
.spots .lead{font-weight:700;margin:0 0 10px;}
.spots .spot{background:var(--sea-soft);border-radius:12px;padding:12px 14px;margin:0 0 10px;font-size:1.05rem;line-height:1.6;}
.spots .spot b{display:block;color:var(--sea);font-size:1.1rem;margin-bottom:2px;}
.nav-row{display:flex;align-items:center;gap:10px;flex-wrap:nowrap;}
.nav-row .btn{flex:none;width:auto;}
.nav-row .price{font-weight:700;color:var(--ink);font-size:1rem;line-height:1.35;min-width:0;}
.steps p b{color:var(--accent,#B84C1C);font-weight:800;}
.nav-row .price{white-space:nowrap;}
.nav-row .price small{display:block;font-size:.8rem;font-weight:600;color:var(--muted,#7a6a5a);}
