:root {
  --leaf: #6c9446;
  --fresh: #639a6b;
  --deep: #4b6245;
  --mist: #eae7df;
  --warm: #eeecea;
  --paper: #fbfaf7;
  --ink: #3f443f;
  --muted: #73786f;
  --line: rgba(75, 98, 69, 0.18);
  --gold: #caa76f;
  --blue: #006ea2;
  --wood: #796a56;
  --shadow: 0 20px 48px rgba(60, 72, 55, 0.14);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(234, 231, 223, 0.96), rgba(251, 250, 247, 0.92)),
    url("./photos/photo_space_dsc02904.jpg") center / cover fixed;
  color: var(--ink);
  font-family: "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
  font-size: 15px;
  letter-spacing: 0;
  overflow-x: hidden;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

.page-shell {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  min-height: 100vh;
  max-width: 100%;
  overflow: hidden;
}

.side-rail {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  background: rgba(251, 250, 247, 0.86);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  gap: 28px;
  z-index: 5;
  max-width: 100%;
}

.brand-mark {
  display: block;
  width: 66px;
  height: 66px;
  margin: 0 auto;
  flex: 0 0 auto;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(75, 98, 69, 0.2);
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  scrollbar-width: none;
}

.side-nav::-webkit-scrollbar {
  display: none;
}

.side-nav a {
  min-height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.side-nav a.active,
.side-nav a:hover {
  background: var(--deep);
  border-color: var(--deep);
  color: white;
}

main {
  width: min(1240px, calc(100vw - 116px));
  max-width: 100%;
  margin: 0 auto;
  padding: 28px 32px 72px;
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0 22px;
  background: linear-gradient(180deg, rgba(234, 231, 223, 0.98), rgba(234, 231, 223, 0.86));
  backdrop-filter: blur(18px);
}

.top-bar > *,
.overview-section > *,
.type-layout > *,
.section-head > * {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--leaf);
  font-family: Roboto, Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  color: var(--deep);
  font-size: 28px;
  line-height: 1.35;
}

h2 {
  margin-bottom: 18px;
  color: var(--deep);
  font-size: 24px;
  line-height: 1.45;
}

h3 {
  margin-bottom: 10px;
  color: var(--deep);
  font-size: 18px;
  line-height: 1.45;
}

p {
  color: var(--muted);
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.search-field {
  display: grid;
  grid-template-columns: auto minmax(220px, 360px);
  align-items: center;
  gap: 12px;
  padding: 8px 10px 8px 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(75, 98, 69, 0.08);
}

.search-field span {
  color: var(--deep);
  font-weight: 700;
}

.search-field input {
  width: 100%;
  min-height: 40px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
}

.overview-section {
  min-height: 460px;
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
  gap: 32px;
  align-items: stretch;
  padding: 34px;
  background: rgba(251, 250, 247, 0.76);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.overview-copy {
  align-self: center;
  min-width: 0;
}

.overview-copy h2 {
  max-width: 11em;
  font-size: 36px;
  line-height: 1.22;
}

.overview-copy p {
  max-width: 35em;
  font-size: 17px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
  min-width: 0;
}

.pill-row span {
  padding: 8px 12px;
  border: 1px solid rgba(108, 148, 70, 0.28);
  border-radius: 999px;
  background: rgba(234, 231, 223, 0.72);
  color: var(--deep);
  font-weight: 700;
}

.image-board {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
  min-height: 390px;
  min-width: 0;
}

.image-board img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(35, 44, 32, 0.12);
}

.image-board .image-main {
  grid-row: 1 / span 2;
}

.quick-grid,
.color-grid,
.hotel-grid,
.asset-grid,
.rules-grid {
  display: grid;
  gap: 16px;
}

.quick-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 18px 0 54px;
}

.todo-section {
  padding-top: 10px;
}

.todo-progress {
  min-width: 230px;
  padding: 12px;
  background: rgba(251, 250, 247, 0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.todo-progress span {
  display: block;
  margin-bottom: 9px;
  color: var(--deep);
  font-size: 13px;
  font-weight: 800;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  background: rgba(75, 98, 69, 0.14);
  border-radius: 999px;
}

.progress-bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--leaf), var(--gold));
  border-radius: inherit;
  transition: width 180ms ease;
}

.priority-roadmap {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 18px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(75, 98, 69, 0.08);
}

.priority-roadmap article {
  min-height: 170px;
  padding: 20px;
  background: rgba(251, 250, 247, 0.92);
}

.priority-roadmap span,
.todo-meta,
.detail-kicker {
  color: var(--leaf);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.priority-roadmap strong {
  display: block;
  margin: 12px 0 8px;
  color: var(--deep);
  font-size: 17px;
  line-height: 1.45;
}

.priority-roadmap p {
  margin-bottom: 0;
}

.todo-workbench {
  display: grid;
  grid-template-columns: 220px minmax(320px, 1fr) minmax(280px, 0.86fr);
  gap: 16px;
  align-items: start;
}

.todo-controls,
.todo-list-panel,
.todo-detail {
  background: rgba(251, 250, 247, 0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(75, 98, 69, 0.08);
}

.todo-controls {
  position: sticky;
  top: 98px;
  display: grid;
  gap: 24px;
  padding: 18px;
}

.todo-controls h3 {
  margin-bottom: 12px;
  font-size: 16px;
}

.todo-filter-group,
.todo-lens {
  display: grid;
  gap: 8px;
}

.todo-filter,
.todo-lens-button {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  color: var(--deep);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-align: left;
}

.todo-filter.active,
.todo-lens-button.active,
.todo-filter:hover,
.todo-lens-button:hover {
  background: var(--deep);
  border-color: var(--deep);
  color: white;
}

.todo-hint {
  margin-bottom: 0;
  font-size: 13px;
}

.todo-list-panel {
  padding: 12px;
}

.todo-list {
  display: grid;
  gap: 10px;
}

.todo-card {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  padding: 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.todo-card.selected {
  border-color: rgba(108, 148, 70, 0.72);
  box-shadow: 0 10px 24px rgba(75, 98, 69, 0.14);
}

.todo-card.done {
  background: rgba(234, 231, 223, 0.6);
}

.todo-card.done strong,
.todo-card.done .todo-main > span:last-child {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(108, 148, 70, 0.55);
}

.todo-check,
.todo-main {
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.todo-check {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
}

.todo-check span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(108, 148, 70, 0.55);
  border-radius: 50%;
  color: var(--deep);
  font-size: 14px;
  font-weight: 900;
}

.todo-main {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 0;
  text-align: left;
}

.todo-main strong {
  color: var(--deep);
  font-size: 17px;
  line-height: 1.4;
}

.todo-main > span:last-child {
  color: var(--muted);
  line-height: 1.65;
}

.todo-detail {
  position: sticky;
  top: 98px;
  padding: 24px;
}

.todo-detail h3 {
  margin: 12px 0;
  font-size: 22px;
}

.todo-detail dl {
  margin: 20px 0 0;
}

.todo-detail div {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.todo-detail dt {
  margin-bottom: 6px;
  color: var(--deep);
  font-weight: 900;
}

.todo-detail dd {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.metric-card,
.color-card,
.hotel-card,
.asset-card,
.rule-panel,
.source-link,
.type-spec,
.type-sample {
  background: rgba(251, 250, 247, 0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(75, 98, 69, 0.08);
}

.metric-card {
  min-height: 118px;
  padding: 20px;
}

.metric-card span {
  display: block;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metric-card strong {
  color: var(--deep);
  font-size: 20px;
  line-height: 1.4;
}

.content-section {
  padding: 58px 0 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.section-head h2 {
  margin-bottom: 0;
}

.color-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.color-card {
  overflow: hidden;
}

.color-swatch {
  height: 108px;
}

.color-info {
  padding: 18px;
}

.color-info strong {
  display: block;
  color: var(--deep);
  font-size: 17px;
}

.color-info button {
  margin: 12px 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  color: var(--deep);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.type-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 16px;
}

.mascot-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(360px, 1.18fr);
  gap: 18px;
}

.mascot-art,
.mascot-copy {
  background: rgba(251, 250, 247, 0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(75, 98, 69, 0.08);
}

.mascot-art {
  min-height: 300px;
  display: grid;
  gap: 12px;
  place-items: center;
  padding: 22px;
}

.mascot-art img {
  display: block;
  width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
}

.mascot-primary-image {
  aspect-ratio: 16 / 10;
  object-position: right center;
}

.mascot-master-image {
  aspect-ratio: 1 / 1;
  object-fit: contain;
  object-position: center;
  padding: 12px;
  background: white;
}

.mascot-reference-strip {
  width: 100%;
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  gap: 12px;
}

.mascot-reference-strip img {
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: white;
  padding: 8px;
}

.mascot-copy {
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.mascot-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.mascot-rules span {
  padding: 8px 12px;
  border: 1px solid rgba(108, 148, 70, 0.28);
  border-radius: 999px;
  color: var(--deep);
  font-weight: 800;
}

.mascot-gallery {
  margin-top: 18px;
  padding: 22px;
  background: rgba(251, 250, 247, 0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(75, 98, 69, 0.08);
}

.gallery-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.gallery-head h3 {
  margin-bottom: 0;
}

.gallery-head a {
  color: var(--deep);
  font-weight: 800;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.mascot-expression-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.expression-card {
  min-width: 0;
  padding: 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
}

.expression-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
}

.expression-card strong,
.expression-card span {
  display: block;
  overflow-wrap: anywhere;
}

.expression-card strong {
  margin-top: 8px;
  color: var(--deep);
  font-size: 13px;
  line-height: 1.4;
}

.expression-card span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.type-spec,
.type-sample {
  padding: 28px;
}

.type-spec dl {
  margin: 24px 0 0;
}

.type-spec div {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 18px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.type-spec dt {
  color: var(--deep);
  font-weight: 800;
}

.type-spec dd {
  margin: 0;
  color: var(--muted);
}

.type-sample {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(120deg, rgba(75, 98, 69, 0.9), rgba(108, 148, 70, 0.72)),
    url("./photos/photo_el_lobby.jpg") center / cover;
}

.type-sample span,
.type-sample h3,
.type-sample p {
  color: white;
}

.type-sample span {
  font-weight: 700;
}

.type-sample h3 {
  max-width: 620px;
  margin: 14px 0;
  font-size: 28px;
}

.type-sample p {
  max-width: 520px;
  margin-bottom: 0;
}

.hotel-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hotel-card {
  overflow: hidden;
}

.hotel-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.hotel-card .hotel-body {
  padding: 18px;
}

.hotel-card .region {
  color: var(--leaf);
  font-weight: 800;
  font-size: 13px;
}

.hotel-card p {
  margin-bottom: 0;
}

.hotel-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.hotel-meta span {
  padding: 6px 8px;
  border-radius: 999px;
  background: var(--warm);
  color: var(--deep);
  font-size: 12px;
  font-weight: 700;
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 5px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.segmented button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.segmented button.active,
.segmented button:hover {
  background: var(--deep);
  color: white;
}

.asset-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.asset-card {
  overflow: hidden;
  text-decoration: none;
}

.asset-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  object-fit: cover;
  background: var(--warm);
}

.asset-card[data-asset-type="mascot"] img {
  object-fit: contain;
  padding: 12px;
  background: white;
}

.asset-card .asset-body {
  padding: 14px;
}

.asset-card strong {
  display: block;
  color: var(--deep);
  font-size: 14px;
  line-height: 1.45;
}

.asset-card span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.rules-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rule-panel {
  padding: 22px;
}

pre {
  margin: 0;
  white-space: pre-wrap;
  color: var(--deep);
  font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.7;
}

.source-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.source-link {
  min-height: 86px;
  display: flex;
  align-items: center;
  padding: 18px;
  color: var(--deep);
  text-decoration: none;
  font-weight: 800;
}

.is-hidden {
  display: none !important;
}

.is-match {
  outline: 2px solid rgba(202, 167, 111, 0.9);
  outline-offset: 2px;
}

#toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  padding: 12px 14px;
  background: var(--deep);
  color: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 10;
}

#toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .page-shell {
    grid-template-columns: 1fr;
  }

  .side-rail {
    position: sticky;
    top: 0;
    height: auto;
    flex-direction: row;
    align-items: center;
    padding: 12px 18px;
    width: 100vw;
    max-width: 100vw;
    min-width: 0;
    overflow: hidden;
  }

  .brand-mark {
    width: 48px;
    height: 48px;
    margin: 0;
  }

  .side-nav {
    flex: 1;
    flex-direction: row;
    overflow-x: auto;
    min-width: 0;
  }

  .side-nav a {
    min-width: 62px;
  }

  main {
    width: 100vw;
    max-width: 100vw;
    padding: 20px 20px 60px;
    overflow: hidden;
  }

  .overview-section,
  .type-layout,
  .mascot-layout {
    grid-template-columns: 1fr;
  }

  .quick-grid,
  .priority-roadmap,
  .color-grid,
  .hotel-grid,
  .rules-grid,
  .mascot-expression-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .todo-workbench {
    grid-template-columns: 1fr;
  }

  .todo-controls,
  .todo-detail {
    position: static;
  }

  .todo-filter-group,
  .todo-lens {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .asset-grid,
  .source-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .top-bar,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .search-field {
    grid-template-columns: 1fr;
  }

  .overview-section {
    min-height: auto;
    padding: 22px;
    width: 100%;
    overflow: hidden;
  }

  .overview-copy h2 {
    font-size: 28px;
  }

  .overview-copy p,
  .type-sample p {
    max-width: 100%;
  }

  .pill-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pill-row span {
    text-align: center;
  }

  .image-board {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, 180px);
    min-height: 0;
  }

  .image-board .image-main {
    grid-row: auto;
  }

  .quick-grid,
  .priority-roadmap,
  .color-grid,
  .hotel-grid,
  .asset-grid,
  .rules-grid,
  .source-list,
  .mascot-expression-grid {
    grid-template-columns: 1fr;
  }

  .gallery-head {
    align-items: stretch;
    flex-direction: column;
  }

  .todo-progress {
    min-width: 0;
  }

  .todo-filter-group,
  .todo-lens {
    grid-template-columns: 1fr;
  }

  .todo-card {
    grid-template-columns: 34px 1fr;
  }

  .todo-check {
    width: 34px;
    height: 34px;
  }
}
