.galaxy { flex: 1 1 auto; min-height: 0; position: relative; overflow-y: auto; overflow-x: hidden; }
.galaxy[hidden], .voyage[hidden], .actions[hidden], .gx-view[hidden] { display: none !important; }
.gx-overview { position: absolute; inset: 0; }
.gx-orbit { position: absolute; inset: 0; width: 100%; height: 100%; }
.gx-planet { position: absolute; border: 0; background: none; padding: 0; transform: translate(-50%, -50%); }
.gx-planet .gc { position: absolute; width: 33.6%; right: -20.85090909%; top: 16%; height: auto; } /* Canonical companion padding, at the front planet's upper right. */
.gx-overview { touch-action: none; user-select: none; -webkit-user-select: none; }
.gx-name { position: absolute; transform: translateX(-50%); margin: 0; font: 600 17px/1.3 var(--serif); letter-spacing: .12em; color: var(--ink); pointer-events: none; white-space: nowrap; z-index: 12; }
.back { width: 36px; height: 36px; border: 0; background: none; display: grid; place-items: center; color: var(--ink); border-radius: 50%; }
.back svg { width: 22px; height: 22px; }
.gx-list, .gx-card { padding: 4px 14px 18px; display: grid; gap: 8px; align-content: start; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.card { border: 1px solid var(--line); background: var(--card); border-radius: 16px; padding: 8px 8px 10px; display: grid; gap: 4px; text-align: left; min-width: 0; }
.card.done { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.card.empty { border-style: dashed; background: transparent; }
.card .when { font-size: 12px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.card .what { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.snap { position: relative; width: 100%; overflow: hidden; }
.snap img.b { position: absolute; inset: 0; width: 100%; height: 100%; }
.snap.fade img.b {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 3%, #000 88%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 3%, #000 88%, transparent 100%);
  mask-composite: intersect;
}
.snap .pl { position: absolute; transform: translate(-50%, -100%); height: auto; }
.snap .root-cover{position:absolute;inset:0;pointer-events:none}
.snap .root-cover img{position:absolute;inset:0;width:100%;height:100%}
.gx-card-top { display: flex; justify-content: space-between; align-items: center; }
.big { width: 90%; justify-self: center; }
.mini-road { display: flex; justify-content: center; gap: 2px; padding: 4px 0; }
.mini-road button { width: 32px; height: 32px; border: 0; background: none; display: grid; place-items: center; padding: 0; }
.mini-road svg { width: 22px; height: 22px; }
.road-hits { position: absolute; inset: 0; pointer-events: none; }
.star-hit { position: absolute; width: 30px; height: 30px; transform: translate(-50%, -50%); border: 0; background: none; border-radius: 50%; pointer-events: auto; z-index: 3; }
.sheet .name { margin: 0; font: 600 19px/1.35 var(--serif); }
.notes { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; }
.notes li { padding: 8px 10px; background: var(--paper); border-radius: 10px; }
.notes:empty { display: none; }

/* 圖鑑（10-30 加）：一本全部、照星球分章；一季一頁、一頁三樣，像壓花標本；不寫數字 */
/* 10-30 13:2x 使用者：書太小看不清楚 → 右下角一顆小膠囊（圖示＋「圖鑑」），不和星球名字、伴星撞 */
.gx-book-btn { position: absolute; right: 16px; bottom: 14px; z-index: 14; display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px 0 11px; border: 1px solid var(--gold-soft); border-radius: 18px; background: var(--card); color: var(--ink); font-size: 14px; letter-spacing: .12em; box-shadow: 0 4px 12px rgba(60, 50, 30, .08); }
.gx-book-btn svg { width: 18px; height: 18px; flex: 0 0 18px; }
.gx-book, .gx-chapter { position: absolute; inset: 0; display: flex; flex-direction: column; }
.book-head { flex: 0 0 auto; display: grid; grid-template-columns: 36px 1fr 36px; align-items: center; padding: 2px 8px; }
.book-head h3 { margin: 0; text-align: center; font: 600 18px/1.3 var(--serif); letter-spacing: .12em; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.book-toc { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; padding: 8px 18px 18px; align-content: start; }
.book-planet { border: 0; background: none; padding: 0; display: grid; justify-items: center; gap: 2px; position: relative; color: var(--ink); }
.book-planet img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.book-planet span { font: 600 14px/1.3 var(--serif); letter-spacing: .08em; }
.book-planet.solo { grid-column: 1 / -1; justify-self: center; width: 76%; gap: 6px; }
.book-planet.solo span { font-size: 17px; letter-spacing: .14em; }
.book-planet.center { grid-column: 1 / -1; justify-self: center; width: calc(50% - 6px); }
.book-pages { flex: 1 1 auto; min-height: 0; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; }
.book-pages::-webkit-scrollbar { display: none; }
.book-page { flex: 0 0 100%; min-width: 0; scroll-snap-align: center; display: flex; flex-direction: column; gap: 8px; padding: 2px 16px 6px; }
.book-season { flex: 0 0 auto; margin: 0; text-align: center; font: 600 17px/1.3 var(--serif); letter-spacing: .4em; text-indent: .4em; color: var(--ink-soft); }
/* 18:5x 使用者：「圖鑑不好看，又回到加法越來越醜」→ 拿掉框框，植物直接放在紙上（壓花標本冊） */
.specimen { flex: 1 1 0; min-height: 0; overflow: hidden; display: grid; grid-template-columns: 46% minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); align-items: stretch; gap: 14px; padding: 4px 8px; }
.specimen > div:last-child { align-self: center; min-width: 0; }
.specimen .pic { position: relative; min-height: 0; overflow: hidden; }
.specimen .pic img, .specimen .pic .glow { position: absolute; inset: 0; margin: auto; }
.specimen.solo { grid-template-columns: 1fr; } /* 伴星頁沒有字：圖置中 */
.specimen.solo .pic { width: 100%; }
.specimen.solo .pic img { max-width: 60%; }
.specimen.solo .glow { width: 76px; height: 76px; }
.specimen .pic img { max-width: 100%; max-height: 100%; object-fit: contain; }
.specimen.off .pic img { filter: brightness(0); opacity: .1; }
.specimen b { display: block; font: 600 16px/1.3 var(--serif); letter-spacing: .06em; color: var(--ink); }
.specimen small { display: block; margin-top: 2px; font-size: 12px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.specimen .glow { width: 64px; height: 64px; border-radius: 50%; background: radial-gradient(circle, rgba(222, 182, 104, .55), rgba(222, 182, 104, 0) 68%); animation: bookGlow 3.2s ease-in-out infinite; }
@keyframes bookGlow { 50% { transform: scale(1.08); opacity: .7; } }
.book-dots { flex: 0 0 auto; display: flex; justify-content: center; gap: 8px; padding: 2px 0 10px; }
.book-dots i { width: 6px; height: 6px; border-radius: 50%; border: 1px solid var(--gold); }
.book-dots i.on { background: var(--gold); }
@media (prefers-reduced-motion: reduce) { .specimen .glow { animation: none !important; } }
.share-view { position: absolute; inset: 0; z-index: 40; background: var(--paper); display: flex; flex-direction: column; gap: 10px; padding: 6px 14px calc(14px + var(--home, 0px)); }
.share-view[hidden] { display: none; }
.share-top { flex: 0 0 auto; }
.share-pic { flex: 1 1 auto; min-height: 0; display: grid; place-items: center; }
.share-pic { position: relative; }
.share-pic img { position: absolute; inset: 0; margin: auto; max-width: 100%; max-height: 100%; width: auto; height: auto; border-radius: 14px; border: 1px solid var(--line); background: var(--paper); box-shadow: 0 10px 30px rgba(60, 50, 30, .16); }
.share-pic img:not([src]) { visibility: hidden; }
.share-actions { flex: 0 0 auto; display: grid; padding: 0 4px; }


.btn { height: 50px; border-radius: 25px; border: 1.5px solid var(--green); background: transparent; color: var(--green); font-size: 16px; font-weight: 500; letter-spacing: .08em; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn.primary { background: var(--green); color: var(--card); }

.sheet .btn{height:46px}
#harvest-panel,#finish-panel{display:grid;gap:10px}
#sheet .row{display:flex;gap:8px}
#sheet .row>*{flex:1;min-width:0}
.icon-btn{width:32px;height:32px;border:0;background:none;display:grid;place-items:center;color:var(--ink);opacity:.8;border-radius:50%}
.icon-btn svg{width:19px;height:19px}
@media(prefers-reduced-motion:reduce){.specimen .glow{animation:none!important}}
