:root {
  --bg: #04070f;
  --panel: rgba(14, 20, 40, 0.92);
  --panel-solid: #0e1428;
  --line: rgba(130, 160, 230, 0.18);
  --text: #e6ebff;
  --muted: #94a0c4;
  --accent: #ffd678;
  --blue: #8cc8ff;
  --header-h: 56px;
  font-family: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
body { display: flex; flex-direction: column; overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--blue); }

/* ---- ヘッダー ---- */
.topbar {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: #070b18;
  flex: none;
  position: relative;
  z-index: 20;
}
.brand { font-size: 17px; font-weight: 700; margin: 0; white-space: nowrap; letter-spacing: 0.02em; }
.brand-mark { color: var(--accent); }
.tabs { display: flex; gap: 4px; background: rgba(255, 255, 255, 0.05); border-radius: 10px; padding: 3px; }
.tab {
  border: 0; background: none; padding: 6px 14px; border-radius: 8px; cursor: pointer; color: var(--muted);
}
.tab.is-active { background: rgba(140, 200, 255, 0.16); color: var(--text); }
.search { position: relative; flex: 1; max-width: 420px; margin-left: auto; }
.search input {
  width: 100%; padding: 8px 12px 8px 36px; border-radius: 10px; border: 1px solid var(--line);
  /* 虫めがねのアイコン（検索欄だとわかるように） */
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%239fb0d0' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 21 21'/%3E%3C/svg%3E") no-repeat 11px center / 18px, rgba(255, 255, 255, 0.05); outline: none;
}
.search input:focus { border-color: rgba(140, 200, 255, 0.5); }
.search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; margin: 0; padding: 4px;
  list-style: none; background: var(--panel-solid); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5); max-height: 60vh; overflow: auto;
}
.search-results li {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer;
}
.search-results li.is-active, .search-results li:hover { background: rgba(140, 200, 255, 0.12); }
.search-results li.empty { color: var(--muted); cursor: default; }
.search-results .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.search-results .dot.const { background: none; color: var(--blue); width: auto; height: auto; font-size: 12px; }
.search-results .name { font-weight: 600; }
.search-results .sub { color: var(--muted); font-size: 13px; margin-left: auto; white-space: nowrap; }
.lang { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; flex: none; }
.lang button { border: 0; background: none; padding: 6px 10px; cursor: pointer; color: var(--muted); font-size: 13px; }
.lang button.is-active { background: rgba(140, 200, 255, 0.16); color: var(--text); }

/* ---- 本体 ---- */
main { flex: 1; position: relative; min-height: 0; }
.view { position: absolute; inset: 0; display: none; }
.view.is-active { display: block; }

#view-map canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.tooltip {
  position: absolute; pointer-events: none; background: rgba(10, 16, 32, 0.9); border: 1px solid var(--line);
  padding: 4px 8px; border-radius: 6px; font-size: 13px; white-space: pre;
}
.map-controls { position: absolute; right: 16px; bottom: 40px; display: flex; flex-direction: column; gap: 8px; }
.map-controls button {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel);
  cursor: pointer; font-size: 18px;
}
.map-controls button:hover { background: #18213f; }
.map-controls .night-btn.is-active { background: #5a0d0d; border-color: #a33; }
/* 夜空モード: 画面全体を、明るさだけの赤にして暗くする。
   ルート要素の filter は iPhone の Safari で星図（canvas）にかからないので、上に重ねる膜でかける */
/* 2枚は別々に置く（1つの箱に入れると、赤の重ね方がその箱の中だけになり、下の画面にかからない） */
.night-veil { display: none; position: fixed; inset: 0; pointer-events: none; }
html.night .night-veil { display: block; }
.night-gray { z-index: 1000; backdrop-filter: grayscale(1) brightness(0.8); -webkit-backdrop-filter: grayscale(1) brightness(0.8); }
.night-tint { z-index: 1001; background: #ff0000; mix-blend-mode: multiply; }
.layers {
  position: absolute; right: 66px; bottom: 40px; z-index: 8; max-height: calc(100% - 140px); overflow-y: auto; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; font-size: 14px;
}
.layers label { display: flex; gap: 8px; align-items: center; cursor: pointer; white-space: nowrap; }
.map-status { position: absolute; left: 16px; bottom: 12px; font-size: 12px; color: var(--muted); pointer-events: none; }

/* ---- 図鑑 ---- */
#view-list { overflow-y: auto; padding: 16px 16px 60px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; max-width: 1200px; margin-inline: auto; }
.filters select {
  padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-solid);
}
.filters .check { display: flex; gap: 6px; align-items: center; font-size: 14px; cursor: pointer; }
.filters .count { margin-left: auto; color: var(--muted); font-size: 14px; }
.list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px;
  max-width: 1200px; margin: 0 auto;
}
.card {
  display: flex; gap: 14px; align-items: center; text-align: left; padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); cursor: pointer; min-width: 0;
}
.card:hover { background: rgba(140, 200, 255, 0.08); border-color: rgba(140, 200, 255, 0.35); }
.card-star {
  flex: none; width: 34px; height: 34px; display: grid; place-items: center; position: relative;
}
.card-star::before {
  content: ""; width: var(--r); height: var(--r); border-radius: 50%; background: var(--c);
  box-shadow: 0 0 calc(var(--r) * 1.2) var(--c);
}
.card-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.card-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-alt { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 8px; }
.card-sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { display: flex; gap: 10px; font-size: 12px; color: #b9c3e3; font-variant-numeric: tabular-nums; }
.sentinel { height: 1px; }

/* ---- 詳細パネル ---- */
.detail {
  position: fixed; top: calc(var(--header-h) + 12px); right: 12px; bottom: 40px; width: min(380px, calc(100vw - 24px));
  background: var(--panel); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: 16px; padding: 20px; overflow-y: auto; z-index: 15;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5);
}
.detail-close {
  position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, 0.06); cursor: pointer; font-size: 18px;
}
.detail-back {
  display: inline-block; margin: -6px 0 12px; border: 1px solid var(--line); background: rgba(140, 200, 255, 0.1); color: var(--accent);
  border-radius: 999px; padding: 5px 12px; cursor: pointer; font-size: 12px;
}
.detail-back[hidden] { display: none; }
.detail-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; padding-right: 30px; }
.detail-star {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, var(--c) 35%, transparent 70%);
}
.detail h2 { margin: 0; font-size: 22px; }
.detail-alt { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.detail-dir { margin: 4px 0 0; color: var(--accent); font-size: 13px; }
.detail-desc p { margin: 0 0 8px; line-height: 1.7; font-size: 14px; }
.detail-table {
  display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 16px 0; font-size: 13px;
  padding-top: 14px; border-top: 1px solid var(--line);
}
.detail-table dt { color: var(--muted); }
.detail-table dd { margin: 0; font-variant-numeric: tabular-nums; }
.primary {
  width: 100%; padding: 10px; border-radius: 10px; border: 0; cursor: pointer;
  background: rgba(140, 200, 255, 0.18); color: var(--text); font-weight: 600;
}
.primary:hover { background: rgba(140, 200, 255, 0.28); }

.credit-short { display: none; }
.credit {
  flex: none; padding: 6px 16px; text-align: right; font-size: 11px; color: #6f7a9c;
  border-top: 1px solid var(--line); background: #070b18;
}

/* ---- スマホ ---- */
@media (max-width: 720px) {
  :root { --header-h: 104px; }
  .topbar { flex-wrap: wrap; height: auto; min-height: var(--header-h); padding: 8px 16px; gap: 8px 12px; }
  .brand { font-size: 15px; }
  .lang { margin-left: auto; }
  .search { order: 5; flex-basis: 100%; max-width: none; }
  .tabs { order: 2; }
  .detail {
    top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 55vh; border-radius: 16px 16px 0 0;
  }
  .map-controls { bottom: 36px; }
  .list { grid-template-columns: 1fr; }
  .filters select { flex: 1 1 45%; min-width: 0; }
  .credit-short { display: none; }
.credit { text-align: left; }
  /* スマホでは短い出典にする（全文は「ライセンス」のページ） */
  .credit-full { display: none; }
  .credit-short { display: inline; }
}

/* ---- 追加: 等級ボタン・日時・分類 ---- */
.help-btn {
  flex: none; border: 1px solid var(--line); background: rgba(255, 214, 120, 0.1); color: var(--accent);
  padding: 6px 10px; border-radius: 10px; cursor: pointer; font-size: 13px; white-space: nowrap;
}
.help-btn:hover { background: rgba(255, 214, 120, 0.2); }

.timebar {
  position: absolute; top: 12px; left: 16px; right: 16px; width: fit-content; max-width: calc(100% - 32px);
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 6px 8px; font-size: 13px;
}
.timebar-label { color: var(--muted); padding: 0 4px; }
.timebar button {
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); border-radius: 8px; padding: 4px 8px; cursor: pointer;
}
.timebar button:hover { background: rgba(140, 200, 255, 0.14); }
.timebar input {
  border: 1px solid var(--line); background: var(--panel-solid); border-radius: 8px; padding: 3px 6px;
}

.cat-tabs { display: flex; flex-wrap: wrap; gap: 6px; max-width: 1200px; margin: 0 auto 12px; }
.cat-tabs button {
  border: 1px solid var(--line); background: none; color: var(--muted); border-radius: 999px; padding: 7px 16px; cursor: pointer;
}
.cat-tabs button.is-active { background: rgba(140, 200, 255, 0.16); color: var(--text); border-color: rgba(140, 200, 255, 0.4); }

/* 一覧・検索・詳細の記号（種類ごと） */
.search-results .dot { background: var(--c); }
.search-results .dot.dso { background: none; border: 1.5px solid var(--c); }
.search-results .dot.const { background: none; }
.card-star.dso::before { background: none; border: 2px solid var(--c); box-shadow: 0 0 8px var(--c); width: 18px; height: 12px; border-radius: 50%; }
.card-star.body::before { box-shadow: 0 0 10px var(--c); }
.detail-star.dso { background: radial-gradient(ellipse at center, var(--c) 0%, transparent 65%); border-radius: 50%; transform: scaleY(0.6); }

/* 明るさのイメージ */
.detail-bright {
  margin: 14px 0; padding: 12px 14px; border-radius: 12px; background: rgba(255, 214, 120, 0.06);
  border: 1px solid rgba(255, 214, 120, 0.18);
}
.detail-bright h3 { margin: 0 0 6px; font-size: 14px; display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.detail-bright ul { margin: 6px 0 10px; padding-left: 18px; font-size: 13px; line-height: 1.7; }
.bright-mag { margin: 0; font-size: 13px; color: var(--muted); }
.bright-mag strong { font-size: 24px; color: var(--accent); font-variant-numeric: tabular-nums; }
.mag-help {
  border: 1px solid rgba(255, 214, 120, 0.4); background: none; color: var(--accent); border-radius: 999px;
  padding: 2px 10px; font-size: 12px; cursor: pointer; font-weight: 400;
}
.mag-help.small { padding: 0 6px; margin-left: 4px; line-height: 1.4; }

.mag-scale { position: relative; height: 54px; margin: 4px 6px 0; }
.mag-bar {
  position: absolute; left: 0; right: 0; top: 22px; height: 6px; border-radius: 3px;
  background: linear-gradient(90deg, #fff 0%, #ffe9a8 25%, #7d8bb5 60%, #1d2440 100%);
}
.mag-tick { position: absolute; top: 30px; transform: translateX(-50%); font-size: 10px; color: var(--muted); white-space: nowrap; }
.mag-tick i { display: block; width: 1px; height: 6px; background: var(--muted); margin: -8px auto 2px; }
.mag-tick.low { top: 40px; }
.mag-marker {
  position: absolute; top: 0; transform: translateX(-50%); font-size: 11px; font-weight: 700; color: #1a1300;
  background: var(--accent); padding: 1px 6px; border-radius: 6px; white-space: nowrap;
}
.mag-marker::after {
  content: ""; position: absolute; left: 50%; bottom: -5px; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: var(--accent); border-bottom: 0;
}
.mag-scale-legend { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 8px; }

/* 等級の説明パネル */
.modal {
  position: fixed; inset: 0; z-index: 40; background: rgba(2, 4, 10, 0.7); display: grid; place-items: center; padding: 16px;
}
.modal-box {
  position: relative; width: min(640px, 100%); max-height: calc(100vh - 32px); overflow-y: auto;
  background: var(--panel-solid); border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); line-height: 1.7; font-size: 14px;
}
.modal-box h2 { margin: 0 0 8px; font-size: 20px; }
.modal-box h3 { margin: 20px 0 6px; font-size: 15px; color: var(--accent); }
.modal-box p { margin: 6px 0; }
.modal-box .note { color: var(--muted); font-size: 12px; }
.mag-points { padding-left: 20px; margin: 8px 0; }
.mag-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mag-table th { text-align: left; color: var(--muted); font-weight: 400; font-size: 12px; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.mag-table td { padding: 5px 6px; border-bottom: 1px solid rgba(130, 160, 230, 0.08); vertical-align: middle; }
.mag-table .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.mag-table .ratio { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mag-table .dot-cell { width: 34px; text-align: center; }
.mag-dot { display: inline-block; border-radius: 50%; background: #fff; box-shadow: 0 0 6px rgba(255, 255, 255, 0.8); vertical-align: middle; }
.mag-try input { width: 100%; }
.mag-try-out { display: flex; gap: 16px; align-items: center; margin-top: 8px; min-height: 48px; }
.mag-try-out .mag-dot { flex: none; margin: 0 11px; }
.mag-try-out p { margin: 2px 0 0; font-size: 13px; }

@media (max-width: 720px) {
  .search { flex: 1 1 60%; }
  .help-btn { order: 6; padding: 7px 8px; font-size: 12px; }
  .timebar { top: 8px; left: 8px; right: 8px; max-width: calc(100% - 16px); font-size: 11px; gap: 4px; padding: 4px 5px; flex-wrap: nowrap; }
  .timebar-label, .timebar [data-step="-3600"], .timebar [data-step="3600"] { display: none; }
  .timebar input { flex: 1 1 auto; min-width: 0; font-size: 12px; }
  .timebar button { padding: 4px 6px; white-space: nowrap; }
  .modal-box { padding: 18px 16px; }
}

/* ---- 太陽系の図 ---- */
#view-solar canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.timebar { z-index: 5; }
.timebar .play { min-width: 32px; }
.timebar .play.is-playing { background: rgba(255, 214, 120, 0.2); color: var(--accent); }
.orrery-mode {
  position: absolute; right: 16px; top: 12px; display: flex; border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; background: var(--panel); font-size: 13px;
}
.orrery-mode button { border: 0; background: none; padding: 6px 10px; cursor: pointer; color: var(--muted); }
.orrery-mode button.is-active { background: rgba(140, 200, 255, 0.16); color: var(--text); }
/* 指で押す端末では、ボタンを押しやすい大きさ（44px）にする */
@media (pointer: coarse) {
  .orrery-mode button { min-height: 44px; padding: 0 12px; }
  .map-controls button { width: 44px; height: 44px; }
}
.detail-actions { display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 720px) {
  .orrery-mode { top: auto; bottom: 36px; left: 8px; right: auto; font-size: 12px; }
  /* スマホでは、表示の切り替えの一覧を左下のモードのボタンより上に置く */
  .layers { bottom: 96px; right: 64px; left: 8px; }
  .tab { padding: 6px 10px; }
}

/* ---- 時間旅行 ---- */
.timebar-wrap { position: absolute; top: 12px; left: 16px; z-index: 5; display: flex; flex-direction: column; gap: 8px; max-width: calc(100% - 32px); pointer-events: none; }
.timebar-wrap > * { pointer-events: auto; }
.timebar-wrap .timebar { position: static; flex-direction: column; align-items: stretch; width: fit-content; max-width: 100%; }
.timebar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.timebar select {
  border: 1px solid var(--line); background: var(--panel-solid); border-radius: 8px; padding: 3px 6px;
}
.travel-btn { color: var(--accent); }
.year-field { display: flex; align-items: center; gap: 4px; color: var(--muted); }
.year-field input {
  width: 9.5em; border: 1px solid var(--line); background: var(--panel-solid); border-radius: 8px; padding: 3px 6px;
  color: var(--text); font-variant-numeric: tabular-nums;
}
.time-rel { color: var(--accent); font-size: 12px; }
.travel, .era {
  width: min(420px, calc(100vw - 32px)); background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; font-size: 13px; max-height: 55vh; overflow-y: auto; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.travel h3 { margin: 4px 0 8px; font-size: 13px; color: var(--accent); }
.jumps { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 6px; margin-bottom: 12px; }
.jumps button, .timeline button {
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); border-radius: 8px; padding: 5px 6px; cursor: pointer; font-size: 12px;
}
.jumps button:hover, .timeline button:hover { background: rgba(140, 200, 255, 0.14); }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.timeline button { display: flex; gap: 10px; text-align: left; width: 100%; line-height: 1.5; }
.ev-year { flex: none; color: var(--accent); min-width: 7.5em; font-variant-numeric: tabular-nums; }
.travel .note { color: var(--muted); font-size: 11px; margin: 10px 0 0; }
#samesky-btn .ss-lbl { margin-left: 4px; }
.samesky h4 { margin: 16px 0 6px; font-size: 13px; color: var(--text); }
.samesky .ss-intro { margin-top: 0; }
.ss-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.ss-form > span { color: var(--muted); font-size: 12px; }
.ss-form select { border: 1px solid var(--line); background: var(--panel-solid); border-radius: 8px; padding: 4px 6px; color: var(--text); max-width: 100%; }
.ss-form input { border: 1px solid var(--line); background: var(--panel-solid); border-radius: 8px; padding: 4px 6px; color: var(--text); }
.ss-form button { border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); border-radius: 8px; padding: 5px 10px; cursor: pointer; font-size: 12px; }
.ss-form .ss-find { background: rgba(140, 200, 255, 0.18); color: var(--accent); font-weight: 600; }
.ss-custom { display: grid; gap: 6px; margin-top: 8px; padding: 8px; border: 1px dashed var(--line); border-radius: 8px; }
.ss-custom[hidden] { display: none; }
.ss-custom label { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.ss-custom input, .ss-custom select { border: 1px solid var(--line); background: var(--panel-solid); border-radius: 8px; padding: 4px 6px; color: var(--text); max-width: 100%; }
.ss-custom input { width: 8em; }
.ss-custom .note { margin: 0; }
.ss-error { color: #ffb3a0; font-size: 12px; margin: 6px 0 0; }
.ss-progress { color: var(--accent); font-size: 12px; margin: 8px 0 0; }
.ss-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ss-ref { margin-top: 10px; }
.ss-list button {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; width: 100%; text-align: left; line-height: 1.5;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); border-radius: 8px; padding: 6px 8px; cursor: pointer; font-size: 12px;
}
.ss-list button:hover { background: rgba(140, 200, 255, 0.14); }
.ss-list small { color: var(--muted); font-size: 11px; }
.ss-go { margin-left: auto; color: var(--accent); font-size: 11px; white-space: nowrap; }
.ss-stars .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); align-self: center; }
.ss-sub { margin: 10px 0 4px; font-size: 12px; color: var(--muted); }
.era { border-color: rgba(255, 214, 120, 0.3); }
.era-head { display: flex; gap: 10px; align-items: baseline; width: 100%; border: 0; background: none; padding: 0; cursor: pointer; text-align: left; }
.era-head strong { color: var(--accent); font-size: 15px; }
.era-head span { color: var(--muted); font-size: 12px; }
.era-toggle { margin-left: auto; font-size: 11px; color: var(--accent) !important; white-space: nowrap; }
.era-top { display: flex; align-items: center; gap: 8px; }
.era-top .era-head { flex: 1; min-width: 0; }
.era-close { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.08); cursor: pointer; font-size: 16px; line-height: 1; }
.era-body ul { margin: 8px 0 0; padding-left: 18px; line-height: 1.6; }
.era-body h4 { margin: 10px 0 0; font-size: 12px; color: var(--accent); font-weight: 600; }
.detail-epoch {
  margin: 14px 0; padding: 10px 14px; border-radius: 12px; background: rgba(140, 200, 255, 0.07); border: 1px solid rgba(140, 200, 255, 0.25);
}
.detail-epoch h3 { margin: 0 0 4px; font-size: 13px; color: var(--blue); }
.detail-epoch p { margin: 0; font-size: 13px; }
@media (max-width: 720px) {
  .timebar-wrap { top: 8px; left: 8px; max-width: calc(100% - 16px); }
  .timebar-wrap .timebar { width: auto; }
  .year-field input { width: 7.5em; }
  .travel, .era { max-height: 40vh; }
}

/* ---- 衛星 ---- */
.detail-moons { margin: 14px 0; }
.detail-moons h3 { margin: 0 0 8px; font-size: 13px; color: var(--muted); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04);
  border-radius: 999px; padding: 4px 10px; cursor: pointer; font-size: 13px;
}
.chip:hover { background: rgba(140, 200, 255, 0.14); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.card-star.moon::before { box-shadow: 0 0 6px var(--c); }
.search-results .dot.moon { background: var(--c); }

/* ---- このサイトについて・写真と映像 ---- */
.notice-btn { color: #cfe3ff; background: rgba(140, 200, 255, 0.1); }
.notice-btn:hover { background: rgba(140, 200, 255, 0.2); }
.notice-ico { display: none; font-size: 16px; line-height: 1; }
.notice-box ul { padding-left: 20px; margin: 6px 0; }
.notice-box li { margin: 4px 0; }
.src-wrap { overflow-x: auto; margin: 8px 0 4px; }
.src-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 12.5px; line-height: 1.5; }
.src-table th, .src-table td { border: 1px solid rgba(255, 255, 255, 0.14); padding: 6px 8px; text-align: left; vertical-align: top; }
.src-table th { background: rgba(255, 255, 255, 0.07); font-weight: 600; white-space: nowrap; }
.src-table td:first-child { width: 26%; }
.detail-media { margin: 4px 0 14px; display: flex; flex-direction: column; gap: 10px; }
.media-title { margin: 0; font-size: 13px; color: var(--muted); font-weight: 600; }
.media-loading { margin: 0; font-size: 12px; color: var(--muted); }
.media-fig { margin: 0; position: relative; border-radius: 12px; overflow: hidden; background: #000; border: 1px solid var(--line); }
.media-fig img, .media-fig video { display: block; width: 100%; max-height: 300px; object-fit: contain; background: #000; }
.media-fig figcaption { font-size: 11px; color: var(--muted); padding: 6px 10px; background: var(--panel-solid); line-height: 1.5; }
.live-badge {
  position: absolute; top: 8px; left: 8px; font-size: 11px; font-weight: 700; color: #fff;
  background: rgba(220, 50, 50, 0.85); padding: 2px 8px; border-radius: 999px;
}
@media (max-width: 720px) {
  .notice-btn { padding: 7px 10px; }
  .notice-lbl { display: none; }
  .ss-lbl { display: none; }
  .notice-ico { display: inline; }
  .search { flex: 1 1 45%; }
}

/* ---- お気に入り ---- */
.fav-btn {
  border: 0; background: none; cursor: pointer; font-size: 22px; line-height: 1; padding: 0 4px; color: var(--muted); vertical-align: 2px;
}
.fav-btn:hover { color: var(--accent); }
.fav-btn.is-on { color: var(--accent); }
.cat-tabs .cat-fav { color: var(--accent); }
.card.is-fav { border-color: rgba(255, 214, 120, 0.45); }
.card.is-fav .card-name::after { content: " ★"; color: var(--accent); font-size: 12px; }
.fav-item { position: relative; display: flex; }
.fav-item .card { flex: 1; min-width: 0; padding-right: 64px; }
.fav-remove {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%); border: 1px solid var(--line); background: var(--panel-solid);
  border-radius: 8px; padding: 4px 10px; cursor: pointer; font-size: 12px; color: var(--muted);
}
.fav-remove:hover { color: #ffb3a0; border-color: rgba(255, 140, 110, 0.5); }
.list-empty { grid-column: 1 / -1; color: var(--muted); text-align: center; padding: 40px 16px; line-height: 1.8; }

/* ---- 観測記録 ---- */
/* 「発見」タブ: 図鑑の分類と絞り込みは出さない */
#view-list.is-discover .cat-tabs, #view-list.is-discover .filters { display: none; }
.detail-obs { margin: 4px 0 14px; padding: 10px 12px; border-radius: 12px; background: rgba(120, 220, 150, 0.07); border: 1px solid rgba(120, 220, 150, 0.25); }
.detail-obs p { margin: 8px 0 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.obs-btn { background: rgba(120, 220, 150, 0.22) !important; }
.obs-box h2 { margin: 0 0 6px; font-size: 18px; }
.obs-target { display: flex; align-items: center; gap: 8px; font-weight: 600; margin: 0 0 12px; }
.obs-target .dot, .rec .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 12px; font-size: 13px; }
.field > span { color: var(--muted); }
.field input[type="text"], .field input[type="datetime-local"], .field textarea {
  border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 7px 9px; color: var(--text); font: inherit;
}
.obs-loc { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; }
.obs-loc button, .loc-btn { border: 1px solid var(--line); background: rgba(255, 255, 255, 0.05); border-radius: 8px; padding: 4px 10px; cursor: pointer; font-size: 12px; }
.segs { display: flex; flex-wrap: wrap; gap: 6px; }
.seg input { display: none; }
.seg span { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.seg input:checked + span { background: rgba(140, 200, 255, 0.18); border-color: rgba(140, 200, 255, 0.5); }
.obs-check { border-radius: 10px; padding: 8px 12px; margin: 0 0 12px; font-size: 13px; }
.obs-check p { margin: 2px 0; }
.obs-check.is-block { background: rgba(255, 110, 90, 0.12); border: 1px solid rgba(255, 110, 90, 0.4); }
.obs-check.is-warn { background: rgba(255, 214, 120, 0.1); border: 1px solid rgba(255, 214, 120, 0.4); }
/* 空にかざす・ナビ */
#point-btn.is-active { background: rgba(255, 214, 120, 0.2); color: var(--accent); }
.nav-btn {
  width: 100%; margin: 0 0 10px; padding: 9px 12px; border-radius: 12px; cursor: pointer; font-size: 14px; font-weight: 600;
  border: 1px solid rgba(255, 214, 120, 0.45); background: rgba(255, 214, 120, 0.1); color: var(--accent);
}
.nav-bar {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 88px; z-index: 12; width: min(520px, calc(100% - 32px));
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 12px; border-radius: 14px;
  background: var(--panel); border: 1px solid rgba(255, 214, 120, 0.45); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.nav-bar[hidden] { display: none; }
.nav-text { flex: 1 1 200px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.nav-text strong { color: var(--accent); font-size: 14px; }
.nav-bar button { border: 1px solid var(--line); background: rgba(255, 255, 255, 0.05); border-radius: 10px; padding: 7px 12px; cursor: pointer; font-size: 13px; }
@media (max-width: 720px) {
  /* 右の拡大・縮小ボタンにかぶらないように */
  .nav-bar { left: 8px; right: 64px; width: auto; transform: none; bottom: 84px; }
}
/* スマホで続きを見る（QRコード） */
.qr-box { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 10px 0; text-align: center; }
.qr-img { width: 180px; height: 180px; background: #fff; padding: 8px; border-radius: 12px; }
.qr-img svg { width: 100%; height: 100%; display: block; }
.qr-box p { margin: 0; }
.qr-warn { color: #ffd27a; font-size: 12px; }
.qr-url { color: var(--muted); font-size: 11px; word-break: break-all; }
.ss-qr { margin: 10px 0 0; width: 100%; border: 1px solid rgba(255, 214, 120, 0.45); background: rgba(255, 214, 120, 0.1); color: var(--accent); border-radius: 10px; padding: 7px 10px; cursor: pointer; font-size: 13px; font-weight: 600; }
.toast {
  position: fixed; left: 50%; bottom: 48px; transform: translateX(-50%); z-index: 60; max-width: calc(100vw - 32px);
  background: #1d2a1f; border: 1px solid rgba(120, 220, 150, 0.5); color: var(--text); padding: 10px 16px; border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); font-size: 14px;
}
.obs-page { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 14px; }
.obs-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: rgba(255, 255, 255, 0.03); }
.obs-card h3 { margin: 0 0 10px; font-size: 15px; }
.obs-card h3 small { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 6px; }
.muted { color: var(--muted); font-size: 13px; }
.mission { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.mission-no { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(140, 200, 255, 0.15); font-weight: 700; flex: none; }
.mission.is-done .mission-no { background: rgba(120, 220, 150, 0.3); }
.mission-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 180px; }
.mission-text span { font-size: 12px; color: var(--muted); }
.mission-actions { display: flex; gap: 6px; }
.sky-event { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.sky-event-icon { font-size: 22px; width: 30px; text-align: center; flex: none; }
.sky-event-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.sky-event-text small { color: var(--accent); font-size: 11px; }
.sky-event-text span { font-size: 12px; color: var(--muted); line-height: 1.5; }
.sky-event button { border: 1px solid var(--line); background: rgba(255, 255, 255, 0.05); border-radius: 8px; padding: 6px 10px; cursor: pointer; font-size: 12px; flex: none; }
.sky-event-note { margin: 8px 0 0; font-size: 11px; }
.mission-actions button { border: 1px solid var(--line); background: rgba(255, 255, 255, 0.05); border-radius: 8px; padding: 6px 10px; cursor: pointer; font-size: 12px; width: auto; }
.prog { display: grid; grid-template-columns: 7.5em 1fr 4.5em; align-items: center; gap: 10px; margin: 6px 0; font-size: 13px; }
.prog .bar { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.prog .bar i { display: block; height: 100%; background: linear-gradient(90deg, #7fd3a0, #ffd678); }
.prog b { text-align: right; font-variant-numeric: tabular-nums; }
.journey { font-size: 13px; color: var(--muted); margin: 10px 0 0; line-height: 1.6; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.badge { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); opacity: 0.55; }
.badge.is-on { opacity: 1; border-color: rgba(255, 214, 120, 0.5); background: rgba(255, 214, 120, 0.07); }
.badge span { font-size: 18px; }
.badge b { font-size: 13px; }
.badge small { font-size: 11px; color: var(--muted); line-height: 1.4; }
.rec { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); }
.rec-main { flex: 1; display: flex; align-items: flex-start; gap: 10px; text-align: left; border: 0; background: none; padding: 10px 0; cursor: pointer; min-width: 0; }
.rec-main .dot { margin-top: 5px; }
.rec-main > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rec-main small { color: var(--muted); font-size: 12px; }
.rec-main em { font-style: normal; font-size: 12px; color: #c9d3f0; }
.rec-del { border: 0; background: none; cursor: pointer; font-size: 16px; opacity: 0.6; padding: 6px; }
.rec-del:hover { opacity: 1; }
@media (max-width: 720px) {
  .prog { grid-template-columns: 6.5em 1fr 4em; }
}

/* ---- 無料版・おうちの人へ・観測ノート ---- */
.obs-remaining { font-size: 12px; color: var(--accent); margin: 6px 0 0; }
.obs-card.locked { border-style: dashed; }
.obs-card.locked h3 { color: var(--muted); }
.ghost {
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); border-radius: 10px; padding: 8px 12px;
  cursor: pointer; font-size: 13px; color: var(--text);
}
.ghost:hover { background: rgba(140, 200, 255, 0.12); }
.ghost:disabled, .primary:disabled { opacity: 0.5; cursor: not-allowed; }
.parent-link { text-align: center; margin: 4px 0 0; }
.gate-q { font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.gate-q input { width: 6em; font-size: 20px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.parent-sec { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.parent-sec h3 { margin: 0; }
.parent-sec ul { margin: 0; padding-left: 20px; }
.parent-sec.dev { opacity: 0.8; }
.gate-link { font-size: 12px; color: var(--muted); word-break: break-all; }
.pc-url { font-size: 12px; padding: 5px 8px; border-radius: 8px; background: rgba(255, 255, 255, 0.06); word-break: break-all; user-select: all; }
.pc-card p { margin: 0; }
.prof-list { list-style: none; padding: 0 !important; display: flex; flex-direction: column; gap: 6px; }
.prof-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.prof-list input, #prof-new { border: 1px solid var(--line); background: var(--panel-solid); border-radius: 8px; padding: 5px 8px; color: var(--text); width: 11em; }
.prof-list button:disabled { opacity: 0.45; cursor: not-allowed; }
.who-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.who-chips button { border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); border-radius: 999px; padding: 6px 14px; cursor: pointer; font-size: 14px; }
.who-chips button small { margin-left: 6px; color: var(--muted); font-size: 11px; }
.who-chips button.is-active { background: rgba(140, 200, 255, 0.18); border-color: rgba(140, 200, 255, 0.5); color: var(--accent); font-weight: 600; }
.parent-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.parent-actions button, .file-btn {
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.05); border-radius: 10px; padding: 8px 12px; cursor: pointer; font-size: 13px;
}
.notebook-box { width: min(720px, 100%); }
.note-day { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.note-day h3 { margin: 0 0 6px; color: var(--accent); font-size: 14px; }
.note-day ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.note-day li { display: flex; gap: 12px; }
.note-time { flex: none; width: 3.5em; color: var(--muted); font-variant-numeric: tabular-nums; }
.note-day li div { display: flex; flex-direction: column; gap: 1px; }
.note-day small { color: var(--muted); font-size: 12px; }
.note-day em { font-style: normal; font-size: 13px; }

/* 観測ノートの印刷: ノートだけを白い紙に印刷する */
@media print {
  body { background: #fff !important; color: #000 !important; overflow: visible !important; display: block !important; }
  body > *:not(#notebook-modal) { display: none !important; }
  #notebook-modal { position: static !important; background: none !important; display: block !important; padding: 0 !important; }
  #notebook-modal .modal-box { max-height: none !important; overflow: visible !important; box-shadow: none !important; border: 0 !important; background: #fff !important; color: #000 !important; width: 100% !important; }
  #notebook-modal .detail-close, #notebook-modal .no-print { display: none !important; }
  #notebook-modal .muted, #notebook-modal small, .note-time { color: #444 !important; }
  .note-day h3 { color: #000 !important; }
  .note-day { break-inside: avoid; }
}

/* ---- ゲーム ---- */
#view-game { overflow-y: auto; padding: 16px 16px 60px; }
#game { max-width: 720px; margin: 0 auto; }
.game-menu h2 { margin: 0 0 4px; }
.game-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-top: 14px; background: rgba(255, 255, 255, 0.03); }
.game-card h3 { margin: 0 0 4px; }
.game-levels { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.game-levels .ghost { display: flex; flex-direction: column; align-items: center; min-width: 96px; }
.game-levels small { color: var(--accent); font-size: 11px; }
.game-mode { min-width: 6em; font-weight: 600; color: var(--blue); }
.quiz-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.quiz-head span { color: var(--muted); font-size: 13px; }
.quiz-score { margin-left: auto; color: var(--accent) !important; font-weight: 700; }
.quiz-q { margin: 6px 0 10px; font-size: 18px; }
.quiz-canvas { width: 100%; height: min(52vh, 420px); border-radius: 14px; border: 1px solid var(--line); display: block; }
.quiz-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.choice, .pair-card {
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); border-radius: 12px; padding: 12px; cursor: pointer;
  font-size: 15px; font-weight: 600; color: var(--text);
}
.choice:hover:not(:disabled), .pair-card:hover:not(:disabled) { background: rgba(140, 200, 255, 0.14); }
.choice:disabled, .pair-card:disabled { cursor: default; }
.is-right { border-color: rgba(120, 220, 150, 0.8) !important; background: rgba(120, 220, 150, 0.18) !important; }
.is-wrong { border-color: rgba(255, 110, 90, 0.8) !important; background: rgba(255, 110, 90, 0.15) !important; }
.pair { display: flex; align-items: stretch; gap: 10px; }
.pair-card { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 10px; }
.pair-card small { color: var(--muted); font-weight: 400; font-size: 12px; }
.pair-card b { color: var(--accent); font-size: 14px; }
.pair-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--c); box-shadow: 0 0 14px var(--c); }
.pair-vs { align-self: center; color: var(--muted); font-weight: 700; }
.quiz-feedback { margin-top: 14px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); }
.quiz-feedback.ok { border-color: rgba(120, 220, 150, 0.5); background: rgba(120, 220, 150, 0.07); }
.quiz-feedback.ng { border-color: rgba(255, 110, 90, 0.4); background: rgba(255, 110, 90, 0.06); }
.quiz-feedback p { margin: 4px 0; line-height: 1.6; }
.quiz-result { font-size: 18px; font-weight: 700; }
.quiz-next { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; flex-wrap: wrap; }
.quiz-next .primary { width: auto; padding: 10px 18px; }
.quiz-end { text-align: center; padding-top: 30px; }
.quiz-end .quiz-next { justify-content: center; }
.quiz-big { font-size: 28px; font-weight: 800; color: var(--accent); margin: 8px 0; }
.quiz-best { color: var(--accent); font-weight: 700; }
@media (max-width: 720px) {
  .tabs .tab { padding: 6px 8px; font-size: 14px; }
}

/* ---- くらべてみよう ---- */
.detail-kid { margin: 14px 0; padding: 12px 14px; border-radius: 12px; background: rgba(140, 200, 255, 0.07); border: 1px solid rgba(140, 200, 255, 0.25); }
.detail-kid h3 { margin: 0 0 6px; font-size: 14px; color: var(--blue); }
.detail-kid ul { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.7; }

/* iPhone の Safari は、文字が 16px より小さい入力欄を押すと画面を拡大する。指で押す端末では 16px にそろえる */
@media (pointer: coarse) {
  input, select, textarea { font-size: 16px !important; }
}

/* ---- メニュー（右上の ☰）---- */
.menu-wrap { position: relative; flex: none; }
.menu-btn { display: inline-flex; gap: 6px; align-items: center; }
.menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 220px; display: flex; flex-direction: column; padding: 6px;
  background: var(--panel-solid); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}
.menu[hidden] { display: none; }
.menu button { text-align: left; border: 0; background: none; padding: 10px 12px; border-radius: 8px; cursor: pointer; font-size: 14px; white-space: nowrap; }
.menu button:hover, .menu button:focus-visible { background: rgba(140, 200, 255, 0.12); }
@media (max-width: 720px) {
  /* スマホでは ☰ がタイトルの横（左）に来るので、メニューは左そろえで出す */
  .menu { right: auto; left: 0; }
}

/* ---- プラネタリウムをさがす ---- */
#view-places { overflow-y: auto; padding: 16px 16px 60px; }
.places { max-width: 1000px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.places h2 { margin: 0; }
.places p { margin: 0; }
.places-map { position: relative; height: min(52vh, 460px); border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
/* 1本指のスクロールはページに渡す（地図は2本指で動かす） */
.places-map canvas { width: 100%; height: 100%; display: block; touch-action: pan-x pan-y; cursor: grab; }
.places-hint {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
  background: rgba(5, 8, 18, 0.55); color: #fff; font-size: 15px; font-weight: 600;
}
.places-hint[hidden] { display: none; }
.places-zoom { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 6px; }
.places-zoom button { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; font-size: 16px; }
.places-credit { position: absolute; left: 8px; bottom: 6px; font-size: 10px; color: var(--muted); background: rgba(5, 8, 18, 0.6); padding: 2px 6px; border-radius: 6px; }
.places-credit a { color: inherit; }
.places-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.places-filters input, .places-filters select { border: 1px solid var(--line); background: var(--panel-solid); border-radius: 10px; padding: 8px 10px; color: var(--text); }
.places-filters input { flex: 1 1 200px; }
.places-filters select { flex: 1 1 180px; max-width: 100%; }
.places-filters button { border: 1px solid var(--line); background: rgba(255, 255, 255, 0.05); border-radius: 10px; padding: 8px 12px; cursor: pointer; }
.places-filters button.is-active { background: rgba(140, 200, 255, 0.18); border-color: rgba(140, 200, 255, 0.5); color: var(--accent); }
.places-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.places-list li { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, 0.03); }
.places-list li { cursor: pointer; }
.places-list li.is-sel { border-color: rgba(255, 214, 120, 0.7); background: rgba(255, 214, 120, 0.08); }
.places-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 220px; }
.places-name small { color: var(--muted); font-size: 12px; }
.places-dist { color: var(--accent); }
.places-actions { display: flex; gap: 8px; align-items: center; }
.places-actions button, .places-actions a { border: 1px solid var(--line); background: rgba(255, 255, 255, 0.05); border-radius: 8px; padding: 6px 10px; cursor: pointer; font-size: 12px; color: var(--text); text-decoration: none; }
.places-more { justify-content: center !important; }
.places-more button { border: 1px solid var(--line); background: none; border-radius: 10px; padding: 8px 14px; cursor: pointer; }
.places-note { font-size: 12px; }

/* ---- タブごとの色（星図はそのまま。ほかのタブは、上にうっすら色を入れて、下で背景の黒に溶けこませる）----
   太陽系: だいだい（js/orrery.js の背景も同じ色）／ 図鑑: 青緑 ／ 見つけた: 緑 ／ クイズ: むらさき ／ プラネタリウム: 青 */
#view-list { background: linear-gradient(180deg, rgba(90, 200, 190, 0.11), rgba(4, 7, 15, 0) 45%), var(--bg); }
#view-list.is-discover { background: linear-gradient(180deg, rgba(130, 220, 150, 0.11), rgba(4, 7, 15, 0) 45%), var(--bg); }
#view-game { background: linear-gradient(180deg, rgba(190, 140, 255, 0.12), rgba(4, 7, 15, 0) 45%), var(--bg); }
#view-places { background: linear-gradient(180deg, rgba(110, 160, 255, 0.12), rgba(4, 7, 15, 0) 45%), var(--bg); }
.tab[data-view="solar"].is-active { background: rgba(255, 170, 90, 0.2); }
.tab[data-view="list"].is-active { background: rgba(90, 200, 190, 0.2); }
.tab[data-view="discover"].is-active { background: rgba(130, 220, 150, 0.2); }
.tab[data-view="game"].is-active { background: rgba(190, 140, 255, 0.22); }

/* 「かざす」のアイコン（空に向けたスマホと星） */
#point-btn { display: inline-flex; align-items: center; gap: 4px; }
#point-btn .point-ico { flex: none; }
#point-btn .point-star { color: var(--accent); }
