:root {
  --bg: #0c1412;
  --panel: #13201c;
  --gold: #7dcea0;
  --text: #e8f5ee;
  --muted: #7a9488;
  --line: rgba(125, 206, 160, 0.28);
  --tab-h: calc(56px + env(safe-area-inset-bottom, 0px));
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  overflow: hidden;
}

.boot {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: radial-gradient(ellipse at 50% 28%, #1a2e28 0%, var(--bg) 68%);
}
.boot-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: contain;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}
.boot strong {
  font-size: 18px;
  letter-spacing: 0.12em;
  color: var(--gold);
}
.boot span {
  font-size: 13px;
  color: var(--muted);
}
.boot.is-hide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.boot[hidden], .shell[hidden], .sheet[hidden] {
  display: none !important;
}

.shell {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.frame {
  flex: 1;
  width: 100%;
  border: 0;
  background: var(--bg);
  margin: 0;
  padding: 0;
  padding-top: env(safe-area-inset-top, 0px);
}

.tabbar {
  flex: 0 0 var(--tab-h);
  height: var(--tab-h);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: start;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: rgba(14, 22, 20, 0.96);
  backdrop-filter: blur(10px);
}

.tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  padding: 4px 0;
  cursor: pointer;
}
.tab-ico {
  font-size: 16px;
  line-height: 1.2;
  color: inherit;
}
.tab.active {
  color: var(--gold);
  font-weight: 700;
}

.sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}
.sheet-card {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 16px 14px;
}
.sheet-card h2 {
  margin: 0 0 6px;
  font-size: 18px;
  color: var(--gold);
}
.sheet-desc {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
.sheet-btn {
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  border: 0;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(180deg, #9fe0b8, #5fb88a);
  color: #0c1412;
}
.sheet-btn--ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 600;
}
.sheet-close {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}
