/* ============================================================
   Praveru（プラベル）| プラベル取引詳細 再現
   オリジナル: https://app.praveru.jp/o/promises/prmt5bk93rlk6x
   デザインシステム (bundle 4443 / theme から抽出・再現)
   ============================================================ */

:root {
  color-scheme: light;

  /* neutral */
  --praveru-background: #ffffff;
  --praveru-surface: #ffffff;
  --praveru-surface-subtle: #f7f7f8;
  --praveru-text: #242624;
  --praveru-text-muted: #696d69;
  --praveru-border: #d1d1d6;
  --praveru-primary: #1c1c1e;
  --praveru-on-primary: #ffffff;
  --praveru-primary-pressed: #343437;
  --praveru-disabled-surface: #e9e9eb;
  --praveru-disabled-text: #77777c;
  --praveru-overlay: rgba(18, 18, 18, 0.48);
  --praveru-media-background: #000000;
  --praveru-transparent: transparent;

  /* interactive */
  --praveru-interactive-main: #06c755;
  --praveru-interactive-talk: #8fdf81;
  --praveru-interactive-soft: #effaf2;

  /* semantic */
  --praveru-success-main: #06c755;
  --praveru-success-soft: #effaf2;
  --praveru-warning-main: #ff6c33;
  --praveru-warning-soft: #fff8f5;
  --praveru-danger-main: #ff0000;
  --praveru-danger-soft: #fff0f0;
  --praveru-rating-main: #f5b700;
  --praveru-rating-soft: #fff9e6;

  /* shadows */
  --praveru-shadow-soft: 0 2px 12px rgba(0, 0, 0, 0.06);
  --praveru-shadow-floating: 0 16px 40px rgba(0, 0, 0, 0.16);

  /* radii */
  --praveru-radii-control: 12px;
  --praveru-radii-panel: 16px;
  --praveru-radii-modal: 16px;
  --praveru-radii-frame: 24px;
  --praveru-radii-pill: 999px;
  --praveru-radii-circle: 999px;

  /* breakpoints */
  --praveru-breakpoint-tablet: 768px;
  --praveru-breakpoint-desktop: 1024px;

  /* font */
  --praveru-font: -apple-system, BlinkMacSystemFont, 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic UI', sans-serif;

  /* focus */
  --praveru-focus-ring: 0 0 0 3px var(--praveru-interactive-soft);
}

/* ---------- グローバルリセット ---------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body, html {
  background: var(--praveru-background);
  color: var(--praveru-text);
  overflow-x: hidden;
  width: 100%;
}

html {
  height: 100%;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: var(--praveru-font);
  margin: 0;
  max-width: 100vw;
  min-height: 100vh;
  min-height: 100dvh;
  font-size: 16px;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}

a, button, input, select, textarea {
  -webkit-tap-highlight-color: var(--praveru-transparent);
}

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--praveru-interactive-main);
  outline-offset: 3px;
}

ol, ul {
  list-style: none;
}

img, svg {
  height: auto;
  max-width: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- アプリシェル (Kq: H / q) ---------- */
.app-shell {
  min-height: 100vh;
  background: var(--praveru-background);
  color: var(--praveru-text);
  display: flex;
  justify-content: center;
  padding: 0;
  font-family: var(--praveru-font);
}

@media (min-width: 1024px) {
  .app-shell {
    padding: 24px;
  }
}

.app-shell-inner {
  width: min(100%, 1120px);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--praveru-surface);
  border: none;
  border-radius: 0;
  overflow: hidden;
  position: relative;
}

@media (min-width: 1024px) {
  .app-shell-inner {
    min-height: calc(100vh - 48px);
    border: 1px solid var(--praveru-border);
    border-radius: var(--praveru-radii-frame);
    box-shadow: var(--praveru-shadow-soft);
  }
}

.main-content {
  flex: 1;
  background: var(--praveru-background);
  padding: 0;
}

@media (max-width: 767px) {
  .main-content {
    padding-bottom: 80px;
  }
}

/* ---------- 固定ヘッダー (Kq: S / T / C / I / P / R) ---------- */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

@media (min-width: 1024px) {
  .app-header {
    padding-top: 24px;
    background: var(--praveru-background);
  }
}

.app-header-inner {
  width: min(100%, 1120px);
  border-bottom: 1px solid var(--praveru-border);
  background: var(--praveru-surface);
  pointer-events: auto;
  padding-top: env(safe-area-inset-top, 0px);
}

.app-header-grid {
  min-height: 54px;
  width: min(100%, 760px);
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  margin: 0 auto;
  padding: 0 8px;
}

.header-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-title {
  color: var(--praveru-text);
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  margin: 0;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--praveru-radii-circle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--praveru-text);
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.icon-btn:active {
  transform: scale(0.94);
  background: var(--praveru-surface-subtle);
}

@media (prefers-reduced-motion: reduce) {
  .icon-btn {
    transition: none;
  }
}

/* 共有ボタン */
.share-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.copy-tooltip {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--praveru-surface);
  border: 1px solid var(--praveru-border);
  color: var(--praveru-text);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  box-shadow: var(--praveru-shadow-soft);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.copy-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ヘッダー分の余白 (G) */
.header-spacer {
  height: calc(54px + env(safe-area-inset-top, 0px));
}

/* ---------- ページコンテナ (ee) ---------- */
.page-container {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 0 0 20px;
  background: var(--praveru-background);
}

/* ---------- タイトル (ie / ne) ---------- */
.promise-header {
  padding: 16px 20px 18px;
  background: var(--praveru-background);
}

.promise-title {
  color: var(--praveru-text);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
  overflow-wrap: anywhere;
}

/* ---------- ステータスカード (3028) ---------- */
.status-card {
  --summary-accent: var(--praveru-interactive-main);
  --summary-panel: var(--praveru-surface);
  --summary-ink: var(--praveru-text);
  --summary-muted: var(--praveru-text-muted);
  --summary-line: var(--praveru-border);
  --summary-warning-text: var(--praveru-warning-main);
  --summary-danger-text: var(--praveru-danger-main);
  --summary-success-text: var(--praveru-success-main);

  margin: 0 20px 24px;
  padding: 8px 0 0;
  color: var(--summary-ink);
  background: var(--summary-panel);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.status-role {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin: 0 0 8px;
  color: var(--praveru-interactive-main);
  font-size: 0.78em;
  font-weight: 600;
}

.status-label {
  margin: 0;
  color: var(--summary-ink);
  font-size: clamp(1.25em, 5vw, 1.55em);
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.status-desc {
  margin: 9px 0 0;
  color: var(--summary-muted);
  font-size: 0.94em;
  line-height: 1.7;
  white-space: pre-line;
}

.status-details {
  display: grid;
  gap: 12px;
  margin: 16px 0 0;
  border: 0;
}

.status-detail-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(88px, 0.7fr) minmax(0, 1.3fr);
  align-items: baseline;
  gap: 16px;
  padding: 0;
  border: 0;
}

.status-detail-row dt {
  margin: 0;
  color: var(--summary-muted);
  font-size: 0.73em;
  font-weight: 500;
}

.status-detail-row dd {
  margin: 0;
  color: var(--summary-ink);
  font-size: 0.88em;
  font-weight: 600;
  line-height: 1.5;
  text-align: right;
  overflow-wrap: anywhere;
}

.status-detail-row dd.is-emphasis-success { color: var(--summary-success-text); }
.status-detail-row dd.is-emphasis-warning { color: var(--summary-warning-text); }
.status-detail-row dd.is-emphasis-danger  { color: var(--summary-danger-text); }

/* タイムライン */
.timeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.timeline-item {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.timeline-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 8px;
  left: calc(50% + 9px);
  right: calc(-50% + 9px);
  height: 2px;
  background: var(--summary-line);
}

.timeline-item[data-state="completed"]:not(:last-child)::after {
  background: var(--summary-accent);
}

.timeline-dot {
  position: relative;
  z-index: 1;
  width: 18px;
  height: 18px;
  border: 2px solid var(--summary-line);
  border-radius: var(--praveru-radii-circle);
  background: var(--summary-panel);
  box-shadow: none;
}

.timeline-item[data-state="current"] .timeline-dot {
  border-color: var(--summary-accent);
}

.timeline-item[data-state="completed"] .timeline-dot {
  border-color: var(--summary-accent);
  background: var(--summary-accent);
}

.timeline-label {
  color: var(--summary-muted);
  font-size: 0.69em;
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.timeline-item[data-state="current"] .timeline-label {
  color: var(--summary-ink);
  font-weight: 700;
}

.help-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.help-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  color: var(--praveru-interactive-main);
  font-size: 0.85em;
  font-weight: 600;
  text-underline-offset: 3px;
}

.help-link:focus-visible {
  outline: 2px solid var(--praveru-interactive-main);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- セクション (te / oe) ---------- */
.info-section {
  background: var(--praveru-background);
  padding: 18px 20px 0;
}

.section-title {
  color: var(--praveru-text);
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 14px;
}

/* ---------- パネル (kv + re) ---------- */
.panel {
  background: var(--praveru-surface);
  border: 0;
  border-radius: 0;
  padding: 16px 18px;
  margin-bottom: 16px;
}

.info-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.info-row:last-child {
  margin-bottom: 0;
}

.info-label {
  color: var(--praveru-text);
  font-size: 0.95rem;
  font-weight: 700;
}

.info-value {
  color: var(--praveru-text);
  font-size: 0.95rem;
  text-align: right;
  line-height: 1.5;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
}

.info-value-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  min-width: 0;
}

/* 取引相手のお名前チェック吹き出し (ce) */
.name-check {
  align-self: flex-end;
  width: max-content;
  max-width: min(100%, 280px);
  background-color: var(--praveru-interactive-soft);
  color: var(--praveru-interactive-main);
  border: none;
  border-radius: var(--praveru-radii-panel);
  padding: 6px 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.5;
  position: relative;
}

.name-check::after {
  content: '';
  position: absolute;
  top: -6px;
  right: 18px;
  width: 12px;
  height: 12px;
  background-color: var(--praveru-interactive-soft);
  transform: rotate(45deg);
}

/* ---------- 出品者カード (161 UserRow) ---------- */
.user-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 16px 18px;
  background: var(--praveru-surface);
  border: 1px solid var(--praveru-border);
  border-radius: var(--praveru-radii-panel);
  box-shadow: none;
  margin-bottom: 16px;
}

.avatar {
  flex-shrink: 0;
  width: 3.5rem;
  height: 3.5rem;
  background-color: var(--praveru-interactive-soft);
  border-radius: var(--praveru-radii-panel);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--praveru-interactive-main);
}

.avatar svg {
  width: 30px;
  height: 30px;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name-line {
  display: flex;
  align-items: center;
  margin-bottom: 0.25rem;
}

.user-name {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: var(--praveru-text);
  line-height: 1.2;
}

/* 本人確認済バッジ (161 isVerified) */
.verified-badge {
  display: inline-block;
  background-color: #10b981;
  color: #fff;
  border-radius: 12px;
  padding: 2px 6px;
  margin-left: 6px;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.user-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.stars {
  display: flex;
  align-items: center;
  gap: 0.125rem;
}

.stars svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: var(--praveru-rating-main);
}

.rating-text {
  font-size: 0.75rem;
  color: var(--praveru-text-muted);
  white-space: nowrap;
}

.user-active {
  font-size: 0.75rem;
  color: var(--praveru-success-main);
  margin-bottom: 0.25rem;
  font-weight: 500;
  display: flex;
  align-items: center;
}

.active-dot {
  width: 8px;
  height: 8px;
  background-color: var(--praveru-success-main);
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
}

.user-bio {
  font-size: 0.8rem;
  color: var(--praveru-text-muted);
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- 詳細説明 (promise description) ---------- */
.promise-description {
  font-size: 0.95rem;
  color: var(--praveru-text);
  line-height: 1.7;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ---------- 下部固定アクションバー (Re / Me / we / ge / ke) ---------- */
.bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  justify-content: center;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--praveru-background);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

@media (min-width: 1024px) {
  .bottom-bar {
    padding-left: 24px;
    padding-right: 24px;
  }
}

.bottom-bar-inner {
  width: 100%;
}

.bottom-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  width: 100%;
}

.bottom-actions .action-grid {
  display: grid;
  gap: 10px;
  width: 100%;
}

.action-btn {
  width: 100%;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--praveru-radii-control);
  border: 0;
  font-size: 1rem;
  font-weight: 700;
  -webkit-tap-highlight-color: transparent;
}

/* プライマリ(濃紺)ボタン — ke の $primary は vars.primary (#1c1c1e) を使用 */
.action-btn.primary {
  background: var(--praveru-primary);
  color: var(--praveru-on-primary);
}

/* アウトライン(緑文字)ボタン */
.action-btn.outline {
  background: var(--praveru-transparent);
  color: var(--praveru-interactive-main);
}

.action-btn:disabled {
  border-color: var(--praveru-transparent);
  background: var(--praveru-disabled-surface);
  color: var(--praveru-disabled-text);
  opacity: 1;
  cursor: not-allowed;
}

/* デフォルト(デスクトップ): 「アプリで開く」非表示、「購入する」= プライマリ(濃紺) */
.app-open-btn {
  display: none;
}

.buy-btn {
  background: var(--praveru-primary);
  color: var(--praveru-on-primary);
}

/* ---------- 下部バー分の余白 (Ue) ---------- */
.bottom-spacer {
  height: calc(76px + env(safe-area-inset-bottom, 0px));
}

/* ============================================================
   モバイル(UA判定による).praveru-mobile
   実サイトは UA でモバイル判定し「アプリで開く」表示 + 「購入する」アウトライン化
   ============================================================ */
body.praveru-mobile .app-open-btn {
  display: inline-flex;
}

body.praveru-mobile .buy-btn {
  background: var(--praveru-transparent);
  color: var(--praveru-interactive-main);
}

body.praveru-mobile .bottom-spacer {
  height: calc(138px + env(safe-area-inset-bottom, 0px));
}

/* ---------- プル更新インジケーター (642: D / M / L / U / z / F) ---------- */
.ptr-indicator {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 10px);
  left: 50%;
  z-index: 1400;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--praveru-interactive-main);
  border-radius: 999px;
  background: var(--praveru-surface);
  box-shadow: var(--praveru-shadow-floating);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  pointer-events: none;
  transform: translate3d(-50%, -18px, 0) scale(0.94);
  opacity: 0;
  transition: transform 160ms cubic-bezier(0.22, 1, 0.36, 1), opacity 160ms ease;
}

.ptr-indicator.is-visible {
  transform: translate3d(-50%, var(--ptr-offset, 0px), 0) scale(1);
  opacity: 1;
}

.ptr-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--praveru-surface-subtle);
  color: var(--praveru-text-muted);
}

.ptr-icon.is-ready {
  background: var(--praveru-interactive-soft);
  color: var(--praveru-interactive-main);
}

.ptr-icon svg {
  width: 14px;
  height: 14px;
  transition: transform 160ms ease;
}

.ptr-icon.is-ready svg {
  transform: rotate(180deg);
}

.ptr-icon.is-refreshing svg {
  animation: ptr-spin 0.9s linear infinite;
}

@keyframes ptr-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.ptr-text-col {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
}

.ptr-text {
  color: var(--praveru-text);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.ptr-track {
  width: 84px;
  height: 3px;
  border-radius: 999px;
  background: var(--praveru-border);
  overflow: hidden;
}

.ptr-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: var(--praveru-interactive-main);
  transition: width 120ms ease, background-color 120ms ease;
}

/* ============================================================
   ログインページ (chunk 8348) — /auth/login 再現
   ============================================================ */

/* ログインページは main のモバイル下部パディングを打ち消す（実サイトは padding:0） */
body.praveru-login-page .main-content {
  padding-bottom: 0;
}

/* ---------- コンテナ (y) ---------- */
.auth-container {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* ---------- カード (j: kv 継承) ---------- */
.auth-card {
  width: 100%;
  padding: 22px 4px 24px;
  background: var(--praveru-surface);
  border: 0;
  border-radius: 0;
}

/* ---------- ヘッダー (b / $ / w) ---------- */
.auth-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 16px;
}

.auth-title {
  color: var(--praveru-text);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 6px;
}

.auth-sub {
  color: var(--praveru-text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
  margin: 0;
}

/* ---------- タブ (A / k) ---------- */
.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 18px;
}

.auth-tab {
  min-height: 44px;
  border-radius: 0;
  border: 0;
  border-bottom: 2px solid var(--praveru-border);
  background: var(--praveru-transparent);
  color: var(--praveru-text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  -webkit-tap-highlight-color: transparent;
}

.auth-tab.is-active {
  border-bottom-color: var(--praveru-interactive-main);
  color: var(--praveru-interactive-main);
  font-weight: 700;
}

/* ---------- フォーム (z / C / S / M / F / U) ---------- */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-field {
  display: grid;
  gap: 7px;
}

.auth-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--praveru-text);
  font-size: 0.88rem;
  font-weight: 600;
}

.auth-required {
  color: var(--praveru-danger-main);
  font-size: 0.72rem;
  font-weight: 600;
}

.auth-optional {
  color: var(--praveru-text-muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.auth-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--praveru-border);
  border-radius: var(--praveru-radii-control);
  background: var(--praveru-surface);
  color: var(--praveru-text-muted);
}

.auth-input-wrap:focus-within {
  border-color: var(--praveru-interactive-main);
  box-shadow: var(--praveru-focus-ring);
}

.auth-input-wrap.is-invalid {
  border-color: var(--praveru-danger-main);
}

.auth-input-wrap input {
  width: 100%;
  min-height: 48px;
  padding: 0;
  border: none;
  outline: none;
  background: var(--praveru-transparent);
  color: var(--praveru-text);
  font-family: inherit;
  font-size: 0.95rem;
}

.auth-input-wrap input::placeholder {
  color: var(--praveru-text-muted);
}

.auth-input-wrap input:disabled {
  color: var(--praveru-disabled-text);
  cursor: not-allowed;
}

.auth-input-wrap input:focus-visible {
  outline: none;
  outline-offset: 0;
  box-shadow: none;
}

/* ---------- エラー / 情報 (D / I) ---------- */
.auth-error {
  color: var(--praveru-danger-main);
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 0;
}

.auth-info {
  color: var(--praveru-success-main);
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 0;
}

/* 実サイトはエラー・情報要素をエラー時のみレンダリングするため、空要素は非表示 */
.auth-error:empty,
.auth-info:empty {
  display: none;
}

/* ---------- 送信ボタン (T: g9 primary) ---------- */
.auth-submit {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--praveru-transparent);
  border-radius: var(--praveru-radii-control);
  background: var(--praveru-primary);
  color: var(--praveru-on-primary);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.auth-submit:active {
  background: var(--praveru-primary-pressed);
  transform: translateY(1px);
}

.auth-submit:disabled {
  border-color: var(--praveru-transparent);
  background: var(--praveru-disabled-surface);
  color: var(--praveru-disabled-text);
  cursor: not-allowed;
  transform: none;
}

/* ---------- アウトラインボタン (E: g9 outline) ---------- */
.auth-outline {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--praveru-transparent);
  border-radius: var(--praveru-radii-control);
  background: var(--praveru-transparent);
  color: var(--praveru-interactive-main);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.45;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.auth-outline:active {
  transform: translateY(1px);
}

.auth-outline:disabled {
  border-color: var(--praveru-transparent);
  background: var(--praveru-disabled-surface);
  color: var(--praveru-disabled-text);
  cursor: not-allowed;
  transform: none;
}

/* ---------- パスワードを忘れた方はこちら (P) ---------- */
.auth-forgot {
  align-self: center;
  border: none;
  background: var(--praveru-transparent);
  color: var(--praveru-text);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.auth-forgot:hover {
  text-decoration: underline;
}

.auth-forgot:disabled {
  color: var(--praveru-disabled-text);
  cursor: not-allowed;
  text-decoration: none;
}

/* ---------- 区切り「または」 (N) ---------- */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 24px 0 8px;
  color: var(--praveru-text-muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--praveru-border);
}

/* ---------- ソーシャルボタン (W) ---------- */
.auth-social {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: var(--praveru-radii-control);
  border: 1px solid var(--praveru-border);
  background: var(--praveru-surface);
  color: var(--praveru-text);
  font-size: 0.95rem;
  font-weight: 700;
  -webkit-tap-highlight-color: transparent;
}

.auth-social + .auth-social {
  margin-top: 10px;
}

.auth-social.is-apple {
  border-color: var(--praveru-primary);
  background: var(--praveru-primary);
  color: var(--praveru-on-primary);
}

/* ---------- フッター (Y / G) ---------- */
.auth-footer {
  margin-top: 24px;
  color: var(--praveru-text-muted);
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.6;
}

.auth-footer-link {
  color: var(--praveru-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 700;
  white-space: nowrap;
}

/* ---------- Welcomeへ戻る (H) ---------- */
.auth-welcome {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  margin-top: 0;
  color: var(--praveru-text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
}

/* ---------- パスワード再設定モーダル (ie / te / ne / se / le / ae) ---------- */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--praveru-overlay);
  visibility: hidden;
  opacity: 0;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.auth-modal-overlay.is-open {
  visibility: visible;
  opacity: 1;
}

.auth-modal {
  width: min(100%, 420px);
  padding: 22px;
  border-radius: var(--praveru-radii-panel);
  box-shadow: var(--praveru-shadow-floating);
  background: var(--praveru-surface);
  border: 1px solid var(--praveru-border);
}

.auth-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.auth-modal-title {
  color: var(--praveru-text);
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.5;
  margin: 0;
}

.auth-modal-close {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: none;
  border-radius: 999px;
  background: var(--praveru-background);
  color: var(--praveru-text-muted);
  font-size: 1.25rem;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}

.auth-modal-desc {
  margin-bottom: 14px;
  color: var(--praveru-text-muted);
  font-size: 0.88rem;
  line-height: 1.7;
}

/* ---------- ログイン成功時の読み込み画面 (module 8903: Z.A) ---------- */
.auth-loading {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--praveru-background);
  padding: 32px 20px;
  text-align: center;
}

.auth-loading.is-visible {
  display: flex;
}

.auth-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--praveru-border);
  border-top-color: var(--praveru-interactive-main);
  border-radius: 999px;
  animation: auth-spin 0.9s linear infinite;
}

@keyframes auth-spin {
  to { transform: rotate(360deg); }
}

.auth-loading-text {
  color: var(--praveru-text);
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

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





