/*
 * AlgoFate static service notice popup V44
 * Shared by Korean, English, and Japanese static pages.
 */
:root {
  --afnotice-accent: #e95420;
  --afnotice-accent-dark: #c54113;
  --afnotice-navy: #0f1826;
  --afnotice-ink: #172033;
  --afnotice-muted: #5d6878;
  --afnotice-line: rgba(23, 32, 51, .12);
  --afnotice-paper: #ffffff;
  --afnotice-soft: #f7f8fa;
}

html.afnotice-lock,
body.afnotice-lock { overflow: hidden !important; }

.afnotice-root[hidden] { display: none !important; }
.afnotice-root {
  position: fixed;
  inset: 0;
  z-index: 2147483200;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, visibility .18s ease;
  font-family: 'Pretendard Variable','Pretendard','Inter','Noto Sans KR','Noto Sans JP',system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  box-sizing: border-box;
}
.afnotice-root.is-open { opacity: 1; visibility: visible; }
.afnotice-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(8, 15, 26, .68);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  cursor: default;
}
.afnotice-dialog {
  position: relative;
  width: min(620px, calc(100vw - 32px));
  max-height: min(820px, calc(100dvh - 32px));
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--afnotice-paper);
  color: var(--afnotice-ink);
  border: 2px solid var(--afnotice-accent);
  border-radius: 22px;
  box-shadow: 0 28px 90px rgba(5, 12, 24, .34);
  transform: translateY(14px) scale(.985);
  transition: transform .2s ease;
  box-sizing: border-box;
  outline: none;
}
.afnotice-root.is-open .afnotice-dialog { transform: translateY(0) scale(1); }
.afnotice-topline {
  height: 7px;
  background: linear-gradient(90deg, var(--afnotice-accent), #ff8a45 52%, #f7b267);
  border-radius: 19px 19px 0 0;
}
.afnotice-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border: 1px solid var(--afnotice-line);
  border-radius: 50%;
  background: rgba(255,255,255,.94);
  color: #384152;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
  transition: .15s ease;
}
.afnotice-close:hover { background: #f1f3f6; color: #111827; transform: rotate(4deg); }
.afnotice-close:focus-visible,
.afnotice-button:focus-visible,
.afnotice-link:focus-visible,
[data-af-notice-open]:focus-visible {
  outline: 3px solid rgba(233, 84, 32, .33);
  outline-offset: 3px;
}
.afnotice-body { padding: 29px 31px 25px; }
.afnotice-brandrow { display: flex; align-items: center; gap: 12px; padding-right: 46px; }
.afnotice-mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border-radius: 14px;
  background: var(--afnotice-navy);
  color: #fff;
  font: 800 15px/1 'Cinzel','Inter',serif;
  letter-spacing: .02em;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}
.afnotice-eyebrow {
  margin: 0 0 2px;
  color: var(--afnotice-accent-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.afnotice-brand { margin: 0; color: #3f4857; font-size: 12px; font-weight: 750; }
.afnotice-title {
  margin: 19px 0 9px;
  color: var(--afnotice-navy);
  font-size: clamp(24px, 4.7vw, 34px);
  line-height: 1.26;
  letter-spacing: -.035em;
  font-weight: 900;
  word-break: keep-all;
}
.afnotice-lead {
  margin: 0;
  color: var(--afnotice-muted);
  font-size: 15px;
  line-height: 1.72;
  word-break: keep-all;
}
.afnotice-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 20px 0 14px;
}
.afnotice-point {
  min-width: 0;
  padding: 14px 13px;
  border: 1px solid var(--afnotice-line);
  border-radius: 14px;
  background: var(--afnotice-soft);
}
.afnotice-point-icon {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  margin-bottom: 9px;
  border-radius: 10px;
  background: rgba(233, 84, 32, .10);
  color: var(--afnotice-accent-dark);
  font-size: 15px;
  font-weight: 900;
}
.afnotice-point strong { display: block; margin-bottom: 4px; color: #1b2433; font-size: 13px; line-height: 1.35; }
.afnotice-point p { margin: 0; color: #616b79; font-size: 11.5px; line-height: 1.58; word-break: keep-all; }
.afnotice-note {
  margin: 0;
  padding: 12px 13px;
  border-left: 3px solid var(--afnotice-accent);
  border-radius: 3px 10px 10px 3px;
  background: #fff8f4;
  color: #5c6573;
  font-size: 11.5px;
  line-height: 1.63;
  word-break: keep-all;
}
.afnotice-links { display: flex; flex-wrap: wrap; gap: 12px; margin: 13px 0 0; }
.afnotice-link { color: #315b86; font-size: 12px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.afnotice-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 9px;
  margin-top: 21px;
}
.afnotice-button {
  min-height: 47px;
  padding: 10px 15px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
  cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
}
.afnotice-button:hover { transform: translateY(-1px); }
.afnotice-button-secondary { border: 1px solid #cfd5dd; background: #fff; color: #3d4654; }
.afnotice-button-secondary:hover { background: #f6f7f9; }
.afnotice-button-primary { border: 1px solid var(--afnotice-navy); background: var(--afnotice-navy); color: #fff; box-shadow: 0 8px 20px rgba(15, 24, 38, .18); }
.afnotice-button-primary:hover { background: #18263a; box-shadow: 0 10px 24px rgba(15, 24, 38, .22); }
.afnotice-version { margin: 12px 0 0; color: #8a929e; font-size: 10px; text-align: center; }

/* Reopen control inherits the footer's visual language. */
button[data-af-notice-open].afsite-footer-action {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

@media (max-width: 620px) {
  .afnotice-root { align-items: end; padding: 10px; }
  .afnotice-dialog { width: 100%; max-height: calc(100dvh - 20px); border-radius: 20px; }
  .afnotice-topline { border-radius: 17px 17px 0 0; }
  .afnotice-body { padding: 24px 19px 20px; }
  .afnotice-close { top: 14px; right: 14px; width: 37px; height: 37px; }
  .afnotice-title { margin-top: 16px; font-size: 25px; }
  .afnotice-lead { font-size: 13.5px; }
  .afnotice-points { grid-template-columns: 1fr; gap: 7px; margin-top: 16px; }
  .afnotice-point { display: grid; grid-template-columns: 34px 1fr; column-gap: 10px; padding: 11px 12px; }
  .afnotice-point-icon { grid-row: 1 / 3; margin: 0; }
  .afnotice-point strong { align-self: end; }
  .afnotice-point p { align-self: start; }
  .afnotice-actions { grid-template-columns: 1fr; }
  .afnotice-button-primary { grid-row: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .afnotice-root, .afnotice-dialog, .afnotice-close, .afnotice-button { transition: none !important; }
}

@media print { .afnotice-root { display: none !important; } }
