/* урокиастрономии.рф — небесный симулятор.
 * Гарнитуры системные: Google Fonts школьные сети режут, и без шрифта
 * подписи на карте разъезжались бы. */
:root {
  --bg: #03060d;
  --panel: #0b1426;
  --panel-2: #111d35;
  --line: #1d2b48;
  --ink: #e6edf8;
  --ink-2: #a9b7d0;
  --ink-3: #6f7f9c;
  --accent: #5aa2ff;
  --gold: #ffd36b;
  --radius: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.app { display: grid; grid-template-columns: 1fr 340px; grid-template-rows: auto 1fr; height: 100vh; height: 100dvh; }
.topbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding: 10px 18px; border-bottom: 1px solid var(--line); min-width: 0; }
.brand { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: .2px; white-space: nowrap; }
.brand span { color: var(--accent); }
.topbar-now { margin-left: auto; color: var(--ink-2); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

.stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; touch-action: none; }
#sky { display: block; width: 100%; height: 100%; cursor: grab; }
#sky.dragging { cursor: grabbing; }

.hint { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; align-items: center;
  background: rgba(11, 20, 38, .92); border: 1px solid var(--line); border-radius: 999px; padding: 6px 6px 6px 16px; font-size: 14px; max-width: calc(100% - 24px); }
.hint button { white-space: nowrap; }

.zoom { position: absolute; right: 14px; bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.zoom button { width: 40px; height: 40px; font-size: 20px; padding: 0; border-radius: 50%; }

.tip { position: absolute; pointer-events: none; z-index: 5; max-width: 260px; background: rgba(11, 20, 38, .96); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 12px; font-size: 13px; line-height: 1.45; color: var(--ink-2); box-shadow: 0 6px 24px rgba(0,0,0,.4); }
.tip b { color: var(--ink); font-size: 14px; }

.panel { background: var(--panel); border-left: 1px solid var(--line); overflow-y: auto; padding: 6px 16px 20px; min-height: 0; }
.block { border-bottom: 1px solid var(--line); padding: 12px 0; }
.block h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: 0 0 10px; font-weight: 600; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.row > select, .row > input { flex: 1 1 120px; min-width: 0; }
.buttons { gap: 6px; }
.label { color: var(--ink-3); font-size: 13px; }
.coords { color: var(--ink-3); font-size: 12px; }

button, select, input[type=date], input[type=time] {
  font: inherit; font-size: 14px; color: var(--ink); background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 9px; padding: 7px 10px; }
button { cursor: pointer; }
button:hover { border-color: var(--accent); }
button.on { background: var(--accent); border-color: var(--accent); color: #04101f; }
input[type=date], input[type=time] { color-scheme: dark; }
input[type=range] { width: 100%; accent-color: var(--accent); margin: 2px 0 10px; }
label { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ink-2); padding: 3px 0; cursor: pointer; }
label input { accent-color: var(--accent); }

.sun { font-size: 13px; color: var(--ink-2); margin-bottom: 8px; line-height: 1.5; }
.visible { list-style: none; margin: 0; padding: 0; }
.visible li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: 14px; border-top: 1px dashed var(--line); }
.visible li:first-child { border-top: 0; }
.visible .what { color: var(--ink); }
.visible .where { color: var(--ink-3); font-size: 13px; text-align: right; }
.visible .below .what { color: var(--ink-3); }
.note { color: var(--ink-3); font-size: 12.5px; line-height: 1.55; margin: 14px 0 0; }

/* Телефон: карта сверху квадратом, панель под ней. */
@media (max-width: 800px) {
  .app { grid-template-columns: 1fr; grid-template-rows: auto auto auto; height: auto; }
  .stage { height: min(100vw, 72vh); }
  .panel { border-left: 0; border-top: 1px solid var(--line); overflow: visible; }
  .topbar { padding: 8px 14px; }
  .brand { font-size: 16px; }
  .topbar-now { font-size: 12.5px; }
}
