:root {
  --checkin-green: #55ff00;
  --checkin-green-2: #00f566;
  --checkin-panel: #171717;
  --checkin-card: #050505;
  --checkin-text: #f4f4f4;
  --checkin-muted: #8a8a8a;
  --checkin-gold: #f0a83a;
}

.checkin-lock {
  overflow: hidden !important;
}

.checkin-activity-rail {
  position: fixed;
  left: var(--checkin-rail-left, 12px);
  top: var(--checkin-rail-top, 108px);
  z-index: 3200;
  display: none;
  width: var(--checkin-rail-width, 118px);
  max-width: calc(100vw - 16px);
  gap: 10px;
  flex-direction: column;
  pointer-events: auto;
}

body.checkin-route-activity .checkin-activity-rail {
  display: flex;
}

.checkin-activity-rail.is-attached {
  position: absolute;
  z-index: 25;
  max-width: none;
}

.checkin-rail-btn {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(85, 255, 0, .78);
  border-radius: 8px;
  color: var(--checkin-green);
  background: rgba(16, 16, 16, .92);
  font: 500 14px/1.15 Arial, Helvetica, sans-serif;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .42);
}

.checkin-activity-rail.is-compact {
  gap: 8px;
}

.checkin-activity-rail.is-compact .checkin-rail-btn {
  min-height: 36px;
  font-size: 12px;
}

.checkin-activity-rail.is-compact .checkin-rail-btn.is-refresh {
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 4px;
  padding: 6px 5px;
  font-size: 10px;
}

.checkin-activity-rail.is-horizontal {
  flex-direction: row;
  gap: 8px;
}

.checkin-activity-rail.is-horizontal .checkin-rail-btn {
  min-width: 0;
  min-height: 36px;
  flex: 1 1 0;
  font-size: 12px;
}

.checkin-activity-rail.is-horizontal .checkin-rail-btn.is-refresh {
  grid-template-columns: 20px minmax(0, 1fr);
  padding: 6px;
  font-size: 10px;
}

.checkin-activity-rail.is-mini {
  gap: 7px;
}

.checkin-activity-rail.is-mini .checkin-rail-btn {
  min-height: 31px;
  padding: 4px 2px;
  border-radius: 6px;
  font-size: 9px;
  line-height: 1.05;
}

.checkin-activity-rail.is-mini .checkin-rail-btn[data-checkin-rail="history"] {
  font-size: 0;
  position: relative;
}

.checkin-activity-rail.is-mini .checkin-rail-btn[data-checkin-rail="history"]::before {
  content: "\23F2";
  font-size: 16px;
  line-height: 1;
}

.checkin-activity-rail.is-mini .checkin-rail-btn.is-refresh {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 31px;
  padding: 0;
}

.checkin-activity-rail.is-mini .checkin-rail-btn.is-refresh span:last-child {
  display: none;
}

.checkin-activity-rail.is-attached.is-mini .checkin-rail-btn {
  min-height: 30px;
  font-size: 8.5px;
}

.checkin-rail-btn:hover {
  background: rgba(31, 49, 21, .94);
}

.checkin-rail-btn.is-refresh {
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: center;
  gap: 6px;
  padding: 8px 9px;
  text-align: left;
  font-size: 12px;
}

.checkin-refresh-icon {
  display: inline-flex;
  width: 24px;
  height: 24px;
  border: 2px solid var(--checkin-green);
  border-right-color: transparent;
  border-radius: 50%;
  position: relative;
}

.checkin-refresh-icon::after {
  content: "";
  position: absolute;
  right: -2px;
  top: 2px;
  width: 7px;
  height: 7px;
  border-top: 2px solid var(--checkin-green);
  border-right: 2px solid var(--checkin-green);
  transform: rotate(24deg);
}

.checkin-activity-rail.is-compact .checkin-refresh-icon,
.checkin-activity-rail.is-horizontal .checkin-refresh-icon,
.checkin-activity-rail.is-mini .checkin-refresh-icon {
  width: 18px;
  height: 18px;
}

.checkin-activity-rail.is-compact .checkin-refresh-icon::after,
.checkin-activity-rail.is-horizontal .checkin-refresh-icon::after,
.checkin-activity-rail.is-mini .checkin-refresh-icon::after {
  right: -2px;
  top: 1px;
  width: 6px;
  height: 6px;
}

.codex-checkin-banner-card {
  cursor: pointer !important;
}

.codex-checkin-banner-fallback {
  display: grid;
  grid-template-columns: minmax(128px, 1fr) minmax(96px, 38%);
  min-height: 122px;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  overflow: hidden;
  border: 2px solid #13f5af;
  border-radius: 8px;
  background:
    radial-gradient(circle at 82% 30%, rgba(255, 206, 55, .48) 0 9%, transparent 18%),
    linear-gradient(110deg, #070707 0%, #111 44%, #08251e 100%);
  box-shadow: inset 0 0 20px rgba(19, 245, 175, .24), 0 0 12px rgba(19, 245, 175, .2);
}

.codex-checkin-banner-text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 14px 18px;
  font-family: Arial, Helvetica, sans-serif;
}

.codex-checkin-brand {
  max-width: 150px;
  margin-bottom: 8px;
  color: #f9fff5;
  font-size: 26px;
  line-height: 1;
  font-weight: 900;
  font-style: italic;
}

.codex-checkin-title {
  color: #fff;
  font-size: 24px;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: 0;
}

.codex-checkin-title span,
.codex-checkin-sub span {
  display: block;
  white-space: nowrap;
}

.codex-checkin-sub {
  margin-top: 5px;
  color: #ffbf42;
  font-size: 18px;
  line-height: 1.05;
  font-weight: 800;
}

.codex-checkin-prize {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.codex-checkin-prize::before,
.codex-checkin-prize::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: #ffc928;
  box-shadow: 18px 22px 0 #f5a818, -24px 38px 0 #ffdb5b, 31px -26px 0 #e59a15;
}

.codex-checkin-prize::before {
  width: 50px;
  height: 50px;
  right: 36%;
  bottom: 22%;
}

.codex-checkin-prize::after {
  width: 40px;
  height: 40px;
  right: 58%;
  top: 22%;
}

.codex-checkin-phone {
  position: relative;
  z-index: 1;
  width: 72px;
  height: 96px;
  border: 5px solid #101010;
  border-radius: 14px;
  background: linear-gradient(180deg, #0f2a1b, #0a0a0a);
  box-shadow: 0 12px 22px rgba(0, 0, 0, .45);
}

.codex-checkin-phone::before {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  top: 11px;
  height: 20px;
  border-radius: 6px;
  background: var(--checkin-green);
}

.codex-checkin-phone::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 13px;
  height: 34px;
  border-radius: 7px;
  background: #f7a927;
}

.checkin-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px 10px 76px;
  background: rgba(0, 0, 0, .68);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  font-family: Arial, Helvetica, sans-serif;
}

.checkin-modal,
.checkin-modal *,
.checkin-modal *::before,
.checkin-modal *::after,
.checkin-activity-rail,
.checkin-activity-rail *,
.codex-checkin-banner-fallback,
.codex-checkin-banner-fallback * {
  box-sizing: border-box;
}

.checkin-modal.is-open {
  display: flex;
}

.checkin-shell {
  position: relative;
  width: min(var(--checkin-modal-width, 460px), calc(100vw - 20px));
  height: min(680px, calc(100dvh - 58px));
  max-height: calc(100dvh - 50px);
  padding: 50px 10px 12px;
  border: 9px solid var(--checkin-green);
  border-radius: 8px;
  background: var(--checkin-green);
  box-shadow: 0 18px 70px rgba(0, 0, 0, .72), 0 0 24px rgba(85, 255, 0, .38);
  display: flex;
  flex-direction: column;
}

.checkin-header {
  position: absolute;
  left: -9px;
  top: -9px;
  width: min(230px, calc(100% - 48px));
  height: 62px;
  display: flex;
  align-items: center;
  padding-left: 22px;
  border-radius: 8px 0 24px 0;
  color: #111;
  background: var(--checkin-green);
  font-size: 23px;
  font-weight: 800;
}

.checkin-header-art {
  position: absolute;
  top: -48px;
  left: 50%;
  width: 160px;
  height: 70px;
  transform: translateX(-50%);
  pointer-events: none;
}

.checkin-header-art::before {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 0;
  height: 46px;
  border-radius: 50% 50% 10px 10px;
  background: linear-gradient(180deg, #ffdf65, #fb8125);
  box-shadow: 0 12px 24px rgba(0, 0, 0, .35);
}

.checkin-header-art::after {
  content: "";
  position: absolute;
  left: 58px;
  top: 2px;
  width: 44px;
  height: 38px;
  border-radius: 8px;
  background: #fff;
  box-shadow: inset 0 -8px 0 #f0f0f0;
  transform: rotate(2deg);
}

.checkin-panel {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 16px 10px 16px 38px;
  border-radius: 8px;
  color: var(--checkin-text);
  background: var(--checkin-panel);
  scrollbar-width: thin;
  scrollbar-color: #5f5f5f transparent;
}

.checkin-topline {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
  margin-bottom: 16px;
  color: var(--checkin-muted);
  font-size: 16px;
  line-height: 1.25;
}

.checkin-topline strong {
  color: #fff;
  font-size: 17px;
  font-weight: 800;
}

.checkin-claimed {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.checkin-claimed span {
  color: var(--checkin-gold);
  border-bottom: 1px solid var(--checkin-gold);
}

.checkin-top-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.checkin-view-switch {
  min-width: 96px;
  height: 36px;
  padding: 0 16px;
  border: 1px solid rgba(85, 255, 0, .72);
  border-radius: 999px;
  color: var(--checkin-green);
  background: rgba(0, 0, 0, .35);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.checkin-list {
  position: relative;
  display: grid;
  gap: 12px;
}

.checkin-list::before {
  content: "";
  position: absolute;
  left: -21px;
  top: 28px;
  bottom: 28px;
  width: 3px;
  border-radius: 2px;
  background: #595959;
}

.checkin-reward {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 78px;
  align-items: center;
  min-height: 70px;
  gap: 8px;
  padding: 11px 10px;
  border-radius: 8px;
  background: var(--checkin-card);
  min-width: 0;
}

.checkin-step {
  position: absolute;
  left: -33px;
  top: 50%;
  width: 27px;
  height: 27px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #f8f8f8;
  background: #606060;
  font-size: 15px;
  font-weight: 700;
}

.checkin-reward.is-current .checkin-step,
.checkin-reward.is-today .checkin-step {
  color: #101010;
  background: var(--checkin-green);
}

.checkin-money-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, #ebddad 0 14%, transparent 15%), #125600;
  position: relative;
}

.checkin-money-icon::before,
.checkin-money-icon::after {
  content: "";
  position: absolute;
  left: 12px;
  width: 25px;
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(90deg, #f8edc9, #b79e65);
  transform: rotate(-22deg);
}

.checkin-money-icon::before {
  top: 17px;
}

.checkin-money-icon::after {
  top: 23px;
  left: 16px;
}

.checkin-copy {
  min-width: 0;
}

.checkin-copy-title {
  color: var(--checkin-muted);
  font-size: 14px;
  line-height: 1.2;
}

.checkin-copy-amount {
  margin-top: 5px;
  color: var(--checkin-gold);
  font-size: 15px;
  font-weight: 700;
}

.checkin-claim-btn {
  width: 76px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  color: #fff;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
}

.checkin-claim-btn.can-claim {
  border: 0;
  color: #fff;
  background: linear-gradient(90deg, #00e90e, #00fe2a);
  cursor: pointer;
}

.checkin-claim-btn:disabled {
  color: #8f8f8f;
}

.checkin-footer-row {
  margin-top: 20px;
  color: var(--checkin-muted);
  font-size: 20px;
}

.checkin-footer-row span {
  color: #ff4d7e;
  font-weight: 800;
}

.checkin-message {
  min-height: 20px;
  margin-top: 12px;
  color: #ffcf54;
  font-size: 14px;
}

.checkin-message.is-error {
  color: #ff6b6b;
}

.checkin-close {
  position: absolute;
  left: 50%;
  bottom: -68px;
  width: 52px;
  height: 52px;
  transform: translateX(-50%);
  border: 4px solid #fff;
  border-radius: 50%;
  background: rgba(18, 18, 18, .42);
  cursor: pointer;
}

.checkin-close::before,
.checkin-close::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 22px;
  width: 23px;
  height: 4px;
  border-radius: 4px;
  background: #fff;
}

.checkin-close::before {
  transform: rotate(45deg);
}

.checkin-close::after {
  transform: rotate(-45deg);
}

.checkin-history {
  display: grid;
  gap: 10px;
}

.checkin-history-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #070707;
  color: #d7d7d7;
  font-size: 14px;
}

.checkin-history-item strong {
  color: #fff;
  font-size: 15px;
}

.checkin-history-item span {
  color: var(--checkin-gold);
  font-weight: 800;
}

.checkin-empty {
  padding: 28px 14px;
  color: var(--checkin-muted);
  text-align: center;
  background: #070707;
  border-radius: 8px;
}

@media (max-width: 620px) {
  .checkin-activity-rail {
    left: var(--checkin-rail-left, 10px);
    top: var(--checkin-rail-top, 96px);
    width: var(--checkin-rail-width, 78px);
  }

  .checkin-modal {
    justify-content: flex-start;
    padding: 42px 8px 76px;
  }

  .checkin-shell {
    width: min(var(--checkin-modal-width, 420px), calc(100vw - 16px));
    padding: 48px 8px 12px;
    border-width: 8px;
  }

  .checkin-header {
    left: -8px;
    top: -8px;
    height: 58px;
    width: min(202px, calc(100% - 42px));
    padding-left: 22px;
    font-size: 22px;
  }

  .checkin-header-art {
    top: -42px;
    width: 145px;
    height: 62px;
  }

  .checkin-panel {
    padding: 15px 8px 15px 36px;
  }

  .checkin-topline {
    grid-template-columns: 1fr;
    font-size: 15px;
  }

  .checkin-reward {
    grid-template-columns: 46px minmax(0, 1fr) 78px;
    gap: 8px;
    min-height: 66px;
    padding: 10px 8px;
  }

  .checkin-step {
    left: -31px;
  }

  .checkin-money-icon {
    width: 42px;
    height: 42px;
  }

  .checkin-copy-title {
    font-size: 14px;
  }

  .checkin-copy-amount {
    font-size: 14px;
  }

  .checkin-claim-btn {
    width: 76px;
    height: 38px;
    font-size: 14px;
  }

  .checkin-footer-row {
    font-size: 15px;
  }

  .codex-checkin-banner-fallback {
    grid-template-columns: minmax(112px, 1fr) minmax(82px, 34%);
  }

  .codex-checkin-banner-text {
    padding: 10px 12px;
  }

  .codex-checkin-brand {
    margin-bottom: 5px;
    font-size: 20px;
  }

  .codex-checkin-title {
    font-size: 21px;
  }

  .codex-checkin-sub {
    font-size: 16px;
  }

  .codex-checkin-phone {
    width: 58px;
    height: 78px;
    border-width: 4px;
  }
}

@media (max-width: 390px) {
  .checkin-reward {
    grid-template-columns: 38px minmax(0, 1fr) 70px;
    gap: 7px;
  }

  .checkin-copy-title {
    font-size: 13px;
  }

  .checkin-claim-btn {
    width: 68px;
    font-size: 13px;
  }

  .codex-checkin-banner-fallback {
    grid-template-columns: minmax(104px, 1fr) minmax(72px, 32%);
  }

  .codex-checkin-brand {
    font-size: 18px;
  }

  .codex-checkin-title {
    font-size: 19px;
  }

  .codex-checkin-sub {
    font-size: 14px;
  }

  .codex-checkin-phone {
    width: 50px;
    height: 70px;
  }
}
