:root {
  --dm-account-paper: #fff8ed;
  --dm-account-card: #fff;
  --dm-account-ink: #18202c;
  --dm-account-muted: #667085;
  --dm-account-line: #ded8ca;
  --dm-account-primary: #1677d2;
  --dm-account-accent: #b8322c;
  --dm-account-success: #157347;
  --dm-account-warning: #9a5b00;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 4%, rgba(255, 204, 92, .24), transparent 24rem),
    var(--dm-account-paper);
  color: var(--dm-account-ink);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
}

.dm-account-main [hidden] { display: none !important; }
.dm-account-main {
  overflow-wrap: anywhere;
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0 72px;
}

.dm-account-intro {
  max-width: 760px;
}

.dm-account-eyebrow {
  margin: 0;
  color: var(--dm-account-accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .16em;
}

.dm-account-intro h1 {
  margin: 8px 0 12px;
  font-size: clamp(26px, 5vw, 36px);
  line-height: 1.15;
}

.dm-account-intro > p:last-child {
  margin-bottom: 0;
}

.dm-account-intro p { line-height: 1.8; }
.dm-account-intro .dm-account-benefit { margin: 12px 0 8px; color: #0058a8; font-size: clamp(18px, 3vw, 22px); font-weight: 800; }
.dm-account-current .dm-account-signed-in { color: #0058a8; font-size: 20px; font-weight: 800; }
.dm-account-current h1 { margin-top: 0; margin-bottom: 10px; }
.dm-account-field .dm-account-help { margin: 0; font-size: 13px; font-weight: 500; line-height: 1.7; color: #405a70; }
.dm-account-field .dm-account-field-error { margin: 0; font-size: 14px; font-weight: 700; line-height: 1.65; color: #a42318; }
.dm-account-field .dm-account-field-error:not([hidden])::before { content: "! "; }
.dm-account-field [aria-invalid="true"] { border: 2px solid #b42318; }
.dm-account-password { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.dm-account-field input, .dm-account-field select { min-width: 0; font-size: 16px; }
.dm-account-reveal { min-height: 48px; padding: 8px 10px; border: 1px solid #83bedc; border-radius: 11px; background: #f1faff; color: #064b88; font: inherit; font-size: 14px; cursor: pointer; }
.dm-account-reveal:focus-visible { outline: 3px solid #a35c00; outline-offset: 3px; }
.dm-account-reveal:disabled { opacity: .55; cursor: wait; }
.dm-account-status {
  margin: 24px 0;
  padding: 13px 16px;
  border: 1px solid var(--dm-account-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .78);
  font-weight: 800;
  line-height: 1.6;
}

.dm-account-status[data-kind="success"] {
  border-color: #9bd2b5;
  color: var(--dm-account-success);
}

.dm-account-status[data-kind="warning"] {
  border-color: #efc16c;
  color: var(--dm-account-warning);
}

.dm-account-status[data-kind="error"] {
  border-color: #f0a09a;
  color: #b42318;
}

.dm-account-current,
.dm-account-card {
  border: 1px solid var(--dm-account-line);
  border-radius: 22px;
  background: var(--dm-account-card);
  box-shadow: 0 16px 40px rgba(38, 31, 20, .08);
}

.dm-account-current {
  padding: 28px;
}

.dm-account-current h1 { font-size: clamp(24px, 5vw, 36px); line-height: 1.5; }
.dm-account-main [tabindex="-1"]:focus-visible { outline: 3px solid #b66b00; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .dm-account-main *, .dm-account-main *::before, .dm-account-main *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.dm-account-current h2,
.dm-account-card h2 {
  margin: 0 0 10px;
}

.dm-account-current p,
.dm-account-card > p {
  color: var(--dm-account-muted);
  font-weight: 650;
  line-height: 1.7;
}

.dm-account-options {
  display: grid;
  gap: 24px;
}

.dm-account-card {
  padding: 26px;
}

.dm-account-card--guest {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 18px;
}

.dm-account-card--guest h2,
.dm-account-card--guest p {
  margin: 0;
}

.dm-account-card--guest p {
  grid-column: 2;
}

.dm-account-card--guest .dm-account-button {
  grid-column: 3;
  grid-row: 1 / span 2;
}

.dm-account-card__icon {
  display: grid;
  grid-row: 1 / span 2;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 15px;
  background: #e9f4ff;
  color: var(--dm-account-primary);
  font-size: 20px;
}

.dm-account-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--dm-account-muted);
  font-size: 13px;
  font-weight: 900;
}

.dm-account-divider::before,
.dm-account-divider::after {
  height: 1px;
  flex: 1;
  background: var(--dm-account-line);
  content: "";
}

.dm-account-forms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.dm-account-field {
  display: grid;
  gap: 7px;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 900;
}

.dm-account-field small {
  color: var(--dm-account-muted);
  font-weight: 650;
}

.dm-account-field input,
.dm-account-field select {
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #aeb7c5;
  border-radius: 11px;
  background: #fff;
  color: var(--dm-account-ink);
  font: inherit;
  font-weight: 650;
  font-size: 16px;
}

.dm-account-field input:focus,
.dm-account-field select:focus {
  border-color: var(--dm-account-primary);
  outline: 3px solid rgba(22, 119, 210, .2);
}

.dm-account-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 16px;
  color: var(--dm-account-muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.55;
}

.dm-account-checkbox input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin: 0;
  accent-color: var(--dm-account-primary);
}

.dm-account-checkbox input:focus-visible {
  outline: 3px solid rgba(22, 119, 210, .25);
  outline-offset: 2px;
}

.dm-account-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.dm-account-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin-top: 18px;
  padding: 11px 20px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font: inherit;
  font-weight: 900;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
}

.dm-account-button--primary {
  background: var(--dm-account-primary);
}

.dm-account-button--accent {
  background: var(--dm-account-accent);
}

.dm-account-button--quiet {
  border: 1px solid var(--dm-account-line);
  background: #fff;
  color: var(--dm-account-ink);
}

.dm-account-button:hover {
  filter: brightness(.94);
}

.dm-account-button:focus-visible {
  outline: 3px solid #f4b400;
  outline-offset: 3px;
}

.dm-account-button:disabled {
  opacity: .55;
  cursor: wait;
}

.dm-account-note {
  margin: 18px 0 0;
  padding: 12px;
  border-radius: 10px;
  background: #fff5dd;
  color: #73510b;
  font-size: 12px;
  line-height: 1.7;
}

.dm-account-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 760px) {
  .dm-account-main {
    width: calc(100% - 20px);
    padding: 28px 0 48px;
  }

  .dm-account-forms {
    grid-template-columns: 1fr;
  }

  .dm-account-card--guest {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .dm-account-card--guest .dm-account-button {
    grid-column: 1 / -1;
    grid-row: auto;
    width: 100%;
  }
}

@media (max-width: 400px) {
  .dm-account-card, .dm-account-current { padding: 20px 16px; }
}
