/* ==========================================================================
   太阳系表面视角 / Surface view
   ========================================================================== */

body.surface-active { overflow: hidden; }

.surface-view {
  position: fixed;
  inset: 0;
  z-index: 300;
  overflow: hidden;
  background: #030609;
  color: #f2eee4;
  isolation: isolate;
  opacity: 0;
  animation: surface-in .55s cubic-bezier(.22, 1, .36, 1) forwards;
}
.surface-view.is-closing { animation: surface-out .35s ease forwards; }
@keyframes surface-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes surface-out { from { opacity: 1; } to { opacity: 0; } }
.surface-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
}
.surface-canvas.is-dragging { cursor: grabbing; }
.surface-grain {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.018) 0, rgba(255,255,255,.018) 1px, transparent 1px, transparent 3px),
    radial-gradient(ellipse at 50% 45%, transparent 35%, rgba(0,0,0,.28) 100%);
  mix-blend-mode: soft-light;
  opacity: .35;
}
.surface-view::after {
  content: "";
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(180deg, rgba(2,5,8,.62) 0%, transparent 22%, transparent 68%, rgba(2,5,8,.6) 100%);
}

/* Topbar ------------------------------------------------------------------- */

.surface-topbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 10;
  height: 80px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  pointer-events: none;
}
.surface-brand { display: flex; align-items: center; gap: 10px; pointer-events: auto; }
.surface-brand-mark {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid rgba(232, 216, 187, .4); border-radius: 50%;
  color: rgba(239, 222, 192, .95);
  font-size: 12px;
  box-shadow: 0 0 24px rgba(229, 200, 151, .12) inset;
}
.surface-brand > span:last-child { display: flex; flex-direction: column; gap: 3px; }
.surface-brand b { font-size: 12.5px; font-weight: 500; letter-spacing: .1em; color: rgba(247,242,231,.97); }
.surface-brand small { font-family: var(--mono); font-size: 5.5px; letter-spacing: .16em; color: rgba(187,187,175,.64); }
.surface-top-actions { display: flex; align-items: center; gap: 12px; pointer-events: auto; }
.surface-live {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 6.5px; letter-spacing: .08em;
  color: rgba(207, 201, 186, .7);
}
.surface-live i { width: 5px; height: 5px; border-radius: 50%; background: #d9b980; box-shadow: 0 0 9px rgba(217,185,128,.8); }
.surface-exit {
  display: flex; align-items: center; gap: 8px;
  height: 33px; padding: 0 12px;
  border: 1px solid rgba(242,238,227,.2); border-radius: 999px;
  background: rgba(6,10,13,.38);
  color: rgba(241,235,223,.88);
  font-family: var(--mono); font-size: 7.5px;
  letter-spacing: .04em;
  backdrop-filter: blur(12px);
  transition: border-color .2s ease, background .2s ease, color .2s ease;
  cursor: pointer;
}
.surface-exit span { font-size: 12px; opacity: .6; }
.surface-exit:hover { border-color: rgba(217,185,128,.6); background: rgba(217,185,128,.09); color: #fff8e9; }

/* Title -------------------------------------------------------------------- */

.surface-title {
  position: absolute; left: 30px; top: 104px; z-index: 6;
  width: min(395px, 35vw);
  pointer-events: none;
  text-shadow: 0 2px 30px rgba(0,0,0,.38);
}
.surface-kicker {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 6.5px; letter-spacing: .14em;
  color: rgba(230, 211, 179, .78);
}
.surface-kicker i { width: 5px; height: 5px; border-radius: 50%; background: #d9b980; box-shadow: 0 0 8px rgba(217,185,128,.8); }
.surface-title h1 {
  margin: 13px 0 0;
  font-family: var(--serif);
  font-size: clamp(38px, 4vw, 56px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: .03em;
  color: rgba(250,246,236,.98);
}
.surface-title h1 em {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-size: .43em;
  letter-spacing: .12em;
  color: rgba(227, 201, 160, .9);
}
.surface-en { display: block; margin-top: 8px; font-family: var(--mono); font-size: 6.5px; letter-spacing: .13em; color: rgba(201,197,183,.64); }
.surface-title > p {
  margin: 15px 0 0;
  max-width: 350px;
  font-size: 10.5px;
  line-height: 1.72;
  color: rgba(218,215,203,.76);
}

/* Sky labels --------------------------------------------------------------- */

.surface-labels { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.surface-sky-label {
  position: absolute;
  display: flex; align-items: center; gap: 6px;
  transform: translate(10px, -50%);
  padding: 6px 8px;
  border: 1px solid rgba(230,225,210,.18);
  border-radius: 999px;
  background: rgba(4,8,11,.26);
  color: rgba(238,234,223,.9);
  font-family: var(--mono); font-size: 7px;
  letter-spacing: .04em;
  opacity: 0;
  visibility: hidden;
  pointer-events: auto;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: opacity .25s ease, border-color .2s ease, background .2s ease;
  white-space: nowrap;
}
.surface-sky-label.is-visible { opacity: 1; visibility: visible; }
.surface-sky-label i { width: 5px; height: 5px; border-radius: 50%; background: var(--label-color, #dce8e8); box-shadow: 0 0 8px var(--label-color, #dce8e8); }
.surface-sky-label:hover { border-color: color-mix(in srgb, var(--label-color, #dce8e8) 60%, transparent); background: rgba(4,8,11,.56); }

/* Crosshair ---------------------------------------------------------------- */

.surface-crosshair {
  position: absolute; left: 50%; top: 50%; z-index: 4;
  width: 38px; height: 38px;
  transform: translate(-50%, -50%);
  opacity: .48;
  pointer-events: none;
}
.surface-crosshair::before, .surface-crosshair::after {
  content: ""; position: absolute; background: rgba(244,238,225,.66);
}
.surface-crosshair::before { left: 50%; top: 8px; width: 1px; height: 22px; transform: translateX(-50%); }
.surface-crosshair::after { top: 50%; left: 8px; width: 22px; height: 1px; transform: translateY(-50%); }
.surface-crosshair span {
  position: absolute; left: 50%; top: 50%; width: 4px; height: 4px;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: rgba(244,238,225,.9);
  box-shadow: 0 0 9px rgba(244,238,225,.5);
}

/* Readout ------------------------------------------------------------------ */

.surface-readout {
  position: absolute; left: 28px; right: 28px; bottom: 47px; z-index: 8;
  display: grid; grid-template-columns: 1.05fr 1fr 1fr .9fr .9fr 1fr;
  gap: 0;
  max-width: 790px;
  border-top: 1px solid rgba(238,232,218,.17);
}
.surface-readout > div {
  display: flex; flex-direction: column; gap: 5px;
  padding: 10px 12px 0 0;
  border-right: 1px solid rgba(238,232,218,.08);
}
.surface-readout > div:not(:first-child) { padding-left: 12px; }
.surface-readout > div:last-child { border-right: 0; }
.surface-readout span { font-family: var(--mono); font-size: 5.5px; letter-spacing: .06em; color: rgba(185,186,174,.62); }
.surface-readout strong { font-family: var(--mono); font-size: 8px; font-weight: 400; color: rgba(239,233,220,.9); white-space: nowrap; }

/* Actions / hint ----------------------------------------------------------- */

.surface-actions {
  position: absolute; right: 28px; bottom: 43px; z-index: 9;
  display: flex; align-items: center; gap: 5px;
}
.surface-actions button {
  height: 31px; padding: 0 10px;
  border: 1px solid rgba(238,232,218,.16);
  border-radius: 2px;
  background: rgba(4,8,11,.32);
  color: rgba(228,224,211,.82);
  font-family: var(--mono); font-size: 6.5px; letter-spacing: .04em;
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}
.surface-actions button:hover { border-color: rgba(217,185,128,.55); color: rgba(255,244,224,.96); background: rgba(217,185,128,.08); }
.surface-actions button:disabled { opacity: .28; cursor: default; }
.surface-hint {
  position: absolute; left: 50%; bottom: 19px; z-index: 9;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 5.5px; letter-spacing: .05em;
  color: rgba(178,178,165,.52);
  white-space: nowrap;
  pointer-events: none;
}
.surface-hint i { width: 12px; height: 1px; background: rgba(235,228,212,.2); }
.surface-credit {
  position: absolute; right: 28px; bottom: 18px; z-index: 9;
  font-family: var(--mono); font-size: 5px; letter-spacing: .05em;
  color: rgba(138,141,131,.42);
  pointer-events: none;
}

/* Readout layering on narrow screens --------------------------------------- */

@media (max-width: 1100px) {
  .surface-title { width: min(350px, 40vw); }
  .surface-readout { max-width: 690px; grid-template-columns: repeat(3, 1fr); }
  .surface-readout > div:nth-child(4) { border-left: 0; padding-left: 0; border-top: 1px solid rgba(238,232,218,.08); }
  .surface-readout > div:nth-child(5) { border-top: 1px solid rgba(238,232,218,.08); }
  .surface-readout > div:nth-child(6) { border-top: 1px solid rgba(238,232,218,.08); }
}

@media (max-width: 900px) {
  .surface-topbar { height: 62px; padding: 0 14px; }
  .surface-brand-mark { width: 29px; height: 29px; font-size: 10px; }
  .surface-brand b { font-size: 10.5px; }
  .surface-brand small { font-size: 4.5px; }
  .surface-live { display: none; }
  .surface-exit { height: 30px; padding: 0 9px; font-size: 6.5px; }
  .surface-title { top: 78px; left: 16px; width: min(320px, 78vw); }
  .surface-title h1 { font-size: 36px; }
  .surface-title > p { max-width: 290px; font-size: 9.5px; line-height: 1.65; }
  .surface-en { font-size: 5.5px; }
  .surface-readout {
    left: 14px; right: 14px; bottom: 111px;
    grid-template-columns: repeat(3, 1fr);
    max-width: none;
  }
  .surface-readout > div { padding-top: 7px; }
  .surface-readout > div:not(:first-child) { padding-left: 8px; }
  .surface-readout > div:nth-child(4), .surface-readout > div:nth-child(5), .surface-readout > div:nth-child(6) { border-top: 1px solid rgba(238,232,218,.08); }
  .surface-readout > div:nth-child(4) { padding-left: 0; }
  .surface-readout > div:nth-child(5) { padding-left: 8px; }
  .surface-readout span { font-size: 5px; }
  .surface-readout strong { font-size: 7px; }
  .surface-actions { left: 14px; right: 14px; bottom: 58px; justify-content: flex-start; }
  .surface-actions button { height: 30px; font-size: 6px; padding: 0 9px; }
  .surface-hint { display: none; }
  .surface-credit { left: 14px; right: auto; bottom: 14px; font-size: 4.5px; }
}

@media (max-width: 560px) {
  .surface-title { top: 70px; width: min(290px, 82vw); }
  .surface-title h1 { font-size: 31px; }
  .surface-title h1 em { font-size: .46em; }
  .surface-title > p { margin-top: 10px; font-size: 9px; max-width: 255px; }
  .surface-readout { bottom: 108px; }
  .surface-actions { bottom: 55px; flex-wrap: wrap; }
  .surface-exit span { display: none; }
  .surface-sky-label { font-size: 6px; padding: 5px 7px; background: rgba(4,8,11,.38); }
}

@media (max-height: 560px) and (orientation: landscape) {
  .surface-title { top: 61px; width: 250px; }
  .surface-title h1 { font-size: 29px; }
  .surface-title > p { display: none; }
  .surface-readout { display: none; }
  .surface-actions { bottom: 26px; }
  .surface-credit { display: none; }
}

/* Panel entry -------------------------------------------------------------- */

.surface-entry {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 68px;
  margin-top: 16px;
  padding: 11px 12px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent, #d9c3a0) 56%, transparent);
  border-radius: 2px;
  background:
    linear-gradient(100deg, color-mix(in srgb, var(--accent, #d9c3a0) 18%, transparent), transparent 78%),
    rgba(255,255,255,.022);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .22s ease, background .22s ease, transform .22s ease;
}
.surface-entry::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--accent, #d9c3a0);
  opacity: .8;
}
.surface-entry:hover {
  border-color: color-mix(in srgb, var(--accent, #d9c3a0) 90%, transparent);
  background:
    linear-gradient(100deg, color-mix(in srgb, var(--accent, #d9c3a0) 26%, transparent), transparent 82%),
    rgba(255,255,255,.035);
  transform: translateY(-1px);
}
.surface-entry-icon {
  flex: 0 0 33px;
  width: 33px; height: 33px;
  display: grid; place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent, #d9c3a0) 42%, transparent);
  border-radius: 50%;
  color: color-mix(in srgb, var(--accent, #d9c3a0) 88%, #f1e8d7);
  background: rgba(0,0,0,.14);
}
.surface-entry-icon svg { width: 22px; height: 22px; }
.surface-entry-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.surface-entry-badge {
  font-family: var(--mono);
  font-size: 5.5px;
  letter-spacing: .13em;
  color: color-mix(in srgb, var(--accent, #d9c3a0) 78%, #d2ccbd);
}
.surface-entry-copy strong { font-size: 13px; font-weight: 500; letter-spacing: .035em; color: rgba(250,245,234,.98); }
.surface-entry-copy small { font-family: var(--mono); font-size: 6.5px; line-height: 1.45; letter-spacing: .015em; color: rgba(190,186,173,.78); }
.surface-entry-arrow {
  flex: 0 0 auto; margin-left: auto;
  display: grid; place-items: center;
  width: 25px; height: 25px;
  border: 1px solid color-mix(in srgb, var(--accent, #d9c3a0) 28%, transparent);
  border-radius: 50%;
  font-size: 13px;
  color: color-mix(in srgb, var(--accent, #d9c3a0) 82%, #e1dac8);
  transition: transform .22s ease, border-color .22s ease;
}
.surface-entry:hover .surface-entry-arrow { transform: translateX(3px); border-color: color-mix(in srgb, var(--accent, #d9c3a0) 65%, transparent); }

@media (max-width: 560px) {
  .surface-entry { min-height: 62px; margin-top: 13px; padding: 9px 10px; gap: 9px; }
  .surface-entry-icon { flex-basis: 29px; width: 29px; height: 29px; }
  .surface-entry-icon svg { width: 19px; height: 19px; }
  .surface-entry-badge { font-size: 5px; }
  .surface-entry-copy strong { font-size: 11.5px; }
  .surface-entry-copy small { font-size: 5.5px; }
  .surface-entry-arrow { width: 22px; height: 22px; font-size: 12px; }
}
