:root {
  font-size: 4.2666666667vw;
  color: #111111;
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  font-synthesis: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-width: 23.4375rem;
  min-height: 100%;
}

body {
  overflow-x: hidden;
}

button,
a {
  color: inherit;
  font: inherit;
}

button {
  padding: 0;
  border: 0;
  cursor: pointer;
}

a {
  text-decoration: none;
}

h1,
h2,
p,
dl,
dd {
  margin: 0;
}

img {
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

/* 모든 화면의 3.5rem 고정 헤더와 중앙 제목 배치를 공유합니다. */
.app-header {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  width: 23.4375rem;
  height: 3.5rem;
  background: var(--app-header-background, rgba(248, 248, 252, 0.88));
  -webkit-backdrop-filter: blur(0.5rem);
  backdrop-filter: blur(0.5rem);
}

.app-header h1 {
  position: absolute;
  top: 1rem;
  left: 3.75rem;
  width: 15.9375rem;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5rem;
  letter-spacing: -0.025rem;
  text-align: center;
}

.app-header-action {
  position: absolute;
  top: 1rem;
  display: grid;
  width: 1.5rem;
  height: 1.5rem;
  place-items: center;
  background: transparent;
}

@media (prefers-reduced-motion: no-preference) {
  button,
  a {
    transition: opacity 120ms ease, transform 120ms ease;
  }

  button:active,
  a:active {
    opacity: 0.72;
  }
}

.common-dialog-backdrop {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.15);
}

.common-dialog-backdrop[hidden] {
  display: none;
}

.common-dialog {
  display: flex;
  width: 17.5625rem;
  padding: 1.5rem 1rem 1rem;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  border-radius: 0.5rem;
  background: #ffffff;
}

.common-dialog__copy {
  display: flex;
  width: 15.5625rem;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: #111111;
  text-align: center;
}

.common-dialog__title {
  width: 100%;
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25rem;
  letter-spacing: -0.025rem;
}

.common-dialog__message {
  width: 100%;
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.25rem;
  letter-spacing: -0.0234375rem;
  white-space: pre-line;
}

.common-dialog__close {
  display: flex;
  width: 15.5625rem;
  height: 2.5rem;
  padding: 0.375rem 0.75rem;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0.25rem;
  background: #3fa7ab;
  color: #ffffff;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.25rem;
  letter-spacing: -0.021875rem;
  cursor: pointer;
}

/* 화면 전체를 막는 공통 로딩 오버레이입니다. */
.common-loading-backdrop {
  position: fixed;
  z-index: 2000;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.5);
}

.common-loading-backdrop[hidden] {
  display: none;
}

.common-loading-spinner {
  width: 4rem;
  height: 4rem;
  animation: common-loading-spin 0.9s linear infinite;
  transform-origin: 50% 50%;
}

@keyframes common-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

/* 모션 감소 설정에서도 로딩 여부는 알 수 있도록 회전 속도만 낮춥니다. */
@media (prefers-reduced-motion: reduce) {
  .common-loading-spinner {
    animation-duration: 1.8s;
  }
}
