* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Montserrat", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 12%, rgba(var(--accent-rgb), 0.08), transparent 28%),
    radial-gradient(circle at 92% 8%, rgba(15, 23, 42, 0.05), transparent 26%),
    var(--bg);
  padding: 20px;
}

.shell {
  max-width: 1280px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
  padding: 18px;
}

.shell-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 14px;
  padding: 10px 12px 16px;
  border-bottom: 1px solid var(--soft-border);
}

.brand-lockup {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.brand-logo {
  width: 166px;
  height: auto;
}

.shell-title {
  flex: 1 1 auto;
  min-width: 260px;
  text-align: center;
}

.theme-switcher {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--soft-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--header-shadow);
}

.theme-option {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.theme-option:hover {
  background: rgba(var(--accent-rgb), 0.08);
}

.theme-option.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #ffffff;
  box-shadow: 0 10px 18px rgba(var(--accent-rgb), 0.18);
}

.shell-eyebrow {
  margin: 0 0 4px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 2.6vw, 2.9rem);
  line-height: 0.96;
  font-weight: 700;
  letter-spacing: -0.05em;
  color: var(--ink-deep);
}

.shell-subtitle {
  margin: 8px 0 0;
  font-size: 0.98rem;
  line-height: 1.4;
  color: var(--muted);
}

.shell-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
  margin-left: auto;
  padding: 7px;
  border: 1px solid var(--soft-border);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 247, 0.96));
  box-shadow: var(--header-shadow);
}

.shell-tab {
  border: 1px solid var(--tab-border);
  border-radius: 999px;
  min-height: 56px;
  padding: 0 22px;
  background: var(--tab);
  color: var(--tab-text);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  transition: transform 0.12s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.shell-tab:hover {
  background: var(--tab-hover);
  transform: translateY(-1px);
  border-color: rgba(var(--accent-rgb), 0.25);
}

.shell-tab.active {
  background: linear-gradient(135deg, var(--tab-active), var(--tab-active-deep));
  border-color: transparent;
  color: #ffffff;
  box-shadow:
    0 12px 24px rgba(var(--accent-rgb), 0.24),
    0 1px 0 rgba(255, 255, 255, 0.22) inset;
}

.frame-wrap {
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
}

#pageFrame {
  width: 100%;
  height: calc(100vh - 190px);
  min-height: 720px;
  border: 0;
  display: block;
}

@media (max-width: 860px) {
  body {
    padding: 12px;
  }

  .shell {
    padding: 12px;
  }

  .shell-header {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 8px 6px 14px;
  }

  .brand-lockup {
    justify-content: center;
  }

  .brand-logo {
    width: 150px;
  }

  .shell-title {
    text-align: center;
  }

  .theme-switcher {
    align-self: center;
  }

  h1 {
    font-size: 2rem;
  }

  .shell-tabs {
    margin-left: 0;
    flex-wrap: wrap;
    justify-content: center;
  }

  .shell-tab {
    min-height: 50px;
    padding: 0 18px;
    font-size: 0.98rem;
  }
}

@media (max-width: 560px) {
  .shell {
    padding: 10px;
  }

  .shell-header {
    margin-bottom: 10px;
  }

  .shell-eyebrow {
    font-size: 0.72rem;
  }

  .shell-subtitle {
    font-size: 0.9rem;
  }

  .shell-tabs {
    gap: 8px;
    padding: 6px;
  }

  .shell-tab {
    flex: 1 1 100%;
  }

  #pageFrame {
    height: calc(100vh - 220px);
    min-height: 680px;
  }
}
