.portal-hub {
  color: #342343;
  background: linear-gradient(135deg, #f3e9f8, #dfd1ea);
  border: 1px solid #c5aed6;
  border-radius: 28px;
  padding: clamp(1.25rem, 4vw, 2.75rem);
}

.portal-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.5rem;
  margin-bottom: 1.25rem;
}

.portal-header h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
}

.portal-header p { margin: 0.25rem 0 0; }

.portal-devices {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: 1.1rem;
}

.portal-machine, .portal-tablet, .portal-terminal {
  padding: clamp(0.9rem, 2vw, 1.25rem);
  border-radius: 1.35rem;
}

.portal-machine {
  grid-row: span 2;
  color: #fff5e8;
  background: linear-gradient(160deg, #4b365a, #30243c);
  box-shadow: 0 6px #25192f;
}

.portal-screen {
  margin: 0.65rem 0 0.85rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.55rem;
  background: #202e35;
  color: #bdf8d7;
  box-shadow: inset 0 3px #19252a;
  font: 600 1rem/1.4 ui-monospace, monospace;
}

.portal-tablet {
  background: linear-gradient(155deg, #775c96, #53416c);
  box-shadow: 0 5px #392948;
}

.portal-tablet-display {
  padding: 0.85rem;
  border-radius: 0.75rem;
  background: #f6edff;
  box-shadow: inset 0 3px #ddcce9;
}

.portal-passport { margin: 0.3rem 0; color: #563873; font-weight: 600; }
.portal-stamp-list { list-style: none; padding: 0; margin: 0.55rem 0 0; }
.portal-stamp-list li { display: flex; align-items: baseline; gap: 0.4rem; }
.portal-stamp-list li::before { content: ''; width: 0.65rem; height: 0.65rem; border: 1px solid #6d587e; border-radius: 50%; flex: none; }
.portal-stamp-list .is-stamped::before { background: #24734f; border-color: #24734f; }

.portal-terminal {
  background: #d2e6dd;
  box-shadow: 0 5px #9db8ad;
}

.portal-terminal-keys {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr));
  gap: 0.55rem;
  margin-top: 0.65rem;
}

.portal-terminal-keys a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0.65rem;
  color: #233a35;
  background: #f4fbf7;
  text-decoration: none;
  border-radius: 0.55rem;
  box-shadow: 0 3px #a9c7bb;
  font-weight: 600;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.portal-stop {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 0.35rem;
  min-height: 7.5rem;
  padding: 0.85rem;
  border: 1px solid #fff6;
  border-radius: 1rem;
  background: linear-gradient(150deg, #fffb, transparent), var(--portal-color, #9fe9be);
  box-shadow: 0 5px #25192f;
  color: #261c32;
  text-decoration: none;
}

.portal-stop:nth-child(2) { --portal-color: #d4baff; }
.portal-stop:nth-child(3) { --portal-color: #ffe29d; }
.portal-stop:nth-child(4) { --portal-color: #ffc2df; }
.portal-stop:hover, .portal-terminal-keys a:hover { filter: brightness(1.06); }
.portal-stop:active, .portal-terminal-keys a:active { transform: translateY(3px); box-shadow: none; }
.portal-stop:focus-visible { outline: 3px solid #fff3bf; outline-offset: 3px; }
.portal-terminal-keys a:focus-visible { outline: 3px solid #3b6255; outline-offset: 3px; }
.portal-stop strong { font-size: 1.2rem; }
.portal-icon { font-size: 1.6rem; line-height: 1; }
.portal-stamp { color: #234638; font-weight: 600; }
.portal-return { display: inline-block; margin-top: 1rem; text-decoration: underline; }

@media (max-width: 760px) {
  .portal-devices { grid-template-columns: minmax(0, 1fr); }
  .portal-machine { grid-row: auto; }
}
