/* ===== GLOBAL STYLES (shared by all pages) ===== */
:root {
  --red: #8f1d33;
  --red-dark: #741728;
  --red-soft: #fbe9ec;
  --bg: #fbf8f8;
  --surface: #fff;
  --surface-muted: #fcf8f9;
  --text: #2a2330;
  --muted: #6f6a75;
  --border: #efe7e8;
  --border-strong: #e5d7da;
  --shadow: 0 6px 22px rgba(120, 30, 50, .07);
  --shadow-raised: 0 12px 30px rgba(72, 23, 34, .12);
  --radius-card: 16px;
  --radius-control: 10px;
  --page-width: 1560px;
  --page-gutter: clamp(10px, 3.4vw, 56px);
  --focus-ring: rgba(143, 29, 51, .12);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hide { display: none !important; }

/* ---------- Buttons ---------- */
.btn {
  border: 0;
  border-radius: var(--radius-control);
  min-height: 40px;
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 700;
  transition: background .15s, border-color .15s, box-shadow .15s, color .15s;
}
.btn.primary { background: var(--red); color: #fff; box-shadow: 0 6px 14px rgba(143, 29, 51, .18); }
.btn.primary:hover { background: var(--red-dark); }
.btn.secondary { background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.btn.secondary:hover { border-color: var(--border-strong); background: var(--surface-muted); }

/* ---------- Form fields ---------- */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 10px;
  letter-spacing: .055em;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 6px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  min-height: 42px;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: var(--border-strong); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

/* ---------- Notes ---------- */
.note { font-size: 10px; line-height: 1.55; color: #858e9b; }
.notice {
  background: #fff6f7;
  border: 1px solid var(--border-strong);
  color: #6c3c46;
  border-radius: var(--radius-control);
  padding: 12px 14px;
  font-size: 11px;
  line-height: 1.65;
  margin-bottom: 14px;
}
.link-btn {
  border: 0;
  background: none;
  color: var(--red);
  font-size: 11px;
  padding: 0;
}

/* ---------- Chatbot (shared by all pages) ---------- */
.chatbtn {
  position: fixed;
  right: 25px;
  bottom: 24px;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 22px rgba(143, 29, 51, .4);
  z-index: 90;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.chatbtn.dragging { cursor: grabbing; }
.chatbtn.is-hidden { display: none; }
.chatbtn:hover { background: var(--red-dark); }

.chat {
  position: fixed;
  right: 25px;
  bottom: 92px;
  width: 355px;
  height: 510px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 17px;
  box-shadow: 0 18px 50px rgba(28, 37, 48, .18);
  z-index: 89;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.chat.open { display: flex; }

.chathead {
  background: var(--red);
  color: #fff;
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chathead small { display: block; font-size: 10px; opacity: .85; }
.chathead button { border: 0; background: none; color: #fff; font-size: 22px; line-height: 1; }

.chatmsg { flex: 1; overflow: auto; padding: 13px; background: #f7f8fa; }
.msg {
  max-width: 82%;
  padding: 9px 11px;
  border-radius: 12px;
  margin-bottom: 8px;
  font-size: 11px;
  line-height: 1.5;
  white-space: pre-line;
}
.botmsg { background: #fff; border: 1px solid var(--border); }
.usermsg { background: var(--red); color: #fff; margin-left: auto; }

.quickchat { display: flex; gap: 5px; padding: 7px; overflow: auto; border-top: 1px solid var(--border); }
.quickchat button {
  white-space: nowrap;
  border: 1px solid #f0c9d1;
  background: var(--red-soft);
  color: var(--red);
  border-radius: 16px;
  padding: 6px 10px;
  font-size: 10px;
}

.chatinput { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--border); }
.chatinput input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  font-size: 11px;
  outline: none;
}
.chatinput button {
  border: 0;
  background: var(--red);
  color: #fff;
  border-radius: 8px;
  width: 38px;
}

@media (max-width: 960px) {
  .chatbtn { right: 16px; bottom: 86px; }
  .chat { right: 9px; bottom: 145px; }
}

@media (max-width: 650px) {
  .chatbtn { right: 14px; width: 52px; height: 52px; }
  .chat { width: calc(100vw - 24px); height: 68vh; }
}