/* =============================================
   ザ！不動産登記 - デザインシステム (index.css)
   ============================================= */

/* --- (Fonts loaded via HTML <link> tag) --- */

/* --- CSS Custom Properties --- */
:root {
  /* Colors - Base */
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-tertiary: #1a1f35;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --bg-glass: rgba(255, 255, 255, 0.06);
  --border-glass: rgba(255, 255, 255, 0.1);
  --border-glass-hover: rgba(255, 255, 255, 0.2);

  /* Colors - Text */
  --text-primary: #f0f0f5;
  --text-secondary: #8b8fa3;
  --text-tertiary: #5a5e72;
  --text-inverse: #0a0e1a;

  /* Colors - Accent */
  --gold: #f0c040;
  --gold-light: #f5d76e;
  --gold-dark: #c9a020;
  --gold-glow: rgba(240, 192, 64, 0.3);
  --emerald: #34d399;
  --emerald-glow: rgba(52, 211, 153, 0.25);
  --coral: #f87171;
  --coral-glow: rgba(248, 113, 113, 0.25);
  --sky: #60a5fa;
  --sky-glow: rgba(96, 165, 250, 0.25);
  --purple: #a78bfa;
  --purple-glow: rgba(167, 139, 250, 0.25);
  --pink: #f472b6;
  --pink-glow: rgba(244, 114, 182, 0.25);

  /* Typography */
  --font-primary: 'Noto Sans JP', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Inter', 'Noto Sans JP', sans-serif;

  /* Font sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-gold: 0 4px 24px rgba(240, 192, 64, 0.2);
  --shadow-gold-lg: 0 8px 40px rgba(240, 192, 64, 0.3);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.175, 0.885, 0.32, 1.275);

  /* Z-index */
  --z-base: 1;
  --z-card: 10;
  --z-header: 50;
  --z-modal: 100;
  --z-toast: 200;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Global Background Gradient */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(240, 192, 64, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(52, 211, 153, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(167, 139, 250, 0.03) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

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

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

img {
  max-width: 100%;
  display: block;
}

/* --- App Container --- */
#app {
  position: relative;
  z-index: var(--z-base);
  min-height: 100vh;
  min-height: 100dvh;
}

/* --- Screen Management --- */
.screen {
  display: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.screen.active {
  display: block;
}

.screen.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Slide Transitions --- */
.screen.slide-in-right {
  transform: translateX(30px);
  opacity: 0;
}

.screen.slide-in-right.visible {
  transform: translateX(0);
  opacity: 1;
}

.screen.slide-out-left {
  transform: translateX(-30px);
  opacity: 0;
}

/* --- Common Components --- */

/* Container */
.container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 var(--space-5);
}

/* Brand Header */
.brand-header {
  text-align: center;
  padding: var(--space-8) 0 var(--space-4);
}

.brand-logo {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 2px 8px var(--gold-glow));
}

.brand-logo .accent {
  font-size: var(--text-4xl);
}

.brand-tagline {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: var(--space-2);
  letter-spacing: 0.08em;
}

/* Section Title */
.section-title {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-2);
  line-height: 1.4;
}

.section-subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-6);
}

/* Glass Card */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  transition: all var(--transition-base);
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glass-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
  font-weight: 700;
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn:hover::after {
  opacity: 1;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold-dark));
  color: var(--text-inverse);
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
  box-shadow: var(--shadow-gold-lg);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
}

.btn-secondary:hover {
  border-color: var(--border-glass-hover);
  background: var(--bg-card-hover);
}

.btn-full {
  width: 100%;
}

.btn-lg {
  padding: var(--space-5) var(--space-8);
  font-size: var(--text-lg);
  border-radius: var(--radius-xl);
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  border-radius: var(--radius-md);
}

/* Choice Cards (Radio/Checkbox alternatives) */
.choice-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.choice-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--bg-glass);
  border: 1.5px solid var(--border-glass);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  user-select: none;
}

.choice-card:hover {
  border-color: var(--border-glass-hover);
  background: var(--bg-card-hover);
}

.choice-card.selected {
  border-color: var(--gold);
  background: rgba(240, 192, 64, 0.08);
  box-shadow: 0 0 0 1px var(--gold), inset 0 0 20px rgba(240, 192, 64, 0.05);
}

.choice-card .choice-radio {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  border: 2px solid var(--text-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-base);
}

.choice-card.selected .choice-radio {
  border-color: var(--gold);
  background: var(--gold);
}

.choice-card.selected .choice-radio::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--text-inverse);
}

.choice-card .choice-icon {
  font-size: var(--text-2xl);
  flex-shrink: 0;
}

.choice-card .choice-text {
  flex: 1;
}

.choice-card .choice-label {
  font-size: var(--text-base);
  font-weight: 600;
}

.choice-card .choice-desc {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin-top: var(--space-1);
}

/* Progress Bar */
.progress-bar-container {
  padding: var(--space-4) 0;
}

.progress-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.progress-steps::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--bg-tertiary);
  transform: translateY(-50%);
  z-index: 0;
}

.progress-track {
  position: absolute;
  top: 50%;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transform: translateY(-50%);
  transition: width var(--transition-slow);
  z-index: 1;
}

.progress-step {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  border: 2px solid var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-tertiary);
  z-index: 2;
  position: relative;
  transition: all var(--transition-base);
}

.progress-step.completed {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--text-inverse);
}

.progress-step.current {
  background: var(--bg-primary);
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 0 0 4px rgba(240, 192, 64, 0.2);
}

.progress-step .step-check {
  display: none;
}

.progress-step.completed .step-number {
  display: none;
}

.progress-step.completed .step-check {
  display: block;
  font-size: var(--text-sm);
}

/* Info Box */
.info-box {
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  border-left: 3px solid;
  margin: var(--space-4) 0;
}

.info-box.gold {
  background: rgba(240, 192, 64, 0.08);
  border-color: var(--gold);
}

.info-box.emerald {
  background: rgba(52, 211, 153, 0.08);
  border-color: var(--emerald);
}

.info-box.coral {
  background: rgba(248, 113, 113, 0.08);
  border-color: var(--coral);
}

.info-box-title {
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.info-box-text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Checklist */
.checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  cursor: pointer;
}

.checklist-item:hover {
  border-color: var(--border-glass-hover);
}

.checklist-item.checked {
  border-color: var(--emerald);
  background: rgba(52, 211, 153, 0.06);
}

.checklist-checkbox {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--text-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all var(--transition-base);
}

.checklist-item.checked .checklist-checkbox {
  background: var(--emerald);
  border-color: var(--emerald);
}

.checklist-item.checked .checklist-checkbox::after {
  content: '✓';
  color: white;
  font-size: var(--text-sm);
  font-weight: 700;
}

.checklist-item.checked .checklist-text {
  text-decoration: line-through;
  opacity: 0.6;
}

.checklist-title {
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.checklist-desc {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 700;
  border-radius: var(--radius-full);
  letter-spacing: 0.03em;
}

.badge-gold {
  background: rgba(240, 192, 64, 0.15);
  color: var(--gold);
}

.badge-emerald {
  background: rgba(52, 211, 153, 0.15);
  color: var(--emerald);
}

.badge-coming {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-tertiary);
}

/* Divider */
.divider {
  height: 1px;
  background: var(--border-glass);
  margin: var(--space-6) 0;
}

/* Big Number / Stat */
.stat-highlight {
  text-align: center;
  padding: var(--space-6) 0;
}

.stat-number {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: var(--space-1);
}

/* Spacer */
.spacer-sm { height: var(--space-4); }
.spacer-md { height: var(--space-8); }
.spacer-lg { height: var(--space-12); }

/* Bottom Safe Area (mobile) */
.bottom-safe {
  height: calc(env(safe-area-inset-bottom, 0px) + var(--space-8));
}

/* Sticky Bottom Action */
.sticky-bottom {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-4) var(--space-5);
  background: linear-gradient(to top, var(--bg-primary) 60%, transparent);
  z-index: var(--z-header);
}

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 8px var(--gold-glow); }
  50% { box-shadow: 0 0 20px var(--gold-glow), 0 0 40px rgba(240, 192, 64, 0.1); }
}

@keyframes checkmark {
  0% { transform: scale(0) rotate(-45deg); opacity: 0; }
  50% { transform: scale(1.2) rotate(0deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 0.4;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

.animate-in {
  animation: fadeInUp 0.5s ease-out forwards;
}

.animate-delay-1 { animation-delay: 0.1s; opacity: 0; }
.animate-delay-2 { animation-delay: 0.2s; opacity: 0; }
.animate-delay-3 { animation-delay: 0.3s; opacity: 0; }
.animate-delay-4 { animation-delay: 0.4s; opacity: 0; }
.animate-delay-5 { animation-delay: 0.5s; opacity: 0; }
.animate-delay-6 { animation-delay: 0.6s; opacity: 0; }

/* --- Responsive --- */
@media (min-width: 768px) {
  .container {
    max-width: 520px;
    padding: 0 var(--space-8);
  }

  .brand-logo {
    font-size: var(--text-4xl);
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 560px;
  }
}

/* --- Utility Classes --- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-gold { color: var(--gold); }
.text-emerald { color: var(--emerald); }
.text-coral { color: var(--coral); }
.text-muted { color: var(--text-secondary); }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.hidden { display: none !important; }
.w-100 { width: 100%; }

/* サブモード共通プログレスバー */
.wizard-progress {
  padding: var(--space-2) var(--space-5);
  max-width: 480px;
  margin: 0 auto;
}
.progress-bar {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--space-1);
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
}
.progress-text {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  text-align: right;
}

/* サブモードのモードヘッダー用タイトル */
.mode-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-primary);
}

/* choice-cards は choice-group のエイリアス */
.choice-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* スキャン結果プレビュー */
.scan-result {
  padding: var(--space-3);
  background: rgba(52, 211, 153, 0.05);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
}
.scan-result-title {
  font-weight: 700;
  color: var(--emerald);
  margin-bottom: var(--space-2);
  font-size: var(--text-xs);
}
.scan-result-row {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  gap: var(--space-3);
}
.scan-result-row:last-child { border-bottom: none; }
.scan-result-row span:first-child { color: var(--text-tertiary); flex-shrink: 0; }
.scan-result-row span:last-child  { color: var(--text-primary); font-weight: 600; text-align: right; }

/* 撮影済みボタン */
.scan-btn.scan-complete,
.scan-btn-used.scan-complete {
  background: rgba(52, 211, 153, 0.08) !important;
  border-color: rgba(52, 211, 153, 0.3) !important;
  border-style: solid !important;
  color: var(--emerald) !important;
  pointer-events: none;
}

/* カメラ用隠し input */
.camera-input { display: none; }

/* 撮影プレビュー画像 */
.scan-photo-preview {
  margin-top: var(--space-3);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(52,211,153,0.2);
}
.scan-photo-preview img {
  width: 100%;
  height: auto;
  display: block;
}

/* ========================================
   決済モーダル (PaymentModal)
   ======================================== */
.pm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  align-items: flex-end;
}
.pm-overlay.open { display: flex; }

.pm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.pm-sheet {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: #111827;
  border-top: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px 20px 0 0;
  padding: 24px 20px calc(env(safe-area-inset-bottom, 0px) + 24px);
  max-height: 92vh;
  overflow-y: auto;
  animation: sheetUp 0.35s cubic-bezier(0.175,0.885,0.32,1.275);
}
@keyframes sheetUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.pm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.pm-title {
  font-size: 1.1rem;
  font-weight: 800;
}
.pm-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: var(--text-secondary);
  font-size: 0.8rem;
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer;
  transition: background var(--transition-fast);
}
.pm-close:hover { background: rgba(255,255,255,0.14); }

.pm-amount-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(240,192,64,0.08);
  border: 1px solid rgba(240,192,64,0.2);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 20px;
}
.pm-amount-label { font-size: 0.85rem; color: var(--text-secondary); }
.pm-amount-value { font-size: 1.3rem; font-weight: 900; color: var(--gold); }
.pm-amount-value small { font-size: 0.65rem; color: var(--text-tertiary); margin-left: 2px; }

.pm-form { display: flex; flex-direction: column; gap: 14px; }
.pm-field { display: flex; flex-direction: column; gap: 6px; position: relative; }
.pm-row { display: flex; gap: 12px; }
.pm-row .pm-field { flex: 1; }

.pm-label { font-size: 0.75rem; font-weight: 700; color: var(--text-secondary); letter-spacing: 0.03em; }

.pm-input {
  background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: var(--font-display), monospace;
  padding: 12px 14px;
  outline: none;
  transition: border-color var(--transition-fast);
  width: 100%;
}
.pm-input::placeholder { color: var(--text-tertiary); font-size: 0.9rem; }
.pm-input:focus { border-color: var(--gold); }

.pm-card-icon {
  position: absolute;
  right: 12px;
  bottom: 10px;
  font-size: 1.2rem;
  pointer-events: none;
}

.pm-error {
  color: var(--coral);
  font-size: 0.8rem;
  min-height: 18px;
  padding: 0 2px;
}

.pm-submit-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold-dark));
  color: #0a0e1a;
  font-size: 1.05rem; font-weight: 800;
  border: none; border-radius: 14px;
  cursor: pointer;
  transition: all var(--transition-base);
  margin-top: 4px;
}
.pm-submit-btn:hover { filter: brightness(1.08); }
.pm-submit-btn:active { transform: scale(0.98); }

.pm-processing,
.pm-success {
  text-align: center;
  padding: 32px 0 16px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.pm-spinner {
  width: 48px; height: 48px;
  border: 3px solid rgba(255,255,255,0.08);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.pm-processing-text { font-size: 0.9rem; color: var(--text-secondary); }
.pm-success-icon { font-size: 3rem; }
.pm-success-title { font-size: 1.2rem; font-weight: 800; color: var(--emerald); }
.pm-success-sub { font-size: 0.85rem; color: var(--text-secondary); }

.pm-secure {
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-tertiary);
  margin-top: 16px;
}

/* ========================================
   印刷 / PDF出力用スタイル
   ======================================== */
@media print {
  body { background: white !important; color: black !important; }
  #app, .screen, .shinchiku-screen { display: block !important; opacity: 1 !important; transform: none !important; }
  .mode-header, .progress-bar-container, .wizard-progress,
  .btn, .scan-btn, .scan-btn-used, .quest-action-btn,
  .pm-overlay, .bottom-safe { display: none !important; }
  .print-doc {
    font-family: 'Noto Sans JP', sans-serif;
    color: black;
    padding: 20px;
    max-width: none;
  }
  .print-doc h1 { font-size: 16pt; border-bottom: 2pt solid black; padding-bottom: 6pt; }
  .print-doc table { border-collapse: collapse; width: 100%; }
  .print-doc td, .print-doc th { border: 1pt solid #555; padding: 6pt 8pt; font-size: 10pt; }
}
