/* travel-info.app — look taken from YD-TW\備用網站\論壇版型-2026-10-15 (acid green, stone-grey grid, thread list) */
:root {
  --bg: #d9d9d6;
  --grid: rgba(0, 0, 0, 0.07);
  --sf: #fff;
  --sf2: #f4f4f2;
  --ln: #e7e7e4;
  --ln2: #d2d2ce;
  --ink: #1d1d1f;
  --ink2: #3a3a3c;
  --ink3: #6b6b70;
  --ac: #2f7a0b;
  --acid: linear-gradient(135deg, #eaff5c 0%, #9dff2f 45%, #22d65e 100%);
  --on: #0b1a02;
  --f: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
}
body {
  font: 400 15px / 1.75 var(--f);
  color: var(--ink);
  background:
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 20px 20px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 20px 20px,
    var(--bg);
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
}
:focus-visible {
  outline: 2px solid var(--ac);
  outline-offset: 2px;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* header + country dropdowns */
.mast {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--sf) 94%, transparent);
  border-bottom: 1px solid var(--ln);
  backdrop-filter: blur(8px);
}
.mast .wrap {
  max-width: 1120px;
  margin: 0 auto;
  min-height: 54px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 16px;
  white-space: nowrap;
}
.logo img {
  width: 32px;
  height: 32px;
}
.nav {
  display: flex;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.dd {
  position: relative;
}
.dd > button {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 54px;
  padding: 0 10px;
  border: 0;
  background: none;
  color: var(--ink2);
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
.dd > button::after {
  content: "";
  width: 6px;
  height: 6px;
  border: solid var(--ink3);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg) translateY(-2px);
}
.dd > button:hover,
.dd.open > button {
  color: var(--ac);
}
.dd > button.on {
  color: var(--ink);
  font-weight: 700;
  box-shadow: inset 0 -2px 0 var(--ac);
}
.menu {
  position: absolute;
  top: 100%;
  left: 0;
  display: none;
  min-width: 260px;
  padding: 8px;
  background: var(--sf);
  border: 1px solid var(--ln);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  max-height: calc(100vh - 72px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.dd.open .menu {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}
@media (hover: hover) {
  .dd:hover .menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
  }
}
.menu a {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--ink2);
  white-space: nowrap;
}
.menu a:hover {
  background: var(--sf2);
  color: var(--ac);
}
.menu a.all {
  grid-column: 1 / -1;
  border-bottom: 1px solid var(--ln);
  border-radius: 8px 8px 0 0;
  margin-bottom: 4px;
  font-weight: 700;
  color: var(--ink);
}

/* content surface */
.pg {
  max-width: 1120px;
  margin: 20px auto 32px;
  padding: 24px clamp(16px, 3vw, 32px) 36px;
  background: var(--sf);
  border: 1px solid var(--ln);
  border-radius: 14px;
}
@media (max-width: 1160px) {
  .pg {
    margin-inline: 12px;
  }
}
.home {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 32px;
  align-items: start;
}
.crumb {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--ink3);
}
.crumb b {
  color: var(--ac);
}
.crumb a:hover {
  color: var(--ac);
}
.bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  border-bottom: 1px solid var(--ln2);
}
.tabs {
  display: flex;
  gap: 22px;
}
.tabs .on {
  margin-bottom: -1px;
  padding: 6px 0 9px;
  border-bottom: 2px solid;
  border-image: var(--acid) 1;
  font: 600 15px / 1 var(--f);
}
.cnt {
  padding-bottom: 9px;
  font-size: 12.5px;
  color: var(--ink3);
}

/* thread rows */
.list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 0 20px;
  padding: 20px 12px;
  border-bottom: 1px solid var(--ln);
  transition:
    background 0.15s,
    box-shadow 0.15s;
}
.row:hover {
  background: var(--sf2);
  box-shadow: inset 3px 0 0 var(--ac);
}
.cv {
  display: flex;
  align-items: flex-end;
  width: 180px;
  height: 120px;
  padding: 10px 12px;
  border-radius: 8px;
  overflow: hidden;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.35;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
  background: linear-gradient(135deg, var(--hue), color-mix(in srgb, var(--hue) 45%, #111));
}
.c {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 120px;
}
.t {
  margin: 0;
  font: 700 18px / 1.5 var(--f);
}
.t a:hover {
  color: var(--ac);
}
.ex {
  display: -webkit-box;
  margin: 8px 0 0;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink3);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-top: auto;
  padding-top: 10px;
  font-size: 13px;
  color: var(--ink3);
}
.tag {
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, var(--ac) 45%, transparent);
  border-radius: 999px;
  font-size: 12px;
  line-height: 22px;
  color: var(--ac);
  white-space: nowrap;
  max-width: 100%; /* 320-wide phones: a long tag ends in … instead of pushing the page sideways */
  overflow: hidden;
  text-overflow: ellipsis;
}
.tag:hover {
  background: color-mix(in srgb, var(--ac) 12%, transparent);
}

/* side boxes */
.side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 13px;
}
.box {
  padding: 16px 18px;
  background: var(--sf);
  border: 1px solid var(--ln);
  border-radius: 10px;
}
.box h4 {
  margin: 0 0 10px;
  padding-left: 10px;
  border-left: 3px solid var(--ac);
  font: 700 13px / 1.3 var(--f);
  letter-spacing: 0.08em;
}
.box p {
  margin: 0;
  line-height: 1.75;
  color: var(--ink2);
}
.stat p {
  display: flex;
  align-items: center;
  gap: 12px;
}
.stat b {
  font: 800 34px / 1 var(--f);
  color: var(--ac);
}
.stat span {
  font-size: 12.5px;
  color: var(--ink3);
}
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.links a {
  padding: 2px 10px;
  border: 1px solid var(--ln2);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--ink2);
}
.links a:hover {
  border-color: var(--ac);
  color: var(--ac);
}
.links.big {
  margin: 0 0 20px;
}
.links.big a {
  padding: 5px 14px;
  font-size: 14px;
}
.btn {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--acid);
  color: var(--on);
  font-weight: 700;
  cursor: pointer;
}
.klk {
  min-height: 340px;
  margin: 10px 0;
}
.pop .klk {
  margin-inline: -12px;
}
.trp {
  margin: 10px 0;
}
.trp iframe {
  display: block;
  width: 320px;
  max-width: 100%;
  height: 320px;
  border: 0;
}
.kks {
  display: flex;
  gap: 8px;
  margin: 10px 0;
}
.kks input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--ln2);
  border-radius: 999px;
  font: inherit;
}
.shop {
  margin: 28px 0;
  padding: 14px 16px;
  border: 1px solid var(--ln2);
  border-radius: 12px;
}
.shop p {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}
.shop small {
  color: var(--ink3);
}

/* article body */
.doc {
  max-width: 760px;
}
.doc h1 {
  margin: 4px 0 10px;
  font: 800 28px / 1.35 var(--f);
}
.lede {
  margin: 0 0 20px;
  font-size: 16px;
  color: var(--ink2);
}
.doc h2,
.sh {
  margin: 32px 0 12px;
  padding-left: 12px;
  border-left: 3px solid var(--ac);
  font: 700 19px / 1.4 var(--f);
}
.doc p {
  margin: 0 0 12px;
}
.facts {
  width: 100%;
  margin: 0 0 8px;
  border-collapse: collapse;
  font-size: 14px;
}
.facts th {
  width: 7em;
  padding: 10px 12px;
  background: var(--sf2);
  border-bottom: 1px solid var(--ln);
  text-align: left;
  vertical-align: top;
  font-weight: 700;
  color: var(--ink2);
}
.facts td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--ln);
  vertical-align: top;
}
.facts td:last-child {
  width: 1%;
  white-space: nowrap;
}
.facts small {
  display: block;
  color: var(--ink3);
  font-size: 12px;
}
.items {
  margin: 0 0 8px;
  padding-left: 20px;
}
.items li {
  margin: 6px 0;
}
.route {
  margin: 0 0 8px;
  padding-left: 24px;
}
.route li {
  margin: 10px 0;
}
.route li::marker {
  font-weight: 700;
}
.route small {
  display: block;
  color: var(--ink3);
  font-size: 12px;
}
.route p {
  margin: 2px 0 0;
}
.warnings li {
  list-style: none;
  position: relative;
}
.warnings li::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 0.35em;
  width: 14px;
  height: 14px;
  background: currentColor;
  -webkit-mask:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3'/%3E%3Cpath d='M12 9v4'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3'/%3E%3Cpath d='M12 9v4'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E")
    center / contain no-repeat;
  opacity: 0.75;
}
.ref {
  margin-left: 2px;
  font-size: 11.5px;
  color: var(--ac);
  vertical-align: 2px;
}
.ref:hover {
  text-decoration: underline;
}
.nb {
  margin-left: 6px;
  padding: 0 7px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: none;
  color: var(--ln2);
  font-size: 11px;
  line-height: 19px;
  cursor: pointer;
  vertical-align: 1px;
  transition:
    color 0.15s,
    border-color 0.15s;
}
li:hover > .nb,
tr:hover .nb,
.nb:focus-visible {
  border-color: var(--ln2);
  color: var(--ink3);
}
@media (hover: none) {
  .nb {
    color: var(--ink3);
  }
}
.nb:hover {
  border-color: var(--ac);
  color: var(--ac);
}
.nb.added {
  border-color: var(--ac);
  background: color-mix(in srgb, var(--ac) 12%, transparent);
  color: var(--ac);
}
.faq {
  margin: 0 0 8px;
  padding: 10px 14px;
  border: 1px solid var(--ln);
  border-radius: 10px;
}
.faq summary {
  font-weight: 700;
  cursor: pointer;
}
.faq p {
  margin: 8px 0 0;
}
.sources {
  font-size: 13px;
  color: var(--ink3);
}
.sources .st {
  margin-right: 6px;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--sf2);
  font-size: 11px;
}
.sources a:hover {
  color: var(--ac);
}
.verify {
  margin-top: 24px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--sf2);
  font-size: 13px;
  color: var(--ink3);
}
.hint {
  color: var(--ink3);
  font-size: 13.5px;
}
.mini {
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
  color: var(--ink2);
}
.mini li {
  margin: 8px 0;
}
.mini .ty {
  margin: 0 6px;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--sf2);
  font-size: 11.5px;
  color: var(--ink3);
}

/* left tools */
.tools {
  position: fixed;
  top: 104px;
  left: max(8px, calc(50% - 560px - 144px));
  z-index: 20;
  display: flex;
  flex-direction: column;
  width: 128px;
  max-height: calc(
    100vh -
    104px -
    96px
  ); /* phone landscape (390 tall): scroll the rail instead of losing tools under the ‹ button */
  overflow-y: auto;
  white-space: nowrap;
  padding: 8px 0;
  background: var(--sf);
  border: 1px solid var(--ln);
  border-radius: 12px;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.08);
}
.tools h5 {
  margin: 2px 16px 6px;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink3);
}
.tools button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 0;
  background: none;
  color: var(--ink3);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.tools button:hover {
  color: var(--ink);
}
.tools button.on {
  color: var(--ac);
  font-weight: 700;
}
.tools button.on::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(#eaff5c, #22d65e);
}
.pop {
  position: fixed;
  top: 104px;
  left: calc(50% - 560px - 6px);
  z-index: 26;
  width: 330px;
  max-height: calc(100vh - 124px);
  overflow: auto;
  padding: 16px 18px;
  background: var(--sf);
  border: 1px solid var(--ln);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
  font-size: 14px;
}
.pop[hidden] {
  display: none;
}
.pop h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 15px;
}
.pop .x {
  margin-left: auto;
  border: 0;
  background: none;
  font-size: 18px;
  line-height: 1;
  color: var(--ink3);
  cursor: pointer;
}
.pop label {
  display: block;
  margin: 10px 0 4px;
  font-size: 12.5px;
  color: var(--ink3);
}
.pop input,
.pop select {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--ln2);
  border-radius: 8px;
  background: var(--sf2);
  font: inherit;
}
.out {
  margin-top: 12px;
  padding: 12px;
  border-radius: 10px;
  background: var(--sf2);
  font-size: 13px;
}
.out b {
  display: block;
  font-size: 20px;
  color: var(--ac);
}
.out.bad b {
  color: #c0392b;
}
.note {
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--ink3);
}
.plug {
  width: 100%;
  border-collapse: collapse;
}
.plug td,
.plug th {
  padding: 4px 6px;
  border-bottom: 1px solid var(--ln);
  text-align: left;
  font-size: 13px;
}
.chk {
  list-style: none;
  margin: 0;
  padding: 0;
}
.chk label {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
  padding: 4px 0;
  font-size: 13.5px;
  color: var(--ink2);
}
.chk input {
  width: auto;
  height: auto;
}
.chk li {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.chk li button {
  border: 0;
  background: none;
  color: var(--ink3);
  font-size: 14px;
  cursor: pointer;
  padding: 2px 6px;
}
#packAdd input {
  flex: 1 1 0;
}
.chk input:checked + span {
  text-decoration: line-through;
  color: var(--ink3);
}
.opt {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--ln);
  border-radius: 10px;
  font-size: 13px;
}
.opt b {
  display: block;
  font-size: 14px;
}
.opt small {
  color: var(--ink3);
}
.nday h4 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 4px;
  margin: 14px 0 2px;
  font-size: 13.5px;
}
.nday h4 span {
  flex: 1 1 100%;
}
.nday h4 input[type="date"] {
  margin-left: auto;
}
.nday h4 small {
  font-weight: 400;
  color: var(--ink3);
}
.nday h4 input[type="date"] {
  flex: none;
  width: auto;
  height: 26px;
  padding: 0 4px;
  font-size: 11.5px;
}
.npaste,
.nimp {
  margin: 12px 0;
}
.npaste textarea,
.nimp textarea {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--ln2);
  border-radius: 8px;
  background: var(--sf2);
  font: inherit;
  resize: vertical;
}
.bkform p {
  margin: 10px 0 0;
}
.nday h4 button,
.notes .na button {
  border: 0;
  background: none;
  color: var(--ink3);
  font-size: 14px;
  cursor: pointer;
  padding: 2px 6px;
}
.notes {
  list-style: none;
  margin: 0;
  padding: 0;
}
.notes li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid var(--ln);
  font-size: 13px;
}
.notes li > div {
  flex: 1;
  min-width: 0;
}
.notes li input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  padding: 0;
  accent-color: var(--ac);
}
.notes li.done > div > span {
  color: var(--ink3);
  text-decoration: line-through;
}
.notes .src {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--ink3);
}
.gm {
  padding: 0 8px;
  border: 1px solid var(--ln2);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 400;
  line-height: 22px;
  color: var(--ac);
  text-decoration: none;
  white-space: nowrap;
}
.gm:hover {
  border-color: var(--ac);
}
.notes .na .gm {
  order: -1; /* left end of the row, away from × */
  margin-right: auto;
}
/* notes actions in three labelled groups; 全部清除 kept apart and quiet */
.nact > p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 10px 0 0;
}
.nact > p > b {
  flex: 0 0 100%;
  margin-bottom: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink3);
}
#ntOut .nclr {
  margin: 12px 0 0;
  text-align: right;
}
#ntClear {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 11.5px;
  color: var(--ink3);
  text-decoration: underline;
  cursor: pointer;
}
#ntClear:hover {
  color: #c0392b;
}
.nroute {
  margin: 6px 0 2px;
}
.nroute .gm {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--sf2);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}
.nroute .gm .ic {
  width: 16px;
  height: 16px;
}
.notes .na {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  margin: 4px 0 0;
}
.notes .na select {
  width: auto;
  max-width: 9em;
  height: 28px;
  padding: 0 6px;
  font-size: 12px;
}
.notes li.empty {
  color: var(--ink3);
  font-size: 12px;
}
.nadd {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0 6px;
}
.nadd input {
  flex: 1 1 100%;
  width: auto;
  min-width: 0;
}
.nadd select {
  flex: 1;
  width: auto;
  min-width: 0;
  padding: 0 6px;
}
#ntOut .nb,
#packAdd .nb {
  margin: 0 4px 6px 0;
  padding: 0 12px;
  border: 1px solid var(--ln2);
  font-size: 12.5px;
  line-height: 30px;
  color: var(--ink2);
}
#ntOut .nb:hover,
#packAdd .nb:hover {
  border-color: var(--ac);
  color: var(--ac);
}
#ntOut #ntAdd {
  margin: 0;
  border-color: var(--ac);
  background: var(--ac);
  color: #fff;
}
.toolrow {
  display: none;
}

.foot {
  max-width: 1120px;
  margin: 0 auto 24px;
  padding: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  font-size: 12.5px;
  color: #38383b;
}

@media (max-width: 1399px) {
  .tools {
    display: none;
  }
  .toolrow {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--ln);
  }
  .toolrow button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border: 1px solid var(--ln2);
    border-radius: 999px;
    background: var(--sf);
    font-size: 13px;
    color: var(--ink2);
    cursor: pointer;
  }
  .toolrow button.on {
    border-color: var(--ac);
    color: var(--ac);
    font-weight: 700;
  }
  .pop {
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: min(360px, calc(100vw - 32px));
  }
}
@media (max-width: 900px) {
  .home {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 760px) {
  .pop {
    width: min(520px, calc(100vw - 32px)); /* iPhone Duo unfolded (626 wide): a usable panel, not a 360 strip */
  }
  .trw {
    position: relative;
    margin: 0 -16px 16px;
  } /* phone: the row scrolls sideways; "›" fade says there is more */
  .toolrow {
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    margin: 0;
    padding-inline: 16px;
  }
  .toolrow button {
    flex: none;
  }
  .trw::after {
    content: "›";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 13px;
    display: grid;
    place-items: center end;
    width: 48px;
    padding-right: 8px;
    background: linear-gradient(to right, transparent, var(--sf) 60%);
    color: var(--ink3);
    font-size: 22px;
    line-height: 1;
    pointer-events: none;
    transition: opacity 0.2s;
  }
  .trw.end::after {
    opacity: 0;
  }
  .mast .wrap {
    flex-wrap: wrap;
    gap: 0 12px;
    padding-top: 6px;
  }
  .nav {
    order: 3;
    flex-basis: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .dd {
    position: static;
  }
  .dd > button {
    height: 42px;
  }
  .menu {
    left: 12px;
    right: 12px;
    min-width: 0;
  }
  .pg {
    margin: 0;
    padding: 16px 16px 28px;
    border-width: 0 0 1px;
    border-radius: 0;
  }
  .cnt {
    display: none;
  }
  .row {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 0 12px;
    padding: 14px 4px;
  }
  .cv {
    width: 112px;
    height: 76px;
    font-size: 13px;
    padding: 6px 8px;
  }
  .c {
    min-height: 76px;
  }
  .t {
    font-size: 15.5px;
  }
  .ex {
    display: none;
  }
  .doc h1 {
    font-size: 23px;
  }
  .crumb {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -16px 14px;
    padding: 6px 16px;
    position: sticky;
    top: var(--mh, 84px);
    z-index: 25;
    background: var(--sf);
  } /* stays under the sticky masthead while you scroll */
  .crumb.stuck {
    box-shadow: 0 6px 10px -8px rgba(0, 0, 0, 0.25);
  }
  .crumb a {
    flex: none;
    padding: 5px 12px;
    border-radius: 999px;
    background: #1d1d1f;
    color: #fff;
    font-size: 12.5px;
  }
  .crumb a:last-of-type::before {
    content: "‹ ";
  }
  .crumb a:hover {
    color: #fff;
    background: var(--ac);
  }
  .crumb b {
    display: none;
  }
  .lead {
    display: flex;
    flex-direction: column;
  }
  .lead > .lx {
    order: 1;
  }
  .lead > .toc,
  .lead > .facts {
    order: 2;
  }
  .lead > .cover {
    order: 3;
  } /* phone: answer before photo */
  .facts tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    border-bottom: 1px solid var(--ln);
  }
  .facts th {
    grid-area: 1 / 1;
    width: auto;
    padding: 10px 0 2px;
    background: none;
    border: 0;
    color: var(--ac);
  }
  .facts td {
    grid-column: 1 / -1;
    padding: 0 0 10px;
    border: 0;
  }
  .facts td:last-child {
    grid-area: 1 / 2;
    width: auto;
    padding: 8px 0 0;
  }
}

/* article structure (coolkidlab order): dates, short answer, next, related, fits */
.dates {
  margin: 0 0 14px;
  font-size: 12.5px;
  color: var(--ink3);
}
.dates a {
  color: var(--ac);
}
.tldr {
  margin: 0 0 20px;
  padding: 14px 16px;
  border-left: 4px solid var(--ac);
  border-radius: 0 10px 10px 0;
  background: color-mix(in srgb, #9dff2f 14%, var(--sf));
}
.tldr b {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ac);
}
.tldr p {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
}
.next {
  display: block;
  margin: 28px 0 8px;
  padding: 16px 18px;
  border: 1px solid var(--ln2);
  border-radius: 12px;
  font: 700 17px / 1.5 var(--f);
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.next small {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ac);
}
.next:hover {
  border-color: var(--ac);
  box-shadow: inset 3px 0 0 var(--ac);
}
.rel {
  padding-left: 20px;
}
.rel li {
  margin: 6px 0;
}
.rel a {
  color: var(--ac);
}
.rel a:hover {
  text-decoration: underline;
}
.fits {
  margin: 24px 0 0;
  padding: 10px 14px;
  border: 1px solid var(--ln);
  border-radius: 10px;
}
.fits summary {
  font-weight: 700;
  cursor: pointer;
}
.fits ul {
  margin: 4px 0 8px;
  padding-left: 20px;
}
.fits p {
  margin: 8px 0 0;
}

.ic {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nb .ic {
  width: 11px;
  height: 11px;
  margin-right: 2px;
  vertical-align: -1px;
}
.cover {
  margin: 4px 0 20px;
}
.cover img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  background: var(--ln);
}
/* short landscape screens (iPhone Duo unfolded sideways, 890x626): a 16:9 photo would fill the whole first screen.
   Must stay after .cover img or the base rule wins. */
@media (min-width: 761px) and (max-width: 1024px) and (max-height: 700px) {
  .cover img {
    aspect-ratio: auto;
    height: 42vh;
  }
}
.toc {
  margin: 0 0 20px;
  border: 1px solid var(--ln);
  border-radius: 10px;
  font-size: 14px;
}
.toc summary {
  padding: 10px 14px;
  font-weight: 700;
  color: var(--ink2);
  cursor: pointer;
}
.toc ol {
  margin: 0;
  padding: 0 14px 12px 2.6em;
}
.toc li {
  margin: 7px 0;
}
.toc a:hover {
  color: var(--ac);
}
.doc h2 {
  scroll-margin-top: 110px;
} /* clears the sticky masthead (two rows on phones) */
.cover figcaption {
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink3);
}
.cover figcaption a {
  color: inherit;
}
.cv {
  position: relative;
}
.cv > span {
  position: relative;
}
.cv.has-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cv.has-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 40%, rgba(0, 0, 0, 0.55));
}
.cv.has-img > span {
  z-index: 1;
}

/* header search */
.srch {
  position: relative;
  flex: 0 1 220px;
  min-width: 0;
  margin-left: auto;
}
.srch input {
  width: 100%;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--ln2);
  border-radius: 999px;
  background: var(--sf2);
  font: inherit;
  font-size: 13.5px;
  color: var(--ink);
}
.srch input:focus {
  outline: none;
  border-color: var(--ac);
  background: var(--sf);
}
#qres {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: min(340px, calc(100vw - 32px));
  max-height: 70vh;
  overflow: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--sf);
  border: 1px solid var(--ln);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
#qres a {
  display: block;
  padding: 7px 10px;
  border-radius: 8px;
  line-height: 1.4;
}
#qres a:hover,
#qres a:focus {
  background: var(--sf2);
  outline: none;
}
#qres b {
  display: block;
  font-size: 14px;
}
#qres small {
  font-size: 12px;
  color: var(--ink3);
}
#qres .none {
  padding: 8px 10px;
  font-size: 13px;
  color: var(--ink3);
}
@media (max-width: 760px) {
  .srch {
    flex: 1 1 0;
    max-width: 260px;
  }
}

/* notes help (?) */
.tw {
  display: flex;
  align-items: center;
}
.tools .tw button:first-child {
  flex: 1;
}
.qm,
.tools .qm,
.toolrow .qm {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  margin-left: -4px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  background: var(--sf);
  color: var(--ink3);
  font: 700 11px / 1 var(--f);
  cursor: pointer;
  flex: none;
}
.tools .qm {
  margin: 0 10px 0 -8px;
}
.qm:hover,
.qm.on {
  color: var(--ac);
}
.toolrow .tw {
  gap: 4px;
  flex: none;
}
.toolrow .tw .qm {
  margin-left: 0;
}
.howto {
  margin: 0;
  padding-left: 20px;
  font-size: 13.5px;
  line-height: 1.6;
}
.howto li {
  margin: 0 0 10px;
}
.howto b {
  display: block;
}

/* city area map (schematic SVG, every area is a link) */
.cmap {
  margin: 0 0 14px;
  padding: 10px;
  border: 1px solid var(--ln);
  border-radius: 14px;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 24px 24px,
    var(--sf2);
}
.cmap svg {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
  margin: 0 auto;
  border-radius: 10px;
  font-family: var(--f);
}
.cmap .hit {
  fill: transparent;
}
.cmap .dot {
  fill: var(--ac);
  stroke: #fff;
  stroke-width: 3;
}
.cmap .an {
  font-size: 17px;
  font-weight: 800;
  fill: var(--ink);
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 5px;
}
.cmap .as {
  font-size: 12px;
  fill: var(--ink2);
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 4px;
}
.cmap .edge {
  fill: var(--sf);
  stroke: var(--ln2);
}
.cmap .es {
  font-size: 15px;
  fill: var(--ink2);
}
.cmap a:hover .dot,
.cmap a:focus .dot {
  r: 11;
}
.cmap a:hover .an,
.cmap a:focus .an {
  fill: var(--ac);
}
.cmap a:hover .edge {
  stroke: var(--ac);
}
@media (max-width: 560px) {
  .cmap {
    padding: 6px;
  }
  .cmap .an {
    font-size: 22px;
  }
  .cmap .as {
    font-size: 16px;
  }
}
.cmap figcaption {
  margin-top: 4px;
  text-align: center;
  font-size: 12px;
  color: var(--ink3);
}

/* home country map: prefectures coloured by region; a region with content zooms in place */
.jmap {
  margin: 0 0 22px;
}
.jwrap {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
  border: 1px solid var(--ln);
  border-radius: 12px;
  overflow: hidden;
  background: #edf2f5;
}
.jmap svg {
  display: block;
  width: 100%;
  height: auto;
  font-family: var(--f);
}
.jmap text,
.jmap tspan {
  paint-order: stroke;
  stroke: #fff;
  stroke-linejoin: round;
}
.rp path {
  fill: var(--c);
  stroke: #fff;
  stroke-width: 1.3;
  stroke-linejoin: round;
  transition: opacity 0.4s;
}
.rp.on {
  cursor: pointer;
  outline: none;
}
.rp.on:hover path,
.rp.on:focus-visible path {
  fill: color-mix(in srgb, var(--c) 82%, #000);
}
.rp:not(.on) path {
  opacity: 0.78;
}
.inset {
  fill: none;
  stroke: #b8c2cb;
  stroke-dasharray: 6 5;
}
.zbg {
  opacity: 0;
  transition: opacity 0.45s;
}
.zbg.show {
  opacity: 1;
}
.rls {
  transition: opacity 0.3s;
}
.rl {
  cursor: pointer;
}
.rn {
  font-size: 34px;
  font-weight: 800;
  fill: var(--ink);
  stroke-width: 7px;
}
.rs {
  font-size: 22px;
  fill: var(--ink2);
  stroke-width: 5px;
}
.rn.off {
  font-size: 27px;
  font-weight: 700;
  fill: #55555a;
  stroke-width: 6px;
}
.rl:hover .rn {
  fill: var(--ac);
}
.rl .dot,
.cz .dot,
.cl .dot {
  fill: var(--ac);
  stroke: #fff;
  stroke-width: 4px;
}
.rl .pulse {
  fill: #2f7a0b;
  opacity: 0.16;
  transform-box: fill-box;
  transform-origin: center;
  animation: jpulse 2.2s ease-out infinite;
}
@keyframes jpulse {
  0% {
    transform: scale(0.4);
    opacity: 0.35;
  }
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}
.cz {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s 0.25s;
}
.jmap.zoomed .rls {
  opacity: 0;
  pointer-events: none;
}
.jmap.zoomed .rp path {
  opacity: 0.18;
}
.jmap.zoomed .cz.show {
  opacity: 1;
  pointer-events: auto;
}
.cz .hit,
.cl .hit {
  fill: transparent;
}
.cz .dot {
  stroke-width: calc(4px / var(--z));
}
.cz .cn {
  font-size: calc(36px / var(--z));
  font-weight: 800;
  fill: var(--ink);
  stroke-width: calc(7px / var(--z));
}
.cz .cs {
  font-size: calc(23px / var(--z));
  fill: var(--ink2);
  stroke-width: calc(5px / var(--z));
}
.cz a:hover .cn,
.cz a:focus .cn {
  fill: var(--ac);
}
.jback {
  position: absolute;
  top: 10px;
  left: 10px;
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--ln2);
  border-radius: 999px;
  background: var(--sf);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink2);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.jback:hover {
  color: var(--ac);
  border-color: var(--ac);
}
.jlist {
  max-width: 520px;
  margin: 10px auto 0;
  border: 1px solid var(--ln);
  border-radius: 10px;
  font-size: 13px;
}
.jlist summary {
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
}
.jlist ul {
  margin: 0;
  padding: 0 12px 10px;
  list-style: none;
}
.jlist li {
  display: grid;
  grid-template-columns: 5.5em 1fr;
  gap: 0 8px;
  padding: 6px 0;
  border-top: 1px solid var(--ln);
}
.jlist b {
  display: flex;
  align-items: center;
  gap: 6px;
}
.jlist b::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--c);
  flex: none;
}
.jlist span {
  color: var(--ink2);
}
.jlist em {
  grid-column: 2;
  font-style: normal;
  font-size: 12px;
  color: var(--ink3);
}
.jlist em a {
  color: var(--ac);
  font-weight: 700;
}
.jmap figcaption {
  margin-top: 6px;
  text-align: center;
  font-size: 11.5px;
  color: var(--ink3);
}
.jmap figcaption a {
  color: inherit;
}
@media (max-width: 560px) {
  .jmap {
    margin-bottom: 14px;
  }
  .jwrap {
    max-width: 260px;
  }
  .rn {
    font-size: 60px;
    stroke-width: 9px;
  }
  .rs {
    font-size: 38px;
  }
  .rn.off {
    font-size: 46px;
    stroke-width: 8px;
  }
  .cz .cn {
    font-size: calc(66px / var(--z));
  }
  .cz .cs {
    font-size: calc(42px / var(--z));
  }
  .cz .dot {
    r: calc(20px / var(--z));
  }
}
@media (prefers-reduced-motion: reduce) {
  .rl .pulse {
    animation: none;
  }
}

/* swipe-to-navigate hint (touch only, see site.js) */
.swipe {
  position: fixed;
  top: 50%;
  z-index: 60;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--sf);
  color: var(--ink2);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.12s,
    background 0.12s;
}
.swipe.on {
  opacity: 1;
}
.swipe.go {
  background: var(--acid);
  color: var(--on);
}
.swipe.l {
  left: 0;
  transform: translate(calc(var(--d) - 100%), -50%);
}
.swipe.r {
  right: 0;
  transform: translate(calc(100% - var(--d)), -50%);
}

/* home globe: drag to turn, a country with content opens its map in place */
.globe {
  margin: 0 0 22px;
}
.gpick {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0 0 10px;
}
.gpick button,
.gback {
  height: 32px;
  padding: 0 16px;
  border: 1px solid var(--ln2);
  border-radius: 999px;
  background: var(--sf);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink2);
  cursor: pointer;
}
.gpick button:hover,
.gpick button.on,
.gback:hover {
  border-color: var(--ac);
  color: var(--ac);
}
.gback {
  display: block;
  margin: 0 auto 10px;
}
.gback span {
  margin-right: 4px;
}
.gback[hidden] {
  display: none;
}
.globe:not(.live) .gpick {
  display: none;
}
.gwrap {
  max-width: 460px;
  margin: 0 auto;
  transition:
    transform 0.42s ease-in,
    opacity 0.42s ease-in;
}
.globe.zooming .gwrap {
  transform: scale(1.7);
  opacity: 0;
}
.globe.zoomed .gwrap {
  display: none;
}
.gsvg {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.gsvg:active {
  cursor: grabbing;
}
.gsvg .sea {
  fill: #e2ecf3;
  stroke: #c8d7e3;
  stroke-width: 2;
}
.gsvg .land path {
  fill: #d9d5cc;
  stroke: #fff;
  stroke-width: 0.9;
  stroke-linejoin: round;
}
.gsvg .land path.on {
  fill: #e8c35a;
  cursor: pointer;
}
.gsvg .land path.on:hover {
  fill: #dcae32;
}
.gc {
  cursor: pointer;
  outline: none;
}
.gc .dot {
  fill: var(--ac);
  stroke: #fff;
  stroke-width: 4px;
}
.gc .pulse {
  fill: #2f7a0b;
  opacity: 0.16;
  transform-box: fill-box;
  transform-origin: center;
  animation: jpulse 2.2s ease-out infinite;
}
.gc text,
.gc tspan {
  paint-order: stroke;
  stroke: #fff;
  stroke-linejoin: round;
}
.gn {
  font-size: 36px;
  font-weight: 800;
  fill: var(--ink);
  stroke-width: 8px;
}
.gs {
  font-size: 23px;
  fill: var(--ink2);
  stroke-width: 6px;
}
.gc:hover .gn,
.gc:focus-visible .gn {
  fill: var(--ac);
}
.globe.live .cpanels .jmap {
  display: none;
}
.globe.live .cpanels .jmap.show {
  display: block;
  animation: gin 0.35s ease-out;
}
@keyframes gin {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 560px) {
  .gwrap {
    max-width: 290px;
  }
  .gn {
    font-size: 52px;
    stroke-width: 10px;
  }
  .gs {
    font-size: 34px;
    stroke-width: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .gc .pulse {
    animation: none;
  }
  .gwrap {
    transition: none;
  }
  .globe.live .cpanels .jmap.show {
    animation: none;
  }
}

/* breadcrumb as pills: on desktop a stack in the left tools column (parent at the bottom, where 上一頁 always sat) so it
   never covers the reading area; the home globe's "back to world" sits in the same spot. Phones: a pill row above the title */
.bk {
  display: none;
}
@media (min-width: 761px) {
  .crumb {
    display: none;
  }
  .bk,
  .gback {
    position: fixed;
    bottom: 24px;
    left: max(8px, calc(50% - 560px - 144px));
    z-index: 20;
  }
  .bk {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .bk a,
  .gback {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 128px;
    height: auto;
    margin: 0;
    padding: 9px 14px;
    border: 0;
    border-radius: 999px;
    background: #1d1d1f;
    color: #fff;
    font-size: 13px;
    font-weight: 400;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
    white-space: nowrap;
    cursor: pointer;
  }
  .bk b,
  .gback b {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .bk span,
  .gback span {
    margin: -2px 0 0;
    font-size: 20px;
    line-height: 1;
  }
  .bk a:hover,
  .bk a:focus-visible,
  .gback:hover,
  .gback:focus-visible {
    background: var(--ac);
    color: #fff;
  }
}
/* 761–1399px: tools stay at the side as an icon rail that expands on hover; content shifts right to make room */
@media (min-width: 761px) and (max-width: 1399px) {
  .tools {
    display: flex;
    left: 8px;
    width: 52px;
    padding: 6px 0;
    overflow: hidden auto;
    scrollbar-width: none;
    transition: width 0.15s;
  }
  .tools h5,
  .tools .qm {
    display: none;
  }
  .tools button {
    justify-content: center;
    padding: 9px 0;
    gap: 0;
    font-size: 0;
  }
  .tools button .ic {
    width: 20px;
    height: 20px;
    flex: none;
  }
  .tools:hover,
  .tools:focus-within {
    width: 150px;
  }
  .tools:hover h5,
  .tools:focus-within h5 {
    display: block;
  }
  .tools:hover .qm,
  .tools:focus-within .qm {
    display: inline-grid;
  }
  .tools:hover button,
  .tools:focus-within button {
    justify-content: flex-start;
    padding: 7px 14px;
    gap: 8px;
    font-size: 14px;
  }
  .toolrow {
    display: none;
  }
  .pg {
    margin-left: max(72px, calc(50% - 560px));
    margin-right: max(12px, calc(50% - 560px));
  }
  .pop {
    top: 104px;
    left: 72px;
    transform: none;
  }
  .bk,
  .gback {
    left: 8px;
  }
  .bk a,
  .gback {
    width: 52px;
    padding: 9px 0;
    justify-content: center;
    transition: width 0.15s;
  }
  .bk a:not(.up),
  .bk b,
  .gback b {
    display: none;
  }
  .bk:hover a,
  .bk:focus-within a,
  .gback:hover,
  .gback:focus-visible {
    display: flex;
    width: 128px;
    justify-content: flex-start;
    padding: 9px 14px;
  }
  .bk:hover b,
  .bk:focus-within b,
  .gback:hover b,
  .gback:focus-visible b {
    display: inline;
  }
}
.frc {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 10px;
}
.frc line {
  stroke: var(--ln2);
  stroke-dasharray: 2 3;
}
.frc text {
  fill: var(--ink3);
  font-size: 10px;
}
.frc .low {
  stroke: var(--ac);
}
.frc .typ {
  stroke: var(--ink3);
  stroke-dasharray: 5 4;
}
.frk {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  margin: 2px 0 0;
  font-size: 11.5px;
  color: var(--ink3);
}
.frk span::before {
  content: "";
  display: inline-block;
  width: 16px;
  margin-right: 5px;
  vertical-align: middle;
  border-top: 2px solid var(--ac);
}
.frk small {
  margin-left: auto;
}
.frk .typ::before {
  border-top: 2px dashed var(--ink3);
}
@media (max-width: 760px) {
  .doc h2 {
    scroll-margin-top: 150px;
  }
} /* masthead + sticky breadcrumb; after the base rule so it wins */
.rart {
  margin: 6px 0 16px;
  text-align: left;
}
.rart h3 {
  margin: 14px 0 4px;
  font: 700 15px / 1.4 var(--f);
}
.rart .more {
  margin: 4px 0 0;
  font-size: 13px;
}
.rart .more a {
  color: var(--ac);
}
.list .row[hidden] {
  display: none;
}
.totop {
  position: fixed;
  right: max(12px, calc(50% - 560px - 64px));
  bottom: 24px;
  z-index: 20;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #1d1d1f;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
  cursor: pointer;
}
.totop:hover,
.totop:focus-visible {
  background: var(--ac);
}
.totop[hidden] {
  display: none;
}
@media (max-width: 760px) {
  .totop {
    right: 14px;
    bottom: 18px;
    width: 42px;
    height: 42px;
  }
}
/* phone: tools behind a hamburger in the masthead; the menu drops down under it (two columns) */
.hb {
  display: none;
}
@media (max-width: 760px) {
  .hb {
    display: grid;
    place-items: center;
    flex: none;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--ln2);
    border-radius: 10px;
    background: var(--sf);
    color: var(--ink2);
    cursor: pointer;
  }
  .tmenu .hb {
    border-color: var(--ac);
    color: var(--ac);
  }
  .trw {
    display: none;
  }
  .tmenu .trw {
    display: block;
    position: fixed;
    top: var(--mh, 84px);
    left: 0;
    right: 0;
    z-index: 29;
    margin: 0;
    background: var(--sf);
    border-bottom: 1px solid var(--ln);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
  }
  .tmenu .trw::after {
    display: none;
  }
  .tmenu .toolrow {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    overflow: visible;
    margin: 0;
    padding: 12px 16px 14px;
    border: 0;
  }
  .tmenu .toolrow > button,
  .tmenu .toolrow .tw {
    justify-content: flex-start;
    min-height: 40px;
  }
  .tmenu .toolrow .tw > button:first-child {
    flex: 1;
    align-self: stretch;
  }
}
.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.contact a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--ln2);
  border-radius: 999px;
  font-weight: 700;
  color: var(--ink2);
}
.contact a:hover {
  border-color: var(--ac);
  color: var(--ac);
}
/* notes → 列印／存 PDF: #printOut only exists after that button; body.printing is removed on afterprint */
#printOut {
  display: none;
}
@media print {
  body.printing {
    background: #fff;
  }
  body.printing > :not(#printOut) {
    display: none !important;
  }
  body.printing #printOut {
    display: block;
    color: #000;
    font: 11pt / 1.6 var(--f);
  }
  #printOut h1 {
    margin: 0 0 12pt;
    font-size: 16pt;
  }
  #printOut h2 {
    margin: 14pt 0 4pt;
    padding-bottom: 2pt;
    border-bottom: 1px solid #999;
    font-size: 12.5pt;
    break-after: avoid;
  }
  #printOut h2 small {
    font-weight: 400;
    color: #555;
  }
  #printOut ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  #printOut li {
    display: flex;
    gap: 6pt;
    padding: 3pt 0;
    break-inside: avoid;
  }
  #printOut li small {
    display: block;
    color: #666;
    font-size: 9pt;
  }
  #printOut .pfoot {
    margin-top: 16pt;
    color: #888;
    font-size: 8.5pt;
  }
}

/* 螢光筆：==重點== 黃、==g:建議== 綠、==r:注意== 粉紅；底部 6 成上色，像真的畫上去 */
mark {
  color: inherit;
  background: linear-gradient(transparent 40%, #ffe066 40%);
  padding: 0 0.1em;
}
mark.hl-g {
  background: linear-gradient(transparent 40%, #b8efc4 40%);
}
mark.hl-r {
  background: linear-gradient(transparent 40%, #ffc6d6 40%);
}

/* 內文裡的站內連結（[文字](page key)）：全站 a 預設無底線，這裡要看得出能點 */
a.il {
  color: var(--ac);
  text-decoration: underline;
  text-underline-offset: 3px;
}
