:root {
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #23231f;
  background: #f5f4ef;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    radial-gradient(circle at 10% 4%, rgba(229, 150, 71, 0.13), transparent 34rem),
    radial-gradient(circle at 94% 86%, rgba(65, 109, 99, 0.12), transparent 30rem),
    #f5f4ef;
}

body {
  min-width: 280px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
}

button,
input,
textarea {
  font: inherit;
}

button,
summary,
label[for],
.remember-row {
  -webkit-tap-highlight-color: transparent;
}

.page-shell {
  width: min(100%, 1080px);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  display: grid;
  align-content: center;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 0.7fr);
  column-gap: clamp(48px, 9vw, 120px);
}

.intro {
  align-self: center;
  max-width: 520px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 12px;
  margin-bottom: 36px;
  border-radius: 18px;
  background: #262720;
  box-shadow: 0 12px 30px rgba(35, 35, 31, 0.16);
}

.brand-mark span {
  display: block;
  width: 7px;
  border-radius: 99px;
  background: #f5f4ef;
  transform: rotate(10deg);
}

.brand-mark span:nth-child(1) { height: 14px; }
.brand-mark span:nth-child(2) { height: 26px; background: #e59a4a; }
.brand-mark span:nth-child(3) { height: 20px; }

.eyebrow {
  margin: 0 0 14px;
  color: #737267;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.18em;
}

h1 {
  max-width: 8em;
  margin: 0;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: clamp(46px, 6vw, 76px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.intro-copy {
  max-width: 420px;
  margin: 26px 0 0;
  color: #66665d;
  font-size: 17px;
  line-height: 1.75;
}

.privacy-note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 34px;
  color: #77766d;
  font-size: 13px;
}

.privacy-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d78c3c;
  box-shadow: 0 0 0 5px rgba(215, 140, 60, 0.12);
}

.send-card {
  align-self: center;
  width: 100%;
  padding: 28px;
  border: 1px solid rgba(40, 41, 34, 0.09);
  border-radius: 28px;
  background: rgba(255, 255, 252, 0.88);
  box-shadow: 0 28px 80px rgba(49, 47, 38, 0.12);
  backdrop-filter: blur(14px);
}

.service-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 26px;
  color: #74736a;
  font-size: 12px;
}

.service-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #aaa99f;
}

.service-dot.is-online { background: #4d8e78; box-shadow: 0 0 0 4px rgba(77, 142, 120, 0.12); }
.service-dot.is-offline { background: #c9614e; box-shadow: 0 0 0 4px rgba(201, 97, 78, 0.11); }
.service-dot.is-checking { animation: pulse 1.4s ease-in-out infinite; }

.field-group + .field-group {
  margin-top: 22px;
}

label,
.label-row {
  color: #36372f;
  font-size: 13px;
  font-weight: 720;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.label-row > span {
  color: #97968d;
  font-size: 11px;
  font-weight: 500;
}

input[type="url"],
input[type="password"],
input[type="text"],
textarea {
  width: 100%;
  margin-top: 9px;
  padding: 13px 14px;
  border: 1px solid #deddd5;
  border-radius: 13px;
  outline: none;
  color: #24251f;
  background: #fafaf7;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

input {
  min-height: 48px;
}

textarea {
  min-height: 104px;
  resize: vertical;
  line-height: 1.55;
}

input:focus,
textarea:focus {
  border-color: #6f8278;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(75, 107, 93, 0.1);
}

input::placeholder,
textarea::placeholder {
  color: #aaa99f;
}

.field-hint {
  margin: 7px 2px 0;
  color: #98978d;
  font-size: 11px;
  line-height: 1.5;
}

.token-panel {
  margin-top: 22px;
  border-top: 1px solid #e7e5dd;
  border-bottom: 1px solid #e7e5dd;
}

.token-panel summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 2px;
  cursor: pointer;
  list-style: none;
  color: #55564d;
  font-size: 12px;
  font-weight: 700;
}

.token-panel summary::-webkit-details-marker { display: none; }
.token-panel summary::before { content: "+"; margin-right: -6px; color: #8d8c83; }
.token-panel[open] summary::before { content: "−"; }
.token-panel summary span:first-of-type { flex: 1; }
.token-panel summary span:last-child { color: #99988f; font-weight: 500; }
.token-panel.has-token summary span:last-child { color: #4d806e; }

.token-content {
  padding: 3px 0 17px;
}

.token-input-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.token-input-row input {
  min-width: 0;
}

.quiet-button {
  min-width: 62px;
  margin-top: 9px;
  border: 1px solid #deddd5;
  border-radius: 13px;
  color: #5e5f56;
  background: #f4f3ee;
  cursor: pointer;
}

.remember-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  color: #54554c;
  cursor: pointer;
}

.remember-row input {
  width: 17px;
  min-height: auto;
  height: 17px;
  margin: 1px 0 0;
  accent-color: #435f54;
}

.remember-row span {
  display: grid;
  gap: 3px;
}

.remember-row strong {
  font-size: 12px;
}

.remember-row small {
  color: #8a8980;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.5;
}

.form-status {
  margin-top: 18px;
  padding: 12px 13px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.55;
}

.form-status.is-error { color: #8f3f31; background: #fff0ec; }
.form-status.is-success { color: #306c58; background: #eaf6f0; }
.form-status.is-info { color: #665b30; background: #f8f1d9; }

.submit-button {
  position: relative;
  width: 100%;
  min-height: 52px;
  margin-top: 20px;
  border: 0;
  border-radius: 15px;
  overflow: hidden;
  color: #fff;
  background: #282a23;
  box-shadow: 0 12px 24px rgba(40, 42, 35, 0.17);
  cursor: pointer;
  font-size: 14px;
  font-weight: 740;
  transition: transform 120ms ease, background 120ms ease, opacity 120ms ease;
}

.submit-button:hover { background: #34372e; }
.submit-button:active { transform: translateY(1px); }
.submit-button:disabled { cursor: wait; opacity: 0.72; }

.button-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.submit-button.is-loading .button-label { display: none; }
.submit-button.is-loading .button-spinner { display: inline-block; }

.page-footnote {
  grid-column: 2;
  align-self: start;
  margin: 18px 8px 0;
  color: #94938a;
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: 0.35; } }

@media (max-width: 760px) {
  .page-shell {
    display: block;
    padding-top: max(32px, env(safe-area-inset-top));
    padding-bottom: max(52px, env(safe-area-inset-bottom));
  }

  .intro {
    margin: 0 auto 28px;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
    padding: 10px;
    margin-bottom: 24px;
    border-radius: 15px;
  }

  h1 {
    max-width: none;
    font-size: clamp(39px, 12vw, 54px);
  }

  .intro-copy {
    margin-top: 18px;
    font-size: 15px;
  }

  .privacy-note {
    margin-top: 22px;
  }

  .send-card {
    max-width: 520px;
    margin: 0 auto;
    padding: 22px;
    border-radius: 22px;
  }

  .page-footnote {
    margin: 16px auto 0;
    max-width: 440px;
  }
}

@media (max-width: 380px) {
  .page-shell { padding-left: 14px; padding-right: 14px; }
  .send-card { padding: 18px; }
  .token-input-row { display: grid; }
  .quiet-button { min-height: 42px; margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
