:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: #232228;
  background: #f7f3ea;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, textarea { font: inherit; }

.landing-page { min-height: 100dvh; background: #c9161c; }

.campaign {
  position: relative;
  isolation: isolate;
  display: grid;
  width: 100%;
  min-height: 100dvh;
  overflow: hidden;
  background: #c9161c;
}

.campaign__background {
  position: absolute;
  top: 50%;
  left: 0;
  z-index: -1;
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  transform: translateY(-50%);
  user-select: none;
  pointer-events: none;
}

.campaign__content {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 24px 24px max(62px, calc(env(safe-area-inset-bottom) + 36px));
}

.sms-trigger {
  display: block;
  width: clamp(220px, 45vw, 365px);
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  animation: breathing 1.75s ease-in-out infinite;
  transform-origin: center;
}
.sms-trigger img { display: block; width: 100%; height: auto; filter: drop-shadow(0 10px 12px rgb(87 0 0 / 36%)); }
.sms-trigger:hover { animation-play-state: paused; transform: scale(1.09); }
.sms-trigger:focus-visible { outline: 3px solid #ffe7a0; outline-offset: 6px; border-radius: 4px; }
.sms-trigger:active { transform: scale(0.94); }

.sms-status { min-height: 1.5em; margin: 14px 0 0; color: rgb(255 247 220 / 90%); font-size: 14px; font-weight: 600; text-align: center; text-shadow: 0 1px 3px rgb(75 0 0 / 55%); }

@keyframes breathing {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.065); }
}

.admin-page { min-height: 100dvh; background: #f7f3ea; }
.admin-shell { width: min(100% - 40px, 720px); margin: 0 auto; padding: 52px 0 72px; }
.login-card { width: min(100%, 430px); margin: 9dvh auto 0; padding: 34px; border: 1px solid #ded6c9; border-radius: 8px; background: #fffdfa; box-shadow: 0 14px 34px rgb(75 43 28 / 8%); }
.login-description { margin: 13px 0 22px; color: #69615d; font-size: 14px; line-height: 1.6; }
.login-form { display: grid; gap: 10px; }
.login-form .save-button { margin-top: 10px; }
.login-notice { min-height: 1.5em; margin: 0; color: #ab3628; font-size: 13px; }

.admin-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 34px; padding-bottom: 22px; border-bottom: 1px solid #d9d2c4; }
.eyebrow { margin: 0 0 7px; color: #a34d35; font-size: 13px; font-weight: 700; letter-spacing: 0; }
h1, h2 { margin: 0; color: #272326; letter-spacing: 0; }
h1 { font-size: 32px; line-height: 1.2; }
h2 { font-size: 20px; line-height: 1.35; }
.text-button { padding: 0; border: 0; color: #6b201a; background: transparent; font-size: 14px; cursor: pointer; white-space: nowrap; }
.text-button:hover, .text-button:focus-visible { text-decoration: underline; }

.settings-form { display: grid; gap: 10px; padding-bottom: 34px; border-bottom: 1px solid #d9d2c4; }
.settings-form label, .login-form label { margin-top: 14px; color: #343035; font-size: 15px; font-weight: 700; }
.login-form label { margin-top: 0; }
.settings-form label span { color: #8a8380; font-size: 12px; font-weight: 400; }
input, textarea { width: 100%; border: 1px solid #c8c0b4; border-radius: 4px; background: #fffdfa; color: #272326; outline: none; transition: border-color 160ms ease, box-shadow 160ms ease; }
input { height: 46px; padding: 0 13px; }
textarea { min-height: 142px; padding: 12px 13px; resize: vertical; line-height: 1.55; }
input:focus, textarea:focus { border-color: #a34d35; box-shadow: 0 0 0 3px rgb(163 77 53 / 15%); }
.field-note, .form-meta { margin: 0; color: #77706b; font-size: 12px; line-height: 1.5; }
.form-meta { display: flex; justify-content: space-between; gap: 16px; }
.form-meta output { color: #5e5752; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.save-button, .reset-button { min-height: 42px; padding: 0 18px; border-radius: 4px; cursor: pointer; font-weight: 700; }
.save-button { border: 1px solid #8d3227; background: #a94335; color: #fff; }
.save-button:hover { background: #8f372c; }
.reset-button { border: 1px solid #b9b0a4; background: transparent; color: #4d4745; }
.reset-button:hover { border-color: #80776e; background: #eee9df; }
.save-notice { min-height: 1.5em; margin: 2px 0 0; color: #28724d; font-size: 13px; }
.preview { padding-top: 30px; }
.preview-recipient { margin: 15px 0 6px; color: #745c55; font-size: 14px; font-weight: 700; }
.preview-message { margin: 0; white-space: pre-wrap; color: #343035; font-size: 16px; line-height: 1.7; }

@media (max-width: 560px) {
  .campaign__content { padding-bottom: max(48px, calc(env(safe-area-inset-bottom) + 24px)); }
  .sms-trigger { width: min(76vw, 315px); }
  .admin-shell { width: min(100% - 32px, 720px); padding-top: 32px; }
  .login-card { margin-top: 4dvh; padding: 26px 22px; }
  .admin-header { align-items: flex-start; margin-bottom: 24px; }
  h1 { font-size: 27px; }
}

@media (prefers-reduced-motion: reduce) {
  .sms-trigger { animation: none; }
  input, textarea { transition: none; }
}
