.portal-quick {
  margin: 18px 0 22px;
  padding: 18px;
  border: 1px solid var(--border-m);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--bg-card), var(--bg-dark));
  box-shadow: var(--shadow);
}
.portal-quick__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.portal-quick__head span,
.portal-preferences-modal__head span {
  display: block;
  margin-bottom: 3px;
  color: var(--gold-t);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.portal-quick__head h3 {
  margin: 0;
  color: var(--bright);
  font-size: 17px;
}
.portal-quick__customize {
  padding: 8px 12px;
  border: 1px solid var(--border-m);
  border-radius: var(--radius);
  background: transparent;
  color: var(--mid);
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}
.portal-quick__customize:hover,
.portal-quick__customize:focus-visible {
  border-color: var(--gold);
  color: var(--bright);
}
.portal-quick__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.portal-quick__card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-mid);
  color: var(--bright);
  text-align: left;
  cursor: pointer;
  transition: border-color var(--motion) var(--ease), transform var(--motion) var(--ease), background var(--motion) var(--ease);
}
.portal-quick__card:hover,
.portal-quick__card:focus-visible {
  border-color: var(--gold);
  background: var(--gold-pale);
  transform: translateY(-1px);
}
.portal-quick__number {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--gold-pale);
  color: var(--gold-t);
  font-size: 10px;
  font-weight: 850;
}
.portal-quick__card strong,
.portal-quick__card small { display: block; }
.portal-quick__card strong {
  overflow: hidden;
  color: var(--bright);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.portal-quick__card small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--dim);
  font-size: 10px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.portal-quick__arrow { color: var(--gold-t); }
.portal-quick__loading { grid-column: 1 / -1; padding: 16px; color: var(--dim); font-size: 12px; }

.portal-preferences-modal {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: grid;
  place-items: center;
  padding: 22px;
}
.portal-preferences-modal__scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .72); backdrop-filter: blur(10px); }
.portal-preferences-modal__card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(760px, 100%);
  max-height: min(820px, calc(100dvh - 44px));
  overflow: hidden;
  border: 1px solid var(--border-m);
  border-radius: var(--radius-xl);
  background: var(--bg-dark);
  box-shadow: var(--shadow-lg);
}
.portal-preferences-modal__head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 26px 18px;
  border-bottom: 1px solid var(--border);
}
.portal-preferences-modal__head h3 { margin: 0; color: var(--bright); font-size: 22px; }
.portal-preferences-modal__head p { max-width: 590px; margin: 7px 0 0; color: var(--mid); font-size: 13px; line-height: 1.55; }
.portal-preferences-modal__head > button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-m);
  border-radius: var(--radius);
  background: var(--bg-mid);
  color: var(--mid);
  font-size: 20px;
  cursor: pointer;
}
.portal-preferences-modal__groups { overflow-x: hidden; overflow-y: auto; padding: 10px 26px 18px; }
.portal-preferences-modal fieldset { margin: 16px 0 0; padding: 0; border: 0; }
.portal-preferences-modal legend { margin-bottom: 8px; color: var(--dim); font-size: 10px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.portal-preferences-modal fieldset > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.portal-preferences-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-mid);
  cursor: pointer;
}
.portal-preferences-choice:has(input:checked) { border-color: var(--gold); background: var(--gold-pale); }
.portal-preferences-choice input { margin-top: 3px; accent-color: var(--gold); }
.portal-preferences-choice strong,
.portal-preferences-choice small { display: block; }
.portal-preferences-choice strong { color: var(--bright); font-size: 12px; }
.portal-preferences-choice small { margin-top: 3px; color: var(--dim); font-size: 10px; line-height: 1.4; }
.portal-preferences-choice:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.portal-preferences-modal__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 26px;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}
.portal-preferences-modal__foot > span { color: var(--mid); font-size: 12px; }
.portal-preferences-modal__foot > div { display: flex; gap: 8px; }

@media (max-width: 1040px) {
  .portal-quick__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .portal-quick { padding: 15px; }
  .portal-quick__grid,
  .portal-preferences-modal fieldset > div { grid-template-columns: 1fr; }
  .portal-preferences-modal { padding: 10px; }
  .portal-preferences-modal__card { max-height: calc(100dvh - 20px); border-radius: var(--radius-lg); }
  .portal-preferences-modal__head { padding: 20px 18px 14px; }
  .portal-preferences-modal__groups { padding: 8px 18px 16px; }
  .portal-preferences-modal__foot { align-items: stretch; flex-direction: column; padding: 14px 18px; }
  .portal-preferences-modal__foot > div { display: grid; grid-template-columns: 1fr 1fr; }
}
