/*!
 * MAPRISE Auth Pages Stylesheet v1.1
 * ----------------------------------------------------------------------
 * signin.html / pricing.html 等の SaaS UI ページ共通スタイル
 *
 * 【設計方針】
 *   - 既存の index.html（ダークテーマ・#0f1117）には影響を与えない
 *   - CSS 変数はすべて --m- プレフィックスで独立
 *   - MAPRISE ブランドカラー（緑系）のみ使用
 *   - BEM 風命名で衝突回避（.m-hero / .m-card / .m-plan など）
 *   - モバイルファースト設計、ブレークポイント: 480px / 768px / 1024px
 *
 * @author Kinoko (MAPRISE)
 * @version 1.1.0 (2026-04-25) - v19: lang switcher unified
 */

/* =====================================================================
   1. Design Tokens (Brand Colors / Typography / Shadows)
   ===================================================================== */
:root {
  /* ブランドカラー */
  --m-dark:    #085041;  /* ダークグリーン: ヘッダー、見出し */
  --m-primary: #0F6E56;  /* メインブランド: Primary CTA、リンク */
  --m-accent:  #1D9E75;  /* アクセント: 強調、区切り線 */
  --m-light:   #5DCAA5;  /* ライト: アイコン、ピン */
  --m-pale:    #9FE1CB;  /* ペール: 矢印、薄装飾 */
  --m-bg-mint: #E1F5EE;  /* ミント背景: info箱、選択状態 */
  --m-bg-tint: #F0FDF9;  /* 極薄緑: カード背景の微妙な彩り */

  /* セマンティック */
  --m-success: #10B981;
  --m-warning: #F59E0B;
  --m-danger:  #EF4444;

  /* ニュートラル */
  --m-text:     #0F172A;  /* 本文 */
  --m-text-sec: #475569;  /* 副次テキスト */
  --m-text-mut: #94A3B8;  /* 非強調（注記） */
  --m-border:   #E2E8F0;  /* 罫線 */
  --m-border-hv:#CBD5E1;  /* ホバー時の濃い罫線 */
  --m-bg:       #F8FAFC;  /* ページ背景 */
  --m-card:     #FFFFFF;  /* カード */

  /* タイポグラフィ */
  --m-font: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* エレベーション */
  --m-shadow-sm: 0 1px 2px  rgba(8, 80, 65, 0.06);
  --m-shadow-md: 0 4px 12px rgba(8, 80, 65, 0.10);
  --m-shadow-lg: 0 10px 30px rgba(8, 80, 65, 0.15);
  --m-shadow-xl: 0 20px 40px rgba(8, 80, 65, 0.18);

  /* 形状 */
  --m-radius-sm: 6px;
  --m-radius-md: 10px;
  --m-radius-lg: 16px;
  --m-radius-xl: 20px;

  /* Layout */
  --m-header-h: 60px;
  --m-container-max: 1120px;
}

/* =====================================================================
   2. Reset & Base
   ===================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--m-font);
  color: var(--m-text);
  background: var(--m-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--m-primary);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover {
  color: var(--m-dark);
  text-decoration: underline;
}

button {
  font-family: inherit;
}

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

/* =====================================================================
   3. Layout Container
   ===================================================================== */
.m-container {
  max-width: var(--m-container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.m-container--narrow {
  max-width: 560px;
}

.m-container--wide {
  max-width: 1280px;
}

/* =====================================================================
   4. Header
   ===================================================================== */
.m-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--m-header-h);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--m-border);
}

.m-header-inner {
  max-width: var(--m-container-max);
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.m-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--m-dark);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 1px;
  text-decoration: none;
}
.m-brand:hover {
  text-decoration: none;
  color: var(--m-dark);
}

.m-brand svg {
  flex-shrink: 0;
}

.m-header-nav {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.m-header-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--m-text-sec);
  padding: 8px 10px;
  border-radius: var(--m-radius-sm);
}

.m-header-nav a:hover {
  color: var(--m-dark);
  background: var(--m-bg-tint);
  text-decoration: none;
}
.m-header-nav .m-btn--primary { color: #fff; }

/* =====================================================================
   5. Buttons
   ===================================================================== */
.m-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: var(--m-radius-md);
  font-family: var(--m-font);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.m-btn:hover {
  text-decoration: none;
}

/* Primary (緑塗り) */
.m-btn--primary {
  background: var(--m-primary);
  color: #fff;
  border-color: var(--m-primary);
}
.m-btn--primary:hover {
  background: var(--m-dark);
  border-color: var(--m-dark);
  color: #fff;
  box-shadow: var(--m-shadow-md);
}

/* Secondary (白地 + 緑縁) */
.m-btn--secondary {
  background: var(--m-card);
  color: var(--m-primary);
  border-color: var(--m-border);
}
.m-btn--secondary:hover {
  background: var(--m-bg-tint);
  border-color: var(--m-light);
  color: var(--m-dark);
}

/* Ghost (透明) */
.m-btn--ghost {
  background: transparent;
  color: var(--m-text-sec);
  border-color: transparent;
}
.m-btn--ghost:hover {
  background: var(--m-bg-tint);
  color: var(--m-dark);
}

/* Google sign-in button (白地 + 薄灰縁、Google ブランドガイド準拠) */
.m-btn--google {
  background: #fff;
  color: #3c4043;
  border-color: #DADCE0;
}
.m-btn--google:hover {
  background: #F7F8F9;
  border-color: #D2D5DA;
  color: #202124;
  box-shadow: var(--m-shadow-sm);
}

.m-btn--block {
  width: 100%;
}

.m-btn--lg {
  padding: 14px 24px;
  font-size: 15px;
}

.m-btn--sm {
  padding: 8px 14px;
  font-size: 13px;
}

/* =====================================================================
   6. Card
   ===================================================================== */
.m-card {
  background: var(--m-card);
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius-lg);
  padding: 32px;
  box-shadow: var(--m-shadow-sm);
}

.m-card--elevated {
  box-shadow: var(--m-shadow-md);
}

.m-card--auth {
  max-width: 440px;
  margin: 0 auto;
  padding: 44px 36px;
}

/* =====================================================================
   7. Info Boxes
   ===================================================================== */
.m-info {
  padding: 12px 14px;
  background: var(--m-bg-tint);
  border-left: 3px solid var(--m-accent);
  border-radius: var(--m-radius-sm);
  font-size: 13px;
  color: var(--m-text-sec);
  line-height: 1.55;
}

.m-info--warning {
  background: #FFFBEB;
  border-left-color: var(--m-warning);
}

.m-info-icon {
  display: inline-block;
  margin-right: 6px;
  color: var(--m-accent);
  font-weight: 600;
}

/* =====================================================================
   8. Dividers
   ===================================================================== */
.m-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--m-text-mut);
  font-size: 12px;
  margin: 20px 0;
}

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

/* =====================================================================
   9. Typography Helpers
   ===================================================================== */
.m-h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--m-dark);
  margin: 0 0 12px 0;
  letter-spacing: -0.3px;
  line-height: 1.25;
}

.m-h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--m-dark);
  margin: 0 0 8px 0;
  line-height: 1.35;
}

.m-h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--m-text);
  margin: 0 0 6px 0;
}

.m-lead {
  font-size: 16px;
  color: var(--m-text-sec);
  margin: 0 0 24px 0;
}

.m-muted {
  color: var(--m-text-mut);
  font-size: 13px;
}

.m-small {
  font-size: 13px;
}

.m-text-center {
  text-align: center;
}

/* =====================================================================
   10. Footer
   ===================================================================== */
.m-footer {
  margin-top: 80px;
  padding: 40px 0 24px;
  border-top: 1px solid var(--m-border);
  background: var(--m-card);
}

.m-footer-inner {
  max-width: var(--m-container-max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.m-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--m-dark);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 1px;
}

.m-footer-links {
  display: inline-flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
}

.m-footer-links a {
  color: var(--m-text-sec);
}

.m-footer-copy {
  width: 100%;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--m-border);
  color: var(--m-text-mut);
  font-size: 12px;
  text-align: center;
}

/* =====================================================================
   11. Responsive
   ===================================================================== */
@media (max-width: 768px) {
  .m-h1 { font-size: 26px; }
  .m-h2 { font-size: 20px; }
  .m-header-nav a { padding: 6px 8px; font-size: 13px; }
  .m-card { padding: 24px; }
  .m-card--auth { padding: 32px 22px; }
}

@media (max-width: 480px) {
  .m-container { padding: 0 16px; }
  .m-header-inner { padding: 0 16px; }
  .m-header-nav { gap: 6px; }
  .m-btn { padding: 10px 16px; font-size: 13px; }
  .m-btn--lg { padding: 12px 18px; font-size: 14px; }
  .m-h1 { font-size: 22px; }
}

/* =====================================================================
   12. Accessibility
   ===================================================================== */
.m-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;
}

*:focus-visible {
  outline: 2px solid var(--m-accent);
  outline-offset: 2px;
  border-radius: var(--m-radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
/* =====================================================================
   13. Lang Switcher (v19 - shared across signin / callback / pricing)
   Inline fallback CSS in each HTML page is intentional (FOUC prevention).
   This external definition allows future CSS-only overrides.
   ===================================================================== */
.lang-switcher {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 4px;
  z-index: 100;
}

.lang-switcher button {
  padding: 5px 11px;
  background: var(--m-card);
  border: 1px solid var(--m-border-hv);
  border-radius: var(--m-radius-sm);
  color: var(--m-text-sec);
  cursor: pointer;
  font-family: var(--m-font);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  transition: background 0.15s, color 0.15s;
}

.lang-switcher button.active,
.lang-switcher button[aria-pressed="true"] {
  background: var(--m-dark);
  border-color: var(--m-dark);
  color: #ffffff;
}

.lang-switcher button:not(.active):not([aria-pressed="true"]):hover {
  background: var(--m-bg-mint);
  color: var(--m-dark);
}

@media (max-width: 480px) {
  .lang-switcher {
    top: 10px;
    right: 10px;
  }
  .lang-switcher button {
    padding: 4px 8px;
    font-size: 11px;
  }
}

