/* ============================================
   Auction Dynamics — Universal Auction Advisor
   ============================================ */

:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --surface-warm: linear-gradient(135deg, #ffffff 0%, #fff8f1 100%);
  --text: #1a1a2e;
  --text-muted: #7c7e8a;
  --primary: #e8772e;
  --primary-dark: #d2641e;
  --primary-light: #fdd4a8;
  --primary-bg: #fef5ec;
  --accent: #d2641e;
  --accent-hover: #b85417;
  --border: #ece1d5;
  --border-accent: rgba(232,119,46,.18);
  --buy: #0fa87a;
  --hold: #e09b0d;
  --skip: #e04949;
  --radius: 14px;
  --shadow: 0 1px 4px rgba(30,20,10,.05), 0 1px 2px rgba(0,0,0,.03);
  --shadow-md: 0 4px 16px rgba(180,100,30,.07), 0 2px 6px rgba(0,0,0,.04);
  --shadow-lg: 0 12px 36px rgba(180,100,30,.1), 0 4px 12px rgba(0,0,0,.04);
  --transition-fast: 150ms cubic-bezier(.4,0,.2,1);
  --transition-smooth: 300ms cubic-bezier(.4,0,.2,1);
  --card-glow: 0 0 0 1px rgba(232,119,46,.06);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Noto Sans JP', 'DM Sans', sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(232,119,46,.04), transparent 50%),
    radial-gradient(ellipse 60% 50% at 90% 100%, rgba(15,168,122,.03), transparent 50%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(249,115,22,.15); color: var(--text); }
a { color: var(--primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { text-decoration: underline; }
.lang-select {
  appearance: none; -webkit-appearance: none;
  border: 1px solid var(--border); border-radius: 6px;
  padding: 4px 24px 4px 8px; font-size: .78rem;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236b7280'/%3E%3C/svg%3E") no-repeat right 8px center;
  cursor: pointer; color: var(--text-muted);
  transition: border-color var(--transition-fast);
}
.lang-select:focus { outline: none; border-color: var(--primary); }
.lang-select:hover { border-color: var(--primary-light); }

/* ---- Header ---- */
.site-header {
  background: linear-gradient(135deg, rgba(255,248,241,.88) 0%, rgba(250,247,242,.92) 100%);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border-bottom: 1px solid rgba(236,225,213,.5);
  box-shadow: 0 1px 8px rgba(180,100,30,.04);
  position: sticky; top: 0; z-index: 100;
  transition: background var(--transition-smooth), box-shadow var(--transition-smooth);
}
.header-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 56px;
}
.logo {
  display: flex; align-items: center; gap: .5rem;
  font-weight: 700; font-size: 1.1rem; color: var(--text);
  text-decoration: none;
  transition: opacity var(--transition-fast);
}
.logo:hover { opacity: .85; text-decoration: none; }
.logo-icon { font-size: 1.3rem; }
.logo-icon-img { width: 32px; height: 32px; }
.logo-tagline {
  font-size: .65rem; font-weight: 600;
  background: linear-gradient(135deg, #f97316, #ea580c);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.logo-ver {
  font-size: .65rem; font-weight: 400; color: var(--text-muted);
  background: var(--bg); padding: 2px 6px; border-radius: 4px;
}
.header-nav { display: flex; align-items: center; gap: .75rem; }
.nav-link {
  font-size: .82rem; color: var(--text-muted); font-weight: 500;
  padding: .35rem .6rem; border-radius: 8px;
  transition: color var(--transition-fast), background var(--transition-fast);
  position: relative;
}
.nav-link:hover {
  color: var(--text); background: rgba(249,115,22,.06); text-decoration: none;
}
.nav-link.active {
  color: var(--primary-dark); background: rgba(249,115,22,.08); text-decoration: none;
  font-weight: 600;
}
.nav-plan {
  font-size: .68rem; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff;
  padding: 3px 10px; border-radius: 99px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .03em;
}
.nav-logout { color: var(--skip); }
.nav-cta {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff !important;
  padding: .4rem .9rem; border-radius: 8px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  font-weight: 600;
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(249,115,22,.25);
  text-decoration: none;
}
.nav-admin { color: #d97706; }

/* ---- Settings Dropdown ---- */
.settings-dropdown { position: relative; display: inline-flex; }
.settings-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 6px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  transition: color var(--transition-fast), background var(--transition-fast);
}
.settings-btn:hover { color: var(--text); background: rgba(249,115,22,.06); }
.settings-menu {
  display: none; position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: .5rem .25rem; min-width: 160px;
  box-shadow: var(--shadow-md); z-index: 200;
}
.settings-menu.open { display: block; }
.settings-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: .45rem .75rem; font-size: .82rem; color: var(--text);
  cursor: pointer; border-radius: 6px; gap: .75rem;
  transition: background var(--transition-fast);
}
.settings-item:hover { background: rgba(249,115,22,.04); }
.settings-item input[type="checkbox"] { display: none; }
.toggle-switch {
  width: 36px; height: 20px; background: #d1d5db;
  border-radius: 10px; position: relative; flex-shrink: 0;
  transition: background .2s ease;
}
.toggle-switch::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.15);
  transition: transform .2s ease;
}
.settings-item input[type="checkbox"]:checked + .toggle-switch {
  background: var(--primary);
}
.settings-item input[type="checkbox"]:checked + .toggle-switch::after {
  transform: translateX(16px);
}

/* Effects-off: disable bounce/spring animations */
.effects-off .btn { transition: background .2s ease, opacity .2s ease; }
.effects-off .btn:active { transform: none; }
.effects-off .btn-primary:hover { transform: none; }
.effects-off .btn-primary:active { transform: none; }
.effects-off .bottom-nav-item:active { transform: none; }

/* ---- Main ---- */
.main-content {
  flex: 1; max-width: 1100px; width: 100%;
  margin: 0 auto; padding: 2rem 1.5rem;
}

/* ---- Flash ---- */
.flash-container { margin-bottom: 1.5rem; }
.flash {
  padding: .75rem 1.25rem; border-radius: var(--radius);
  font-size: .88rem; margin-bottom: .5rem;
  animation: flash-in .4s cubic-bezier(.22,1,.36,1);
}
@keyframes flash-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.flash-error { background: #fef2f2; color: var(--skip); border: 1px solid #fecaca; }
.flash-info { background: #fff7ed; color: var(--accent); border: 1px solid var(--primary-light); }
.flash-success { background: #ecfdf5; color: var(--buy); border: 1px solid #a7f3d0; }

/* ---- Appraisal Hero ---- */
.appraisal-hero {
  text-align: center; padding: 3rem 0 2rem;
}
.hero-title {
  font-size: 2rem; font-weight: 700; line-height: 1.3;
  margin-bottom: .75rem;
  letter-spacing: -.02em;
}
.hero-accent { color: var(--primary); }
.hero-sub {
  color: var(--text-muted); font-size: .95rem; margin-bottom: 2rem;
  max-width: 560px; margin-left: auto; margin-right: auto;
}

/* Search Bar */
.search-bar {
  display: flex; max-width: 700px; margin: 0 auto;
  background: linear-gradient(135deg, #ffffff 0%, #fff9f4 100%);
  border: 2px solid var(--border);
  border-radius: 99px; overflow: hidden;
  box-shadow: 0 4px 20px rgba(180,100,30,.06), 0 1px 3px rgba(0,0,0,.03);
  transition: border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}
.search-bar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 4px 28px rgba(232,119,46,.14), 0 0 0 4px rgba(232,119,46,.06);
}
.search-input {
  flex: 1; border: none; padding: 1rem 1.5rem;
  font-size: 1rem; font-family: inherit; outline: none;
  background: transparent; min-width: 0; color: var(--text);
}
.search-input::placeholder { color: #c4b5a8; }
.search-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; border: none;
  padding: 1rem 2rem; font-size: 1rem; font-weight: 700;
  font-family: inherit; cursor: pointer;
  white-space: nowrap;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.search-btn:hover { opacity: .92; }
.search-btn:active { transform: scale(.93); transition-duration: .06s; }
.search-btn { position: relative; overflow: hidden; transition: transform .15s cubic-bezier(.34,1.56,.64,1), opacity .2s ease; }
.search-hint {
  text-align: center; color: var(--text-muted);
  font-size: .8rem; margin-top: .75rem;
}

/* How it works */
.how-it-works { padding: 3rem 0; }
.section-title {
  font-size: 1.3rem; font-weight: 700; text-align: center;
  margin-bottom: 2rem; letter-spacing: -.01em;
}
.steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}
.step {
  background: linear-gradient(160deg, #ffffff 0%, #fff8f1 100%);
  padding: 1.5rem;
  border-radius: var(--radius); box-shadow: var(--shadow), var(--card-glow);
  border: 1px solid var(--border);
  text-align: center;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
}
.step:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-accent);
}
.step-num {
  width: 36px; height: 36px; line-height: 36px;
  background: var(--primary); color: #fff;
  border-radius: 50%; font-weight: 700;
  margin: 0 auto .75rem; font-size: .9rem;
}
.step h3 { font-size: 1rem; margin-bottom: .4rem; }
.step p { font-size: .85rem; color: var(--text-muted); }

/* ---- Result Page ---- */
.result-header { text-align: center; margin-bottom: 2rem; }
.decision-big {
  display: inline-block; font-size: 2rem; font-weight: 800;
  padding: .4rem 2rem; border-radius: 14px;
  margin-bottom: 1rem; letter-spacing: .03em;
}
.result-title { font-size: 1.2rem; margin-bottom: .5rem; }
.result-url { font-size: .8rem; color: var(--text-muted); word-break: break-all; }

.result-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem; margin-bottom: 2rem;
}
.result-card {
  background: linear-gradient(160deg, #ffffff 0%, #fef9f4 100%);
  padding: 1.5rem;
  border-radius: var(--radius); box-shadow: var(--shadow);
  text-align: center;
  border: 1px solid var(--border);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
}
.result-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-accent);
}
.result-card h3 { font-size: .85rem; color: var(--text-muted); margin-bottom: .5rem; }
.big-number { font-size: 1.6rem; font-weight: 700; }
.big-number.highlight { color: var(--primary); }
.card-source, .card-label { font-size: .75rem; color: var(--text-muted); }

.result-details {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem; margin-bottom: 2rem;
}
.detail-block {
  background: linear-gradient(160deg, #ffffff 0%, #fef9f4 100%);
  padding: 1.5rem;
  border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary-light);
  transition: box-shadow var(--transition-smooth), border-color var(--transition-smooth);
}
.detail-block:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-accent);
  border-left-color: var(--primary);
}
.detail-block h3 { font-size: 1rem; margin-bottom: 1rem; }
.detail-table { width: 100%; font-size: .9rem; }
.detail-table td { padding: .4rem 0; border-bottom: 1px solid var(--border); }
.detail-table td:first-child { color: var(--text-muted); width: 40%; }
.reasons-list { list-style: none; }
.reasons-list li {
  padding: .5rem 0; border-bottom: 1px solid var(--border);
  font-size: .9rem;
}
.reasons-list li::before { content: "→ "; color: var(--primary); font-weight: 700; }

.result-actions { display: flex; gap: 1rem; justify-content: center; }

/* ---- SNS Share ---- */
.share-section {
  text-align: center; margin: 1.5rem 0;
  padding: 1.25rem; background: var(--primary-bg);
  border-radius: var(--radius); border: 1px solid var(--border);
}
.share-label {
  font-size: .82rem; font-weight: 600; color: var(--text-muted);
  margin-bottom: .75rem;
}
.share-buttons { display: flex; gap: .75rem; justify-content: center; }
.share-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1.2rem; border-radius: 8px;
  font-size: .82rem; font-weight: 600;
  text-decoration: none; transition: transform var(--transition-fast), opacity var(--transition-fast);
}
.share-btn:hover { transform: translateY(-1px); text-decoration: none; opacity: .9; }
.share-x { background: #000; color: #fff; }
.share-line { background: #06c755; color: #fff; }
.share-hint {
  font-size: .75rem; color: var(--primary); font-weight: 500;
  margin-bottom: .75rem;
}
.share-badges-link {
  display: inline-block; margin-top: .75rem;
  font-size: .78rem; font-weight: 500;
}

/* ---- Badges & Points ---- */
.badges-page { max-width: 800px; margin: 0 auto; }
.points-summary {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1rem; margin-bottom: 1.5rem;
}
.points-card {
  background: linear-gradient(160deg, #ffffff 0%, #fef9f4 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem; text-align: center;
}
.points-card-bonus { border-color: var(--primary-light); background: var(--primary-bg); }
.points-value {
  font-size: 1.8rem; font-weight: 700; color: var(--text);
  line-height: 1.2;
}
.points-card-bonus .points-value { color: var(--primary); }
.points-label {
  font-size: .75rem; color: var(--text-muted); font-weight: 500;
  margin-top: .25rem;
}
.points-explainer {
  background: var(--primary-bg); border-radius: var(--radius);
  padding: 1rem 1.25rem; margin-bottom: 2rem;
  font-size: .85rem; color: var(--text-muted); line-height: 1.6;
}
.badges-subtitle {
  font-size: 1.1rem; font-weight: 600; margin: 0 0 1rem;
  color: var(--text);
}
.badges-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: .75rem; margin-bottom: 2rem;
}
.badge-card {
  background: linear-gradient(160deg, #ffffff 0%, #fef9f4 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem .75rem;
  text-align: center; transition: transform var(--transition-fast);
}
.badge-earned {
  border-color: var(--primary-light);
  background: linear-gradient(160deg, #fff7ed 0%, #fef3e0 100%);
  box-shadow: 0 2px 8px rgba(232,119,46,.12);
}
.badge-earned:hover { transform: translateY(-2px); }
.badge-locked { opacity: .45; filter: grayscale(1); }
.badge-icon { font-size: 2rem; margin-bottom: .5rem; }
.badge-name { font-size: .85rem; font-weight: 600; color: var(--text); }
.badge-desc { font-size: .72rem; color: var(--text-muted); margin-top: .25rem; }
.badge-threshold {
  font-size: .68rem; color: var(--primary); font-weight: 500;
  margin-top: .5rem;
}

/* ---- Score Cards (色分け・パーセント表示) ---- */
.score-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}
@media (max-width: 768px) {
  .score-grid { grid-template-columns: repeat(2, 1fr); }
}
.score-card {
  background: linear-gradient(160deg, #ffffff 0%, #fafaf8 100%);
  padding: 1.25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  border: 1px solid var(--border);
  border-top: 4px solid var(--border);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}
.score-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.score-card.score-safe { border-top-color: #0fa87a; background: linear-gradient(160deg, #ffffff 0%, #f0fdf7 100%); }
.score-card.score-caution { border-top-color: #e09b0d; background: linear-gradient(160deg, #ffffff 0%, #fefcf3 100%); }
.score-card.score-danger { border-top-color: #e04949; background: linear-gradient(160deg, #ffffff 0%, #fef5f5 100%); }

.score-icon { font-size: 1.5rem; margin-bottom: .5rem; }
.score-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
}
.score-safe .score-value { color: #10b981; }
.score-caution .score-value { color: #f59e0b; }
.score-danger .score-value { color: #ef4444; }

.score-label {
  font-size: .75rem;
  color: var(--text-muted);
  margin: .25rem 0 .5rem;
}
.score-bar {
  height: 6px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
  margin: .5rem 0;
}
.score-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .3s ease;
}
.score-safe .score-fill { background: linear-gradient(90deg, #10b981, #34d399); }
.score-caution .score-fill { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.score-danger .score-fill { background: linear-gradient(90deg, #ef4444, #f87171); }

.score-hint {
  font-size: .7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
}
.score-safe .score-hint { background: #d1fae5; color: #059669; }
.score-caution .score-hint { background: #fef3c7; color: #d97706; }
.score-danger .score-hint { background: #fee2e2; color: #dc2626; }

/* ---- Decision Badges ---- */
.decision-badge {
  display: inline-block; padding: 2px 10px;
  border-radius: 4px; font-size: .75rem; font-weight: 700;
  text-transform: uppercase;
}
.badge-buy { background: #d1fae5; color: var(--buy); }
.badge-hold { background: #fef3c7; color: var(--hold); }
.badge-skip { background: #fee2e2; color: var(--skip); }

/* ---- Stats ---- */
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem; margin-bottom: 2rem;
}
.stat-card {
  background: linear-gradient(160deg, #ffffff 0%, #fef9f4 100%);
  padding: 1.5rem;
  border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid var(--border);
  text-align: center;
}
.stat-num { font-size: 2rem; font-weight: 700; }
.stat-label { font-size: .8rem; color: var(--text-muted); }
.stat-buy { border-left: 3px solid var(--buy); }
.stat-buy .stat-num { color: var(--buy); }
.stat-hold { border-left: 3px solid var(--hold); }
.stat-hold .stat-num { color: var(--hold); }
.stat-skip { border-left: 3px solid var(--skip); }
.stat-skip .stat-num { color: var(--skip); }

/* ---- Recent / History list ---- */
.recent-list { display: flex; flex-direction: column; gap: .5rem; }
.recent-card {
  display: flex; align-items: center; gap: 1rem;
  background: linear-gradient(160deg, #ffffff 0%, #fff9f4 100%);
  padding: .75rem 1rem;
  border-radius: var(--radius); box-shadow: var(--shadow);
  text-decoration: none; color: var(--text);
  border: 1px solid var(--border);
  transition: box-shadow var(--transition-smooth), transform var(--transition-smooth), border-color var(--transition-smooth);
}
.recent-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  border-color: var(--border-accent);
  text-decoration: none;
}
.recent-title { flex: 1; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-price { font-weight: 700; font-size: .9rem; white-space: nowrap; }

/* ---- Data Table ---- */
.data-table {
  width: 100%; border-collapse: collapse;
  background: linear-gradient(160deg, #ffffff 0%, #fef9f4 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  font-size: .85rem;
}
.data-table th {
  text-align: left; padding: .75rem 1rem;
  background: var(--bg); font-weight: 600; font-size: .72rem;
  color: var(--text-muted); text-transform: uppercase;
  letter-spacing: .04em;
}
.data-table td {
  padding: .65rem 1rem; border-top: 1px solid var(--border);
}
.data-table tr { transition: background var(--transition-fast); }
.data-table tbody tr:hover { background: rgba(249,115,22,.02); }
.data-table a { color: var(--text); transition: color var(--transition-fast); }
.data-table a:hover { color: var(--primary); }

/* ============================================================
   発見タブ — Discovery List
   ============================================================ */
.discovery-page h1 { margin-bottom: 16px; }
.discovery-list { display: flex; flex-direction: column; gap: 2px; }
.discovery-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.discovery-item:hover { background: rgba(249,115,22,.04); }
.discovery-datetime {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 48px;
  flex-shrink: 0;
}
.discovery-date {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.discovery-time {
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.2;
}
.discovery-decision { min-width: 52px; flex-shrink: 0; }
.discovery-info { flex: 1; min-width: 0; }
.discovery-title {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}
.discovery-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--muted);
}
.discovery-price { font-weight: 600; }
.discovery-arrow { opacity: 0.4; }
.discovery-pmax { font-weight: 700; color: var(--primary); }
.discovery-sigma { font-size: 0.75rem; font-weight: 600; color: #6a1b9a; background: #f3e5f5; padding: 1px 5px; border-radius: 4px; }
.discovery-method {
  font-size: 0.6rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.03em;
}
.method-tag-algorithm { background: #f0f0f0; color: #888; }
.method-tag-hybrid { background: #e8f5e9; color: #2e7d32; }
.method-tag-vision { background: #e3f2fd; color: #1565c0; }

@media (max-width: 600px) {
  .discovery-item { padding: 10px 12px; gap: 8px; }
  .discovery-datetime { min-width: 40px; }
  .discovery-title { font-size: 0.82rem; }
}

/* ---- Admin ---- */
.badge-admin {
  display: inline-block;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: .75rem;
  font-weight: 600;
}
.btn-small {
  padding: .3rem .6rem;
  font-size: .75rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: opacity .15s;
}
.btn-small:hover { opacity: .8; }
.btn-success { background: var(--buy); color: #fff; }
.btn-danger { background: var(--skip); color: #fff; }
.btn-primary { background: var(--primary); color: #fff; }

/* API Status Grid */
.api-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.api-status-card {
  background: linear-gradient(160deg, #ffffff 0%, #fef9f4 100%);
  padding: 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  border-left: 4px solid var(--border);
}
.api-status-card.api-connected {
  border-left-color: var(--buy);
}
.api-status-card.api-disconnected {
  border-left-color: var(--text-muted);
}
.api-name {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: .5rem;
}
.api-indicator {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
  margin-bottom: .25rem;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.status-ok { background: var(--buy); }
.status-ng { background: var(--text-muted); }
.api-env {
  font-size: .75rem;
  color: var(--text-muted);
}
.api-env code {
  background: var(--bg);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: .7rem;
}

/* Learning Status Grid */
.learning-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.learning-card {
  background: linear-gradient(160deg, #ffffff 0%, #f8faf9 100%);
  padding: 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  text-align: center;
}
.learning-title {
  font-size: .75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: .5rem;
}
.learning-value {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: .25rem;
}
.learning-value.status-ok {
  color: var(--buy);
}
.learning-meta {
  font-size: .75rem;
  color: var(--text-muted);
}

/* ---- Auth ---- */
.auth-page {
  max-width: 420px; margin: 2rem auto; text-align: center;
  padding: 0 1rem;
}
.auth-page h1 { font-size: 1.5rem; margin-bottom: 1.5rem; letter-spacing: -.01em; }
.auth-logo-area { margin-bottom: 1.5rem; }
.auth-logo-img { width: 48px; height: 48px; margin-bottom: .4rem; }
.auth-tagline { font-size: .9rem; color: var(--text-muted); font-weight: 500; }
.auth-card {
  background: linear-gradient(160deg, #ffffff 0%, #fff8f1 100%);
  border: 1px solid var(--border);
  border-radius: 16px; padding: 2rem 1.8rem;
  box-shadow: var(--shadow-md);
  text-align: left;
}
.auth-card-title { font-size: 1.4rem; font-weight: 800; margin-bottom: .3rem; letter-spacing: -.02em; }
.auth-card-desc { font-size: .85rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.auth-field { margin-bottom: 1rem; }
.auth-field label {
  display: block; font-size: .8rem; font-weight: 600;
  color: var(--text-muted); margin-bottom: .3rem;
}
.auth-field-hint { font-size: .72rem; color: var(--text-muted); margin-top: .3rem; }
.auth-form { display: flex; flex-direction: column; gap: 0; }
.auth-form input {
  width: 100%; padding: .75rem 1rem; border: 1.5px solid var(--border);
  border-radius: 10px; font-size: .95rem; font-family: inherit;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  background: var(--bg); color: var(--text);
}
.auth-form input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(249,115,22,.1);
}
.auth-form input::placeholder { color: #c4b5a8; }
.auth-submit-btn { width: 100%; margin-top: .5rem; padding: .85rem; font-size: 1rem; }
.auth-benefits {
  margin-top: 1.5rem; padding-top: 1.2rem;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: .5rem;
}
.auth-benefit-item {
  display: flex; align-items: center; gap: .5rem;
  font-size: .8rem; color: var(--text-muted);
}
.auth-benefit-icon { font-size: .9rem; flex-shrink: 0; }
.auth-alt { margin-top: 1.2rem; font-size: .85rem; color: var(--text-muted); text-align: center; }

/* ---- Buttons ---- */
.btn {
  display: inline-block; padding: .7rem 1.5rem;
  border-radius: 10px; font-weight: 600; font-size: .9rem;
  font-family: inherit; cursor: pointer; border: none;
  text-decoration: none;
  transition: transform .15s cubic-bezier(.34,1.56,.64,1), box-shadow .15s ease, background .2s ease, opacity .2s ease;
  position: relative; overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn:active { transform: scale(.93); transition-duration: .06s; }
.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
/* Ripple container */
.btn .btn-ripple {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,.4);
  transform: scale(0); animation: ripple-expand .5s ease-out forwards;
  pointer-events: none;
}
@keyframes ripple-expand {
  to { transform: scale(4); opacity: 0; }
}
/* Success flash */
.btn.btn-success-flash {
  animation: success-pulse .4s ease;
}
@keyframes success-pulse {
  0% { box-shadow: 0 0 0 0 rgba(16,185,129,.5); }
  50% { box-shadow: 0 0 0 10px rgba(16,185,129,.0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,.0); }
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 2px 8px rgba(234,88,12,.15);
}
.btn-primary:hover {
  box-shadow: 0 4px 16px rgba(234,88,12,.25);
  transform: translateY(-1px);
  text-decoration: none;
}
.btn-primary:active { transform: scale(.93) translateY(0); box-shadow: 0 1px 4px rgba(234,88,12,.15); transition-duration: .06s; }
.btn-secondary {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.btn-secondary:hover {
  background: var(--bg); border-color: var(--primary-light);
  text-decoration: none;
}

/* ---- Pricing ---- */
.pricing-page { text-align: center; }
.pricing-page h1 { font-size: 1.5rem; margin-bottom: 2rem; }
.plan-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem; max-width: 800px; margin: 0 auto;
}
.plan-card {
  background: linear-gradient(160deg, #ffffff 0%, #fef9f4 100%);
  padding: 2rem 1.5rem;
  border-radius: 16px; box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
}
.plan-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-accent);
}
.plan-card.featured { border: 2px solid var(--primary); background: linear-gradient(160deg, #fff7ed 0%, #fef3e0 100%); }
.plan-card h3 { font-size: 1.1rem; margin-bottom: .5rem; letter-spacing: -.01em; }
.plan-price { font-size: 1.6rem; font-weight: 700; margin-bottom: 1rem; }
.plan-card ul { list-style: none; margin-bottom: 1.5rem; }
.plan-card li { padding: .3rem 0; font-size: .9rem; color: var(--text-muted); }

/* ---- Empty State ---- */
.empty-state {
  text-align: center; padding: 3rem; color: var(--text-muted);
  font-size: .95rem;
}

/* ---- Popular Items ---- */
.popular-section {
  padding: 3rem 0;
  background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 100%);
  margin: 2rem -1.5rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  border-radius: var(--radius);
}
.section-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: .9rem;
  margin-top: -1.5rem;
  margin-bottom: 1.5rem;
}
.popular-grid {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.popular-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(160deg, #ffffff 0%, #fff9f4 100%);
  padding: .75rem 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
}
.popular-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-accent);
}
.popular-rank {
  width: 32px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  font-weight: 700;
  font-size: .9rem;
  background: var(--bg);
  border-radius: 50%;
  color: var(--text-muted);
  flex-shrink: 0;
}
.popular-rank.top-three {
  background: linear-gradient(135deg, #f97316, #fbbf24);
  color: #fff;
}
.popular-info {
  flex: 1;
  min-width: 0;
}
.popular-name {
  font-weight: 600;
  font-size: .95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.popular-category {
  font-size: .75rem;
  color: var(--text-muted);
}
.popular-count {
  margin-left: .5rem;
  background: var(--accent);
  color: #fff;
  padding: 1px 6px;
  border-radius: 10px;
  font-size: .65rem;
  font-weight: 600;
}
.popular-price-area {
  text-align: right;
  flex-shrink: 0;
}
.popular-price {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}
.popular-trend {
  font-size: .7rem;
  margin-top: 2px;
}
.trend-up { color: var(--buy); }
.trend-down { color: var(--skip); }
.trend-stable { color: var(--text-muted); }
.popular-cta {
  text-align: center;
  margin-top: 1.5rem;
  font-size: .9rem;
  color: var(--primary-dark);
  font-weight: 500;
}
.popular-prices {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.popular-list-price {
  font-size: .7rem;
  color: var(--text-muted);
  text-decoration: line-through;
}
.popular-action {
  margin-left: .5rem;
  flex-shrink: 0;
}
.btn-appraise {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff;
  border: none;
  padding: .4rem .8rem;
  border-radius: 6px;
  font-size: .75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
  white-space: nowrap;
}
.btn-appraise:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
}
.source-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: .75rem;
  font-weight: 600;
  margin-right: .25rem;
}
.source-external {
  background: linear-gradient(135deg, #0ea5e9, #06b6d4);
  color: #fff;
}
.source-internal {
  background: linear-gradient(135deg, #10b981, #34d399);
  color: #fff;
}
.source-icon {
  display: inline-block;
  margin-left: .25rem;
  padding: 1px 4px;
  border-radius: 3px;
  font-size: .6rem;
  font-weight: 700;
  background: var(--bg);
  color: var(--text-muted);
}

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 1.5rem; margin-top: auto;
  background: linear-gradient(180deg, transparent 0%, rgba(254,245,236,.5) 50%, rgba(250,244,238,.7) 100%);
}
.footer-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 1.5rem;
  text-align: center;
}
.footer-links { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: .75rem; }
.footer-links a {
  font-size: .8rem; color: var(--text-muted);
  transition: color var(--transition-fast);
}
.footer-links a:hover { color: var(--primary); text-decoration: none; }
.footer-contact { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: .75rem; }
.footer-contact a { font-size: .8rem; color: var(--primary); text-decoration: none; }
.footer-contact a:hover { text-decoration: underline; }
.footer-copy { font-size: .72rem; color: var(--text-muted); letter-spacing: .02em; }

/* ---- Enhanced Pricing Page ---- */
.pricing-header { margin-bottom: 2.5rem; }
.pricing-header h1 { font-size: 1.8rem; margin-bottom: .5rem; }
.pricing-header p { color: var(--text-muted); font-size: .95rem; }

.plan-grid { max-width: 900px; }
.plan-grid-4 { max-width: 1100px; grid-template-columns: repeat(4, 1fr); }
.plan-card { position: relative; transition: transform .2s, box-shadow .2s; }
.plan-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.plan-card.featured { background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 100%); }
.plan-max { border-color: #7c3aed; }
.plan-max h3 { background: linear-gradient(135deg, #7c3aed, #a855f7); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
@media (max-width: 900px) { .plan-grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .plan-grid-4 { grid-template-columns: 1fr; } }
.plan-badge {
  position: absolute; top: -10px; right: 16px;
  background: var(--primary); color: #fff;
  font-size: .7rem; font-weight: 600;
  padding: .3rem .8rem; border-radius: 12px;
}
.current-badge {
  display: inline-block;
  background: #10b981; color: #fff;
  font-size: .7rem; font-weight: 600;
  padding: .2rem .6rem; border-radius: 8px;
  margin-left: .5rem;
}
.plan-card li::before { content: none; }
.plan-card .btn { width: 100%; margin-top: .5rem; }
.plan-card .btn:disabled {
  background: var(--border); color: var(--text-muted); cursor: not-allowed;
}

/* Pricing FAQ */
.pricing-faq {
  max-width: 700px; margin: 3rem auto 0;
  text-align: left;
}
.pricing-faq h2 { font-size: 1.2rem; margin-bottom: 1rem; text-align: center; }
.faq-item {
  background: linear-gradient(160deg, #ffffff 0%, #fef9f4 100%);
  border-radius: var(--radius);
  margin-bottom: .75rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.faq-item:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-md);
}
.faq-q {
  padding: 1rem 1.25rem;
  font-weight: 600; font-size: .9rem;
  cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  transition: color var(--transition-fast);
}
.faq-q:hover { color: var(--primary); }
.faq-q::after { content: "+"; color: var(--text-muted); font-size: 1.2rem; transition: transform var(--transition-fast); }
.faq-a {
  padding: 0 1.25rem 1rem;
  font-size: .85rem; color: var(--text-muted);
  line-height: 1.6;
}

/* ---- Subscription Page ---- */
.subscription-page { max-width: 600px; margin: 0 auto; }
.subscription-page h1 { font-size: 1.5rem; margin-bottom: 1.5rem; text-align: center; }

.sub-card {
  background: linear-gradient(160deg, #ffffff 0%, #fef9f4 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.sub-card h3 { font-size: 1rem; margin-bottom: 1rem; color: var(--text-muted); }
.sub-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.sub-info-item { padding: .75rem; background: var(--bg); border-radius: 8px; }
.sub-info-label { font-size: .75rem; color: var(--text-muted); margin-bottom: .25rem; }
.sub-info-value { font-size: 1rem; font-weight: 600; }

.sub-features { margin-top: 1rem; }
.sub-features h4 { font-size: .85rem; margin-bottom: .5rem; color: var(--text-muted); }
.sub-features ul { list-style: none; }
.sub-features li {
  padding: .4rem 0; font-size: .9rem;
  color: var(--text);
}
.sub-features li::before { content: "✓ "; color: #10b981; font-weight: 600; }

.sub-actions {
  display: flex; gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.sub-actions .btn { flex: 1; min-width: 140px; text-align: center; }

.btn-danger {
  background: transparent;
  color: #ef4444;
  border: 1px solid #ef4444;
}
.btn-danger:hover {
  background: #fef2f2;
  text-decoration: none;
}

/* Subscription Status Badge */
.status-badge {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: 8px;
  font-size: .75rem;
  font-weight: 600;
}
.status-active { background: #d1fae5; color: #059669; }
.status-canceled { background: #fee2e2; color: #dc2626; }
.status-past-due { background: #fef3c7; color: #d97706; }

/* Current Plan Banner */
.current-plan-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.current-plan-info { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.current-plan-label { font-size: .8rem; color: #047857; }
.current-plan-name { font-weight: 700; font-size: 1.1rem; color: #065f46; }
.current-plan-period { font-size: .85rem; color: #047857; }

/* Plan Card Enhancements */
.plan-card.current { border-color: #10b981; background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%); }
.plan-header { margin-bottom: 1rem; }
.price-amount { font-size: 2rem; font-weight: 700; }
.price-period { font-size: .9rem; color: var(--text-muted); }
.plan-features { list-style: none; margin-bottom: 1.5rem; min-height: 160px; }
.plan-features li { padding: .4rem 0; font-size: .9rem; }
.feature-check { color: #10b981; font-weight: 600; margin-right: .25rem; }
.feature-x { color: #9ca3af; margin-right: .25rem; }
.feature-disabled { color: var(--text-muted); }
.plan-current-badge {
  background: #10b981; color: #fff;
  padding: .5rem 1rem; border-radius: 8px;
  text-align: center; font-weight: 600; font-size: .85rem;
}
.plan-action { margin-top: .5rem; }
.btn-block { display: block; width: 100%; text-align: center; }

/* FAQ Enhancements */
.faq-grid { display: grid; gap: 1rem; }
.faq-item {
  background: linear-gradient(160deg, #ffffff 0%, #fef9f4 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.faq-item h4 { font-size: .95rem; margin-bottom: .5rem; }
.faq-item p { font-size: .85rem; color: var(--text-muted); line-height: 1.5; margin: 0; }

/* Subscription Card */
.subscription-card {
  background: linear-gradient(160deg, #ffffff 0%, #fef9f4 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.subscription-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}
.subscription-plan .plan-label { font-size: .75rem; color: var(--text-muted); display: block; }
.subscription-plan .plan-name { font-size: 1.3rem; font-weight: 700; }
.subscription-status {
  padding: .3rem .8rem;
  border-radius: 8px;
  font-size: .8rem;
  font-weight: 600;
}
.status-active { background: #d1fae5; color: #059669; }
.status-inactive { background: #fee2e2; color: #dc2626; }
.subscription-details { margin-bottom: 1rem; }
.detail-row {
  display: flex;
  justify-content: space-between;
  padding: .6rem 0;
  border-bottom: 1px solid var(--border);
}
.detail-row:last-child { border-bottom: none; }
.detail-label { color: var(--text-muted); font-size: .9rem; }
.detail-value { font-weight: 600; font-size: .9rem; }
.subscription-features { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.subscription-features h4 { font-size: .85rem; color: var(--text-muted); margin-bottom: .5rem; }
.subscription-features ul { list-style: none; }
.subscription-features li { padding: .3rem 0; font-size: .9rem; }
.subscription-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}
.subscription-help {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
}
.subscription-help h3 { font-size: .9rem; margin-bottom: .5rem; }
.subscription-help p { font-size: .85rem; color: var(--text-muted); margin: 0; }
.subscription-help a { color: var(--primary); }

/* ---- Pricing Accent & Desc ---- */
.pricing-accent { color: var(--primary); }
.plan-desc { font-size: .82rem; color: var(--text-muted); margin: .25rem 0 .75rem; }
.price-tax { font-size: .7rem; color: var(--text-muted); font-weight: 400; }
.plan-features .feature-included::before { content: "\2713 "; color: #10b981; font-weight: 700; }
.plan-features .feature-excluded { color: #d1d5db; }
.plan-features .feature-excluded::before { content: "\2014 "; color: #d1d5db; }

/* ---- Payment Badges ---- */
.payment-badges {
  max-width: 600px; margin: 2.5rem auto 0; text-align: center;
}
.payment-badges-inner {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.25rem 1.5rem;
}
.payment-label {
  font-size: .75rem; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: .06em; margin-bottom: .6rem; font-weight: 600;
}
.payment-icons { display: flex; justify-content: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .6rem; }
.pay-badge {
  display: inline-block; padding: .3rem .7rem;
  font-size: .75rem; font-weight: 700; letter-spacing: .02em;
  background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 6px;
  color: #374151;
}
.pay-badge-alt { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.payment-secure {
  font-size: .72rem; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center; gap: .3rem;
}
.payment-secure svg { color: #10b981; }

/* ---- Pricing Business Info ---- */
.pricing-business {
  max-width: 700px; margin: 2rem auto 0;
  border-top: 1px solid var(--border); padding-top: 1.5rem;
}
.business-inner { text-align: center; }
.business-name { font-size: .85rem; margin-bottom: .5rem; line-height: 1.5; }
.business-name span { font-size: .78rem; color: var(--text-muted); }
.business-details {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem 1rem;
  font-size: .75rem; color: var(--text-muted); margin-bottom: .75rem;
}
.business-details a { color: var(--primary); }
.business-links {
  display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap;
}
.business-links a {
  font-size: .72rem; color: var(--text-muted);
  text-decoration: underline; text-underline-offset: 2px;
}
.business-links a:hover { color: var(--primary); }

/* Bank Transfer Info */
.bank-transfer-page { max-width: 500px; margin: 0 auto; }
.bank-transfer-page h1 { font-size: 1.5rem; margin-bottom: 1.5rem; text-align: center; }
.plan-summary {
  text-align: center;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.plan-summary .plan-label { font-size: .75rem; color: var(--text-muted); display: block; }
.plan-summary .plan-name { font-size: 1.3rem; font-weight: 700; color: var(--primary); }
.bank-info-card {
  background: linear-gradient(160deg, #ffffff 0%, #fef9f4 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.bank-info-card h3 { font-size: 1rem; margin-bottom: 1rem; }
.bank-detail {
  display: flex; justify-content: space-between;
  padding: .6rem 0;
  border-bottom: 1px solid var(--border);
}
.bank-detail:last-child { border-bottom: none; }
.bank-detail-label { color: var(--text-muted); font-size: .85rem; }
.bank-detail-value { font-weight: 600; font-size: .9rem; }
.reference-code {
  background: #fef3c7;
  padding: .5rem 1rem;
  border-radius: 8px;
  font-family: monospace;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  margin: 1rem 0;
}

/* ---- Intent Selector (あなたの気持ち) ---- */
.intent-selector {
  margin-top: 1.5rem;
  text-align: center;
}
.intent-label {
  font-weight: 700;
  font-size: 1rem;
  display: block;
  margin-bottom: .25rem;
}
.intent-desc {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.intent-options {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.intent-option {
  cursor: pointer;
}
.intent-option input[type="radio"] {
  display: none;
}
.intent-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  background: linear-gradient(160deg, #ffffff 0%, #fef9f4 100%);
  transition: all var(--transition-smooth);
  min-width: 100px;
}
.intent-box:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.intent-option input:checked + .intent-box {
  border-color: var(--primary);
  background: #fff7ed;
  box-shadow: 0 0 0 4px rgba(249,115,22,.08);
}
.intent-icon { font-size: 1.5rem; margin-bottom: .25rem; }
.intent-name { font-weight: 700; font-size: .95rem; }
.intent-hint { font-size: .75rem; color: var(--text-muted); }

.intent-conservative:hover { border-color: #10b981; }
.intent-standard:hover { border-color: var(--primary); }
.intent-aggressive:hover { border-color: #ef4444; }

/* Intent Display on Result Page */
.intent-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .5rem 1rem;
  background: var(--bg);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}
.intent-display-icon { font-size: 1.2rem; }
.intent-display-label { font-size: .85rem; color: var(--text-muted); }
.intent-display-value { font-weight: 600; }

/* ---- Metrics Grid (simplified score cards) ---- */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.metric-card {
  background: linear-gradient(160deg, #ffffff 0%, #fafaf8 100%);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  border: 1px solid var(--border);
  border-top: 3px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}
.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.metric-card.metric-safe { border-top-color: #0fa87a; background: linear-gradient(160deg, #ffffff 0%, #f0fdf7 100%); }
.metric-card.metric-caution { border-top-color: #e09b0d; background: linear-gradient(160deg, #ffffff 0%, #fefcf3 100%); }
.metric-card.metric-danger { border-top-color: #e04949; background: linear-gradient(160deg, #ffffff 0%, #fef5f5 100%); }
.metric-icon { font-size: 1.2rem; margin-bottom: .25rem; }
.metric-value { font-size: 1.3rem; font-weight: 700; }
.metric-label { font-size: .8rem; color: var(--text-muted); }
.metric-hint { font-size: .7rem; color: var(--text-muted); margin-top: .25rem; }

/* ---- Price Range Bar ---- */
.price-range-section {
  background: linear-gradient(160deg, #ffffff 0%, #fef9f4 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow);
}
.price-range-section h3 { font-size: 1rem; margin-bottom: 1rem; }
.price-range-bar { position: relative; margin: 2rem 0; }
.range-track {
  position: relative;
  height: 20px;
  background: var(--bg);
  border-radius: 10px;
  overflow: visible;
}
.range-zone {
  position: absolute;
  height: 100%;
  top: 0;
}
.zone-safe { background: #d1fae5; }
.zone-normal { background: #fef3c7; }
.zone-risk { background: #fee2e2; }
.range-marker {
  position: absolute;
  width: 4px;
  height: 30px;
  top: -5px;
  transform: translateX(-50%);
  border-radius: 2px;
}
.marker-current { background: var(--primary); }
.marker-pmax { background: #10b981; }
.range-labels {
  position: relative;
  height: 40px;
  margin-top: .5rem;
}
.range-label {
  position: absolute;
  transform: translateX(-50%);
  font-size: .7rem;
  text-align: center;
  color: var(--text-muted);
}
.range-legend {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  font-size: .75rem;
}
.legend-item { display: flex; align-items: center; gap: .25rem; }
.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}
.legend-marker {
  width: 4px;
  height: 16px;
  border-radius: 2px;
}

/* ---- Outcome Input Section ---- */
.outcome-input-section {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.5rem 0;
}
.outcome-input-section h3 { font-size: 1rem; margin-bottom: .5rem; }
.outcome-desc { font-size: .85rem; color: var(--text-muted); margin-bottom: 1rem; }
.outcome-form { display: flex; flex-direction: column; gap: 1rem; }
.outcome-fields { display: flex; gap: 1rem; flex-wrap: wrap; }
.outcome-field { flex: 1; min-width: 150px; }
.outcome-field label { display: block; font-size: .8rem; color: var(--text-muted); margin-bottom: .25rem; }
.outcome-field input, .outcome-field select {
  width: 100%;
  padding: .6rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .9rem;
  font-family: inherit;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  color: var(--text);
}
.outcome-field input:focus, .outcome-field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(249,115,22,.08);
}

/* ---- Decision Log Page ---- */
.log-page { max-width: 800px; margin: 0 auto; }
.log-page h1 { font-size: 1.5rem; margin-bottom: .5rem; }
.page-desc { color: var(--text-muted); font-size: .9rem; margin-bottom: 1.5rem; }
.log-list { display: flex; flex-direction: column; gap: 1rem; }
.log-card {
  background: linear-gradient(160deg, #ffffff 0%, #fef9f4 100%);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}
.log-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.log-date { font-size: .8rem; color: var(--text-muted); }
.intent-tag {
  font-size: .7rem;
  padding: .2rem .5rem;
  border-radius: 4px;
  background: var(--bg);
}
.intent-tag.intent-0 { background: #d1fae5; color: #059669; }
.intent-tag.intent-1 { background: #fef3c7; color: #d97706; }
.intent-tag.intent-2 { background: #fee2e2; color: #dc2626; }
.log-body { padding: 1rem; }
.log-title { font-weight: 600; margin-bottom: .25rem; }
.log-url { font-size: .8rem; color: var(--text-muted); margin-bottom: .75rem; }
.log-url a { color: var(--primary); }
.log-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: .75rem;
  margin-bottom: .75rem;
}
.log-metric { padding: .5rem; background: var(--bg); border-radius: 6px; }
.log-metric .metric-label { font-size: .7rem; color: var(--text-muted); }
.log-metric .metric-value { font-weight: 600; font-size: .9rem; }
.log-metric .metric-value.highlight { color: var(--primary); }
.log-confidence {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
}
.confidence-label { color: var(--text-muted); }
.confidence-value { font-weight: 600; }
.confidence-bar {
  flex: 1;
  height: 6px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
}
.confidence-fill { height: 100%; background: var(--primary); }
.log-outcome {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px solid var(--border);
  font-size: .85rem;
}
.outcome-label { color: var(--text-muted); }
.outcome-value { font-weight: 600; }
.outcome-status {
  padding: .2rem .5rem;
  border-radius: 4px;
  font-size: .75rem;
}
.outcome-win { background: #d1fae5; color: #059669; }
.outcome-loss { background: #fee2e2; color: #dc2626; }
.outcome-pending { color: var(--text-muted); font-style: italic; }
.log-footer { padding: .75rem 1rem; border-top: 1px solid var(--border); }
.btn-sm { padding: .4rem .8rem; font-size: .8rem; }

/* ---- Analytics Page ---- */
.analytics-page { max-width: 900px; margin: 0 auto; }
.analytics-page h1 { font-size: 1.5rem; margin-bottom: .5rem; }
.stats-overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: linear-gradient(160deg, #ffffff 0%, #fef9f4 100%);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-accent);
}
.stat-value { font-size: 2rem; font-weight: 700; color: var(--primary); letter-spacing: -.02em; }
.stat-label { font-size: .85rem; color: var(--text-muted); }
.calibration-section {
  background: linear-gradient(160deg, #ffffff 0%, #fef9f4 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}
.calibration-section h2 { font-size: 1.2rem; margin-bottom: .5rem; }
.section-desc { font-size: .85rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.calibration-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}
.calibration-table th, .calibration-table td {
  padding: .6rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.calibration-table th { background: var(--bg); font-weight: 600; }
.rate-value { font-weight: 600; display: block; }
.rate-bar {
  width: 60px;
  height: 6px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
  margin-top: .25rem;
}
.rate-fill { height: 100%; background: var(--primary); }
.calibration-good { color: #10b981; }
.calibration-warn { color: #f59e0b; }
.calibration-bad { color: #ef4444; }
.calibration-badge {
  display: inline-block;
  padding: .2rem .5rem;
  border-radius: 4px;
  font-size: .75rem;
}
.calibration-badge.good { background: #d1fae5; color: #059669; }
.calibration-badge.warn { background: #fef3c7; color: #d97706; }
.calibration-badge.bad { background: #fee2e2; color: #dc2626; }

/* Calibration Chart */
.calibration-chart { margin-top: 2rem; }
.calibration-chart h3 { font-size: 1rem; margin-bottom: 1rem; }
.chart-container {
  display: flex;
  align-items: stretch;
  height: 200px;
}
.chart-axis-y {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 40px;
  font-size: .7rem;
  color: var(--text-muted);
  text-align: right;
  padding-right: .5rem;
}
.chart-area {
  flex: 1;
  position: relative;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.ideal-line {
  position: absolute;
  width: 141%;
  height: 2px;
  background: var(--border);
  bottom: 0;
  left: 0;
  transform-origin: bottom left;
  transform: rotate(-45deg);
  border-style: dashed;
}
.chart-point {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--primary);
  border-radius: 50%;
  transform: translate(-50%, 50%);
  cursor: pointer;
}
.chart-axis-x {
  display: flex;
  justify-content: space-between;
  font-size: .7rem;
  color: var(--text-muted);
  padding: .5rem 0;
}
.chart-legend {
  font-size: .75rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: .5rem;
}
.interpretation-guide {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1.5rem;
}
.interpretation-guide h3 { font-size: .95rem; margin-bottom: .5rem; }
.interpretation-guide ul { font-size: .85rem; padding-left: 1.5rem; }
.interpretation-guide li { margin-bottom: .5rem; }
.page-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- Performance Section (Analytics v2) ---- */
.performance-section {
  background: linear-gradient(160deg, #ffffff 0%, #fef9f4 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}
.performance-section h2 { font-size: 1.2rem; margin-bottom: .5rem; }
.performance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.performance-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  border-left: 4px solid var(--border);
}
.performance-card.intent-0 { border-color: #10b981; } /* 守り - 緑 */
.performance-card.intent-1 { border-color: #f97316; } /* 標準 - オレンジ */
.performance-card.intent-2 { border-color: #f59e0b; } /* 攻め - オレンジ */
.performance-card.decision-buy { border-color: #059669; } /* BUY - 緑 */
.performance-card.decision-hold { border-color: #d97706; } /* HOLD - 黄 */
.performance-card.decision-skip { border-color: #6b7280; } /* SKIP - グレー */
.performance-label {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: .75rem;
}
.performance-stats {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: .5rem;
}
.perf-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.perf-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}
.perf-label {
  font-size: .7rem;
  color: var(--text-muted);
}

/* Highlight stat card */
.stat-card.highlight {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: white;
}
.stat-card.highlight .stat-label { color: rgba(255,255,255,0.85); }

/* Savings colors */
.savings-positive { color: #059669; font-weight: 600; }
.savings-negative { color: #dc2626; font-weight: 600; }

/* ---- Reasons Note ---- */
.reasons-note {
  font-size: .75rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: .5rem;
}

/* ============================================
   分析手法バッジ
   ============================================ */
.analysis-method-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem 1rem;
  border-radius: 999px;
  font-size: .85rem;
  margin-top: .75rem;
}
.method-hybrid { background: linear-gradient(135deg, #dbeafe, #ede9fe); color: #3730a3; }
.method-algorithm { background: #f3f4f6; color: #4b5563; }
.method-icon { font-size: 1.1rem; }
.method-label { font-weight: 600; }
.method-desc { font-size: .75rem; color: inherit; opacity: .7; }
.method-elapsed { font-size: .7rem; opacity: .5; margin-left: .25rem; }

/* ============================================
   詳細データ アコーディオン
   ============================================ */
.detail-accordion { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.detail-accordion summary {
  cursor: pointer; padding: .75rem 1rem; background: var(--primary-bg);
  list-style: none; user-select: none;
}
.detail-accordion summary::-webkit-details-marker { display: none; }
.detail-accordion summary::before { content: "▸ "; font-size: .9rem; }
.detail-accordion[open] summary::before { content: "▾ "; }
.detail-accordion summary h3 { font-size: 1rem; color: var(--text); }

.detail-section { padding: .75rem 1rem; border-top: 1px solid var(--border); }
.detail-section h4 {
  font-size: .85rem; color: var(--primary-dark); margin-bottom: .5rem;
  text-transform: uppercase; letter-spacing: .05em;
}

/* ============================================
   データ品質バー
   ============================================ */
.quality-bar {
  display: inline-block; width: 80px; height: 8px;
  background: #e5e7eb; border-radius: 4px; vertical-align: middle;
  margin-right: .5rem; overflow: hidden;
}
.quality-fill { height: 100%; border-radius: 4px; transition: width .3s; }
.fill-good { background: var(--buy); }
.fill-mid { background: var(--hold); }
.fill-low { background: var(--skip); }

/* ============================================
   指標ヒント改善
   ============================================ */
.metric-hint {
  font-size: .72rem;
  line-height: 1.4;
  margin-top: .25rem;
  opacity: .85;
}

/* ============================================
   ローディングオーバーレイ — MEKIKI³ v1.0 LIVE
   ============================================ */
.loading-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(10, 10, 20, .96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
}
.live-dashboard {
  width: 94vw; max-width: 820px;
  background: linear-gradient(160deg, #111122 0%, #0d0d1a 100%);
  border: 1px solid rgba(249,115,22,.25);
  border-radius: 16px;
  padding: 1.5rem 1.8rem 1.2rem;
  box-shadow: 0 0 60px rgba(249,115,22,.08), 0 0 120px rgba(249,115,22,.04);
  animation: live-fadein .5s ease-out;
}
@keyframes live-fadein { from { opacity:0; transform:scale(.96) translateY(12px); } to { opacity:1; transform:none; } }

/* ヘッダー */
.live-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.2rem; padding-bottom: .8rem;
  border-bottom: 1px solid rgba(249,115,22,.15);
}
.live-badge {
  font-size: .85rem; font-weight: 800; color: #f97316;
  letter-spacing: .06em;
  display: flex; align-items: center; gap: .5rem;
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #ef4444;
  animation: live-blink 1s ease-in-out infinite;
  display: inline-block;
}
@keyframes live-blink { 0%,100%{opacity:1} 50%{opacity:.3} }
.live-timer-area {
  display: flex; align-items: center; gap: .8rem;
}
.live-clock {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: .75rem; color: rgba(255,255,255,.35);
  letter-spacing: .05em;
}
.live-timer {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: .85rem; color: rgba(255,255,255,.5);
  letter-spacing: .1em;
}

/* メインボディ */
.live-body {
  display: grid; grid-template-columns: 1fr 220px; gap: 1.5rem;
  min-height: 320px;
}

/* パイプライン（左） */
.live-pipeline {
  display: flex; flex-direction: column; gap: .8rem;
}
.pipeline-phase {
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px;
  padding: .7rem .9rem;
  transition: border-color .4s, background .4s;
}
.pipeline-phase.phase-active {
  border-color: rgba(249,115,22,.4);
  background: rgba(249,115,22,.04);
}
.pipeline-phase.phase-done {
  border-color: rgba(16,185,129,.3);
  background: rgba(16,185,129,.03);
}
.phase-header {
  display: flex; align-items: center; gap: .5rem; margin-bottom: .4rem;
}
.phase-icon { font-size: 1rem; }
.phase-label {
  font-size: .8rem; font-weight: 700; color: rgba(255,255,255,.7);
  flex: 1;
}
.phase-status {
  font-size: .65rem; font-weight: 600; color: rgba(255,255,255,.3);
  letter-spacing: .04em;
}
.pipeline-phase.phase-active .phase-label { color: #f97316; }
.pipeline-phase.phase-active .phase-status { color: #f97316; }
.pipeline-phase.phase-done .phase-label { color: #10b981; }
.pipeline-phase.phase-done .phase-status { color: #10b981; }

.phase-steps { display: flex; flex-direction: column; gap: .2rem; }
.p-step {
  font-size: .72rem; color: rgba(255,255,255,.25);
  padding-left: 1.4rem; position: relative;
  line-height: 1.6; transition: color .3s;
}
.p-step::before {
  content: ''; position: absolute; left: .4rem; top: .45rem;
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(255,255,255,.15);
  transition: background .3s, box-shadow .3s;
}
.p-step.step-active { color: rgba(249,115,22,.9); }
.p-step.step-active::before {
  background: #f97316;
  box-shadow: 0 0 6px rgba(249,115,22,.6);
  animation: step-pulse .8s ease-in-out infinite;
}
@keyframes step-pulse { 0%,100%{box-shadow:0 0 4px rgba(249,115,22,.4)} 50%{box-shadow:0 0 10px rgba(249,115,22,.8)} }
.p-step.step-done { color: rgba(16,185,129,.7); }
.p-step.step-done::before { background: #10b981; box-shadow: none; animation: none; }

/* データソース（右） */
.live-sources {
  display: flex; flex-direction: column; gap: .5rem;
}
.source-title {
  font-size: .7rem; font-weight: 700; color: rgba(255,255,255,.35);
  text-transform: uppercase; letter-spacing: .1em;
  margin-bottom: .2rem;
}
.source-item {
  display: flex; align-items: center; gap: .4rem;
  font-size: .7rem; color: rgba(255,255,255,.3);
  transition: color .3s;
}
.src-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,.15);
  flex-shrink: 0;
  transition: background .3s, box-shadow .3s;
}
.src-name { flex: 1; }
.src-status { font-size: .6rem; color: rgba(255,255,255,.2); }
.source-item.src-active { color: rgba(249,115,22,.8); }
.source-item.src-active .src-dot {
  background: #f97316;
  box-shadow: 0 0 6px rgba(249,115,22,.5);
}
.source-item.src-active .src-status { color: #f97316; }
.source-item.src-done { color: rgba(16,185,129,.6); }
.source-item.src-done .src-dot { background: #10b981; box-shadow: none; }
.source-item.src-done .src-status { color: #10b981; }

/* レーダーアニメーション */
.live-visual {
  margin-top: auto; text-align: center; padding-top: .5rem;
}
.live-radar { margin: 0 auto; display: block; }
.radar-sweep {
  transform-origin: 60px 60px;
  animation: radar-spin 2.5s linear infinite;
}
@keyframes radar-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.live-visual-label {
  font-size: .7rem; color: rgba(249,115,22,.6);
  margin-top: .4rem; letter-spacing: .04em;
}

/* フッター */
.live-footer {
  margin-top: 1rem; padding-top: .8rem;
  border-top: 1px solid rgba(249,115,22,.1);
}
.live-progress-bar {
  width: 100%; height: 3px; border-radius: 2px;
  background: rgba(255,255,255,.06);
  margin-bottom: .6rem; overflow: hidden;
}
.live-progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #f97316, #fbbf24);
  border-radius: 2px;
  transition: width .6s ease-out;
}
.live-current {
  font-size: .75rem; color: rgba(255,255,255,.45);
  text-align: center;
}

/* モバイル */
@media (max-width: 640px) {
  .live-dashboard { padding: 1rem 1rem .8rem; }
  .live-body { grid-template-columns: 1fr; }
  .live-sources { display: none; }
}

/* Rating Stars */
.rating-stars {
  display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px;
}
.rating-stars input { display: none; }
.rating-stars label {
  font-size: 1.6rem; color: var(--border); cursor: pointer; transition: color .15s;
}
.rating-stars input:checked ~ label,
.rating-stars label:hover,
.rating-stars label:hover ~ label { color: var(--primary); }
.outcome-field-wide { flex-basis: 100%; }

/* Admin plan selector */
.plan-select {
  padding: .25rem .4rem; border: 1px solid var(--border); border-radius: 6px;
  font-size: .8rem; background: var(--bg); color: var(--text);
}

/* ============================================================
   Landing Page — ログイン兼広告ページ
   ============================================================ */

/* --- Animations --- */
@keyframes landing-fadeInUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes landing-fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes landing-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}
@keyframes landing-orbDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(30px, -20px) scale(1.05); }
  66%      { transform: translate(-20px, 15px) scale(.95); }
}
@keyframes landing-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(249,115,22,.4); }
  50%      { box-shadow: 0 0 0 12px rgba(249,115,22,0); }
}
@keyframes landing-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Scroll-triggered animation base */
.landing-anim-up,
.landing-anim-fade {
  opacity: 0;
  will-change: opacity, transform;
}
.landing-anim-up {
  transform: translateY(32px);
}
.landing-anim-up.landing-visible {
  animation: landing-fadeInUp .7s cubic-bezier(.22,1,.36,1) forwards;
  animation-delay: var(--delay, 0s);
}
.landing-anim-fade.landing-visible {
  animation: landing-fadeIn .7s ease forwards;
  animation-delay: var(--delay, 0s);
}

/* --- Hero --- */
.landing-hero {
  position: relative;
  overflow: hidden;
  padding: 3rem 1.5rem 4rem;
  background: linear-gradient(135deg, var(--primary-bg) 0%, var(--bg) 50%, #fff4eb 100%);
  background-size: 200% 200%;
  margin: -1.5rem -1rem 0;
}
.landing-hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 3rem;
}
.landing-hero-left {
  flex: 1 1 55%;
  min-width: 0;
}
.landing-hero-right {
  flex: 0 0 340px;
}

/* 背景の光のオーブ */
.landing-hero-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(60px);
  animation: landing-orbDrift 12s ease-in-out infinite;
}
.landing-orb-1 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(249,115,22,.18), transparent 70%);
  top: -60px; right: 10%;
  animation-delay: 0s;
}
.landing-orb-2 {
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(234,88,12,.12), transparent 70%);
  bottom: -40px; left: 5%;
  animation-delay: -4s;
}

/* タイトル */
.landing-title {
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  margin: 0 0 1.2rem;
  letter-spacing: -.03em;
}
.landing-title em {
  font-style: normal;
  color: var(--primary);
  position: relative;
}
.landing-title em::after {
  content: '';
  position: absolute;
  left: 0; bottom: 2px;
  width: 100%; height: 6px;
  background: var(--primary-light);
  border-radius: 3px;
  z-index: -1;
}
.landing-title-line {
  display: block;
}
.landing-subtitle {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-muted);
  margin: 0 0 1.5rem;
}
.landing-subtitle strong {
  color: var(--primary-dark);
  font-weight: 600;
}

/* 対応サイトバッジ */
.landing-sites {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.landing-site-badge {
  display: inline-block;
  padding: .35rem .85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: .82rem;
  font-weight: 500;
  color: var(--text);
  transition: all .2s;
}
.landing-site-badge:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(249,115,22,.12);
}

/* --- ログインカード（右上） --- */
.landing-login-card {
  background: linear-gradient(160deg, rgba(255,255,255,.92) 0%, rgba(255,248,241,.88) 100%);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-radius: 20px;
  padding: 2rem 1.8rem;
  border: 1px solid rgba(236,225,213,.5);
  box-shadow: 0 8px 32px rgba(180,100,30,.08), 0 2px 8px rgba(0,0,0,.04);
  position: relative;
  z-index: 2;
}
.landing-login-heading {
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  margin: 0 0 1.2rem;
  color: var(--text);
}
.landing-login-form {
  display: flex;
  flex-direction: column;
  gap: .7rem;
}
.landing-login-form input {
  padding: .75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: .95rem;
  font-family: inherit;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  background: rgba(255,250,245,.7);
}
.landing-login-form input::placeholder { color: #c4b5a8; }
.landing-login-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(249,115,22,.08);
  background: var(--surface);
}
.landing-login-btn {
  width: 100%;
  padding: .85rem;
  font-size: 1rem;
  border-radius: 10px;
  margin-top: .3rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 2px 8px rgba(234,88,12,.2);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.landing-login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(234,88,12,.3);
}
.landing-login-btn:active {
  transform: scale(.98);
}
.landing-login-alt {
  text-align: center;
  margin: 1rem 0 0;
  font-size: .82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
}
.landing-login-alt a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}
.landing-login-alt a:hover { text-decoration: underline; }
.landing-login-sep {
  display: inline-block;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--border);
}

/* --- 機能一覧 --- */
.landing-features {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem;
}
.landing-section-title {
  font-size: 1.6rem;
  font-weight: 700;
  text-align: center;
  margin: 0 0 2.5rem;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  letter-spacing: -.02em;
}
.landing-section-accent {
  display: inline-block;
  width: 5px; height: 28px;
  background: linear-gradient(180deg, var(--primary), var(--primary-light));
  border-radius: 3px;
}
.landing-features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
.landing-feature-card {
  background: linear-gradient(160deg, #ffffff 0%, #fff8f1 100%);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  border: 1px solid var(--border);
  transition: transform .3s cubic-bezier(.22,1,.36,1), box-shadow .3s cubic-bezier(.22,1,.36,1), border-color .3s;
  position: relative;
  overflow: hidden;
}
.landing-feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s;
}
.landing-feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(234,88,12,.1), 0 4px 8px rgba(0,0,0,.04);
  border-color: var(--primary-light);
}
.landing-feature-card:hover::before {
  transform: scaleX(1);
}
.landing-feature-icon {
  width: 52px; height: 52px;
  margin-bottom: 1rem;
  animation: landing-float 4s ease-in-out infinite;
  animation-play-state: paused;
}
.landing-feature-card:hover .landing-feature-icon {
  animation-play-state: running;
}
.landing-feature-icon svg {
  width: 100%; height: 100%;
}
.landing-feature-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 .6rem;
  color: var(--text);
}
.landing-feature-card p {
  font-size: .88rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0;
}

/* --- 3ステップ --- */
.landing-steps {
  background: var(--primary-bg);
  padding: 3.5rem 1.5rem;
}
.landing-steps-row {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.landing-step {
  flex: 0 0 200px;
  text-align: center;
  background: linear-gradient(160deg, #ffffff 0%, #fff8f1 100%);
  border-radius: 16px;
  padding: 2rem 1.2rem;
  border: 1px solid var(--border);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}
.landing-step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.landing-step-num {
  width: 44px; height: 44px;
  margin: 0 auto .8rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
}
.landing-step h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 .4rem;
  color: var(--text);
}
.landing-step p {
  font-size: .82rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}
.landing-step-arrow {
  flex: 0 0 24px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-light), var(--primary));
  position: relative;
}
.landing-step-arrow::after {
  content: '';
  position: absolute;
  right: -1px; top: -4px;
  border: 5px solid transparent;
  border-left: 7px solid var(--primary);
}

/* --- CTA --- */
.landing-cta {
  text-align: center;
  padding: 3.5rem 1.5rem 4rem;
}
.landing-cta-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 1.2rem;
  letter-spacing: -.02em;
}
.landing-cta-btn {
  font-size: 1.1rem;
  padding: 1rem 3rem;
  border-radius: 12px;
  animation: landing-pulse 2.5s ease-in-out infinite;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  position: relative;
  overflow: hidden;
}
.landing-cta-btn::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.2) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: landing-shimmer 3s ease-in-out infinite;
}
.landing-cta-btn:hover {
  animation: none;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(249,115,22,.3);
}
.landing-cta-sub {
  font-size: .85rem;
  color: var(--text-muted);
  margin: 1rem 0 0;
}

/* --- Public Landing (SEO) --- */
.landing-sub {
  font-size: 1.05rem; line-height: 1.75;
  color: var(--text-muted); margin: 0 0 2rem;
  max-width: 600px;
}
.landing-accent {
  color: var(--primary);
}
.btn-lg { font-size: 1.05rem; padding: .85rem 2rem; }
.landing-cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.landing-feature-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem; max-width: 1100px; margin: 0 auto; padding: 3rem 1.5rem;
}
.landing-feature {
  background: linear-gradient(160deg, #ffffff 0%, #fff8f1 100%);
  border: 1px solid var(--border);
  border-radius: 16px; padding: 2rem 1.5rem;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}
.landing-feature:hover {
  transform: translateY(-4px); box-shadow: var(--shadow-md);
}
.feature-num {
  font-size: 2rem; font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: .5rem;
}
.landing-feature h3 { font-size: 1.1rem; font-weight: 600; margin: 0 0 .5rem; }
.landing-feature p { font-size: .88rem; line-height: 1.7; color: var(--text-muted); margin: 0; }
.landing-section-heading {
  text-align: center; font-size: 1.5rem; font-weight: 700;
  margin: 0 0 .5rem; padding: 3rem 1.5rem 0;
}
.landing-proof { text-align: center; padding: 2.5rem 1.5rem; background: var(--primary-bg); }
.proof-grid {
  display: flex; justify-content: center; gap: 3rem; flex-wrap: wrap;
  max-width: 700px; margin: 0 auto;
}
.proof-value {
  font-size: 2rem; font-weight: 700; color: var(--primary);
}
.proof-label {
  font-size: .82rem; color: var(--text-muted); font-weight: 500;
}
.landing-final-cta {
  text-align: center; padding: 3rem 1.5rem 4rem;
}
.landing-final-cta h2 {
  font-size: 1.5rem; font-weight: 700; margin: 0 0 .75rem;
}
.landing-final-cta p {
  font-size: .95rem; color: var(--text-muted); margin: 0 0 1.5rem;
}
.landing-sub-links {
  margin-top: 1.5rem; font-size: .82rem;
}
.landing-sub-links a { color: var(--text-muted); font-weight: 500; }
.landing-sub-links a:hover { color: var(--primary); }
.landing-sep { margin: 0 .5rem; color: var(--border); }

/* --- Hero login link --- */
.landing-login-link {
  font-size: .85rem; color: var(--text-muted); margin: 1rem 0 0;
}
.landing-login-link a { font-weight: 600; }

/* --- BtoB Section --- */
.landing-btob {
  text-align: center;
  padding: 3rem 1.5rem 2rem;
  max-width: 900px;
  margin: 0 auto;
}
.landing-btob-lead {
  font-size: .95rem; color: var(--text-muted);
  margin: .5rem 0 2rem; line-height: 1.7;
}
.landing-btob-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin: 0 auto 2rem;
}
.landing-btob-card {
  background: linear-gradient(160deg, #ffffff 0%, #fff8f1 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem 1.25rem;
  text-align: center;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}
.landing-btob-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.btob-card-icon {
  font-size: 2rem;
  margin-bottom: .75rem;
}
.landing-btob-card h3 {
  font-size: 1rem; font-weight: 600;
  margin: 0 0 .5rem;
}
.landing-btob-card p {
  font-size: .85rem; line-height: 1.7;
  color: var(--text-muted); margin: 0;
}
.landing-btob-cta {
  margin-top: 1.5rem;
}
@media (max-width: 640px) {
  .landing-btob-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Platforms --- */
.landing-platforms {
  text-align: center; padding: 2rem 1.5rem;
}
.platforms-inner {
  display: flex; justify-content: center; gap: .75rem; flex-wrap: wrap;
  max-width: 600px; margin: 0 auto;
}
.landing-site-badge {
  display: inline-block;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: .4rem 1rem;
  font-size: .82rem; font-weight: 600; color: var(--text-muted);
  letter-spacing: .02em;
}

/* --- Beta Banner --- */
.landing-beta-banner {
  padding: 0 1.5rem; margin: 2rem auto; max-width: 900px;
}
.beta-banner-inner {
  display: flex; align-items: center; gap: 1.5rem;
  background: linear-gradient(135deg, #1a1a2e, #2d1b4e);
  border-radius: 16px; padding: 1.5rem 2rem;
  color: #fff;
}
.beta-badge {
  flex-shrink: 0;
  background: var(--primary); color: #fff;
  font-size: .75rem; font-weight: 700; letter-spacing: .1em;
  padding: .35rem .75rem; border-radius: 6px;
}
.beta-banner-text { flex: 1; }
.beta-banner-text h2 {
  font-size: 1.05rem; font-weight: 700; margin: 0 0 .35rem; color: #fff;
}
.beta-banner-text p {
  font-size: .82rem; line-height: 1.6; margin: 0; color: rgba(255,255,255,.75);
}
.beta-banner-text strong { color: #fbbf24; }
.beta-banner-inner .btn {
  flex-shrink: 0; white-space: nowrap;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .landing-hero-inner {
    flex-direction: column;
    text-align: center;
  }
  .landing-hero-right { flex: none; width: 100%; max-width: 380px; }
  .landing-hero-left { text-align: center; }
  .landing-sites { justify-content: center; }
  .landing-title { font-size: 2rem; }
  .landing-features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .landing-feature-grid { grid-template-columns: repeat(2, 1fr); }
  .landing-cta { justify-content: center; }
  .proof-grid { gap: 2rem; }
  .beta-banner-inner { flex-direction: column; text-align: center; gap: 1rem; }
}
@media (max-width: 640px) {
  .landing-hero { padding: 2rem 1rem 2.5rem; }
  .landing-title { font-size: 1.65rem; }
  .landing-subtitle { font-size: .95rem; }
  .landing-cta {
    flex-direction: column;
    align-items: stretch;
  }
  .landing-cta .btn {
    width: 100%;
    text-align: center;
    font-size: 1.05rem;
    padding: 1rem;
  }
  .landing-features-grid {
    grid-template-columns: 1fr;
  }
  .landing-feature-grid { grid-template-columns: 1fr; }
  .landing-btob { padding: 2.5rem 1rem 2rem; }
  .landing-btob-title { font-size: 1.3rem; }
  .landing-btob-intro { font-size: .88rem; }
  .landing-btob-card { padding: 1.5rem 1rem; }
  .landing-final-cta { padding: 2.5rem 1rem 3rem; }
  .landing-final-cta h2 { font-size: 1.3rem; }
  .landing-steps-row {
    flex-direction: column;
    gap: .8rem;
  }
  .landing-step { flex: none; width: 100%; }
  .landing-step-arrow {
    width: 2px; height: 20px;
    background: linear-gradient(180deg, var(--primary-light), var(--primary));
  }
  .landing-step-arrow::after {
    right: auto; top: auto;
    left: -4px; bottom: -1px;
    border: 5px solid transparent;
    border-top: 7px solid var(--primary);
    border-left: 5px solid transparent;
  }
  .landing-login-card {
    padding: 1.5rem 1.2rem;
  }
}

/* ============================================
   Landing — BtoC ポイントリスト
   ============================================ */
.landing-points {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.5rem;
}
.landing-points li {
  font-size: 1rem;
  color: var(--text-muted);
  position: relative;
  padding-left: 1.4rem;
  line-height: 1.7;
}
.landing-points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

/* CTA ボタン強調 */
.btn-cta-main {
  min-width: 160px;
  text-align: center;
  font-size: 1.1rem;
  padding: 1rem 2rem;
}

/* ============================================
   Landing — BtoB 法人の方へ
   ============================================ */
.landing-btob {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
  text-align: center;
  border-top: 1px solid var(--border);
}
.landing-btob-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 .5rem;
  color: var(--text);
  position: relative;
  display: inline-block;
}
.landing-btob-intro {
  font-size: .95rem;
  color: var(--text-muted);
  margin: 1rem 0 0;
  line-height: 1.7;
}
.landing-btob-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  margin: .6rem auto 0;
}
.landing-btob-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin: 2rem 0;
}
.landing-btob-card {
  background: linear-gradient(160deg, #ffffff 0%, #fff8f1 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem 1.25rem;
  text-align: center;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}
.landing-btob-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.btob-card-icon {
  display: block;
  font-size: 2rem;
  margin-bottom: .75rem;
  line-height: 1;
}
.landing-btob-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 .5rem;
  color: var(--text);
}
.landing-btob-card p {
  font-size: .85rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0;
}
.landing-btob-cta {
  margin-top: 1.5rem;
}

/* BtoB responsive */
@media (max-width: 900px) {
  .landing-btob-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .landing-btob-grid {
    grid-template-columns: 1fr;
  }
  .landing-points {
    flex-direction: column;
    gap: .5rem;
  }
  .btn-cta-main {
    width: 100%;
    font-size: 1rem;
    padding: .9rem 1.5rem;
  }
}

/* ============================================
   Confidence Engine — 信頼度スコアリングUI
   ============================================ */

.confidence-section {
  background: linear-gradient(160deg, #ffffff 0%, #f8faf9 100%);
  border: 1px solid var(--border);
  border-left: 3px solid var(--buy);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.confidence-section h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
}

/* Score ring + info layout */
.confidence-main {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 1.2rem;
}
.confidence-score-ring {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}
.confidence-svg {
  width: 120px;
  height: 120px;
}
.confidence-score-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.confidence-pct {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.1;
}
.confidence-grade {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  opacity: 0.7;
}

/* Color variants */
.confidence-green { color: var(--buy); }
.confidence-yellow { color: #eab308; }
.confidence-orange { color: var(--primary); }
.confidence-red { color: var(--skip); }

.confidence-info {
  flex: 1;
}
.confidence-grade-label {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.confidence-source-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.source-screenshot {
  background: rgba(16, 185, 129, 0.1);
  color: var(--buy);
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.source-photo {
  background: rgba(249, 115, 22, 0.1);
  color: var(--primary);
  border: 1px solid rgba(249, 115, 22, 0.2);
}
.confidence-summary {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Progress bar */
.confidence-bar-wrapper {
  margin-bottom: 1.2rem;
}
.confidence-bar {
  width: 100%;
  height: 10px;
  background: #f3f4f6;
  border-radius: 5px;
  overflow: hidden;
}
.confidence-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.5s ease;
}
.confidence-bg-green { background: linear-gradient(90deg, #34d399, #10b981); }
.confidence-bg-yellow { background: linear-gradient(90deg, #fbbf24, #eab308); }
.confidence-bg-orange { background: linear-gradient(90deg, #fb923c, #f97316); }
.confidence-bg-red { background: linear-gradient(90deg, #f87171, #ef4444); }

.confidence-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Factors grid */
.confidence-factors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.2rem;
}
.factors-column {
  background: #fafafa;
  border-radius: 8px;
  padding: 1rem;
}
.factors-positive { border-left: 3px solid var(--buy); }
.factors-negative { border-left: 3px solid var(--skip); }

.factors-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}
.factors-title-positive { color: var(--buy); }
.factors-title-negative { color: var(--skip); }

.factor-item {
  margin-bottom: 0.6rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid #eee;
}
.factor-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.factor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.2rem;
}
.factor-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}
.factor-impact {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}
.impact-positive {
  color: var(--buy);
  background: rgba(16, 185, 129, 0.08);
}
.impact-negative {
  color: var(--skip);
  background: rgba(239, 68, 68, 0.08);
}
.factor-detail {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Next Actions */
.next-actions-section {
  margin-top: 1rem;
}
.next-actions-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--text);
}
.next-actions-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.next-action-card {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  background: #fff7ed;
  border: 1px solid var(--primary-light);
  border-radius: 8px;
  padding: 0.8rem 1rem;
}
.next-action-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  width: 32px;
  text-align: center;
}
.next-action-body {
  flex: 1;
}
.next-action-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.15rem;
}
.next-action-detail {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.next-action-improvement {
  font-size: 0.78rem;
  color: var(--primary);
  font-weight: 600;
  margin-top: 0.2rem;
}

/* ============================================
   Net Proceeds — 実質手残り
   ============================================ */

.net-proceeds-section {
  background: linear-gradient(160deg, #ffffff 0%, #f0fdf7 100%);
  border: 1px solid var(--border);
  border-left: 3px solid var(--buy);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.net-proceeds-section h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.net-proceeds-main {
  text-align: center;
  margin-bottom: 1rem;
}
.net-proceeds-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--buy);
}
.net-proceeds-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.net-proceeds-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.net-proceeds-compare summary {
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  padding: 0.5rem 0;
}
.compare-table-wrap {
  overflow-x: auto;
  margin-top: 0.5rem;
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.compare-table th {
  background: #f9f9f9;
  font-weight: 600;
  padding: 0.5rem 0.6rem;
  text-align: left;
  border-bottom: 2px solid var(--border);
}
.compare-table td {
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid #f3f3f3;
}
.compare-best {
  background: rgba(16, 185, 129, 0.04);
}
.compare-best-badge {
  background: var(--buy);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  vertical-align: middle;
}
.compare-net {
  font-weight: 700;
}

/* ============================================
   Sell Timing — トレンド予測
   ============================================ */

.sell-timing-section {
  margin-bottom: 1.5rem;
}
.sell-timing-card {
  background: linear-gradient(160deg, #ffffff 0%, #fef9f4 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
}
.timing-sell_now { border-left: 4px solid var(--buy); }
.timing-sell_soon { border-left: 4px solid #eab308; }
.timing-hold { border-left: 4px solid #3b82f6; }
.timing-hold_or_sell { border-left: 4px solid var(--primary); }
.timing-neutral { border-left: 4px solid #9ca3af; }

.sell-timing-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
}
.sell-timing-label {
  font-weight: 700;
  font-size: 1rem;
}
.sell-timing-reason {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============================================
   Vision method badge
   ============================================ */

.method-vision {
  border-color: #8b5cf6;
}
.method-vision .method-icon {
  color: #8b5cf6;
}

/* ============================================
   Mobile responsive for new components
   ============================================ */

@media (max-width: 768px) {
  .confidence-main {
    flex-direction: column;
    text-align: center;
  }
  .confidence-factors {
    grid-template-columns: 1fr;
  }
  .net-proceeds-breakdown {
    align-items: center;
  }
  .compare-table {
    font-size: 0.78rem;
  }
  .compare-table th,
  .compare-table td {
    padding: 0.4rem;
  }
}

@media (max-width: 480px) {
  .confidence-score-ring {
    width: 100px;
    height: 100px;
  }
  .confidence-svg {
    width: 100px;
    height: 100px;
  }
  .confidence-pct {
    font-size: 1.3rem;
  }
  .next-action-card {
    flex-direction: column;
    gap: 0.4rem;
  }
  .next-action-icon {
    width: auto;
  }
}

/* ==============================================================================
   ピンポイント確認 (Questions)
   ============================================================================== */
.questions-section {
  background: linear-gradient(160deg, #ffffff 0%, #f0f6ff 100%);
  border: 1px solid #c8d8ef;
  border-left: 3px solid #3b82f6;
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.5rem 0;
}
.questions-section h3 { margin-bottom: 0.5rem; }
.questions-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.questions-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.question-card {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.8rem;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.question-card.priority-1 { border-left: 3px solid var(--primary); }
.question-card.priority-2 { border-left: 3px solid var(--hold); }
.question-card.priority-3 { border-left: 3px solid var(--text-muted); }
.question-icon { font-size: 1.2rem; flex-shrink: 0; }
.question-text {
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 0.3rem;
}
.question-candidate {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: #e2e8f0;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

/* ==============================================================================
   OCR抽出データ
   ============================================================================== */
.ocr-data-section {
  background: linear-gradient(160deg, #ffffff 0%, #faf8ff 100%);
  border: 1px solid var(--border);
  border-left: 3px solid #8b5cf6;
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
}
.ocr-data-section h3 { margin-bottom: 0.8rem; font-size: 1rem; }
.ocr-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ocr-tag {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 500;
}
.tag-model { background: #ede9fe; color: #5b21b6; }
.tag-brand { background: #dbeafe; color: #1e40af; }
.tag-color { background: #fef3c7; color: #92400e; }
.tag-condition { background: #d1fae5; color: #065f46; }
.tag-accessories { background: #fce7f3; color: #9d174d; }

/* ==============================================================================
   ポートフォリオ
   ============================================================================== */
.portfolio-page { max-width: 900px; margin: 0 auto; }
.portfolio-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}
.portfolio-header h1 { font-size: 1.5rem; }

.pf-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.pf-summary-card {
  background: linear-gradient(160deg, #ffffff 0%, #fafaf8 100%);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  text-align: center;
  border-top: 3px solid var(--border);
}
.pf-summary-card.pf-profit { border-top-color: var(--buy); }
.pf-summary-card.pf-loss { border-top-color: var(--skip); }
.pf-summary-label {
  font-size: .8rem;
  color: var(--text-muted);
  margin-bottom: .25rem;
}
.pf-summary-value {
  font-size: 1.3rem;
  font-weight: 700;
}
.pf-summary-card.pf-profit .pf-summary-value { color: var(--buy); }
.pf-summary-card.pf-loss .pf-summary-value { color: var(--skip); }
.pf-summary-pct { font-size: .85rem; font-weight: 600; }
.pf-summary-sub { font-size: .75rem; color: var(--text-muted); margin-top: .25rem; }

.pf-category-section {
  background: linear-gradient(160deg, #ffffff 0%, #fef9f4 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}
.pf-category-section h3 { font-size: 1rem; margin-bottom: .75rem; }
.pf-category-bars { display: flex; flex-direction: column; gap: .5rem; }
.pf-category-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
}
.pf-cat-name {
  min-width: 80px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pf-cat-bar-wrap {
  flex: 1;
  height: 8px;
  background: var(--bg);
  border-radius: 4px;
  overflow: hidden;
}
.pf-cat-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 4px;
  transition: width .3s;
}
.pf-cat-pct { font-weight: 600; min-width: 35px; text-align: right; }
.pf-cat-detail { color: var(--text-muted); font-size: .75rem; white-space: nowrap; }

.pf-filter-tabs {
  display: flex;
  gap: .5rem;
  margin-bottom: 1.5rem;
}
.pf-tab {
  padding: .5rem 1rem;
  border-radius: 10px;
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: all var(--transition-fast);
}
.pf-tab:hover { border-color: var(--primary-light); color: var(--text); text-decoration: none; background: rgba(249,115,22,.03); }
.pf-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(234,88,12,.2);
}

.pf-items-list { display: flex; flex-direction: column; gap: 1rem; }
.pf-item-card {
  background: linear-gradient(160deg, #ffffff 0%, #fef9f4 100%);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  border: 1px solid var(--border);
  transition: box-shadow var(--transition-smooth), transform var(--transition-smooth), border-color var(--transition-smooth);
}
.pf-item-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--border-accent);
}
.pf-item-card.pf-item-sold { opacity: .8; }

.pf-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: .75rem;
}
.pf-item-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: .25rem;
}
.pf-item-meta {
  display: flex;
  gap: .5rem;
  font-size: .75rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.pf-item-category, .pf-item-platform {
  background: var(--bg);
  padding: .1rem .4rem;
  border-radius: 4px;
}
.pf-item-status-badge {
  padding: .2rem .6rem;
  border-radius: 8px;
  font-size: .75rem;
  font-weight: 600;
  flex-shrink: 0;
}
.pf-status-holding { background: #dbeafe; color: #1e40af; }
.pf-status-sold { background: #d1fae5; color: #065f46; }
.pf-status-watching { background: #fef3c7; color: #92400e; }

.pf-item-prices {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: .75rem;
  margin-bottom: .75rem;
}
.pf-price-col {
  background: var(--bg);
  border-radius: 8px;
  padding: .6rem;
  text-align: center;
}
.pf-price-label {
  display: block;
  font-size: .72rem;
  color: var(--text-muted);
  margin-bottom: .15rem;
}
.pf-price-val {
  font-weight: 700;
  font-size: .95rem;
}
.pf-price-val small { font-size: .75rem; font-weight: 600; }
.pf-price-gain.pf-profit .pf-price-val { color: var(--buy); }
.pf-price-gain.pf-loss .pf-price-val { color: var(--skip); }

.pf-sell-costs-detail {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: .75rem;
  color: var(--text-muted);
  padding: .4rem .8rem;
  background: rgba(239,68,68,.04);
  border: 1px dashed rgba(239,68,68,.15);
  border-radius: 6px;
  margin-top: .3rem;
}
.pf-sell-costs-detail span:last-child {
  font-weight: 600;
  color: var(--text);
}

.pf-item-notes {
  font-size: .82rem;
  color: var(--text-muted);
  padding: .5rem 0;
  border-top: 1px solid var(--border);
  margin-bottom: .5rem;
}

.pf-item-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.pf-sell-form {
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px solid var(--border);
}

.pf-form-page { max-width: 600px; margin: 0 auto; }
.pf-form-page h1 { font-size: 1.5rem; margin-bottom: 1.5rem; text-align: center; }
.pf-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.pf-field-wide { grid-column: 1 / -1; }
.pf-form-field label {
  display: block;
  font-size: .85rem;
  font-weight: 500;
  margin-bottom: .25rem;
  color: var(--text-muted);
}
.pf-form-field .required { color: var(--skip); }
.pf-form-field input,
.pf-form-field select,
.pf-form-field textarea {
  width: 100%;
  padding: .7rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: .9rem;
  font-family: inherit;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  color: var(--text);
}
.pf-form-field input:focus,
.pf-form-field select:focus,
.pf-form-field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(249,115,22,.08);
}
.pf-form-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.pf-add-from-appraisal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 1.5rem 0;
}
.pf-add-from-appraisal h3 { font-size: 1rem; margin-bottom: .75rem; }
.pf-add-inline {
  display: flex;
  gap: .75rem;
  align-items: flex-end;
  flex-wrap: wrap;
}
.pf-add-inline .outcome-field { flex: 1; min-width: 120px; }
.pf-add-inline button { white-space: nowrap; }

@media (max-width: 640px) {
  .portfolio-header { flex-direction: column; gap: 1rem; align-items: stretch; text-align: center; }
  .pf-summary-grid { grid-template-columns: 1fr 1fr; }
  .pf-item-prices { grid-template-columns: 1fr; }
  .pf-form-grid { grid-template-columns: 1fr; }
  .pf-filter-tabs { flex-wrap: wrap; }
}

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

/* Focus-visible for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}
:focus:not(:focus-visible) { outline: none; }

/* ============================================================
   誠実化制御エンジン — AI Resonance Badge
   ============================================================ */
.resonance-badge {
  margin: 12px 0 8px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #f0f4ff 0%, #e8edf8 100%);
  border: 1px solid #c8d4ea;
  border-radius: 12px;
}
.resonance-badge-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.resonance-icon { font-size: 1.3em; }
.resonance-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #2c3e6b;
}
.resonance-version {
  font-size: 0.72rem;
  color: #8899bb;
  background: #dde4f0;
  padding: 1px 6px;
  border-radius: 8px;
}
.resonance-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.resonance-metric {
  text-align: center;
  padding: 8px 4px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e0e6f0;
}
.resonance-metric-label {
  display: block;
  font-size: 0.68rem;
  color: #7788aa;
  margin-bottom: 3px;
  letter-spacing: 0.02em;
}
.resonance-metric-value {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  color: #2c3e6b;
}
.resonance-metric-value.text-safe { color: #1a8c5b; }
.resonance-metric-value.text-caution { color: #c78800; }
.resonance-metric-value.text-danger { color: #c0392b; }
.resonance-detox, .resonance-context {
  margin-top: 8px;
  padding: 4px 0;
}
.resonance-detox small {
  color: #c78800;
  font-size: 0.75rem;
}
.resonance-context small {
  display: block;
  color: #1a8c5b;
  font-size: 0.75rem;
  line-height: 1.5;
}

/* 学習インジケーター */
.learning-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #eef7ff 0%, #e6f0ff 100%);
  border: 1px solid #bdd4f0;
  border-radius: 10px;
}
.learning-indicator-icon { font-size: 1.5em; }
.learning-indicator-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.learning-indicator-text strong {
  font-size: 0.85rem;
  color: #2c3e6b;
}
.learning-indicator-text span {
  font-size: 0.72rem;
  color: #6678a0;
}

/* ============================================================
   クイックフィードバック（3ボタン）
   ============================================================ */
.quick-feedback-bar {
  margin: 24px 0 16px;
  padding: 20px;
  background: linear-gradient(135deg, #fafbff 0%, #f4f6fb 100%);
  border: 1px solid #dde3f0;
  border-radius: 14px;
  text-align: center;
}
.quick-feedback-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: #2c3e6b;
  margin-bottom: 14px;
}
.quick-feedback-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.quick-feedback-form { display: contents; }
.qfb-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 24px;
  border: 2px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  min-width: 100px;
  font-family: inherit;
}
.qfb-icon { font-size: 1.8em; line-height: 1; }
.qfb-text { font-size: 0.8rem; font-weight: 700; }

/* 良かったボタン（最強肯定） */
.qfb-great {
  background: linear-gradient(135deg, #fff8e1 0%, #fff3cd 100%);
  border-color: #f0d060;
  color: #8a6d00;
}
.qfb-great:hover, .qfb-great:active {
  background: linear-gradient(135deg, #fff3cd 0%, #ffe88a 100%);
  border-color: #d4a800;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(212,168,0,.25);
}

/* グッドボタン */
.qfb-good {
  background: #e8f8ef;
  border-color: #b8e6cc;
  color: #1a6b3c;
}
.qfb-good:hover, .qfb-good:active {
  background: #d0f0de;
  border-color: #1a8c5b;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26,140,91,.2);
}

/* バッドボタン */
.qfb-bad {
  background: #fef0ef;
  border-color: #f0c4c0;
  color: #8c3a2b;
}
.qfb-bad:hover, .qfb-bad:active {
  background: #fcdcda;
  border-color: #c0392b;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(192,57,43,.2);
}

/* 引き続き査定するボタン */
.qfb-continue {
  background: #eef0ff;
  border-color: #c0c8e8;
  color: #2c3e6b;
}
.qfb-continue:hover, .qfb-continue:active {
  background: #dde2ff;
  border-color: #4a5fa0;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(74,95,160,.2);
}

.quick-feedback-note {
  margin-top: 12px;
  font-size: 0.7rem;
  color: #8899bb;
}

/* インラインフィードバック（推奨上限直下） */
.inline-feedback {
  margin-top: 12px;
  display: flex;
  gap: 16px;
  justify-content: center;
}
.fb-btn {
  font-size: 1.6rem;
  background: none;
  border: 2px solid #dde3f0;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  cursor: pointer;
  transition: transform .15s cubic-bezier(.34,1.56,.64,1), border-color .2s, background .2s, box-shadow .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.fb-good:hover { border-color: #27ae60; background: #eafaf1; transform: scale(1.15); }
.fb-bad:hover { border-color: #e74c3c; background: #fdeaea; transform: scale(1.15); }
.fb-good:active { transform: scale(.88); background: #27ae60; border-color: #27ae60; box-shadow: 0 0 0 6px rgba(39,174,96,.2); transition-duration: .06s; }
.fb-bad:active { transform: scale(.88); background: #e74c3c; border-color: #e74c3c; box-shadow: 0 0 0 6px rgba(231,76,60,.2); transition-duration: .06s; }

/* ============================================================
   ボタン快感フィードバック（オキシトシン・マイクロインタラクション）
   ============================================================ */

/* リップルエフェクト */
.btn, .qfb-btn, .search-btn, .btn-appraise {
  position: relative;
  overflow: hidden;
}
.btn-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.45);
  transform: scale(0);
  animation: rippleOut 600ms ease-out forwards;
  pointer-events: none;
}
@keyframes rippleOut {
  0% { transform: scale(0); opacity: 1; }
  100% { transform: scale(4); opacity: 0; }
}

/* 押下時のバウンス */
.btn-bounce {
  animation: btnBounce 400ms cubic-bezier(.34,1.56,.64,1) forwards;
}
@keyframes btnBounce {
  0%   { transform: scale(1); }
  30%  { transform: scale(0.92); }
  60%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}

/* 成功チェックマーク */
.btn-success-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: inherit;
  border-radius: inherit;
  opacity: 0;
  animation: successFade 700ms ease forwards;
  pointer-events: none;
  z-index: 2;
}
@keyframes successFade {
  0%   { opacity: 0; transform: scale(0.5); }
  30%  { opacity: 1; transform: scale(1.15); }
  50%  { transform: scale(1); }
  80%  { opacity: 1; }
  100% { opacity: 0; }
}
.btn-success-check {
  width: 28px; height: 28px;
}
.btn-success-check path {
  stroke: #fff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  animation: checkDraw 400ms 100ms ease forwards;
}
@keyframes checkDraw {
  to { stroke-dashoffset: 0; }
}

/* パーティクルバースト */
.btn-particle {
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  pointer-events: none;
  animation: particleFly 600ms ease-out forwards;
}
@keyframes particleFly {
  0%   { opacity: 1; transform: translate(0,0) scale(1); }
  100% { opacity: 0; transform: translate(var(--px), var(--py)) scale(0); }
}

/* フィードバックボタンの光彩パルス */
.qfb-btn.qfb-pressed {
  animation: glowPulse 500ms ease;
}
@keyframes glowPulse {
  0%   { box-shadow: 0 0 0 0 rgba(249,115,22,.4); }
  50%  { box-shadow: 0 0 0 12px rgba(249,115,22,0); }
  100% { box-shadow: none; }
}
.qfb-great.qfb-pressed { animation-name: glowPulseGold; }
@keyframes glowPulseGold {
  0%   { box-shadow: 0 0 0 0 rgba(245,200,50,.5); }
  50%  { box-shadow: 0 0 0 14px rgba(245,200,50,0); }
  100% { box-shadow: none; }
}
.qfb-good.qfb-pressed { animation-name: glowPulseGreen; }
@keyframes glowPulseGreen {
  0%   { box-shadow: 0 0 0 0 rgba(16,185,129,.5); }
  50%  { box-shadow: 0 0 0 14px rgba(16,185,129,0); }
  100% { box-shadow: none; }
}

/* 査定ボタン押下時のグロー */
.search-btn.btn-glow {
  box-shadow: 0 0 20px rgba(234,88,12,.4), 0 0 40px rgba(234,88,12,.15);
  transition: box-shadow 300ms ease;
}

@media (max-width: 600px) {
  .resonance-metrics { grid-template-columns: repeat(2, 1fr); }
  .qfb-btn { min-width: 80px; padding: 12px 16px; }
  .qfb-icon { font-size: 1.5em; }
  .fb-btn { width: 44px; height: 44px; font-size: 1.4rem; }
}

/* ============================================
   MEKIKI³ LIVE Bar — 常時巡回ステータス
   ============================================ */
.mekiki-live-bar {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  border-bottom: 2px solid rgba(249,115,22,.4);
  position: relative;
  overflow: hidden;
  z-index: 99;
}
.mekiki-live-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 50%, rgba(249,115,22,.08) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 80% 50%, rgba(16,185,129,.06) 0%, transparent 70%);
  pointer-events: none;
}
.mekiki-live-bar::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), var(--buy), var(--primary), transparent);
  animation: mekikiScanline 3s ease-in-out infinite;
}
.mekiki-live-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  z-index: 1;
}
.mekiki-live-eye {
  font-size: 1.6rem;
  animation: mekikiEyePulse 2.5s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(249,115,22,.5));
}
.mekiki-live-brand {
  font-family: 'DM Sans', 'Noto Sans JP', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 2px;
  text-shadow: 0 0 20px rgba(249,115,22,.5), 0 0 40px rgba(249,115,22,.2);
}
.mekiki-live-brand sup {
  font-size: 0.55em;
  color: var(--primary);
  vertical-align: super;
  margin-left: 1px;
}
.mekiki-live-version {
  font-size: 0.7rem;
  font-weight: 500;
  color: rgba(255,255,255,.45);
  letter-spacing: 1px;
  padding: 2px 6px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 4px;
  line-height: 1;
}
.mekiki-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(16,185,129,.15);
  color: #34d399;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid rgba(16,185,129,.3);
  text-transform: uppercase;
}
.mekiki-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  animation: mekikiLivePulse 1.5s ease-in-out infinite;
  box-shadow: 0 0 6px rgba(16,185,129,.6);
}
.mekiki-live-status {
  font-size: 0.78rem;
  color: rgba(255,255,255,.55);
  letter-spacing: 1px;
  animation: mekikiStatusFade 4s ease-in-out infinite;
}

/* MEKIKI³ Animations */
@keyframes mekikiScanline {
  0%   { opacity: 0.3; transform: scaleX(0.3); }
  50%  { opacity: 1;   transform: scaleX(1); }
  100% { opacity: 0.3; transform: scaleX(0.3); }
}
@keyframes mekikiEyePulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 8px rgba(249,115,22,.5)); }
  50%      { transform: scale(1.1); filter: drop-shadow(0 0 14px rgba(249,115,22,.7)); }
}
@keyframes mekikiLivePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(1.3); }
}
@keyframes mekikiStatusFade {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; color: rgba(255,255,255,.85); }
}

/* Responsive: MEKIKI³ bar on mobile */
@media (max-width: 600px) {
  .mekiki-live-inner { gap: 6px; padding: 8px 1rem; }
  .mekiki-live-eye { font-size: 1.3rem; }
  .mekiki-live-brand { font-size: 1.1rem; letter-spacing: 1px; }
  .mekiki-live-version { font-size: 0.6rem; padding: 1px 4px; }
  .mekiki-live-badge { font-size: 0.65rem; padding: 2px 7px; }
  .mekiki-live-status { font-size: 0.65rem; }
}
