/* The star-system prototype. Builds on style.css (tokens, glass panels, logo, labels). */
.dayctl { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; justify-content: flex-end; min-width: 0; } /* (never wider than the screen) */
.dayctl button { min-height: 36px; }
.dayctl button {
	border: 1px solid var(--line); border-radius: var(--r); background: var(--glass); color: var(--text); box-shadow: var(--glow);
	padding: 0 14px; font: 700 10.5px/1.2 var(--display); letter-spacing: 1.2px; text-transform: uppercase; white-space: nowrap;
	-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.dayctl button:hover { border-color: var(--line-strong); }
.dayctl button.primary { background: var(--grad); color: #071026; border-color: transparent; box-shadow: 0 0 18px rgba(92, 225, 255, 0.35); }
.dayctl button[aria-pressed="true"] { color: var(--cyan); border-color: var(--line-strong); box-shadow: 0 0 14px rgba(92, 225, 255, 0.35); }
.dayctl .counter b { font-size: 19px; }

/* Planets */
#planets { left: 16px; top: calc(var(--top) + 70px); width: 250px; max-height: calc(var(--vh) - 330px); overflow: auto; padding: 16px 10px 10px; }
#planets h2 { margin-left: 6px; }
#planet-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
#planet-list button {
	width: 100%; display: grid; grid-template-columns: 14px 1fr auto; gap: 3px 10px; align-items: center; text-align: left;
	background: transparent; border: 1px solid transparent; border-radius: 4px; padding: 7px 8px; color: var(--text);
}
#planet-list button:hover { background: var(--tint); }
#planet-list button[aria-current="true"] { border-color: var(--line-strong); background: rgba(92, 225, 255, 0.08); }
.dot { width: 12px; height: 12px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; grid-row: span 2; }
#planet-list .sys .dot { grid-row: auto; }
.pl-name { font: 700 11.5px/1.2 var(--display); letter-spacing: 1px; text-transform: uppercase; }
.pl-pct { font: 700 11px/1 var(--display); color: var(--cyan); }
.pl-sub { grid-column: 2 / 4; display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--muted); }
.meter { display: block; grid-column: 2 / 4; height: 3px; background: rgba(150, 190, 255, 0.12); border-radius: 1px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--grad); }

/* Details */
#info { right: 16px; top: calc(var(--top) + 70px); width: 300px; max-height: calc(var(--vh) - 110px); overflow: auto; }
#info .grab { display: none; } /* (a phone's sheet handle) */
#info .sub { color: var(--muted); margin-top: -6px; font-weight: 700; }
.civ-head { display: flex; gap: 12px; align-items: center; margin-right: 28px; }
.civ-head img { width: 52px; height: 39px; border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 2px; flex: none; }
.civ-head h2 { margin: 0; text-transform: none; font-size: 15px; }
.civ-head p { margin: 3px 0 0; color: var(--muted); font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 12px 0 4px; }
.stats div { background: var(--tint); border: 1px solid rgba(120, 190, 255, 0.12); border-radius: 4px; padding: 7px 8px; }
.stats small { display: block; font: 700 8.5px/1.3 var(--display); letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.stats b { font: 700 15px/1.3 var(--display); color: var(--cyan); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; }
.chips span, .chips button {
	display: inline-flex; align-items: center; gap: 6px; background: var(--tint-2); color: var(--text); border: 1px solid var(--line);
	border-radius: 3px; padding: 2px 8px; font-size: 12px; font-weight: 700;
}
.chips button:hover { border-color: var(--line-strong); }
.chips i { width: 8px; height: 8px; border-radius: 50%; }
.tech { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 7px; }
.tech li { display: grid; grid-template-columns: 22px 1fr auto; gap: 4px 8px; align-items: center; font-size: 13px; }
.tech li.focus b::after { content: ' · researching'; color: var(--pink); font-size: 11px; font-weight: 700; }
.pips { display: flex; gap: 3px; }
.pips i { width: 11px; height: 6px; background: rgba(150, 190, 255, 0.15); border-radius: 1px; }
.pips i.on { background: var(--cyan); box-shadow: 0 0 6px rgba(92, 225, 255, 0.6); }
.tech .prog { grid-column: 2 / 4; height: 3px; background: rgba(255, 79, 216, 0.15); border-radius: 1px; overflow: hidden; }
.tech .prog i { display: block; height: 100%; background: var(--pink); }
.holders { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 2px; }
.holders button {
	width: 100%; display: grid; grid-template-columns: 26px 1fr auto; gap: 3px 8px; align-items: center; text-align: left;
	background: transparent; border: 0; border-radius: 4px; padding: 5px 4px; color: var(--text); font-weight: 700;
}
.holders button:hover { background: var(--tint); }
.holders img { width: 26px; height: 19px; border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 2px; grid-row: span 2; }
.holders .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.holders .n { font: 700 11px/1 var(--display); color: var(--cyan); }
.holders .meter { grid-column: 2 / 4; }
/* A country's forces on a world: people, strength, strength per tile, fleet */
.holders .fx { grid-column: 2 / 4; display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 11px; font-weight: 600; color: var(--muted, #a9b3d6); }
.holders .fx b { font-weight: 700; color: var(--text); }
.holders .fx .weak { color: #ff8a8a; }
.holders .fx .war { flex-basis: 100%; color: #ff8a8a; font-weight: 700; }
.holders .fx .peace { color: #8fe3a8; font-weight: 700; }
.holders .fx > .peace:first-child { flex-basis: 100%; }

/* Mission log */
#log { left: 16px; bottom: 16px; width: min(430px, calc(100vw - 32px)); max-height: 220px; overflow: auto; padding: 14px 14px 8px; }
#log h3 { margin: 0 0 8px; }
#log-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: 13px; }
#log-list li { display: grid; grid-template-columns: 30px 22px 1fr; gap: 8px; align-items: center; cursor: pointer; }
#log-list li.empty { display: block; color: var(--muted); cursor: default; }
#log-list small { font: 700 9.5px/1 var(--display); letter-spacing: 1px; color: var(--muted); }
#log-list img { width: 22px; height: 16px; border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 2px; }
#log-list .ev b { color: var(--cyan); font-weight: 700; }
#log-list .ev b.who { color: var(--text); }

#btn-orbit {
	position: fixed; left: 50%; top: calc(var(--top) + 70px); transform: translateX(-50%); z-index: 4;
	border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--glass); color: var(--cyan); box-shadow: 0 0 16px rgba(92, 225, 255, 0.3);
	padding: 9px 16px; font: 700 10.5px/1.2 var(--display); letter-spacing: 1.2px; text-transform: uppercase;
	-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.stats b.sm { font-size: 11px; line-height: 1.5; }
#battle-btns { position: fixed; left: 50%; top: calc(var(--top) + 70px); transform: translateX(-50%); z-index: 4; display: flex; gap: 8px; pointer-events: none; }
#battle-btns button { pointer-events: auto; }
#btn-replay, #btn-debrief {
	position: static; transform: none; white-space: nowrap;
	border: 1px solid rgba(255, 79, 216, 0.6); border-radius: var(--r); background: var(--glass); color: var(--pink); box-shadow: 0 0 16px rgba(255, 79, 216, 0.3);
	padding: 9px 16px; font: 700 10.5px/1.2 var(--display); letter-spacing: 1.2px; text-transform: uppercase;
	-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
#btn-debrief { border-color: rgba(92, 225, 255, 0.6); color: var(--cyan); box-shadow: 0 0 16px rgba(92, 225, 255, 0.3); }
body.shot #battle-btns { display: none !important; }

/* The mission debrief after a battle */
#debrief .panel { width: min(520px, 100%); }
#debrief h2 { margin: 0 0 2px; }
#debrief .sub { color: var(--muted); font-weight: 700; margin: 0 0 12px; font-size: 13px; }
.db-hero { margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: linear-gradient(135deg, rgba(92, 225, 255, 0.14), rgba(255, 79, 216, 0.12)); font-weight: 700; font-size: 15px; line-height: 1.4; }
.db-hero.won { border-color: rgba(94, 224, 138, 0.7); }
.db-hero.lost { border-color: rgba(255, 107, 107, 0.7); }
.db-hero small { display: block; margin-top: 4px; font-weight: 600; font-size: 12.5px; color: var(--muted); }
.db-nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0 0 14px; }
.db-nums div { padding: 10px 8px; border: 1px solid var(--line); border-radius: 10px; background: rgba(150, 190, 255, 0.06); text-align: center; }
.db-nums b { display: block; font: 900 22px/1.1 var(--display); color: var(--cyan); }
.db-nums span { display: block; margin-top: 3px; font-size: 11px; line-height: 1.25; color: var(--muted); font-weight: 700; }
#debrief h3 { margin: 16px 0 8px; font: 700 11px/1.2 var(--display); letter-spacing: 1.5px; text-transform: uppercase; color: var(--cyan); }
.db-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 14px; line-height: 1.4; }
.db-lines li { display: grid; grid-template-columns: 24px 1fr; gap: 8px; }
.db-world { margin: 0 0 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(11, 16, 40, 0.6); }
.db-world h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font: 700 12px/1.2 var(--display); letter-spacing: 1.2px; text-transform: uppercase; }
.db-world h4 i { width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 8px currentColor; }
.db-world h4 small { margin-left: auto; color: var(--muted); font-size: 10px; letter-spacing: 1px; }
.db-row { display: grid; grid-template-columns: 26px 1fr auto; gap: 2px 10px; align-items: center; padding: 6px 0; border-top: 1px solid rgba(150, 190, 255, 0.1); }
.db-row:first-of-type { border-top: 0; }
.db-row img { width: 26px; height: 18px; border-radius: 3px; border: 1px solid rgba(255, 255, 255, 0.25); }
.db-row .nm { font-weight: 700; }
.db-row.me .nm { color: var(--cyan); }
.db-row .d { font: 900 16px/1 var(--display); }
.db-row .d.up { color: #5ee08a; } .db-row .d.down { color: #ff6b6b; } .db-row .d.flat { color: var(--muted); }
.db-row small { grid-column: 2 / 4; color: var(--muted); font-size: 12px; line-height: 1.35; }
.db-more { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.db-actions { display: flex; gap: 8px; margin-top: 16px; }
.db-actions button { flex: 1; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--tint); color: var(--text); padding: 11px 8px; font: 700 10.5px/1.2 var(--display); letter-spacing: 1.2px; text-transform: uppercase; }
.db-actions button.primary { background: var(--grad); color: #071026; border-color: transparent; }
@media (max-width: 480px) { .db-nums { grid-template-columns: repeat(2, 1fr); } }
.tech li .mine, .tech li button { justify-self: end; }
.tech li button { border: 1px solid var(--line-strong); border-radius: 3px; background: rgba(92, 225, 255, 0.1); color: var(--cyan); padding: 1px 7px; font: 700 9px/1.4 var(--display); letter-spacing: 0.8px; text-transform: uppercase; }
.tech li { grid-template-columns: 22px 1fr auto auto; }
.tech .prog { grid-column: 2 / 5; }
.chips span button { border: 0; background: none; padding: 0 2px; cursor: pointer; font-size: 13px; }
#info .rank { margin: 10px 0 6px; }
#hint { position: fixed; right: 16px; bottom: 16px; margin: 0; font: 700 9.5px/1.4 var(--display); letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); pointer-events: none; }
#toast { bottom: 250px; z-index: 30; }

/* Planet names in the whole-system view */
.plabel {
	position: absolute; left: 0; top: 0; white-space: nowrap; will-change: transform; text-align: center;
	font: 700 10px/1.25 var(--display); letter-spacing: 1.5px; text-transform: uppercase; color: var(--text); text-shadow: 0 0 6px #000, 0 0 2px #000;
}
.plabel small { display: block; font-size: 8.5px; letter-spacing: 1px; color: var(--cyan); }

/* Room for the bottom bar (claim, leaderboards, market, coffee, how it works, ideas) */
#log { bottom: 66px; width: min(500px, calc(100vw - 32px)); max-height: min(300px, calc(var(--vh) - 420px)); min-height: 150px; }
#log-list { font-size: 13.5px; gap: 6px; }
#hint { bottom: 72px; }
#planets { max-height: calc(var(--vh) - 480px); min-height: 160px; }

/* The fight feed: one round at a time, a stack of cards (newest at the bottom) */
#feed {
	position: fixed; left: 50%; transform: translateX(-50%); top: calc(var(--top) + 116px); z-index: 7; width: clamp(260px, calc(100vw - 600px), 420px); margin: 0; padding: 0; list-style: none;
	display: flex; flex-direction: column; gap: 6px; pointer-events: none;
}
#feed li {
	display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 13px; border-radius: 10px; font-size: 14px; line-height: 1.35;
	background: rgba(11, 16, 40, 0.92); border: 1px solid var(--line); border-left: 4px solid var(--muted); color: var(--text);
	box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
	animation: feed-in 0.28s ease-out; transition: opacity 0.4s, transform 0.4s;
}
#feed li.gone { opacity: 0; transform: translateX(24px); }
#feed li img { width: 22px; height: 16px; border-radius: 2px; border: 1px solid rgba(255, 255, 255, 0.25); }
#feed li .ad { flex-basis: 100%; font: 700 10.5px/1.2 var(--display); letter-spacing: 0.8px; text-transform: uppercase; color: var(--muted); }
#feed li.head { border-left-color: var(--pink); font-weight: 700; background: rgba(40, 14, 48, 0.94); }
#feed li.good { border-left-color: #5ee08a; }
#feed li.bad { border-left-color: #ff6b6b; }
#feed li.took { border-left-color: var(--cyan); }
#feed li.held { border-left-color: #8fb8ff; }
#feed li.tie { border-left-color: #ffd38a; }
@keyframes feed-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #feed li { animation: none; transition: none; } }
body.shot #feed { display: none !important; }
#toast { bottom: 290px; }
.bottom button.market { color: #8ff0c8; }

/* The countdown to launch at 1,000 astronauts */
#launch { left: 50%; transform: translateX(-50%); top: calc(var(--top) + 70px); width: min(380px, calc(100vw - 32px)); padding: 12px 14px; z-index: 5; }
#launch p { display: flex; justify-content: space-between; gap: 10px; margin: 0 0 6px; font: 700 11px/1.3 var(--display); letter-spacing: 1px; text-transform: uppercase; }
#launch p span { color: var(--cyan); }
#launch .bar { height: 6px; background: rgba(150, 190, 255, 0.15); border-radius: 2px; overflow: hidden; }
#launch .bar i { display: block; height: 100%; background: var(--grad); }
#launch small { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
#market-found > label { display: block; font: 700 9.5px/1.3 var(--display); letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); margin: 12px 0 5px; }
#world-look option { background: #0b1028; }

/* Fleet orders: votes for where a country's colony ships fly */
.votes { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; }
.votes li { display: grid; grid-template-columns: 14px 1fr auto auto; gap: 3px 8px; align-items: center; font-size: 13px; font-weight: 700; }
.votes li .dot { grid-row: auto; width: 10px; height: 10px; }
.votes li .n { font: 700 11px/1 var(--display); color: var(--cyan); }
.votes li.lead .nm::after { content: ' · next ship'; color: var(--pink); font-size: 11px; }
.votes li .meter { grid-column: 2 / 5; }
.votes li button { border: 1px solid var(--line-strong); border-radius: 3px; background: rgba(92, 225, 255, 0.1); color: var(--cyan); padding: 2px 9px; font: 700 9.5px/1.4 var(--display); letter-spacing: 1px; text-transform: uppercase; }
.votes li .mine { color: #8ff0c8; font-size: 11px; }
.votes li:not(:has(button, .mine)) { grid-template-columns: 14px 1fr auto; }
.votes li:not(:has(button, .mine)) .meter { grid-column: 2 / 4; }

/* ?shot: capture mode for videos, nothing but the 3D scene */
body.shot header, body.shot .panel, body.shot .bottom, body.shot #hint, body.shot #labels, body.shot #btn-replay, body.shot #btn-orbit,
body.shot #toast, body.shot #launch, body.shot #loading { display: none !important; }

/* Modals of this page */
#board .panel { width: min(440px, 100%); }
#board .sub { color: var(--muted); font-weight: 700; margin: 0 0 6px; font-size: 13px; }
#board .tabs button { flex: 1; }
.holders .tag-me { color: var(--cyan); }
#market .panel { width: min(440px, 100%); }
#market fieldset { border: 0; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
#market-form > label, #market-target > label { display: block; font: 700 9.5px/1.3 var(--display); letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); margin: 12px 0 5px; }
#market-form > label.agree {
	display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; margin: 14px 0 0;
	font: 500 13px/1.45 var(--body); letter-spacing: 0; text-transform: none; color: var(--text); cursor: pointer;
}
#market-world option { background: #0b1028; }
.opt .ic { font-size: 22px; line-height: 1; }
.opt.off { opacity: 0.45; cursor: not-allowed; }
#info .wide { margin-top: 10px; }
#info .actions { display: flex; gap: 6px; margin-top: 10px; }
#info .actions button { flex: 1; border: 1px solid var(--line); border-radius: 4px; background: var(--tint); color: var(--text); padding: 9px 6px; font: 700 10px/1.2 var(--display); letter-spacing: 1px; text-transform: uppercase; }
#info .actions button.primary { background: var(--grad); color: #071026; border-color: transparent; }
.gov { color: #ffd38a; font-weight: 700; font-size: 13px; }
.linkish { background: none; border: 0; padding: 0; color: var(--cyan); font: inherit; text-decoration: underline; cursor: pointer; }

@media (max-width: 760px) {
	.dayctl .counter { display: none; }
	/* one row beside the logo that scrolls sideways (fading out at the edge when there is more) */
	.dayctl { gap: 5px; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; padding-right: 14px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 18px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 18px), transparent); }
	.dayctl::-webkit-scrollbar { display: none; }
	.dayctl button { flex: none; min-height: 34px; padding: 0 10px; font-size: 9.5px; letter-spacing: 0.8px; }
	.top .logo { flex: none; }
	#hint { display: none; }
	/* Planets become a strip of chips across the bottom, above the log. */
	#planets { top: auto; bottom: 192px; left: 10px; right: 10px; width: auto; max-height: none; padding: 8px; overflow: visible; }
	#planets::before { display: none; }
	#planets h2 { display: none; }
	#planet-list { grid-auto-flow: column; grid-auto-columns: 132px; overflow-x: auto; scrollbar-width: none; }
	#planet-list button { padding: 6px; }
	.pl-sub span + span { display: none; } /* the tech needed is in the world's details */
	#log { left: 10px; right: 10px; width: auto; bottom: calc(62px + env(safe-area-inset-bottom)); max-height: 158px; min-height: 0; padding: 10px 12px 6px; }
	#log h3 { display: none; }
	#log-list { font-size: 13px; }
	#planets { bottom: calc(228px + env(safe-area-inset-bottom)); min-height: 0; }
	/* the fight feed drops in under the header, over the map */
	#feed { right: 10px; left: 10px; width: auto; transform: none; top: calc(var(--top) + 64px); bottom: auto; }
	#feed li { font-size: 13px; padding: 8px 11px; }
	#feed li:nth-last-child(n + 5) { display: none; }
	/* Details open as a sheet over the bottom of the screen. */
	/* the card is a sheet over the bottom: small at first (pull the handle up for the rest), the world framed above it */
	#info { left: 10px; right: 10px; width: auto; top: auto; bottom: calc(62px + env(safe-area-inset-bottom)); max-height: min(30vh, 230px); z-index: 6; background: rgba(11, 16, 40, 0.96); padding-top: 22px; transition: max-height 0.25s ease; overscroll-behavior: contain; }
	#info.full { max-height: calc(var(--vh) - var(--top) - 140px); }
	body.sheet #planets, body.sheet #log { display: none; }
	#info .grab { display: block; position: absolute; left: 0; right: 44px; top: 0; height: 24px; border: 0; background: none; padding: 0; cursor: pointer; }
	#info .grab i { display: block; width: 44px; height: 5px; margin: 8px auto 0; border-radius: 3px; background: rgba(150, 190, 255, 0.45); }
	#info.full .grab i { background: var(--cyan); }
	#info h2 { font-size: 18px; margin-bottom: 2px; }
	/* the launch banner: one line */
	#launch { padding: 7px 10px; }
	#launch small { display: none; }
	#launch p { margin: 0 0 4px; font-size: 10px; }
	#toast { bottom: 320px; }
}

/* Short and wide: a phone on its side. Three columns (worlds | log, launch, feed | details) instead of piles. */
@media (min-width: 761px) and (max-height: 520px) {
	.dayctl .counter { display: none; }
	.dayctl { gap: 5px; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; max-width: calc(100vw - 260px); padding-right: 14px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 18px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 18px), transparent); }
	.dayctl::-webkit-scrollbar { display: none; }
	.dayctl button { flex: none; min-height: 32px; padding: 0 10px; font-size: 9.5px; letter-spacing: 0.8px; }
	.top .logo { flex: none; }
	#hint { display: none; }
	#planets { top: calc(var(--top) + 50px); bottom: calc(58px + env(safe-area-inset-bottom)); left: max(10px, env(safe-area-inset-left)); width: 200px; max-height: none; min-height: 0; padding: 10px 8px 8px; }
	#planets h2 { font-size: 11px; margin-bottom: 6px; }
	#info { top: calc(var(--top) + 50px); right: max(10px, env(safe-area-inset-right)); width: 260px; max-height: calc(var(--vh) - var(--top) - 112px); }
	#log { left: calc(max(10px, env(safe-area-inset-left)) + 210px); right: calc(max(10px, env(safe-area-inset-right)) + 270px); width: auto; bottom: calc(58px + env(safe-area-inset-bottom)); max-height: 96px; min-height: 0; padding: 8px 10px 4px; }
	#log h3 { display: none; }
	#launch { top: calc(var(--top) + 50px); width: min(380px, calc(100vw - 560px)); padding: 8px 10px; }
	#launch small { display: none; }
	#battle-btns, #btn-orbit { top: calc(var(--top) + 50px); }
	#feed { left: 50%; right: auto; transform: translateX(-50%); width: min(380px, calc(100vw - 560px)); top: calc(var(--top) + 96px); bottom: auto; }
	#feed li:nth-last-child(n + 4) { display: none; }
	#feed li { font-size: 12.5px; padding: 7px 10px; }
	#toast { bottom: calc(160px + env(safe-area-inset-bottom)); max-width: calc(100vw - 560px); }
}

/* Your order for one tile (on the surface of a world at war) */
#tilebar { left: 50%; transform: translateX(-50%); bottom: calc(76px + env(safe-area-inset-bottom)); width: min(420px, calc(100vw - 20px)); padding: 10px 12px; z-index: 8; }
#tilebar .tb-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 6px; font-weight: 700; font-size: 15px; }
#tilebar .tb-head img { width: 24px; height: 17px; border-radius: 2px; border: 1px solid rgba(255, 255, 255, 0.25); }
#tilebar .tb-head small { flex-basis: 100%; color: var(--muted); font-size: 12px; font-weight: 600; }
#tilebar .tb-mine { margin: 0 0 6px; color: var(--cyan); font-weight: 700; }
#tilebar .tb-act { display: flex; gap: 6px; }
#tilebar .tb-act button { flex: 1; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--tint); color: var(--text); padding: 10px 8px; font: 700 10.5px/1.2 var(--display); letter-spacing: 1px; text-transform: uppercase; }
#tilebar .tb-act button.primary { background: var(--grad); color: #071026; border-color: transparent; }
#tilebar .tb-act button[disabled] { opacity: 0.55; cursor: wait; }
#tilebar .tb-act button[data-tile="close"] { flex: 0 0 40px; }
#tilebar .fine { margin: 6px 0 0; }
body.shot #tilebar { display: none !important; }
