body:not(.admin-view) #dashboard .credits-entry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-color: #285f56;
  color: #fffaf0;
  background: #285f56;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
body:not(.admin-view) #dashboard .credits-entry:hover { border-color: #1c4942; color: #fffaf0; background: #1c4942; }
body:not(.admin-view) #dashboard .credits-entry:focus-visible { outline: 2px solid #285f56; outline-offset: 3px; }

.credits-page { --credits-heading-size: 18px; --credits-action-width: 272px; --credits-action-height: 42px; --credits-panel-bottom: 22px; margin: 0; min-height: 100vh; }
.credits-page * { box-sizing: border-box; }
.credits-page ::selection { color: #163f38; background: #cae0d2; }
.credits-page a { color: inherit; text-underline-offset: 4px; }
.credits-page a:focus-visible, .credits-page button:focus-visible { outline: 2px solid #285f56; outline-offset: 4px; }
.credits-page [hidden] { display: none !important; }
.credits-topbar { min-height: 56px; padding: 10px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--border); background: #f8f4ea; }
.credits-brand { display: inline-flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 900; letter-spacing: -.02em; text-decoration: none; }
.credits-brand-mark { width: 32px; height: 32px; border-radius: 7px; background: url('/assets/logo-ji.png') center / cover no-repeat; }
.credits-topbar nav { display: flex; align-items: center; gap: 18px; font-size: 13px; }
.credits-topbar nav a { text-decoration: none; }
.credits-topbar nav a:hover { text-decoration: underline; }
.credits-topbar .credits-membership { padding: 7px 12px; border-radius: 2px; color: #fff9ef; background: var(--accent); }
.credits-wrap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; max-width: 1280px; margin: 0 auto; padding: 0 28px 48px; }
.invite-panel { grid-column: 3; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; min-width: 0; min-height: 312px; padding: 22px 22px var(--credits-panel-bottom); border: 1px solid #becbbd; border-radius: 3px; background: #e8eee3; }
.invite-introduction h2 { margin: 0 0 18px; color: #244f43; font-size: var(--credits-heading-size); font-weight: 800; line-height: 1.4; }
.invite-introduction p { max-width: 46ch; margin: 0; color: #3f594c; font-size: 14px; line-height: 1.9; }
.invite-introduction .invite-note { margin-top: 12px; color: #526350; font-size: 12px; line-height: 1.7; }
.invite-action { display: flex; flex-direction: column; justify-content: flex-end; min-height: calc(var(--credits-action-height) + 32px); align-self: center; width: 100%; max-width: var(--credits-action-width); min-width: 0; text-align: center; }
.invite-action .feedback-message { order: -1; min-height: 0; margin: 0 0 8px; }
.invite-action .feedback-message:empty { display: none; }
.invite-action .history-text-button { order: -1; margin: 0 0 8px; }
.invite-copy:disabled { opacity: .6; cursor: wait; }
.credits-more { grid-column: 1 / -1; text-align: right; }
.other-rewards-open { padding: 8px 0; border: 0; color: #285f56; background: transparent; font: inherit; font-size: 14px; text-decoration: underline; text-underline-offset: 5px; cursor: pointer; }
#other-rewards-modal { width: min(460px, calc(100vw - 36px)); }
.other-reward-list { display: grid; padding: 0 20px; }
.reward-task { display: flex; align-items: center; gap: 14px; min-width: 0; min-height: 72px; padding: 20px 0; border: 0; color: var(--text); background: transparent; font: inherit; text-align: left; cursor: pointer; }
.reward-task + .reward-task { border-top: 1px solid var(--border); }
.reward-task::after { content: ''; flex: none; width: 7px; height: 7px; margin-right: 3px; border: solid #285f56; border-width: 1px 1px 0 0; transform: rotate(45deg); transition: transform .16s ease; }
.reward-task-title { display: block; flex: 1; min-width: 0; font-size: 16px; font-weight: 700; line-height: 1.5; }
.reward-task:hover .reward-task-title { color: #285f56; }
.reward-task:hover::after { transform: translateX(2px) rotate(45deg); }
.reward-task:focus-visible { outline-offset: -3px; }
@media (max-width: 440px) {
  .other-reward-list { padding-inline: 16px; }
  .reward-task { gap: 10px; }
}
.reward-claimed-badge { flex: none; padding: 2px 6px; border: 1px solid #b98b58; border-radius: 2px; color: #8b5a2b; font-size: 11px; }
.credits-page .hidden { display: none; }
.reward-modal { width: min(620px, calc(100vw - 36px)); max-height: 88dvh; padding: 0; overflow: auto; border: 1px solid var(--border-strong); border-radius: 3px; color: var(--text); background: var(--card-bg); font: inherit; box-shadow: 0 24px 80px rgb(53 38 30 / 25%); }
.reward-modal::backdrop { background: rgb(37 33 27 / 40%); }
.reward-modal .modal-card { min-width: 0; }
.reward-modal .modal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.reward-modal .modal-head h2 { margin: 0; font-size: var(--credits-heading-size); font-weight: 800; }
.reward-modal .modal-close { flex: none; padding: 0 4px; border: 0; color: var(--text-muted); background: transparent; font: inherit; font-size: 25px; line-height: 1; cursor: pointer; }
.feedback-reward-body { padding: 20px; }
.review-reward-intro { margin: 0 0 16px; font-size: 14px; line-height: 1.8; }
.store-review-row { margin-bottom: 14px; }
.store-review-link { display: block; padding: 12px; border: 1px solid var(--border-strong); border-radius: 2px; color: #285f56; font-size: 14px; font-weight: 700; text-align: center; text-decoration: none; }
.store-review-link:hover { border-color: #285f56; background: #edf1e7; }
.feedback-message { min-height: 22px; margin: 0 0 10px; font-size: 13px; line-height: 1.7; white-space: pre-line; overflow-wrap: anywhere; }
.feedback-message.error { color: #a13d29; }
.feedback-message.ok { color: #285f56; }
.feedback-message.waiting { color: var(--text-muted); }
.feedback-reward-form, .xiaohongshu-form { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.feedback-reward-form .feedback-message, .xiaohongshu-form > :not(button) { width: 100%; margin: 0; }
.feedback-submit { flex: none; min-height: 40px; padding: 10px 18px; border: 1px solid #285f56; border-radius: 2px; color: #fffaf0; background: #285f56; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.feedback-submit:disabled { opacity: .55; cursor: not-allowed; }
.xiaohongshu-label { color: var(--text-muted); font-size: 13px; }
.xiaohongshu-input { min-width: 0; padding: 11px 12px; border: 1px solid var(--border-strong); border-radius: 2px; color: var(--text); background: transparent; font: inherit; font-size: 14px; }
.check-in-panel { display: flex; flex-direction: column; grid-column: 2; grid-row: auto; min-width: 0; min-height: 312px; padding: 18px 22px var(--credits-panel-bottom); border: 1px solid var(--border-strong); border-radius: 3px; background: var(--card-bg); }
.check-in-heading { display: flex; flex-wrap: nowrap; align-items: center; gap: 10px; min-height: 44px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.check-in-heading h2 { flex: 0 0 auto; white-space: nowrap; margin: 0; font-size: var(--credits-heading-size); font-weight: 800; }
.check-in-heading-actions { display: flex; flex: 0 0 auto; align-items: center; justify-content: flex-end; margin-left: auto; white-space: nowrap; gap: 10px; }
.check-in-heading-actions button { padding: 5px 9px; border: 1px solid var(--border-strong); border-radius: 3px; color: #285f56; background: transparent; font: inherit; font-size: 12px; line-height: 1.5; white-space: nowrap; cursor: pointer; }
.check-in-heading-actions button:hover:enabled, .check-in-heading-actions button[aria-expanded="true"] { border-color: #285f56; background: #e2e9df; }
.check-in-heading-actions button:disabled { color: #696052; cursor: default; }
.check-in-heading time { color: #696052; font-family: 'Microsoft YaHei', sans-serif; font-size: 13px; font-variant-numeric: tabular-nums; }
.check-in-content { display: grid; flex: 1; grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr auto; gap: 24px; align-items: center; padding: 20px 0 0; text-align: center; }
.check-in-reward p { display: none; margin: 0; color: #696052; font-size: 14px; line-height: 1.7; }
.check-in-reward > div { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; margin: 0; color: #285f56; }
.check-in-reward strong { font-size: 52px; line-height: 1.15; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.check-in-reward span { font-size: 15px; font-weight: 700; white-space: nowrap; }
.check-in-action { display: flex; flex-direction: column; justify-content: flex-end; min-height: calc(var(--credits-action-height) + 32px); width: 100%; max-width: var(--credits-action-width); justify-self: center; text-align: center; }
#check-in-button, #check-in-login, .invite-action .invite-copy { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 100%; height: var(--credits-action-height); min-height: var(--credits-action-height); padding: 10px 12px; border: 1px solid #285f56; border-radius: 3px; background: #285f56; color: #fffaf0; font-family: inherit; font-size: 14px; font-weight: 700; line-height: 1.4; text-decoration: none; cursor: pointer; }
#check-in-button:hover:enabled, #check-in-login:hover, .invite-action .invite-copy:hover:enabled, .invite-action a.invite-copy:hover { background: #1c4942; border-color: #1c4942; }
#check-in-button:disabled { border-color: #b8c9bf; color: #395e52; background: #e2e9df; cursor: default; }
#check-in-button.is-unavailable:disabled { border-color: #c7cac6; color: #5b615c; background: #e2e4e1; }
#check-in-button[aria-busy="true"] { cursor: wait; }
#check-in-status { order: -1; min-height: 0; margin: 0 0 8px; color: #696052; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
#check-in-status:empty { display: none; }
#check-in-status.is-error { color: #a13d29; }
#check-in-status.is-success { color: #285f56; }
#check-in-retry { order: -1; padding: 5px; border: 0; color: #285f56; background: transparent; font-family: inherit; font-size: 13px; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.check-in-history { width: min(640px, calc(100% - 32px)); max-height: min(80dvh, 780px); padding: 24px; border: 1px solid var(--border-strong); border-radius: 3px; background: var(--card-bg); color: var(--text); overscroll-behavior: contain; scrollbar-color: #a49a86 var(--card-bg); }
.check-in-history::backdrop { background: rgb(33 38 30 / 40%); }
.check-in-history-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.check-in-history-heading button { padding: 6px 10px; border: 1px solid var(--border-strong); border-radius: 3px; background: transparent; color: #285f56; font: inherit; font-size: 13px; cursor: pointer; }
.check-in-history-heading h2 { margin: 0; }
.check-in-history h2 { margin: 0 0 14px; font-size: var(--credits-heading-size); font-weight: 800; }
#check-in-history-status { margin: 0; color: #696052; font-size: 13px; line-height: 1.7; }
#check-in-history-status.is-error { color: #a13d29; }
.check-in-history-list { margin: 0; padding: 0; list-style: none; }
.check-in-history-list li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.check-in-history-list time { font-size: 14px; font-variant-numeric: tabular-nums; }
.check-in-history-note { display: block; margin-top: 5px; color: #696052; font-size: 12px; line-height: 1.7; }
.check-in-history-amount { color: #285f56; font-size: 15px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.check-in-history-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 18px; color: #696052; font-size: 13px; }
.check-in-history-pagination button { padding: 6px 10px; border: 1px solid var(--border-strong); border-radius: 3px; color: #285f56; background: var(--card-bg); font: inherit; cursor: pointer; }
.check-in-history-pagination button:hover:enabled { border-color: #285f56; }
.check-in-history-pagination button:disabled { color: #696052; opacity: .65; cursor: default; }
.history-text-button { margin-top: 8px; padding: 5px 0; border: 0; color: #285f56; background: transparent; font: inherit; font-size: 13px; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
@media (max-width: 1200px) {
  .check-in-heading, .check-in-heading-actions { gap: 8px; }
  .check-in-heading time { font-size: 11px; }
  .check-in-heading-actions button { padding-inline: 6px; font-size: 11px; }
}
@media (max-width: 1050px) {
  .check-in-heading, .fortune-heading { gap: 8px; }
  .check-in-heading-actions { gap: 8px; }
  .check-in-heading-actions button { padding-inline: 6px; font-size: 11px; }
  .check-in-heading time { font-size: 12px; }
}
@media (max-width: 1050px) {
  .credits-wrap { display: flex; flex-direction: column; }
  .invite-action, .check-in-action { min-height: 0; }
  .invite-panel { min-height: 0; gap: 22px; padding: 24px 24px var(--credits-panel-bottom); }
  .invite-action .invite-copy { white-space: nowrap; }
  .check-in-panel { min-height: 300px; }
}
@media (max-width: 560px) {
  .credits-topbar { padding: 10px 14px; flex-wrap: wrap; }
  .credits-topbar nav { margin-left: auto; gap: 12px; font-size: 12px; }
  .credits-wrap { padding: 0 18px 36px; }
  .invite-panel { padding: 22px 22px var(--credits-panel-bottom); }
  .check-in-panel { padding: 19px 22px var(--credits-panel-bottom); }
  .check-in-heading, .fortune-heading { gap: 6px; }
  .check-in-heading-actions { gap: 6px; }
  .check-in-heading time { font-size: 11px; }
  .check-in-history { padding: 20px; }
  .check-in-history-list li { gap: 12px; }
  .check-in-history-amount { max-width: 44%; }
  .check-in-content { gap: 12px; padding-top: 16px; }
  .check-in-reward strong { font-size: 40.8px; }
  .check-in-reward > div { flex-direction: column; align-items: center; gap: 5px; }
}

.sign-in-result-dialog {
  --fortune-muted: #726652;
  --fortune-red: #a84630;
  width: min(400px, calc(100vw - 36px));
}
.sign-in-result-body { padding: 28px 24px 32px; text-align: center; }
.sign-in-result-dialog .fortune-result h3, #daily-result-reward { margin: 0; color: #285f56; font-size: 27px; line-height: 1.5; }
.sign-in-result-dialog .fortune-result-meta { margin-bottom: 14px; }
.sign-in-result-dialog #fortune-result-note { margin-top: 12px; }
