:root {
  --bg: #f4eee8;
  --overlay: rgb(70, 57, 66, 0.3);
  --paper: #fffaf6;
  --paper-2: #f8f0eb;
  --text: #463942;
  --muted: #81747b;
  --line: #dfd1d3;
  --berry: #75445f;
  --berry-2: #f0e1e9;
  --gold: #a8793d;
  --gold-2: #f6ead4;
  --red: #c65f4b;
  --red-2: #f8e3dc;
  --blue: #568398;
  --blue-2: #dfedf1;
  --brown: #66515e;
  --green: #b6c7be;
  --green-2: #ccd7d1;
  --shadow: 0 12px 30px rgba(92, 65, 79, 0.11);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(
      circle at 10% 0%,
      rgba(91, 126, 101, 0.1),
      transparent 34rem
    ),
    var(--bg);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC",
    "PingFang TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.55;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.wrap {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
}

header {
  padding: 30px 0 18px;
}

.hero {
  border: 1px solid rgba(53, 107, 82, 0.16);
  border-radius: 26px;
  padding: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  gap: 40px;
}

.hero-image {
  position: relative;
  text-align: center;
}

.hero-img {
  width: 200px;
  max-width: 100%;
}

.hero-signature {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 80px;
  height: auto;
  transform: rotate(-15deg);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brown);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
}

h1 {
  margin: 6px 0 8px;
  font-size: clamp(1.7rem, 4vw, 2rem);
  line-height: 1.2;
}

h3 {
  margin: 12px 0 6px;
  font-size: 1rem;
  line-height: 1.3;
  color: var(--berry);
}

p {
  margin: 6px 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text);
}

.subtle {
  color: var(--muted);
}

.subtitle {
  margin: 0;
  color: var(--muted);
}

.invite-code {
  font-family: monospace;
  font-weight: 700;
  color: var(--berry);
  background: var(--berry-2);
  padding: 2px 6px;
  border-radius: 4px;
  margin: 0 2px;
}

/* Buttons */
.btn {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--text);
  padding: 10px 13px;
  text-decoration: none;
}

.btn:hover {
  border-color: var(--berry);
}

.btn-danger {
  color: var(--red);
}

.btn-favorite.active {
  color: var(--red);
  border-color: rgba(154, 77, 67, 0.35);
  background: var(--red-2);
}

.btn-support {
  margin-top: 8px;
  background: var(--green-2);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
  display: inline-flex;
  align-items: center;
  border: 0;
  transition: all 0.25s linear;
}

.btn-support:hover {
  background-color: var(--green);
}

.btn-support-has-icon {
  padding: 12px 20px 12px 36px;
}

.btn-support:hover {
  box-shadow: 0 10px 18px var(--shadow);
}

.btn-support-heart {
  width: 16px;
  height: auto;
  margin-left: 6px;
}
.btn-support-coffee {
  width: 40px;
  height: auto;
  position: absolute;
  left: -14px;
  top: 50%;
  transform: translateY(-50%) rotate(-5deg);
  transition: all 0.25s linear;
}
.btn-support:hover .btn-support-coffee {
  transform-origin: bottom center;
  transform: scale(1.1) translateY(-50%) rotate(0deg);
}
.btn-support-brunch {
  width: 48px;
  height: auto;
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translateY(-50%) rotate(-5deg);
  transition: all 0.25s linear;
}
.btn-support:hover .btn-support-brunch {
  transform-origin: bottom center;
  transform: scale(1.1) translateY(-50%) rotate(0deg);
}
.btn-support-taiwanese-fried-chicken {
  width: 48px;
  height: auto;
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translateY(-50%) rotate(-5deg);
  transition: all 0.25s linear;
}
.btn-support:hover .btn-support-taiwanese-fried-chicken {
  transform-origin: bottom center;
  transform: scale(1.2) translateY(-50%) rotate(0deg);
}

.support-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.28s cubic-bezier(0.2, 0.9, 0.3, 1),
    visibility 0.28s ease;
}

.support-modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.support-modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay);
  backdrop-filter: blur(2px);
}

.support-modal-card {
  position: relative;
  width: min(500px, 100%);
  padding: 40px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff8f2 0%, #fff3ec 100%);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 24px 60px rgba(88, 64, 82, 0.18);
  overflow: hidden;
  transform: translateY(12px) scale(0.98);
  opacity: 0;
  transition:
    transform 0.28s cubic-bezier(0.2, 0.9, 0.3, 1),
    opacity 0.28s ease;
}

.support-modal-card::before {
  content: "";
  position: absolute;
  top: -22px;
  left: -22px;
  width: 96px;
  height: 96px;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 220, 166, 0.4),
    transparent 55%
  );
  border-radius: 50%;
}

.support-modal.open .support-modal-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #ffffff;
  color: var(--berry);
  font-size: 1.2rem;
  font-weight: 700;
  transition: all 0.15s ease;
  box-shadow: 0 10px 20px rgba(85, 67, 83, 0.05);
  z-index: 10;
}

.modal-close:hover {
  box-shadow: 0 10px 20px rgba(85, 67, 83, 0.16);
}

.modal-body {
  position: relative;
  z-index: 1;
  /* text-align: center; */
}

.modal-body h2 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.25rem;
  color: var(--berry);
}

.modal-body h5 {
  margin: 20px 0 0 0;
  font-size: 0.88rem;
  color: var(--berry);
  text-align: center;
}

.modal-body p {
  margin: 8px 0;
}

.support-modal-btns {
  display: flex;
  /* flex-direction: column; */
  flex-wrap: wrap;
  gap: 16px 40px;
  margin-top: 16px;
  align-content: center;
  align-items: center;
  justify-content: center;
}

.invite-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  font-weight: 700;
  color: var(--text);
}

.support-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(181, 138, 152, 0.2);
  background: rgba(247, 231, 239, 0.95);
  color: var(--berry);
  text-decoration: none;
  font-weight: 700;
}

.support-link img {
  width: 26px;
  height: 26px;
}

.toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  margin: 12px 0 18px;
  padding: 12px;
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--paper) 93%, transparent);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 25px rgba(49, 58, 51, 0.06);
}

.toolbar-top {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

.toolbar-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 16px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.toolbar-status span {
  white-space: nowrap;
}

.toolbar-status strong {
  color: var(--text);
  font-weight: 700;
}

.filter-groups {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding-top: 2px;
}

.filter-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
}

.filter-label {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.filter-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.filter-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  padding: 6px 11px;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    color 0.15s ease;
}

.filter-chip:hover {
  border-color: var(--berry);
  color: var(--berry);
}

.filter-chip.active {
  background: var(--berry-2);
  color: var(--berry);
  border-color: rgba(53, 107, 82, 0.16);
}

.filter-chip.rec-must.active {
  background: var(--red-2);
  color: var(--red);
  border-color: rgba(154, 77, 67, 0.18);
}

.filter-chip.rec-first.active {
  background: var(--gold-2);
  color: var(--gold);
  border-color: rgba(138, 100, 36, 0.18);
}

.filter-chip.rec-need.active {
  background: var(--blue-2);
  color: var(--blue);
  border-color: rgba(70, 103, 126, 0.16);
}

.search {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--text);
  padding: 10px 12px;
  outline: none;
}

.search:focus {
  border-color: var(--berry);
  box-shadow: 0 0 0 3px rgba(53, 107, 82, 0.12);
}

.favorite-cell {
  width: 54px;
  text-align: center;
}

.favorite-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 1.45rem;
  line-height: 1;
  transition:
    transform 0.15s ease,
    color 0.15s ease,
    background 0.15s ease;
}

.favorite-btn:hover {
  color: var(--red);
  background: var(--red-2);
  transform: scale(1.08);
}

.favorite-btn.active {
  color: var(--red);
}

.progress-shell {
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: #ddd8cc;
  margin: -2px 0 0;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: var(--berry);
  transition: width 0.25s ease;
}

.badge {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.76rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.badge.must {
  background: var(--red-2);
  color: var(--red);
  border-color: rgba(154, 77, 67, 0.18);
}

.badge.good {
  background: var(--berry-2);
  color: var(--berry);
  border-color: rgba(53, 107, 82, 0.16);
}

.badge.first {
  background: var(--gold-2);
  color: var(--gold);
  border-color: rgba(138, 100, 36, 0.18);
}

.badge.need {
  background: var(--blue-2);
  color: var(--blue);
  border-color: rgba(70, 103, 126, 0.16);
}

.region {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  overflow: hidden;
  box-shadow: 0 5px 18px rgba(49, 58, 51, 0.04);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 850px;
}

th {
  padding: 10px 12px;
  text-align: left;
  color: var(--muted);
  font-size: 0.78rem;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}

td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(217, 211, 197, 0.78);
  vertical-align: top;
}

tr:last-child td {
  border-bottom: 0;
}

tr.done {
  opacity: 0.56;
}

tr.done .reward {
  text-decoration: line-through;
}

tr.hidden {
  display: none;
}

.check-cell {
  width: 48px;
  text-align: center;
}

.daily-check {
  width: 20px;
  height: 20px;
  accent-color: var(--berry);
  cursor: pointer;
}

.region-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-weight: 700;
}

.region-name .region-symbol {
  font-size: 1rem;
}

.npc {
  font-weight: 700;
  white-space: nowrap;
}

.reward {
  font-weight: 700;
}

.cost {
  color: #5f625f;
}

.limit {
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.86rem;
}

.note {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  max-width: 270px;
}

.learn-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

.learn-btn {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--muted);
  font-size: 0.75rem;
  padding: 4px 8px;
}

.learn-btn.learned {
  color: var(--berry);
  border-color: var(--berry);
  background: var(--berry-2);
}

.empty {
  display: none;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

footer {
  color: var(--muted);
  font-size: 0.78rem;
  padding: 0 0 30px;
  text-align: center;
}

@media (max-width: 760px) {
  .wrap {
    width: min(100% - 18px, 1180px);
  }

  header {
    padding-top: 14px;
  }

  .hero {
    padding: 18px;
    border-radius: 20px;
    flex-direction: column;
  }

  .toolbar {
    position: static;
  }

  .toolbar-top {
    grid-template-columns: 1fr 1fr;
  }

  .toolbar-top .search {
    grid-column: 1 / -1;
  }

  .toolbar-top .btn {
    width: 100%;
  }

  .filter-groups {
    grid-template-columns: 1fr;
  }
}

/* @media (prefers-color-scheme: dark) {
    :root {
        --bg: #171c19;
        --paper: #202722;
        --paper-2: #272f29;
        --text: #edf2ee;
        --muted: #aab4ac;
        --line: #3b463e;
        --berry: #8bc6a3;
        --berry-2: #263c30;
        --gold: #d7b369;
        --gold-2: #3b3222;
        --red: #e19488;
        --red-2: #3e2927;
        --blue: #9cc3dc;
        --blue-2: #283944;
    }

    .cost {
        color: #c7cec9;
    }

    .toolbar {
        background: rgba(32, 39, 34, .94);
    }

    .progress-shell {
        background: #465047;
    }
} */
