:root {
  --bg-main: #070a13;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-active: #38bdf8;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent-cyan: #38bdf8;
  --accent-purple: #a855f7;
  --accent-emerald: #10b981;
  --accent-orange: #f97316;
  --accent-blue: #3b82f6;
  --accent-rose: #f43f5e;
  --glow-cyan: rgba(56, 189, 248, 0.25);
  --glow-purple: rgba(168, 85, 247, 0.25);
}

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

body {
  font-family: 'Inter', 'Noto Sans JP', -apple-system, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(56, 189, 248, 0.09) 0%, transparent 45%),
    radial-gradient(circle at 85% 70%, rgba(168, 85, 247, 0.08) 0%, transparent 45%),
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 50px 50px, 50px 50px;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: rgba(7, 10, 19, 0.85);
  border-bottom: 1px solid var(--border-color);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 19px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-lab {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
  font-weight: 600;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-link {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--text-main);
}

.btn-blog-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
  transition: all 0.2s ease;
}

.btn-blog-top:hover {
  background: rgba(56, 189, 248, 0.2);
  transform: translateY(-1px);
}

/* Page Hero */
.app-hero {
  padding: 32px 0 24px;
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px;
  border-radius: 20px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  font-size: 12px;
  color: var(--accent-cyan);
  font-weight: 600;
  margin-bottom: 12px;
}

.hero-title {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #ffffff 40%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto;
}

/* Beginner Guide Accordion */
.guide-accordion {
  max-width: 860px;
  margin: 18px auto 0;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 14px;
  overflow: hidden;
  text-align: left;
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
}

.guide-accordion[open] {
  border-color: var(--accent-cyan);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 15px var(--glow-cyan);
}

.guide-summary {
  padding: 12px 20px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent-cyan);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.guide-summary::-webkit-details-marker {
  display: none;
}

.guide-summary::after {
  content: '▼';
  font-size: 11px;
  transition: transform 0.25s ease;
}

.guide-accordion[open] .guide-summary::after {
  transform: rotate(180deg);
}

.guide-body {
  padding: 0 20px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 16px 0;
}

.guide-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 14px 16px;
}

.guide-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.guide-card p {
  margin: 0;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.6;
}

.guide-cta-row {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.guide-cta-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-cyan);
  transition: color 0.2s;
}

.guide-cta-link:hover {
  color: #7dd3fc;
  text-decoration: underline;
}

/* Workspace Layout */
.workspace {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 30px;
  align-items: start;
  padding-bottom: 60px;
}

@media (max-width: 1000px) {
  .workspace {
    grid-template-columns: 1fr;
  }
}

/* Input Card (Left Column) */
.card-input {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.input-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-row {
  margin-bottom: 24px;
}

.form-label-wrap {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}

.form-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
}

.form-val {
  font-family: 'Outfit', monospace;
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-cyan);
}

/* Range Slider */
.slider-input {
  width: 100%;
  -webkit-appearance: none;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  transition: background 0.2s;
}

.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-cyan);
  cursor: pointer;
  box-shadow: 0 0 10px var(--glow-cyan);
  transition: transform 0.1s;
}

.slider-input::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

/* Preset Buttons */
.presets-wrap {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.btn-preset {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 11.5px;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-preset:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border-color: var(--accent-cyan);
}

/* Summary Pill */
.monthly-summary-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.summary-label {
  font-size: 12.5px;
  color: var(--text-muted);
}

.summary-val {
  font-family: 'Outfit', monospace;
  font-size: 15px;
  font-weight: 700;
  color: #e2e8f0;
}

/* Output Panel (Right Column) */
.output-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Advice Banner */
.advice-banner {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 15px var(--glow-cyan);
}

.advice-badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
  margin-bottom: 8px;
}

.advice-badge.advice-plus {
  background: rgba(168, 85, 247, 0.15);
  color: var(--accent-purple);
  border-color: rgba(168, 85, 247, 0.3);
}

.advice-badge.advice-neutral {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border-color: rgba(16, 185, 129, 0.3);
}

.advice-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.5;
  margin-bottom: 6px;
}

.advice-title strong {
  color: #38bdf8;
}

.advice-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Filter Controls Bar (Search & Sort) */
.filter-controls-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.search-box-wrap {
  flex: 1;
  min-width: 260px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  font-size: 14px;
  color: var(--text-dim);
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 10px 36px 10px 36px;
  color: var(--text-main);
  font-size: 13.5px;
  outline: none;
  transition: all 0.2s ease;
}

.search-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 14px var(--glow-cyan);
}

.btn-clear {
  position: absolute;
  right: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-muted);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
}

.btn-clear:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.btn-clear.hidden {
  display: none;
}

.sort-box-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-label {
  font-size: 12.5px;
  color: var(--text-muted);
  white-space: nowrap;
}

.sort-select {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 8px 12px;
  color: var(--text-main);
  font-size: 12.5px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sort-select:focus {
  border-color: var(--accent-cyan);
}

/* Category Filter Tabs */
.category-tabs-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.cat-tab {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.cat-tab:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
}

.cat-tab.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 12px var(--glow-cyan);
}

/* Chart Container */
.card-chart {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  font-size: 12px;
  color: var(--text-dim);
}

.model-row {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.model-row:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.model-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 6px;
}

.model-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.model-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.model-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
}

.badge-cyan { background: rgba(56, 189, 248, 0.15); color: var(--accent-cyan); }
.badge-purple { background: rgba(168, 85, 247, 0.15); color: var(--accent-purple); }
.badge-emerald { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }
.badge-orange { background: rgba(249, 115, 22, 0.15); color: var(--accent-orange); }
.badge-blue { background: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }
.badge-rose { background: rgba(244, 63, 94, 0.15); color: var(--accent-rose); }
.badge-amber { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.badge-slate { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; }

.model-provider {
  font-size: 11px;
  color: var(--text-dim);
}

.model-desc {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Bar Track & Fill */
.model-bar-section {
  display: flex;
  align-items: center;
  gap: 14px;
}

.bar-track {
  flex: 1;
  height: 14px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 7px;
  overflow: hidden;
  position: relative;
}

.bar-fill {
  height: 100%;
  border-radius: 7px;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.fill-cyan { background: linear-gradient(90deg, #0284c7, var(--accent-cyan)); }
.fill-purple { background: linear-gradient(90deg, #7e22ce, var(--accent-purple)); }
.fill-emerald { background: linear-gradient(90deg, #059669, var(--accent-emerald)); }
.fill-orange { background: linear-gradient(90deg, #ea580c, var(--accent-orange)); }
.fill-blue { background: linear-gradient(90deg, #1d4ed8, var(--accent-blue)); }
.fill-rose { background: linear-gradient(90deg, #be123c, var(--accent-rose)); }
.fill-amber { background: linear-gradient(90deg, #b45309, #f59e0b); }
.fill-slate { background: linear-gradient(90deg, #475569, #94a3b8); }

.model-price-wrap {
  width: 140px;
  text-align: right;
  flex-shrink: 0;
}

.price-jpy {
  font-family: 'Outfit', monospace;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.price-usd {
  font-size: 11px;
  color: var(--text-dim);
  display: block;
}

/* Article Cross-Promo */
.card-promo {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color 0.2s ease;
}

.card-promo:hover {
  border-color: var(--accent-cyan);
}

.promo-badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.promo-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.promo-link {
  font-size: 11.5px;
  color: var(--accent-cyan);
  font-weight: 600;
}

/* Group Section Headers & Accordion */
.group-section {
  margin-bottom: 28px;
}

.group-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid var(--accent-cyan);
  margin-bottom: 14px;
}

.group-section-header.header-latest {
  border-left-color: #f43f5e;
  background: linear-gradient(90deg, rgba(244, 63, 94, 0.1), transparent);
}

.group-section-header.header-big3 {
  border-left-color: #38bdf8;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.1), transparent);
}

.group-section-header.header-challenger {
  border-left-color: #10b981;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.1), transparent);
}

.group-section-header.header-benchmark {
  border-left-color: #a855f7;
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.1), transparent);
}

.group-section-header.header-other {
  border-left-color: #64748b;
  background: rgba(255, 255, 255, 0.02);
}

.group-count-badge {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: normal;
  margin-left: auto;
}

/* Other Models Accordion */
.other-models-details {
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.4);
  margin-top: 10px;
}

.other-models-summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}

.other-models-summary:hover {
  color: var(--accent-cyan);
}

.other-models-content {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Search Results Hit Bar */
.search-hit-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--accent-cyan);
  padding: 6px 12px;
  background: rgba(56, 189, 248, 0.1);
  border-radius: 8px;
  margin-bottom: 14px;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-color);
  padding: 24px 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 8px;
}

.footer-links a:hover {
  color: var(--accent-cyan);
}
