/* =====================================================================
   下水道マスター Pro：DX管路司令室 UI/UX リデザイン（ダーク・テック標準 ＋ ライト切替両対応）
   ===================================================================== */

:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --font-sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Consolas", monospace;
}

html, body {
  font-family: var(--font-sans);
}

/* 等幅数字でズレを防止 */
.stat-num, .coin-pill, .exam-timer-pill, .pro-osd-tl, .pro-osd-tr, .pro-osd-bl, .pro-osd-br,
.kpi-val, .xp-meta, .progress-row span {
  font-variant-numeric: tabular-nums;
}

/* =========================================================
   1. DX 司令室ダーク・テック標準テーマ（body.dx-command）
   ========================================================= */
body.dx-command {
  --bg: #070d17;
  --surface: rgba(14, 24, 40, 0.88);
  --surface-solid: #0f1b2e;
  --surface-alt: rgba(20, 34, 56, 0.78);
  --navy: #050a12;
  --navy-light: #13233b;
  --text: #eef4fc;
  --text-muted: #93a9c6;
  --border: rgba(148, 163, 184, 0.17);
  --border-strong: rgba(56, 189, 248, 0.36);
  --cyan: #38bdf8;
  --cyan-deep: #0284c7;
  --cyan-bg: rgba(56, 189, 248, 0.14);
  --amber: #f59e0b;
  --amber-bg: rgba(245, 158, 11, 0.16);
  --green: #34d399;
  --green-bg: rgba(16, 185, 129, 0.16);
  --red: #f87171;
  --red-bg: rgba(239, 68, 68, 0.16);
  --purple: #c084fc;
  --purple-bg: rgba(168, 85, 247, 0.16);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.32);
  --shadow-lg: 0 14px 36px rgba(0, 0, 0, 0.48);

  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 42% at 62% -10%, rgba(14, 165, 233, 0.14), transparent 65%),
    radial-gradient(ellipse 50% 35% at 96% 12%, rgba(245, 158, 11, 0.08), transparent 60%),
    linear-gradient(rgba(56, 189, 248, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 36px 36px, 36px 36px;
  background-attachment: fixed;
  color: var(--text);
}

/* ライトモード切替（body.dx-command.ui-light） */
body.dx-command.ui-light {
  --bg: #f1f5fa;
  --surface: #ffffff;
  --surface-solid: #ffffff;
  --surface-alt: #f7faff;
  --navy: #0c192c;
  --navy-light: #182e4d;
  --text: #132033;
  --text-muted: #52647d;
  --border: #d7e1ed;
  --border-strong: #0284c7;
  --cyan: #0284c7;
  --cyan-deep: #0369a1;
  --cyan-bg: #e0f2fe;
  --amber: #d97706;
  --amber-bg: #fef3c7;
  --green: #059669;
  --green-bg: #e6f7ef;
  --red: #dc2626;
  --red-bg: #feecec;
  --purple: #6d28d9;
  --purple-bg: #f3ecff;
  --shadow: 0 2px 12px rgba(12, 25, 44, 0.06);
  --shadow-lg: 0 12px 28px rgba(12, 25, 44, 0.12);

  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 75% 40% at 70% -8%, rgba(2, 132, 199, 0.08), transparent 65%),
    linear-gradient(rgba(15, 31, 54, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 31, 54, 0.025) 1px, transparent 1px);
  background-size: 100% 100%, 36px 36px, 36px 36px;
}

/* ダーク標準時のテキスト・基本カード視認性補正 */
body.dx-command:not(.ui-light) .page-head h1,
body.dx-command:not(.ui-light) .mode-card h3,
body.dx-command:not(.ui-light) .ency-card h4,
body.dx-command:not(.ui-light) .shop-card h4,
body.dx-command:not(.ui-light) .license-card h4 {
  color: #f8fafc;
}

body.dx-command:not(.ui-light) .card,
body.dx-command:not(.ui-light) .mode-card,
body.dx-command:not(.ui-light) .shop-card,
body.dx-command:not(.ui-light) .ency-card,
body.dx-command:not(.ui-light) .meter-card {
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.dx-command:not(.ui-light) .progress-track {
  background: rgba(148, 163, 184, 0.18);
}

body.dx-command:not(.ui-light) .choice-btn,
body.dx-command:not(.ui-light) .defect-btn,
body.dx-command:not(.ui-light) .rank-btn {
  background: rgba(17, 29, 49, 0.9);
  border-color: rgba(148, 163, 184, 0.22);
  color: #eef4fc;
}

body.dx-command:not(.ui-light) .choice-btn:hover:not(:disabled),
body.dx-command:not(.ui-light) .defect-btn:hover:not(:disabled) {
  background: rgba(24, 44, 74, 0.95);
  border-color: var(--cyan);
}

body.dx-command:not(.ui-light) .choice-key {
  background: rgba(56, 189, 248, 0.14);
  color: #7dd3fc;
  font-family: var(--font-mono);
}

body.dx-command:not(.ui-light) .chip {
  background: rgba(15, 26, 44, 0.85);
  border-color: rgba(148, 163, 184, 0.22);
  color: #b7c9e2;
}

body.dx-command:not(.ui-light) .chip.active {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.28);
}

body.dx-command:not(.ui-light) .btn-outline {
  background: rgba(17, 29, 49, 0.78);
  border-color: rgba(148, 163, 184, 0.28);
  color: #e2ecf9;
}

body.dx-command:not(.ui-light) .btn-outline:hover:not(:disabled) {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #7dd3fc;
}

body.dx-command:not(.ui-light) .badge-cyan { background: rgba(56, 189, 248, 0.16); color: #7dd3fc; }
body.dx-command:not(.ui-light) .badge-amber,
body.dx-command:not(.ui-light) .badge-中級 { background: rgba(245, 158, 11, 0.18); color: #fcd34d; }
body.dx-command:not(.ui-light) .badge-green,
body.dx-command:not(.ui-light) .badge-初級 { background: rgba(16, 185, 129, 0.18); color: #6ee7b7; }
body.dx-command:not(.ui-light) .badge-red,
body.dx-command:not(.ui-light) .badge-上級 { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }
body.dx-command:not(.ui-light) .badge-purple { background: rgba(168, 85, 247, 0.2); color: #d8b4fe; }
body.dx-command:not(.ui-light) .badge-navy { background: rgba(56, 189, 248, 0.16); color: #e0f2fe; border: 1px solid rgba(56, 189, 248, 0.28); }

body.dx-command:not(.ui-light) .search-input,
body.dx-command:not(.ui-light) .toggle-label {
  background: rgba(15, 25, 42, 0.9);
  border-color: rgba(148, 163, 184, 0.24);
  color: #f1f5f9;
}

body.dx-command:not(.ui-light) .modal-card {
  background: #0f1b2e;
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #eef4fc;
}

body.dx-command:not(.ui-light) .field-tip-box {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fde68a;
}

body.dx-command:not(.ui-light) .hazard-banner {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(248, 113, 113, 0.38);
  color: #fecaca;
}

body.dx-command:not(.ui-light) .ency-card.locked {
  background: rgba(10, 17, 30, 0.6);
  border-color: rgba(148, 163, 184, 0.16);
}

body.dx-command:not(.ui-light) .calc-steps-box {
  background: rgba(10, 18, 32, 0.78);
  border-color: rgba(56, 189, 248, 0.22);
}

body.dx-command:not(.ui-light) .feedback-meta {
  border-top-color: rgba(148, 163, 184, 0.18);
}

body.dx-command:not(.ui-light) .mode-icon.m1 { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
body.dx-command:not(.ui-light) .mode-icon.m2 { background: rgba(2, 132, 199, 0.25); color: #7dd3fc; }
body.dx-command:not(.ui-light) .mode-icon.m3 { background: rgba(245, 158, 11, 0.16); color: #fbbf24; }
body.dx-command:not(.ui-light) .mode-icon.m4 { background: rgba(168, 85, 247, 0.18); color: #d8b4fe; }

/* =========================================================
   2. サイドバー（3グループ整理＆統一SVGラインアイコン）
   ========================================================= */
.sidebar {
  width: 266px;
  background: linear-gradient(180deg, #060d18 0%, #091426 100%);
  border-right: 1px solid rgba(56, 189, 248, 0.14);
  padding: 18px 14px;
}

.pro-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 5px;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #fff;
  vertical-align: middle;
  letter-spacing: 0.05em;
  margin-left: 4px;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.67rem;
  letter-spacing: 0.06em;
  color: #7da3cb;
}

.nav-group-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #6482a8;
  padding: 10px 10px 4px;
  text-transform: uppercase;
}

.nav-group-label:first-child {
  padding-top: 2px;
}

.nav-btn {
  position: relative;
  padding: 9px 12px;
  font-size: 0.89rem;
  gap: 10px;
  border-radius: 10px;
  transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out), transform 120ms var(--ease-out);
}

.nav-btn:active {
  transform: scale(0.98);
}

.nav-btn.active {
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.22), rgba(2, 132, 199, 0.12));
  color: #ffffff;
  border: 1px solid rgba(56, 189, 248, 0.34);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.2);
}

.nav-btn.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 7px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
}

.nav-svg {
  width: 19px;
  height: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-svg.sm {
  width: 16px;
  height: 16px;
}

.nav-svg svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-btn.active .nav-svg {
  color: #38bdf8;
}

.btn-ghost-sm {
  display: flex;
  align-items: center;
  gap: 8px;
}

.console-switch-row {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr 0.9fr;
  gap: 5px;
  margin-bottom: 8px;
}

.audio-pill {
  padding: 6px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  transition: background-color 150ms var(--ease-out), border-color 150ms var(--ease-out), color 150ms var(--ease-out), transform 110ms var(--ease-out);
}

.audio-pill:active {
  transform: scale(0.96);
}

.audio-pill.on {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.55);
  color: #e0f2fe;
}

/* ボタン押し心地・無効時コントラスト統一 */
.btn {
  transition: transform 120ms var(--ease-out), box-shadow 160ms var(--ease-out), background-color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}

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

.btn-amber:disabled {
  background: rgba(148, 163, 184, 0.14);
  color: #94a3b8;
  box-shadow: none;
  opacity: 1;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

body.dx-command.ui-light .btn-amber:disabled {
  background: #e2e8f0;
  color: #475569;
  border: 1px solid #cbd5e1;
}

/* =========================================================
   3. ホーム画面：DX 管路司令室ダッシュボード＆即出動ハブ
   ========================================================= */
.main-content {
  max-width: 1120px;
  padding: 24px 28px 52px;
}

.cmd-hero {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: #081222;
  border: 1px solid rgba(56, 189, 248, 0.28);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #fff;
  margin-bottom: 16px;
}

.cmd-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  filter: saturate(1.1) contrast(1.06);
}

.cmd-hero-inner {
  position: relative;
  z-index: 1;
  background: linear-gradient(112deg, rgba(6, 13, 25, 0.94) 0%, rgba(10, 23, 44, 0.82) 56%, rgba(8, 37, 64, 0.72) 100%);
  padding: 22px 24px;
}

.cmd-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.85fr);
  gap: 20px;
  align-items: center;
}

.cmd-status-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 3px 10px;
  border-radius: 99px;
  margin-bottom: 10px;
}

.status-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
  animation: blink 2s infinite;
}

.cmd-hero h2 {
  margin: 0 0 6px;
  font-size: 1.48rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.cmd-hero-sub {
  margin: 0 0 14px;
  font-size: 0.88rem;
  color: #bfd4ed;
}

.cmd-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.cmd-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.cmd-kpi-tile {
  background: rgba(7, 15, 29, 0.65);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 11px;
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kpi-label {
  font-size: 0.7rem;
  color: #8eb0d4;
  font-weight: 700;
}

.kpi-val {
  font-family: var(--font-mono);
  font-size: 1.18rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.kpi-val.gold { color: #fde047; }
.kpi-val.cyan { color: #38bdf8; }

/* 次の目標トラッカーバー */
.next-obj-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 13px 18px;
  border-radius: 14px;
  margin-bottom: 16px;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.14), rgba(56, 189, 248, 0.1));
  border: 1px solid rgba(245, 158, 11, 0.42);
  box-shadow: var(--shadow);
}

body.dx-command.ui-light .next-obj-bar {
  background: linear-gradient(90deg, #fffbeb, #eff8ff);
  border-color: #f59e0b;
}

.next-obj-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  color: #f59e0b;
  letter-spacing: 0.08em;
}

/* 主役 2 カラム・フィーチャーダッシュボード */
.dash-featured-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
  gap: 16px;
  margin-bottom: 16px;
}

.featured-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.featured-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #38bdf8, #0284c7);
}

.featured-panel.amber::before {
  background: linear-gradient(90deg, #f59e0b, #ea580c);
}

.cam-preview-strip {
  position: relative;
  border-radius: 11px;
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.3);
  aspect-ratio: 16 / 7.2;
  background: #05080d;
  cursor: pointer;
}

.cam-preview-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 280ms var(--ease-out);
}

.cam-preview-strip:hover img {
  transform: scale(1.04);
}

.cam-preview-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(5, 11, 20, 0.85) 0%, rgba(5, 11, 20, 0.12) 60%);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 10px 12px;
  color: #e0f2fe;
  font-size: 0.78rem;
  font-weight: 700;
}

.quick-sub-chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.qsub-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  transition: border-color 150ms var(--ease-out), background-color 150ms var(--ease-out), transform 110ms var(--ease-out);
}

.qsub-btn:hover {
  border-color: var(--cyan);
  background: var(--cyan-bg);
}

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

.qsub-btn small {
  font-family: var(--font-mono);
  color: var(--cyan);
  font-weight: 800;
}

/* 4カラム・ミッションデッキ */
.dash-deck-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.deck-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 15px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 160ms var(--ease-out), border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}

.deck-card:hover {
  transform: translateY(-2px);
  border-color: var(--cyan);
  box-shadow: var(--shadow-lg);
}

.deck-card:active {
  transform: scale(0.98);
}

.deck-card h4 {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 800;
  color: var(--text);
}

.deck-card p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}

.dash-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.95fr);
  gap: 16px;
}

/* =========================================================
   4. 現場検査シミュレーター：一体型カメラ操作卓＋キーボード操作
   ========================================================= */
.camera-workspace.pro-console {
  background: linear-gradient(180deg, rgba(10, 18, 32, 0.96), rgba(8, 15, 27, 0.96));
  border: 1.5px solid rgba(56, 189, 248, 0.28);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.95fr);
  gap: 16px;
}

.camera-workspace.pro-console .camera-monitor {
  background: #060b13;
  border: 1px solid rgba(56, 189, 248, 0.22);
  box-shadow: none;
}

.camera-workspace.pro-console .console-right-card {
  background: rgba(13, 23, 40, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #eef4fc;
  box-shadow: none;
}

.camera-workspace.pro-console .console-right-card h3 {
  color: #e0f2fe;
}

.camera-workspace.pro-console .console-right-card .defect-btn,
.camera-workspace.pro-console .console-right-card .rank-btn {
  background: rgba(19, 33, 56, 0.92);
  border-color: rgba(148, 163, 184, 0.25);
  color: #eef4fc;
}

.camera-workspace.pro-console .console-right-card .defect-btn:hover:not(:disabled) {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.16);
}

.camera-workspace.pro-console .console-right-card .defect-btn.selected {
  background: rgba(56, 189, 248, 0.22);
  border-color: #38bdf8;
  color: #ffffff;
}

.camera-workspace.pro-console .console-right-card .rank-btn small {
  color: #93a9c6;
}

.kbd-hint-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  margin-top: 10px;
  padding: 7px 11px;
  border-radius: 9px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.16);
  font-size: 0.72rem;
  color: #93b4d8;
}

.kbd-hint-bar kbd {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #e0f2fe;
  margin-right: 3px;
}

.key-badge-mini {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0 5px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.18);
  color: #7dd3fc;
  margin-right: 5px;
}

/* === フォトリアル擬似カメラモニター === */
.monitor-screen.pro-16x9 {
  aspect-ratio: 16 / 9;
  background: #04070c;
}

.pro-monitor-stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #05080d;
  user-select: none;
}

.pro-monitor-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(var(--cam-bright, 1.02)) contrast(var(--cam-contrast, 1.03));
  transition: transform 320ms var(--ease-out), filter 180ms var(--ease-out);
  animation: camMicroSway 7s ease-in-out infinite;
}

.pro-monitor-stage.zoomed .pro-monitor-img {
  transform: scale(1.75);
  animation: none;
}

@keyframes camMicroSway {
  0%, 100% { transform: scale(1.02) translate(0px, 0px); }
  25% { transform: scale(1.025) translate(1.2px, -0.8px); }
  50% { transform: scale(1.02) translate(-1px, 0.9px); }
  75% { transform: scale(1.025) translate(0.7px, 0.6px); }
}

.pro-monitor-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 58%, rgba(0, 0, 0, 0.48) 100%);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--hud-accent, #38bdf8) 42%, transparent);
}

.pro-monitor-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.pro-clock-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  color: rgba(125, 211, 252, 0.8);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 800;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

.pro-clock-overlay .clk-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56%;
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  border: 1px dashed rgba(125, 211, 252, 0.35);
  border-radius: 50%;
}

.pro-clock-overlay .clk-12 { position: absolute; top: 8%; left: 50%; transform: translateX(-50%); }
.pro-clock-overlay .clk-6  { position: absolute; bottom: 11%; left: 50%; transform: translateX(-50%); }
.pro-clock-overlay .clk-3  { position: absolute; right: 17%; top: 50%; transform: translateY(-50%); }
.pro-clock-overlay .clk-9  { position: absolute; left: 17%; top: 50%; transform: translateY(-50%); }

.pro-laser-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  animation: fadeInLaser 220ms var(--ease-out);
}

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

.pro-laser-readout {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: rgba(10, 18, 32, 0.92);
  border: 1.5px solid #ff3b5c;
  color: #ffe4e6;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  max-width: 92%;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 4px 16px rgba(255, 59, 92, 0.4);
  z-index: 3;
}

.laser-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff3b5c;
  box-shadow: 0 0 8px #ff3b5c;
  animation: blink 0.9s infinite;
}

.pro-osd-tl, .pro-osd-tr, .pro-osd-bl, .pro-osd-br {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.69rem;
  font-weight: 700;
  color: #e0f2fe;
  background: rgba(5, 11, 20, 0.68);
  padding: 2px 7px;
  border-radius: 5px;
  letter-spacing: 0.02em;
  pointer-events: none;
  z-index: 2;
}

.pro-osd-tl {
  top: 8px;
  left: 8px;
  border-left: 2px solid var(--hud-accent, #38bdf8);
  max-width: 56%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pro-osd-tr { top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 6px; }
.pro-osd-bl { bottom: 7px; left: 8px; color: #bae6fd; max-width: 54%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pro-osd-br { bottom: 7px; right: 8px; color: #fde68a; }

.laser-hidden-hint {
  background: rgba(245, 158, 11, 0.14);
  border: 1px dashed rgba(251, 191, 36, 0.55);
  color: #fde68a;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.77rem;
  margin-top: 6px;
}

/* =========================================================
   5. 疑似資格・実務スキル・やり込み実績・マイ会社コンポーネント
   ========================================================= */
.hq-preview-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1.5px solid var(--border-strong);
  background: #0a1426;
  margin-bottom: 16px;
  box-shadow: var(--shadow-lg);
}

.hq-preview-card img {
  width: 100%;
  max-height: 250px;
  object-fit: cover;
  display: block;
}

.hq-preview-caption {
  padding: 13px 18px;
  background: linear-gradient(90deg, #071122, #11294a);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.license-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  transition: transform 160ms var(--ease-out), border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}

.license-card.owned {
  border-color: rgba(245, 158, 11, 0.7);
  background: linear-gradient(160deg, rgba(245, 158, 11, 0.14) 0%, var(--surface) 60%);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.15);
}

.license-card.tier-platinum.owned {
  border-color: rgba(56, 189, 248, 0.75);
  background: linear-gradient(160deg, rgba(56, 189, 248, 0.16) 0%, var(--surface) 60%);
}

.license-card.tier-mythic.owned {
  border-color: rgba(192, 132, 252, 0.85);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2) 0%, rgba(245, 158, 11, 0.14) 100%);
  box-shadow: 0 8px 26px rgba(168, 85, 247, 0.25);
}

.lic-seal {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.71rem;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 99px;
}

.lic-seal.bronze { background: rgba(245, 158, 11, 0.2); color: #fcd34d; }
.lic-seal.silver { background: rgba(148, 163, 184, 0.22); color: #e2e8f0; }
.lic-seal.gold   { background: rgba(250, 204, 21, 0.24); color: #fef08a; border: 1px solid rgba(250, 204, 21, 0.45); }
.lic-seal.platinum { background: rgba(56, 189, 248, 0.22); color: #bae6fd; border: 1px solid rgba(56, 189, 248, 0.5); }
.lic-seal.mythic { background: linear-gradient(135deg, rgba(168, 85, 247, 0.35), rgba(245, 158, 11, 0.35)); color: #faf5ff; border: 1px solid rgba(192, 132, 252, 0.6); }

body.dx-command.ui-light .lic-seal.bronze { background: #fef3c7; color: #92400e; }
body.dx-command.ui-light .lic-seal.silver { background: #e2e8f0; color: #334155; }
body.dx-command.ui-light .lic-seal.gold   { background: #fef08a; color: #854d0e; }
body.dx-command.ui-light .lic-seal.platinum { background: #e0f2fe; color: #0369a1; }
body.dx-command.ui-light .lic-seal.mythic { background: #f3e8ff; color: #6b21a8; }

.lic-mini-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.lic-mini-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.73rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.48);
  color: #fef08a;
}

.skill-card {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px;
}

.skill-card.master {
  border-color: rgba(245, 158, 11, 0.65);
  background: linear-gradient(160deg, rgba(245, 158, 11, 0.15), var(--surface-alt));
}

.ach-tier-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 5px;
  letter-spacing: 0.05em;
}
.ach-tier-bronze   { background: rgba(245, 158, 11, 0.22); color: #fcd34d; }
.ach-tier-silver   { background: rgba(148, 163, 184, 0.24); color: #e2e8f0; }
.ach-tier-gold     { background: rgba(250, 204, 21, 0.24); color: #fef08a; border: 1px solid rgba(250, 204, 21, 0.5); }
.ach-tier-platinum { background: linear-gradient(135deg, rgba(56, 189, 248, 0.3), rgba(168, 85, 247, 0.3)); color: #e0f2fe; border: 1px solid rgba(56, 189, 248, 0.6); }

body.dx-command.ui-light .ach-tier-bronze   { background: #fde68a; color: #92400e; }
body.dx-command.ui-light .ach-tier-silver   { background: #e2e8f0; color: #334155; }
body.dx-command.ui-light .ach-tier-gold     { background: #fef08a; color: #854d0e; }
body.dx-command.ui-light .ach-tier-platinum { background: linear-gradient(135deg, #bae6fd, #ddd6fe); color: #1e3a8a; }

.ach-pro-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ach-pro-card.claimable {
  border-color: #f59e0b;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), var(--surface));
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.22);
}

.ach-pro-card.done {
  border-color: rgba(52, 211, 153, 0.48);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), var(--surface));
}

.exam-timer-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 99px;
  background: #070d17;
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #38bdf8;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.88rem;
}

.exam-timer-pill.urgent {
  background: #dc2626;
  border-color: #f87171;
  color: #fff;
  animation: blink 0.9s infinite;
}

.upgrade-pips {
  display: flex;
  gap: 3px;
  margin: 6px 0;
}
.upgrade-pip {
  flex: 1;
  height: 7px;
  border-radius: 3px;
  background: rgba(148, 163, 184, 0.2);
}
.upgrade-pip.filled {
  background: linear-gradient(90deg, #0284c7, #38bdf8);
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.4);
}

.roadmap-banner {
  background: linear-gradient(135deg, rgba(14, 24, 40, 0.92), rgba(17, 38, 66, 0.88));
  color: #e2e8f0;
  border-radius: 14px;
  padding: 16px 18px;
  border: 1px solid rgba(56, 189, 248, 0.26);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

@media (max-width: 1080px) {
  .dash-deck-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .main-content {
    padding: 14px 12px 90px;
  }
  .cmd-hero-grid,
  .dash-featured-grid,
  .dash-bottom-grid,
  .camera-workspace.pro-console {
    grid-template-columns: 1fr;
  }
  .dash-deck-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cmd-hero-inner {
    padding: 16px;
  }
  .kbd-hint-bar {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pro-monitor-img, .status-pulse, .laser-dot {
    animation: none !important;
  }
}
