#web-startup {
  position: fixed; inset: 0; z-index: 10;
  box-sizing: border-box; overflow-y: auto; touch-action: pan-y;
  background: radial-gradient(ellipse at 50% 30%, #3d3931, #1b1b1b 80%);
  padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  display: grid; place-items: center;
  font-family: system-ui, sans-serif; line-height: 1.6;
}
#web-startup[hidden] { display: none; }
.startup-card {
  box-sizing: border-box; width: min(100%, 560px); padding: 32px;
  color: #49331f; background: #f6edda; border: 1px solid #ab8854;
  border-radius: 20px; box-shadow: 0 16px 64px #0005;
}
.startup-brand { margin: 0 0 6px; font-size: 13px; letter-spacing: .04em; color: #836544; }
.startup-card h1 { margin: 0 0 22px; font-size: clamp(24px, 5vw, 30px); font-weight: 650; line-height: 1.3; }
.startup-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; }
.startup-card select, .startup-card button { font: inherit; }
.startup-card select { box-sizing: border-box; width: 100%; min-height: 46px; padding: 8px 12px; color: inherit; background: #fffaf0; border: 1px solid #c9b591; border-radius: 8px; }
.startup-card fieldset { border: 0; padding: 0; margin: 20px 0 0; min-width: 0; }
.startup-devices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.startup-devices label { display: flex; align-items: center; gap: 9px; padding: 12px; background: #fffaf0; border: 1px solid #c9b591; border-radius: 8px; cursor: pointer; }
.startup-devices label:has(input:checked) { border-color: #8c6538; background: #e9dbc0; }
.startup-devices input { accent-color: #795730; margin: 0; }
.startup-size { margin: 22px 0 0; font-size: 14px; color: #6b4f31; }
#startup-start { width: 100%; margin-top: 10px; min-height: 48px; padding: 10px 16px; color: #fff9ec; background: #634627; border: 0; border-radius: 8px; cursor: pointer; font-weight: 600; }
#startup-start:hover { background: #7a5733; }
#startup-start:disabled { opacity: .6; cursor: wait; }
.startup-back { display: block; margin-top: 14px; text-align: center; font-size: 14px; color: #6b4f31; }
/* Portal: game choice above the shared language and device fields. */
.startup-card .portal-fieldset { margin: 0 0 20px; }
.portal-projects { display: grid; gap: 10px; }
.portal-projects label { position: relative; display: flex; align-items: center; gap: 14px; padding: 12px 44px 12px 12px; background: #fffaf0; border: 1px solid #c9b591; border-radius: 12px; cursor: pointer; transition: border-color .15s, background-color .15s, box-shadow .15s; }
.portal-projects label:hover { border-color: #a9875a; }
.portal-projects label:has(input:checked) { border-color: #8c6538; background: #efe2c8; box-shadow: 0 0 0 1px #8c6538; }
/* The card itself shows the choice; the radio stays for keyboard and screen readers. */
.portal-projects input { position: absolute; opacity: 0; pointer-events: none; }
.portal-projects label::after { content: ''; position: absolute; right: 16px; top: 50%; width: 18px; height: 18px; margin-top: -10px; border: 1px solid #c9b591; border-radius: 50%; background: #fffaf0; }
.portal-projects label:has(input:checked)::after { border-color: #634627; background: radial-gradient(#634627 0 5px, #fffaf0 6px); }
.portal-projects label:has(input:focus-visible) { outline: 3px solid #bd9352; outline-offset: 3px; }
.portal-icon { flex: none; width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: #e9dbc0; }
.portal-copy { display: grid; gap: 4px; min-width: 0; }
.portal-name { font-weight: 600; line-height: 1.4; }
.portal-size { font-size: 13px; color: #6b4f31; font-variant-numeric: tabular-nums; }
.startup-card :focus-visible { outline: 3px solid #bd9352; outline-offset: 3px; }
@media (max-height: 520px) {
  #web-startup { padding: 12px max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left)); }
  .startup-card { padding: 18px 24px; }
  .startup-card h1 { font-size: 24px; margin-bottom: 12px; }
  .startup-card fieldset { margin-top: 12px; }
  .startup-size { margin-top: 14px; }
}
