body.notice-open {
  overflow: hidden;
}

.notice-backdrop {
  position: fixed;
  inset: 0;
  z-index: 6000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.notice-backdrop[hidden] {
  display: none !important;
}

.notice-dialog {
  width: min(100%, 480px);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px 22px 20px;
  box-shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.65);
}

.notice-dialog--warning {
  border-color: color-mix(in srgb, #fbbf24 35%, var(--line));
}

.notice-dialog--event {
  border-color: color-mix(in srgb, #f87171 35%, var(--line));
}

.notice-head {
  text-align: center;
  margin-bottom: 18px;
}

.notice-badge {
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 999px;
  padding: 5px 10px;
}

.notice-badge--warning {
  color: #b45309;
  background: #fffbeb;
  border-color: rgba(217, 119, 6, 0.22);
}

.notice-badge--event {
  color: #b91c1c;
  background: #fef2f2;
  border-color: rgba(220, 38, 38, 0.22);
}

.notice-title {
  margin: 12px 0 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.35;
}

.notice-body {
  margin: 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--input-bg);
  border: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: min(50vh, 320px);
  overflow-y: auto;
}

.notice-foot {
  margin-top: 18px;
}

.notice-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.notice-skip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  min-height: 32px;
}

.notice-skip-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.notice-skip-mark {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--line-2);
  border-radius: 4px;
  background: var(--surface);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: 0.14s ease;
}

.notice-skip-input:checked + .notice-skip-mark {
  background: var(--accent);
  border-color: var(--accent);
}

.notice-skip-input:checked + .notice-skip-mark::after {
  content: "";
  width: 4px;
  height: 7px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-top: -1px;
}

.notice-skip-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
}

.notice-close-btn,
.notice-more-btn {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.15s ease;
  text-decoration: none;
}

.notice-close-btn {
  border: none;
  background: var(--accent);
  color: #fff;
}

.notice-close-btn:hover {
  background: var(--accent-600);
}

.notice-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink-2);
}

.notice-more-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Notice page */
.notices-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 24px 88px;
}

.notices-head {
  margin-bottom: 24px;
}

.notices-head h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  color: var(--ink);
}

.notices-sub {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--ink-3);
}

.notices-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.notice-card {
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.notice-card--warning {
  border-color: color-mix(in srgb, #fbbf24 30%, var(--line));
}

.notice-card--event {
  border-color: color-mix(in srgb, #f87171 30%, var(--line));
}

.notice-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.notice-date {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-4);
}

.notice-card-title {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.35;
}

.notice-card-body {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-word;
}

.notices-empty {
  padding: 56px 24px;
  text-align: center;
  border-radius: 18px;
  border: 1px dashed var(--line-2);
  background: var(--surface);
}

.notices-empty-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}

.notices-empty-sub {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--ink-3);
}

.notices-empty-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 20px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  text-decoration: none;
}

@media (max-width: 520px) {
  .notice-backdrop {
    padding: 16px;
  }

  .notice-dialog {
    padding: 20px 18px 16px;
  }

  .notice-title {
    font-size: 20px;
  }

  .notice-actions {
    flex-wrap: wrap;
  }

  .notice-close-btn {
    margin-left: auto;
  }
}
