/* Footer-only styles from math-game-archive 0877c2ea4d59ae70ccc026c5e0721f09d1fea920. */
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;700;900&display=swap");
:root{--shared-shell-footer-text:.76rem;--shared-shell-footer-line:#e6ebf2}
/* Public footer typography and layout belong to the shared shell. Layered
   important rules prevent later page styles from changing the common UI.
   Workspace positioning and explicitly omitted tools remain page contracts. */
@layer archive-footer {
  :is(.game-footer,.site-footer) {
    box-sizing:border-box !important;
    font-family:"Noto Sans KR","Noto Sans JP","Noto Sans TC",system-ui,sans-serif !important;
    font-size:12.16px !important;
    font-weight:400 !important;
    line-height:1.5 !important;
    letter-spacing:normal !important;
    color:#667085 !important;
    text-align:left !important;
    border-top:1px solid #e6ebf2 !important;
    padding:10px 2px calc(10px + env(safe-area-inset-bottom,0px)) !important;
    gap:8px 24px !important;
  }

  :is(.game-footer,.site-footer) :is(p,.footer-contact-tools,.footer-contact-button,.footer-privacy-link,.footer-terms-link,.footer-tools-menu,summary) {
    font-family:"Noto Sans KR","Noto Sans JP","Noto Sans TC",system-ui,sans-serif !important;
    font-size:12.16px !important;
    font-weight:400 !important;
    line-height:1.5 !important;
    letter-spacing:normal !important;
    color:inherit !important;
  }

  :is(.game-footer,.site-footer) p { margin:0 !important; }
  :is(.game-footer,.site-footer) .footer-contact-button {
    min-width:0 !important;
    min-height:0 !important;
    padding:0 !important;
    border:0 !important;
    border-radius:0 !important;
    background:transparent !important;
    box-shadow:none !important;
  }
  :is(.game-footer,.site-footer) :is(.footer-contact-button,.footer-privacy-link,.footer-terms-link) {
    white-space:nowrap !important;
    text-decoration:underline !important;
    text-underline-offset:3px !important;
  }
  /* The shared script draws the same underline with a border on iOS. */
  :is(.game-footer,.site-footer) summary { white-space:nowrap !important; }
  :is(.game-footer,.site-footer) :is(.footer-contact-button,.footer-privacy-link,.footer-terms-link,summary):is(:hover,:focus-visible) {
    color:#4338ca !important;
  }
  :is(.game-footer,.site-footer) .footer-contact-tools {
    display:flex !important;
    align-items:center !important;
    flex-wrap:wrap !important;
    min-width:0 !important;
  }
  :is(.game-footer,.site-footer):not([data-shared-shell-footer="custom"]) {
    display:flex !important;
    flex-direction:row !important;
    flex-wrap:wrap !important;
    justify-content:space-between !important;
    align-items:center !important;
  }
  :is(.game-footer,.site-footer)[hidden] { display:none !important; }

  .board-app > .site-footer[data-shared-shell-footer="custom"] {
    padding:10px max(clamp(16px,2vw,24px),env(safe-area-inset-right,0px)) calc(10px + env(safe-area-inset-bottom,0px)) max(clamp(16px,2vw,24px),env(safe-area-inset-left,0px)) !important;
  }

  /* The electronic board keeps its compact workspace footer, but its mobile
     link row still needs the same comfortable edge inset as the public shell. */
  @media (max-width:700px) {
    .board-app > .site-footer[data-shared-shell-footer="custom"] {
      padding:5px max(16px,env(safe-area-inset-right,0px)) calc(5px + env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px)) !important;
    }
  }

  @media (max-width:600px) {
    :is(.game-footer,.site-footer):not([data-shared-shell-footer="custom"]) {
      flex-direction:column !important;
      align-items:flex-start !important;
      row-gap:4px !important;
    }
    html[data-march-exam-source-footer="inline"] .embed-shell > .site-footer:not([data-shared-shell-footer="custom"]) {
      flex-direction:row !important;
      flex-wrap:nowrap !important;
      align-items:center !important;
      gap:8px !important;
    }
    html[data-march-exam-source-footer="inline"] .landing-shell > .site-footer:not([data-shared-shell-footer="custom"]) {
      flex-direction:row !important;
      flex-wrap:nowrap !important;
      align-items:center !important;
      gap:8px !important;
    }
  }
}

.game-footer,
.site-footer {
  align-items:center;
  margin-bottom:0 !important;
  border-top:1px solid var(--shared-shell-footer-line) !important;
  padding-top:10px !important;
  padding-right:2px !important;
  padding-bottom:calc(10px + env(safe-area-inset-bottom,0px)) !important;
  padding-left:2px !important;
  gap:8px 24px !important;
  font-size:var(--shared-shell-footer-text) !important;
  line-height:1.5 !important;
}

:is(.game-footer,.site-footer):not([data-third-party-content="true"]):not([data-shared-shell-footer="custom"]) {
  display:flex;
  justify-content:space-between;
  flex-wrap:wrap;
}

.game-footer p,
.site-footer p {
  margin:0;
}

.game-footer a,
.site-footer a {
  color:inherit;
  text-underline-offset:3px;
}

.footer-contact-button {
  -webkit-appearance:none;
  appearance:none;
  display:inline;
  padding:0;
  border:0;
  background:transparent;
  color:inherit;
  font:inherit;
  cursor:pointer;
  text-decoration:underline;
  text-underline-offset:3px;
}

.footer-contact-button:hover,
.footer-contact-button:focus-visible {
  color:#4338ca;
}

.footer-contact-separator {
  display:inline-block;
  margin-right:5px;
  color:#98a2b3;
}

.game-footer :is(.footer-contact-button,.footer-tools-pending),
.site-footer :is(.footer-contact-button,.footer-tools-pending) {
  font-weight:inherit;
}

.contact-dialog {
  position:fixed;
  z-index:1000;
  inset:0;
  margin:auto;
  width:min(460px,calc(100vw - 28px));
  height:min(570px,calc(100dvh - 28px));
  max-width:none;
  max-height:none;
  padding:0;
  border:1px solid #d8deea;
  border-radius:16px;
  background:#fff;
  box-shadow:0 24px 64px rgba(15,23,42,.24);
  overflow:hidden;
}

.contact-dialog::backdrop {
  background:rgba(15,23,42,.42);
  backdrop-filter:blur(2px);
}

.contact-dialog-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  height:48px;
  padding:0 10px 0 18px;
  border-bottom:1px solid #e8ecf2;
  background:linear-gradient(90deg,#f7f5ff 0%,#fff 72%);
  color:#172033;
  font-size:.94rem;
  cursor:move;
  touch-action:none;
  user-select:none;
}

.contact-dialog[data-dragging="true"] .contact-dialog-header { cursor:grabbing; }

.contact-dialog-heading {
  display:flex;
  align-items:center;
  gap:8px;
}

.contact-dialog-icon {
  font-size:1.12rem;
  line-height:1;
}

.contact-dialog-body {
  position:relative;
  height:calc(100% - 48px);
  background:#fff;
}

.contact-dialog-loading {
  position:absolute;
  z-index:1;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:24px;
  background:linear-gradient(180deg,#fbfaff 0%,#fff 38%);
  color:#667085;
  font-size:.86rem;
  text-align:center;
  transition:opacity .18s ease,visibility .18s ease;
}

.contact-dialog-body[data-loaded="true"] .contact-dialog-loading {
  visibility:hidden;
  opacity:0;
  pointer-events:none;
}

.contact-dialog-spinner {
  width:18px;
  height:18px;
  flex:0 0 auto;
  border:2px solid #d9ddf7;
  border-top-color:#5b5fe9;
  border-radius:50%;
  animation:contact-dialog-spin .75s linear infinite;
}

@keyframes contact-dialog-spin {
  to { transform:rotate(360deg); }
}

.contact-dialog-close {
  display:grid;
  width:36px;
  height:36px;
  place-items:center;
  padding:0;
  border:0;
  border-radius:9px;
  background:transparent;
  color:#667085;
  font-size:1.5rem;
  line-height:1;
  cursor:pointer;
  touch-action:manipulation;
}

.contact-dialog-close:hover,
.contact-dialog-close:focus-visible {
  background:#f2f4f7;
  color:#172033;
  outline:none;
}

.contact-dialog-frame {
  display:block;
  width:100%;
  height:100%;
  border:0;
  background:#fff;
}

.footer-contact-tools {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  min-width:0;
}

.footer-contact-tools > p {
  margin:0;
}

.footer-privacy-separator,
.footer-terms-separator {
  display:inline-block;
  margin:0 5px 0 12px;
  color:#98a2b3;
}

.footer-privacy-link,
.footer-terms-link {
  color:inherit;
  text-decoration:underline;
  text-underline-offset:3px;
}

.footer-privacy-link:hover,
.footer-privacy-link:focus-visible,
.footer-terms-link:hover,
.footer-terms-link:focus-visible {
  color:#4338ca;
}

.footer-tools-separator {
  margin:0 4px 0 16px;
  color:#98a2b3;
}

.footer-tools-menu {
  position:relative;
  display:inline-block;
}

.footer-tools-menu summary {
  color:inherit;
  cursor:pointer;
  list-style:none;
  text-decoration:underline;
  text-underline-offset:3px;
}

.footer-tools-menu summary::-webkit-details-marker { display:none; }
.footer-tools-menu summary::marker { content:""; }

.footer-tools-popover {
  position:absolute;
  z-index:40;
  bottom:calc(100% + 10px);
  left:0;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px 0;
  width:300px;
  padding:8px 10px;
  border:1px solid #d7dee9;
  border-radius:12px;
  background:#fff;
  box-shadow:0 10px 28px rgba(16,24,40,.14);
}

.footer-tools-divider {
  grid-column:1 / -1;
  height:1px;
  background:#edf1f5;
}

.footer-tools-link,
.footer-tools-pending {
  position:relative;
  display:flex;
  align-items:center;
  min-height:32px;
  padding:5px 8px 5px 19px;
  border:1px solid transparent;
  border-radius:8px;
  background:transparent;
  color:#475467;
  font:inherit;
  font-size:.75rem;
  line-height:1.3;
  text-align:left;
  text-decoration:none;
}

.footer-tools-pending {
  -webkit-appearance:none;
  appearance:none;
}

.footer-tools-link::before,
.footer-tools-pending::before {
  position:absolute;
  left:8px;
  content:"·";
  color:#98a2b3;
}

.site-footer .footer-tools-link,
.game-footer .footer-tools-link,
.site-footer .footer-tools-pending,
.game-footer .footer-tools-pending {
  color:inherit;
}

.site-footer .footer-tools-link,
.game-footer .footer-tools-link {
  cursor:pointer;
  text-decoration:none;
}

.footer-tools-link:hover,
.footer-tools-link:focus-visible {
  border-color:#cbd5e1;
  background:#f8fafc;
  color:#1d4ed8;
  outline:none;
  transform:translateY(-1px);
}

.footer-tools-pending { cursor:default; }
.footer-tools-pending:focus { outline:none; }

.footer-tools-hot {
  position:absolute;
  top:-5px;
  left:calc(100% - 6px);
  right:auto;
  margin:0;
  padding:1px 5px;
  border-radius:999px;
  background:#fff1f2;
  color:#be123c;
  font-size:.62rem;
  font-weight:700;
  letter-spacing:.02em;
  line-height:1.35;
  pointer-events:none;
  transform:rotate(-8deg);
}

.footer-tools-link-hot [data-footer-tools-label] {
  text-decoration:underline wavy #fb7185 1px;
  text-decoration-thickness:1px;
  text-underline-offset:4px;
}

.footer-tools-link-hot { justify-self:start; }

.footer-tools-tooltip {
  position:absolute;
  z-index:1;
  bottom:calc(100% + 6px);
  left:50%;
  width:max-content;
  max-width:160px;
  padding:5px 7px;
  border-radius:6px;
  background:#344054;
  color:#fff;
  font-size:.69rem;
  line-height:1.25;
  opacity:0;
  pointer-events:none;
  transform:translate(-50%,2px);
  transition:opacity .15s ease,transform .15s ease;
}

.footer-tools-pending:hover .footer-tools-tooltip,
.footer-tools-pending:focus .footer-tools-tooltip {
  opacity:1;
  transform:translate(-50%,0);
}
.contact-dialog{font-family:"Noto Sans KR","Noto Sans JP","Noto Sans TC",system-ui,sans-serif}
@media(max-width:640px){
  .contact-dialog {
    width:calc(100vw - 16px);
    height:min(580px,calc(100dvh - 16px));
    border-radius:13px;
  }

  .contact-dialog-header {
    cursor:default;
    touch-action:auto;
  }
}
