/* =========================================================
   簡潔、大字、圓角卡片；顏色跟河童仔：河童綠、碟仔奶油黃、啡色線條
   ========================================================= */
:root {
  --bg: #EEF4E4;
  --surface: #FFFFFF;
  --surface-2: #F4F8EC;
  --ink: #2A1C10;
  --ink-2: #4A3A2A;
  --muted: #7B7864;
  --line: #DCE6CC;
  --accent: #A3DC72;
  --accent-ink: #1E3A10;
  --dark: #2F6B2A;
  --dark-ink: #FFF8C8;
  --warn: #B4540A;
  --warn-soft: #FCEBD6;
  --danger: #C2321F;
  --now: #FF5B2E;

  --t-flight: #5B7CFA; --t-train: #14A38B; --t-bus: #E39A23; --t-walk: #9C9890; --t-ferry: #2E95D3;
  --t-hotel: #8F6BF0; --t-food: #F0643C; --t-sight: #2FA866; --t-shop: #DB5AA4; --t-other: #8A8780;

  --r-xl: 26px; --r-lg: 20px; --r: 14px;
  --shadow: 0 1px 0 rgba(0,0,0,.02), 0 8px 24px -14px rgba(40,70,20,.22);
  --font: "Manrope", "PingFang HK", "PingFang TC", "Noto Sans HK", "Noto Sans CJK TC", "Microsoft JhengHei", system-ui, sans-serif;
  --font-ja: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", "Meiryo", var(--font);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F150D; --surface: #182116; --surface-2: #1F2A1C;
    --ink: #EEF3E6; --ink-2: #CFD8C4; --muted: #96A08A; --line: #2C3A27;
    --dark: #BFE59A; --dark-ink: #142410;
    --warn: #F2A44B; --warn-soft: #3A2A14; --danger: #FF7B6B;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 500 16px/1.5 var(--font);
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
  -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
[lang="ja"] { font-family: var(--font-ja); }
.muted { color: var(--muted); }
.grow { flex: 1; min-width: 0; }
.ic { width: 18px; height: 18px; flex: none; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row.center { justify-content: center; }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.hint.warn { color: var(--warn); font-weight: 700; }
main { max-width: 720px; margin: 0 auto; padding: 0 16px 24px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: var(--bg);
  max-width: 752px; margin: 0 auto;
}
.brand { flex: 1; display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; letter-spacing: -.02em; }
.logo { width: 28px; height: 28px; border-radius: 9px; background: var(--dark); position: relative; flex: none; }
.logo::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--accent); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 6px 11px; border-radius: 999px; background: var(--surface); color: var(--ink-2); }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: #3BC46B; }
.pill.offline { background: var(--warn-soft); color: var(--warn); }
.pill.offline i { background: var(--warn); }

/* ---------- buttons ---------- */
button { font: inherit; color: inherit; }
.btn, .icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 999px; cursor: pointer; text-decoration: none; font-weight: 700;
}
.btn { padding: 11px 18px; font-size: 15px; min-height: 44px; }
.btn.dark { background: var(--dark); color: var(--dark-ink); border-color: var(--dark); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); }
.icon-btn { width: 40px; height: 40px; padding: 0; flex: none; }
.btn:active, .icon-btn:active, .chip:active, .phrase:active { transform: scale(.97); }
.chip {
  display: inline-flex; align-items: center; gap: 5px; min-height: 36px;
  font-size: 13.5px; font-weight: 700; padding: 7px 13px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-2); text-decoration: none; border: 1px solid var(--line); cursor: pointer;
}
.chip .ic { width: 15px; height: 15px; }
.chip.dark { background: var(--dark); color: var(--dark-ink); border-color: var(--dark); }
.chip.accent { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.chip.danger { color: var(--danger); }
.chip.more { margin-left: auto; color: var(--muted); background: transparent; }
.badge { font-size: 12px; font-weight: 800; color: var(--ink-2); }
.badge + .badge::before { content: "· "; color: var(--muted); }
body.is-offline a.chip[href^="http"] { opacity: .5; }
.speak {
  flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--surface-2); color: var(--ink); display: grid; place-items: center;
}
.speak:active { background: var(--accent); }
.speak.sm { width: 28px; height: 28px; display: inline-grid; vertical-align: middle; margin-left: 6px; }
.speak.sm .ic { width: 14px; height: 14px; }

/* ---------- tab bar ---------- */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 20;
  bottom: calc(12px + env(safe-area-inset-bottom));
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  width: min(420px, calc(100vw - 24px)); padding: 6px; border-radius: 999px;
  background: var(--dark); box-shadow: 0 12px 32px -10px rgba(0,0,0,.45);
}
.tabbar button {
  border: 0; background: none; padding: 7px 0; font-size: 12px; font-weight: 700; border-radius: 999px; cursor: pointer;
  color: color-mix(in srgb, var(--dark-ink) 62%, transparent);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.tabbar button .ic { width: 20px; height: 20px; }
.tabbar button.active { background: var(--accent); color: var(--accent-ink); }

/* ---------- day tabs ---------- */
.daytabs {
  position: sticky; top: calc(60px + env(safe-area-inset-top)); z-index: 15;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 4px 0 12px; background: var(--bg);
}
.daytab {
  border: 1px solid var(--line); background: var(--surface); border-radius: 18px; padding: 8px 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; line-height: 1.2;
}
.daytab span { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.daytab b { font-size: 20px; font-weight: 800; letter-spacing: -.03em; }
.daytab.on { background: var(--dark); color: var(--dark-ink); border-color: var(--dark); }
.daytab.on span { color: color-mix(in srgb, var(--dark-ink) 65%, transparent); }
.daytab.today:not(.on) { border: 2px solid var(--accent); }

.count { display: flex; align-items: baseline; gap: 8px; background: var(--accent); color: var(--accent-ink); border-radius: var(--r-lg); padding: 12px 18px; margin-bottom: 12px; }
.count b { font-size: 34px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.count span { font-weight: 800; }

.dayhead { padding: 6px 2px 16px; display: grid; gap: 8px; }
.eyebrow { font-size: 12.5px; font-weight: 800; letter-spacing: .04em; color: var(--muted); }
.dayhead h1 { font-size: clamp(26px, 7vw, 36px); font-weight: 800; letter-spacing: -.035em; line-height: 1.1; }
.dayhead .muted { font-size: 14px; }
.pagehead { padding: 10px 2px 16px; display: grid; gap: 6px; }
.pagehead h1 { font-size: clamp(30px, 8vw, 40px); font-weight: 800; letter-spacing: -.04em; }
.pagehead .muted { font-size: 14px; }

/* ---------- schedule list ---------- */
.list { display: grid; gap: 10px; }
.item { display: grid; grid-template-columns: 52px 1fr; gap: 10px; align-items: start; }
.when {
  display: flex; flex-direction: column; align-items: flex-end; gap: 3px; padding-top: 12px;
  font-variant-numeric: tabular-nums; line-height: 1.15; text-align: right;
}
.when b { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.when .to { font-size: 12px; color: var(--muted); font-weight: 700; white-space: nowrap; }
.when .dur, .legend .dur {
  font-size: 11px; font-weight: 800; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 1px 7px; white-space: nowrap;
}
.legend { font-size: 12px; color: var(--muted); margin: 0 2px 8px; display: flex; gap: 6px; align-items: center; }
.legend b { color: var(--ink); }
.card { background: var(--surface); border-radius: var(--r-xl); padding: 14px; box-shadow: var(--shadow); min-width: 0; }
.card + .card { margin-top: 12px; }
.list .card + .card { margin-top: 0; }
.head { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.dot { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--tc, var(--t-other)); }
.dot .ic { width: 17px; height: 17px; }
.kind { font-size: 12px; font-weight: 800; color: var(--tc, var(--muted)); letter-spacing: .02em; }
.nowtag { background: var(--now); color: #fff; border-radius: 999px; padding: 1px 8px; margin-left: 4px; font-size: 11px; }
.title { font-size: 18px; font-weight: 800; letter-spacing: -.015em; line-height: 1.3; margin-top: 1px; }
.title .ja { display: inline; font-size: 15px; font-weight: 600; color: var(--ink-2); letter-spacing: 0; }
.route { font-size: 14px; margin-top: 4px; color: var(--ink-2); line-height: 1.45; }
.route span { color: var(--muted); font-size: 13px; }
.route.big { font-size: 15px; margin: 6px 0 4px; }
.note { font-size: 13.5px; color: var(--ink-2); margin: 10px 0 0; }
.card .row { margin-top: 12px; }
.item.done .card { opacity: .55; }
.item.done .title { text-decoration: line-through; }
.item.next .card { outline: 2px solid var(--now); }
.item.next .when b { color: var(--now); }

.walk {
  display: flex; align-items: center; gap: 10px; margin-left: 62px; padding: 6px 12px;
  border-left: 2px dashed var(--line); color: var(--muted); font-size: 13.5px; font-weight: 600;
}
.walk .t { font-variant-numeric: tabular-nums; font-weight: 800; color: var(--ink-2); min-width: 40px; }
.walk .ic { width: 16px; height: 16px; }
.walk .mini { font-size: 12.5px; font-weight: 800; color: var(--ink); text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }
.walk.done { opacity: .5; }

.t-flight { --tc: var(--t-flight); } .t-train { --tc: var(--t-train); } .t-bus { --tc: var(--t-bus); }
.t-walk { --tc: var(--t-walk); } .t-ferry { --tc: var(--t-ferry); } .t-hotel { --tc: var(--t-hotel); }
.t-food { --tc: var(--t-food); } .t-sight { --tc: var(--t-sight); } .t-shop { --tc: var(--t-shop); } .t-other { --tc: var(--t-other); }

/* ---------- photos ---------- */
.pics { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; }
.pics::-webkit-scrollbar { display: none; }
.pic {
  flex: none; width: 31%; max-width: 150px; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden;
  border: 0; padding: 0; background: var(--surface-2); cursor: zoom-in;
}
.pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pic.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }
.pic.add {
  width: 74px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 1.5px dashed var(--line); background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; cursor: pointer;
}
.pics.big .pic { width: 46%; max-width: 260px; }
.pics.big .pic.add { width: 90px; }

/* ---------- sheet (詳情) ---------- */
.sheet-title { display: flex; gap: 12px; align-items: flex-start; }
.sheet-title .title { font-size: 22px; }
.sheet .modal-body > * + * { margin-top: 14px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 14.5px; }
.kv dt { color: var(--muted); font-weight: 700; white-space: nowrap; }
.kv dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.planb { background: var(--warn-soft); border-radius: var(--r); padding: 12px 14px; font-size: 14px; }
.planb b { color: var(--warn); font-size: 12.5px; }
.sec { background: var(--surface-2); border-radius: var(--r-lg); padding: 14px; }
.sec h4 { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; margin-bottom: 8px; }
.sec h4 a { margin-left: auto; font-size: 13px; color: var(--muted); }
.menu { list-style: none; margin: 0; padding: 0; }
.menu li { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.menu li:first-child { border-top: 0; }
.menu b { display: block; font-size: 15px; }
.menu .mja { display: block; font-size: 13.5px; color: var(--muted); }
.menu small { display: block; font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.menu .price { font-weight: 800; font-size: 14px; white-space: nowrap; }
.tt { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.tt th { text-align: left; font-size: 12px; color: var(--muted); padding: 0 8px 6px 0; }
.tt td { padding: 8px 8px 8px 0; border-top: 1px solid var(--line); }
.tt tr.pick td { background: color-mix(in srgb, var(--accent) 55%, transparent); }
.tt tr.nextrow td b { color: var(--now); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 6px; border-top: 1px solid var(--line); }
.actions .btn { padding: 9px 14px; font-size: 14px; }

/* ---------- bookings ---------- */
.booking .dot { width: 40px; height: 40px; }
.ref { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 20px; font-weight: 800; letter-spacing: .06em; margin-top: 6px; }

/* ---------- phrases ---------- */
.phr h2, .card h2 { font-size: 17px; font-weight: 800; margin-bottom: 8px; }
.phrase {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer;
  background: none; border: 0; border-top: 1px solid var(--line); padding: 12px 2px;
}
.phr h2 + .phrase { border-top: 0; }
.phrase b { display: block; font-size: 19px; font-weight: 700; }
.phrase .ro { display: block; font-size: 13px; color: var(--muted); }
.phrase .zh { display: block; font-size: 14px; color: var(--ink-2); font-weight: 700; }
.phrase .ic { width: 22px; height: 22px; color: var(--muted); }
ul.plain { margin: 0; padding-left: 18px; font-size: 14.5px; }
ul.plain li { margin: 6px 0; }
a.tel { font-weight: 800; font-size: 18px; }

/* ---------- modal ---------- */
dialog {
  border: 0; padding: 0; border-radius: var(--r-xl); width: min(640px, calc(100vw - 16px));
  max-height: calc(100dvh - 16px); background: var(--surface); color: var(--ink);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.5);
}
dialog::backdrop { background: rgba(10,10,10,.5); }
.modal-form { display: flex; flex-direction: column; max-height: calc(100dvh - 16px); }
.modal-form > header { display: flex; align-items: center; gap: 8px; padding: 14px 14px 6px 20px; }
.modal-form > header h2 { flex: 1; font-size: 14px; font-weight: 800; color: var(--muted); letter-spacing: .04em; }
.modal-body { padding: 4px 20px 20px; overflow-y: auto; }
.modal-form > footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.modal-body label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 12px; }
.modal-body input:not([type="checkbox"]), .modal-body textarea {
  display: block; width: 100%; margin-top: 4px; padding: 11px 12px; font: 500 16px/1.4 var(--font);
  color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px;
}
.modal-body label.check { display: flex; gap: 8px; align-items: center; color: var(--ink-2); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.bigbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.bigbtns .btn { min-height: 56px; font-size: 17px; }

.taxi { text-align: center; padding: 6px 0 10px; }
.taxi .phrase-big { font-size: 22px; font-weight: 700; }
.taxi .big { font-size: clamp(32px, 9vw, 52px); font-weight: 800; line-height: 1.2; margin: 20px 0 10px; overflow-wrap: anywhere; }
.taxi .addr { font-size: 19px; font-weight: 600; margin-bottom: 18px; overflow-wrap: anywhere; }
.taxi-modal { width: min(720px, calc(100vw - 16px)); }

.viewer-modal { width: min(960px, calc(100vw - 16px)); }
.viewer { position: relative; background: #000; border-radius: var(--r-lg); overflow: hidden; margin-bottom: 12px; }
.viewer img { width: 100%; max-height: 70dvh; object-fit: contain; display: block; }
.viewer .nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.85); color: #111; display: grid; place-items: center; cursor: pointer;
}
.viewer .nav.l { left: 10px; } .viewer .nav.r { right: 10px; }
.viewer .cap { color: #ddd; font-size: 12px; padding: 8px 12px; background: #111; }

#toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--dark); color: var(--dark-ink); padding: 11px 16px; border-radius: 999px; font-size: 14px; font-weight: 700;
  display: none; gap: 14px; align-items: center; z-index: 50; max-width: calc(100vw - 32px);
}
#toast.show { display: flex; }
#toast span { flex: 1; }
#toast button { white-space: nowrap; background: var(--accent); color: var(--accent-ink); border: 0; font-weight: 800; cursor: pointer; padding: 4px 10px; border-radius: 999px; }

@media (max-width: 420px) {
  .item { grid-template-columns: 44px 1fr; gap: 8px; }
  .walk { margin-left: 52px; }
  .card { padding: 12px; }
  .title { font-size: 17px; }
}

/* ---------- v6 additions ---------- */
.item { grid-template-columns: 62px 1fr; }
.xrow { display: flex; gap: 8px; font-size: 14px; margin-top: 8px; line-height: 1.45; color: var(--ink-2); }
.xrow .xk { flex: none; font-size: 11.5px; font-weight: 800; color: var(--muted); background: var(--surface-2); border-radius: 6px; padding: 2px 6px; height: fit-content; margin-top: 1px; }
.item.is-walk .card { background: color-mix(in srgb, var(--surface) 70%, var(--bg)); box-shadow: none; border: 1px dashed var(--line); }
.item.is-walk .title { font-size: 16px; }
.chip.tabelog { background: #fff4e5; color: #b4540a; border-color: #f6d8b2; }
.wxbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.wx { font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
.wx small { color: var(--muted); }
.kv.xl { background: var(--surface-2); border-radius: var(--r); padding: 12px 14px; }
.tb .tbrow { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.tb .tbrow:first-of-type { border-top: 0; }
.tb .score { flex: none; width: 64px; height: 64px; border-radius: 14px; background: #fff4e5; color: #b4540a; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.tb .score b { font-size: 22px; font-weight: 800; line-height: 1; }
.tb .score small { font-size: 10px; font-weight: 700; }
.tb .tbname { font-weight: 800; }
.tb ul { margin: 6px 0 8px; padding-left: 18px; font-size: 13.5px; }
.omap { position: relative; border-radius: var(--r); overflow: hidden; background: #e8e6df; }
.omap canvas { display: block; width: 100%; height: 240px; }
.omap-attr { position: absolute; right: 6px; bottom: 4px; font-size: 9.5px; color: #555; background: rgba(255,255,255,.7); padding: 0 4px; border-radius: 4px; margin: 0; }
@media (max-width: 420px) { .item { grid-template-columns: 54px 1fr; gap: 8px; } .when b { font-size: 16px; } }

/* ---------- interactive map ---------- */
.omap { height: 300px; }
.omap .leaf { position: absolute; inset: 0; z-index: 0; background: #e8e6df; }
.omap .leaf.empty::after { content: "未有地點座標"; position: absolute; inset: 0; display: grid; place-items: center; color: #777; font-weight: 700; pointer-events: none; z-index: 500; }
.omap-full { position: absolute; top: 10px; right: 10px; z-index: 1000; width: 38px; height: 38px; border-radius: 10px; border: 0; background: #fff; color: #111; font-size: 20px; box-shadow: 0 2px 8px rgba(0,0,0,.25); cursor: pointer; }
.omap.full { position: fixed; inset: 0; height: auto; z-index: 9999; border-radius: 0; }
.omap.full .omap-full { top: calc(12px + env(safe-area-inset-top)); }
.leaflet-container { font: inherit; }
.leaflet-touch .leaflet-bar a { width: 38px; height: 38px; line-height: 38px; font-size: 20px; }
.omap-tip { font-weight: 800; font-size: 12px; padding: 2px 6px; border-radius: 6px; }
.tile-missing { background: repeating-linear-gradient(45deg, #ece9e1 0 10px, #e3e0d8 10px 20px); }
.pinpanel { margin-top: 10px; padding: 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.pinpaste { display: block; font-size: 13px; color: var(--muted); font-weight: 700; margin-top: 10px; }
.pinpaste input { flex: 1; min-width: 0; padding: 9px 10px; font: 500 16px var(--font); border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--ink); }
.pinpaste .row { margin-top: 6px; flex-wrap: nowrap; }

.bigbtns.one { grid-template-columns: 1fr; }

/* ---------- 就地修改 ---------- */
.efs { display: flex; flex-direction: column; gap: 2px; background: var(--surface-2); border-radius: var(--r); padding: 6px 8px; }
.ef { display: flex; gap: 8px; align-items: flex-start; padding: 6px; border-radius: 10px; cursor: text; font-size: 14.5px; line-height: 1.45; }
.ef:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.ef-k { flex: none; min-width: 64px; font-size: 12px; font-weight: 800; color: var(--muted); padding-top: 2px; }
.ef-v { flex: 1; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); }
.ef-v a, .xrow a, .tb a { color: inherit; text-decoration: underline; text-decoration-color: var(--muted); text-underline-offset: 2px; overflow-wrap: anywhere; }
.ef-pen { flex: none; font-size: 13px; color: var(--muted); opacity: .55; padding-top: 1px; }
.ef.empty .ef-v i { font-style: normal; opacity: .7; }
.ef.editing { cursor: default; background: var(--surface); box-shadow: 0 0 0 2px var(--accent); flex-wrap: wrap; }
.ef.editing .ef-pen { display: none; }
.ef.editing .ef-v { flex-basis: 100%; white-space: normal; }
.ef.editing textarea { width: 100%; font: inherit; font-size: 16px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); resize: vertical; }
.ef.editing .row { margin-top: 6px; }
.ef.h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; padding: 2px 4px; margin: 2px -4px; }
.ef.h1 .ef-v { line-height: 1.15; }
.dayhead .ef:not(.h1) { color: var(--muted); padding: 2px 4px; margin: 0 -4px; }
.dayhead .ef:not(.h1) .ef-v { color: var(--ink-2); }
.card > .ef { margin: 6px -6px 0; font-size: 14px; }
.card > .ef .ef-k { min-width: 0; font-size: 11.5px; background: var(--surface-2); border-radius: 6px; padding: 2px 6px; }
.card > .ef .ef-v { color: var(--ink-2); }
.ef.compact { display: inline-flex; padding: 3px 9px; margin-left: 8px; border: 1px dashed var(--line); border-radius: 999px; font-size: 12px; vertical-align: middle; cursor: pointer; }
.ef.compact .ef-k { min-width: 0; padding: 0; color: var(--ink-2); }
.ef.compact .ef-pen { display: none; }
.ef.compact.editing { display: flex; margin: 8px 0 0; border-radius: 12px; border-style: solid; font-size: 14px; font-weight: 400; letter-spacing: 0; }
.ef.ro { cursor: pointer; }
.addmore .ef.compact { margin-left: 0; }
h4 .ef.compact { font-weight: 700; }
code { font-size: .92em; background: var(--surface-2); border-radius: 5px; padding: 1px 5px; }
label.field { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-top: 10px; }
label.field input { display: block; width: 100%; margin-top: 4px; font: inherit; font-size: 16px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }

/* ---------- 相片排序 ---------- */
.pic { position: relative; }
.picbtn { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.pics.none .pic.add { width: auto; flex-direction: row; gap: 4px; padding: 4px 12px; aspect-ratio: auto; height: 32px; border-radius: 999px; }
.pic.arrange { width: 74px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: 18px; font-weight: 700; cursor: pointer; }
.pic.arrange span { font-size: 12px; }
.pics.arranging { flex-wrap: wrap; overflow: visible; }
.pics.arranging .arrhint { flex-basis: 100%; margin: 0 0 2px; }
.pics.arranging .pic[data-key] { width: calc(50% - 4px); max-width: none; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.pic[data-key] img { pointer-events: none; -webkit-user-drag: none; }
.pics:not(.arranging) .pic[data-key] { cursor: zoom-in; }
.pic.arr { outline: 2px solid var(--accent); outline-offset: -2px; }
.pic.hid img { opacity: .35; filter: grayscale(1); }
.pic.dragging { opacity: .25; }
.pic.ghost { position: fixed; z-index: 9999; pointer-events: none; box-shadow: 0 12px 30px rgba(0,0,0,.35); opacity: .95; margin: 0; }
.picgrip { position: absolute; top: 6px; left: 6px; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: rgba(255,255,255,.9); color: #121212; font-size: 16px; }
.picctl { position: absolute; inset: auto 0 0 0; display: flex; gap: 6px; justify-content: flex-end; padding: 6px; background: linear-gradient(transparent, rgba(0,0,0,.55)); }
.picctl button { height: 30px; padding: 0 10px; border-radius: 999px; border: 0; background: rgba(255,255,255,.94); color: #121212; font-size: 12.5px; font-weight: 800; cursor: pointer; }
.picctl button.del { background: #fff; color: #C0392B; }
.pics.arranging .pic.add, .pics.arranging .pic.arrange { width: calc(25% - 6px); aspect-ratio: 4 / 3; }
.pics.arranging .picbtn { cursor: grab; }

/* ---------- 日語：平假名、羅馬拼音、編輯 ---------- */
ruby { ruby-position: over; }
rt { font-size: .5em; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.phrase b { line-height: 1.9; }
.phrase .kana { display: block; font-size: 11px; font-weight: 600; color: var(--muted); line-height: 1.2; }
.phrase-wrap { position: relative; }
.phr h2 + .phrase-wrap .phrase, .phr .hint + .phrase-wrap .phrase { border-top: 0; }
.phr-ctl { display: flex; gap: 6px; justify-content: flex-end; padding: 0 0 10px; }
.phr h2 { display: flex; gap: 6px; align-items: center; }
.phr h2 .chip { font-size: 12px; padding: 4px 10px; }
.addphr { margin-top: 10px; }
.phr-preview { font-size: 22px; font-weight: 700; line-height: 2; min-height: 1em; margin: 6px 0; }
.taxi .big ruby rt { font-size: .38em; }

/* ---------- 相片左右箭咀 ---------- */
.pics-wrap { position: relative; }
.pics-nav { display: none; position: absolute; top: calc(50% + 6px); transform: translateY(-50%); z-index: 2; width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid var(--ink); background: var(--surface); color: var(--ink); place-items: center; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,.15); }
.pics-nav.l { left: -6px; } .pics-nav.r { right: -6px; }
.pics-wrap.ovf .pics-nav { display: grid; }
.pics-wrap.ovf.at-start .pics-nav.l, .pics-wrap.ovf.at-end .pics-nav.r { display: none; }
@media (hover: none) { .pics-wrap .pics-nav { width: 30px; height: 30px; opacity: .85; } }

/* ---------- 位置 ---------- */
.locrows { background: var(--surface); border-radius: var(--r); padding: 6px 10px 8px; margin: 8px 0 10px; }
.locrow { display: flex; gap: 8px; align-items: center; padding: 6px 0; }
.locrow + .locrow { border-top: 1px solid var(--line); }
.locrow .ef-k { min-width: 64px; }
.locrow b { display: block; font-size: 14.5px; overflow-wrap: anywhere; }
.locrow small { font-size: 11.5px; color: var(--muted); }
.locrow small.mine { color: var(--dark); font-weight: 800; }
.locsearch { display: flex; gap: 8px; align-items: stretch; margin-top: 8px; }
.locsearch textarea { flex: 1; font: inherit; font-size: 16px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); resize: vertical; }
.locres { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; max-height: 34vh; overflow: auto; }
.locopt { text-align: left; padding: 9px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; }
.locopt.on { border-color: var(--dark); background: color-mix(in srgb, var(--accent) 22%, var(--surface)); }
.locopt small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.omap.pickmap { height: 260px; }
.locpick .modal-body > * + * { margin-top: 8px; }
.sug { display: block; margin: 8px 0; font-size: 15px; }
.sug.info { color: var(--warn); font-weight: 700; font-size: 14px; }
