/* 온라인 사전등록 — 모바일 전용 */
:root {
  --m-bg: #f2f4f7;
  --m-card: #ffffff;
  --m-ink: #12151a;
  --m-muted: #5c6670;
  --m-line: #e3e7ec;
  --m-red: #c5221f;
  --m-blue: #1a73e8;
  --m-navy: #0a162f;
  --m-top: 56px;
  --m-bar: calc(72px + env(safe-area-inset-bottom, 0px));
  --m-font: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--m-bg);
  color: var(--m-ink);
  font-family: var(--m-font);
  -webkit-tap-highlight-color: transparent;
}

.mreg-body {
  padding-bottom: calc(var(--m-bar) + 28px);
}

.mreg-top {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--m-top);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0 0.85rem;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--m-line);
  backdrop-filter: blur(10px);
}

.mreg-back {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #f3f5f8;
  color: var(--m-ink);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 700;
}

.mreg-top__text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.mreg-top__text strong {
  font-size: 0.95rem;
  line-height: 1.2;
}

.mreg-top__text span {
  font-size: 0.72rem;
  color: var(--m-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mreg-main {
  width: min(480px, 100%);
  margin: 0 auto;
  padding: 0.85rem 0.85rem 0;
}

.mreg-hero {
  position: relative;
  overflow: hidden;
  padding: 1.15rem 1.1rem 1rem;
  border-radius: 16px;
  background: linear-gradient(145deg, #0b1730 0%, #14325a 55%, #1a4a7a 100%);
  color: #fff;
  box-shadow: 0 10px 28px rgba(10, 30, 60, 0.22);
}

.mreg-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%237ec8ff' stroke-opacity='0.18' stroke-width='1'%3E%3Cpath d='M8 28h28l14 14v28l-10 10M60 10v24l16 16h28'/%3E%3Ccircle cx='50' cy='42' r='2' fill='%237ec8ff' fill-opacity='0.3' stroke='none'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 120px 120px;
  opacity: 0.9;
  pointer-events: none;
}

.mreg-eyebrow,
.mreg-hero h1,
.mreg-meta {
  position: relative;
  z-index: 1;
}

.mreg-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #9ad4ff;
}

.mreg-hero h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.25rem, 5.5vw, 1.55rem);
  line-height: 1.3;
  font-weight: 800;
}

.mreg-meta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.9);
}

.mreg-meta span {
  display: inline-block;
  min-width: 2.2rem;
  margin-right: 0.35rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: rgba(126, 200, 255, 0.2);
  color: #cfefff;
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
}

.mreg-notice {
  margin-top: 0.75rem;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  background: var(--m-card);
  border: 1px solid var(--m-line);
}

.mreg-notice p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--m-muted);
}

.mreg-notice strong {
  color: var(--m-ink);
}

.mreg-req-note {
  margin-top: 0.65rem !important;
  color: var(--m-red) !important;
  font-size: 0.8rem !important;
  font-weight: 600;
}

.mreg-form {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.mreg-form.is-hidden,
.mreg-form[hidden] {
  display: none !important;
}

.mreg-field {
  display: block;
  padding: 0.95rem 1rem 1rem;
  border-radius: 14px;
  background: var(--m-card);
  border: 1px solid var(--m-line);
}

.mreg-label {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--m-ink);
}

.mreg-label i {
  color: var(--m-red);
  font-style: normal;
  margin-left: 2px;
}

.mreg-field input {
  width: 100%;
  border: none;
  border-bottom: 1.5px solid var(--m-line);
  background: transparent;
  font: inherit;
  font-size: 16px; /* iOS 자동확대 방지 */
  line-height: 1.4;
  padding: 0.35rem 0 0.55rem;
  color: var(--m-ink);
  border-radius: 0;
  outline: none;
  -webkit-appearance: none;
}

.mreg-field input::placeholder {
  color: #9aa3ad;
}

.mreg-field input:focus {
  border-bottom-color: var(--m-blue);
}

.mreg-spacer {
  height: 0.5rem;
}

.mreg-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 0.85fr 1.35fr;
  gap: 0.55rem;
  padding: 0.75rem 0.85rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--m-line);
  backdrop-filter: blur(12px);
}

.mreg-bar[hidden] {
  display: none !important;
}

.mreg-btn {
  appearance: none;
  border: none;
  border-radius: 12px;
  min-height: 48px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 750;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mreg-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.mreg-btn--primary {
  background: linear-gradient(180deg, #2b82ef 0%, #1a73e8 100%);
  color: #fff;
  box-shadow: 0 6px 16px rgba(26, 115, 232, 0.28);
}

.mreg-btn--ghost {
  background: #eef2f6;
  color: #345;
}

.mreg-help {
  width: min(480px, 100%);
  margin: 0.75rem auto 0;
  padding: 0 0.85rem;
  text-align: center;
  font-size: 0.72rem;
  color: var(--m-muted);
}

.mreg-success {
  margin-top: 0.75rem;
  padding: 2rem 1.25rem;
  border-radius: 16px;
  background: var(--m-card);
  border: 1px solid var(--m-line);
  text-align: center;
}

.mreg-success[hidden] {
  display: none !important;
}

.mreg-success__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 0.85rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e8f5e9;
  color: #2e7d32;
  font-size: 1.5rem;
  font-weight: 800;
}

.mreg-success h2 {
  margin: 0 0 0.55rem;
  font-size: 1.35rem;
  line-height: 1.35;
}

.mreg-success p {
  margin: 0 0 1.25rem;
  color: var(--m-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.mreg-success .mreg-btn {
  width: 100%;
}

.mreg-confirm {
  margin-top: 0.75rem;
  padding: 1.15rem 1.05rem 1.2rem;
  border-radius: 16px;
  background: var(--m-card);
  border: 1px solid var(--m-line);
}

.mreg-confirm[hidden] {
  display: none !important;
}

.mreg-confirm h2 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
}

.mreg-confirm__lead {
  margin: 0 0 0.95rem;
  font-size: 0.88rem;
  color: var(--m-muted);
}

.mreg-review {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.mreg-review__row {
  display: grid;
  grid-template-columns: 6.2rem 1fr;
  gap: 0.5rem;
  padding: 0.7rem 0.75rem;
  border-radius: 10px;
  background: #f6f8fa;
}

.mreg-review__row dt {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--m-muted);
}

.mreg-review__row dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--m-ink);
  word-break: break-word;
}

@media (min-width: 720px) {
  .mreg-main {
    padding-top: 1.25rem;
  }

  .mreg-bar {
    left: 50%;
    transform: translateX(-50%);
    width: min(480px, 100%);
    border-radius: 16px 16px 0 0;
  }
}
