:root {
  --bg-deep: #0a0b0f;
  --bg-card: rgba(22, 24, 32, 0.72);
  --bg-card-solid: #14161e;
  --border: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(196, 168, 120, 0.35);
  --text: #e8e6e1;
  --text-muted: #8b8793;
  --text-soft: #b5b0a8;
  --gold: #c4a878;
  --gold-bright: #e0c99a;
  --gold-dim: rgba(196, 168, 120, 0.15);
  --accent: #7a9e8e;
  --danger: #c47878;
  --radius: 20px;
  --radius-sm: 12px;
  --font-serif: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --font-sans: "DM Sans", "Noto Sans SC", system-ui, sans-serif;
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100dvh;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg-deep);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Ambient background */
.bg-ambience {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(196, 168, 120, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 90% 80%, rgba(122, 158, 142, 0.08), transparent),
    radial-gradient(ellipse 50% 30% at 10% 60%, rgba(100, 110, 160, 0.06), transparent),
    var(--bg-deep);
}

.bg-ambience::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.4;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

/* Header */
.site-header {
  text-align: center;
  margin-bottom: 2.75rem;
  animation: fadeUp 0.8s ease both;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border-glow);
  background: var(--gold-dim);
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
  letter-spacing: 0.05em;
}

.site-header h1 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  letter-spacing: 0.12em;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.site-header .subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: center;
  margin-top: 1.25rem;
  font-size: 0.8rem;
  color: var(--text-soft);
}

.meta-row span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.meta-row .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.7;
}

/* Cards */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  animation: fadeUp 0.8s ease both;
}

.card:nth-child(2) { animation-delay: 0.08s; }
.card:nth-child(3) { animation-delay: 0.16s; }
.card:nth-child(4) { animation-delay: 0.24s; }

/* Identity */
.identity {
  text-align: center;
}

.identity .label {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.identity .flower-name {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--gold-bright);
  letter-spacing: 0.18em;
  font-weight: 500;
}

.identity .hint {
  margin-top: 0.65rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Check-in button */
.checkin-panel {
  text-align: center;
}

.checkin-btn {
  appearance: none;
  border: none;
  cursor: pointer;
  width: 100%;
  max-width: 280px;
  padding: 1.1rem 2rem;
  border-radius: 999px;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  letter-spacing: 0.25em;
  color: #1a1610;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1) inset,
    0 12px 40px rgba(196, 168, 120, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  position: relative;
  overflow: hidden;
}

.checkin-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.15) inset,
    0 16px 48px rgba(196, 168, 120, 0.45);
}

.checkin-btn:active:not(:disabled) {
  transform: translateY(0);
}

.checkin-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  background: linear-gradient(135deg, #6a655c, #4a4740);
  color: #c8c4bc;
  box-shadow: none;
  letter-spacing: 0.15em;
}

.checkin-btn.loading {
  pointer-events: none;
  opacity: 0.75;
}

.checkin-status {
  margin-top: 1rem;
  min-height: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-soft);
}

.checkin-status.ok {
  color: var(--accent);
}

.checkin-status.warn {
  color: var(--gold);
}

.checkin-status.err {
  color: var(--danger);
}

/* Quote card */
.quote-card {
  display: none;
}

.quote-card.visible {
  display: block;
  animation: fadeUp 0.6s ease both;
}

.quote-card .quote-label {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  text-align: center;
}

.quote-zh {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  line-height: 1.85;
  text-align: center;
  color: var(--text);
  margin-bottom: 1rem;
}

.quote-en {
  font-size: 0.9rem;
  line-height: 1.7;
  text-align: center;
  color: var(--text-soft);
  font-style: italic;
  margin-bottom: 1rem;
}

.quote-author {
  text-align: center;
  font-size: 0.8rem;
  color: var(--gold);
  letter-spacing: 0.1em;
}

.quote-author::before {
  content: "— ";
}

/* Feed */
.feed-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 1rem;
}

.feed-header h2 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.15em;
}

.feed-header .count {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.feed-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.feed-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0.5rem;
  border-bottom: 1px solid var(--border);
  animation: fadeUp 0.4s ease both;
}

.feed-item:last-child {
  border-bottom: none;
}

.feed-item .name {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  color: var(--text);
}

.feed-item .time {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.feed-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Footer */
.site-footer {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  animation: fadeUp 0.8s ease 0.3s both;
}

.site-footer p + p {
  margin-top: 0.35rem;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  .wrap {
    padding: 1.75rem 1rem 3rem;
  }
  .card {
    padding: 1.4rem 1.15rem;
  }
  .quote-zh {
    font-size: 1.05rem;
  }
}
