:root {
  --brand: #1e3fa0;
  --brand-dark: #16307d;
  --text: #1b1f27;
  --muted: #8a8f99;
  --line: #e3e6eb;
  --bg: #ffffff;
  --req: #d0342c;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Leelawadee UI", "Thonburi", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

/* Header */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; padding: 0 20px;
  background: #fff; border-bottom: 1px solid #f0f1f3;
}
.brand {
  font-weight: 900; font-size: 24px; letter-spacing: -0.5px;
  color: var(--brand); text-decoration: none; font-style: italic;
}
.brand span { margin-left: 2px; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.lang { position: relative; display: flex; align-items: center; gap: 6px; font-size: 15px; }
.lang-flag { width: 24px; height: 16px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); object-fit: cover; }
.lang select {
  appearance: none; border: 0; background: transparent; font: inherit; color: var(--text);
  padding: 4px 22px 4px 0; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right center; background-size: 16px;
}
.menu-btn {
  width: 32px; height: 32px; padding: 6px 4px; border: 0; background: none; cursor: pointer;
  display: flex; flex-direction: column; justify-content: space-between;
}
.menu-btn span { display: block; height: 3px; border-radius: 2px; background: #111; }
.menu {
  position: absolute; top: 64px; right: 0; left: 0;
  background: #fff; border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 20px rgba(0,0,0,.06);
}
.menu a { display: block; padding: 14px 24px; color: var(--text); text-decoration: none; }
.menu a:hover { background: #f6f7f9; }

/* Layout */
.wrap { max-width: 560px; margin: 0 auto; padding: 28px 16px 64px; }
h1 { font-size: 26px; margin: 0 0 6px; letter-spacing: -0.5px; }
.lead { margin: 0 0 28px; color: var(--muted); font-size: 15px; }

.field { margin: 0 0 26px; padding: 0; border: 0; min-width: 0; }
.field > label, .field > legend {
  display: block; margin-bottom: 10px; padding: 0;
  font-weight: 600; font-size: 17px;
}
.req { color: var(--req); font-style: normal; margin-left: 3px; }

input[type=text], input[type=tel], input[type=email], textarea {
  width: 100%; font: inherit; color: var(--text);
  border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 15px 20px; background: #fff; outline: none;
  transition: border-color .15s;
}
textarea { resize: vertical; min-height: 200px; }
input::placeholder, textarea::placeholder { color: #a3a8b1; }
input:focus, textarea:focus { border-color: var(--brand); }
.invalid { border-color: var(--req) !important; }

/* Checkmark-style checkboxes */
.checks { display: flex; flex-direction: column; }
.check {
  position: relative; display: flex; align-items: center; gap: 16px;
  padding: 12px 6px; cursor: pointer; color: var(--muted); font-size: 17px;
  user-select: none;
}
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check svg {
  flex: none; width: 24px; height: 24px;
  fill: none; stroke: #6b7079; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
}
.check input:checked ~ svg { stroke: var(--brand); stroke-width: 3; }
.check input:checked ~ span { color: var(--brand); font-weight: 600; }
.check input:focus-visible ~ svg { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
.checks.invalid-group .check svg { stroke: var(--req); }

.agree { margin: 4px 0 20px; font-size: 16px; gap: 12px; }
.agree input:checked ~ span { font-weight: 400; color: var(--text); }
.link {
  border: 0; padding: 0; background: none; font: inherit; cursor: pointer;
  color: var(--brand); font-weight: 500;
}

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.error { color: var(--req); font-size: 14px; margin: -6px 0 14px; }

.submit {
  display: block; width: 100%; height: 60px; border: 0; border-radius: 999px;
  background: var(--brand); color: #fff; font: inherit; font-size: 19px; font-weight: 700;
  cursor: pointer; text-align: center; line-height: 60px; text-decoration: none;
  transition: background .15s;
}
.submit:hover { background: var(--brand-dark); }
.submit:disabled { opacity: .6; cursor: progress; }

.done { text-align: center; padding: 60px 0; }
.done svg { width: 64px; height: 64px; fill: none; stroke: var(--brand); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.done h2 { margin: 16px 0 8px; }
.done p { color: var(--muted); margin: 0 0 32px; }

dialog {
  width: min(520px, calc(100% - 32px)); max-height: 80vh;
  border: 0; border-radius: 18px; padding: 24px;
}
dialog::backdrop { background: rgba(0,0,0,.4); }
dialog h3 { margin: 0 0 12px; }
.policy { font-size: 14px; color: #444; margin-bottom: 20px; }
.policy table { width: 100%; border-collapse: collapse; margin: 8px 0; }
.policy th, .policy td { border: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: top; }
.policy th { background: #f6f7f9; width: 32%; font-weight: 600; }

@media (max-width: 380px) {
  .brand { font-size: 20px; }
  .topbar { padding: 0 14px; }
}
