:root {
  --shell-bar-h: 44px;
  --shell-bg: #0f1419;
  --shell-bar-bg: #1a222c;
  --shell-border: #2a3542;
  --shell-text: #e8eef4;
  --shell-muted: #8b9aab;
  --shell-accent: #3d8bfd;
  --shell-frame-bg: #ffffff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--shell-bg);
  color: var(--shell-text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.shell-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  min-height: var(--shell-bar-h);
  padding: 6px 12px;
  background: var(--shell-bar-bg);
  border-bottom: 1px solid var(--shell-border);
  z-index: 20;
}

.shell-bar[hidden] {
  display: none !important;
}

.shell-bar__left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.shell-bar__brand {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 14rem;
}

.shell-bar__field {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.shell-bar__label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--shell-muted);
}

.shell-bar__select {
  appearance: none;
  background: #0f1419;
  color: var(--shell-text);
  border: 1px solid var(--shell-border);
  border-radius: 6px;
  padding: 4px 28px 4px 8px;
  font-size: 12px;
  max-width: 16rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--shell-muted) 50%),
    linear-gradient(135deg, var(--shell-muted) 50%, transparent 50%);
  background-position: calc(100% - 12px) calc(50% - 2px), calc(100% - 7px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.shell-bar__devices {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--shell-border);
  border-radius: 8px;
  background: #0f1419;
}

.shell-bar__devices[hidden] {
  display: none !important;
}

.shell-bar__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--shell-muted);
  cursor: pointer;
}

.shell-bar__btn:hover {
  color: var(--shell-text);
  background: #243040;
}

.shell-bar__btn.is-active {
  color: #fff;
  background: var(--shell-accent);
}

.shell-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  justify-content: center;
  align-items: stretch;
  padding: 0;
  background:
    radial-gradient(ellipse at top, #1a2430 0%, transparent 55%),
    var(--shell-bg);
}

.shell-frame-wrap {
  width: 100%;
  height: 100%;
  max-width: 100%;
  margin: 0 auto;
  background: var(--shell-frame-bg);
  box-shadow: 0 0 0 1px var(--shell-border);
  transition: width 0.2s ease, max-width 0.2s ease;
  overflow: hidden;
}

.shell-frame-wrap.is-tablet,
.shell-frame-wrap.is-mobile {
  margin-top: 12px;
  margin-bottom: 12px;
  height: calc(100% - 24px);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.shell-frame-wrap.is-tablet {
  width: 768px;
  max-width: calc(100% - 24px);
}

.shell-frame-wrap.is-mobile {
  width: 390px;
  max-width: calc(100% - 24px);
}

#shell-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

body.no-bar .shell-stage {
  height: 100%;
}

@media (max-width: 1023px) {
  .shell-bar__devices {
    display: none !important;
  }

  .shell-frame-wrap.is-tablet,
  .shell-frame-wrap.is-mobile {
    width: 100%;
    max-width: 100%;
    margin: 0;
    height: 100%;
    border-radius: 0;
    box-shadow: 0 0 0 1px var(--shell-border);
  }
}
