:root {
  --au-black: #0a0a0c;
  --au-white: #ffffff;
  --au-page: #f7f7f5;
  --au-line: #e6e6e8;
  --au-muted: #77777f;
  --au-lime: #a6ff00;
  --au-lime-soft: #d8ff8a;
  --au-danger: #b42318;
  --au-danger-bg: #fff6f5;
  --au-danger-line: #f0b7b2;
  --au-radius: 24px;
  --au-field-radius: 14px;
  --au-header-height: 76px;
}

.au-body,
.au-body *,
.au-body *::before,
.au-body *::after {
  box-sizing: border-box;
}

.au-body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;

  margin: 0;

  color: var(--au-black);
  background: var(--au-page);

  font-family:
    system-ui,
    "Segoe UI",
    "Hiragino Sans",
    "Noto Sans JP",
    sans-serif;
}

.au-body button,
.au-body input {
  font: inherit;
}

.au-body [hidden] {
  display: none !important;
}

.au-main {
  display: flex;
  align-items: flex-start;
  justify-content: center;

  min-height: 100vh;
  min-height: 100dvh;

  padding:
    calc(var(--au-header-height) + 46px)
    20px
    56px;
}

.au-card {
  width: 100%;
  max-width: 480px;

  padding: 34px;

  background: var(--au-white);
  border: 1px solid var(--au-line);
  border-radius: var(--au-radius);
}

.au-brand {
  display: flex;
  justify-content: center;

  margin-bottom: 20px;
}

.au-brand-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 16px;
}

.au-brand-logo {
  display: block;

  width: 64px;
  height: 64px;

  object-fit: contain;
}

.au-heading {
  margin-bottom: 26px;

  text-align: center;
}

.au-title {
  margin: 0;

  color: var(--au-black);

  font-size: clamp(24px, 5vw, 30px);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.au-lead {
  margin: 9px 0 0;

  color: var(--au-muted);

  font-size: 14px;
  line-height: 1.7;
}

.au-message {
  margin-bottom: 20px;
  padding: 13px 14px;

  color: var(--au-black);
  background: var(--au-page);
  border: 1px solid var(--au-line);
  border-radius: 14px;

  font-size: 13px;
  font-weight: 650;
  line-height: 1.65;
}

.au-message[data-kind="error"] {
  color: var(--au-danger);
  background: var(--au-danger-bg);
  border-color: var(--au-danger-line);
}

.au-message[data-kind="success"] {
  border-color: #b8d979;
  background: #f8ffe9;
}

.au-form {
  display: grid;
  gap: 18px;
}

.au-field {
  min-width: 0;
}

.au-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;

  margin-bottom: 8px;
}

.au-label {
  display: block;

  margin: 0 0 8px;

  color: var(--au-black);

  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.au-label-row .au-label {
  margin-bottom: 0;
}

.au-input {
  display: block;

  width: 100%;
  min-height: 52px;

  padding: 0 14px;

  color: var(--au-black);
  background: var(--au-white);

  border: 1px solid #cfcfd3;
  border-radius: var(--au-field-radius);

  font-size: 16px;
  line-height: 1.4;

  outline: none;

  transition:
    border-color 120ms ease,
    box-shadow 120ms ease;
}

.au-input:hover {
  border-color: #9b9ba1;
}

.au-input:focus-visible {
  border-color: var(--au-black);
  box-shadow: 0 0 0 3px var(--au-lime);
}

.au-input[aria-invalid="true"] {
  border-color: var(--au-danger);
}

.au-input[aria-invalid="true"]:focus-visible {
  border-color: var(--au-danger);
  box-shadow: 0 0 0 3px var(--au-lime);
}

.au-field-help {
  margin: 7px 1px 0;

  color: var(--au-muted);

  font-size: 12px;
  line-height: 1.5;
}

.au-field-error {
  display: flex;
  align-items: flex-start;
  gap: 5px;

  margin: 7px 1px 0;

  color: var(--au-danger);

  font-size: 12px;
  font-weight: 650;
  line-height: 1.55;
}

.au-error-mark {
  flex: 0 0 auto;

  font-weight: 900;
}

.au-primary-button,
.au-secondary-button,
.au-provider-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  min-height: 52px;

  padding: 0 18px;

  border-radius: 999px;

  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;

  cursor: pointer;

  transition:
    color 120ms ease,
    background-color 120ms ease,
    border-color 120ms ease,
    opacity 120ms ease;
}

.au-primary-button {
  color: var(--au-white);
  background: var(--au-black);
  border: 1px solid var(--au-black);
}

.au-primary-button:hover:not(:disabled) {
  color: var(--au-black);
  background: var(--au-lime);
  border-color: var(--au-lime);
}

.au-secondary-button {
  color: var(--au-black);
  background: var(--au-white);
  border: 1px solid var(--au-line);
}

.au-secondary-button:hover:not(:disabled) {
  border-color: var(--au-black);
}

.au-primary-button:disabled,
.au-secondary-button:disabled,
.au-provider-button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.au-password-stage {
  display: grid;
  gap: 18px;
}

.au-account-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 12px;

  min-width: 0;

  padding: 13px 14px;

  background: var(--au-page);
  border: 1px solid var(--au-line);
  border-radius: 14px;
}

.au-account-summary-label {
  grid-column: 1 / -1;

  color: var(--au-muted);

  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}

.au-account-summary-value {
  min-width: 0;
  overflow: hidden;

  color: var(--au-black);

  font-size: 13px;
  font-weight: 750;
  line-height: 1.5;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.au-text-button,
.au-inline-link-button,
.au-secondary-text-button {
  margin: 0;
  padding: 0;

  color: var(--au-black);
  background: transparent;
  border: 0;

  font-size: 12px;
  font-weight: 750;
  line-height: 1.5;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;

  cursor: pointer;
}

.au-text-button {
  align-self: center;
}

.au-inline-link-button {
  flex: 0 0 auto;
}

.au-text-button:hover,
.au-inline-link-button:hover,
.au-secondary-text-button:hover {
  text-decoration-thickness: 2px;
}

.au-new-account {
  display: grid;
  gap: 5px;

  padding-top: 2px;

  text-align: center;
}

.au-new-account-label {
  color: var(--au-muted);

  font-size: 12px;
  line-height: 1.4;
}

.au-secondary-text-button {
  justify-self: center;

  font-size: 13px;
}

.au-signup-stage {
  display: grid;
  gap: 20px;
}

.au-section-heading {
  text-align: center;
}

.au-section-title {
  margin: 0;

  color: var(--au-black);

  font-size: 21px;
  font-weight: 800;
  line-height: 1.35;
}

.au-section-text {
  margin: 6px 0 0;

  color: var(--au-muted);

  font-size: 13px;
  line-height: 1.6;
}

.au-divider {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;

  margin: 25px 0 18px;
}

.au-divider-line {
  height: 1px;

  background: var(--au-line);
}

.au-divider-text {
  color: var(--au-muted);

  font-size: 12px;
  line-height: 1;
}

.au-provider-list {
  display: grid;
  gap: 10px;
}

.au-provider-button {
  position: relative;

  color: var(--au-black);
  background: var(--au-white);
  border: 1px solid var(--au-line);
}

.au-provider-button:hover:not(:disabled) {
  background: var(--au-page);
  border-color: #c3c3c8;
}

.au-provider-icon {
  position: absolute;
  left: 17px;

  display: block;

  width: 20px;
  height: 20px;
}

.au-legal {
  margin-top: 25px;
  padding-top: 20px;

  border-top: 1px solid var(--au-line);

  color: var(--au-muted);

  font-size: 11px;
  line-height: 1.7;
  text-align: center;
}

.au-legal p {
  margin: 0;
}

.au-legal p + p {
  margin-top: 8px;
}

.au-legal a {
  color: var(--au-black);
  font-weight: 700;
  text-underline-offset: 2px;
}

.au-legal a:hover {
  text-decoration-thickness: 2px;
}

.au-body a:focus-visible,
.au-body button:focus-visible {
  outline: 3px solid var(--au-lime);
  outline-offset: 3px;
}

.au-body .au-input:focus-visible {
  outline: 0;
}

@media (max-width: 520px) {
  .au-main {
    padding:
      calc(var(--au-header-height) + 24px)
      14px
      32px;
  }

  .au-card {
    padding: 26px 22px;

    border-radius: 22px;
  }
}

@media (max-width: 390px) {
  .au-main {
    padding-right: 10px;
    padding-left: 10px;
  }

  .au-card {
    padding: 24px 18px;
  }

  .au-title {
    font-size: 24px;
  }

  .au-account-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .au-text-button {
    justify-self: start;

    margin-top: 4px;
  }

  .au-label-row {
    display: block;
  }

  .au-label-row .au-label {
    margin-bottom: 5px;
  }

  .au-inline-link-button {
    margin-bottom: 8px;
  }
}

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

/* ---- ログイン方法のひも付け（2026-10-02 追加） ---- */
/* =========================
   ログイン方法のひも付け
   ========================= */

/*
 * account-exists-with-different-credential のときなど、
 * 「エラー」ではなく次に何をすればよいかを案内する表示。
 */
.au-message[data-kind="notice"] {
  color: var(--au-black);
  background: #f8ffe9;
  border-color: #c9e88b;
}

.au-login-methods {
  display: grid;
  gap: 18px;
}

.au-link-method-message {
  margin: 0;
}

.au-auth-method-list {
  display: grid;
  gap: 10px;
}

.au-auth-method-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;

  min-height: 68px;

  padding: 12px 14px;

  background: var(--au-white);
  border: 1px solid var(--au-line);
  border-radius: 14px;
}

.au-auth-method-main {
  display: grid;
  gap: 4px;

  min-width: 0;
}

.au-auth-method-name {
  color: var(--au-black);

  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
}

.au-auth-method-status {
  color: var(--au-muted);

  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.au-auth-method-status[data-linked="true"] {
  color: var(--au-black);
  font-weight: 750;
}

.au-auth-method-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 108px;
  min-height: 48px;

  padding: 0 16px;

  color: var(--au-black);
  background: var(--au-white);
  border: 1px solid #cfcfd3;
  border-radius: 999px;

  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;

  cursor: pointer;

  transition:
    color 120ms ease,
    background-color 120ms ease,
    border-color 120ms ease,
    opacity 120ms ease;
}

.au-auth-method-button:hover:not(:disabled) {
  color: var(--au-black);
  background: var(--au-lime);
  border-color: var(--au-lime);
}

.au-auth-method-button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.au-login-method-note {
  margin: -2px 2px 0;

  color: var(--au-muted);

  font-size: 11px;
  line-height: 1.65;
}

@media (max-width: 390px) {
  .au-auth-method-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .au-auth-method-button {
    width: 100%;
  }
}

/* ---- PC をつなぐ（activate.html・アカウントの「つないだ PC」）2026-10-03 ---- */
/* =========================
   NEXORIA PC 接続
   ========================= */

.au-activate-confirm,
.au-device-limit,
.au-activate-success {
  display: grid;
  gap: 18px;
}

.au-code-input {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
}

.au-code-check {
  padding: 18px;

  text-align: center;

  background: var(--au-page);
  border: 1px solid var(--au-line);
  border-radius: 16px;
}

.au-code-check p {
  margin: 0 0 10px;

  color: var(--au-muted);

  font-size: 13px;
  line-height: 1.6;
}

.au-code-display {
  display: block;

  color: var(--au-black);

  font-size: clamp(24px, 8vw, 34px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.12em;
}

.au-device-list {
  display: grid;
  gap: 10px;
}

.au-device-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;

  padding: 14px;

  background: var(--au-white);
  border: 1px solid var(--au-line);
  border-radius: 14px;
}

.au-device-row-main {
  display: grid;
  gap: 4px;

  min-width: 0;
}

.au-device-row-name {
  overflow: hidden;

  color: var(--au-black);

  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.au-device-row-meta {
  color: var(--au-muted);

  font-size: 11px;
  line-height: 1.55;
}

.au-device-count {
  margin: 0;

  color: var(--au-muted);

  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 520px) {
  .au-device-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .au-device-row .au-auth-method-button {
    width: 100%;
  }
}
