.dimension-corner-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  flex-shrink: 0;
  padding: 0 16px;
  border: 1px solid #4f46e5;
  border-radius: 999px;
  color: #3730a3;
  background: #eef2ff;
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.14);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.dimension-corner-link:hover {
  color: #fff;
  background: #4f46e5;
}

.dimension-corner-link:focus-visible,
.dimension-choice-action:focus-visible {
  outline: 3px solid #4f46e5;
  outline-offset: 3px;
}

.dimension-choice {
  position: fixed;
  inset: 0;
  width: min(680px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100% - 32px);
  margin: auto;
  padding: clamp(28px, 6vw, 54px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 24px;
  color: #252044;
  background: linear-gradient(145deg, #fff, #f5f3ff 64%, #e8f5ff);
  box-shadow: 0 30px 90px rgba(20, 20, 65, 0.33);
}

.dimension-choice::backdrop {
  background: rgba(18, 20, 50, 0.7);
  backdrop-filter: blur(8px);
}

.dimension-choice [hidden] {
  display: none;
}

.dimension-choice-kicker {
  margin: 0 0 24px;
  color: #5046bd;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.dimension-choice h1 {
  margin: 0;
  color: #251d59;
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 750;
  line-height: 1.08;
}

.dimension-choice-lead {
  margin: 22px 0 0;
  color: #514d70;
  font-size: 17px;
  line-height: 1.7;
}

.dimension-choice-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 32px;
}

.dimension-choice-actions.welcome {
  grid-template-columns: minmax(0, 270px);
}

.dimension-choice-action {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.dimension-choice-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 22px rgba(39, 33, 116, 0.17);
}

.dimension-choice-action.primary {
  border: 1px solid #4f46e5;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #4338ca);
}

.dimension-choice-action.secondary {
  border: 1px solid #b8b4df;
  color: #3730a3;
  background: #fff;
}

.dimension-choice-actions:has(.secondary:is(:hover, :focus-visible)) .primary {
  border-color: #b8b4df;
  color: #3730a3;
  background: #fff;
}

.dimension-choice-actions .secondary:is(:hover, :focus-visible) {
  border-color: #4f46e5;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #4338ca);
}

.dimension-choice-note {
  margin: 22px 0 0;
  color: #716c8a;
  font-size: 12px;
}

@media (prefers-reduced-motion: reduce) {
  .dimension-choice-action { transition: none; }
}

@media (max-width: 600px) {
  .dimension-corner-link { padding: 0 10px; font-size: 11px; }
  .dimension-choice-actions,
  .dimension-choice-actions.welcome { grid-template-columns: 1fr; }
  .dimension-choice-lead { font-size: 15px; }
}
