/* =========================================================
   Modern SaaS Redesign  (Linear / Vercel inspired)
   - Near-white surfaces, sharp typography, subtle gradients
   - Desktop: permanent sidebar.  Mobile: drawer.
   ========================================================= */

:root {
  /* Surfaces */
  --bg:         #fafafa;
  --bg-2:       #f4f4f5;
  --surface:    #ffffff;
  --surface-2:  #fafafa;
  --surface-hi: #ffffff;

  /* Text */
  --fg:           #09090b;
  --fg-secondary: #3f3f46;
  --fg-3:         #52525b;
  --muted:        #71717a;
  --muted-2:      #a1a1aa;

  /* Borders */
  --bd:        #e4e4e7;
  --bd-light:  #f4f4f5;
  --bd-strong: #d4d4d8;

  /* Accent (emerald → green) */
  --accent:        #059669;
  --accent-2:      #047857;
  --accent-light:  #10b981;
  --accent-bg:     #ecfdf5;
  --accent-bg-2:   #d1fae5;

  /* Secondary accents */
  --success: #10b981;
  --warning: #f59e0b;
  --danger:  #ef4444;
  --cyan:    #06b6d4;

  /* Gradients (subtle, brand-y) */
  --grad-1: linear-gradient(135deg, #10b981 0%, #059669 50%, #0ea5e9 100%);
  --grad-soft: linear-gradient(180deg, #fafafa 0%, #f4f4f5 100%);
  --grad-mesh:
    radial-gradient(at 20% 0%, rgba(16,185,129,0.12) 0%, transparent 50%),
    radial-gradient(at 80% 0%, rgba(5,150,105,0.08) 0%, transparent 50%),
    radial-gradient(at 50% 100%, rgba(14,165,233,0.06) 0%, transparent 60%);

  /* Compat aliases (legacy var names so JS-less leftovers still resolve) */
  --pri:       var(--accent);
  --pri-dark:  var(--accent-2);
  --pri-light: var(--accent-light);
  --pri-bg:    var(--accent-bg);

  --radius:    10px;
  --radius-sm: 6px;
  --radius-lg: 14px;

  --shadow-xs: 0 1px 2px rgba(9,9,11,0.04);
  --shadow-sm: 0 1px 3px rgba(9,9,11,0.06), 0 1px 2px rgba(9,9,11,0.04);
  --shadow-md: 0 4px 12px rgba(9,9,11,0.05), 0 2px 4px rgba(9,9,11,0.04);
  --shadow-lg: 0 12px 40px -8px rgba(9,9,11,0.12), 0 4px 12px rgba(9,9,11,0.04);
  --shadow-glow: 0 0 0 3px rgba(16,185,129,0.18);

  --sans: 'Inter', 'Noto Sans JP', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --sidebar-w: 240px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0; padding: 0;
  font-family: var(--sans);
  color: var(--fg);
  background: var(--bg);
  height: 100vh; height: 100dvh;
  overflow-x: hidden; overflow-y: auto;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  letter-spacing: -0.005em;
}
body.page-login,
body.page-error {
  min-height: 100vh; height: auto;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: var(--bg);
  position: relative;
}
body.page-login::before,
body.page-error::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background: var(--grad-mesh);
  pointer-events: none;
}

::selection { background: var(--accent-bg-2); color: var(--accent-2); }

a { color: inherit; }

/* =========================================================
   APP SHELL — desktop: sidebar + main / mobile: drawer
   ========================================================= */
.app-wrapper {
  max-width: none; margin: 0;
  background: var(--bg);
  height: 100vh; height: 100dvh;
  position: relative;
  box-shadow: none;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "sidebar header"
    "sidebar content";
  overflow: hidden;
}

/* Header (top bar within main area) */
.app-header {
  grid-area: header;
  display: flex; align-items: center;
  padding: 0 24px;
  height: 56px;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bd);
  flex-shrink: 0; z-index: 10;
}
.hamburger {
  font-size: 18px; cursor: pointer; margin-right: 14px;
  background: transparent; border: 1px solid var(--bd);
  padding: 6px 10px; color: var(--fg-secondary);
  border-radius: var(--radius-sm);
  transition: background .15s, border-color .15s;
  display: none; /* desktop hides */
}
.hamburger:hover { background: var(--bg-2); border-color: var(--bd-strong); }

.app-title {
  font-size: 14px; font-weight: 600; margin: 0;
  color: var(--fg); letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 8px;
}
.app-title::before {
  content: ""; width: 18px; height: 18px;
  background: var(--grad-1);
  border-radius: 5px;
  display: inline-block;
}
.app-title__link { color: inherit; text-decoration: none; }
.app-title__link:hover { color: var(--accent); }

/* Sidebar (drawer becomes permanent sidebar on desktop) */
.nav-overlay {
  position: fixed; inset: 0;
  background: rgba(9,9,11,0.4); z-index: 1000;
  opacity: 0; visibility: hidden; transition: opacity .2s;
  backdrop-filter: blur(2px);
}
.nav-overlay.open { opacity: 1; visibility: visible; }

.nav-drawer {
  grid-area: sidebar;
  position: relative;
  width: var(--sidebar-w); height: 100%;
  background: var(--surface);
  border-right: 1px solid var(--bd);
  transform: none;
  z-index: 5;
  display: flex; flex-direction: column;
  padding: 14px 12px;
  overflow-y: auto;
}

.drawer-header {
  padding: 6px 10px 14px;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted);
}
.nav-item {
  padding: 8px 12px;
  margin: 1px 0;
  cursor: pointer; font-size: 13.5px; font-weight: 500;
  color: var(--fg-secondary);
  border: 0; border-radius: var(--radius-sm);
  text-decoration: none; display: flex; align-items: center; gap: 10px;
  transition: background .12s, color .12s;
  position: relative;
}
.nav-item:hover { background: var(--bg-2); color: var(--fg); }
.nav-item.active {
  background: var(--accent-bg); color: var(--accent);
  font-weight: 600;
}
.nav-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--bd-light);
}
.nav-footer .nav-item { font-size: 12px; color: var(--muted); }

/* Content area */
.content {
  grid-area: content;
  padding: 28px 32px 80px;
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; min-height: 0;
  background: var(--bg);
}

/* Mobile: collapse to single column + drawer behavior */
@media (max-width: 820px) {
  .app-wrapper {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "content";
    max-width: 100%;
  }
  .hamburger { display: inline-flex; }
  .nav-drawer {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 280px; padding: 16px 12px;
    transform: translateX(-100%);
    transition: transform .25s cubic-bezier(.4,0,.2,1);
    z-index: 1001;
    box-shadow: 8px 0 32px rgba(9,9,11,0.12);
  }
  .nav-drawer.open { transform: translateX(0); }
  .content { padding: 20px 16px 96px; }
}

/* =========================================================
   TYPOGRAPHY
   ========================================================= */
h1 {
  margin: 0 0 6px; font-size: 24px; font-weight: 700;
  color: var(--fg); letter-spacing: -0.02em;
  line-height: 1.25;
}
h2 { font-weight: 700; letter-spacing: -0.02em; }
.desc { color: var(--fg-3); margin-bottom: 24px; font-size: 14px; line-height: 1.65; }

/* =========================================================
   TABS  (Linear style)
   ========================================================= */
.tabs {
  display: inline-flex; gap: 2px;
  margin-bottom: 20px;
  padding: 3px;
  background: var(--bg-2);
  border-radius: var(--radius-sm);
}
.tab {
  border: 0; padding: 6px 14px;
  cursor: pointer; background: transparent;
  color: var(--fg-3); text-decoration: none;
  font-size: 13px; font-weight: 500;
  border-radius: 4px;
  transition: background .15s, color .15s;
}
.tab:hover { color: var(--fg); }
.tab.active {
  background: var(--surface);
  color: var(--fg);
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}

/* =========================================================
   CARDS
   ========================================================= */
.card {
  border: 1px solid var(--bd);
  border-radius: var(--radius-lg);
  padding: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

/* =========================================================
   FORMS
   ========================================================= */
label {
  font-weight: 500; display: block;
  margin: 16px 0 6px; font-size: 13px;
  color: var(--fg-secondary);
  letter-spacing: -0.005em;
}
textarea, input, select {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--bd);
  border-radius: var(--radius-sm);
  font: inherit; font-size: 14px;
  background: var(--surface);
  color: var(--fg);
  transition: border-color .15s, box-shadow .15s;
}
textarea { padding: 12px 14px; line-height: 1.65; min-height: 120px; }
textarea:focus, input:focus, select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: var(--shadow-glow);
}
textarea::placeholder, input::placeholder { color: var(--muted-2); }

button {
  margin-top: 14px;
  padding: 8px 16px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13.5px; font-weight: 500;
  letter-spacing: -0.005em;
  transition: background .15s, border-color .15s, transform .05s, box-shadow .15s;
}
button:hover { background: var(--accent-2); border-color: var(--accent-2); }
button:active { transform: translateY(0.5px); }

.btn-primary {
  background: var(--accent); color: #fff;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  font-weight: 500;
}
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }

.btn-secondary {
  background: var(--surface); color: var(--fg-secondary);
  border: 1px solid var(--bd);
}
.btn-secondary:hover { background: var(--bg-2); color: var(--fg); border-color: var(--bd-strong); }
.btn-small { padding: 5px 10px; font-size: 12px; margin-top: 0; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

pre {
  background: var(--surface-2);
  color: var(--fg);
  border: 1px solid var(--bd);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  overflow: auto; max-height: 420px;
  white-space: pre-wrap; word-wrap: break-word;
  font-family: var(--sans);
  font-size: 13.5px; line-height: 1.7;
}

.muted { color: var(--muted); font-size: 12px; }

button:focus-visible, summary:focus-visible, a:focus-visible,
textarea:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.main-pane { display: none; }
.main-pane.active { display: block; }

/* AI pane */
#pane-score {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 980px) {
  #pane-score {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* =========================================================
   LOGIN / REGISTER
   ========================================================= */
#login-view {
  background: transparent;
  display: none; align-items: center; justify-content: center;
  flex-direction: column; padding: 48px 16px; flex: 1;
  min-height: 100vh; width: 100%;
}
.login-card {
  background: var(--surface);
  padding: 36px 32px;
  border: 1px solid var(--bd);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 420px;
  box-shadow: var(--shadow-lg);
  text-align: center;
  position: relative;
}
.login-card::before {
  content: ""; display: block;
  width: 36px; height: 36px;
  background: var(--grad-1);
  border-radius: 9px;
  margin: 0 auto 16px;
}
.login-card h2 {
  margin: 0 0 8px;
  font-weight: 700; font-size: 20px;
  letter-spacing: -0.02em;
}
.login-desc { color: var(--muted); margin-bottom: 24px; font-size: 13.5px; line-height: 1.6; }
.login-step { display: none; flex-direction: column; gap: 12px; text-align: left; }
.login-step.active { display: flex; }
.link-btn { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; font-size: 13px; text-decoration: underline; }

/* =========================================================
   GAKUCHIKA CARDS
   ========================================================= */
.other-pr-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--bd);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-xs);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.other-pr-card:hover {
  border-color: var(--bd-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.other-pr-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; padding-bottom: 14px;
  border-bottom: 1px solid var(--bd-light);
}
.other-pr-title-label {
  font-size: 11px; color: var(--muted); font-weight: 500;
  letter-spacing: 0.02em; margin-bottom: 4px;
}
.other-pr-title-value { font-weight: 600; font-size: 15px; line-height: 1.35; color: var(--fg); }
.other-pr-section { padding-top: 14px; }
.section-title {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--accent); font-weight: 600;
  letter-spacing: 0.02em; margin-bottom: 8px;
  background: var(--accent-bg);
  padding: 3px 8px;
  border-radius: 4px;
}
.other-pr-text { line-height: 1.75; font-size: 14px; color: var(--fg-secondary); }
.pr-text { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--bd-light); }

/* =========================================================
   AI REVIEW (添削) — per other-pr card
   ========================================================= */
.other-pr-review { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--bd-light); }
.review-details summary {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; list-style: none;
}
.review-details summary::-webkit-details-marker { display: none; }
.review-details[open] summary .expandable-more { display: none; }
.review-body { margin-top: 12px; display: flex; flex-direction: column; gap: 12px; }

.review-overall {
  padding: 12px 14px;
  background: var(--accent-bg);
  border: 1px solid var(--accent-bg-2);
  border-radius: var(--radius-md, 8px);
}
.review-overall-label {
  font-size: 11px; font-weight: 700; color: var(--accent);
  letter-spacing: 0.02em; margin-bottom: 4px;
}
.review-overall p { margin: 0; font-size: 13.5px; line-height: 1.7; color: var(--fg-secondary); }

.review-section {
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--bd);
  border-radius: var(--radius-md, 8px);
}
.review-section-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px;
}
.review-target {
  font-size: 10.5px; font-weight: 600;
  padding: 2px 8px; border-radius: 4px;
  background: var(--bg-2); color: var(--fg-3);
}
.review-section-title { font-size: 13.5px; font-weight: 600; color: var(--fg); flex: 1; }
.review-result {
  font-size: 11px; font-weight: 700;
  padding: 2px 9px; border-radius: 999px;
}
.review-result.is-ok { background: var(--accent-bg); color: var(--accent); }
.review-result.is-warn { background: rgba(224,185,106,.16); color: var(--warning, #b8860b); }

.review-explanation { margin: 0 0 8px; font-size: 13px; line-height: 1.7; color: var(--fg-secondary); }
.review-quote {
  margin: 0 0 8px; padding: 8px 12px;
  border-left: 3px solid var(--bd-strong);
  border-radius: 0 6px 6px 0;
  background: var(--bg-2);
}
.review-quote-label {
  display: block; font-size: 10.5px; font-weight: 600;
  color: var(--muted); margin-bottom: 3px;
}
.review-quote p { margin: 0; font-size: 13px; line-height: 1.7; color: var(--fg-secondary); white-space: pre-wrap; }
.review-original { border-left-color: var(--bd-strong); }
.review-suggestion { border-left-color: var(--accent); background: var(--accent-bg); }
.review-comment {
  margin: 0; font-size: 12.5px; line-height: 1.65; color: var(--fg-3);
  font-style: italic;
}

/* =========================================================
   INDUSTRY FILTER
   ========================================================= */
.industry-filter {
  margin: 16px 0 24px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--bd);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}
.industry-filter-title {
  font-size: 12px; font-weight: 600;
  color: var(--fg-secondary); margin-bottom: 12px;
  letter-spacing: -0.005em;
}
.industry-filter-title .industry-filter-hint {
  font-size: 11px; color: var(--muted);
  font-weight: 400; margin-left: 8px;
}
.industry-chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.industry-chip {
  position: relative; display: inline-flex; align-items: center;
  padding: 5px 12px;
  font-size: 12.5px; font-weight: 500;
  color: var(--fg-secondary);
  background: var(--surface);
  border: 1px solid var(--bd);
  border-radius: 999px;
  cursor: pointer;
  transition: all .12s ease;
  user-select: none;
}
.industry-chip:hover { border-color: var(--bd-strong); background: var(--bg-2); }
.industry-chip input { position: absolute; opacity: 0; pointer-events: none; }
.industry-chip.is-selected,
.industry-chip:has(input:checked) {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.industry-filter-actions {
  margin-top: 14px;
  display: flex; align-items: center; gap: 12px;
}
.industry-filter-clear {
  font-size: 12px; color: var(--muted);
  text-decoration: none; padding: 4px 8px;
  border-radius: var(--radius-sm);
}
.industry-filter-clear:hover { background: var(--bg-2); color: var(--fg); }

/* Industry tags */
.other-pr-industries { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.industry-tag {
  font-size: 10.5px; font-weight: 500;
  padding: 2px 8px;
  background: var(--accent-bg);
  color: var(--accent);
  border-radius: 4px;
}

/* =========================================================
   LOGIN GATE
   ========================================================= */
.login-gate {
  margin-top: 20px; text-align: center; padding: 36px 24px;
  background: var(--surface);
  border: 1px dashed var(--bd-strong);
  border-radius: var(--radius-lg);
}
.login-gate p {
  font-size: 15px; font-weight: 600; color: var(--fg);
  margin-bottom: 14px;
}
.login-gate .btn-primary {
  display: inline-block; padding: 9px 22px;
  text-decoration: none; font-size: 13.5px;
  border-radius: var(--radius-sm);
}

/* =========================================================
   EXPANDABLE
   ========================================================= */
.expandable { margin: 0; }
.expandable summary {
  list-style: none; cursor: pointer;
  display: flex; gap: 10px; align-items: baseline;
  white-space: pre-wrap;
}
.expandable summary::-webkit-details-marker { display: none; }
.expandable-text { flex: 1; line-height: 1.75; font-size: 14px; color: var(--fg-secondary); }
.expandable-more {
  flex: none; color: var(--accent); font-size: 11.5px;
  white-space: nowrap;
  background: var(--accent-bg);
  border: 1px solid var(--accent-bg-2);
  padding: 2px 8px; border-radius: 4px;
  font-weight: 500;
  transition: background .15s, border-color .15s;
}
.expandable summary:hover .expandable-more { background: var(--accent-bg-2); border-color: var(--accent-light); }
.expandable[open] .expandable-more { display: none; }
.expandable[open] .expandable-text { display: none; }
.expandable-body { margin-top: 10px; line-height: 1.75; font-size: 14px; color: var(--fg-secondary); }

/* =========================================================
   GAKUCHIKA PROTECTION
   ========================================================= */
.gakuchika-protect {
  position: relative;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
}
.gakuchika-protect .gakuchika-watermark {
  position: absolute; inset: 0; z-index: 2;
  pointer-events: none; background-repeat: repeat;
  background-size: 200px 120px; opacity: 0.10;
}
.gakuchika-protect > :not(.gakuchika-watermark) { position: relative; z-index: 1; }

/* =========================================================
   MY PAGE
   ========================================================= */
.mypage-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 16px;
}
.mypage-status {
  font-size: 11.5px; color: var(--muted);
  background: var(--bg-2); border: 1px solid var(--bd);
  border-radius: 999px; padding: 3px 12px; white-space: nowrap;
}
.mypage-status.is-error { color: var(--danger); background: #fef2f2; border-color: #fecaca; }
.mypage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.mypage-item {
  padding: 12px 14px;
  border: 1px solid var(--bd);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.mypage-invite { grid-column: 1 / -1; }
.mypage-label {
  font-size: 11px; color: var(--muted); margin-bottom: 4px;
  letter-spacing: 0.01em; font-weight: 500;
}
.mypage-value { font-weight: 600; font-size: 14px; color: var(--fg); }
.mypage-value-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@media print { #pane-other-pr { display: none !important; } }
.mypage-note { margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.mypage-section { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--bd-light); }
.mypage-access {
  background: var(--accent-bg);
  border-color: var(--accent-bg-2);
}
.mypage-access .mypage-value { color: var(--accent); }

/* =========================================================
   ADMIN
   ========================================================= */
.admin-pane .admin-summary {
  display: flex; flex-wrap: wrap; gap: 12px;
  font-size: 12px; color: var(--muted); margin-bottom: 14px;
}
.admin-user-card { border: 1px solid var(--bd); padding: 16px; border-radius: var(--radius-lg); }
.admin-user-header {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 12px;
}
.admin-user-name {
  font-weight: 600; font-size: 15px; background: none; border: 0;
  padding: 0; cursor: pointer; color: var(--fg); text-align: left;
}
.admin-user-name:hover { color: var(--accent); }
.admin-user-sub { color: var(--muted); font-size: 11.5px; }
.admin-user-chip {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--bd); background: var(--surface);
  margin-left: 6px; color: var(--fg-secondary); font-size: 10.5px;
}
.admin-user-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.admin-user-item {
  padding: 8px 10px; border: 1px solid var(--bd);
  border-radius: var(--radius-sm); background: var(--bg);
}
.admin-user-label { font-size: 10px; color: var(--muted); margin-bottom: 2px; letter-spacing: 0.02em; }
.admin-user-value { font-weight: 500; font-size: 12px; }
.admin-user-section { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--bd-light); }
.admin-submissions.is-hidden { display: none; }
.admin-submission {
  border: 1px solid var(--bd); border-radius: var(--radius-sm);
  padding: 10px 12px; background: var(--surface); margin-top: 8px;
}
.admin-submission-meta {
  display: flex; gap: 12px; flex-wrap: wrap;
  font-size: 11px; color: var(--muted); margin-bottom: 8px;
}
.admin-submission-block { margin-top: 8px; }
.admin-submission-text {
  line-height: 1.65; background: var(--bg);
  border: 1px solid var(--bd); border-radius: var(--radius-sm);
  padding: 10px 12px; font-size: 12.5px;
}
.admin-pagination {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-size: 12px; color: var(--muted); margin: 12px 0 4px;
}
.admin-page-link {
  color: var(--fg-secondary); text-decoration: none;
  border: 1px solid var(--bd); padding: 5px 12px;
  border-radius: var(--radius-sm); background: var(--surface);
  font-weight: 500; font-size: 12px;
  transition: all .15s;
}
.admin-page-link:hover { background: var(--bg-2); border-color: var(--bd-strong); color: var(--fg); }
.admin-page-link.is-disabled { pointer-events: none; color: var(--muted-2); }
.admin-page-status { color: var(--muted); }

@media (max-width: 1100px) { .admin-user-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px)  { .admin-user-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  {
  .admin-user-grid { grid-template-columns: 1fr; }
  .admin-user-header { flex-direction: column; align-items: flex-start; }
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--surface); border-top: 1px solid var(--bd);
  padding: 14px 16px; font-size: 12px; color: var(--muted);
}
.site-footer__inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center; gap: 14px;
}
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer__sep { color: var(--bd-strong); }

.terms-page {
  width: 100%;
  min-height: calc(100vh - 70px);
  padding: 44px 16px;
  background: var(--bg);
}
.terms-section {
  margin: 0;
  text-align: left;
}
.terms-section__inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--bd);
  border-radius: var(--radius-lg);
  color: var(--fg-secondary);
}
.terms-section__eyebrow {
  margin: 0 0 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.terms-section h2 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--fg);
}
.terms-section__lead,
.terms-section__meta {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--muted);
}
.terms-article {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--bd-light);
}
.terms-article h3 {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--fg);
}
.terms-article p {
  margin: 8px 0 0;
  font-size: 12.5px;
  line-height: 1.85;
}
.terms-section__meta {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--bd-light);
}

/* =========================================================
   ERROR PAGE
   ========================================================= */
.error-page { width: min(92vw, 520px); padding: 24px 16px; }
.error-card {
  background: var(--surface); border: 1px solid var(--bd);
  border-radius: var(--radius-lg); padding: 36px 32px; box-shadow: var(--shadow-lg);
  text-align: center;
}
.error-code {
  font-size: 52px; font-weight: 800; letter-spacing: -0.04em;
  background: var(--grad-1); -webkit-background-clip: text; background-clip: text; color: transparent;
  line-height: 1;
}
.error-title { font-size: 19px; margin: 12px 0 6px; font-weight: 700; }
.error-message { margin: 0; color: var(--muted); line-height: 1.6; font-size: 14px; }
.error-actions { display: flex; justify-content: center; gap: 8px; margin-top: 22px; flex-wrap: wrap; }
.error-link {
  color: var(--fg-secondary); text-decoration: none;
  border: 1px solid var(--bd); background: var(--surface);
  padding: 8px 18px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500;
  transition: all .15s;
}
.error-link:hover { background: var(--bg-2); border-color: var(--bd-strong); color: var(--fg); }

/* =========================================================
   MODAL
   ========================================================= */
.modal { position: fixed; inset: 0; display: none; z-index: 2000; }
.modal.open { display: block; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(9,9,11,0.5); backdrop-filter: blur(4px);
}
.modal-dialog {
  position: relative; max-width: 440px;
  margin: 14vh auto 0; background: var(--surface);
  border: 1px solid var(--bd);
  border-radius: var(--radius-lg); padding: 26px 26px;
  box-shadow: var(--shadow-lg);
}
.modal-dialog h2 { margin: 0 0 12px; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.modal-dialog p { margin: 8px 0 0; color: var(--fg-secondary); font-size: 14px; }
.modal-close {
  position: absolute; top: 12px; right: 14px;
  border: 0; background: none; font-size: 20px; line-height: 1;
  cursor: pointer; color: var(--muted); padding: 4px 8px;
  border-radius: var(--radius-sm);
}
.modal-close:hover { color: var(--fg); background: var(--bg-2); }
#invite-code-inline {
  font-weight: 600; color: var(--accent);
  font-family: var(--mono);
  background: var(--accent-bg); padding: 2px 8px;
  border-radius: 4px;
}
.invite-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.invite-action {
  margin-top: 0; padding: 7px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--bd); background: var(--surface);
  color: var(--fg-secondary); cursor: pointer; font-size: 12.5px; font-weight: 500;
  transition: all .15s;
}
.invite-action:hover { background: var(--bg-2); border-color: var(--bd-strong); color: var(--fg); }
.invite-action:disabled { cursor: not-allowed; opacity: 0.5; }
.invite-action-primary {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.invite-action-primary:hover { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.invite-hint { margin-top: 10px; color: var(--muted); font-size: 11.5px; min-height: 16px; }

/* =========================================================
   RESPONSIVE (shell)
   ========================================================= */
@media (max-width: 520px) {
  .row { grid-template-columns: 1fr; }
  .other-pr-header { align-items: stretch; flex-direction: column; }
  .mypage-header { align-items: flex-start; flex-direction: column; }
  .mypage-grid { grid-template-columns: 1fr; }
  h1 { font-size: 20px; }
}

/* =========================================================
   LANDING PAGE  (modern SaaS — compact hero, examples first)
   ========================================================= */
body.page-landing {
  height: auto; min-height: 100vh;
  overflow-y: auto;
  background: var(--bg);
  position: relative;
}
body.page-landing::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background: var(--grad-mesh);
  pointer-events: none;
}
.lp-wrapper { max-width: 100%; overflow-x: hidden; }

/* Header */
.lp-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bd);
}
.lp-header-inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px;
}
.lp-logo {
  font-size: 15px; font-weight: 700; color: var(--fg);
  letter-spacing: -0.02em;
  display: flex; align-items: center; gap: 8px;
}
.lp-logo::before {
  content: ""; width: 20px; height: 20px;
  background: var(--grad-1); border-radius: 6px;
}
.lp-header-actions { display: flex; gap: 6px; align-items: center; }
.lp-btn-ghost {
  padding: 7px 14px; border-radius: var(--radius-sm);
  border: 1px solid transparent; background: transparent;
  color: var(--fg-secondary); font-size: 13px; font-weight: 500;
  text-decoration: none; transition: background .15s, color .15s;
}
.lp-btn-ghost:hover { background: var(--bg-2); color: var(--fg); }
.lp-btn-cta {
  padding: 7px 16px; border-radius: var(--radius-sm);
  background: var(--fg); color: var(--surface);
  font-size: 13px; font-weight: 600;
  text-decoration: none; transition: opacity .15s, transform .05s;
  white-space: nowrap;
  border: 1px solid var(--fg);
}
.lp-btn-cta:hover { opacity: 0.88; }

/* Hero (asymmetric 2-col on desktop) */
.lp-hero {
  padding: 64px 24px 48px;
  position: relative;
}
.lp-hero-inner {
  max-width: 1180px; margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 56px;
  align-items: center;
}
.lp-hero-copy { text-align: left; }
@media (max-width: 900px) {
  .lp-hero { padding: 48px 22px 28px; }
  .lp-hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .lp-hero-copy { text-align: center; }
}

.lp-badge {
  display: inline-flex; align-items: center; gap: 6px;
  margin-bottom: 18px;
  background: var(--surface);
  border: 1px solid var(--bd);
  border-radius: 999px; padding: 4px 12px 4px 8px;
  font-size: 12px; font-weight: 500; color: var(--fg-secondary);
  box-shadow: var(--shadow-xs);
}
.lp-badge::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.18);
}
.lp-hero h1 {
  font-size: clamp(30px, 5.2vw, 48px); font-weight: 800;
  color: var(--fg); margin: 0 0 14px;
  line-height: 1.1; letter-spacing: -0.035em;
}
.lp-hero h1 br + * { /* no-op; preserved selector */ }
.lp-hero-accent {
  background: var(--grad-1);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.lp-hero-actions {
  display: flex; gap: 10px; align-items: center;
  margin-top: 8px; flex-wrap: wrap;
}
@media (max-width: 900px) { .lp-hero-actions { justify-content: center; } }
.lp-hero-cta-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 18px;
  background: var(--surface); color: var(--fg);
  border: 1px solid var(--bd);
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600;
  text-decoration: none;
  transition: background .15s, border-color .15s;
}
.lp-hero-cta-ghost:hover { background: var(--bg-2); border-color: var(--bd-strong); }

/* Hero preview (right side mock cards) */
.lp-hero-preview {
  position: relative;
  min-height: 320px;
  height: 100%;
}
.lp-mock {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--bd);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-lg);
  width: 260px;
}
.lp-mock-1 {
  top: 0; left: 8%;
  transform: rotate(-3deg);
  z-index: 1;
}
.lp-mock-2 {
  top: 30%; right: 0;
  transform: rotate(2deg);
  z-index: 3;
  border-color: var(--accent-bg-2);
  box-shadow: 0 20px 50px -16px rgba(5,150,105,0.25), var(--shadow-md);
}
.lp-mock-3 {
  bottom: 0; left: 0;
  transform: rotate(-2deg);
  z-index: 2;
}
.lp-mock-tag {
  display: inline-block;
  font-size: 11px; font-weight: 600;
  color: var(--muted);
  background: var(--bg-2);
  padding: 3px 8px; border-radius: 4px;
  margin-bottom: 12px;
}
.lp-mock-tag--accent {
  color: var(--accent);
  background: var(--accent-bg);
}
.lp-mock-title {
  font-size: 12px; font-weight: 600;
  color: var(--fg-secondary);
  margin-bottom: 10px;
}
.lp-mock-line {
  height: 7px;
  background: var(--bg-2);
  border-radius: 3px;
  margin-bottom: 7px;
}
.lp-mock-line--short { width: 65%; }
.lp-mock-score {
  display: flex; align-items: baseline; gap: 4px;
  margin-bottom: 10px;
}
.lp-mock-score-num {
  font-size: 36px; font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.03em;
  line-height: 1;
}
.lp-mock-score-label {
  font-size: 13px; font-weight: 600;
  color: var(--muted);
}
.lp-mock-bar {
  height: 6px;
  background: var(--bg-2);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 12px;
}
.lp-mock-bar > span {
  display: block; height: 100%;
  background: var(--grad-1);
  border-radius: 3px;
}
@media (max-width: 900px) {
  .lp-hero-preview { min-height: 280px; max-width: 420px; margin: 0 auto; }
  .lp-mock { width: 230px; }
}
@media (max-width: 480px) {
  .lp-mock { width: 200px; padding: 14px; }
  .lp-mock-1 { left: 0; }
  .lp-mock-2 { right: 0; }
  .lp-mock-3 { left: 5%; }
}
.lp-hero-sub {
  font-size: 16px; color: var(--fg-3);
  line-height: 1.65; margin: 0 auto 24px;
  max-width: 56ch;
}
.lp-stats {
  display: inline-flex; justify-content: center; gap: 24px;
  margin: 0 auto 24px; flex-wrap: wrap;
  padding: 8px 18px;
  background: var(--surface);
  border: 1px solid var(--bd);
  border-radius: 999px;
  box-shadow: var(--shadow-xs);
}
.lp-stat {
  background: transparent; border: 0; padding: 4px 0;
  display: flex; align-items: baseline; gap: 6px;
  border-radius: 0;
}
.lp-stat + .lp-stat { border-left: 1px solid var(--bd); padding-left: 24px; }
.lp-stat-num {
  font-size: 16px; font-weight: 700; color: var(--fg);
  letter-spacing: -0.02em; line-height: 1;
}
.lp-stat-label { font-size: 12.5px; color: var(--muted); margin-top: 0; }

.lp-hero-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px;
  background: var(--accent); color: #fff;
  border-radius: var(--radius-sm); font-size: 14px; font-weight: 600;
  text-decoration: none;
  box-shadow: 0 8px 20px -8px rgba(5,150,105,0.5);
  transition: background .15s, transform .05s, box-shadow .15s;
}
.lp-hero-cta:hover { background: var(--accent-2); }
.lp-hero-cta:hover { opacity: 0.9; transform: translateY(-1px); }
.lp-trust { margin-top: 10px; font-size: 12px; color: var(--muted); }

/* Trust band */
.lp-trust-band {
  border-top: 1px solid var(--bd);
  border-bottom: 1px solid var(--bd);
  background: var(--surface);
  padding: 22px 28px;
}
.lp-trust-band-inner {
  max-width: 960px; margin: 0 auto;
  display: flex;
  gap: 28px;
  align-items: center;
}
.lp-trust-stats {
  display: flex; gap: 48px;
}
.lp-trust-stat { display: flex; flex-direction: column; gap: 2px; }
.lp-trust-num {
  font-size: 22px; font-weight: 800;
  color: var(--fg); letter-spacing: -0.025em;
  line-height: 1;
}
.lp-trust-num span {
  font-size: 14px; color: var(--accent);
  font-weight: 700; margin-left: 1px;
}
.lp-trust-label {
  font-size: 11.5px; color: var(--muted);
  font-weight: 500;
}
.lp-trust-divider {
  width: 1px; height: 40px;
  background: var(--bd);
}
.lp-trust-univs {
  display: flex; align-items: center; gap: 14px;
  min-width: 0;
}
.lp-trust-univs-label {
  font-size: 11.5px; color: var(--muted);
  font-weight: 500; white-space: nowrap;
}
.lp-trust-univ-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.lp-trust-univ-list li {
  font-size: 12px; font-weight: 500;
  color: var(--fg-secondary);
  background: var(--bg);
  border: 1px solid var(--bd);
  padding: 3px 10px; border-radius: 999px;
}
@media (max-width: 900px) {
  .lp-trust-band { padding: 20px 18px; }
  .lp-trust-band-inner {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .lp-trust-divider { display: none; }
  .lp-trust-stats { justify-content: center; gap: 20px; flex-wrap: wrap; }
  .lp-trust-univs { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* Gakuchika Section (now near top) */
.lp-gakuchika {
  padding: 28px 24px 64px;
}
.lp-gakuchika-inner { max-width: 1100px; margin: 0 auto; }
.lp-gakuchika h2 {
  font-size: clamp(22px, 3.4vw, 28px); font-weight: 700;
  color: var(--fg); margin: 0 0 8px;
  letter-spacing: -0.02em;
}
.lp-gakuchika-desc { color: var(--fg-3); font-size: 14px; margin-bottom: 22px; line-height: 1.6; }

/* Show first 3 example cards as a 3-column grid on desktop */
.lp-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.lp-cards .other-pr-card { margin: 0; }
.lp-cards .lp-login-gate { grid-column: 1 / -1; }
@media (max-width: 900px) { .lp-cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .lp-cards { grid-template-columns: 1fr; } }

/* Problems */
.lp-problems {
  background: transparent;
  padding: 56px 24px;
  border-top: 1px solid var(--bd);
}
.lp-section-inner { max-width: 1100px; margin: 0 auto; }
.lp-section-label {
  display: inline-block;
  font-size: 11.5px; font-weight: 600; color: var(--accent);
  background: var(--accent-bg);
  padding: 3px 10px; border-radius: 999px;
  margin-bottom: 12px;
  letter-spacing: 0.01em;
}
.lp-problems h2 {
  font-size: clamp(22px, 3.4vw, 30px); font-weight: 700;
  color: var(--fg); margin: 0 0 28px;
  letter-spacing: -0.02em; line-height: 1.3;
}
.lp-problem-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.lp-problem-card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 18px; display: flex; gap: 14px; align-items: flex-start;
  border: 1px solid var(--bd);
  box-shadow: var(--shadow-xs);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.lp-problem-card:hover { border-color: var(--bd-strong); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.lp-problem-icon {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--accent-bg); border: 0;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 18px;
}
.lp-problem-text { font-size: 14px; font-weight: 600; color: var(--fg); line-height: 1.5; }
.lp-problem-sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; line-height: 1.55; }

/* Industry Links (SEO) */
.lp-industry-links {
  background: transparent;
  padding: 56px 24px;
  border-top: 1px solid var(--bd);
}
.lp-industry-links-inner { max-width: 1100px; margin: 0 auto; }
.lp-industry-links h2 {
  font-size: clamp(20px, 3vw, 26px); font-weight: 700;
  color: var(--fg); margin: 0 0 8px;
  letter-spacing: -0.02em;
}
.lp-industry-links-desc { color: var(--fg-3); font-size: 14px; margin-bottom: 20px; line-height: 1.6; }
.lp-industry-link-list {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
}
.lp-industry-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  font-size: 13.5px; font-weight: 500;
  color: var(--fg-secondary);
  background: var(--surface);
  border: 1px solid var(--bd);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: border-color .15s, color .15s, background .15s;
}
.lp-industry-link::before {
  content: "→"; color: var(--muted-2);
  transition: transform .15s, color .15s;
}
.lp-industry-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-bg);
}
.lp-industry-link:hover::before { color: var(--accent); transform: translateX(3px); }

/* Login gate (landing) */
.lp-login-gate {
  text-align: center; padding: 36px 24px;
  background: var(--surface);
  border: 1px dashed var(--bd-strong);
  border-radius: var(--radius-lg);
}
.lp-login-gate p {
  font-size: 15px; font-weight: 600; color: var(--fg); margin: 0 0 14px;
  letter-spacing: -0.01em;
}
.lp-gate-sub {
  font-size: 13px !important; font-weight: 400 !important;
  color: var(--muted) !important;
  margin-top: -8px !important; margin-bottom: 16px !important;
}
.lp-login-gate a {
  display: inline-block; padding: 9px 22px;
  background: var(--accent); color: #fff;
  border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 600;
  text-decoration: none; transition: background .15s;
}
.lp-login-gate a:hover { background: var(--accent-2); }

/* Inline expand gate */
.lp-expand-gate {
  text-align: center; padding: 18px 16px 6px;
  border-top: 1px dashed var(--bd-strong); margin-top: 12px;
}
.lp-expand-gate p { font-size: 13px; color: var(--fg-3); margin: 0 0 10px; }

/* Footer (landing) */
.lp-footer {
  background: var(--surface);
  border-top: 1px solid var(--bd);
  padding: 24px 24px; text-align: center;
}
.lp-footer-inner { max-width: 1100px; margin: 0 auto; }
.lp-footer-brand { font-size: 13px; font-weight: 600; color: var(--fg); margin-bottom: 8px; }
.lp-footer-links { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.lp-footer-links a { color: var(--muted); font-size: 12px; text-decoration: none; }
.lp-footer-links a:hover { color: var(--fg); }

/* =========================================================
   LP — Features
   ========================================================= */
.lp-features {
  padding: 56px 24px;
  border-top: 1px solid var(--bd);
}
.lp-features h2 {
  font-size: clamp(22px, 3.4vw, 30px); font-weight: 700;
  color: var(--fg); margin: 0 0 28px;
  letter-spacing: -0.02em; line-height: 1.3;
}
.lp-feature-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.lp-feature-card {
  background: var(--surface);
  border: 1px solid var(--bd);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  box-shadow: var(--shadow-xs);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.lp-feature-card:hover { border-color: var(--bd-strong); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.lp-feature-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--accent-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 14px;
}
.lp-feature-title {
  font-size: 15.5px; font-weight: 700; color: var(--fg);
  letter-spacing: -0.01em; margin-bottom: 6px;
}
.lp-feature-text { font-size: 13.5px; color: var(--fg-3); line-height: 1.65; }
@media (max-width: 820px) { .lp-feature-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .lp-feature-grid { grid-template-columns: 1fr; } }

/* =========================================================
   LP — Steps
   ========================================================= */
.lp-steps {
  padding: 56px 24px;
  border-top: 1px solid var(--bd);
  background: var(--surface);
}
.lp-steps h2 {
  font-size: clamp(22px, 3.4vw, 30px); font-weight: 700;
  color: var(--fg); margin: 0 0 28px;
  letter-spacing: -0.02em;
}
.lp-step-list {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  counter-reset: step;
}
.lp-step {
  background: var(--bg);
  border: 1px solid var(--bd);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
}
.lp-step-num {
  font-family: var(--mono);
  font-size: 11px; font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: 14px;
  display: inline-block;
  background: var(--accent-bg);
  padding: 2px 8px; border-radius: 4px;
}
.lp-step-title {
  font-size: 15px; font-weight: 700; color: var(--fg);
  letter-spacing: -0.01em; margin-bottom: 6px;
}
.lp-step-text { font-size: 13.5px; color: var(--fg-3); line-height: 1.65; }
@media (max-width: 820px) { .lp-step-list { grid-template-columns: 1fr; } }

/* =========================================================
   LP — Final CTA
   ========================================================= */
.lp-final-cta {
  padding: 64px 24px;
  text-align: center;
  border-top: 1px solid var(--bd);
  background: var(--grad-1);
  position: relative;
  overflow: hidden;
}
.lp-final-cta::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(at 30% 20%, rgba(255,255,255,0.18) 0%, transparent 50%),
    radial-gradient(at 70% 80%, rgba(255,255,255,0.10) 0%, transparent 50%);
  pointer-events: none;
}
.lp-final-cta-inner { max-width: 640px; margin: 0 auto; position: relative; }
.lp-final-cta h2 {
  font-size: clamp(24px, 4vw, 34px); font-weight: 800;
  color: #fff; margin: 0 0 12px;
  letter-spacing: -0.02em; line-height: 1.25;
}
.lp-final-cta p {
  font-size: 14.5px; color: rgba(255,255,255,0.88);
  margin: 0 0 24px; line-height: 1.6;
}
.lp-final-cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px;
  background: #fff; color: var(--accent-2);
  border-radius: var(--radius-sm);
  font-size: 14.5px; font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,0.3);
  transition: transform .15s, box-shadow .15s;
}
.lp-final-cta-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 32px -8px rgba(0,0,0,0.35); }

/* =========================================================
   Sidebar — section labels
   ========================================================= */
.nav-section-label {
  padding: 14px 12px 4px;
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted-2);
}
.nav-section-label:first-of-type { padding-top: 6px; }

@media (max-width: 640px) {
  .lp-problem-grid { grid-template-columns: 1fr; }
  .lp-feature-grid { grid-template-columns: 1fr; }
  .lp-step-list { grid-template-columns: 1fr; }
  .lp-stats { gap: 12px; }
  .lp-stat + .lp-stat { padding-left: 12px; }
  .lp-hero { padding: 40px 18px 20px; }
  .lp-problems, .lp-gakuchika, .lp-features, .lp-steps { padding: 40px 18px; }
  .lp-industry-links { padding: 36px 18px; }
  .lp-final-cta { padding: 48px 18px; }
}

/* =========================================================
   Landing — Dark / Gold theme (BEFORE/AFTER hero)
   Scoped under .lp-wrapper.is-dark to leave other pages intact.
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');

.lp-wrapper.is-dark {
  --d-bg: #111;
  --d-fg: #fff;
  --d-muted: rgba(255,255,255,.5);
  --d-muted-2: rgba(255,255,255,.32);
  --d-bd: rgba(255,255,255,.08);
  --d-bd-strong: rgba(255,255,255,.18);
  --d-card: #161616;
  --d-card-2: #1a1a1a;
  --d-gold: #C8A96E;
  --d-gold-2: #D9BC85;
  background: var(--d-bg);
  color: var(--d-fg);
  font-family: 'Noto Sans JP', Meiryo, sans-serif;
}
body:has(.lp-wrapper.is-dark) { background: var(--d-bg, #111); }

/* Header */
.lp-wrapper.is-dark .lp-header {
  background: transparent;
  border-bottom: 1px solid var(--d-bd);
  position: relative;
}
.lp-wrapper.is-dark .lp-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 20px; letter-spacing: 2px; color: #fff;
}
.lp-wrapper.is-dark .lp-logo::before { display: none; }
.lp-wrapper.is-dark .lp-btn-ghost {
  background: transparent;
  border: 1px solid var(--d-bd-strong);
  color: rgba(255,255,255,.75);
  font-size: 12px; padding: 8px 14px; border-radius: 3px;
}
.lp-wrapper.is-dark .lp-btn-ghost:hover { background: rgba(255,255,255,.06); color: #fff; }
.lp-wrapper.is-dark .lp-btn-cta {
  background: #fff; color: #111; border: 1px solid #fff;
  font-weight: 700; font-size: 12px; padding: 8px 14px; border-radius: 3px;
}
.lp-wrapper.is-dark .lp-btn-cta:hover { background: var(--d-gold-2); border-color: var(--d-gold-2); color: #111; }

/* Hero — BEFORE/AFTER big type */
.lp-wrapper.is-dark .lp-hero {
  position: relative; overflow: hidden;
  padding: 56px 28px 24px;
  background: var(--d-bg);
}
.lp-wrapper.is-dark .lp-hero::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 52px 52px;
  pointer-events: none;
}
.lp-wrapper.is-dark .lp-hero-inner {
  position: relative; z-index: 2;
  display: flex; align-items: flex-start; gap: 32px;
  max-width: 960px; margin: 0 auto;
  grid-template-columns: none;
}
.lp-wrapper.is-dark .lp-hero-copy { flex: 1; min-width: 0; text-align: left; }
.lp-wrapper.is-dark .lp-hero-bigtype {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(64px, 11vw, 110px);
  line-height: .95; letter-spacing: 2px; color: #fff;
  display: block; margin-bottom: 18px;
}
.lp-wrapper.is-dark .lp-hero h1 {
  font-size: 18px; font-weight: 900; color: #fff;
  letter-spacing: -.3px; line-height: 1.4; margin: 0 0 14px;
}
.lp-wrapper.is-dark .lp-hero h1 em,
.lp-wrapper.is-dark .lp-hero-accent {
  color: var(--d-gold); font-style: normal;
  border-bottom: 2px solid var(--d-gold); padding-bottom: 2px;
  background: none; -webkit-text-fill-color: var(--d-gold);
}
.lp-wrapper.is-dark .lp-hero-sub {
  font-size: 12.5px; color: var(--d-muted);
  line-height: 1.95; margin-bottom: 28px; max-width: 380px;
}
.lp-wrapper.is-dark .lp-badge {
  display: inline-flex; background: transparent;
  color: var(--d-gold); border: 1px solid rgba(200,169,110,.4);
  font-size: 11px; padding: 4px 10px; border-radius: 2px; margin-bottom: 18px;
}
.lp-wrapper.is-dark .lp-badge::before { display: none; }
.lp-wrapper.is-dark .lp-hero-actions {
  flex-direction: column; align-items: stretch; gap: 10px;
  max-width: 340px; margin-bottom: 8px;
}
.lp-wrapper.is-dark .lp-hero-cta {
  background: var(--d-gold); color: #111;
  font-weight: 700; font-size: 13px; letter-spacing: .5px;
  padding: 15px 20px; border-radius: 3px; text-align: center;
  box-shadow: none;
}
.lp-wrapper.is-dark .lp-hero-cta:hover { background: var(--d-gold-2); transform: none; }
.lp-wrapper.is-dark .lp-hero-cta-ghost {
  background: transparent; color: rgba(255,255,255,.7);
  border: 1px solid var(--d-bd-strong);
  font-size: 13px; padding: 14px 20px; border-radius: 3px; text-align: center;
}
.lp-wrapper.is-dark .lp-hero-cta-ghost:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.3); }
.lp-wrapper.is-dark .lp-trust {
  font-size: 10.5px; color: rgba(255,255,255,.32);
  text-align: center; max-width: 340px; margin: 4px 0 0;
}
.lp-wrapper.is-dark .lp-hero-phone {
  flex-shrink: 0; width: 200px; padding-top: 4px;
}
.lp-wrapper.is-dark .lp-hero-phone svg { width: 100%; height: auto; display: block; }
@media (max-width: 760px) {
  .lp-wrapper.is-dark .lp-hero-inner { flex-direction: column; align-items: center; gap: 28px; }
  .lp-wrapper.is-dark .lp-hero-copy { text-align: center; }
  .lp-wrapper.is-dark .lp-hero-sub { margin-left: auto; margin-right: auto; }
  .lp-wrapper.is-dark .lp-hero-actions { margin-left: auto; margin-right: auto; }
}

/* Section labels & headings */
.lp-wrapper.is-dark .lp-section-label {
  font-size: 10px; font-weight: 700; letter-spacing: 2px;
  color: rgba(255,255,255,.4); text-transform: uppercase;
  border-left: 2px solid var(--d-gold); padding-left: 10px;
  background: none; display: inline-block; margin-bottom: 14px;
}
.lp-wrapper.is-dark h2 { color: #fff; }

/* Industry tag chips */
.lp-wrapper.is-dark .lp-tags-section {
  position: relative; z-index: 2;
  padding: 8px 28px 56px;
  max-width: 960px; margin: 0 auto;
}
.lp-wrapper.is-dark .lp-tags-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.lp-wrapper.is-dark .lp-tag {
  font-size: 11.5px; color: rgba(255,255,255,.7);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--d-bd-strong);
  padding: 6px 14px; border-radius: 2px;
  text-decoration: none; letter-spacing: .3px;
  transition: all .15s;
}
.lp-wrapper.is-dark .lp-tag:hover {
  background: var(--d-gold); color: #111;
  border-color: var(--d-gold); font-weight: 700;
}

/* Trust band */
.lp-wrapper.is-dark .lp-trust-band {
  background: #0d0d0d; border-top: 1px solid var(--d-bd); border-bottom: 1px solid var(--d-bd);
}
.lp-wrapper.is-dark .lp-trust-num { color: #fff; }
.lp-wrapper.is-dark .lp-trust-num span { color: var(--d-gold); }
.lp-wrapper.is-dark .lp-trust-label,
.lp-wrapper.is-dark .lp-trust-univs-label { color: var(--d-muted); }
.lp-wrapper.is-dark .lp-trust-univ-list li {
  background: rgba(255,255,255,.04); color: rgba(255,255,255,.7);
  border: 1px solid var(--d-bd);
}
.lp-wrapper.is-dark .lp-trust-divider { background: var(--d-bd); }

/* Section backgrounds */
.lp-wrapper.is-dark .lp-gakuchika,
.lp-wrapper.is-dark .lp-features,
.lp-wrapper.is-dark .lp-steps,
.lp-wrapper.is-dark .lp-industry-links { background: var(--d-bg); }
.lp-wrapper.is-dark .lp-gakuchika-desc,
.lp-wrapper.is-dark .lp-industry-links-desc { color: var(--d-muted); }

/* Cards */
.lp-wrapper.is-dark .card,
.lp-wrapper.is-dark .lp-feature-card {
  background: var(--d-card); border: 1px solid var(--d-bd);
  color: #fff; box-shadow: none;
}
.lp-wrapper.is-dark .lp-feature-card:hover,
.lp-wrapper.is-dark .card:hover { border-color: var(--d-gold); box-shadow: none; }
.lp-wrapper.is-dark .lp-feature-title { color: #fff; }
.lp-wrapper.is-dark .lp-feature-text { color: var(--d-muted); }
.lp-wrapper.is-dark .section-title,
.lp-wrapper.is-dark .other-pr-title-label { color: rgba(255,255,255,.5); }
.lp-wrapper.is-dark .other-pr-title-value,
.lp-wrapper.is-dark .other-pr-text,
.lp-wrapper.is-dark .expandable-text { color: rgba(255,255,255,.85); }
.lp-wrapper.is-dark .expandable-more { color: var(--d-gold); }

/* Steps */
.lp-wrapper.is-dark .lp-step {
  background: var(--d-card); border: 1px solid var(--d-bd);
}
.lp-wrapper.is-dark .lp-step-num { color: var(--d-gold); }
.lp-wrapper.is-dark .lp-step-title { color: #fff; }
.lp-wrapper.is-dark .lp-step-text { color: var(--d-muted); }

/* Industry links list */
.lp-wrapper.is-dark .lp-industry-link {
  background: var(--d-card); border: 1px solid var(--d-bd); color: rgba(255,255,255,.8);
}
.lp-wrapper.is-dark .lp-industry-link:hover {
  border-color: var(--d-gold); color: var(--d-gold); background: var(--d-card-2);
}
.lp-wrapper.is-dark .lp-industry-link::before { color: rgba(255,255,255,.4); }

/* Login gate */
.lp-wrapper.is-dark .lp-login-gate {
  background: var(--d-card); border: 1px dashed var(--d-bd-strong); color: #fff;
}
.lp-wrapper.is-dark .lp-login-gate p { color: rgba(255,255,255,.8); }
.lp-wrapper.is-dark .lp-gate-sub { color: var(--d-muted); }

/* Final CTA — START NOW */
.lp-wrapper.is-dark .lp-final-cta {
  background: var(--d-bg); border-top: 1px solid var(--d-bd);
  padding: 72px 28px; text-align: center;
  position: relative; overflow: hidden;
}
.lp-wrapper.is-dark .lp-final-cta::before {
  content: ''; position: absolute;
  width: 520px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(200,169,110,.12) 0%, transparent 70%);
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  pointer-events: none; z-index: 0;
}
.lp-wrapper.is-dark .lp-final-cta-inner { position: relative; z-index: 1; }
.lp-wrapper.is-dark .lp-final-cta-bigtype {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 52px; letter-spacing: 3px; color: #fff;
  line-height: 1; margin-bottom: 14px; display: block;
}
.lp-wrapper.is-dark .lp-final-cta h2 { font-size: 0; margin: 0; }
.lp-wrapper.is-dark .lp-final-cta p { color: rgba(255,255,255,.4); font-size: 12.5px; margin-bottom: 24px; }
.lp-wrapper.is-dark .lp-final-cta-btn {
  background: var(--d-gold); color: #111;
  font-weight: 700; font-size: 13px; padding: 16px 36px;
  border-radius: 3px; letter-spacing: .5px; box-shadow: none;
}
.lp-wrapper.is-dark .lp-final-cta-btn:hover { background: var(--d-gold-2); transform: none; box-shadow: none; }
.lp-wrapper.is-dark .lp-final-cta-note { color: rgba(255,255,255,.25); font-size: 10.5px; margin-top: 12px; }

/* Footer */
.lp-wrapper.is-dark .lp-footer { background: var(--d-bg); border-top: 1px solid var(--d-bd); color: rgba(255,255,255,.3); }
.lp-wrapper.is-dark .lp-footer-brand { color: rgba(255,255,255,.5); }
.lp-wrapper.is-dark .lp-footer-links a { color: rgba(255,255,255,.3); }
.lp-wrapper.is-dark .lp-footer-links a:hover { color: var(--d-gold); }

/* =========================================================
   GLOBAL DARK + GOLD — applied to all pages
   Overrides root variables so app/login/register/error all flip.
   ========================================================= */
:root {
  --bg:         #111111;
  --bg-2:       #161616;
  --surface:    #161616;
  --surface-2:  #1a1a1a;
  --surface-hi: #1e1e1e;

  --fg:           #ffffff;
  --fg-secondary: rgba(255,255,255,.82);
  --fg-3:         rgba(255,255,255,.65);
  --muted:        rgba(255,255,255,.5);
  --muted-2:      rgba(255,255,255,.35);

  --bd:        rgba(255,255,255,.08);
  --bd-light:  rgba(255,255,255,.05);
  --bd-strong: rgba(255,255,255,.18);

  --accent:        #C8A96E;
  --accent-2:      #B8985A;
  --accent-light:  #D9BC85;
  --accent-bg:     rgba(200,169,110,.12);
  --accent-bg-2:   rgba(200,169,110,.22);

  --success: #4CAF82;
  --warning: #E0B96A;
  --danger:  #E57373;
  --cyan:    #6BAEC9;

  --grad-1: linear-gradient(135deg, #C8A96E 0%, #B8985A 50%, #8A7A4A 100%);
  --grad-soft: linear-gradient(180deg, #111 0%, #161616 100%);
  --grad-mesh:
    radial-gradient(at 20% 0%, rgba(200,169,110,0.10) 0%, transparent 50%),
    radial-gradient(at 80% 0%, rgba(200,169,110,0.06) 0%, transparent 50%),
    radial-gradient(at 50% 100%, rgba(200,169,110,0.05) 0%, transparent 60%);

  --shadow-xs: 0 1px 2px rgba(0,0,0,.4);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.4), 0 1px 2px rgba(0,0,0,.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,.5), 0 2px 4px rgba(0,0,0,.3);
  --shadow-lg: 0 12px 40px -8px rgba(0,0,0,.6), 0 4px 12px rgba(0,0,0,.4);
  --shadow-glow: 0 0 0 3px rgba(200,169,110,.25);
}

body { background: var(--bg); color: var(--fg); }

::selection { background: var(--accent-bg-2); color: var(--accent-light); }

/* Inputs / selects / textareas — flip to dark surfaces */
input, select, textarea {
  background: var(--surface-2) !important;
  color: var(--fg) !important;
  border: 1px solid var(--bd-strong) !important;
  border-radius: 3px;
}
input::placeholder, textarea::placeholder { color: var(--muted-2); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent) !important;
  box-shadow: var(--shadow-glow);
}

/* Primary buttons → gold */
button:not([class]),
.btn, .btn-primary,
#btn-register,
.error-link {
  background: var(--accent);
  color: #111;
  border: 1px solid var(--accent);
  font-weight: 700;
  border-radius: 3px;
  letter-spacing: .3px;
}
button:not([class]):hover,
.btn:hover, .btn-primary:hover,
#btn-register:hover,
.error-link:hover { background: var(--accent-light); border-color: var(--accent-light); color: #111; }

/* Login / register card */
.login-card {
  background: var(--surface);
  border: 1px solid var(--bd);
  color: var(--fg);
  border-radius: 6px;
  padding: 28px;
  box-shadow: var(--shadow-lg);
}
.login-card h2 { color: var(--fg); font-family: 'Bebas Neue', sans-serif; letter-spacing: 2px; font-size: 24px; }
.login-card .login-desc { color: var(--muted); }

/* Error page */
body.page-error { background: var(--bg); color: var(--fg); }
.error-card {
  background: var(--surface);
  border: 1px solid var(--bd);
  color: var(--fg);
}
.error-code { color: var(--accent); font-family: 'Bebas Neue', sans-serif; }
.error-title { color: var(--fg); }
.error-message { color: var(--muted); }

/* Site footer (base.html default) */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--bd);
  color: var(--muted-2);
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

/* App shell — drawer / sidebar / cards already use vars, so they flip.
   Reinforce a few spots where colors were hardcoded. */
.app-wrapper, .app-header, .nav-drawer, .nav-overlay { background: var(--bg); color: var(--fg); }
.app-header { border-bottom: 1px solid var(--bd); }
.app-title, .app-title__link { color: var(--fg); }
.app-title__link:hover { color: var(--accent); }
.nav-drawer { border-right: 1px solid var(--bd); background: var(--surface); }
.nav-item { color: var(--fg-3); }
.nav-item:hover { color: var(--fg); background: var(--surface-2); }
.nav-item.active { color: var(--accent); background: var(--accent-bg); border-left: 2px solid var(--accent); }
.drawer-header { color: var(--muted-2); border-bottom: 1px solid var(--bd); }
.hamburger { color: var(--fg); background: transparent; border: 1px solid var(--bd-strong); }

/* Generic card containers used inside app */
.card { background: var(--surface); border: 1px solid var(--bd); color: var(--fg); box-shadow: none; }
.card:hover { border-color: var(--accent); }

/* =========================================================
   LOGIN PAGE — plain white, native Material look.
   Scoped to body.page-login-plain so the global dark/gold
   theme never leaks into FirebaseUI. Single source of truth
   for FirebaseUI styling (legacy blocks below were removed).
   ========================================================= */
body.page-login-plain {
  background: #ffffff !important;
  color: #111 !important;
  display: block !important;
}
body.page-login-plain::before { content: none !important; background: none !important; }
body.page-login-plain .site-footer { display: none; }
body.page-login-plain .login-plain {
  max-width: 420px;
  margin: 48px auto;
  padding: 16px;
  background: #ffffff;
  color: #111;
}
body.page-login-plain .login-plain h2 { margin: 0 0 8px; color: #111; font-weight: 700; font-size: 22px; }
body.page-login-plain .login-plain p  { margin: 0 0 8px; color: #555; font-size: 14px; }

/* Default everything inside the widget to dark-on-white */
body.page-login-plain #firebaseui-auth-container,
body.page-login-plain #firebaseui-auth-container * {
  color: #111 !important;
  -webkit-text-fill-color: #111 !important;
}

/* Text inputs (phone number / SMS code) */
body.page-login-plain #firebaseui-auth-container input {
  background: #fff !important;
  color: #111 !important;
  -webkit-text-fill-color: #111 !important;
  border: none !important;
  border-bottom: 1px solid rgba(0,0,0,.42) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  caret-color: #1976d2 !important;
}
body.page-login-plain #firebaseui-auth-container input:focus {
  outline: none !important;
  border-bottom: 2px solid #1976d2 !important;
  box-shadow: none !important;
}
body.page-login-plain #firebaseui-auth-container input:-webkit-autofill {
  -webkit-text-fill-color: #111 !important;
  -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
}
body.page-login-plain #firebaseui-auth-container input::placeholder { color: rgba(0,0,0,.38) !important; }

/* Floating labels */
body.page-login-plain #firebaseui-auth-container .mdl-textfield__label { color: rgba(0,0,0,.54) !important; }
body.page-login-plain #firebaseui-auth-container .mdl-textfield--floating-label.is-focused .mdl-textfield__label,
body.page-login-plain #firebaseui-auth-container .mdl-textfield--floating-label.is-dirty  .mdl-textfield__label { color: #1976d2 !important; }
body.page-login-plain #firebaseui-auth-container .mdl-textfield__label::after { background-color: #1976d2 !important; }

/* Country selector (+81 / flag) */
body.page-login-plain #firebaseui-auth-container .firebaseui-country-selector,
body.page-login-plain #firebaseui-auth-container .firebaseui-id-country-selector {
  color: #111 !important;
  background: #fff !important;
}

/* Primary button (確認 / Verify) */
body.page-login-plain #firebaseui-auth-container .firebaseui-id-submit,
body.page-login-plain #firebaseui-auth-container .mdl-button--raised.mdl-button--colored {
  background: #1976d2 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border: none !important;
  border-radius: 2px !important;
  height: 36px !important;
  padding: 0 16px !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  box-shadow: 0 2px 2px 0 rgba(0,0,0,.14), 0 3px 1px -2px rgba(0,0,0,.2), 0 1px 5px 0 rgba(0,0,0,.12) !important;
}
body.page-login-plain #firebaseui-auth-container .firebaseui-id-submit *,
body.page-login-plain #firebaseui-auth-container .mdl-button--raised.mdl-button--colored * {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
body.page-login-plain #firebaseui-auth-container .firebaseui-id-submit:hover,
body.page-login-plain #firebaseui-auth-container .mdl-button--raised.mdl-button--colored:hover { background: #1565c0 !important; }

/* Secondary / text buttons (Cancel, Resend) */
body.page-login-plain #firebaseui-auth-container .mdl-button:not(.mdl-button--raised) {
  color: #1976d2 !important;
  -webkit-text-fill-color: #1976d2 !important;
}

/* Links & errors */
body.page-login-plain #firebaseui-auth-container a,
body.page-login-plain #firebaseui-auth-container .firebaseui-link {
  color: #1976d2 !important;
  -webkit-text-fill-color: #1976d2 !important;
}
body.page-login-plain #firebaseui-auth-container .firebaseui-error,
body.page-login-plain #firebaseui-auth-container .firebaseui-text-input-error {
  color: #d32f2f !important;
  -webkit-text-fill-color: #d32f2f !important;
}

/* Selection */
body.page-login-plain #firebaseui-auth-container ::selection { background: #b3d4fc !important; color: #111 !important; }

/* (Legacy FirebaseUI override blocks removed — all styling is now in the
   single body.page-login-plain block above. FirebaseUI only ever renders on
   the login page, so no global overrides are needed.) */
