.app-shell--physics-studio,
.app-shell--vibe-coding { overflow: hidden; }

.app-shell--physics-studio #main-content,
.app-shell--vibe-coding #main-content {
  height: calc(100vh - var(--ui-site-header-h, 76px) - var(--app-status-h));
  min-height: 620px;
  overflow: auto;
}

.app-shell--physics-studio .wrap {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 0;
}

.app-shell--physics-studio .intro {
  display: flex;
  align-items: center;
  min-height: 74px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--app-line);
  background: var(--app-panel);
  gap: 18px;
}

.app-shell--physics-studio .intro h1 { margin: 0; font-size: 19px; letter-spacing: -.03em; white-space: nowrap; }
.app-shell--physics-studio .intro p { max-width: 820px; margin: 0; color: var(--app-muted); font-size: 12px; line-height: 1.55; }

.app-shell--physics-studio .grid {
  display: grid;
  min-height: 0;
  grid-template-columns: 382px minmax(0, 1fr);
  align-items: stretch;
}

.app-shell--physics-studio #formCard {
  min-height: 0;
  padding: 22px;
  border: 0;
  border-right: 1px solid var(--app-line);
  border-radius: 0;
  overflow-y: auto;
}

.app-shell--physics-studio .field { margin-bottom: 16px; }
.app-shell--physics-studio .field > label { display: block; margin-bottom: 7px; color: var(--app-muted); font-size: 11px; font-weight: 800; }
.app-shell--physics-studio #topic { min-height: 108px; }
.app-shell--physics-studio .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.app-shell--physics-studio .toggles { display: flex; gap: 14px; margin: 2px 0 16px; font-size: 12px; }
.app-shell--physics-studio .toggles label { display: inline-flex; align-items: center; gap: 7px; }
.app-shell--physics-studio .costline { display: flex; justify-content: space-between; margin: 2px 0 12px; color: var(--app-muted); font-size: 11px; }
.app-shell--physics-studio #go { width: 100%; }
.app-shell--physics-studio #err { min-height: 20px; margin-top: 8px; font-size: 12px; }

.app-shell--physics-studio #out {
  min-width: 0;
  min-height: 0;
  padding: 26px max(28px, calc((100% - 840px) / 2));
  background: var(--app-canvas);
  overflow-y: auto;
}

.app-shell--physics-studio #out > .placeholder {
  display: grid;
  place-items: center;
  min-height: 100%;
  color: var(--app-muted);
  font-size: 13px;
  text-align: center;
}

.app-shell--physics-studio #out > .card { padding: 28px; }
.app-shell--physics-studio .toolbar { display: flex; justify-content: flex-end; gap: 7px; padding-bottom: 18px; border-bottom: 1px solid var(--app-line); }
.app-shell--physics-studio .setmeta { padding: 24px 0 14px; }
.app-shell--physics-studio .setmeta h2 { margin: 0 0 6px; font-size: 24px; letter-spacing: -.035em; }
.app-shell--physics-studio .setmeta p { margin: 0; color: var(--app-muted); }
.app-shell--physics-studio .disclaimer { padding: 10px 12px; border-left: 3px solid #d69b24; background: color-mix(in srgb, #f3c55b 12%, var(--app-panel)); color: var(--app-muted); font-size: 11px; }
.app-shell--physics-studio .prob { padding: 26px 0; border-bottom: 1px solid var(--app-line); }
.app-shell--physics-studio .prob:last-child { border-bottom: 0; }
.app-shell--physics-studio .ptop { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.app-shell--physics-studio .ptop h3 { margin: 0; font-size: 18px; }
.app-shell--physics-studio .meta { color: var(--app-muted); font-size: 11px; white-space: nowrap; }
.app-shell--physics-studio .statement { margin-top: 16px; line-height: 1.75; white-space: pre-wrap; }
.app-shell--physics-studio .tasks { margin: 14px 0; padding-left: 22px; }
.app-shell--physics-studio details { margin-top: 10px; border: 1px solid var(--app-line); border-radius: 6px; background: var(--app-panel-muted); }
.app-shell--physics-studio summary { padding: 11px 13px; cursor: pointer; font-size: 12px; font-weight: 750; }
.app-shell--physics-studio details .inner { padding: 0 14px 14px; }
.app-shell--physics-studio .step,
.app-shell--physics-studio .hintitem { padding: 10px 0; border-top: 1px solid var(--app-line); }
.app-shell--physics-studio .final { margin-top: 10px; padding: 12px; border-left: 3px solid var(--app-blue); background: var(--app-blue-soft); }
.app-shell--physics-studio .sectitle { margin-top: 16px; color: var(--app-muted); font-size: 11px; font-weight: 800; }
.app-shell--physics-studio .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.app-shell--physics-studio .mistakes { color: var(--app-muted); font-size: 12px; }

.app-shell--vibe-coding .page {
  width: min(1120px, calc(100% - 56px));
  margin: 0 auto;
  padding: 30px 0 54px;
}

.app-shell--vibe-coding .intro { display: grid; grid-template-columns: 260px 1fr; gap: 10px 36px; padding: 0 0 24px; border-bottom: 1px solid var(--app-line); }
.app-shell--vibe-coding .eyebrow { grid-row: 1 / 3; color: var(--app-blue); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.app-shell--vibe-coding .intro h1 { margin: 0; font-size: 30px; letter-spacing: -.045em; }
.app-shell--vibe-coding .intro p { margin: 0; color: var(--app-muted); font-size: 13px; line-height: 1.65; }
.app-shell--vibe-coding #wizard { width: min(820px, 100%); margin: 30px auto 0; }
.app-shell--vibe-coding .progress { display: flex; gap: 5px; margin-bottom: 16px; }
.app-shell--vibe-coding .dot { height: 4px; flex: 1; border-radius: 4px; background: var(--app-line); }
.app-shell--vibe-coding .dot.done,
.app-shell--vibe-coding .dot.now { background: var(--app-blue); }
.app-shell--vibe-coding .qcard { padding: 28px; border: 1px solid var(--app-line); border-radius: 8px; background: var(--app-panel); }
.app-shell--vibe-coding .qstep { color: var(--app-blue); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.app-shell--vibe-coding .qcard h2 { margin: 8px 0 5px; font-size: 22px; letter-spacing: -.035em; }
.app-shell--vibe-coding .qhelp { margin: 0 0 22px; color: var(--app-muted); font-size: 13px; }
.app-shell--vibe-coding .qcard > textarea { min-height: 140px; }
.app-shell--vibe-coding .examples,
.app-shell--vibe-coding .chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.app-shell--vibe-coding .ex,
.app-shell--vibe-coding .chip { cursor: pointer; }
.app-shell--vibe-coding button.chip.on,
.app-shell--vibe-coding .opt.on { border-color: var(--app-blue); background: var(--app-blue-soft); color: var(--app-blue); }
.app-shell--vibe-coding .freerow { margin-top: 18px; }
.app-shell--vibe-coding .freerow label,
.app-shell--vibe-coding .ctrl label { display: block; margin-bottom: 7px; color: var(--app-muted); font-size: 11px; font-weight: 750; }
.app-shell--vibe-coding .opts { display: grid; gap: 8px; }
.app-shell--vibe-coding .opt { width: 100%; padding: 14px; border: 1px solid var(--app-line); border-radius: 6px; background: var(--app-panel); color: var(--app-ink); text-align: left; }
.app-shell--vibe-coding .ot { font-weight: 750; }
.app-shell--vibe-coding .od { margin-top: 4px; color: var(--app-muted); font-size: 12px; line-height: 1.55; }
.app-shell--vibe-coding .navrow { display: flex; align-items: center; gap: 8px; margin-top: 24px; }
.app-shell--vibe-coding .review { border-top: 1px solid var(--app-line); }
.app-shell--vibe-coding .rv { display: grid; grid-template-columns: 110px 1fr; padding: 10px 0; border-bottom: 1px solid var(--app-line); }
.app-shell--vibe-coding .rv .k { color: var(--app-muted); font-size: 11px; }
.app-shell--vibe-coding .rv .v { font-size: 13px; font-weight: 650; }
.app-shell--vibe-coding .ctrlrow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.app-shell--vibe-coding .costline { margin-top: 12px; color: var(--app-muted); font-size: 12px; }
.app-shell--vibe-coding .loading { width: 560px; margin: 80px auto; text-align: center; }
.app-shell--vibe-coding .orb { width: 28px; height: 28px; margin: 0 auto 14px; border: 3px solid var(--app-line); border-top-color: var(--app-blue); border-radius: 50%; animation: app-spin .8s linear infinite; }
.app-shell--vibe-coding .result { width: min(1000px, 100%); margin: 30px auto; }
.app-shell--vibe-coding .result .hero { padding: 28px; border-bottom: 1px solid var(--app-line); }
.app-shell--vibe-coding .result .box { padding: 22px; margin-top: 14px; }
.app-shell--vibe-coding .result .actions { display: flex; flex-wrap: wrap; gap: 8px; }

@media (max-width: 1120px) {
  .app-shell--physics-studio .grid { grid-template-columns: 340px minmax(0, 1fr); }
  .app-shell--vibe-coding .page { width: calc(100% - 40px); }
}

@media (max-width: 760px) {
  .app-shell--physics-studio #main-content,
  .app-shell--vibe-coding #main-content { min-height: 0; }
  .app-shell--physics-studio .intro { align-items: flex-start; flex-direction: column; gap: 6px; padding: 14px; }
  .app-shell--physics-studio .intro h1 { white-space: normal; }
  .app-shell--physics-studio .grid { grid-template-columns: 1fr; }
  .app-shell--physics-studio #formCard { padding: 16px; border-right: 0; border-bottom: 1px solid var(--app-line); overflow: visible; }
  .app-shell--physics-studio .two { grid-template-columns: 1fr; }
  .app-shell--physics-studio #out { min-height: 360px; padding: 18px 14px; overflow: visible; }
  .app-shell--physics-studio #out > .card { padding: 18px; }
  .app-shell--physics-studio .ptop { align-items: flex-start; flex-direction: column; gap: 6px; }

  .app-shell--vibe-coding .page { width: calc(100% - 28px); padding-block: 20px 38px; }
  .app-shell--vibe-coding .intro { grid-template-columns: 1fr; gap: 8px; }
  .app-shell--vibe-coding .eyebrow { grid-row: auto; }
  .app-shell--vibe-coding .intro h1 { font-size: 25px; }
  .app-shell--vibe-coding #wizard { margin-top: 20px; }
  .app-shell--vibe-coding .qcard { padding: 18px; }
  .app-shell--vibe-coding .rv { grid-template-columns: 86px minmax(0, 1fr); }
  .app-shell--vibe-coding .ctrlrow { grid-template-columns: 1fr; }
  .app-shell--vibe-coding .loading { width: 100%; margin-block: 50px; }
  .app-shell--vibe-coding .result .hero,
  .app-shell--vibe-coding .result .box { padding: 18px; }
}
