/* 日食和月食特有样式（通用样式见 ../shared/base.css） */

#view { position: absolute; inset: 0; touch-action: none; }
#gl { position: absolute; inset: 0; touch-action: none; }
[hidden] { display: none !important; }

.ok { color: #7ee081; }
.bad { color: #ff7a59; }

#panel h2 .h2s { font-size: 11px; color: var(--muted); font-weight: normal; margin-left: 6px; letter-spacing: 0; }

/* 读数 */
.readout .big { font-size: 18px; }
.kind { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; border: 1px solid currentColor; color: var(--accent); }
.kind:empty { display: none; }
.readout .tip { font-size: 12px; color: var(--accent); margin-top: 4px; min-height: 18px; }
.readout dd { font-variant-numeric: tabular-nums; }
.readout dt { white-space: nowrap; }

.presets { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin: 4px 0 8px; }
.presets.four { grid-template-columns: 1fr 1fr; }
.presets button, .contacts button, .years button, .ecl-list button { font: inherit; font-size: 13px; color: var(--text); background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 0; cursor: pointer; }
.presets button:hover, .contacts button:hover, .years button:hover, .ecl-list button:hover { border-color: var(--accent); }
.presets button.on, .contacts button.on, .years button.on, .ecl-list button.on { border-color: var(--accent); background: rgba(255,201,74,.14); }
.presets button:disabled { opacity: .45; cursor: default; font-size: 12px; }

.contacts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 4px 0 10px; }
.contacts button { font-size: 12px; padding: 4px 0; }
.contacts:empty { display: none; }
.years { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-bottom: 6px; }
.years button { font-size: 12px; padding: 4px 0; }
.ecl-list { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 4px 0 8px; }
.ecl-list button { font-size: 12px; padding: 4px 6px; text-align: left; }
.ecl-list button b { font-weight: 600; margin-right: 4px; }
.ecl-list button.solar b { color: var(--accent); }
.ecl-list button.lunar b { color: #ff9e86; }

#panel .slider { grid-template-columns: 60px 1fr 100px; }
#panel .row { grid-template-columns: 44px 1fr; margin: 8px 0; }
#panel .row.play { grid-template-columns: auto auto 1fr; }
#playSolar, #playLunar, #playYear { min-width: 76px; }
#playSolar.on, #playLunar.on, #playYear.on { color: #111; background: var(--accent); border-color: var(--accent); }
.seg.wide { display: flex; width: 100%; }
.seg.wide button { flex: 1; font-size: 12px; padding: 5px 0; }
.checks { margin-top: 8px; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

.key { list-style: none; padding: 0; margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.key li { margin: 3px 0; }
.key i { display: inline-block; width: 14px; height: 8px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }

.cmp { width: 100%; border-collapse: collapse; font-size: 12px; }
.cmp th, .cmp td { padding: 4px 6px; border: 1px solid var(--line); text-align: left; }
.cmp th { color: var(--muted); font-weight: 600; background: var(--panel-2); }
.cmp td:first-child { white-space: nowrap; color: var(--muted); }

/* 观察者看到的太阳 */
#inset { position: absolute; left: 12px; bottom: 12px; width: 220px; z-index: 3;
  background: rgba(8,11,18,.88); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; pointer-events: none; }
.inset-head { display: flex; justify-content: space-between; gap: 6px; padding: 6px 10px; font-size: 12px; color: var(--muted); }
#insetType { color: var(--accent); font-weight: 600; }
#insetCanvas { display: block; width: 220px; height: 150px; }
.inset-foot { padding: 5px 10px 7px; font-size: 11px; color: var(--muted); text-align: center; }

/* 一年的朔望时间轴 */
#yearBox { position: absolute; left: 12px; right: 12px; bottom: 44px; z-index: 3; height: 108px;
  background: rgba(8,11,18,.85); border: 1px solid var(--line); border-radius: 10px; }
#yearBar { display: block; width: 100%; height: 100%; cursor: pointer; touch-action: none; }

#no3d { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 3; width: min(420px, calc(100% - 32px));
  padding: 12px 16px; font-size: 13px; color: var(--muted); text-align: center;
  background: rgba(17,23,35,.85); border: 1px solid var(--line); border-radius: 10px; }

#resetView { position: absolute; right: 12px; top: 12px; z-index: 3; font: inherit; font-size: 13px;
  padding: 6px 12px; color: var(--text); background: rgba(17,23,35,.85); border: 1px solid var(--line);
  border-radius: 999px; cursor: pointer; }
#resetView:hover { border-color: var(--accent); color: var(--accent); }

/* 3D 标签 */
.lbl { font-size: 12px; color: #fff; white-space: nowrap; pointer-events: none; text-shadow: 0 0 3px #000, 0 0 6px #000; }
.lbl-sun { color: var(--accent); font-size: 13px; font-weight: 600; }
.lbl-body { font-weight: 600; }
.lbl-plane { color: var(--muted); font-size: 11px; }
.lbl-cyan { color: #4fc3f7; }
.lbl-node { color: var(--accent); font-size: 11px; }
.lbl-season { color: var(--accent); font-weight: 600; }

/* 练习 */
#quizBar { position: absolute; left: 50%; bottom: 44px; transform: translateX(-50%); z-index: 3; width: min(560px, calc(100% - 24px));
  padding: 10px 12px; border-radius: 12px; background: rgba(17,23,35,.92); border: 1px solid var(--line); }
#quizQ { margin: 0 0 6px; font-size: 14px; font-weight: 600; }
#quizMsg { margin: 0 0 6px; font-size: 13px; line-height: 1.6; }
#quizMsg:empty { display: none; }
#quizMsg b { margin-right: 4px; }
.answer { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.answer button { padding: 7px 4px; font-size: 13px; }
.answer button:disabled { opacity: .55; cursor: default; }
.answer button.on { opacity: 1; border-color: #7ee081; color: #7ee081; }
.answer button.no { opacity: 1; border-color: #ff7a59; color: #ff7a59; }
#quizBar .btns { justify-content: flex-end; margin-top: 8px; }

@media (max-width: 760px) {
  #inset { width: 160px; left: 8px; top: 84px; bottom: auto; }
  #insetCanvas { width: 160px; height: 110px; }
  .inset-head { padding: 4px 8px; font-size: 11px; }
  .inset-head span:first-child { display: none; }
  #resetView { top: 84px; }
  #yearBox { bottom: 40px; height: 104px; left: 8px; right: 8px; }
  #quizBar { bottom: 40px; }
}
