:root {
  color-scheme: dark;
  background: #0b100e;
  color: #edf5ef;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
.toolbar {
  display: flex;
  align-items: center;
  gap: clamp(.75rem, 2vw, 1.75rem);
  min-width: 0;
  padding: max(.25rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) .25rem max(1rem, env(safe-area-inset-left));
  background: linear-gradient(180deg, #0d1613, #101916);
  border-bottom: 1px solid rgba(184, 245, 214, 0.16);
}
h1 {
  margin: 0;
  padding-left: clamp(.75rem, 2vw, 1.75rem);
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: .93rem;
  font-weight: 560;
  letter-spacing: .01em;
}
.actions { display: flex; align-items: center; gap: .35rem; margin-left: auto; }
.control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  flex: none;
  min-width: 2.75rem;
  min-height: 2.65rem;
  padding: .35rem .7rem;
  border: 0;
  border-radius: .4rem;
  background: transparent;
  color: #d3e2d8;
  font-size: .86rem;
  white-space: nowrap;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}
.library { color: #b8f5d6; }
.language { color: #b8f5d6; font-size: .8rem; font-weight: 650; }
.control:hover { background: rgba(184, 245, 214, 0.11); color: #f2fff7; }
:focus-visible { outline: 2px solid #b8f5d6; outline-offset: -2px; }
.grid-icon, .expand-icon, .windows-icon { display: inline-block; width: 16px; height: 16px; position: relative; }
.grid-icon {
  width: 15px;
  height: 15px;
  background:
    linear-gradient(currentColor 0 0) top left / 6px 6px,
    linear-gradient(currentColor 0 0) top right / 6px 6px,
    linear-gradient(currentColor 0 0) bottom left / 6px 6px,
    linear-gradient(currentColor 0 0) bottom right / 6px 6px;
  background-repeat: no-repeat;
}
.expand-icon {
  --line: linear-gradient(currentColor 0 0);
  background:
    var(--line) left top / 6px 1.5px, var(--line) left top / 1.5px 6px,
    var(--line) right top / 6px 1.5px, var(--line) right top / 1.5px 6px,
    var(--line) left bottom / 6px 1.5px, var(--line) left bottom / 1.5px 6px,
    var(--line) right bottom / 6px 1.5px, var(--line) right bottom / 1.5px 6px;
  background-repeat: no-repeat;
}
.windows-icon::before, .windows-icon::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1.5px solid currentColor;
  border-radius: 1px;
}
.windows-icon::before { left: 0; bottom: 0; border-top-color: transparent; border-right-color: transparent; }
.windows-icon::after { top: 0; right: 0; }
#stage { position: relative; min-height: 0; }
iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #0b100e;
  animation: stageFade .35s ease-out;
}
@keyframes stageFade { from { opacity: 0; } to { opacity: 1; } }
iframe:fullscreen { background: #0b100e; }
.notice {
  display: grid;
  place-content: center;
  justify-items: center;
  min-height: 100%;
  padding: 1.5rem;
  text-align: center;
}
.notice h2 { margin: 0 0 1.25rem; font-size: clamp(1.5rem, 4vw, 2.5rem); }
.return { padding: .75rem 1.1rem; border: 1px solid #739481; border-radius: .35rem; color: #b8f5d6; }
@media (max-width: 650px) {
  .toolbar { gap: .25rem; padding-left: max(.2rem, env(safe-area-inset-left)); padding-right: max(.2rem, env(safe-area-inset-right)); }
  h1 { font-size: .875rem; padding-left: .65rem; }
  .actions { gap: 0; }
  .control .label { display: none; }
}
@media (orientation: landscape) and (max-height: 500px) {
  .toolbar { padding-top: env(safe-area-inset-top); padding-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
