:root {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #152d37;
  background: #f4f7f6;
  font-synthesis: none;
  --teal: #087d7b;
  --line: #dde7e8;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { display: flex; flex-direction: column; height: 100dvh; overflow: hidden; }
button, a { font: inherit; touch-action: manipulation; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.shell-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  flex-shrink: 0;
  gap: 8px 24px;
  min-height: 64px;
  padding: 8px max(32px, calc((100vw - 1336px) / 2));
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.shell-brand {
  color: #152d37;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .02em;
  white-space: nowrap;
  text-decoration: none;
}
.shell-brand span { color: var(--teal); }

.shell-tabs {
  display: flex;
  gap: 4px;
  padding-left: 16px;
  border-left: 1px solid var(--line);
}
.shell-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  min-height: 44px;
  padding: 8px 14px;
  border: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #566e78;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}
.shell-tab:hover { background: #f1f7f6; color: var(--teal); }
.shell-tab[aria-selected="true"] {
  background: #eaf5ef;
  border-color: #d6e9df;
  color: var(--teal);
}
.shell-brand:focus-visible, .shell-tab:focus-visible, .frame-retry:focus-visible {
  outline: 3px solid #0f9b9a;
  outline-offset: 3px;
}
.shell-caption { margin-left: auto; color: #566e78; font-size: 14px; white-space: nowrap; }

.shell-main { display: flex; flex: 1; min-height: 0; width: 100%; }
.workbench-panel { display: flex; flex: 1; min-height: 0; position: relative; }
.workbench-frame { display: block; width: 100%; height: 100%; flex: 1; min-width: 0; border: 0; background: #f4f7f6; }
.frame-state {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  background: #f5f8f8;
  color: #566e78;
  text-align: center;
}
.frame-message { margin: 0; line-height: 1.7; }
.frame-spinner { width: 28px; height: 28px; border: 3px solid #d3e6e3; border-top-color: var(--teal); border-radius: 50%; animation: loading .8s linear infinite; }
.frame-retry { min-height: 44px; padding: 10px 18px; border: 1px solid #b3d6d1; border-radius: 8px; background: #fff; color: var(--teal); font-weight: 600; }
.frame-retry:hover { background: #eaf5f3; }
@keyframes loading { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .frame-spinner { animation: none; } }
@media (max-width: 760px) {
  .shell-header { min-height: 64px; gap: 6px 12px; padding: 8px 16px; }
  .shell-brand { font-size: 20px; }
  .shell-tabs { padding-left: 10px; }
  .shell-tab { min-width: 76px; padding: 8px 10px; font-size: 14px; }
  .shell-caption { display: none; }
}
@media (max-width: 360px) {
  .shell-tabs { padding-left: 0; border-left: 0; }
}
