:root {
  --coral: #db6a41;
  --ink: #211d1d;
  --cream: #fff8f4;
  --yellow: #fcea8b;
  --line: #211d1d26;
  --muted: #78685e;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #e7d9cd;
  color: var(--ink);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}
button,
input,
a {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--cream);
  color: var(--ink);
  min-height: 44px;
  border-radius: 9px;
  padding: 9px 13px;
}
button:hover {
  background: var(--yellow);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
}
button[aria-pressed="true"],
button.active {
  background: var(--ink);
  color: var(--cream);
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
#app {
  position: relative;
  width: 100%;
  height: 100dvh;
  min-height: 660px;
  overflow: hidden;
  background: radial-gradient(ellipse at 44% 35%, #fffdf9 0%, #fff8f4 44%, #edddcf 100%);
}
#stage {
  position: absolute;
  inset: 0 318px 0 0;
  touch-action: none;
}
#stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
}
#labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.island-label {
  pointer-events: auto;
  font-size: 11px;
  padding: 3px 8px;
  min-height: 28px;
  border: 1px solid #211d1d35;
  border-radius: 5px;
  background: #fff8f4ed;
  box-shadow: 0 2px 0 #211d1d14;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.island-label strong {
  color: var(--coral);
  font:
    700 10px ui-monospace,
    monospace;
  margin-right: 5px;
}
.island-label.selected {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--coral);
}
.island-label.dim {
  opacity: 0.28;
}
.island-label.selected strong {
  color: var(--yellow);
}
.port-label {
  font-size: 9px;
  background: #fff8f4dd;
  border: 1px dashed #78685e;
  padding: 3px 6px;
  border-radius: 4px;
}
.brand {
  position: absolute;
  top: 28px;
  left: 32px;
  pointer-events: none;
  z-index: 2;
}
.eyebrow {
  font:
    700 10px ui-monospace,
    monospace;
  letter-spacing: 2px;
}
.brand .future {
  pointer-events: auto;
  text-decoration: none;
  font:
    900 clamp(24px, 3vw, 42px) / 0.95 Arial,
    sans-serif;
  letter-spacing: -2px;
  color: var(--coral);
}
.brand .future span {
  display: block;
}
.brand h1 {
  font-size: 19px;
  letter-spacing: 4px;
  margin-top: 12px;
}
.brand .candidate {
  font-size: 12px;
  margin-top: 8px;
}
.brand .candidate b {
  margin-right: 10px;
}
.hero-note {
  position: absolute;
  left: 32px;
  top: 190px;
  max-width: 180px;
  pointer-events: none;
}
.hero-note .number {
  font:
    italic 60px/0.95 Georgia,
    serif;
  color: var(--coral);
}
.hero-note h2 {
  font-size: 17px;
  line-height: 1.5;
  margin: 8px 0;
}
.hero-note p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
}
.map-meta {
  position: absolute;
  left: 32px;
  bottom: 236px;
  font:
    10px/1.8 ui-monospace,
    monospace;
  color: var(--muted);
  pointer-events: none;
}
.toolbar {
  position: absolute;
  right: 338px;
  top: 28px;
  display: flex;
  gap: 7px;
  z-index: 5;
}
.toolbar button {
  background: #fff8f4e8;
  font-size: 12px;
}
.sidebar {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 42px;
  width: 318px;
  background: #fff8f4e8;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 7;
  backdrop-filter: blur(16px);
}
.side-head {
  padding: 29px 22px 16px;
}
.side-head .eyebrow {
  color: var(--coral);
  margin-bottom: 10px;
}
.side-head h2 {
  font-size: 24px;
  font-weight: 900;
}
.side-head p {
  font-size: 11px;
  color: var(--muted);
  margin: 9px 0 16px;
  line-height: 1.6;
}
.search {
  color: var(--ink);
  -webkit-text-fill-color: var(--ink);
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdfb;
  padding: 10px 12px;
  font-size: 13px;
}
.side-tabs {
  display: flex;
  gap: 5px;
  margin: 12px 0 0;
}
.side-tabs button {
  flex: 1;
  font-size: 12px;
  padding: 6px;
}
.tree {
  overflow: auto;
  padding: 0 15px 20px;
  scrollbar-width: thin;
}
.tree details {
  border-bottom: 1px solid var(--line);
}
.tree summary {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  padding: 8px;
}
.tree summary::-webkit-details-marker {
  display: none;
}
.tree .index {
  font:
    italic 22px Georgia,
    serif;
  color: var(--coral);
  width: 25px;
  flex: none;
}
.tree .item-name {
  font-size: 13px;
  font-weight: 700;
  flex: 1;
}
.tree .count {
  font:
    10px ui-monospace,
    monospace;
  color: var(--muted);
}
.tree details[open] summary {
  background: #fcea8b55;
  border-radius: 7px;
}
.tree .children {
  padding: 0 8px 10px 40px;
  display: grid;
  gap: 3px;
}
.tree .children button {
  font-size: 12px;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 7px 9px;
}
.tree .children button:hover {
  background: #fcea8b88;
}
.tree .island-open {
  font-weight: 700;
  color: var(--coral);
}
.flow-item {
  width: 100%;
  margin-bottom: 7px;
  text-align: left;
  font-size: 12px;
  line-height: 1.6;
}
.flow-item b {
  color: var(--coral);
  margin-right: 7px;
}
.card {
  position: absolute;
  left: 30px;
  top: 176px;
  bottom: 248px;
  width: 340px;
  background: #fff8f4f7;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 60px #53311b18;
  overflow: auto;
  z-index: 6;
  padding: 24px;
  backdrop-filter: blur(20px);
  scrollbar-width: thin;
}
.card[hidden] {
  display: none;
}
.card .close {
  position: absolute;
  right: 10px;
  top: 9px;
  width: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 22px;
}
.card .eyebrow {
  color: var(--coral);
  margin-bottom: 15px;
  padding-right: 20px;
}
.card h2 {
  font-size: 24px;
  line-height: 1.35;
  letter-spacing: -0.5px;
  margin-bottom: 14px;
}
.card p,
.card li {
  font-size: 13px;
  line-height: 1.8;
}
.card ul {
  padding-left: 18px;
}
.chips {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin: 10px 0;
}
.chip {
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 10px;
  padding: 4px 7px;
}
.card h3 {
  font-size: 10px;
  letter-spacing: 1px;
  margin: 22px 0 8px;
  color: var(--muted);
}
.card .phase {
  padding: 12px;
  border-left: 3px solid var(--coral);
  background: #f2e5dc;
  font-size: 12px;
  line-height: 1.8;
}
.card .sources a {
  display: flex;
  min-height: 44px;
  align-items: center;
  font-size: 12px;
  line-height: 1.6;
}
.card .small {
  font-size: 10px;
  line-height: 1.8;
  color: var(--muted);
}
.card .quote {
  border-left: 2px solid var(--coral);
  padding: 8px 12px;
  margin: 12px 0;
}
.card-footer {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 12px;
}
.controls {
  position: absolute;
  left: 30px;
  right: 348px;
  bottom: 65px;
  z-index: 5;
  max-width: 930px;
  background: #fff8f4ee;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 19px;
  box-shadow: 0 8px 24px #5436200a;
  backdrop-filter: blur(12px);
}
.control-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 9px;
  margin-bottom: 10px;
}
.control-tabs button {
  min-height: 44px;
  border: 0;
  background: transparent;
  font-size: 12px;
  padding: 8px 13px;
}
.control-tabs button.active {
  background: var(--ink);
}
.control-tabs .guide {
  margin-left: auto;
  color: var(--muted);
  font-size: 10px;
}
.panel {
  display: none;
}
.panel.active {
  display: block;
}
.day-row {
  display: flex;
  gap: 13px;
  align-items: center;
}
.day-row output {
  font:
    22px ui-monospace,
    monospace;
  min-width: 70px;
}
.day-row input {
  width: 100%;
  accent-color: var(--coral);
  height: 44px;
}
.play {
  min-width: 44px;
  padding: 8px;
}
.ticks {
  display: flex;
  justify-content: space-between;
  margin-left: 125px;
  font:
    9px ui-monospace,
    monospace;
  color: var(--muted);
}
.control-note {
  font-size: 10px;
  color: var(--muted);
  margin-top: 7px;
  line-height: 1.7;
  min-height: 17px;
}
.term-buttons,
.heart-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.term-buttons button {
  flex: 1;
  white-space: nowrap;
  font-size: 11px;
  padding: 8px;
}
.heart-buttons button {
  width: 47px;
  font:
    700 18px Arial,
    sans-serif;
}
.heart-buttons .reset {
  width: auto;
  font-size: 12px;
}
.footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 12;
  background: var(--ink);
  color: var(--cream);
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 24px;
  font-size: 9px;
  gap: 15px;
}
.footer span:last-child {
  color: var(--yellow);
}
.legend {
  position: absolute;
  right: 342px;
  bottom: 245px;
  font-size: 10px;
  line-height: 1.9;
  color: var(--muted);
  background: #fff8f4c9;
  border-radius: 8px;
  padding: 10px;
  pointer-events: none;
}
.legend b {
  color: var(--ink);
  font-weight: 500;
}
.legend i {
  display: inline-block;
  width: 20px;
  border-top: 2px solid var(--coral);
  vertical-align: middle;
  margin-right: 6px;
}
.legend i.dash {
  border-top-style: dashed;
}
.legend i.dot {
  border-top-style: dotted;
}
.mascot {
  position: absolute;
  right: 345px;
  bottom: 280px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: var(--muted);
  pointer-events: none;
}
.mascot .face {
  background: #708f68;
  border: 2px solid #43533d;
  outline: 3px dotted #708f68;
  width: 30px;
  height: 28px;
  border-radius: 45% 50% 42% 44%;
  color: white;
  text-align: center;
  font: bold 15px/25px monospace;
  transform: rotate(-8deg);
}
.intro {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: #211d1d38;
  backdrop-filter: blur(5px);
}
.intro[hidden] {
  display: none;
}
.intro-box {
  width: min(440px, calc(100% - 36px));
  background: var(--cream);
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 30px 100px #211d1d33;
}
.intro-box .eyebrow {
  color: var(--coral);
}
.intro-box h2 {
  font-size: 28px;
  line-height: 1.45;
  margin: 18px 0;
}
.intro-box p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
}
.intro-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 25px;
  gap: 10px;
}
.intro-actions .next {
  background: var(--ink);
  color: var(--cream);
}
.tour-caption {
  display: none;
  position: absolute;
  bottom: 12%;
  left: 8%;
  right: 8%;
  text-align: center;
  pointer-events: none;
  z-index: 15;
}
.tour-caption .caption {
  font-size: clamp(24px, 3vw, 42px);
  font-weight: 900;
  line-height: 1.5;
  letter-spacing: 2px;
}
.tour-caption .quote-text {
  font-size: clamp(17px, 2.3vw, 28px);
  line-height: 1.7;
  background: #fff8f4f2;
  padding: 20px;
  border-radius: 12px;
}
.tour-caption .quote-source {
  font-size: 11px;
  background: var(--yellow);
  display: inline-block;
  padding: 7px 12px;
  margin-top: 10px;
}
.tour-caption .tour-stage {
  font-size: 11px;
  margin-top: 10px;
}
.tour-controls {
  display: none;
  position: absolute;
  top: 28px;
  right: 22px;
  z-index: 20;
  gap: 6px;
  align-items: center;
  font-size: 11px;
}
.tour-controls button {
  font-size: 12px;
}
.tour .sidebar,
.tour .toolbar,
.tour .hero-note,
.tour .map-meta,
.tour .controls,
.tour .legend,
.tour .mascot,
.tour .card {
  display: none;
}
.tour #stage {
  right: 0;
}
.tour .tour-caption {
  display: block;
}
.tour .tour-controls {
  display: flex;
}
.tour #stage canvas {
  cursor: none;
}
.tour .island-label {
  pointer-events: none;
}
.tour.capture .tour-controls {
  opacity: 0;
}
.tour.capture .tour-controls:focus-within,
.tour.capture .tour-controls:hover {
  opacity: 1;
}
.tour .brand {
  top: 38px;
}
.tour .brand h1 {
  font-size: 17px;
}
.tour .footer {
  font-size: 10px;
}
.loading {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: var(--cream);
  display: grid;
  place-content: center;
  text-align: center;
  padding: 30px;
}
.loading h2 {
  font-size: 28px;
  color: var(--coral);
}
.loading p {
  font-size: 13px;
  line-height: 1.8;
  margin: 15px 0;
}
.loading[hidden] {
  display: none;
}
.mobile-toggle,
.mobile-close {
  display: none;
}
.sidebar-hidden .sidebar {
  display: none;
}
.sidebar-hidden #stage {
  right: 0;
}
.sidebar-hidden .toolbar {
  right: 24px;
}
.sidebar-hidden .controls {
  right: 30px;
}
.sidebar-hidden .legend,
.sidebar-hidden .mascot {
  right: 30px;
}
body.ratio {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100dvh;
  background: var(--ink);
}
body.ratio #app {
  width: min(100vw, 56.25dvh);
  height: min(100dvh, 177.777vw);
  min-height: 0;
}
body.ratio .brand {
  left: 6%;
  top: 4%;
}
body.ratio .brand .future {
  font-size: 30px;
}
body.ratio .brand h1 {
  font-size: 14px;
}
body.ratio .brand .candidate {
  font-size: 10px;
}
body.ratio .footer {
  font-size: 8px;
  padding: 8px 12px;
  flex-wrap: wrap;
  gap: 3px;
}
body.ratio .tour-controls {
  top: 2%;
  right: 3%;
  transform: scale(0.85);
  transform-origin: right top;
}
body.ratio .tour-caption {
  bottom: 15%;
  left: 6%;
  right: 6%;
}
body.ratio .tour-caption .caption {
  font-size: 24px;
}
body.ratio .tour-caption .quote-text {
  font-size: 17px;
  padding: 14px;
}
body.ratio .tour-caption .quote-source {
  font-size: 9px;
}
body.ratio .island-label {
  font-size: 9px;
  padding: 2px 5px;
  min-height: 22px;
}
body.ratio .island-label strong {
  font-size: 8px;
}
@media (max-width: 800px) {
  #app {
    min-height: 580px;
  }
  #stage {
    right: 0;
  }
  .brand {
    top: 21px;
    left: 19px;
  }
  .brand .future {
    font-size: 27px;
    letter-spacing: -1.5px;
  }
  .brand .future span {
    display: inline;
    margin-right: 4px;
  }
  .brand h1 {
    font-size: 15px;
    letter-spacing: 2px;
    margin-top: 8px;
  }
  .brand .candidate {
    font-size: 10px;
  }
  .hero-note {
    top: 117px;
    left: 20px;
    max-width: 150px;
  }
  .hero-note .number {
    font-size: 34px;
    float: left;
    margin-right: 8px;
  }
  .hero-note h2 {
    font-size: 11px;
    margin: 0;
    padding-top: 2px;
  }
  .hero-note p {
    font-size: 9px;
    clear: both;
    padding-top: 6px;
  }
  .toolbar {
    right: 15px;
    top: 20px;
    flex-direction: column;
    gap: 5px;
  }
  .toolbar button {
    font-size: 11px;
    min-width: 44px;
    padding: 7px;
  }
  .toolbar .wide {
    display: none;
  }
  .sidebar {
    width: 100%;
    top: 18%;
    bottom: 42px;
    border-radius: 18px 18px 0 0;
    transform: translateY(110%);
    transition: transform 0.25s;
    box-shadow: 0 -10px 50px #211d1d22;
  }
  .sidebar.mobile-open {
    transform: translateY(0);
  }
  .side-head {
    padding: 20px;
  }
  .side-head p {
    margin: 5px 0 10px;
  }
  .side-head h2 {
    font-size: 20px;
  }
  .mobile-close {
    display: block;
    position: absolute;
    right: 18px;
    top: 15px;
  }
  .mobile-toggle {
    display: block;
  }
  .controls {
    left: 12px;
    right: 12px;
    bottom: 63px;
    padding: 10px 12px;
  }
  .control-tabs {
    gap: 2px;
    margin-bottom: 6px;
    padding-bottom: 5px;
  }
  .control-tabs button {
    font-size: 11px;
    padding: 7px 10px;
  }
  .control-tabs .guide {
    display: none;
  }
  .day-row {
    gap: 6px;
  }
  .day-row output {
    font-size: 19px;
    min-width: 57px;
  }
  .ticks {
    margin-left: 107px;
  }
  .control-note {
    font-size: 9px;
  }
  .map-meta {
    left: 17px;
    bottom: 250px;
    font-size: 8px;
  }
  .map-meta .extra {
    display: none;
  }
  .legend {
    right: 14px;
    bottom: 247px;
    font-size: 8px;
    padding: 5px;
    line-height: 1.6;
  }
  .mascot {
    display: none;
  }
  .footer {
    padding: 7px 12px;
    font-size: 8px;
    gap: 3px;
    flex-wrap: wrap;
    min-height: 44px;
  }
  .island-label {
    font-size: 9px;
    min-height: 25px;
    padding: 3px 5px;
  }
  .island-label strong {
    font-size: 8px;
    margin-right: 3px;
  }
  .card {
    left: 12px;
    right: 12px;
    width: auto;
    top: auto;
    bottom: 61px;
    max-height: 56%;
    padding: 22px;
    z-index: 10;
  }
  .card h2 {
    font-size: 22px;
  }
  .term-buttons {
    gap: 4px;
  }
  .term-buttons button {
    font-size: 10px;
    padding: 6px;
  }
  .tour .brand .future {
    font-size: 26px;
  }
  .tour .brand h1 {
    font-size: 13px;
  }
  .tour-controls {
    top: 100px;
    right: 15px;
  }
  .tour-caption {
    bottom: 13%;
  }
  .tour-caption .caption {
    font-size: 25px;
  }
  .tour-caption .quote-text {
    font-size: 17px;
  }
  .sidebar-hidden .controls {
    right: 12px;
  }
  .sidebar-hidden .toolbar {
    right: 15px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
#stage {
  bottom: 220px;
  isolation: isolate;
}
.tour #stage {
  bottom: 0;
}
.island-label {
  min-height: 44px !important;
  min-width: 44px;
}
@media (max-width: 800px) {
  #stage {
    bottom: 220px;
  }
}
.scene-note {
  padding: 12px;
  background: #f2e5dc;
  border-radius: 8px;
}
.scene-note small {
  color: var(--muted);
}
/* ---- second visual pass ---- */
.ghost-label{display:flex;flex-direction:column;align-items:center;gap:1px;font:700 11px/1.2 "Noto Sans TC",sans-serif;color:#a5442a;background:#fff8f4f0;border:1px dashed #db6a41;border-radius:8px;padding:3px 7px;white-space:nowrap;pointer-events:none}
.ghost-label small{font-weight:500;font-size:9px;color:#78685e}
.site-sign{display:flex;flex-direction:column;gap:1px;background:#fffdf9;border:2px solid #211d1d;border-top:6px solid #db6a41;border-radius:6px;padding:4px 8px;font:500 10px/1.3 "Noto Sans TC",sans-serif;box-shadow:0 4px 10px #211d1d22;pointer-events:none;white-space:nowrap}
.site-sign b{font-size:12px}

/* ===== W8: cards, HUD, dock, log (second visual pass) ===== */
.card{background:#fffdfaeb;border:1px solid #ffffff;border-radius:22px;box-shadow:0 1px 0 #ffffff inset,0 2px 6px #4a2a1414,0 22px 60px #4a2a1424;padding:20px 20px 18px;backdrop-filter:blur(22px) saturate(1.2);width:360px}
.card .close{right:8px;top:8px;border-radius:12px}
.card-head{display:flex;gap:12px;align-items:center;margin:0 0 12px;padding-right:34px}
.card-head h2{margin:2px 0 0!important;font-size:21px!important;line-height:1.3!important;font-weight:800}
.card-head .eyebrow{margin:0!important;font-size:9.5px;letter-spacing:1.6px}
.icon-tile{flex:0 0 52px;height:52px;border-radius:15px;display:grid;place-items:center;background:linear-gradient(150deg,#fff3e9,#f7dcc8);color:var(--coral);box-shadow:0 1px 0 #fff inset,0 3px 8px #db6a4124}
.icon-tile .ico{width:28px;height:28px}
.icon-tile.flow{background:linear-gradient(150deg,#e6f1f1,#cfe2e2);color:#2f6170;font:800 15px ui-monospace,monospace}
.icon-tile.role{background:linear-gradient(150deg,#eef4e7,#d9e7cd);color:#4e7a55;font:800 20px "Noto Sans TC",sans-serif}
.ico{fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.ico.sm{width:15px;height:15px;flex:0 0 15px}
.card .lede{font-size:13.5px!important;line-height:1.7!important;color:#3d3431;margin:0 0 10px}
.pills{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0 4px}
.pill{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:4px 10px;font-size:11px;font-weight:600;background:#f4ece4;color:#4b403b;border:1px solid #ecdccf}
.pill.heart i{width:7px;height:7px;border-radius:50%;background:var(--c)}
.pill.heart{color:color-mix(in srgb,var(--c) 70%,#000);background:color-mix(in srgb,var(--c) 10%,#fff);border-color:color-mix(in srgb,var(--c) 28%,#fff)}
.pill.soft{background:#fff;color:#78685e}
.pill.status{background:#211d1d;color:#fff8f4;border-color:#211d1d}
.pill.flow{background:#e6f1f1;color:#2f6170;border-color:#cfe2e2;font-family:ui-monospace,monospace}
.card h3{font-size:10px!important;letter-spacing:1.6px!important;color:#9a8679!important;margin:18px 0 8px!important;font-weight:700;text-transform:uppercase}
.stat-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(96px,1fr));gap:8px;margin:12px 0 2px}
.stat{background:#fff;border-radius:14px;padding:10px 11px 9px 12px;border:1px solid #f0e4da;box-shadow:inset 3px 0 0 var(--accent),0 2px 6px #4a2a140d;display:flex;flex-direction:column;gap:3px;min-width:0}
.stat b{font-size:20px;font-weight:800;color:#211d1d;font-variant-numeric:tabular-nums;line-height:1.15;word-break:keep-all}
.stat .lbl{font-size:10.5px;line-height:1.45;color:#78685e;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.rows{display:flex;flex-direction:column;gap:6px}
.row{display:grid;grid-template-columns:10px 1fr auto 12px;align-items:center;gap:9px;text-align:left;background:#fff;border:1px solid #f0e4da;border-radius:12px;padding:9px 11px;min-height:44px;font-size:13px}
.row:hover{background:#fff6ec;border-color:#f2c9b3}
.row .dot{width:8px;height:8px;border-radius:50%;background:var(--coral)}
.row .ph{font-size:10px;color:#9a8679;white-space:nowrap}
.row i{color:#c4b3a6;font-style:normal;font-size:16px}
.flow-chips{display:flex;flex-wrap:wrap;gap:6px}
.flow-chip{display:inline-flex;align-items:center;gap:7px;border-radius:999px;padding:6px 12px 6px 6px;min-height:36px;background:#fff;border:1px solid #e3d5ca;font-size:12px}
.flow-chip b{background:#e6f1f1;color:#2f6170;border-radius:999px;padding:2px 7px;font:700 11px ui-monospace,monospace}
.flow-chip i{font-style:normal;color:#b19f92}
.flow-chip:hover{background:#fff6ec;border-color:#db6a41}
.card ul.facts{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:6px}
.card ul.facts li{position:relative;padding:8px 10px 8px 26px;background:#fbf6f1;border-radius:10px;font-size:12.5px;line-height:1.65}
.card ul.facts li::before{content:"";position:absolute;left:11px;top:15px;width:6px;height:6px;border-radius:2px;background:var(--coral)}
.timeline{display:grid;grid-template-columns:repeat(5,1fr);gap:3px;margin-bottom:6px}
.timeline span{font-size:9.5px;text-align:center;padding:16px 2px 4px;position:relative;color:#9a8679;line-height:1.25}
.timeline span::before{content:"";position:absolute;left:0;right:0;top:4px;height:7px;border-radius:4px;background:#efe4da}
.timeline span.on{color:#a5442a;font-weight:700}
.timeline span.on::before{background:repeating-linear-gradient(135deg,#db6a41 0 6px,#e98a66 6px 12px)}
.timeline.unknown span::before{background:repeating-linear-gradient(135deg,#e6ddd5 0 5px,#f4eee8 5px 10px)}
.card .phase{border-radius:10px;border-left:3px solid var(--coral);background:#fbf3ec}
.scene-note{display:flex;gap:9px;align-items:flex-start;margin-top:14px;padding:10px 12px;background:#f3f6f0;border-radius:12px;font-size:11.5px;line-height:1.6;color:#4f5a4a}
.scene-note small{display:block;color:#7d8778;font-size:10px}
.route{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:8px;margin:12px 0;background:#fbf6f1;border-radius:14px;padding:10px}
.route>div{display:flex;flex-direction:column;gap:5px}
.route>i{font-style:normal;color:#db6a41;font-size:18px}
.route .stop{display:flex;align-items:center;gap:6px;background:#fff;border-radius:9px;padding:5px 8px;font-size:11.5px;border:1px solid #f0e4da;color:#3d3431}
.route .stop .ico{color:var(--coral)}
.meter{height:9px;border-radius:6px;background:#efe4da;overflow:hidden}
.meter i{display:block;height:100%;background:linear-gradient(90deg,#3e7c8c,#7fb3bd);border-radius:6px}
.card .sources a{background:#fff;border:1px solid #f0e4da;border-radius:10px;padding:6px 10px;margin-bottom:6px;text-decoration:none}
.card .sources a:hover{border-color:#db6a41}
.card-footer{font-size:10px;color:#9a8679}

.hud{position:absolute;left:232px;right:calc(318px + 286px);top:24px;z-index:4;display:flex;flex-direction:column;gap:8px;align-items:center;pointer-events:none}
.status{display:flex;gap:6px;flex-wrap:wrap;justify-content:center;pointer-events:auto}
.st{display:inline-flex;align-items:center;gap:6px;background:#fffdfae6;border:1px solid #fff;border-radius:999px;padding:5px 11px;font-size:11px;color:#6a5d56;box-shadow:0 2px 8px #4a2a1414;backdrop-filter:blur(10px)}
.st i{width:7px;height:7px;border-radius:50%;background:var(--c)}
.st b{font-size:13px;color:#211d1d;font-variant-numeric:tabular-nums}
.st.time b{font-family:ui-monospace,monospace}
.toggles{display:flex;gap:6px;flex-wrap:wrap;justify-content:center;pointer-events:auto}
.toggles .seg{display:flex;background:#fffdfae6;border:1px solid #fff;border-radius:999px;padding:3px;box-shadow:0 2px 8px #4a2a1414}
.toggles .seg button{min-height:36px;width:38px;padding:0;border:0;border-radius:999px;background:transparent;display:grid;place-items:center;color:#8a7a70}
.toggles .seg button[aria-pressed=true]{background:#fff1d6;color:#c06a1b;box-shadow:0 1px 3px #4a2a1420}
.toggles svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.toggles .tg{display:inline-flex;align-items:center;gap:6px;min-height:42px;padding:6px 12px;border-radius:999px;background:#fffdfae6;border:1px solid #fff;font-size:12px;color:#5d514b;box-shadow:0 2px 8px #4a2a1414}
.toggles .tg[aria-pressed=true]{background:#211d1d;color:#fff8f4;border-color:#211d1d}
.toggles .tg:hover{background:#fff1d6}
.toggles .tg[aria-pressed=true]:hover{background:#3a3332}
.dock{position:absolute;right:calc(318px + 14px);top:96px;z-index:4;display:flex;flex-direction:column;gap:5px;background:#fffdfad9;border:1px solid #fff;border-radius:20px;padding:6px;box-shadow:0 6px 20px #4a2a141f;backdrop-filter:blur(12px)}
.dock-btn{position:relative;width:38px;height:36px;min-height:36px;padding:0;border:0;border-radius:12px;background:transparent;color:#a5442a;display:grid;place-items:center}
.dock-btn .ico{width:20px;height:20px}
.dock-btn:hover,.dock-btn:focus-visible{background:#fff1e6}
.dock-btn .tip{position:absolute;right:46px;top:50%;transform:translateY(-50%);white-space:nowrap;background:#211d1d;color:#fff8f4;font-size:11px;padding:4px 8px;border-radius:7px;opacity:0;pointer-events:none;transition:opacity .15s}
.dock-btn:hover .tip,.dock-btn:focus-visible .tip{opacity:1}
.mascot{right:calc(318px + 70px)!important}
.log{position:absolute;right:calc(318px + 66px);top:96px;bottom:250px;width:330px;z-index:5;background:#fffdfaf0;border:1px solid #fff;border-radius:20px;box-shadow:0 20px 50px #4a2a1426;backdrop-filter:blur(18px);display:none;flex-direction:column;padding:14px 14px 10px}
.log.open{display:flex}
.log-head{display:flex;justify-content:space-between;align-items:flex-start}
.log-head .eyebrow{color:var(--coral);font-size:9px}
.log-head h3{font-size:15px;margin-top:2px}
.log-head button{border:0;background:transparent;font-size:20px;width:44px;padding:0}
.log-filters{display:flex;gap:8px;align-items:center;margin:8px 0}
.log-filters .live{display:inline-flex;align-items:center;gap:5px;font:700 10px ui-monospace,monospace;color:#3d7a52}
.log-filters .live i{width:7px;height:7px;border-radius:50%;background:#5ebd7a;box-shadow:0 0 0 3px #5ebd7a33}
.log-filters select{flex:1;min-height:36px;border-radius:10px;border:1px solid #e3d5ca;background:#fff;font-size:12px;padding:0 8px}
#log-list{list-style:none;margin:0;padding:0;overflow:auto;flex:1;display:flex;flex-direction:column;gap:4px}
#log-list li{display:grid;grid-template-columns:44px 1fr;gap:8px;align-items:start;font-size:11.5px;line-height:1.5;padding:6px 4px;border-bottom:1px dashed #efe4da}
.lp{display:inline-block;text-align:center;border-radius:999px;padding:2px 0;font-size:10px;font-weight:700}
.lp.depart{background:#e6f1f1;color:#2f6170}.lp.arrive{background:#fff1d6;color:#7f520a}.lp.handoff{background:#f6e3ec;color:#9a3a63}
.lt b{font-family:ui-monospace,monospace;color:#db6a41}
.log-note{font-size:9.5px;color:#9a8679;line-height:1.5;margin-top:6px}
.name-tag{display:inline-flex;align-items:center;gap:5px;white-space:nowrap;background:#fffdfaf2;border:1px solid #fff;border-radius:999px;padding:2px 8px 2px 3px;font-size:10px;min-height:22px;box-shadow:0 2px 6px #4a2a1424;color:#3d3431;pointer-events:auto}
.name-tag i{font-style:normal;width:16px;height:16px;border-radius:50%;background:#eef4e7;display:grid;place-items:center;font-size:9px;color:#4e7a55}
.name-tag b{font:700 9px ui-monospace,monospace;color:#2f6170;background:#e6f1f1;border-radius:999px;padding:1px 5px}
.name-tag.ambient{opacity:.85}
.island-label{border-radius:999px!important;background:#fffdfaf2!important;border:1px solid #fff!important;box-shadow:0 3px 10px #4a2a1424!important;padding:4px 11px!important;font-weight:600}
.island-label.selected{background:#211d1d!important;color:#fff8f4!important}
.debug .hud,.debug .dock,.debug .log,.debug .card,.debug .controls,.debug .sidebar,.debug .toolbar,.debug .brand,.debug .hero-note,.debug .map-meta,.debug .mascot,.debug .footer,.debug #labels,.debug .intro{display:none!important}
.debug #stage{inset:0!important}
.debug #app{background:transparent!important}
.tour .hud,.tour .dock,.tour .log{display:none}
@media (max-width:1680px){.toggles .tg span{display:none}.toggles .tg{padding:0;width:42px;justify-content:center}}
.toggles .tg{position:relative}
.toggles .tg::after,.toggles .seg button::after{content:attr(title);position:absolute;top:calc(100% + 6px);left:50%;transform:translateX(-50%);background:#211d1d;color:#fff8f4;font-size:11px;padding:3px 8px;border-radius:6px;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .15s}
.toggles .tg:hover::after,.toggles .tg:focus-visible::after,.toggles .seg button:hover::after{opacity:1}
.toggles .seg button{position:relative}
@media (max-width:800px){
.hud{left:12px;right:64px;top:auto;bottom:228px;align-items:flex-start}
.status .st:not(.time){display:none}
.toggles{justify-content:flex-start;flex-wrap:nowrap;overflow-x:auto;max-width:100%}
.toggles .tg span{display:none}
.dock{right:auto;left:0;top:auto;bottom:180px;flex-direction:row;overflow-x:auto;max-width:100vw;border-radius:0;width:100%;display:none}
.log{left:10px;right:10px;width:auto;top:90px;bottom:240px}
.card{width:auto;border-radius:22px 22px 0 0}
.mascot{display:none}
}

/* night legibility for text that sits on the 3D canvas */

body.night .brand,body.night .hero-note,body.night .map-meta{background:#fffaf5e6;border-radius:16px;padding:10px 12px;box-shadow:0 6px 20px #0003;margin-left:-12px}
body.night .hero-note{top:200px}

@media (max-width:800px){
.island-label{min-height:30px!important;min-width:30px;font-size:10px!important;padding:2px 8px!important}
.hero-note,.map-meta{display:none}

.hud{bottom:224px}
}

#labels.compact .island-label{font-size:10.5px;padding:2px 9px!important;min-height:26px!important;box-shadow:0 2px 6px #4a2a141f!important}
#labels.compact .island-label strong{font-size:9px}

.icon-tile.thumb{flex:0 0 72px;height:72px;border-radius:18px;padding:0;overflow:visible;position:relative;background:#f4ece4}
.icon-tile.thumb img{width:72px;height:72px;border-radius:18px;object-fit:cover;display:block;box-shadow:0 0 0 2px #fff,0 4px 12px #4a2a1426}
.icon-tile .badge-ico{position:absolute;right:-6px;bottom:-6px;width:26px;height:26px;border-radius:9px;background:#fff;display:grid;place-items:center;color:var(--coral);box-shadow:0 2px 6px #4a2a1426}

/* ---- iteration 12: legibility & declutter ---- */
.control-tabs .status{margin-left:auto;display:flex;gap:5px;flex-wrap:nowrap;justify-content:flex-end;pointer-events:auto}
.control-tabs .st{box-shadow:none;border:1px solid #efe2d6;background:#fff;padding:4px 9px;font-size:10.5px}
.control-tabs .st b{font-size:12px}
.hud{top:22px;right:calc(318px + 280px)}
.brand{background:#fffaf5d9;border-radius:18px;padding:12px 14px 10px;margin-left:-14px;margin-top:-10px;box-shadow:0 6px 20px #4a2a141a;backdrop-filter:blur(10px)}
.hero-note{background:#fffaf5d9;border-radius:16px;padding:10px 12px;margin-left:-12px;box-shadow:0 6px 20px #4a2a141a;backdrop-filter:blur(10px)}
.map-meta{background:#fffaf5c7;border-radius:12px;padding:6px 10px;margin-left:-10px}
body.card-open .hero-note,body.card-open .map-meta{display:none}
.dock{display:none}
.sidebar-hidden .dock{display:flex}
.tour-caption .caption{background:#fffaf5ee;border-radius:16px;padding:10px 18px;display:inline-block;box-shadow:0 8px 24px #4a2a1426}
.tour-caption .tour-stage{background:#fffaf5ee;display:inline-block;border-radius:999px;padding:4px 12px}
.log-filters select{min-width:0;max-width:100%}
.log-filters{min-width:0}
.row .ph{white-space:normal;text-align:right;max-width:120px;line-height:1.3}
.flow-chip span{white-space:normal}
.site-board{display:none}
@media (max-width:1300px){.control-tabs .st:not(.time){display:none}}
@media (max-width:800px){
.control-tabs .status{display:none}
.toggles{max-width:calc(100vw - 80px);overflow-x:auto;scrollbar-width:none;-webkit-mask-image:linear-gradient(90deg,#000 85%,transparent)}
body.card-open .brand{display:none}
.brand{padding:8px 10px;margin:0}
}
.doing{display:flex;align-items:center;gap:8px;background:#eef4e7;border-radius:10px;padding:7px 10px;font-size:12px!important;color:#3d5a41;margin-top:10px}
.doing i{width:8px;height:8px;border-radius:50%;background:#5ebd7a;box-shadow:0 0 0 3px #5ebd7a33}

/* iteration 13: full-height canvas behind translucent panels */
#stage{bottom:0!important}
.controls{background:#fffaf5e8!important;backdrop-filter:blur(14px)}
@media (max-width:800px){
#stage{bottom:0!important}
.hud{top:auto;bottom:226px;left:10px;right:10px}
}
.route-tag{font:700 11px "Noto Sans TC",sans-serif;background:#fffaf5f2;border:1px solid #fff;border-left:4px solid #3e7c8c;border-radius:8px;padding:3px 8px;box-shadow:0 3px 8px #4a2a1424;pointer-events:none;white-space:nowrap}

.log-tabs{display:flex;gap:4px;background:#f4ece4;border-radius:12px;padding:3px;margin:8px 0 4px}
.log-tabs button{flex:1;min-height:34px;border:0;border-radius:9px;background:transparent;font-size:12px;color:#78685e;padding:0}
.log-tabs button[aria-selected=true]{background:#fff;color:#211d1d;box-shadow:0 1px 3px #4a2a1420;font-weight:700}
#log-body{display:flex;flex-direction:column;min-height:0;flex:1}
#log-body[hidden],.overview-panel[hidden]{display:none}
.overview-panel{overflow:auto;flex:1;padding-right:2px}
.overview-panel h4{font-size:10px;letter-spacing:1.6px;color:#9a8679;margin:14px 0 6px}
.stat-row.four{grid-template-columns:repeat(2,1fr)}
.heart-bars{display:flex;flex-direction:column;gap:6px}
.heart-bars>div{display:grid;grid-template-columns:52px 1fr 20px;align-items:center;gap:8px}
.heart-bars .bar{display:block;height:8px;background:#efe4da;border-radius:5px;overflow:hidden}
.heart-bars .bar b{display:block;height:100%;border-radius:5px}
.heart-bars em{font-style:normal;font-size:12px;font-weight:700;text-align:right}
.mini-list{display:grid;grid-template-columns:1fr 1fr;gap:5px}
.mini-list button{display:grid;grid-template-columns:16px 1fr auto;gap:6px;align-items:center;min-height:34px;padding:4px 8px;border-radius:9px;font-size:11.5px;text-align:left;background:#fff;border:1px solid #f0e4da}
.mini-list button .ico{color:var(--coral)}
.mini-list em{font-style:normal;font-weight:700;color:#78685e}
#log-list li .lt time{font:600 10px ui-monospace,monospace;color:#76645a;margin-right:6px}
#log-list li .lt .ico{color:var(--coral);vertical-align:-3px;margin-right:4px}
body.interacted .mascot{display:none}
.mascot{background:#fffaf5e6;border-radius:999px;padding:4px 10px 4px 4px;box-shadow:0 3px 10px #4a2a141f}
.pill.soft{white-space:normal}
.row .ph{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;max-width:130px;font-size:9.5px}
.pills .pill.soft{max-width:100%;line-height:1.4}
.name-tag .carry{font-size:9.5px;color:#a5442a;border-left:1px solid #efe2d6;padding-left:5px}
body.card-open .mascot,body.flows-on .mascot{display:none}
.tour-controls #tour-time{background:#fffaf5ee;border-radius:999px;padding:4px 10px}
@media (max-width:800px){.toggles{flex-wrap:wrap;max-width:none;overflow:visible;-webkit-mask-image:none}.toggles .tg,.toggles .seg button{min-height:38px}.toggles .tg{width:38px}}
.card::after{content:"";position:sticky;display:block;bottom:-18px;height:28px;margin:0 -20px -18px;background:linear-gradient(#fffdfa00,#fffdfa);pointer-events:none}

/* iteration 17: card open → time panel collapses to its tab row */
@media (min-width:801px){
body.card-open .controls .panel,body.card-open .controls .control-note{display:none!important}
body.card-open .controls{padding:8px 14px}
body.card-open .card{bottom:150px}
}
.route-tag{font-size:13px;padding:5px 11px;border-left-width:5px}
.route-tag::before{content:"⚑ ";color:#3e7c8c}
.shared-phase{font-size:11.5px!important;background:#fbf3ec;border-left:3px solid var(--coral);border-radius:8px;padding:7px 10px;margin:0 0 8px;line-height:1.55!important}
.shared-phase b{display:block;font-size:10px;color:#9a8679;letter-spacing:1px}

/* iteration 19 */
.name-tag{font-size:11px;min-height:24px}
.name-tag b{font-size:10px}
.name-tag .carry{font-size:10.5px}
@media (min-width:801px){.log{right:12px;top:12px;bottom:auto;max-height:calc(100% - 300px);width:300px;z-index:12}}
.toggles .seg2 .tg{box-shadow:none;border:0;background:transparent;min-height:36px;width:40px;padding:0;justify-content:center}
.toggles .seg2 .tg[aria-pressed=true]{background:#211d1d;color:#fff8f4}
body.zoomed .map-meta,body.zoomed .hero-note,body.zoomed .mascot{display:none}
@media (min-width:801px){body.log-open #sidebar .tree,body.log-open #sidebar .side-tabs,body.log-open #sidebar .search{visibility:hidden}}
@media (min-width:801px){.log{max-height:calc(100% - 60px)!important}}
@media (max-width:800px){.card{max-height:48vh!important}}
.island-label.dim{opacity:.78!important;filter:saturate(.6)}

/* iteration 24: renewal planned-use labels with icons; tag route chip */
.ghost-label{flex-direction:row;gap:5px;color:var(--g,#a5442a);border:1.5px solid var(--g,#db6a41);border-style:solid;background:#fffdf9f5;box-shadow:0 2px 6px #4a2a1420}
.ghost-label i{display:grid;place-items:center;width:16px;height:16px;border-radius:50%;background:var(--g,#db6a41);color:#fff}
.ghost-label svg{width:11px;height:11px}
.name-tag b{font:600 9.5px "Noto Sans TC",sans-serif;color:#2f6170;background:#e6f1f1;border-radius:999px;padding:1px 6px}
.lt .nw{white-space:nowrap}
.icon-tile.role.portrait{flex-basis:64px;height:64px;position:relative;overflow:visible;padding:0;border:2px solid #fff;box-shadow:0 0 0 2px #db6a41,0 4px 10px #4a2a1430}
.icon-tile.role.portrait img{width:100%;height:100%;object-fit:cover;border-radius:13px;display:block}
.icon-tile.role.portrait .glyph{position:absolute;right:-6px;bottom:-6px;width:22px;height:22px;border-radius:50%;background:#211d1d;color:#fff8f4;font:700 11px "Noto Sans TC",sans-serif;display:grid;place-items:center;border:2px solid #fff}

/* iteration 26: activity bubbles, current theme row, legend, title fit */
.name-tag.bubble{position:relative;border-radius:12px;padding:3px 9px 3px 3px;background:#fffdfa;border:1.5px solid #f0d9c8;margin-bottom:7px}
.name-tag.bubble::after{content:"";position:absolute;left:50%;bottom:-7px;margin-left:-6px;border:6px solid transparent;border-top-color:#fffdfa;border-bottom:0;filter:drop-shadow(0 1.5px 0 #f0d9c8)}
.name-tag.bubble .doing{font-size:11px;color:#5d4f49}
.name-tag.bubble .doing b{font:700 11px "Noto Sans TC",sans-serif;color:#a5442a;background:none;padding:0}
#tree details.current>summary{background:#fff1e8;box-shadow:inset 3px 0 0 #db6a41;border-radius:10px}
#tree details.current>summary .item-name{color:#a5442a;font-weight:700}
.legend{background:#fffaf6f5!important;box-shadow:0 2px 8px #4a2a141a}
.card h2{font-size:clamp(19px,2.1vw,24px);word-break:keep-all;overflow-wrap:anywhere}
.island-label.selected{z-index:3}
/* iteration 27: mobile keeps one toolbar row (time is on the slider below) */
@media (max-width:800px){.toggles .seg:not(.seg2){display:none}.toggles{flex-wrap:nowrap}}

/* v3 content: plain sentence, vision quote */
.card .plain{font-size:14.5px;line-height:1.65;color:#2e2724;background:#fff6ef;border-radius:12px;padding:10px 12px;margin:10px 0 12px}
.card blockquote.vision{margin:6px 0 10px;padding:2px 0 2px 10px;border-left:3px solid #db6a41;color:#6b5a52;font-size:12.5px;line-height:1.6}

/* A4: layer toolbar — icon over a single-line label, width follows content */
@media (min-width:801px){
.toggles{max-width:none;overflow:visible;-webkit-mask-image:none}
.toggles .seg2 .tg{width:auto;min-width:46px;min-height:46px;padding:4px 9px;flex-direction:column;justify-content:center;gap:2px}
.toggles .seg2 .tg span{display:block!important;white-space:nowrap;font-size:11px;line-height:1.2;letter-spacing:.02em}
.toggles .seg button{min-height:46px;width:42px}
}

/* A6: card frame clips; inner content scrolls with an inset, thin, brand-tinted scrollbar */
.card{overflow:hidden!important;padding:0!important;display:flex;flex-direction:column}
.card[hidden]{display:none!important}
.card::after{display:none!important}
#card-content{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;padding:20px 12px 40px 20px;margin:8px 6px 8px 0;scrollbar-width:thin;scrollbar-color:#e8c9b6 transparent;overscroll-behavior:contain}
#card-content::-webkit-scrollbar{width:6px}
#card-content::-webkit-scrollbar-track{background:transparent;margin:10px 0}
#card-content::-webkit-scrollbar-thumb{background:#e8c9b6;border-radius:6px}
#card-content::-webkit-scrollbar-thumb:hover{background:#db6a41}
.card .close{z-index:2}
/* A5: tiles never overflow */
.stat-row{grid-template-columns:repeat(auto-fit,minmax(0,1fr))!important}
.stat{min-width:0;overflow:hidden}
.stat b{font-size:clamp(14px,1.25vw,19px)!important;overflow-wrap:anywhere;word-break:normal!important;min-width:0;max-width:100%}
.stat .lbl{overflow-wrap:anywhere}

/* A7: item pins on the map + numbered sidebar items */
.item-pin{display:inline-flex;align-items:center;gap:5px;padding:3px 9px 3px 3px;border-radius:999px;background:#fffdfa;border:1.5px solid #db6a41;box-shadow:0 3px 10px #4a2a1430;font:600 11.5px/1.2 "Noto Sans TC",sans-serif;color:#2e2724;white-space:nowrap;pointer-events:auto;cursor:pointer;transform:translateY(-50%);transition:transform .15s}
.item-pin b{display:grid;place-items:center;width:20px;height:20px;border-radius:50%;background:#db6a41;color:#fff;font-size:12px;font-weight:800}
.item-pin.hot,.item-pin:hover{transform:translateY(-50%) scale(1.14);background:#211d1d;color:#fff8f4;border-color:#211d1d;z-index:5}
.item-pin.sel{background:#db6a41;color:#fff;border-color:#fff}
.item-pin.sel b{background:#fff;color:#db6a41}
#tree .children button .pin-no{display:inline-grid;place-items:center;width:18px;height:18px;border-radius:50%;background:#fff1e8;color:#db6a41;font-size:11px;margin-right:8px;font-weight:800}
#tree .children button.hot{background:#fff1e8;color:#a5442a}
#tree .children button.hot .pin-no{background:#db6a41;color:#fff}
.item-pin.mini{padding:2px}
.item-pin.mini span{display:none}
.item-pin.mini:hover span{display:inline}
.stat.long b{font-size:clamp(12.5px,1.05vw,15px)!important;letter-spacing:-.02em}
.item-pin.compact.mini:hover,.item-pin.compact.hot{padding:3px 9px 3px 3px}
.item-pin.compact.mini:hover span{display:inline}
/* scroll cue at the bottom of the card */
.card::before{content:"";position:absolute;left:1px;right:14px;bottom:1px;height:34px;border-radius:0 0 20px 20px;background:linear-gradient(#fffdfa00,#fffdfaf2);pointer-events:none;z-index:1}
.item-pin{z-index:4}
.item-pin.slid{border-style:dashed}
.control-note{color:#5f514a!important}

/* brand card: same left edge as the detail card, never overlapping it */
@media (min-width:801px){
  .brand{left:30px!important;top:18px!important;margin:0!important}
  .card{left:30px!important;top:calc(var(--brand-bottom,190px) + 12px)!important}
  body.card-open .brand{display:block!important}
}
.island-label.numonly{font-size:0!important;padding:4px 7px!important}.island-label.numonly strong{font-size:11px}.island-label.numonly:hover{font-size:12px!important}

/* ===== release fixes (2026-10-11) ===== */
/* page footer removed: reclaim the strip */
.footer{display:none!important}
.sidebar{bottom:0!important}
@media (min-width:801px){
  .controls{bottom:23px!important}
  body.card-open .card{bottom:108px!important}
  .card{bottom:120px}
}
/* CSS2D labels must never transition transform (the renderer sets it every frame) */
.item-pin,.island-label,.name-tag,.route-tag,.ghost-label{transition:none!important}
.item-pin.hot,.item-pin:hover{transform:none}
.mob-only{display:none!important}
@media (hover:none){
  .item-pin.mini:hover span,.item-pin.compact.mini:hover span{display:none}
  .toggles .tg::after,.toggles .seg button::after{display:none}
}

/* ---------- mobile layout ---------- */
@media (max-width:800px){
  .mob-only{display:block!important}
  .sheet-handle.mob-only{display:flex!important}
  #stage{bottom:0!important;right:0!important}
  .map-meta,.dock,.hero-note{display:none!important}
  .toolbar{z-index:15}
  .toolbar button[aria-pressed=true]{background:#211d1d;color:#fff8f4}
  /* time panel: on demand, docked to the bottom edge */
  .controls{display:none!important}
  body.m-time .controls{display:block!important;left:0!important;right:0!important;bottom:0!important;border-radius:18px 18px 0 0!important;padding:12px 14px calc(12px + env(safe-area-inset-bottom,0px))!important;z-index:14}
  /* layers bar: not shown on phones */
  .hud{display:none!important}
  /* detail card: bottom sheet flush with the screen edge, thin side margins */
  .card{left:8px!important;right:8px!important;bottom:0!important;top:auto!important;width:auto!important;max-height:60%!important;border-radius:20px 20px 0 0!important;padding-bottom:env(safe-area-inset-bottom,0px)!important;z-index:16!important}
  body.card-open .card{bottom:0!important}
  #card-content{padding-bottom:calc(24px + env(safe-area-inset-bottom,0px))}
  /* index sheet: half height by default, full on handle tap / swipe up */
  .sidebar{top:auto!important;height:52%!important;bottom:0!important;transition:transform .25s,height .25s!important;z-index:17;padding-top:18px}
  .sidebar.full{height:calc(100% - 16px)!important}
  .sheet-handle{position:absolute;top:0;left:50%;transform:translateX(-50%);width:96px;height:22px;border:0;background:transparent;display:flex!important;align-items:center;justify-content:center;padding:0;cursor:pointer;z-index:2}
  .sheet-handle i{display:block;width:44px;height:5px;border-radius:5px;background:#211d1d40}
  .sidebar .side-head{padding-top:10px}
  /* half sheet: drop the intro copy so the list itself gets the room; full sheet shows everything */
  .sidebar:not(.full) .side-head .eyebrow,.sidebar:not(.full) .side-head h2,.sidebar:not(.full) .side-head p{display:none}
  .sidebar:not(.full) .side-head{padding-top:14px!important;padding-right:60px!important}
  .sidebar:not(.full) .side-head .search{margin-top:0}
  .sidebar:not(.full) .mobile-close{top:16px}
}

/* search field: always dark text (dark-mode browsers default inputs to white text) */
.search,.search:focus{color:#211d1d!important;-webkit-text-fill-color:#211d1d;caret-color:#db6a41;color-scheme:light}
.search::placeholder{color:#9a8b82;-webkit-text-fill-color:#9a8b82}
@media (max-width:800px){.search{font-size:16px!important}}

/* map badges are not toolbar buttons: no 44px touch minimum (it stretched the number badges into tall pills) */
.item-pin{min-height:0!important;min-width:0!important}
.item-pin.mini,.item-pin.compact.mini{width:26px;height:26px;justify-content:center;padding:2px!important}
/* night only recolours the brand card; its size and position stay the same at every time of day */
body.night .brand{padding:12px 14px 10px;margin-left:-14px;margin-top:-10px}
@media (min-width:801px){body.night .brand{margin:0!important}}
@media (max-width:800px){body.night .brand{padding:8px 10px!important;margin:0!important}}
/* partner-city tags: quiet place-name captions, only while exploring city diplomacy */
.route-tag{font:500 10px/1.3 "Noto Sans TC",sans-serif!important;color:#4f6266;background:#fffaf5b3!important;border:0!important;border-radius:999px!important;padding:2px 8px!important;box-shadow:none!important;letter-spacing:.04em}
.route-tag::before{content:"↗ "!important;color:#7a9a9f!important}
/* mid widths (tablet / small laptop): the layer bar no longer fits between brand and toolbar — dock it under the brand */
@media (min-width:801px) and (max-width:1279px){
  .hud{left:30px!important;right:auto!important;top:calc(var(--brand-bottom,180px) + 10px)!important;align-items:flex-start!important}
  .hud .toggles{justify-content:flex-start!important;flex-wrap:wrap!important;max-width:calc(100vw - 318px - 60px)!important}
  body.card-open .hud{display:none!important}
  .hero-note{display:none!important}
}
/* easter egg: Puma's tag — small, warm, a little playful; grows a speech line while he stops on his soapbox */
.name-tag.puma-tag{background:#211d1d;color:#fff8f4;border:1.5px solid #db6a41;padding:2px 9px 2px 4px;gap:5px;box-shadow:0 3px 10px #4a2a1440;cursor:pointer;opacity:1!important}
.name-tag.puma-tag i{background:#db6a41;color:#fff;width:16px;height:16px;font-size:10px}
.name-tag.puma-tag .pn{font:800 11px/1 "Noto Sans TC",sans-serif;color:#fcea8b;background:none;padding:0;letter-spacing:.04em}
.name-tag.puma-tag .stop{font-size:10.5px;color:#fff8f4}
.name-tag.puma-tag .stop:empty{display:none}
.name-tag.puma-tag.talking{border-color:#fcea8b}
.icon-tile.puma-tile{background:linear-gradient(150deg,#211d1d,#3a3332);color:#fcea8b;font-size:24px}
/* phone detail card: fixed one-third height by default, full screen on demand */
#card-size{display:none}
@media (max-width:800px){
  .card{height:34%!important;max-height:none!important;min-height:220px;transition:height .25s ease!important}
  .card.full{height:calc(100% - 10px)!important}
  .card #card-handle{position:absolute;top:0;left:50%;transform:translateX(-50%);z-index:3}
  #card-size{display:inline-flex!important;position:absolute;top:10px;right:54px;z-index:3;min-height:32px;height:32px;padding:0 11px;border-radius:999px;border:1px solid #ecdccf;background:#fff;font-size:12px;font-weight:600;color:#5d514b;align-items:center}
  #card-size[aria-pressed=true]{background:#211d1d;color:#fff8f4;border-color:#211d1d}
  #card-content{padding-top:30px!important}
  .card .card-head{padding-right:40px}
}
@media (prefers-reduced-motion:reduce){.card{transition:none!important}}
/* toolbar overview arrow: one drawn icon on every device (the ↗ character turns into an emoji on phones) */
.tb-ico{width:13px;height:13px;vertical-align:-2px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
/* sheet handles: no button hover/tap fill — only the grab bar shows */
.sheet-handle,.sheet-handle:hover,.sheet-handle:active,.sheet-handle:focus{background:transparent!important;box-shadow:none!important;border:0!important;-webkit-tap-highlight-color:transparent}
.sheet-handle:focus:not(:focus-visible){outline:none}
/* removed: map caption and mascot hint */
.map-meta,.mascot{display:none!important}
/* removed: the "14 一格政見" hero note */
.hero-note{display:none!important}
/* 2026-10-14: resident speech tags — one clean pill: role badge centred on the left, "正在搬 + item" on one line */
.name-tag.bubble{align-items:center;gap:6px;padding:3px 10px 3px 3px;border-radius:999px;min-height:26px;border:1.5px solid #f0d9c8;box-shadow:0 3px 10px #4a2a1426}
.name-tag.bubble>i{flex:0 0 20px;width:20px;height:20px;font-size:10px;line-height:1;align-self:center}
.name-tag.bubble .doing{display:inline-flex!important;align-items:baseline;gap:4px;margin:0!important;padding:0!important;background:none!important;border-radius:0;font-size:11px!important;line-height:1.2;color:#5d4f49}
.name-tag.bubble .doing::before,.name-tag.bubble .doing i{display:none}
.name-tag.bubble .doing b{font:700 11.5px/1.2 "Noto Sans TC",sans-serif;color:#a5442a}
/* island icon column: never shown (also not when the index is closed) */
.dock,.sidebar-hidden .dock{display:none!important}
/* index list: no divider lines between themes */
.tree details,.tree .flow-item{border-bottom:0!important}
/* 2026-10-15: bottom time panel (台北人的一天／任期時間軸／HEART) removed — the clock runs by itself;
   light presets and 暫停 live in the layer bar (desktop) or behind the 時間 button (phone) */
.controls,body.m-time .controls{display:none!important}
@media (min-width:801px){
  .card,body.card-open .card{bottom:24px!important}
}
@media (max-width:800px){
  body.m-time .hud{display:flex!important;position:absolute;left:0!important;right:0!important;bottom:0!important;top:auto!important;width:auto!important;z-index:14;padding:10px 12px calc(12px + env(safe-area-inset-bottom,0px))!important;background:#fff8f4f2;border-radius:18px 18px 0 0;box-shadow:0 -8px 30px #211d1d1f;justify-content:center;align-items:center!important}
  body.m-time .hud .toggles{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;justify-content:center;gap:8px!important;max-width:none!important;width:auto!important}
  body.m-time .hud .toggles .seg{width:auto!important}
  body.m-time .hud .toggles .seg button{width:46px!important;min-height:40px!important;height:40px!important;flex:0 0 46px!important}
  body.m-time .hud .seg2 .tg:not([data-toggle=freeze]){display:none!important}
  body.m-time .hud .status{display:none!important}
}
@media (max-width:800px){body.m-time .hud .toggles .seg{display:flex!important}}

/* ===== brand block v2 (2026-10-15): HEART 政策島 ===== */
.brand .candidate{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:10px;padding-top:9px;border-top:1.5px solid #db6a4140;font-size:12px;line-height:1}
.brand .candidate .proj{display:inline-flex;align-items:baseline;gap:5px;font-weight:800;font-size:15px;letter-spacing:.06em;color:var(--ink,#211D1D)}
.brand .candidate .proj em{font-style:normal;font:900 15px/1 Arial,sans-serif;letter-spacing:.04em;color:var(--coral,#DB6A41)}
.brand .candidate b{margin:0;font-weight:600;font-size:11.5px;letter-spacing:.12em;color:#6b5a52;white-space:nowrap}
@media (max-width:800px){
  .brand .candidate{margin-top:7px;padding-top:6px;gap:10px}
  .brand .candidate .proj,.brand .candidate .proj em{font-size:12px}
  .brand .candidate b{font-size:10px;letter-spacing:.08em}
}

/* ===== brand block v3 (2026-10-15): landscape — FUTURE SOON. left, title stack right ===== */
.brand{display:flex!important;align-items:center;gap:16px}
body.card-open .brand{display:none!important}
@media (min-width:801px){body.card-open .brand{display:flex!important}}
.brand .future{font:900 40px/.9 Arial,sans-serif!important;letter-spacing:-1.8px!important;white-space:nowrap}
.brand .future span{display:block!important;margin:0!important}
.brand .brand-r{display:flex;flex-direction:column;gap:9px;padding-top:2px}
.brand h1{margin:0!important;font-size:20px!important;font-weight:800;letter-spacing:.2em!important;line-height:1;white-space:nowrap}
.brand .candidate{margin:0!important;padding:0!important;border:0!important;display:block}
.brand .candidate .proj{display:inline-flex;align-items:baseline;gap:6px;font-size:14px;font-weight:700;letter-spacing:.14em;line-height:1;white-space:nowrap}
.brand .candidate .proj em{font-size:14px;letter-spacing:.06em}
@media (max-width:800px){
  .brand{gap:11px}
  .brand .future{font-size:25px!important;letter-spacing:-1.1px!important}
  .brand .brand-r{gap:6px;padding-top:1px}
  .brand h1{font-size:14px!important;letter-spacing:.16em!important}
  .brand .candidate .proj,.brand .candidate .proj em{font-size:11px}
  .brand .candidate .proj{letter-spacing:.1em}
}
@media (min-width:1280px){.hud{left:calc(var(--brand-left,30px) + var(--brand-w,320px) + 18px)!important}}
.brand .brand-r{align-items:flex-start}
.brand .candidate{text-align:left}

/* 2026-10-23: the top bar ends 16px before the right-hand button group, whatever its width (「我的角色」 widened it) */
@media (min-width:1280px){.hud{right:calc(100vw - var(--toolbar-left, calc(100vw - 598px)) + 16px)!important}}

/* 2026-10-24: 「協作關係・依據」圖例移除 */
#legend{display:none!important}

/* 2026-10-25: Puma 的思考雲與「市政建言」按鈕（CSS2D，錨點在頭頂上方；內容往上長） */
.puma-extra{width:0;height:0;overflow:visible;pointer-events:none}
.puma-extra .px-col{position:absolute;left:0;bottom:20px;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:30px;width:max-content} /* 錨點與 Puma 名牌相同：往上推 20px，落在名牌上方 */
.puma-extra .px-col:has(.puma-advice[hidden]) .puma-cloud{margin-bottom:26px} /* 只有雲時，留出小圓點的位置 */
.puma-cloud{position:relative;max-width:210px;padding:9px 14px;border-radius:22px;background:#fffdf9;color:#211d1d;border:1.5px solid #211d1d1f;box-shadow:0 6px 18px #4a2a1430;font:600 12.5px/1.5 "Noto Sans TC",sans-serif;text-align:center;white-space:normal;animation:pumaCloudIn .45s ease-out}
.puma-cloud[hidden],.puma-advice[hidden]{display:none!important}
.puma-cloud .q{display:block}
.puma-cloud .src{display:block;margin-top:3px;font:500 10px/1.3 "Noto Sans TC",sans-serif;color:#8a7a70;letter-spacing:.02em}
.puma-cloud .src:empty{display:none}
.puma-cloud i{position:absolute;border-radius:50%;background:#fffdf9;border:1.5px solid #211d1d1f;box-shadow:0 3px 8px #4a2a1420}
.puma-cloud .d1{width:12px;height:12px;left:calc(50% - 4px);bottom:-14px}
.puma-cloud .d2{width:7px;height:7px;left:calc(50% + 4px);bottom:-24px}
.puma-advice{pointer-events:auto;display:inline-flex;align-items:center;gap:4px;padding:6px 12px;border-radius:999px;background:#db6a41;color:#fff!important;border:2px solid #fff;box-shadow:0 4px 14px #4a2a1440;font:800 12.5px/1.2 "Noto Sans TC",sans-serif;text-decoration:none;letter-spacing:.04em;white-space:nowrap;cursor:pointer}
.puma-advice:hover{background:#c85a33}
.puma-advice:focus-visible{outline:3px solid #fcea8b;outline-offset:2px}
@keyframes pumaCloudIn{from{opacity:0;transform:translateY(6px) scale(.92)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.puma-cloud{animation:none}}
/* 島主名牌與角色卡 */
.name-tag.puma-tag.lord-tag{border-color:#e9e1cc}
.name-tag.puma-tag.lord-tag i{background:#f5d33a;color:#211d1d}
.icon-tile.puma-tile.lord-tile{background:linear-gradient(150deg,#f5d33a,#e9e1cc);color:#211d1d}
.lord-link{display:inline-block;padding:8px 14px;border-radius:999px;background:#211d1d;color:#fff8f4!important;font-weight:800;text-decoration:none}
.lord-link:hover{background:#3a3332}


/* ===== NKUHT Hotel Management CIS Yellow + Coral-Orange Theme & Logo Integration (2026-11-10) ===== */
:root {
  --cis-yellow: #f5d33a;
  --cis-gold: #e5a922;
  --cis-gold-deep: #c48712;
  --cis-cream: #fff6cf;
  --coral: #db6a41;
  --yellow: #f5d33a;
}

/* Brand block with official NKUHT HTL Logo + CIS Yellow/Orange mix */
.brand {
  background: linear-gradient(135deg, #fffdf7f2 0%, #fff7e2f0 55%, #ffefe4ee 100%) !important;
  border: 1.5px solid #e5a92266 !important;
  border-top: 3.5px solid var(--cis-gold) !important;
  box-shadow: 0 8px 24px #4a2a141f, 0 0 0 1px #ffffffcc inset !important;
  padding: 11px 16px 10px 12px !important;
  gap: 12px !important;
}
.brand-logo-link {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, var(--cis-yellow) 0%, var(--coral) 100%);
  box-shadow: 0 3px 10px #db6a4138;
  transition: transform 0.2s ease;
}
.brand-logo-link:hover {
  transform: scale(1.06) rotate(-3deg);
}
.brand-logo {
  display: block;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
}
.brand .future {
  background: linear-gradient(155deg, #c98810 0%, #e09a1e 38%, #db6a41 75%, #c7532a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--coral);
  -webkit-text-fill-color: transparent;
  font: 900 36px/0.92 Arial, sans-serif !important;
}
.brand .future span {
  background: linear-gradient(135deg, #db6a41 0%, #e5a922 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand .candidate {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}
.brand .candidate .proj {
  background: linear-gradient(135deg, #fff3b8 0%, #ffe3cc 100%);
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid #e5a92266;
  font-size: 12.5px !important;
}
.brand .candidate .proj em {
  color: #c85228 !important;
  font-weight: 900;
}
.brand .candidate .cis-tag {
  font: 800 10px/1 ui-monospace, monospace !important;
  letter-spacing: 0.08em !important;
  color: #8c6210 !important;
  background: #f5d33a55;
  padding: 3px 6px;
  border-radius: 6px;
}
@media (max-width: 800px) {
  .brand-logo {
    width: 38px;
    height: 38px;
  }
  .brand .future {
    font-size: 22px !important;
  }
  .brand .candidate .cis-tag {
    display: none;
  }
}

/* Loading screen logo + CIS yellow-orange gradient */
.loading-logo {
  width: 82px;
  height: 82px;
  margin: 0 auto 12px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--cis-yellow), var(--coral));
  box-shadow: 0 8px 24px #db6a4133;
}

/* Toolbar link & buttons with CIS yellow + orange hover/active accents */
@media (min-width: 801px) and (max-width: 1680px) {
  .hud {
    left: 30px !important;
    right: auto !important;
    top: calc(var(--brand-bottom, 120px) + 10px) !important;
    align-items: flex-start !important;
  }
  .hud .toggles {
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
  }
  body.card-open .hud {
    display: none !important;
  }
}
.toolbar .tb-link,
.toolbar button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fffdf8eb;
  border: 1.5px solid #e5a92255;
  color: #211d1d;
  font-weight: 700;
  font-size: 12.5px;
  text-decoration: none;
  border-radius: 999px;
  padding: 0 13px;
  min-height: 38px;
  height: 38px;
  box-shadow: 0 2px 8px #4a2a1414;
}
.toolbar .tb-link:hover,
.toolbar button:hover {
  background: linear-gradient(135deg, #fff4b8 0%, #ffe4cf 100%);
  border-color: var(--coral);
}

/* Sidebar CIS Yellow + Coral-Orange blending */
.side-head .eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #b86b14;
  font-weight: 800;
}
.side-logo {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  box-shadow: 0 1px 4px #00000024;
}
.side-tabs button.active {
  background: linear-gradient(135deg, #2b231d 0%, #3d2a1d 100%);
  color: var(--cis-yellow);
  border-color: var(--cis-gold);
  box-shadow: 0 2px 8px #db6a4126;
}
#tree details.current > summary {
  background: linear-gradient(90deg, #fff5c4 0%, #ffefe3 100%) !important;
  box-shadow: inset 4px 0 0 var(--cis-gold), inset 7px 0 0 var(--coral) !important;
}
#tree .index {
  background: linear-gradient(135deg, #d48817, #db6a41);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}
#tree .children button .pin-no {
  background: linear-gradient(135deg, #fff3bd, #ffe4d1) !important;
  color: #b84b22 !important;
  border: 1px solid #e5a92255;
}
#tree .children button.hot .pin-no {
  background: linear-gradient(135deg, var(--cis-gold), var(--coral)) !important;
  color: #fff !important;
}

/* Sidebar bottom attribution bar */
.side-foot {
  margin-top: auto;
  padding: 8px 14px 10px;
  border-top: 1px solid #e5a92240;
  background: linear-gradient(90deg, #fff9e2e6 0%, #fff3eae6 100%);
}
.side-credits-btn {
  width: 100%;
  min-height: 32px !important;
  padding: 5px 10px !important;
  border-radius: 8px !important;
  border: 1px dashed #d4952a88 !important;
  background: #fffdf7 !important;
  color: #6b533b !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.side-credits-btn:hover {
  background: linear-gradient(135deg, #fff3b8, #ffe5d0) !important;
  color: #211d1d !important;
  border-style: solid !important;
}

/* 3D Island Labels & Item Pins CIS Yellow + Orange mix */
.island-label {
  border: 1.5px solid #e5a92266 !important;
  background: linear-gradient(135deg, #fffef9f5 0%, #fff7e4f2 100%) !important;
}
.island-label strong {
  background: linear-gradient(135deg, #f5d33a55, #db6a4128);
  color: #c24e25;
  padding: 1px 5px;
  border-radius: 999px;
}
.island-label.selected {
  background: linear-gradient(135deg, #261f1b 0%, #3b281e 100%) !important;
  border-color: var(--cis-yellow) !important;
  box-shadow: 0 0 0 2px #db6a4188, 0 4px 12px #211d1d44 !important;
}
.island-label.selected strong {
  background: linear-gradient(135deg, var(--cis-yellow), var(--coral));
  color: #211d1d !important;
}
.item-pin {
  border: 1.5px solid var(--cis-gold) !important;
  background: linear-gradient(135deg, #fffef9, #fff5dd) !important;
}
.item-pin b {
  background: linear-gradient(135deg, #e5a922 0%, #db6a41 100%) !important;
}
.item-pin.sel {
  background: linear-gradient(135deg, #db6a41 0%, #d4901b 100%) !important;
  border-color: #fff !important;
}

/* Detail Card CIS Yellow + Coral-Orange accents */
.icon-tile {
  background: linear-gradient(145deg, #fff5c8 0%, #fde2b8 52%, #f7d2bc 100%) !important;
  color: #c44f27 !important;
  border: 1px solid #e5a92244;
}
.card .plain {
  background: linear-gradient(135deg, #fff9df 0%, #fff2e8 100%) !important;
  border-left: 3.5px solid var(--cis-gold);
}
.card .phase {
  border-left: 3.5px solid var(--cis-gold) !important;
  background: linear-gradient(90deg, #fff8dc, #fbf2eb) !important;
}
.credit-box {
  background: linear-gradient(135deg, #fffaf0 0%, #fff3e8 100%);
  border: 1px solid #e5a92255;
  border-left: 4px solid var(--coral);
  border-radius: 12px;
  padding: 11px 13px;
  margin-bottom: 10px;
  font-size: 12.5px;
  line-height: 1.65;
}
.credit-box b {
  display: block;
  color: #9e421b;
  font-size: 13px;
  margin-bottom: 3px;
}
.credit-box a {
  color: #b85423;
  font-weight: 700;
}

/* ===== Mobile App UI & RWD Upgrade (PWA / Bottom App Dock / 3-Stage Sheets / Full Layer Control Center) ===== */
.mob-top-actions {
  display: none;
}

@media (max-width: 800px) {
  /* 1. Top-Left Compact Brand Pill + Top-Right Quick Action Pills */
  .brand {
    position: fixed !important;
    top: calc(10px + env(safe-area-inset-top, 0px)) !important;
    left: 10px !important;
    margin: 0 !important;
    padding: 6px 11px 6px 8px !important;
    gap: 8px !important;
    border-radius: 999px !important;
    border-top-width: 1.5px !important;
    max-width: calc(100vw - 148px) !important;
    z-index: 18 !important;
    box-shadow: 0 6px 20px rgba(33, 29, 29, 0.16), 0 0 0 1px rgba(255, 255, 255, 0.85) inset !important;
  }
  /* Keep compact brand pill visible during half-sheet browsing; only hide if a sheet is expanded full-screen */
  body.card-open .brand {
    display: flex !important;
  }
  body:has(.card.full:not([hidden])) .brand,
  body:has(.sidebar.mobile-open.full) .brand,
  body.log-open:has(#log.full) .brand,
  body:has(.hm-panel.open.full) .brand,
  body:has(.card.full:not([hidden])) .mob-top-actions,
  body:has(.sidebar.mobile-open.full) .mob-top-actions,
  body.log-open:has(#log.full) .mob-top-actions,
  body:has(.hm-panel.open.full) .mob-top-actions {
    opacity: 0;
    pointer-events: none;
  }
  .brand-logo {
    width: 32px !important;
    height: 32px !important;
  }
  .brand .future {
    display: none !important;
  }
  .brand .brand-r {
    gap: 3px !important;
    padding-top: 0 !important;
    min-width: 0;
  }
  .brand h1 {
    font-size: 13px !important;
    letter-spacing: 0.08em !important;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .brand .candidate .proj {
    padding: 1px 7px !important;
    font-size: 10px !important;
    letter-spacing: 0.04em !important;
  }
  .brand .candidate .proj em {
    font-size: 10px !important;
  }

  .mob-top-actions {
    position: fixed !important;
    top: calc(10px + env(safe-area-inset-top, 0px)) !important;
    right: 10px !important;
    z-index: 18 !important;
    display: flex !important;
    align-items: center;
    gap: 6px;
    pointer-events: auto;
    transition: opacity 0.2s ease;
  }
  .mob-top-actions button {
    min-height: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    padding: 0 11px !important;
    border-radius: 999px !important;
    border: 1.5px solid rgba(229, 169, 34, 0.5) !important;
    background: rgba(255, 252, 245, 0.92) !important;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    color: #211d1d !important;
    font: 800 12px/1 "Noto Sans TC", sans-serif !important;
    box-shadow: 0 4px 14px rgba(33, 29, 29, 0.14) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
  }
  .mob-top-actions #mob-credits,
  .mob-top-actions #mob-help {
    padding: 0 !important;
    width: 36px !important;
    font-size: 13px !important;
  }
  .mob-top-actions button[aria-pressed="true"] {
    background: linear-gradient(135deg, #211d1d 0%, #3b281e 100%) !important;
    color: var(--cis-yellow) !important;
    border-color: var(--cis-gold) !important;
  }

  /* 2. Floating Bottom App Dock (Thumb Zone Navigation Bar) */
  nav.toolbar {
    position: fixed !important;
    left: 10px !important;
    right: 10px !important;
    top: auto !important;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 25 !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 4px !important;
    padding: 5px 6px !important;
    background: rgba(255, 251, 244, 0.95) !important;
    -webkit-backdrop-filter: blur(18px) !important;
    backdrop-filter: blur(18px) !important;
    border: 1.5px solid rgba(229, 169, 34, 0.5) !important;
    border-radius: 20px !important;
    box-shadow: 0 10px 32px rgba(33, 29, 29, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.85) inset !important;
  }
  nav.toolbar > button:not(.wide):not(#tour),
  nav.toolbar > .tb-link {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    min-height: 44px !important;
    height: 44px !important;
    padding: 0 4px !important;
    border-radius: 14px !important;
    border: 1px solid transparent !important;
    background: transparent !important;
    box-shadow: none !important;
    font: 800 11.5px/1.15 "Noto Sans TC", sans-serif !important;
    color: #3a302b !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    white-space: nowrap !important;
    text-align: center !important;
  }
  nav.toolbar > .tb-link .tb-ico {
    display: none !important;
  }
  nav.toolbar > button[aria-pressed="true"] {
    background: linear-gradient(135deg, #211d1d 0%, #3d2a1d 100%) !important;
    color: var(--cis-yellow) !important;
    border-color: var(--cis-gold) !important;
    box-shadow: 0 3px 10px rgba(33, 29, 29, 0.22) !important;
  }

  /* 3. Mobile Control Center (Time Presets + Full 6-Layer Toggles above Bottom App Dock) */
  body.m-time .hud {
    display: flex !important;
    position: fixed !important;
    left: 10px !important;
    right: 10px !important;
    bottom: calc(68px + env(safe-area-inset-bottom, 0px)) !important;
    top: auto !important;
    width: auto !important;
    z-index: 24 !important;
    padding: 12px !important;
    background: rgba(255, 250, 243, 0.97) !important;
    -webkit-backdrop-filter: blur(18px) !important;
    backdrop-filter: blur(18px) !important;
    border: 1.5px solid rgba(229, 169, 34, 0.55) !important;
    border-radius: 20px !important;
    box-shadow: 0 12px 36px rgba(33, 29, 29, 0.25) !important;
  }
  body.m-time .hud .toggles {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: none !important;
    background: transparent !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  body.m-time .hud .toggles .seg {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px !important;
    width: 100% !important;
    background: #f5ebe1 !important;
    padding: 4px !important;
    border-radius: 14px !important;
  }
  body.m-time .hud .toggles .seg button {
    width: 100% !important;
    min-height: 38px !important;
    height: 38px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
  }
  body.m-time .hud .toggles .seg button[data-tod="morning"]::after { content: " 晨"; font-size: 12px; }
  body.m-time .hud .toggles .seg button[data-tod="noon"]::after { content: " 午"; font-size: 12px; }
  body.m-time .hud .toggles .seg button[data-tod="dusk"]::after { content: " 昏"; font-size: 12px; }
  body.m-time .hud .toggles .seg button[data-tod="night"]::after { content: " 夜"; font-size: 12px; }

  body.m-time .hud .toggles .seg2 {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 5px !important;
    width: 100% !important;
    background: transparent !important;
    padding: 0 !important;
  }
  body.m-time .hud .seg2 .tg,
  body.m-time .hud .seg2 .tg:not([data-toggle="freeze"]) {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 52px !important;
    height: 52px !important;
    padding: 4px 2px !important;
    border-radius: 12px !important;
    border: 1px solid #eadad0 !important;
    background: #fff !important;
    color: #3a302b !important;
  }
  body.m-time .hud .seg2 .tg span {
    display: block !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
  }
  body.m-time .hud .seg2 .tg[aria-pressed="true"] {
    background: linear-gradient(135deg, #211d1d 0%, #3d2a1d 100%) !important;
    color: var(--cis-yellow) !important;
    border-color: var(--cis-gold) !important;
  }

  /* 4. 3-Stage Bottom Sheets (#card, #sidebar, #log) */
  .card {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    width: auto !important;
    height: 44dvh !important;
    min-height: 240px !important;
    max-height: none !important;
    border-radius: 22px 22px 0 0 !important;
    border-top: 3px solid var(--cis-gold) !important;
    box-shadow: 0 -12px 40px rgba(33, 29, 29, 0.24) !important;
    z-index: 20 !important;
    transition: height 0.26s cubic-bezier(0.22, 1, 0.36, 1) !important;
  }
  .card.full {
    height: calc(100dvh - env(safe-area-inset-top, 0px) - 10px) !important;
    z-index: 26 !important;
  }
  #card-content {
    padding: 32px 16px calc(80px + env(safe-area-inset-bottom, 0px)) 18px !important;
  }

  .sidebar {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    width: auto !important;
    height: 56dvh !important;
    border-radius: 22px 22px 0 0 !important;
    border-top: 3px solid var(--cis-gold) !important;
    box-shadow: 0 -12px 40px rgba(33, 29, 29, 0.24) !important;
    z-index: 20 !important;
    padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)) !important;
    transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1), height 0.26s cubic-bezier(0.22, 1, 0.36, 1) !important;
  }
  .sidebar.full {
    height: calc(100dvh - env(safe-area-inset-top, 0px) - 10px) !important;
    z-index: 26 !important;
  }

  /* Campus & Hotel Live Log (#log) as Mobile Bottom Sheet */
  #log {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    width: auto !important;
    height: 56dvh !important;
    max-height: none !important;
    border-radius: 22px 22px 0 0 !important;
    border-top: 3px solid var(--cis-gold) !important;
    background: rgba(255, 250, 245, 0.97) !important;
    -webkit-backdrop-filter: blur(18px) !important;
    backdrop-filter: blur(18px) !important;
    box-shadow: 0 -12px 40px rgba(33, 29, 29, 0.24) !important;
    padding: 24px 16px calc(76px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 20 !important;
    transition: height 0.26s cubic-bezier(0.22, 1, 0.36, 1) !important;
  }
  body.log-open #log {
    display: flex !important;
  }
  #log.full {
    height: calc(100dvh - env(safe-area-inset-top, 0px) - 10px) !important;
    z-index: 26 !important;
  }
}


/* ===== 10 Faculty 3D Characters & Interactive Course Guide Styles (2026-11-10) ===== */
.name-tag.faculty-tag {
  background: linear-gradient(135deg, #231d1b 0%, #382820 100%) !important;
  border: 1.5px solid var(--cis-gold) !important;
  padding: 2px 10px 2px 3px !important;
  gap: 6px !important;
  box-shadow: 0 4px 12px #211d1d55, 0 0 0 1px #ffffff26 inset !important;
}
.name-tag.faculty-tag.chair-tag {
  border-color: var(--cis-yellow) !important;
  box-shadow: 0 0 0 2px #db6a4188, 0 4px 14px #211d1d66 !important;
}
.name-tag .tag-avatar {
  width: 20px;
  height: 30px;
  aspect-ratio: 2 / 3;
  border-radius: 6px;
  object-fit: contain;
  object-position: center bottom;
  border: 1.5px solid var(--cis-yellow);
  background: #f5efe6;
  flex: 0 0 20px;
}
.name-tag.faculty-tag .pn {
  color: var(--cis-yellow) !important;
  font-weight: 800 !important;
  font-size: 11px !important;
}
.name-tag.faculty-tag .stop {
  color: #ffe8d6 !important;
  font-size: 10px !important;
  border-left: 1px solid #ffffff33;
  padding-left: 5px;
}

/* Teacher Card Header with Real Photo + Live 3D Avatar */
.teacher-card-head {
  align-items: flex-start !important;
  gap: 14px !important;
}
.teacher-avatar-wrap {
  position: relative;
  flex: 0 0 80px;
  width: 80px;
  height: 120px;
}
.teacher-real-photo {
  width: 80px;
  height: 120px;
  aspect-ratio: 2 / 3;
  border-radius: 16px;
  object-fit: contain;
  object-position: center bottom;
  border: 2px solid var(--cis-gold);
  box-shadow: 0 6px 16px #4a2a142e;
  background: #f5efe6;
  display: block;
}
.teacher-3d-avatar {
  position: absolute;
  right: -8px;
  bottom: -6px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #261f1d, #3d2c22);
  border: 2px solid #fff;
  box-shadow: 0 2px 8px #211d1d44;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.teacher-3d-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.teacher-3d-avatar span {
  position: absolute;
  bottom: 0;
  right: 0;
  background: var(--coral);
  color: #fff;
  font: 800 7.5px/1 ui-monospace, monospace;
  padding: 1.5px 3px;
  border-radius: 4px 0 0 0;
}
.teacher-title-sub {
  font-size: 12px;
  font-weight: 700;
  color: #9e421b;
  margin-top: 3px;
  line-height: 1.35;
}
.teacher-look-banner {
  background: linear-gradient(90deg, #fff8df 0%, #fff1e6 100%);
  border: 1px solid #e5a92255;
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 11.5px;
  line-height: 1.5;
  color: #5c4638;
  margin: 8px 0 10px;
}
.teacher-look-banner b {
  color: #9e421b;
}

/* First-person Course & Department Speech Box */
.teacher-speech-box {
  background: linear-gradient(145deg, #fffdf7 0%, #fff5e8 100%);
  border: 1.5px solid #e5a92288;
  border-left: 4px solid var(--coral);
  border-radius: 14px;
  padding: 11px 13px;
  margin: 10px 0 14px;
  box-shadow: 0 4px 14px #4a2a1412;
}
.tsb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  flex-wrap: wrap;
}
.tsb-head span {
  font-size: 11.5px;
  font-weight: 800;
  color: #a5442a;
}
.tsb-voice-btn {
  min-height: 28px !important;
  padding: 3px 10px !important;
  border-radius: 999px !important;
  border: 1px solid var(--coral) !important;
  background: linear-gradient(135deg, #db6a41, #c95227) !important;
  color: #fff !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  cursor: pointer;
  box-shadow: 0 2px 6px #db6a4144;
}
.tsb-voice-btn:hover {
  filter: brightness(1.08);
}
.tsb-intro {
  font-size: 12.8px;
  line-height: 1.68;
  color: #2e2623;
  margin: 0 0 8px;
}
.tsb-current {
  background: #ffffffd9;
  border: 1px dashed #d4952a88;
  border-radius: 10px;
  padding: 8px 10px;
  margin-top: 6px;
}
.tsb-current b {
  display: block;
  font-size: 11px;
  color: #b85423;
  margin-bottom: 3px;
}
.tsb-current p {
  font-size: 12px;
  line-height: 1.55;
  color: #4a3d36;
  margin: 0;
}

.teacher-isl-row .nm {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.teacher-isl-row .tig-sub {
  font-size: 10.5px;
  color: #78685e;
  line-height: 1.4;
  font-weight: 400;
}

/* 10 Faculty Mini Switcher Grid */
.faculty-mini-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin: 8px 0 14px;
}
.faculty-mini-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 3px !important;
  min-height: 62px !important;
  border-radius: 11px !important;
  border: 1px solid #ecdccf !important;
  background: #fff !important;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.faculty-mini-btn:hover {
  transform: translateY(-2px);
  border-color: var(--coral) !important;
  background: #fff9ee !important;
}
.faculty-mini-btn.active {
  background: linear-gradient(135deg, #2b221e, #3f2b20) !important;
  border-color: var(--cis-gold) !important;
  color: var(--cis-yellow) !important;
  box-shadow: 0 3px 8px #211d1d33;
}
.faculty-mini-btn img {
  width: 38px;
  height: 57px;
  aspect-ratio: 2 / 3;
  border-radius: 8px;
  object-fit: contain;
  object-position: center bottom;
  border: 1.5px solid #e5a92266;
  background: #f5efe6;
}
.faculty-mini-btn.active img {
  border-color: var(--cis-yellow);
}
.faculty-mini-btn span {
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

/* Island Card Faculty Guide List */
.island-faculty-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 6px 0 12px;
}
.island-faculty-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  width: 100%;
  padding: 9px 11px !important;
  border-radius: 13px !important;
  border: 1px solid #ebd9c8 !important;
  background: linear-gradient(135deg, #ffffff 0%, #fff9f0 100%) !important;
  cursor: pointer;
  box-shadow: 0 2px 6px #4a2a140d;
}
.island-faculty-card:hover {
  border-color: var(--coral) !important;
  background: linear-gradient(135deg, #fff9e6 0%, #ffefe2 100%) !important;
}
.ifc-photo {
  width: 48px;
  height: 72px;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  object-fit: contain;
  object-position: center bottom;
  border: 1.5px solid var(--cis-gold);
  flex: 0 0 48px;
  background: #f5efe6;
}
.ifc-body {
  flex: 1;
  min-width: 0;
}
.ifc-head {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 3px;
}
.ifc-head b {
  font-size: 13px;
  color: #211d1d;
}
.ifc-head span {
  font-size: 10.5px;
  color: #8c6239;
  font-weight: 600;
}
.ifc-cta {
  margin-left: auto;
  font-style: normal;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--coral);
  white-space: nowrap;
}
.ifc-quote {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: #4f423b;
}

/* Building Card Faculty Hero & Chips */
.teacher-building-hero {
  background: linear-gradient(135deg, #fffdf6 0%, #fff3e4 100%);
  border: 1.5px solid #e5a92277;
  border-radius: 15px;
  padding: 12px;
  margin: 10px 0 12px;
  box-shadow: 0 4px 12px #4a2a1414;
}
.tbh-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.tbh-photo {
  width: 68px;
  height: 102px;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  object-fit: contain;
  object-position: center bottom;
  border: 2px solid var(--cis-gold);
  flex: 0 0 68px;
  background: #f5efe6;
}
.tbh-info {
  flex: 1;
  min-width: 0;
}
.tbh-badge {
  font-size: 10.5px;
  font-weight: 700;
  color: #9e421b;
  background: #fff3c4;
  padding: 3px 7px;
  border-radius: 6px;
  margin-bottom: 5px;
  line-height: 1.35;
}
.tbh-intro {
  font-size: 12px;
  line-height: 1.58;
  color: #2e2623;
  margin: 0;
}
.tbh-actions {
  display: flex;
  gap: 7px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.tbh-btn {
  flex: 1;
  min-height: 36px !important;
  padding: 6px 10px !important;
  border-radius: 10px !important;
  border: 1px solid #d4952a88 !important;
  background: #fff !important;
  color: #211d1d !important;
  font-size: 11.5px !important;
  font-weight: 800 !important;
  cursor: pointer;
}
.tbh-btn.primary {
  background: linear-gradient(135deg, #261f1b 0%, #3d2a1e 100%) !important;
  color: var(--cis-yellow) !important;
  border-color: var(--cis-gold) !important;
}
.tbh-btn:hover {
  filter: brightness(1.06);
}

.building-faculty-bar {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: #fbf5ee;
  border: 1px solid #eee0d3;
  border-radius: 11px;
  padding: 8px 10px;
  margin: 8px 0 10px;
}
.bfb-label {
  font-size: 10.5px;
  font-weight: 700;
  color: #8a7263;
}
.bfb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.bfb-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px !important;
  padding: 3px 9px 3px 4px !important;
  border-radius: 999px !important;
  border: 1px solid #e5a92266 !important;
  background: #fff !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  color: #2e2623 !important;
  cursor: pointer;
}
.bfb-chip:hover {
  background: #fff6e0 !important;
  border-color: var(--coral) !important;
}
.bfb-chip img {
  width: 22px;
  height: 33px;
  aspect-ratio: 2 / 3;
  border-radius: 6px;
  object-fit: contain;
  object-position: center bottom;
  border: 1px solid var(--cis-gold);
  background: #f5efe6;
}

/* Sidebar Faculty Tree List */
.faculty-tree-item {
  padding: 9px 10px !important;
  margin-bottom: 6px !important;
  border-radius: 12px !important;
  border: 1px solid #eee0d2 !important;
  background: #fffdf9 !important;
  text-align: left;
  width: 100%;
}
.faculty-tree-item:hover {
  background: linear-gradient(135deg, #fff9e6 0%, #fff0e4 100%) !important;
  border-color: var(--coral) !important;
}
.ft-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.ft-avatar {
  width: 46px;
  height: 69px;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  object-fit: contain;
  object-position: center bottom;
  border: 1.5px solid var(--cis-gold);
  flex: 0 0 46px;
  background: #f5efe6;
}
.ft-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ft-title {
  font-size: 13px;
  font-weight: 800;
  color: #211d1d;
}
.ft-role {
  font-size: 10.5px;
  font-weight: 600;
  color: #9e421b;
  margin-left: 4px;
}
.ft-spec {
  font-size: 11px;
  color: #6b5b52;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ft-loc {
  font-size: 10.5px;
  color: #8a766a;
}
.ft-loc strong {
  color: #c24e25;
}

/* ===== Zoom Control UI (#zoom-ui) ===== */
.zoom-ui {
  position: absolute;
  right: 336px;
  bottom: 20px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 252, 245, 0.92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1.5px solid rgba(229, 169, 34, 0.55);
  box-shadow: 0 6px 20px rgba(33, 29, 29, 0.14), 0 0 0 1px rgba(255, 255, 255, 0.85) inset;
  pointer-events: auto;
  user-select: none;
  transition: right 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}
.sidebar-hidden .zoom-ui {
  right: 20px;
}
body.hm-docked .sidebar-hidden .zoom-ui,
body.log-open .sidebar-hidden .zoom-ui {
  right: 336px;
}
.debug .zoom-ui,
.tour .zoom-ui {
  display: none !important;
}
.zoom-ui .zoom-btn {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  min-height: 30px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  border: 1px solid rgba(229, 169, 34, 0.45) !important;
  background: #fffdf9 !important;
  color: #211d1d !important;
  font: 800 15px/1 "Noto Sans TC", sans-serif !important;
  display: inline-grid !important;
  place-items: center !important;
  box-shadow: 0 1px 4px rgba(33, 29, 29, 0.08);
  cursor: pointer;
}
.zoom-ui .zoom-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #fff3b8 0%, #ffe3cc 100%) !important;
  border-color: var(--coral) !important;
}
.zoom-ui .zoom-btn:active:not(:disabled) {
  transform: scale(0.94);
}
.zoom-ui .zoom-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}
.zoom-ui .zoom-range {
  width: 92px;
  height: 5px;
  margin: 0 2px;
  accent-color: var(--coral);
  cursor: pointer;
}
.zoom-ui .zoom-pct {
  min-width: 48px !important;
  min-height: 28px !important;
  height: 28px !important;
  padding: 0 8px !important;
  border-radius: 999px !important;
  border: 1px dashed rgba(219, 106, 65, 0.45) !important;
  background: #fff9ec !important;
  color: #9e421b !important;
  font: 800 11.5px/1 ui-monospace, monospace !important;
  font-variant-numeric: tabular-nums;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer;
}
.zoom-ui .zoom-pct:hover {
  background: linear-gradient(135deg, #fff3b8 0%, #ffe3cc 100%) !important;
  border-style: solid !important;
  border-color: var(--coral) !important;
  color: #211d1d !important;
}

@media (max-width: 800px) {
  .zoom-ui {
    position: fixed !important;
    right: 10px !important;
    bottom: calc(68px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 15 !important;
    padding: 4px 6px !important;
    gap: 4px !important;
  }
  .zoom-ui .zoom-range {
    display: none !important;
  }
  .zoom-ui .zoom-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
  }
  .zoom-ui .zoom-pct {
    min-width: 44px !important;
    height: 28px !important;
    font-size: 11px !important;
  }
  body.card-open .zoom-ui,
  body.log-open .zoom-ui,
  body.m-time .zoom-ui,
  body:has(.sidebar.mobile-open) .zoom-ui,
  body:has(.hm-panel.open:not(.min)) .zoom-ui {
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
  }
}

/* ===== Bilingual Language Toggle & Dual Voice Buttons ===== */
.toolbar .lang-btn,
.mob-top-actions .lang-btn {
  background: linear-gradient(135deg, #261f1b 0%, #3d2a1e 100%) !important;
  color: var(--cis-yellow) !important;
  border: 1.5px solid var(--cis-gold) !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em;
}
.toolbar .lang-btn:hover,
.mob-top-actions .lang-btn:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}
.tsb-voice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tsb-voice-btn.playing,
.tbh-btn.playing {
  background: linear-gradient(135deg, #db6a41 0%, #b8461e 100%) !important;
  color: #fff !important;
  border-color: #db6a41 !important;
}

/* ===== RWD & Anti-Overlap Comprehensive Layout Fixes (2026-11-10) ===== */
.puma-extra .px-col {
  bottom: 28px !important;
}

/* Desktop & Tablet (> 800px): Prevent .brand, .toolbar, .hud, .card, and #log from ever overlapping */
@media (min-width: 801px) {
  .brand {
    left: 22px !important;
    top: 16px !important;
    z-index: 8 !important;
  }
  nav.toolbar {
    left: calc(var(--brand-left, 22px) + var(--brand-w, 340px) + 14px) !important;
    right: 332px !important;
    top: 16px !important;
    justify-content: flex-end !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    z-index: 8 !important;
  }
  .sidebar-hidden nav.toolbar {
    right: 20px !important;
  }
  body.hm-docked .sidebar-hidden nav.toolbar,
  body.log-open .sidebar-hidden nav.toolbar {
    right: 332px !important;
  }
  nav.toolbar .tb-link,
  nav.toolbar button {
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 11px !important;
    font-size: 12px !important;
  }
  /* Dock .hud cleanly below .toolbar on the top-right so it never collides with .brand or .card */
  .hud {
    left: auto !important;
    right: 332px !important;
    top: calc(var(--toolbar-bottom, 58px) + 8px) !important;
    bottom: auto !important;
    align-items: flex-end !important;
    z-index: 7 !important;
  }
  .sidebar-hidden .hud {
    right: 20px !important;
  }
  body.hm-docked .sidebar-hidden .hud,
  body.log-open .sidebar-hidden .hud {
    right: 332px !important;
  }
  .hud .toggles {
    justify-content: flex-end !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
  /* Keep .card below .brand on the left, constrained so it never overlaps #sidebar */
  .card,
  body.card-open .card {
    left: 22px !important;
    top: calc(var(--brand-bottom, 106px) + 12px) !important;
    bottom: 20px !important;
    width: min(360px, calc(100vw - 318px - 44px)) !important;
    z-index: 9 !important;
  }
  .card .close {
    width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    top: 10px !important;
    right: 10px !important;
    border-radius: 50% !important;
    background: rgba(255, 250, 244, 0.9) !important;
    border: 1px solid #ecdccf !important;
    display: grid !important;
    place-items: center !important;
    font-size: 18px !important;
    box-shadow: 0 2px 6px rgba(33, 29, 29, 0.08) !important;
  }
  /* Make #log cleanly replace #sidebar content without #sidebar header bleeding through */
  .log {
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 318px !important;
    max-height: none !important;
    border-radius: 0 !important;
    border: 0 !important;
    border-left: 1px solid var(--line) !important;
    padding: 24px 18px 16px !important;
    z-index: 12 !important;
  }
  body.log-open #sidebar > * {
    visibility: hidden !important;
  }
}

/* Compact brand & HUD on medium screens (801px - 1200px) */
@media (min-width: 801px) and (max-width: 1200px) {
  .brand .future {
    display: none !important;
  }
  .brand-logo {
    width: 42px !important;
    height: 42px !important;
  }
  .brand h1 {
    font-size: 16px !important;
    letter-spacing: 0.1em !important;
  }
  .toggles .seg2 .tg span {
    display: none !important;
  }
  .toggles .seg2 .tg {
    width: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
  }
  .toggles .seg button {
    width: 36px !important;
    min-height: 38px !important;
  }
  body.card-open .hud {
    display: none !important;
  }
}

/* Mobile (<= 800px): Fix top bar overlap, bottom dock crowding, sheet vs dock overlap, and close button overlap */
@media (max-width: 800px) {
  .brand {
    top: calc(8px + env(safe-area-inset-top, 0px)) !important;
    left: 8px !important;
    padding: 4px 10px 4px 6px !important;
    gap: 6px !important;
    max-width: calc(100vw - 196px) !important;
  }
  .brand-logo {
    width: 28px !important;
    height: 28px !important;
  }
  .brand h1 {
    font-size: 12px !important;
    letter-spacing: 0.03em !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .brand .candidate .proj {
    font-size: 9.5px !important;
    padding: 1px 6px !important;
  }
  .mob-top-actions {
    top: calc(8px + env(safe-area-inset-top, 0px)) !important;
    right: 8px !important;
    gap: 4px !important;
  }
  .mob-top-actions button {
    min-height: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    padding: 0 8px !important;
    font-size: 11px !important;
  }
  .mob-top-actions #mob-credits,
  .mob-top-actions #mob-help {
    width: 32px !important;
    padding: 0 !important;
    font-size: 12px !important;
  }

  /* Hide duplicate #lang-btn in mobile bottom dock (#mob-lang-btn is already in .mob-top-actions) */
  nav.toolbar #lang-btn {
    display: none !important;
  }
  nav.toolbar {
    left: 8px !important;
    right: 8px !important;
    bottom: calc(6px + env(safe-area-inset-bottom, 0px)) !important;
    gap: 2px !important;
    padding: 4px 5px !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
  }
  nav.toolbar::-webkit-scrollbar {
    display: none !important;
  }
  nav.toolbar > button:not(.wide):not(#tour),
  nav.toolbar > .tb-link {
    flex: 1 0 auto !important;
    min-height: 40px !important;
    height: 40px !important;
    padding: 0 5px !important;
    font-size: 11px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  nav.toolbar .qp-btn-s,
  nav.toolbar .qp-btn-l {
    display: none !important;
  }

  /* Dock half-open bottom sheets cleanly ABOVE nav.toolbar so sheet footers & content are never obstructed */
  .card {
    bottom: calc(60px + env(safe-area-inset-bottom, 0px)) !important;
    height: 46dvh !important;
    z-index: 26 !important;
  }
  .card.full {
    bottom: 0 !important;
    height: calc(100dvh - env(safe-area-inset-top, 0px) - 8px) !important;
    z-index: 28 !important;
  }
  #card-content {
    padding: 36px 16px 24px 18px !important;
  }
  .card.full #card-content {
    padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .card .card-head {
    padding-right: 92px !important;
  }
  #card-size {
    top: 8px !important;
    right: 48px !important;
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 10px !important;
    font-size: 11.5px !important;
    z-index: 4 !important;
  }
  .card .close {
    top: 8px !important;
    right: 10px !important;
    width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
    border-radius: 50% !important;
    background: #fffdf9 !important;
    border: 1px solid #ecdccf !important;
    display: grid !important;
    place-items: center !important;
    font-size: 18px !important;
    z-index: 4 !important;
  }

  .sidebar {
    bottom: calc(60px + env(safe-area-inset-bottom, 0px)) !important;
    height: 52dvh !important;
    padding-bottom: 0 !important;
    z-index: 26 !important;
  }
  .sidebar.full {
    bottom: 0 !important;
    height: calc(100dvh - env(safe-area-inset-top, 0px) - 8px) !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    z-index: 28 !important;
  }
  .sidebar .side-head,
  .sidebar.full .side-head {
    padding-right: 58px !important;
  }
  .mobile-close {
    top: 12px !important;
    right: 12px !important;
    width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background: #fffdf9 !important;
    border: 1px solid #ecdccf !important;
    display: grid !important;
    place-items: center !important;
    font-size: 15px !important;
  }

  #log {
    bottom: calc(60px + env(safe-area-inset-bottom, 0px)) !important;
    height: 52dvh !important;
    padding: 22px 16px 16px !important;
    z-index: 26 !important;
  }
  #log.full {
    bottom: 0 !important;
    height: calc(100dvh - env(safe-area-inset-top, 0px) - 8px) !important;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 28 !important;
  }
}

@media (max-width: 380px) {
  .brand .candidate {
    display: none !important;
  }
}

/* ==========================================================================
   THE GRAND NKUHT HOSPITALITY EDITION (2026-11-10)
   International 5-Star Luxury Hotel & Concierge Aesthetic Upgrade
   Palette: Imperial Obsidian-Emerald · Brushed Champagne Gold · Travertine Alabaster
   ========================================================================== */
:root {
  --hotel-obsidian: #0c1614;
  --hotel-emerald: #122420;
  --hotel-emerald-mid: #1a332d;
  --hotel-charcoal: #161c1b;
  --hotel-gold: #c6a15b;
  --hotel-gold-bright: #e6ca8a;
  --hotel-gold-deep: #96722e;
  --hotel-gold-line: rgba(198, 161, 91, 0.45);
  --hotel-ivory: #faf7f0;
  --hotel-parchment: #f3ede0;
  --hotel-sand: #e6dcc8;
  --hotel-burgundy: #7d2430;
  --font-serif: "Noto Serif TC", "Cormorant Garamond", Georgia, serif;
  --font-display: "Cormorant Garamond", "Noto Serif TC", Georgia, serif;
  --font-sans: "Plus Jakarta Sans", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  /* Override legacy tokens so any fallback inherits the 5-star hotel palette */
  --coral: #b38838;
  --ink: #0f1c19;
  --cream: #faf7f0;
  --yellow: #e6ca8a;
  --line: rgba(198, 161, 91, 0.36);
  --muted: #686052;
  --cis-yellow: #e6ca8a;
  --cis-gold: #c6a15b;
  --cis-gold-deep: #96722e;
}

body {
  font-family: var(--font-sans);
  background: #0c1614;
  color: var(--ink);
}

#app {
  background: radial-gradient(ellipse at 45% 34%, #fdfbf6 0%, #f4ede0 48%, #dfd2bc 100%) !important;
}

/* ── 1. Grand Hotel Entrance Foyer Loading Screen (#loading) ── */
#loading.loading {
  background:
    radial-gradient(circle at 50% 38%, rgba(198, 161, 91, 0.16) 0%, transparent 58%),
    repeating-linear-gradient(45deg, rgba(198, 161, 91, 0.035) 0 1px, transparent 1px 18px),
    linear-gradient(160deg, #091210 0%, #10201c 52%, #0c1513 100%) !important;
  color: var(--hotel-ivory) !important;
}
.loading-crest {
  max-width: 420px;
  padding: 36px 40px 32px;
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(18, 34, 30, 0.92) 0%, rgba(11, 21, 18, 0.96) 100%);
  border: 1.5px solid rgba(198, 161, 91, 0.65);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.55),
    inset 0 0 0 4px rgba(11, 21, 18, 0.95),
    inset 0 0 0 5px rgba(198, 161, 91, 0.28);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.loading-stars {
  color: var(--hotel-gold-bright);
  font-size: 13px;
  letter-spacing: 5px;
  margin-bottom: 12px;
  text-shadow: 0 2px 10px rgba(230, 202, 138, 0.4);
}
.loading-logo {
  width: 84px !important;
  height: 84px !important;
  margin: 0 auto 14px !important;
  padding: 3px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #f0d9a0 0%, #c6a15b 50%, #8f6b29 100%) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), 0 0 0 4px rgba(198, 161, 91, 0.18) !important;
}
.loading-eyebrow {
  font: 600 10px/1.2 var(--font-sans);
  letter-spacing: 0.24em;
  color: var(--hotel-gold);
  margin-bottom: 8px;
}
#loading.loading h2 {
  font: 700 22px/1.35 var(--font-serif) !important;
  letter-spacing: 0.12em;
  color: var(--hotel-ivory) !important;
  margin: 0;
}
#loading.loading p {
  font-size: 12.5px !important;
  color: #c7bca6 !important;
  margin: 10px 0 18px !important;
  letter-spacing: 0.04em;
}
.loading-bar {
  width: 180px;
  height: 3px;
  border-radius: 3px;
  background: rgba(198, 161, 91, 0.2);
  overflow: hidden;
  position: relative;
}
.loading-bar i {
  display: block;
  width: 55%;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--hotel-gold-bright), var(--hotel-gold), transparent);
  animation: hotelLoadShimmer 1.6s infinite ease-in-out;
}
@keyframes hotelLoadShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(220%); }
}

/* ── 2. Five-Star Grand Hotel Entrance Plaque (.brand) ── */
/* Completely remove the reference repo's blocky Arial .future signature */
.brand .future {
  display: none !important;
}
.brand {
  background:
    repeating-linear-gradient(45deg, rgba(198, 161, 91, 0.03) 0 1px, transparent 1px 12px),
    linear-gradient(145deg, rgba(11, 22, 19, 0.95) 0%, rgba(18, 35, 31, 0.94) 58%, rgba(12, 20, 19, 0.96) 100%) !important;
  border: 1.5px solid rgba(198, 161, 91, 0.68) !important;
  border-top: 3px solid var(--hotel-gold-bright) !important;
  border-radius: 12px !important;
  box-shadow:
    0 14px 34px rgba(8, 15, 13, 0.32),
    inset 0 0 0 3px rgba(12, 22, 20, 0.92),
    inset 0 0 0 4px rgba(198, 161, 91, 0.25) !important;
  padding: 10px 18px 10px 13px !important;
  gap: 13px !important;
}
.brand-logo-link {
  padding: 2.5px !important;
  background: linear-gradient(135deg, #f3dca2 0%, #c6a15b 52%, #8c6826 100%) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), 0 0 0 2px rgba(230, 202, 138, 0.22) !important;
}
.brand-logo {
  width: 50px !important;
  height: 50px !important;
}
.brand .brand-r {
  gap: 4px !important;
  padding-top: 0 !important;
}
.brand-stars {
  display: flex;
  align-items: center;
  gap: 7px;
  line-height: 1;
}
.brand-stars span {
  color: var(--hotel-gold-bright);
  font-size: 10px;
  letter-spacing: 2px;
  text-shadow: 0 1px 6px rgba(230, 202, 138, 0.35);
}
.brand-stars b {
  font: 700 9px/1 var(--font-sans);
  letter-spacing: 0.16em;
  color: #cbb894;
}
.brand h1 {
  font-family: var(--font-serif) !important;
  font-size: 19px !important;
  font-weight: 700 !important;
  letter-spacing: 0.14em !important;
  color: #faf6ed !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.brand .candidate {
  margin-top: 2px !important;
  gap: 7px !important;
}
.brand .candidate .proj {
  background: rgba(198, 161, 91, 0.16) !important;
  border: 1px solid rgba(230, 202, 138, 0.45) !important;
  border-radius: 5px !important;
  padding: 2.5px 8px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  color: #f3ead8 !important;
}
.brand .candidate .proj em {
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  font-size: 11.5px !important;
  letter-spacing: 0.1em !important;
  color: var(--hotel-gold-bright) !important;
}
.brand .candidate .cis-tag {
  background: linear-gradient(135deg, #e5c887 0%, #b89043 100%) !important;
  color: #0c1614 !important;
  font: 800 9px/1 var(--font-sans) !important;
  letter-spacing: 0.14em !important;
  padding: 3px 6px !important;
  border-radius: 4px !important;
}

/* ── 3. Top Concierge Desk Command Bar (nav.toolbar) & Lighting Dock (.hud) ── */
.toolbar .tb-link,
.toolbar button {
  background: linear-gradient(180deg, rgba(16, 29, 25, 0.93) 0%, rgba(10, 19, 17, 0.96) 100%) !important;
  border: 1px solid rgba(198, 161, 91, 0.58) !important;
  color: #f3e7cb !important;
  font-family: var(--font-sans) !important;
  font-weight: 600 !important;
  letter-spacing: 0.04em !important;
  border-radius: 8px !important;
  box-shadow:
    0 6px 18px rgba(8, 15, 13, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}
.toolbar .tb-link:hover,
.toolbar button:hover {
  background: linear-gradient(180deg, rgba(26, 46, 40, 0.97) 0%, rgba(16, 30, 26, 0.98) 100%) !important;
  border-color: var(--hotel-gold-bright) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(8, 15, 13, 0.32), 0 0 0 1px rgba(230, 202, 138, 0.25) !important;
}
.toolbar button[aria-pressed="true"],
.toolbar button.active,
.toolbar .lang-btn {
  background: linear-gradient(135deg, #ebd094 0%, #c69f52 55%, #a67e33 100%) !important;
  color: #0c1614 !important;
  border-color: #f7e4b5 !important;
  font-weight: 800 !important;
  box-shadow: 0 6px 18px rgba(198, 161, 91, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.45) !important;
}
.toolbar .qp-btn b {
  color: var(--hotel-gold-bright) !important;
}
.toolbar .qp-btn[aria-pressed="true"] b {
  color: #0c1614 !important;
}

/* Ambient Lighting & View Controller (.hud) */
.toggles .seg {
  background: linear-gradient(180deg, rgba(14, 26, 23, 0.93) 0%, rgba(10, 18, 16, 0.96) 100%) !important;
  border: 1px solid rgba(198, 161, 91, 0.55) !important;
  border-radius: 10px !important;
  padding: 3px !important;
  box-shadow: 0 8px 22px rgba(8, 15, 13, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}
.toggles .seg button,
.toggles .seg2 .tg {
  color: #d8cbb3 !important;
  border-radius: 7px !important;
  transition: background 0.15s ease, color 0.15s ease;
}
.toggles .seg button:hover,
.toggles .seg2 .tg:hover {
  background: rgba(198, 161, 91, 0.18) !important;
  color: #ffffff !important;
}
.toggles .seg button[aria-pressed="true"],
.toggles .seg2 .tg[aria-pressed="true"] {
  background: linear-gradient(135deg, #ebd094 0%, #c49c4e 100%) !important;
  color: #0c1614 !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 8px rgba(198, 161, 91, 0.35) !important;
}

/* ── 4. Right-Hand Five-Star Suite & Wing Concierge Directory (#sidebar & #log) ── */
.sidebar {
  background: linear-gradient(180deg, #f8f4eb 0%, #efe7d6 100%) !important;
  border-left: 1.5px solid rgba(198, 161, 91, 0.65) !important;
  box-shadow: -12px 0 36px rgba(10, 18, 16, 0.18) !important;
}
.side-head {
  background:
    repeating-linear-gradient(45deg, rgba(198, 161, 91, 0.035) 0 1px, transparent 1px 14px),
    linear-gradient(165deg, #0b1614 0%, #132722 58%, #182320 100%) !important;
  border-bottom: 2px solid var(--hotel-gold) !important;
  padding: 22px 20px 16px !important;
  color: var(--hotel-ivory) !important;
  box-shadow: 0 6px 20px rgba(8, 15, 13, 0.18);
}
.side-head .eyebrow {
  color: var(--hotel-gold-bright) !important;
  letter-spacing: 0.18em !important;
  font-size: 10px !important;
  margin-bottom: 8px !important;
}
.side-logo {
  border: 1px solid var(--hotel-gold-bright);
  padding: 1px;
  background: #fff;
}
.side-head h2 {
  font-family: var(--font-serif) !important;
  font-size: 21px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  color: #faf6ed !important;
}
.side-head p {
  color: #c7bca6 !important;
  font-size: 11.5px !important;
  margin: 7px 0 13px !important;
}
/* Heart Quiz / Official Portal Entry inside .side-head */
.heart-quiz-entry {
  background: linear-gradient(135deg, rgba(198, 161, 91, 0.16) 0%, rgba(198, 161, 91, 0.08) 100%) !important;
  border: 1px solid rgba(230, 202, 138, 0.45) !important;
  border-left: 3px solid var(--hotel-gold-bright) !important;
  border-radius: 8px !important;
  color: #faf6ed !important;
  padding: 9px 12px !important;
  margin-bottom: 10px !important;
}
.heart-quiz-entry:hover {
  background: linear-gradient(135deg, rgba(198, 161, 91, 0.26) 0%, rgba(198, 161, 91, 0.14) 100%) !important;
  border-color: var(--hotel-gold-bright) !important;
}
.heart-quiz-entry-title {
  font-family: var(--font-serif);
  font-size: 13px !important;
  color: var(--hotel-gold-bright) !important;
  letter-spacing: 0.04em;
}
.heart-quiz-entry-lead {
  color: #d6cbb8 !important;
  font-size: 10.5px !important;
}
.heart-quiz-entry i {
  color: var(--hotel-gold-bright) !important;
}

/* Luxury Search Input */
.search {
  background: #faf7f0 !important;
  border: 1.5px solid rgba(198, 161, 91, 0.65) !important;
  border-radius: 8px !important;
  height: 40px !important;
  font-size: 12.5px !important;
  box-shadow: inset 0 2px 5px rgba(12, 22, 20, 0.08) !important;
}
.search:focus {
  border-color: var(--hotel-gold-bright) !important;
  box-shadow: 0 0 0 3px rgba(230, 202, 138, 0.28) !important;
  outline: none !important;
}

/* Concierge Directory Tabs (.side-tabs) */
.side-tabs {
  background: rgba(8, 15, 13, 0.55);
  padding: 4px;
  border-radius: 9px;
  border: 1px solid rgba(198, 161, 91, 0.35);
  gap: 4px !important;
  margin-top: 12px !important;
}
.side-tabs button {
  min-height: 34px !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: #d5c8b0 !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  letter-spacing: 0.03em;
  padding: 5px 6px !important;
}
.side-tabs button:hover {
  color: #ffffff !important;
  background: rgba(198, 161, 91, 0.15) !important;
}
.side-tabs button.active {
  background: linear-gradient(135deg, #ebd094 0%, #c49b4d 100%) !important;
  color: #0c1614 !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

/* Suite & Wing Directory Cards (#tree) */
.tree {
  padding: 12px 14px 20px !important;
}
#tree details {
  background: #fdfbf7;
  border: 1px solid rgba(198, 161, 91, 0.36) !important;
  border-radius: 10px;
  margin-bottom: 8px;
  box-shadow: 0 2px 7px rgba(12, 22, 20, 0.05);
  overflow: hidden;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
#tree details:hover {
  border-color: rgba(198, 161, 91, 0.75) !important;
  box-shadow: 0 4px 12px rgba(12, 22, 20, 0.09);
}
#tree summary {
  min-height: 52px !important;
  padding: 8px 11px !important;
  gap: 11px !important;
}
#tree .index {
  width: 28px !important;
  height: 28px !important;
  border-radius: 6px;
  background: linear-gradient(145deg, #122420, #0c1614) !important;
  border: 1px solid var(--hotel-gold);
  color: var(--hotel-gold-bright) !important;
  -webkit-text-fill-color: var(--hotel-gold-bright) !important;
  font: 700 15px/1 var(--font-display) !important;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 5px rgba(12, 22, 20, 0.18);
}
#tree .item-name {
  font-family: var(--font-serif);
  font-size: 13.5px !important;
  font-weight: 700 !important;
  color: #12211e;
  letter-spacing: 0.02em;
}
#tree .count {
  background: #f3ecde;
  border: 1px solid rgba(198, 161, 91, 0.4);
  color: #7d5f25 !important;
  font: 700 10.5px/1 var(--font-sans) !important;
  padding: 3px 7px;
  border-radius: 5px;
}
#tree details[open] > summary,
#tree details.current > summary {
  background: linear-gradient(135deg, #0e1e1b 0%, #19312b 100%) !important;
  color: #faf6ed !important;
  border-radius: 0 !important;
  box-shadow: inset 4px 0 0 var(--hotel-gold-bright) !important;
}
#tree details[open] > summary .item-name,
#tree details.current > summary .item-name {
  color: #faf6ed !important;
}
#tree details[open] > summary .index,
#tree details.current > summary .index {
  background: linear-gradient(135deg, #ebd094 0%, #c2994b 100%) !important;
  color: #0c1614 !important;
  -webkit-text-fill-color: #0c1614 !important;
  border-color: #fff;
}
#tree details[open] > summary .count,
#tree details.current > summary .count {
  background: rgba(198, 161, 91, 0.22);
  border-color: rgba(230, 202, 138, 0.5);
  color: var(--hotel-gold-bright) !important;
}
#tree .children {
  padding: 8px 10px 10px 14px !important;
  background: #f7f2e7;
  border-top: 1px solid rgba(198, 161, 91, 0.3);
  gap: 4px !important;
}
#tree .children button {
  border-radius: 7px !important;
  padding: 7px 10px !important;
  font-size: 12.5px !important;
  color: #1c2826 !important;
  border: 1px solid transparent !important;
  min-height: 38px !important;
}
#tree .children button:hover,
#tree .children button.hot {
  background: #ffffff !important;
  border-color: rgba(198, 161, 91, 0.55) !important;
  color: #0c1614 !important;
  box-shadow: 0 2px 6px rgba(12, 22, 20, 0.06);
}
#tree .children .island-open {
  color: #8f6822 !important;
  font-family: var(--font-serif);
  background: rgba(198, 161, 91, 0.12) !important;
  border: 1px dashed rgba(198, 161, 91, 0.5) !important;
}
#tree .children button .pin-no {
  border-radius: 4px !important;
  background: linear-gradient(135deg, #132521, #1e3731) !important;
  color: var(--hotel-gold-bright) !important;
  border: 1px solid var(--hotel-gold) !important;
  font-family: var(--font-display) !important;
  font-size: 11.5px !important;
}
#tree .children button.hot .pin-no {
  background: linear-gradient(135deg, #ebd094, #c2994b) !important;
  color: #0c1614 !important;
}

/* Sidebar Footer Attribution */
.side-foot {
  background: linear-gradient(180deg, #10201c 0%, #0b1513 100%) !important;
  border-top: 1.5px solid var(--hotel-gold) !important;
  padding: 9px 14px 11px !important;
}
.side-credits-btn {
  background: rgba(198, 161, 91, 0.14) !important;
  border: 1px solid rgba(230, 202, 138, 0.45) !important;
  color: var(--hotel-gold-bright) !important;
  border-radius: 6px !important;
  font-size: 11px !important;
  letter-spacing: 0.04em;
}
.side-credits-btn:hover {
  background: linear-gradient(135deg, #ebd094 0%, #c49b4d 100%) !important;
  color: #0c1614 !important;
}

/* ── 5. Left-Hand VIP Guest Folio & Concierge Dossier (#card) ── */
.card {
  background: linear-gradient(180deg, rgba(252, 249, 242, 0.97) 0%, rgba(244, 238, 225, 0.98) 100%) !important;
  border: 1.5px solid rgba(198, 161, 91, 0.72) !important;
  border-top: 4px solid var(--hotel-gold) !important;
  border-radius: 14px !important;
  box-shadow:
    0 24px 64px rgba(8, 15, 13, 0.3),
    inset 0 0 0 3px rgba(252, 249, 242, 0.95),
    inset 0 0 0 4px rgba(198, 161, 91, 0.24) !important;
}
.card .close {
  background: #10201c !important;
  color: var(--hotel-gold-bright) !important;
  border: 1px solid var(--hotel-gold) !important;
}
.card .close:hover {
  background: linear-gradient(135deg, #ebd094, #c49b4d) !important;
  color: #0c1614 !important;
}
.card-head .eyebrow {
  color: #8c6722 !important;
  font-weight: 800 !important;
  letter-spacing: 0.18em !important;
}
.card-head h2 {
  font-family: var(--font-serif) !important;
  color: #0f1d1a !important;
  letter-spacing: 0.02em !important;
}
.icon-tile {
  background: linear-gradient(145deg, #0f1f1c 0%, #1c352f 100%) !important;
  color: var(--hotel-gold-bright) !important;
  border: 1.5px solid var(--hotel-gold) !important;
  border-radius: 11px !important;
  box-shadow: 0 6px 16px rgba(12, 22, 20, 0.22), inset 0 0 0 1px rgba(230, 202, 138, 0.2) !important;
}
.card h3 {
  font-family: var(--font-sans) !important;
  color: #7c602b !important;
  letter-spacing: 0.18em !important;
  border-bottom: 1px solid rgba(198, 161, 91, 0.35);
  padding-bottom: 5px;
}
.card .plain {
  background: linear-gradient(135deg, #ffffff 0%, #f8f2e4 100%) !important;
  border: 1px solid rgba(198, 161, 91, 0.4);
  border-left: 3.5px solid var(--hotel-gold) !important;
  border-radius: 9px !important;
  color: #182421 !important;
  box-shadow: 0 3px 10px rgba(12, 22, 20, 0.04);
}
.stat {
  background: linear-gradient(180deg, #ffffff 0%, #f9f4e8 100%) !important;
  border: 1px solid rgba(198, 161, 91, 0.45) !important;
  border-radius: 10px !important;
  box-shadow: inset 3px 0 0 var(--accent, var(--hotel-gold)), 0 3px 10px rgba(12, 22, 20, 0.06) !important;
}
.stat b {
  font-family: var(--font-display) !important;
  color: #0f1e1b !important;
}
.rows .row {
  background: #ffffff !important;
  border: 1px solid rgba(198, 161, 91, 0.38) !important;
  border-left: 3px solid var(--hotel-gold) !important;
  border-radius: 8px !important;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.rows .row:hover {
  background: linear-gradient(90deg, #fffdf9 0%, #f9f1df 100%) !important;
  border-color: var(--hotel-gold-deep) !important;
  transform: translateX(2px);
  box-shadow: 0 4px 12px rgba(12, 22, 20, 0.08);
}
.rows .row .dot {
  width: 7px !important;
  height: 7px !important;
  border-radius: 1px !important;
  transform: rotate(45deg);
  background: var(--hotel-gold-deep) !important;
}
.card ul.facts li {
  background: #ffffff !important;
  border: 1px solid rgba(198, 161, 91, 0.32);
  border-radius: 8px !important;
}
.card ul.facts li::before {
  transform: rotate(45deg);
  border-radius: 1px !important;
  background: var(--hotel-gold-deep) !important;
}

/* Executive Faculty & Concierge Cards inside #card and #sidebar */
.teacher-real-photo,
.ifc-photo,
.tbh-photo,
.ft-avatar {
  border-color: var(--hotel-gold) !important;
  box-shadow: 0 6px 16px rgba(12, 22, 20, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.8) inset !important;
}
.teacher-speech-box,
.teacher-building-hero {
  background: linear-gradient(145deg, #ffffff 0%, #f8f1e2 100%) !important;
  border: 1px solid rgba(198, 161, 91, 0.58) !important;
  border-left: 4px solid var(--hotel-gold-deep) !important;
  border-radius: 10px !important;
}
.tsb-voice-btn,
.tbh-btn.primary {
  background: linear-gradient(135deg, #10201c 0%, #1d352f 100%) !important;
  color: var(--hotel-gold-bright) !important;
  border: 1px solid var(--hotel-gold) !important;
  border-radius: 6px !important;
}
.tsb-voice-btn:hover,
.tbh-btn.primary:hover {
  background: linear-gradient(135deg, #ebd094 0%, #c49b4d 100%) !important;
  color: #0c1614 !important;
}
.tsb-voice-btn.playing,
.tbh-btn.playing {
  background: linear-gradient(135deg, #7d2430 0%, #591620 100%) !important;
  color: #fff !important;
  border-color: var(--hotel-gold-bright) !important;
}

/* ── 6. 3D Map Architectural Brass & Obsidian Wayfinding Signage ── */
.island-label {
  border-radius: 7px !important;
  background: linear-gradient(145deg, rgba(12, 23, 20, 0.92) 0%, rgba(21, 38, 33, 0.93) 100%) !important;
  border: 1px solid rgba(208, 172, 102, 0.78) !important;
  color: #f9f4e8 !important;
  font-family: var(--font-serif) !important;
  font-weight: 600 !important;
  letter-spacing: 0.04em !important;
  padding: 4px 11px 4px 7px !important;
  box-shadow:
    0 5px 16px rgba(8, 15, 13, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
}
.island-label strong {
  background: rgba(208, 172, 102, 0.2) !important;
  border: 1px solid rgba(230, 202, 138, 0.55);
  color: var(--hotel-gold-bright) !important;
  border-radius: 4px !important;
  padding: 1px 5px !important;
  font: 700 11px/1.1 var(--font-display) !important;
  margin-right: 6px !important;
}
.island-label.selected {
  background: linear-gradient(135deg, #f0d79e 0%, #cfa759 55%, #b18636 100%) !important;
  color: #0c1614 !important;
  border-color: #ffffff !important;
  box-shadow: 0 0 0 2px var(--hotel-gold), 0 8px 24px rgba(12, 22, 20, 0.45) !important;
}
.island-label.selected strong {
  background: #0c1614 !important;
  color: var(--hotel-gold-bright) !important;
  border-color: #0c1614 !important;
}

.item-pin {
  border-radius: 6px !important;
  border: 1.5px solid var(--hotel-gold) !important;
  background: linear-gradient(135deg, #fdfbf6 0%, #f3ead8 100%) !important;
  color: #10201c !important;
  box-shadow: 0 4px 12px rgba(12, 22, 20, 0.26) !important;
  padding: 3px 9px 3px 4px !important;
}
.item-pin b {
  border-radius: 4px !important;
  background: linear-gradient(135deg, #0f1f1c 0%, #1d352f 100%) !important;
  color: var(--hotel-gold-bright) !important;
  border: 1px solid var(--hotel-gold);
  font-family: var(--font-display) !important;
}
.item-pin.hot,
.item-pin:hover,
.item-pin.sel {
  background: linear-gradient(135deg, #0f1f1c 0%, #1d352f 100%) !important;
  color: #faf6ed !important;
  border-color: var(--hotel-gold-bright) !important;
}
.item-pin.hot b,
.item-pin:hover b,
.item-pin.sel b {
  background: linear-gradient(135deg, #ebd094 0%, #c49b4d 100%) !important;
  color: #0c1614 !important;
  border-color: #fff !important;
}

/* 3D Character Lapel Name Badges (.name-tag) */
.name-tag {
  background: rgba(252, 249, 242, 0.94) !important;
  border: 1px solid rgba(198, 161, 91, 0.65) !important;
  border-radius: 6px !important;
  box-shadow: 0 3px 10px rgba(12, 22, 20, 0.22) !important;
}
.name-tag.faculty-tag,
.name-tag.puma-tag {
  background: linear-gradient(135deg, #0e1d1a 0%, #1b322c 100%) !important;
  border: 1.5px solid var(--hotel-gold) !important;
  border-radius: 7px !important;
  color: #faf6ed !important;
}

/* ── 7. Optical Zoom Console (#zoom-ui) & Hotel Live Log (#log) ── */
.zoom-ui {
  background: linear-gradient(180deg, rgba(14, 26, 23, 0.93) 0%, rgba(10, 18, 16, 0.96) 100%) !important;
  border: 1px solid rgba(198, 161, 91, 0.65) !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 24px rgba(8, 15, 13, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
}
.zoom-ui .zoom-btn {
  border-radius: 6px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(198, 161, 91, 0.45) !important;
  color: var(--hotel-gold-bright) !important;
}
.zoom-ui .zoom-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #ebd094 0%, #c49b4d 100%) !important;
  color: #0c1614 !important;
  border-color: #fff !important;
}
.zoom-ui .zoom-range {
  accent-color: var(--hotel-gold-bright) !important;
}
.zoom-ui .zoom-pct {
  border-radius: 6px !important;
  background: rgba(198, 161, 91, 0.16) !important;
  border: 1px solid rgba(230, 202, 138, 0.45) !important;
  color: var(--hotel-gold-bright) !important;
}
.zoom-ui .zoom-pct:hover {
  background: linear-gradient(135deg, #ebd094 0%, #c49b4d 100%) !important;
  color: #0c1614 !important;
}

#log.log {
  background: linear-gradient(180deg, #faf7f0 0%, #f1e9d8 100%) !important;
  border-left: 1.5px solid rgba(198, 161, 91, 0.65) !important;
}
.log-head h3 {
  font-family: var(--font-serif) !important;
  color: #0f1e1b !important;
}
.log-tabs {
  background: #10201c !important;
  border: 1px solid rgba(198, 161, 91, 0.45);
  border-radius: 8px !important;
}
.log-tabs button {
  color: #d5c8b0 !important;
  border-radius: 6px !important;
}
.log-tabs button[aria-selected="true"] {
  background: linear-gradient(135deg, #ebd094 0%, #c49b4d 100%) !important;
  color: #0c1614 !important;
}

/* Mobile Luxury Bottom Dock & Top Action Pills */
@media (max-width: 800px) {
  .brand-stars {
    display: none !important;
  }
  .mob-top-actions button {
    background: linear-gradient(180deg, rgba(14, 26, 23, 0.94), rgba(10, 18, 16, 0.96)) !important;
    border: 1px solid rgba(198, 161, 91, 0.65) !important;
    color: var(--hotel-gold-bright) !important;
    border-radius: 8px !important;
  }
  nav.toolbar {
    background: linear-gradient(180deg, rgba(14, 26, 23, 0.96) 0%, rgba(9, 17, 15, 0.98) 100%) !important;
    border: 1.5px solid rgba(198, 161, 91, 0.68) !important;
    border-radius: 14px !important;
  }
  nav.toolbar > button:not(.wide):not(#tour),
  nav.toolbar > .tb-link {
    color: #efe3c8 !important;
    border-radius: 9px !important;
  }
  nav.toolbar > button[aria-pressed="true"] {
    background: linear-gradient(135deg, #ebd094 0%, #c49b4d 100%) !important;
    color: #0c1614 !important;
  }
}

/* ============================================================================
   2026-11-10: UNIFIED INTERNSHIP HOTELS ISLAND & HIGH-CONTRAST HOTEL NAME UI
   ============================================================================ */

/* 1. 3D Island Regional Hotel Zone Pins (.item-pin.hotel-zone-pin) */
.item-pin {
  font-size: 12.5px !important;
  font-weight: 800 !important;
  letter-spacing: 0.01em;
}
.item-pin.hotel-zone-pin {
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 3px !important;
  padding: 6px 11px 7px 9px !important;
  border-radius: 10px !important;
  border: 2px solid var(--zcol, #b88b4a) !important;
  background: rgba(255, 253, 248, 0.98) !important;
  color: #141b19 !important;
  box-shadow: 0 6px 18px rgba(10, 18, 16, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.9) inset !important;
  max-width: 248px !important;
  white-space: normal !important;
  text-align: left !important;
  z-index: 6 !important;
}
.item-pin.hotel-zone-pin .hz-head {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}
.item-pin.hotel-zone-pin .hz-head b {
  width: 21px !important;
  height: 21px !important;
  flex-shrink: 0;
  font-size: 12px !important;
  background: var(--zcol, #1d352f) !important;
  color: #fff !important;
  border: none !important;
}
.item-pin.hotel-zone-pin .hz-title {
  display: inline !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  color: #101b18 !important;
  line-height: 1.25 !important;
}
.item-pin.hotel-zone-pin .hz-sub {
  display: block !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #2f261f !important;
  line-height: 1.38 !important;
  padding-top: 3px;
  border-top: 1px dashed rgba(184, 139, 74, 0.45);
  width: 100%;
}
.item-pin.hotel-zone-pin.hot,
.item-pin.hotel-zone-pin:hover,
.item-pin.hotel-zone-pin.sel {
  background: linear-gradient(135deg, #0e1d1a 0%, #1a322c 100%) !important;
  border-color: var(--hotel-gold-bright, #ebd094) !important;
  box-shadow: 0 8px 24px rgba(8, 15, 13, 0.42), 0 0 0 2px rgba(235, 208, 148, 0.5) !important;
  z-index: 9 !important;
}
.item-pin.hotel-zone-pin.hot .hz-title,
.item-pin.hotel-zone-pin:hover .hz-title,
.item-pin.hotel-zone-pin.sel .hz-title {
  color: #fff8ea !important;
}
.item-pin.hotel-zone-pin.hot .hz-sub,
.item-pin.hotel-zone-pin:hover .hz-sub,
.item-pin.hotel-zone-pin.sel .hz-sub {
  color: #f3e4c3 !important;
  border-top-color: rgba(235, 208, 148, 0.35);
}

/* 2. Regional Internship Hotel Directory inside #card (.htl-dir-box) */
.htl-dir-box {
  margin: 14px 0 18px;
  padding: 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, #fffdf8 0%, #f6efe0 100%);
  border: 1.5px solid rgba(184, 139, 74, 0.65);
  box-shadow: 0 6px 18px rgba(15, 28, 24, 0.08);
}
.htl-dir-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #8c6218;
  margin-bottom: 3px;
}
.htl-dir-heading {
  margin: 0 0 10px !important;
  font-size: 15.5px !important;
  font-weight: 800 !important;
  color: #10201c !important;
  line-height: 1.35 !important;
}
.htl-dir-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(184, 139, 74, 0.35);
}
.htl-dir-tab {
  appearance: none;
  border: 1.5px solid rgba(184, 139, 74, 0.55);
  background: #ffffff;
  color: #1f2b27;
  font-size: 12.5px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.htl-dir-tab:hover {
  border-color: var(--zcol, #10201c);
  background: #fdf6e6;
}
.htl-dir-tab.active {
  background: var(--zcol, #10201c);
  border-color: var(--zcol, #10201c);
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(16, 32, 28, 0.22);
}
.htl-dir-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.htl-dir-sec {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(184, 139, 74, 0.42);
  border-left: 4px solid var(--zcol, #235e73);
  border-radius: 10px;
  padding: 10px 11px;
}
.htl-dir-sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
  flex-wrap: wrap;
}
.htl-dir-sec-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: #12211d;
}
.htl-dir-sec-num {
  color: var(--zcol, #235e73);
  font-weight: 900;
  font-size: 15px;
}
.htl-dir-sec-go {
  appearance: none;
  border: 1px solid rgba(184, 139, 74, 0.55);
  background: #fbf5e8;
  color: #5c4012;
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 6px;
  cursor: pointer;
}
.htl-dir-sec-go:hover {
  background: #10201c;
  color: #f3dfb1;
  border-color: #10201c;
}
.htl-dir-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}
.htl-dir-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 8px;
  background: #ffffff;
  border: 1.5px solid rgba(184, 139, 74, 0.38);
  box-shadow: 0 2px 6px rgba(16, 28, 24, 0.06);
  transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s;
}
.htl-dir-card:hover {
  border-color: var(--zcol, #b88b4a);
  box-shadow: 0 4px 12px rgba(16, 28, 24, 0.14);
}
.htl-dir-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 28px;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--zcol, #1d352f);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}
.htl-dir-info {
  flex: 1;
  min-width: 0;
}
.htl-dir-name {
  font-size: 15.5px;
  font-weight: 800;
  color: #14110f;
  line-height: 1.32;
  letter-spacing: 0.01em;
  word-break: break-word;
}
.htl-dir-subname {
  font-size: 11.5px;
  font-weight: 600;
  color: #6b5e53;
  line-height: 1.25;
  margin-top: 1px;
}
.htl-dir-meta {
  font-size: 12px;
  font-weight: 700;
  color: #3b4d47;
  margin-top: 3px;
}
.htl-dir-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 7px;
  background: #10201c;
  color: #f5dfad !important;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none !important;
  border: 1px solid rgba(198, 161, 91, 0.65);
  flex-shrink: 0;
  white-space: nowrap;
}
.htl-dir-btn:hover {
  background: linear-gradient(135deg, #ebd094 0%, #c49b4d 100%);
  color: #0c1614 !important;
}

/* 3. Sidebar (#tree) Hotel Name Pills under Island 09 */
.tree-htl-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px 6px 8px 24px;
}
.tree-htl-pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  background: #fffdf8;
  border: 1px solid rgba(184, 139, 74, 0.52);
  color: #181412;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
}
.tree-htl-pill:hover {
  background: #10201c;
  color: #f5dfad;
  border-color: #10201c;
}

@media (max-width: 800px) {
  .item-pin.hotel-zone-pin {
    max-width: 196px !important;
    padding: 5px 8px !important;
  }
  .item-pin.hotel-zone-pin .hz-title {
    font-size: 12px !important;
  }
  .item-pin.hotel-zone-pin .hz-sub {
    font-size: 10.5px !important;
  }
  .htl-dir-name {
    font-size: 14.5px;
  }
}

/* ==========================================================================
   FINAL RWD, CJK TYPOGRAPHY, LOGIN/ONBOARDING & MOBILE ERGONOMIC OVERRIDES
   Placed at end of stylesheet to supersede all earlier !important rules.
   ========================================================================== */

/* 0. Semantic Non-Breaking Phrase Grouping & CJK Balanced Line-Breaking */
.nw {
  display: inline-block;
  white-space: nowrap;
}
h1,
h2,
h3,
h4,
.eyebrow,
.intro-box p,
.side-head p,
.hero-note h2,
.hero-note p,
.card h2,
.card p,
.credit-box {
  word-break: keep-all;
  overflow-wrap: break-word;
}
.brand-kicker {
  display: none;
}

/* 1. Anti-Cropping & Anti-Broken-Image Rules for Logos & Avatars */
.brand-logo,
.loading-logo,
.side-logo,
.intro-logo {
  object-fit: contain !important;
  background: transparent !important;
  flex-shrink: 0 !important;
  display: block;
}
.brand-logo-link {
  background: radial-gradient(circle, rgba(255, 250, 236, 0.14) 0%, rgba(12, 24, 20, 0.4) 100%) !important;
}
.teacher-real-photo,
.faculty-mini-btn img {
  object-fit: cover;
  object-position: center 18%;
  background: #f3ece0;
}
.icon-tile.thumb img,
.teacher-3d-avatar img,
.icon-tile.role.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 2. Five-Star Grand Hotel Check-In / Welcome Dialog (#intro) */
#intro.intro {
  position: fixed;
  inset: 0;
  z-index: 65;
  display: grid;
  place-items: center;
  padding: 16px;
  background: radial-gradient(circle at 50% 35%, rgba(15, 34, 29, 0.72), rgba(6, 13, 11, 0.86));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
#intro.intro[hidden] {
  display: none !important;
}
#intro .intro-box {
  width: min(472px, calc(100vw - 24px)) !important;
  max-width: calc(100vw - 24px) !important;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  box-sizing: border-box;
  padding: 26px 26px 22px !important;
  border-radius: 20px !important;
  background:
    repeating-linear-gradient(45deg, rgba(198, 161, 91, 0.025) 0 1px, transparent 1px 12px),
    linear-gradient(165deg, rgba(12, 26, 22, 0.97) 0%, rgba(19, 39, 33, 0.98) 100%) !important;
  border: 1.5px solid rgba(230, 202, 138, 0.72) !important;
  border-top: 4px solid #e6ca8a !important;
  box-shadow:
    0 28px 72px rgba(0, 0, 0, 0.58),
    inset 0 0 0 4px rgba(12, 26, 22, 0.94),
    inset 0 0 0 5px rgba(230, 202, 138, 0.22) !important;
  color: #faf6ed !important;
}
.intro-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(230, 202, 138, 0.24);
}
.intro-logo {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.38));
}
.intro-brand-meta {
  min-width: 0;
  flex: 1;
}
.intro-stars {
  font: 800 10px/1.2 "Plus Jakarta Sans", sans-serif;
  letter-spacing: 0.16em;
  color: #e6ca8a;
}
.intro-school {
  margin-top: 3px;
  font: 800 clamp(13.5px, 3.6vw, 15.5px)/1.3 "Noto Serif TC", Georgia, serif;
  color: #fff9ee;
  letter-spacing: 0.03em;
}
#intro #intro-count {
  margin: 4px 0 0 !important;
  font: 800 10px/1.2 "Plus Jakarta Sans", sans-serif !important;
  letter-spacing: 0.14em !important;
  color: rgba(230, 202, 138, 0.82) !important;
}
#intro #intro-title {
  margin: 16px 0 10px !important;
  font: 800 clamp(18px, 4.7vw, 22.5px)/1.38 "Noto Serif TC", Georgia, serif !important;
  color: #fffaf0 !important;
  letter-spacing: 0.02em !important;
  text-wrap: balance;
}
#intro #intro-body {
  margin: 0 0 16px !important;
  font: 400 14px/1.72 "Noto Sans TC", sans-serif !important;
  color: rgba(250, 246, 237, 0.88) !important;
}
.intro-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 0 0 16px;
}
.intro-dot {
  appearance: none;
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(230, 202, 138, 0.55);
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}
.intro-dot.active {
  width: 24px;
  background: #e6ca8a;
  border-color: #fff3cf;
}
#intro .intro-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  margin-top: 4px !important;
}
#intro .intro-actions button {
  min-height: 42px !important;
  height: auto !important;
  padding: 9px 15px !important;
  border-radius: 999px !important;
  font: 800 13px/1.2 "Noto Sans TC", "Plus Jakarta Sans", sans-serif !important;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.14s ease, filter 0.14s ease, background 0.14s ease;
}
#intro #intro-skip {
  background: rgba(255, 255, 255, 0.07) !important;
  border: 1px solid rgba(230, 202, 138, 0.34) !important;
  color: rgba(250, 246, 237, 0.84) !important;
}
#intro #intro-skip:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #fff !important;
}
#intro #intro-drive {
  background: rgba(230, 202, 138, 0.16) !important;
  border: 1px solid rgba(230, 202, 138, 0.62) !important;
  color: #f8e5b4 !important;
}
#intro #intro-drive:hover {
  background: rgba(230, 202, 138, 0.28) !important;
}
#intro #intro-next {
  flex: 1 1 auto;
  justify-content: center;
  background: linear-gradient(135deg, #f1cf7a 0%, #c8942a 100%) !important;
  border: 1px solid #fae6b1 !important;
  color: #10201b !important;
  box-shadow: 0 6px 18px rgba(198, 148, 42, 0.34) !important;
}
#intro #intro-next:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}
@media (max-width: 420px) {
  #intro .intro-box {
    padding: 20px 18px 18px !important;
  }
  #intro #intro-skip {
    order: 2;
    flex: 1 1 38%;
  }
  #intro #intro-drive {
    order: 3;
    flex: 1 1 56%;
  }
  #intro #intro-next {
    order: 1;
    flex: 1 1 100%;
  }
}

/* 3. Loading Screen (#loading) — Clean Phrase Grouping & Zero Clipping */
#loading.loading .loading-crest {
  width: min(450px, calc(100vw - 24px)) !important;
  max-width: calc(100vw - 24px) !important;
  padding: 28px 20px 24px !important;
  box-sizing: border-box !important;
}
#loading.loading .loading-eyebrow {
  font-size: clamp(9px, 2.5vw, 10.5px) !important;
  letter-spacing: clamp(0.05em, 0.3vw, 0.18em) !important;
  white-space: normal !important;
  line-height: 1.35 !important;
}
#loading.loading h2 {
  font-size: clamp(16.5px, 4.6vw, 22px) !important;
  letter-spacing: clamp(0.02em, 0.22vw, 0.08em) !important;
  white-space: normal !important;
  word-break: keep-all !important;
  text-wrap: balance;
  line-height: 1.4 !important;
}
#loading.loading p {
  font-size: clamp(12px, 3.2vw, 13.5px) !important;
  white-space: normal !important;
  word-break: keep-all !important;
  line-height: 1.5 !important;
}
@media (max-width: 355px) {
  #loading.loading h2 .sep,
  .intro-school .sep {
    display: block;
    height: 0;
    overflow: hidden;
    visibility: hidden;
  }
}

/* 4. Toolbar Icon/Label Structure & Desktop Anti-Collision Responsive Rules */
.toolbar .qp-btn.daily::after,
.qp-btn.daily::after {
  display: none !important;
}
nav.toolbar .tb-ic {
  font-style: normal;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
}
nav.toolbar .tb-lbl {
  display: inline-flex;
  align-items: center;
  line-height: 1.15;
}

@media (min-width: 801px) {
  nav.toolbar {
    max-width: calc(100vw - var(--brand-w, 340px) - 400px);
    flex-wrap: wrap;
    justify-content: flex-end;
    row-gap: 6px;
  }
  @media (max-width: 1580px) {
    nav.toolbar .tb-sub,
    nav.toolbar .qp-btn-s {
      display: none !important;
    }
    nav.toolbar button,
    nav.toolbar .tb-link,
    nav.toolbar .hm-open {
      padding: 0 10px;
      font-size: 12px;
      gap: 4px;
    }
  }
  @media (max-width: 1320px) {
    nav.toolbar .qp-btn-l,
    nav.toolbar #credits-btn {
      display: none !important;
    }
  }
}

/* 5. Mobile Viewport (<= 800px) — Full School + Dept Name, Zero Overlap Top Bar & Native Icon-Over-Label Dock */
@media (max-width: 800px) {
  /* Top-Left Brand Header: Two-deck School + Department layout so NEITHER ever truncates or wraps mid-word */
  header.brand,
  .brand {
    top: calc(8px + env(safe-area-inset-top, 0px)) !important;
    left: 8px !important;
    width: auto !important;
    max-width: calc(100vw - var(--mob-actions-w, 178px) - 22px) !important;
    padding: 5px 10px 5px 6px !important;
    gap: 7px !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
    z-index: 25 !important;
    align-items: center !important;
  }
  .brand-logo-link {
    padding: 1.5px !important;
    flex-shrink: 0 !important;
  }
  .brand-logo {
    width: 32px !important;
    height: 32px !important;
  }
  .brand .brand-r {
    min-width: 0 !important;
    gap: 1px !important;
    overflow: hidden !important;
  }
  .brand-stars,
  .brand .candidate,
  .brand .future,
  .brand h1 .brand-sch {
    display: none !important;
  }
  .brand .brand-kicker {
    display: block !important;
    font: 800 9.5px/1.2 "Noto Sans TC", sans-serif !important;
    letter-spacing: 0.05em !important;
    color: #e6ca8a !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .brand h1 {
    font-size: 14.5px !important;
    letter-spacing: 0.04em !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* Top-Right Quick Actions: crisp 32x32 touch-ergonomic circle/pill group */
  .mob-top-actions {
    top: calc(8px + env(safe-area-inset-top, 0px)) !important;
    right: 8px !important;
    gap: 4px !important;
    z-index: 26 !important;
  }
  .mob-top-actions button {
    min-height: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    padding: 0 7px !important;
    font-size: 11.5px !important;
    font-weight: 800 !important;
    border-radius: 9px !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .mob-top-actions #mob-credits {
    display: none !important;
  }

  /* Compact 3D Island Floating Tags on Mobile */
  .island-tag {
    padding: 3px 8px 3px 4px !important;
    gap: 5px !important;
    font-size: 11px !important;
    border-radius: 7px !important;
  }
  .island-tag .num {
    width: 19px !important;
    height: 19px !important;
    font-size: 10px !important;
    border-radius: 5px !important;
  }

  /* Bottom Floating HUD (#qp-hud) & Zoom Controls (#zoom-ui) cleanly above 58px bottom dock */
  .qp-hud {
    left: 8px !important;
    bottom: calc(68px + env(safe-area-inset-bottom, 0px)) !important;
    max-width: calc(100vw - 134px) !important;
    padding: 6px 9px !important;
    border-radius: 12px !important;
    z-index: 15 !important;
    transition: opacity 0.18s ease;
  }
  .zoom-ui {
    right: 8px !important;
    bottom: calc(68px + env(safe-area-inset-bottom, 0px)) !important;
    padding: 4px 5px !important;
    gap: 3px !important;
    border-radius: 11px !important;
    z-index: 15 !important;
    transition: opacity 0.18s ease;
  }
  @media (max-width: 560px) {
    .zoom-ui .zoom-range {
      display: none !important;
    }
  }
  body.card-open .zoom-ui,
  body.log-open .zoom-ui,
  body.m-time .zoom-ui,
  body:has(.sidebar.mobile-open) .zoom-ui,
  body:has(.hm-panel.open:not(.min)) .zoom-ui,
  body:has(.hm-pad.on) .zoom-ui,
  body:has(.is-plaza-drawer.open) .zoom-ui,
  body.card-open .qp-hud,
  body.log-open .qp-hud,
  body.m-time .qp-hud,
  body:has(.sidebar.mobile-open) .qp-hud,
  body:has(.hm-panel.open:not(.min)) .qp-hud,
  body:has(.hm-pad.on) .qp-hud,
  body:has(.is-plaza-drawer.open) .qp-hud {
    opacity: 0 !important;
    pointer-events: none !important;
  }

  /* Mobile Bottom Sheets: clear the 58px bottom toolbar cleanly */
  .sidebar,
  .card,
  .log {
    padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Bottom Toolbar (nav.toolbar) — Native 7-Tab Vertical Icon-Above-Label Dock */
  nav.toolbar #lang-btn,
  nav.toolbar #credits-btn,
  nav.toolbar #help,
  nav.toolbar #cmd-btn,
  nav.toolbar #htl-plaza-open,
  nav.toolbar .wide,
  nav.toolbar #tour,
  nav.toolbar #hm-open,
  nav.toolbar .qp-btn-s,
  nav.toolbar .qp-btn-l,
  nav.toolbar .tb-sub {
    display: none !important;
  }
  nav.toolbar {
    left: 6px !important;
    right: 6px !important;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important;
    padding: 4px 5px !important;
    gap: 2px !important;
    border-radius: 15px !important;
    justify-content: space-between !important;
    align-items: stretch !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }
  nav.toolbar button,
  nav.toolbar .tb-link,
  nav.toolbar .hm-open {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    height: 46px !important;
    min-height: 46px !important;
    padding: 3px 2px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    border-radius: 10px !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }
  nav.toolbar .tb-ic {
    font-size: 15px !important;
    height: 17px !important;
    line-height: 1 !important;
  }
  nav.toolbar .tb-ico {
    width: 15px !important;
    height: 15px !important;
    flex-shrink: 0 !important;
  }
  nav.toolbar .tb-lbl {
    font-size: 10px !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    letter-spacing: 0 !important;
  }
}
