/**
 * 节气圈 + 悬浮球（与 circle.html、scripts/circle-page.js、floating-orb.js 对应）
 */

/* —— 轻提示 —— */
.circle-toast {
  position: fixed;
  left: 50%;
  bottom: 5rem;
  transform: translateX(-50%);
  z-index: 120;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  background: rgba(15, 23, 42, 0.88);
  color: #fff;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.circle-toast.is-visible {
  opacity: 1;
}

.circle-flash-ring {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 115;
  box-shadow: inset 0 0 0 0 rgba(22, 93, 255, 0);
}

.circle-flash-ring.is-active {
  animation: circle-flash-inset 0.6s ease-out 1;
}

@keyframes circle-flash-inset {
  0% {
    box-shadow: inset 0 0 0 0 rgba(22, 93, 255, 0);
  }
  40% {
    box-shadow: inset 0 0 0 4px rgba(22, 93, 255, 0.35);
  }
  100% {
    box-shadow: inset 0 0 0 0 rgba(22, 93, 255, 0);
  }
}

.circle-cal-tooltip {
  position: fixed;
  z-index: 130;
  max-width: 16rem;
  padding: 0.5rem 0.65rem;
  font-size: 0.75rem;
  line-height: 1.35;
  border-radius: 0.5rem;
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

/* —— 模态 —— */
.circle-modal {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.circle-modal.hidden {
  display: none;
}

.circle-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}

.circle-modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 28rem;
  padding: 1.25rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
}

.dark .circle-modal-card {
  background: rgba(30, 41, 59, 0.98);
  border-color: rgba(51, 65, 85, 0.9);
}

.circle-wall-lightbox-stage {
  position: relative;
  z-index: 1;
  max-width: min(96vw, 1200px);
  max-height: 90vh;
}

.circle-wall-lightbox-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 9999px;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
}

.circle-wall-lightbox-img,
.circle-wall-lightbox-video {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 0.5rem;
}

/* —— 按钮 / 输入 —— */
.circle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.75rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.circle-btn--ghost {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.35);
  color: rgb(51 65 85);
}

.dark .circle-btn--ghost {
  color: rgb(226 232 240);
  background: rgba(51, 65, 85, 0.45);
  border-color: rgba(71, 85, 105, 0.8);
}

.circle-btn--ghost:hover {
  background: rgba(22, 93, 255, 0.08);
}

.circle-btn--gold {
  background: linear-gradient(
    135deg,
    rgb(var(--site-primary-rgb, 22 163 74) / 0.2) 0%,
    rgb(var(--site-primary-rgb, 22 163 74) / 0.38) 100%
  );
  color: color-mix(in srgb, var(--site-primary, #16a34a) 55%, #0f172a);
  border-color: rgb(var(--site-primary-rgb, 22 163 74) / 0.45);
}

.circle-btn--gold:hover {
  filter: brightness(1.05);
}

.circle-input,
.circle-select {
  border-radius: 0.75rem;
  border: 1px solid rgb(226 232 240);
  padding: 0.45rem 0.65rem;
  font-size: 0.875rem;
  background: rgba(255, 255, 255, 0.95);
  color: rgb(15 23 42);
}

.dark .circle-input,
.dark .circle-select {
  border-color: rgb(51 65 85);
  background: rgba(15, 23, 42, 0.65);
  color: rgb(241 245 249);
}

/* —— 分区 Tab —— */
.circle-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
  padding: 0.25rem;
  border-radius: 9999px;
  background: rgba(148, 163, 184, 0.12);
}

.circle-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  background: transparent;
  color: rgb(100 116 139);
  transition: background 0.2s ease, color 0.2s ease;
}

.circle-tab:hover {
  color: rgb(51 65 85);
  background: rgba(255, 255, 255, 0.5);
}

.dark .circle-tab {
  color: rgb(148 163 184);
}

.circle-tab.is-active {
  background: #fff;
  color: var(--site-primary, #16a34a);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.dark .circle-tab.is-active {
  background: rgb(30 41 59);
  color: rgb(52 211 153);
}

.circle-tab-ico {
  font-size: 1rem;
}

/* —— 面板 —— */
.circle-panel {
  display: none;
}

.circle-panel.is-active {
  display: block;
}

.circle-card {
  padding: 1.25rem;
  border-radius: 1rem;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--site-shadow-soft);
}

.dark .circle-card {
  border-color: rgba(51, 65, 85, 0.75);
  background: rgba(15, 23, 42, 0.45);
}

/* —— 游戏区 —— */
.circle-game-host--daily .circle-game-inner {
  border-color: rgb(var(--site-primary-rgb, 22 163 74) / 0.4);
}

.circle-game-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: rgb(30 41 59);
}

.dark .circle-game-title {
  color: rgb(226 232 240);
}

.circle-match-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 640px) {
  .circle-match-grid {
    grid-template-columns: 1fr;
  }
}

.circle-match-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.circle-lb table {
  width: 100%;
  border-collapse: collapse;
}

.circle-lb th,
.circle-lb td {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  text-align: left;
}

.dark .circle-lb th,
.dark .circle-lb td {
  border-color: rgba(51, 65, 85, 0.75);
}

/* —— 积分排行榜（带外框与行样式） —— */
.circle-lb {
  font-size: 0.875rem;
  line-height: 1.45;
  border-radius: 0.85rem;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: linear-gradient(165deg, rgba(248, 250, 252, 0.98) 0%, rgba(255, 255, 255, 0.92) 50%, rgba(241, 245, 249, 0.88) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 8px 28px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.dark .circle-lb {
  border-color: rgba(71, 85, 105, 0.65);
  background: linear-gradient(165deg, rgba(30, 41, 59, 0.55) 0%, rgba(15, 23, 42, 0.62) 100%);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

.circle-lb-row {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr) 5rem;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.75);
  text-align: left;
}

.dark .circle-lb-row {
  border-bottom-color: rgba(51, 65, 85, 0.65);
}

.circle-lb-row:last-child {
  border-bottom: none;
}

.circle-lb-row--head {
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: none;
  color: rgb(71 85 105);
  background: linear-gradient(180deg, rgba(22, 93, 255, 0.08), rgba(22, 93, 255, 0.02));
  border-bottom: 1px solid rgba(22, 93, 255, 0.15);
}

.dark .circle-lb-row--head {
  color: rgb(203 213 225);
  background: linear-gradient(180deg, rgba(22, 93, 255, 0.18), rgba(22, 93, 255, 0.04));
  border-bottom-color: rgba(96, 165, 250, 0.2);
}

.circle-lb-row:nth-child(even):not(.circle-lb-row--head) {
  background: rgba(248, 250, 252, 0.65);
}

.dark .circle-lb-row:nth-child(even):not(.circle-lb-row--head) {
  background: rgba(15, 23, 42, 0.35);
}

.circle-lb-row--self {
  background: linear-gradient(90deg, rgba(22, 93, 255, 0.1), rgba(22, 93, 255, 0.02)) !important;
  border-left: 3px solid rgb(22, 93, 255);
  padding-left: calc(0.85rem - 3px);
}

.dark .circle-lb-row--self {
  background: linear-gradient(90deg, rgba(96, 165, 250, 0.15), rgba(96, 165, 250, 0.03)) !important;
  border-left-color: rgb(96, 165, 250);
}

.circle-lb-row span:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: rgb(22, 93, 255);
}

.dark .circle-lb-row span:last-child {
  color: rgb(96, 165, 250);
}

.circle-lb-my {
  padding: 0.75rem 0.85rem !important;
  margin: 0 !important;
  border-top: 1px dashed rgba(148, 163, 184, 0.45) !important;
  border-radius: 0 0 0.65rem 0.65rem;
  background: rgba(255, 255, 255, 0.5);
}

.dark .circle-lb-my {
  background: rgba(15, 23, 42, 0.45);
}

/* —— 节气考 · 四选一 / 多选节气名（清明、谷雨等） —— */
.circle-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

@media (min-width: 480px) {
  .circle-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.circle-option-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.85rem;
  padding: 0.65rem 1rem;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.35;
  text-align: center;
  border-radius: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.88));
  color: rgb(30 41 59);
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease,
    border-color 0.15s ease,
    background 0.15s ease;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.dark .circle-option-btn {
  border-color: rgba(71, 85, 105, 0.75);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.75), rgba(15, 23, 42, 0.82));
  color: rgb(241 245 249);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.circle-option-btn:hover {
  border-color: rgba(22, 93, 255, 0.45);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.98), rgba(255, 255, 255, 0.95));
  box-shadow: 0 6px 20px rgba(22, 93, 255, 0.12);
  transform: translateY(-1px);
}

.dark .circle-option-btn:hover {
  border-color: rgba(96, 165, 250, 0.5);
  background: linear-gradient(180deg, rgba(30, 58, 138, 0.45), rgba(15, 23, 42, 0.9));
}

.circle-option-btn:active {
  transform: translateY(0);
}

/* —— 连连看选项 —— */
.circle-match-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 2.6rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  border-radius: 0.65rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(255, 255, 255, 0.85);
  color: rgb(51 65 85);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.dark .circle-match-item {
  border-color: rgba(71, 85, 105, 0.75);
  background: rgba(15, 23, 42, 0.55);
  color: rgb(226 232 240);
}

.circle-match-item:hover {
  border-color: rgba(22, 93, 255, 0.35);
  box-shadow: 0 2px 10px rgba(22, 93, 255, 0.08);
}

.circle-match-item.is-selected {
  border-color: rgba(22, 93, 255, 0.65);
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.95), rgba(255, 255, 255, 0.9));
  box-shadow: 0 0 0 2px rgba(22, 93, 255, 0.15);
}

.dark .circle-match-item.is-selected {
  border-color: rgba(96, 165, 250, 0.55);
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.4), rgba(15, 23, 42, 0.85));
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.12);
}

/* —— 成就徽章网格 —— */
.circle-badges-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

@media (min-width: 520px) {
  .circle-badges-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .circle-badges-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.circle-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.88));
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
  line-height: 1.4;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dark .circle-badge {
  border-color: rgba(71, 85, 105, 0.7);
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.65), rgba(15, 23, 42, 0.72));
}

.circle-badge--off {
  opacity: 0.72;
  filter: saturate(0.85);
}

.circle-badge--on {
  border-color: rgb(var(--site-primary-rgb, 22 163 74) / 0.45);
  background: linear-gradient(
    145deg,
    rgb(var(--site-primary-rgb, 22 163 74) / 0.12),
    rgb(var(--site-primary-rgb, 22 163 74) / 0.04)
  );
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 6px 18px rgb(var(--site-primary-rgb, 22 163 74) / 0.14);
}

.dark .circle-badge--on {
  border-color: rgb(var(--site-primary-rgb, 22 163 74) / 0.4);
  background: linear-gradient(
    145deg,
    rgb(var(--site-primary-rgb, 22 163 74) / 0.18),
    rgba(15, 23, 42, 0.75)
  );
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
}

.circle-badge-title {
  font-weight: 700;
  font-size: 0.8125rem;
  color: rgb(30 41 59);
}

.dark .circle-badge-title {
  color: rgb(248 250 252);
}

.circle-badge--on .circle-badge-title {
  color: color-mix(in srgb, var(--site-primary, #16a34a) 70%, #0f172a);
}

.dark .circle-badge--on .circle-badge-title {
  color: rgb(var(--site-primary-rgb, 22 163 74) / 0.95);
}

.circle-badge-desc {
  font-size: 0.6875rem;
  line-height: 1.45;
  color: rgb(100 116 139);
}

.dark .circle-badge-desc {
  color: rgb(148 163 184);
}

.circle-badge--on .circle-badge-desc {
  color: color-mix(in srgb, var(--site-primary, #16a34a) 55%, rgb(51 65 85));
}

.dark .circle-badge--on .circle-badge-desc {
  color: rgb(var(--site-primary-rgb, 22 163 74) / 0.85);
}

/* —— 岁时记 · 月历（与 circle-page renderCalendar 一致）—— */
.circle-calendar-wrap {
  border-radius: 0.75rem;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.9), rgba(255, 255, 255, 0.65));
  padding: 0.75rem 0.65rem 1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.dark .circle-calendar-wrap {
  border-color: rgba(51, 65, 85, 0.85);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.45), rgba(15, 23, 42, 0.55));
  box-shadow: none;
}

.circle-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: rgb(15 23 42);
}

.dark .circle-cal-head {
  color: rgb(248 250 252);
}

.circle-cal-head .circle-btn {
  min-width: 2.5rem;
  min-height: 2.25rem;
  padding: 0 0.5rem;
  font-size: 1.1rem;
  line-height: 1;
}

.circle-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.3rem;
  margin-bottom: 0.35rem;
  font-size: 0.65rem;
  font-weight: 600;
  text-align: center;
  color: rgb(100 116 139);
  text-transform: none;
}

.dark .circle-cal-weekdays {
  color: rgb(148 163 184);
}

.circle-cal-cells,
.circle-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
}

.circle-cal-cell {
  position: relative;
  min-height: 3.1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0.25rem 0.1rem 0.2rem;
  font-size: 0.65rem;
  line-height: 1.15;
  border-radius: 0.4rem;
  border: 1px solid rgba(226, 232, 240, 0.85);
  background: rgba(255, 255, 255, 0.7);
  cursor: default;
  overflow: hidden;
}

.dark .circle-cal-cell {
  border-color: rgba(51, 65, 85, 0.75);
  background: rgba(15, 23, 42, 0.4);
}

.circle-cal-cell--empty {
  visibility: hidden;
  border-color: transparent;
  background: transparent;
  pointer-events: none;
}

.circle-cal-day {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgb(51 65 85);
}

.dark .circle-cal-day {
  color: rgb(226 232 240);
}

.circle-cal-term {
  display: block;
  width: 100%;
  margin-top: 0.1rem;
  font-size: 0.58rem;
  color: rgb(100 116 139);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.dark .circle-cal-term {
  color: rgb(148 163 184);
}

.circle-cal-cell--today {
  border-color: rgba(22, 93, 255, 0.65);
  box-shadow: 0 0 0 1px rgba(22, 93, 255, 0.25);
  background: rgba(22, 93, 255, 0.1);
}

.dark .circle-cal-cell--today {
  border-color: rgba(96, 165, 250, 0.55);
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.2);
  background: rgba(59, 130, 246, 0.12);
}

.circle-cal-cell--solar {
  border-color: rgba(22, 93, 255, 0.45);
  font-weight: 600;
}

.circle-cal-cell--solar .circle-cal-term {
  color: var(--site-primary, #16a34a);
  font-weight: 600;
}

.dark .circle-cal-cell--solar .circle-cal-term {
  color: rgb(147 197 253);
}

.circle-cal-cell--checked .circle-cal-day {
  color: var(--site-primary, #16a34a);
}

.circle-cal-dot {
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 9999px;
  background: var(--site-primary, #16a34a);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.dark .circle-cal-dot {
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.5);
}

.circle-cal-makeup {
  position: absolute;
  top: 2px;
  right: 2px;
  font-size: 0.55rem;
  line-height: 1;
  padding: 1px 3px;
  border-radius: 3px;
  background: rgb(var(--site-primary-rgb, 22 163 74) / 0.92);
  color: #fff;
  font-weight: 700;
}

.dark .circle-cal-makeup {
  background: rgb(var(--site-primary-rgb, 22 163 74) / 0.9);
}

.circle-cal-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  font-size: 0.7rem;
  color: rgb(100 116 139);
}

.dark .circle-cal-legend {
  border-top-color: rgba(51, 65, 85, 0.75);
  color: rgb(148 163 184);
}

.circle-cal-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.circle-cal-legend .legend-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  flex-shrink: 0;
}

.circle-cal-legend .legend-dot--primary {
  background: var(--site-primary, #16a34a);
}

.circle-cal-legend .legend-ring {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 3px;
  border: 2px solid rgba(22, 93, 255, 0.65);
  background: transparent;
  flex-shrink: 0;
}

.circle-cal-legend .legend-makeup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1rem;
  padding: 0 3px;
  border-radius: 3px;
  font-size: 0.55rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.25;
  background: rgb(var(--site-primary-rgb, 22 163 74) / 0.92);
  color: #fff;
}

/* —— 风物志 / 清谈 —— */
.circle-plaza-hero-card {
  min-height: 12rem;
  border-radius: 1rem;
}

.circle-plaza-petals,
.circle-plaza-ripple {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  opacity: 0.35;
}

.circle-plaza-petals {
  background: radial-gradient(circle at 20% 30%, rgb(var(--site-primary-rgb, 22 163 74) / 0.18), transparent 52%);
}

/* 节气圈：提示横幅（替代固定 amber 黄框，随节气主色变化） */
.circle-season-banner {
  border: 1px solid rgb(var(--site-primary-rgb, 22 163 74) / 0.28);
  background: rgb(var(--site-primary-rgb, 22 163 74) / 0.12);
  color: color-mix(in srgb, var(--site-primary, #16a34a) 65%, #0f172a);
}

.dark .circle-season-banner {
  border-color: rgb(var(--site-primary-rgb, 22 163 74) / 0.28);
  background: rgb(var(--site-primary-rgb, 22 163 74) / 0.12);
  color: rgb(var(--site-primary-rgb, 22 163 74) / 0.95);
}

.circle-plaza-ripple {
  background: radial-gradient(circle at 80% 70%, rgba(22, 93, 255, 0.12), transparent 45%);
}

.circle-handbook-item,
.circle-wall-item {
  padding: 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(226, 232, 240, 0.9);
  margin-bottom: 0.5rem;
  background: rgba(255, 255, 255, 0.5);
}

.dark .circle-handbook-item,
.dark .circle-wall-item {
  border-color: rgba(51, 65, 85, 0.8);
  background: rgba(15, 23, 42, 0.35);
}

/* 社区留言主帖 */
.circle-wall-card {
  padding: 1rem 1.1rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.88));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.75) inset,
    0 6px 20px rgba(15, 23, 42, 0.06);
}

.dark .circle-wall-card {
  border-color: rgba(51, 65, 85, 0.85);
  background: linear-gradient(165deg, rgba(30, 41, 59, 0.55), rgba(15, 23, 42, 0.62));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.circle-wall-head {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}

.circle-wall-body {
  margin: 0;
  line-height: 1.55;
  word-break: break-word;
}

.circle-wall-replies {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px dashed rgba(148, 163, 184, 0.45);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dark .circle-wall-replies {
  border-top-color: rgba(71, 85, 105, 0.55);
}

.circle-wall-actions {
  margin-top: 0.65rem;
}

/* 留言点赞：空心 / 实心红心 */
.circle-wall-like {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.55rem;
  font-size: 0.875rem;
  line-height: 1;
  color: rgb(71 85 105);
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 0.5rem;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.dark .circle-wall-like {
  color: rgb(203 213 225);
  border-color: rgba(71, 85, 105, 0.65);
}

/* 未点赞：空心 + 中性灰（无红色） */
.circle-wall-like:not(.is-liked):hover {
  background: rgba(248, 250, 252, 0.95);
  border-color: rgba(148, 163, 184, 0.55);
}

.dark .circle-wall-like:not(.is-liked):hover {
  background: rgba(51, 65, 85, 0.4);
  border-color: rgba(100, 116, 139, 0.55);
}

.circle-wall-like.is-liked:hover {
  background: rgba(254, 242, 242, 0.75);
  border-color: rgba(239, 68, 68, 0.4);
}

.dark .circle-wall-like.is-liked:hover {
  background: rgba(127, 29, 29, 0.22);
  border-color: rgba(248, 113, 113, 0.4);
}

.circle-wall-like .circle-wall-heart {
  font-size: 1.05rem;
  transition:
    color 0.2s ease,
    transform 0.15s ease;
}

.circle-wall-like:not(.is-liked) .circle-wall-heart {
  color: rgb(148 163 184);
}

.dark .circle-wall-like:not(.is-liked) .circle-wall-heart {
  color: rgb(100 116 139);
}

.circle-wall-like:not(.is-liked):hover .circle-wall-heart {
  color: rgb(100 116 139);
}

.dark .circle-wall-like:not(.is-liked):hover .circle-wall-heart {
  color: rgb(148 163 184);
}

/* 已点赞：实心红心 */
.circle-wall-like.is-liked .circle-wall-heart {
  color: #ef4444;
}

.circle-wall-like.is-liked:hover .circle-wall-heart {
  color: #dc2626;
}

.circle-wall-like-count {
  font-variant-numeric: tabular-nums;
  min-width: 1.25rem;
}

.circle-wall-like:focus-visible {
  outline: 2px solid #ef4444;
  outline-offset: 2px;
}

.circle-wall-reply-line {
  padding: 0.65rem 0.75rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(226, 232, 240, 0.85);
  background: rgba(248, 250, 252, 0.75);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.dark .circle-wall-reply-line {
  border-color: rgba(51, 65, 85, 0.75);
  background: rgba(15, 23, 42, 0.45);
  box-shadow: none;
}

/* —— 海报 / DIY —— */
.circle-poster-grid {
  display: grid;
  gap: 1.25rem;
  align-items: start;
}

@media (min-width: 768px) {
  .circle-poster-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.circle-poster-grid > div {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* 与导出比例一致，三卡同高同宽 */
.circle-poster-tmpl {
  width: 100%;
  max-width: 260px;
  margin: 0 auto;
  aspect-ratio: 375 / 560;
  border-radius: 0.85rem;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.65) inset,
    0 10px 32px rgba(15, 23, 42, 0.1);
}

.dark .circle-poster-tmpl {
  border-color: rgba(51, 65, 85, 0.85);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
}

.circle-poster-tmpl-inner {
  padding: 1rem 1rem 1.1rem;
  min-height: 100%;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.circle-poster-tmpl-inner .circle-poster-qr {
  margin-top: auto;
}

.circle-poster-tmpl--ink .circle-poster-sub {
  margin-top: auto !important;
}

.circle-poster-tmpl--paper .circle-poster-qr,
.circle-poster-tmpl--minimal .circle-poster-qr {
  margin-top: auto !important;
}

.circle-poster-tmpl--ink {
  background:
    radial-gradient(ellipse 130% 90% at 50% -15%, rgba(56, 189, 248, 0.12), transparent 52%),
    radial-gradient(ellipse 80% 60% at 80% 100%, rgba(30, 58, 138, 0.25), transparent 55%),
    linear-gradient(168deg, #1a2334 0%, #0f172a 48%, #0a0f1a 100%);
  color: #e8eef5;
}

.circle-poster-tmpl--paper {
  background:
    radial-gradient(ellipse 100% 80% at 50% 0%, rgba(255, 255, 255, 0.95), transparent 45%),
    linear-gradient(168deg, #fffbeb 0%, #fef3c7 42%, #fde68a 100%);
  color: #78350f;
}

.circle-poster-tmpl--minimal {
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 45%, #e2e8f0 100%);
  color: #0f172a;
}

.circle-poster-seal {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border: 2px solid currentColor;
  border-radius: 0.25rem;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
}

.circle-poster-qr {
  display: inline-block;
  border-radius: 0.35rem;
  background: #fff;
  padding: 2px;
}

.circle-diy-preview-fit {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 0;
}

.circle-diy-scale-wrap {
  position: relative;
  overflow: hidden;
  margin-left: auto;
  margin-right: auto;
  border-radius: 0.55rem;
  box-shadow: 0 10px 36px rgba(15, 23, 42, 0.12);
  flex-shrink: 0;
  width: min(100%, 375px);
  aspect-ratio: 375 / 560;
  height: auto;
}

.dark .circle-diy-scale-wrap {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.circle-diy-poster {
  position: absolute;
  left: 0;
  top: 0;
  width: 375px;
  height: 560px;
  max-width: none;
  margin: 0;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: none;
  transform-origin: top left;
}

.circle-diy-poster--ink {
  background: linear-gradient(165deg, #1e293b, #0f172a);
  color: #e2e8f0;
}

.circle-diy-poster--paper {
  background: linear-gradient(180deg, #fffbeb, #fef3c7);
  color: #78350f;
}

.circle-diy-poster--minimal {
  background: #f1f5f9;
  color: #0f172a;
}

.circle-diy-poster-bg,
.circle-diy-poster-frame,
.circle-diy-deco-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.circle-diy-poster-stage {
  position: relative;
  z-index: 2;
  padding: 1.25rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.circle-diy-seal {
  font-size: 0.75rem;
  padding: 0.2rem 0.4rem;
  border: 2px solid rgba(226, 232, 240, 0.6);
  border-radius: 0.2rem;
}

.circle-diy-poster-term {
  font-size: 1.75rem;
  font-weight: 800;
  margin: 0.5rem 0;
}

.circle-diy-poster-msg {
  font-size: 0.95rem;
  line-height: 1.5;
  opacity: 0.95;
}

.circle-diy-meta {
  font-size: 0.7rem;
  opacity: 0.8;
  margin-top: 0.5rem;
}

.circle-diy-qr-block {
  margin-top: auto;
}

.circle-diy-sub {
  font-size: 0.65rem;
  opacity: 0.85;
  margin-bottom: 0.25rem;
}

.circle-diy-qr {
  border-radius: 0.25rem;
  background: #fff;
  padding: 2px;
}

.circle-diy-sun,
.circle-diy-moon {
  position: absolute;
  z-index: 3;
  font-size: 1.5rem;
  cursor: move;
  user-select: none;
}

.circle-diy-user-stickers {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.circle-diy-user-sticker {
  position: absolute;
  pointer-events: auto;
  cursor: move;
}

.circle-diy-user-sticker.is-dragging {
  opacity: 0.85;
  z-index: 50;
}

.circle-diy-sticker-pick {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  font-size: 0.75rem;
}

.circle-diy-zoom-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.circle-diy-zoom-modal.hidden {
  display: none;
}

.circle-diy-zoom-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.circle-diy-zoom-dialog {
  position: relative;
  z-index: 1;
  max-width: 95vw;
  max-height: 95vh;
  padding: 2rem 1rem 1rem;
  border-radius: 0.75rem;
  background: #0f172a;
}

.circle-diy-zoom-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 1.75rem;
  cursor: pointer;
}

.circle-diy-poster--zoom {
  max-width: 90vw !important;
  max-height: 85vh !important;
  width: auto !important;
  height: auto !important;
}

/* —— 岁时记 · 打卡记录 —— */
.circle-checkin-history {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.circle-checkin-history-empty {
  padding: 0.75rem 0;
  line-height: 1.5;
}

.circle-checkin-history-item {
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(248, 250, 252, 0.95));
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.dark .circle-checkin-history-item {
  border-color: rgba(51, 65, 85, 0.85);
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.5), rgba(15, 23, 42, 0.62));
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
}

.circle-checkin-history-img {
  border-radius: 0.5rem;
  overflow: hidden;
}

.circle-checkin-history-thumb {
  display: block;
  max-width: 100%;
  max-height: 220px;
  border-radius: 0.5rem;
  object-fit: contain;
  border: 1px solid rgba(226, 232, 240, 0.85);
  background: rgba(248, 250, 252, 0.5);
}

.dark .circle-checkin-history-thumb {
  border-color: rgba(51, 65, 85, 0.75);
  background: rgba(15, 23, 42, 0.35);
}

#circle-checkin-submit[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
}
