:root {
  color-scheme: light;
  --rust: #b85c38;
  --rust-deep: #8f4322;
  --rust-light: #c97958;
  --rust-pale: #f0dcd0;
  --forest: #4b5e4b;
  --forest-pale: #d6ded4;
  --stone: #8c7d68;
  --sand: #c9b690;
  --sand-pale: #e8dfc8;
  --ink: #1c1917;
  --ink-body: #2b2622;
  --ink-mute: #5e5852;
  --ink-fade: #8c857c;
  --ink-ghost: #bfb6a8;
  --page: #f7f4ec;
  --surface: #efebde;
  --card: rgba(255, 255, 255, 0.9);
  --card-solid: #ffffff;
  --card-soft: #fffbf5;
  --card-alt: #faf7ee;
  --line: #ece5d6;
  --line-strong: #ddd3c1;
  --success: #2f7d50;
  --success-pale: #dce9e1;
  --pending: #8a4d00;
  --pending-line: #dfb66a;
  --pending-pale: #fff2d6;
  --error: #c94832;
  --shadow:
    0 2px 12px rgba(28, 25, 23, 0.04),
    0 14px 36px rgba(28, 25, 23, 0.035);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 88% 5%, rgba(240, 220, 208, 0.72), transparent 23rem),
    var(--page);
  color: var(--ink);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC",
    "PingFang TC", sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.55;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(184, 92, 56, 0.36);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--card-solid);
  font-weight: 800;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(236, 229, 214, 0.88);
  background: rgba(247, 244, 236, 0.86);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.site-header-inner {
  display: flex;
  width: min(1040px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.brand img {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  object-fit: contain;
}

.brand-copy {
  display: grid;
  line-height: 1.2;
}

.brand-copy strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand-copy small {
  margin-top: 3px;
  color: var(--ink-fade);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.header-status,
.live-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.header-status {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--forest);
  font-size: 14px;
  font-weight: 800;
}

.header-status i,
.live-label i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(47, 125, 80, 0.1);
}

.app-shell,
footer {
  width: min(1040px, calc(100% - 32px));
  margin-right: auto;
  margin-left: auto;
}

.app-shell {
  padding-top: 24px;
}

.hero {
  position: relative;
  display: flex;
  min-height: 390px;
  align-items: center;
  overflow: hidden;
  padding: clamp(32px, 7vw, 64px);
  border: 1px solid rgba(221, 211, 193, 0.9);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(250, 247, 238, 0.86)),
    var(--card-alt);
  box-shadow: var(--shadow);
}

.hero::before {
  position: absolute;
  top: -76px;
  right: -54px;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: var(--rust-pale);
  box-shadow:
    -72px 150px 0 -55px var(--sand-pale),
    -232px -10px 0 -88px var(--forest-pale);
  content: "";
}

.hero::after {
  position: absolute;
  right: 36px;
  bottom: 34px;
  width: 74px;
  height: 8px;
  border-radius: 999px;
  background: var(--rust);
  content: "";
  opacity: 0.86;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.section-label {
  margin: 0 0 8px;
  color: var(--rust-deep);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.11em;
}

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

h1 {
  max-width: 670px;
  margin-bottom: 18px;
  color: var(--ink);
  font-size: clamp(34px, 6vw, 58px);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 1.08;
}

h1 span {
  color: var(--rust-deep);
}

.hero-lead {
  max-width: 600px;
  margin-bottom: 22px;
  color: var(--ink-mute);
  font-size: 16px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-chip {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink-mute);
  font-size: 15px;
  font-weight: 800;
}

.live-label {
  color: var(--forest);
}

.summary-shell {
  margin-top: 20px;
  padding: clamp(22px, 4vw, 32px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.summary-heading,
.section-heading {
  display: flex;
  gap: 24px;
  align-items: end;
  justify-content: space-between;
}

.summary-heading h2,
.section-heading h2 {
  margin-bottom: 0;
  color: var(--ink);
  font-size: clamp(22px, 4vw, 28px);
  letter-spacing: -0.035em;
  line-height: 1.25;
}

.refresh-panel {
  flex: 0 0 auto;
  text-align: right;
}

.refresh-panel p {
  margin-bottom: 7px;
  color: var(--ink-fade);
  font-size: 14px;
}

.refresh-panel button,
.error-state button {
  min-height: 44px;
  padding: 10px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--card-solid);
  color: var(--rust-deep);
  font-size: 17px;
  font-weight: 900;
}

.refresh-panel button:hover,
.error-state button:hover {
  border-color: var(--rust-light);
  background: var(--rust-pale);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0 0;
}

.summary-grid > div {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card-alt);
}

.summary-grid dt {
  color: var(--ink-fade);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.4;
}

.summary-grid dd {
  display: flex;
  gap: 6px;
  align-items: baseline;
  margin: 5px 0 0;
}

.summary-grid strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: clamp(34px, 5vw, 46px);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.summary-grid dd span {
  color: var(--ink-mute);
  font-size: 17px;
  font-weight: 800;
}

.partners-section {
  padding: 64px 0 76px;
}

.section-heading {
  margin-bottom: 20px;
}

.partner-search-panel {
  margin-bottom: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.partner-search-panel label {
  display: block;
  margin-bottom: 9px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
}

.partner-search-field {
  position: relative;
}

.partner-search-field input {
  width: 100%;
  min-height: 58px;
  padding: 13px 86px 13px 17px;
  border: 2px solid var(--line-strong);
  border-radius: 14px;
  appearance: none;
  background: var(--card-solid);
  color: var(--ink);
  font: inherit;
  font-size: 18px;
  font-weight: 750;
}

.partner-search-field input::placeholder {
  color: var(--ink-fade);
  opacity: 1;
}

.partner-search-field input:focus {
  border-color: var(--rust-light);
}

.partner-search-field input::-webkit-search-cancel-button {
  display: none;
}

.partner-search-field button {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 64px;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--rust-pale);
  color: var(--rust-deep);
  font-size: 16px;
  font-weight: 900;
}

.participation-note {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 5px;
  margin: 12px 0 0;
  color: var(--forest);
  font-size: 16px;
  font-weight: 800;
}

.participation-note span {
  color: var(--sand);
}

.search-result-count {
  margin: 8px 0 0;
  color: var(--ink-mute);
  font-size: 16px;
  font-weight: 800;
}

.partner-list {
  display: grid;
  gap: 14px;
}

.partner-card {
  display: grid;
  grid-template-columns: 144px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  overflow: hidden;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.partner-media {
  width: 144px;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 16px;
  background: var(--card-alt);
}

.partner-photo,
.partner-photo-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
}

.partner-photo {
  object-fit: cover;
}

.partner-photo-placeholder {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  padding: 12px;
  background:
    radial-gradient(circle at 25% 25%, var(--rust-pale), transparent 44%),
    linear-gradient(145deg, var(--sand-pale), var(--card-alt));
  color: var(--rust-deep);
  text-align: center;
}

.partner-photo-placeholder-title {
  font-size: 15px;
  font-weight: 900;
  line-height: 1.25;
}

.partner-photo-placeholder-copy {
  color: var(--ink-mute);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.partner-body {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 2px 4px 2px 0;
}

.partner-body h3 {
  margin-bottom: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.25;
}

.offer-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.offer-list li {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  align-items: start;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-soft);
}

.offer-list li.offer-pending {
  border-color: var(--pending-line);
  background: var(--pending-pale);
}

.offer-pending .offer-name {
  color: var(--pending);
}

.offer-name {
  overflow-wrap: anywhere;
  color: var(--ink-body);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.45;
}

.offer-meta {
  color: var(--ink-mute);
  font-size: 16px;
  font-weight: 800;
  text-align: left;
  white-space: normal;
}

.offer-meta-pending {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-self: start;
  padding: 4px 11px;
  border: 1px solid var(--pending-line);
  border-radius: 999px;
  background: var(--card-solid);
  color: var(--pending);
  font-size: 16px;
  line-height: 1.4;
}

.partner-total {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: baseline;
  padding: 1px 2px 0;
}

.partner-total span {
  color: var(--ink-fade);
  font-size: 15px;
  font-weight: 800;
}

.partner-total strong {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink-body);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

.page-status,
.empty-state,
.search-empty-state,
.error-state {
  border: 1px dashed var(--line-strong);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.56);
}

.search-empty-state {
  display: flex;
  min-height: 174px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
}

.search-empty-state h3 {
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 22px;
}

.search-empty-state p {
  margin-bottom: 0;
  color: var(--ink-mute);
  font-size: 17px;
}

.search-empty-state p strong {
  color: var(--rust-deep);
}

.join-campaign-button {
  display: inline-flex;
  min-height: 50px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 13px;
  background: var(--rust-deep);
  color: var(--card-solid);
  font-size: 17px;
  font-weight: 900;
}

.join-campaign-button:hover {
  background: var(--rust);
}

.page-status {
  display: flex;
  min-height: 174px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  color: var(--ink-mute);
}

.page-status strong,
.page-status small {
  display: block;
}

.page-status strong {
  color: var(--ink);
  font-size: 17px;
}

.page-status small {
  margin-top: 3px;
  color: var(--ink-fade);
  font-size: 15px;
}

.loading-mark {
  width: 30px;
  height: 30px;
  border: 3px solid var(--rust-pale);
  border-top-color: var(--rust);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.empty-state {
  display: flex;
  min-height: 204px;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 32px;
  text-align: left;
}

.empty-mark {
  display: grid;
  width: 78px;
  height: 78px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 28px;
  background: var(--rust-pale);
  color: var(--rust-deep);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  transform: rotate(-4deg);
}

.empty-state h3,
.error-state h3 {
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 18px;
}

.empty-state p,
.error-state p {
  margin-bottom: 0;
  color: var(--ink-fade);
  font-size: 12px;
}

.empty-state .section-label {
  margin-bottom: 5px;
}

.error-state {
  padding: 36px;
  text-align: center;
}

.error-mark {
  display: grid;
  width: 42px;
  height: 42px;
  margin: 0 auto 14px;
  place-items: center;
  border-radius: 50%;
  background: rgba(201, 72, 50, 0.12);
  color: var(--error);
  font-weight: 950;
}

.error-state button {
  margin-top: 16px;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--ink-fade);
  font-size: 10px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.footer-brand strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.footer-brand p,
footer > p {
  margin: 1px 0 0;
}

.noscript {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 100;
  padding: 14px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--card-solid);
  text-align: center;
}

[hidden] {
  display: none !important;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 820px) {
  .hero {
    min-height: 0;
  }

  .hero::after {
    display: none;
  }

  .partner-card {
    grid-template-columns: 124px minmax(0, 1fr);
  }

  .partner-media {
    width: 124px;
  }

}

@media (max-width: 620px) {
  .site-header-inner,
  .app-shell,
  footer {
    width: min(100% - 24px, 1040px);
  }

  .site-header-inner {
    min-height: 64px;
  }

  .brand img {
    width: 38px;
    height: 38px;
  }

  .header-status {
    padding: 6px 9px;
    font-size: 14px;
  }

  .app-shell {
    padding-top: 12px;
  }

  .hero {
    padding: 28px 22px;
    border-radius: 22px;
  }

  .hero::before {
    top: -102px;
    right: -104px;
  }

  h1 {
    font-size: clamp(32px, 10vw, 44px);
  }

  .summary-shell {
    padding: 20px 16px;
    border-radius: 18px;
  }

  .summary-heading,
  .section-heading {
    display: grid;
    gap: 16px;
    align-items: start;
  }

  .refresh-panel {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    text-align: left;
  }

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

  .summary-grid > div:last-child {
    grid-column: 1 / -1;
  }

  .refresh-panel p {
    margin: 0;
  }

  .partners-section {
    padding: 48px 0 58px;
  }

  .partner-search-panel {
    padding: 16px;
  }

  .partner-search-field input {
    min-height: 56px;
  }

  .search-empty-state {
    display: grid;
    gap: 18px;
    padding: 24px 18px;
  }

  .join-campaign-button {
    width: 100%;
  }

  .partner-card {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 14px;
    padding: 12px;
    border-radius: 18px;
  }

  .partner-media {
    width: 104px;
  }

  .partner-photo-placeholder {
    gap: 4px;
    padding: 8px;
  }

  .partner-photo-placeholder-title {
    font-size: 13px;
  }

  .partner-photo-placeholder-copy {
    font-size: 11px;
  }

  .partner-body {
    gap: 7px;
    padding: 0;
  }

  .partner-body h3 {
    font-size: 20px;
  }

  .offer-list li {
    padding: 9px 11px;
  }

  .offer-name {
    font-size: 18px;
  }

  .offer-meta {
    font-size: 16px;
  }

  .empty-state {
    min-height: 190px;
    justify-content: flex-start;
    gap: 16px;
    padding: 24px 18px;
  }

  .empty-mark {
    width: 60px;
    height: 60px;
    border-radius: 20px;
    font-size: 10px;
  }

  footer {
    align-items: flex-start;
    gap: 20px;
  }

  footer > p {
    max-width: 120px;
    text-align: right;
  }
}

@media (max-width: 420px) {
  .brand-copy small {
    display: none;
  }

  .hero-meta {
    display: grid;
  }

  .partner-card {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .partner-media {
    width: 92px;
  }

  .partner-photo-placeholder {
    padding: 6px;
  }

  .partner-photo-placeholder-title {
    font-size: 12px;
  }

  .partner-photo-placeholder-copy {
    font-size: 10px;
  }

  .offer-meta {
    line-height: 1.45;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .loading-mark {
    animation-duration: 2s;
  }
}
