/* 月相变化特有样式（通用样式见 ../shared/base.css） */

#sky { position: absolute; inset: 0; touch-action: pan-y; }
#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; }
.presets.four { grid-template-columns: 1fr 1fr; margin: 6px 0 4px; }
.presets button, .phases button { font: inherit; font-size: 13px; color: var(--text); background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 0; cursor: pointer; }
.presets button:hover, .phases button:hover { border-color: var(--accent); }
.presets button.on, .phases button.on { border-color: var(--accent); background: rgba(255,201,74,.14); }

.phases { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.phases button { padding: 4px 0; line-height: 1.25; }
.phases button b { display: block; font-size: 13px; font-weight: 600; }
.phases button small { font-size: 11px; color: var(--muted); }

#panel .slider { grid-template-columns: 40px 1fr 104px; }
#panel .row { grid-template-columns: 44px 1fr; margin: 8px 0; }
.presets button:disabled { opacity: .45; cursor: default; font-size: 12px; }
#panel .row.play { grid-template-columns: auto auto 1fr; }
#playBtn { min-width: 76px; }
#playBtn.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: 4px; 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; }

/* 地球上看到的月亮 */
#inset { position: absolute; left: 12px; bottom: 12px; width: 210px; z-index: 3; pointer-events: none;
  background: rgba(8,11,18,.88); border: 1px solid var(--line); border-radius: 10px; }
.inset-head { display: flex; justify-content: space-between; gap: 6px; padding: 6px 10px 0; font-size: 12px; color: var(--muted); }
#insetDay { color: var(--accent); }
#insetCanvas { display: block; width: 210px; height: 170px; }
.inset-foot { padding: 0 10px 7px; font-size: 11px; color: var(--muted); text-align: center; }

#resetView { position: absolute; right: 12px; bottom: 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 small { color: var(--muted); font-size: 11px; }
.lbl-sun { color: var(--accent); font-size: 13px; font-weight: 600; }
.lbl-ray { color: var(--accent); opacity: .85; }
.lbl-body { font-weight: 600; }
.lbl-pole { font-size: 11px; color: #9fb3c8; }
.lbl-phase { pointer-events: auto; cursor: pointer; text-align: center; padding: 2px 7px; border-radius: 8px; line-height: 1.3;
  background: rgba(17,23,35,.78); border: 1px solid var(--line); }
.lbl-phase b { color: var(--accent); font-size: 12px; }
.lbl-phase small { display: block; }
.lbl-phase:hover { border-color: var(--accent); }

/* 练习 */
#quizBar { position: absolute; left: 50%; bottom: 52px; transform: translateX(-50%); z-index: 3; width: min(520px, 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: 150px; left: 8px; top: 84px; bottom: auto; }
  #insetCanvas { width: 150px; height: 120px; }
  .inset-head { padding: 4px 8px 0; font-size: 11px; }
  #insetTitle { display: none; }
  #resetView { top: 84px; bottom: auto; }
  #quizBar { bottom: 44px; }
  .lbl-phase { font-size: 11px; padding: 1px 5px; }
}
