#notifications-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 0 45px;
}
.inbox-bell {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.inbox-bell svg {
  width: 21px;
  height: 21px;
}
.inbox-bell > span {
  position: absolute;
  right: -4px;
  top: -4px;
  min-width: 17px;
  height: 17px;
  border: 2px solid var(--paper);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 10px;
  font-weight: 700;
  border-radius: 12px;
  display: grid;
  place-items: center;
  padding: 0 3px;
}
.inbox-bell[hidden],
.inbox-bell span[hidden] {
  display: none;
}
.inbox-state {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.inbox-state strong {
  font-size: 18px;
  color: var(--ink);
}
.inbox-state p {
  margin: 0;
}
.inbox-empty-icon {
  width: 48px;
  height: 48px;
}
.inbox-empty-icon svg {
  width: 100%;
  height: 100%;
}
#notification-payment-focus {
  grid-column: 1/-1;
}
.inbox-payment-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  max-width: 660px;
  margin: 0 0 24px;
}
.inbox-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 12px 0 18px;
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
}
.inbox-account-context {
  display: block;
  margin: 8px 0;
  font-size: 12px;
  color: var(--muted);
}
#notifications-page :focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -3px;
}
.inbox-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 32px;
}
.inbox-heading-title {
  display: flex;
  gap: 12px;
  align-items: center;
}
.inbox-heading h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -1.2px;
}
.unread-pill {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--card));
  border: 1px solid color-mix(in srgb, var(--accent) 15%, var(--line));
  border-radius: 20px;
  padding: 5px 10px;
  white-space: nowrap;
}
.mark-all {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--card);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}
.mark-all:disabled {
  color: var(--muted);
  cursor: default;
}
.mini-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
.date-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 26px 0 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.date-label::after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}
.notice-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 18px;
  overflow: hidden;
}
.notice {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-right: 18px;
  transition: background 120ms;
}
.notice:last-child {
  border-bottom: 0;
}
.notice.unread {
  background: color-mix(in srgb, var(--accent) 3%, var(--card));
}
.notice:hover {
  background: var(--soft);
}
.notice-open {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 22px 20px;
}
.notice-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, currentColor 12%, transparent);
  border-radius: 13px;
  background: var(--soft);
  color: var(--muted);
}
.notice-icon svg {
  width: 22px;
  height: 22px;
}
.notice-icon.money,
.notice-icon.win {
  color: var(--yes);
  background: var(--yes-soft);
}
.notice-icon.trade {
  color: var(--violet);
  background: color-mix(in srgb, var(--violet) 8%, var(--card));
}
.notice-icon.warning {
  color: #a16b1b;
  background: color-mix(in srgb, #f6b94c 13%, var(--card));
}
.notice-icon.settle {
  color: var(--muted);
  background: var(--soft);
}
.notice-copy {
  flex: 1;
  min-width: 0;
}
.notice-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
}
.notice:not(.unread) .notice-title {
  font-weight: 550;
}
.unread-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.notice-message {
  display: block;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.notice-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 10px;
  color: var(--muted);
}
.notice-meta .meta-separator {
  width: 2px;
  height: 2px;
  background: var(--muted);
  border-radius: 50%;
}
.notice-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}
.notice-read {
  display: grid;
  place-items: center;
  height: 44px;
  width: 44px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
}
.notice-read:hover {
  background: var(--card);
  border-color: var(--line);
  color: var(--ink);
}
.notice-read.done {
  opacity: 0.45;
}
.notice-arrow svg {
  width: 15px;
  height: 15px;
}
.notice-arrow {
  color: var(--muted);
  width: 15px;
  height: 15px;
}
.notice:not(.unread) .notice-icon {
  opacity: 0.8;
}
.inbox-history-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px 0 0;
}
.load-more {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 24px;
  background: var(--card);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}
.inbox-history-footer span {
  color: var(--muted);
  font-size: 11px;
}
.record-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.record-top h1 {
  font-size: 24px;
  letter-spacing: -0.7px;
  margin: 0;
}
.record-status {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 4px 8px;
  border-radius: 20px;
  background: var(--yes-soft);
  color: var(--yes);
  font-size: 10px;
  font-weight: 700;
}
.record-amount {
  margin: 22px 0 30px;
  font-size: 40px;
  letter-spacing: -1.7px;
  font-weight: 700;
}
.record-details {
  margin: 0;
  border-top: 1px solid var(--line);
}
.record-details div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.record-details dt {
  color: var(--muted);
}
.record-details dd {
  margin: 0;
  text-align: right;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.record-details .record-reference {
  font-family: ui-monospace, monospace;
  font-size: 11px;
}
.primary-preview {
  border: 0;
  border-radius: 10px;
  padding: 13px 20px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 12px;
  font-weight: 650;
}
.payment-record .primary-preview {
  width: 100%;
  margin-top: 26px;
}
.market-preview {
  max-width: 620px;
  margin: 0 auto;
}
.market-preview .payment-record h1 {
  font-size: 28px;
  line-height: 1.3;
  letter-spacing: -0.8px;
}
.market-outcome {
  margin: 26px 0;
  padding: 16px;
  background: var(--yes-soft);
  border-radius: 12px;
  color: var(--yes);
  font-size: 13px;
}
.market-category {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 12px;
}

@media (max-width: 700px) {
  #notifications-page {
    padding: 20px 16px 45px;
  }
  .inbox-heading {
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 24px;
  }
  .inbox-heading-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .inbox-heading h1 {
    font-size: 27px;
  }
  .mark-all {
    font-size: 11px;
    padding: 10px;
    white-space: nowrap;
  }
  .notice {
    padding-right: 6px;
    align-items: flex-start;
  }
  .notice-open {
    gap: 10px;
    padding: 18px 10px;
    align-items: flex-start;
  }
  .notice-icon {
    width: 35px;
    height: 35px;
    flex-basis: 35px;
  }
  .notice-title {
    font-size: 13px;
  }
  .notice-read {
    flex: 0 0 44px;
    margin-top: 13px;
  }
  .notice-arrow svg {
    width: 15px;
    height: 15px;
  }
  .notice-arrow {
    display: none;
  }
  .inbox-history-footer {
    padding-bottom: 24px;
  }
  .inbox-payment-card {
    padding: 20px;
  }
}

@media (max-width: 700px) {
  .topbar .player-language,
  .topbar .topbar-add-money,
  .topbar .wallet-pill,
  .topbar .theme-toggle {
    display: none;
  }
  .topbar .account-cluster {
    margin-left: auto;
    gap: 12px;
  }
}

@media (min-width: 701px) {
  .history-section.notification-focus-open {
    grid-template-rows: auto auto auto auto auto;
  }
  .notification-focus-open #notification-payment-focus {
    grid-row: 2;
  }
  .notification-focus-open .wallet-side {
    grid-row: 3/6;
  }
  .notification-focus-open .history-toolbar,
  .notification-focus-open #activity > .activity-heading {
    grid-row: 3;
  }
  .notification-focus-open #activity > .activity-list {
    grid-row: 4;
  }
  .notification-focus-open #settlements {
    grid-row: 5;
  }
}
