html,
body {
  margin: 0;
  height: 100%;
  background: #000;
  color: #ececec;
  font-family: "WenQuanYi Micro Hei", "Droid Sans Fallback", "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  pointer-events: none;
}

body {
  overflow: hidden;
}

#sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  pointer-events: none;
  touch-action: none;
}

#sky.flight {
  pointer-events: auto;
}

main {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  pointer-events: none;
}

#lists {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: min(360px, calc(100% - 32px));
  pointer-events: none;
}

#lists .sheet {
  position: relative;
  width: 100%;
  max-height: min(68vh, 620px);
  margin: 0 0 8px;
  padding: 10px 12px 8px;
  overflow: auto;
  border: 1px solid #d69a2e;
  border-radius: 0;
  background:
    linear-gradient(#d69a2e, #d69a2e) 0 0 / 16px 1px no-repeat,
    linear-gradient(#d69a2e, #d69a2e) 0 0 / 1px 16px no-repeat,
    linear-gradient(#d69a2e, #d69a2e) 100% 0 / 16px 1px no-repeat,
    linear-gradient(#d69a2e, #d69a2e) 100% 0 / 1px 16px no-repeat,
    linear-gradient(#d69a2e, #d69a2e) 0 100% / 16px 1px no-repeat,
    linear-gradient(#d69a2e, #d69a2e) 0 100% / 1px 16px no-repeat,
    linear-gradient(#d69a2e, #d69a2e) 100% 100% / 16px 1px no-repeat,
    linear-gradient(#d69a2e, #d69a2e) 100% 100% / 1px 16px no-repeat,
    #000;
  clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 14px, 100% calc(100% - 14px), calc(100% - 14px) 100%, 14px 100%, 0 calc(100% - 14px), 0 14px);
  color: #8fa184;
  font-family: "Share Tech Mono", "Noto Sans SC", "WenQuanYi Micro Hei", "Droid Sans Fallback", sans-serif;
  font-size: 12px;
  letter-spacing: 0.04em;
  pointer-events: auto;
  scrollbar-color: #6e5a2c #000;
}

.plate-head {
  display: flex;
  justify-content: space-between;
  margin: 0 0 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(214, 154, 46, 0.45);
  color: #d69a2e;
  font-size: 10px;
  letter-spacing: 0.22em;
}

#ship-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

#ship-mark {
  width: 48px;
  height: 42px;
  flex: none;
}

#ship-mark polygon {
  fill: rgba(214, 154, 46, 0.08);
  stroke: #d69a2e;
  stroke-width: 1.5;
  stroke-linejoin: miter;
}

#ship-mark polygon:nth-child(n + 2) {
  fill: rgba(143, 161, 132, 0.16);
  stroke: #8fa184;
}

#ship-name {
  margin: 0;
  font-size: 12px;
  line-height: 1.3;
  color: #d69a2e;
  letter-spacing: 0.08em;
}

#lists .pair {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 0;
  padding-top: 6px;
  border-top: 1px solid rgba(214, 154, 46, 0.32);
}

#lists h2 {
  flex: none;
  width: 3.4em;
  margin: 1px 0 0;
  color: #d69a2e;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.16em;
}

#lists ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

#lists li,
#here,
#here-at,
#chat,
#course-line,
#fuel-rates,
#fuel-absorb,
#fuel-cache {
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
}

#chat {
  margin-top: 3px;
  color: #8fa184;
}

#lists li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

#lists button {
  width: auto;
  min-width: 40px;
  min-height: 22px;
  margin: 0;
  padding: 0 6px;
  border: 1px solid rgba(214, 154, 46, 0.7);
  border-radius: 0;
  background: #000;
  color: #d69a2e;
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0.08em;
}

#fuel-amount {
  margin: 0;
  color: #d69a2e;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}

#fuel-rates,
#fuel-absorb,
#fuel-cache,
#course-line,
#here,
#here-at {
  color: #8fa184;
  font-variant-numeric: tabular-nums;
}

#regions li {
  display: block;
}

#regions .open {
  color: #d69a2e;
}

#regions .shut {
  color: #6d7a62;
}

#game-toggle {
  display: block;
  width: 46px;
  min-width: 46px;
  min-height: 20px;
  margin: 0;
  padding: 0;
  border: 1px solid #d69a2e;
  border-radius: 0;
  background: #000;
  color: #d69a2e;
  font-family: "Share Tech Mono", "Noto Sans SC", "WenQuanYi Micro Hei", sans-serif;
  font-size: 10px;
  letter-spacing: 0.14em;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}

#gate,
#play {
  box-sizing: border-box;
  width: min(440px, 100%);
  margin: 0 auto;
  padding: 0 20px calc(22px + env(safe-area-inset-bottom));
  pointer-events: none;
}

#gate {
  padding-top: 18vh;
  pointer-events: auto;
}

label,
.who,
#note,
.aside {
  color: #8d8d8d;
  font-size: 15px;
}

label {
  display: block;
  margin: 16px 0 6px;
}

input {
  box-sizing: border-box;
  width: 100%;
  min-height: 56px;
  padding: 0 14px;
  border: 1px solid #3a3a3a;
  border-radius: 12px;
  background: #0a0a0a;
  color: #f2f2f2;
  font: inherit;
  font-size: 18px;
}

button {
  box-sizing: border-box;
  width: 100%;
  min-height: 72px;
  margin-top: 12px;
  border: 1px solid #4a4a4a;
  border-radius: 14px;
  background: #111;
  color: #f5f5f5;
  font: inherit;
  font-size: 22px;
  pointer-events: auto;
  cursor: pointer;
  touch-action: manipulation;
}

button:active {
  background: #1c1c1c;
}

#friend {
  margin-top: 22px;
}

#status {
  margin: 0;
  text-align: center;
  color: #9a9a9a;
  font-size: 16px;
}

#meet .who {
  margin: 16px 0 4px;
}

#meet .who:first-of-type {
  margin-top: 8px;
}

.line {
  margin: 0;
  font-size: 22px;
  line-height: 1.45;
}

.coord {
  margin: 2px 0 0;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

#note {
  margin: 0;
}

#gate-error {
  min-height: 1.4em;
  margin: 12px 0 0;
  color: #c8c8c8;
  font-size: 15px;
}

.aside {
  margin: 18px 0 0;
  text-align: center;
}

.aside a {
  color: #d0d0d0;
  font-size: 18px;
}

noscript .aside {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 24px;
}
