:root {
  --frame-radius: 26px;
  --surface-radius: 19px;
  --control-radius: 12px;
  --surface-shadow: 0 6px 24px color-mix(in srgb, var(--ink) 7%, transparent);
  --control-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 9%, transparent);
  --control-highlight: color-mix(in srgb, var(--ink) 8%, transparent);
}

.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
}

@supports (backdrop-filter: blur(16px)) {
  .site-header {
    background-color: color-mix(in srgb, #fffaf7 87%, transparent);
    backdrop-filter: blur(18px) saturate(140%);
  }
}

.site-header-inner { min-height: 56px; }
.site-shortcuts { gap: 4px; }
.site-shortcuts a { border-radius: var(--control-radius); }
.app { border-radius: var(--frame-radius); box-shadow: var(--surface-shadow); }

.panel, .review-card, .saved-row, .route-row, .summary-box,
.detail-branches, .profile-stores, .showcase-section {
  border-radius: var(--surface-radius);
  box-shadow: var(--surface-shadow);
}

.brand-card, .branch-card, .showcase-banner {
  border-radius: var(--surface-radius);
}

.brand-card, .branch-card, .saved-row,
.discover .brand-card, .discover .brand-card:hover,
.brand-card:active, .branch-card:active {
  box-shadow: var(--surface-shadow);
  transform: none;
}

.btn, .pick, .flow, .flow-trigger, .filter-trigger, .explorers-link,
.brand-star, .experience-stars label, .feedback-favorite {
  border-radius: var(--control-radius);
  box-shadow: var(--control-shadow);
  transition: box-shadow 140ms ease, filter 140ms ease, border-color 140ms ease;
}

.btn:active, .pick:active, .flow:active, .flow-trigger:active,
.filter-trigger:active, .brand-star:active, .feedback-favorite:active,
.brand-card:active, .branch-card:active, .saved-row:active {
  transform: none;
  box-shadow: inset 0 0 0 1px var(--control-highlight);
  filter: brightness(.96);
}

@media (hover: hover) {
  .btn:not(:disabled):hover, .pick:not(:disabled):hover,
  .flow-trigger:hover, .filter-trigger:hover, .explorers-link:hover {
    box-shadow: 0 2px 8px color-mix(in srgb, var(--ink) 13%, transparent);
  }
}

.field input, .field select, .review-compose textarea, .review-compose select,
.profile-edit-form input:not([type=checkbox]), .profile-edit-form select,
.auth-form input {
  min-height: 44px;
  border-radius: var(--control-radius);
  box-shadow: inset 0 1px 2px color-mix(in srgb, var(--ink) 5%, transparent);
}

.personal-profile-tabs, .explorer-tabs {
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 15px;
  gap: 4px;
}

.personal-profile-tabs .btn, .explorer-tabs .btn {
  min-height: 38px;
  border-color: transparent;
  border-radius: 10px;
  box-shadow: none;
}

.personal-profile-tabs .btn[aria-pressed=true],
.explorer-tabs .btn[aria-pressed=true] {
  box-shadow: var(--control-shadow);
}

.flow-options, .category-options, .filter-panel {
  border-radius: var(--surface-radius);
  box-shadow: 0 12px 32px color-mix(in srgb, var(--ink) 16%, transparent);
}

dialog {
  border-radius: var(--frame-radius);
  max-height: min(86dvh, calc(100dvh - 32px));
  box-shadow: 0 24px 64px color-mix(in srgb, var(--ink) 26%, transparent);
}

@supports (backdrop-filter: blur(4px)) {
  dialog::backdrop { backdrop-filter: blur(4px); }
}

@media (pointer: coarse) {
  .btn, .pick, .flow-trigger, .filter-trigger,
  .personal-profile-tabs .btn, .explorer-tabs .btn { min-height: 44px; }
}

@media (max-width: 480px) {
  .site-header { position: relative; }
  dialog { border-radius: 20px; max-height: calc(100dvh - 16px); }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .pick, .flow, .flow-trigger, .filter-trigger, .explorers-link,
  .brand-star, .experience-stars label, .feedback-favorite { transition: none; }
}

:where(button, a, input, select, textarea, summary):focus-visible {
  scroll-margin-top: 68px;
}

.profile-review-list {
  border: 1px solid var(--line);
  border-radius: var(--surface-radius);
  overflow: hidden;
}

.profile-review-row {
  padding: 11px clamp(10px, 2cqw, 16px);
  border: 0;
}

.profile-review-row + .profile-review-row { border-top: 1px solid var(--line); }
.profile-review-row:last-child { border-bottom: 0; }
.profile-review-row:focus-visible { outline-offset: -2px; }
.profile-review-meta { gap: 4px 9px; }
.review-compose, .detail-review, .detail-brand-art, .showcase-hero {
  border-radius: var(--surface-radius);
}

.review-photo img, .review-photo-preview img, .profile-store-image {
  border-radius: 10px;
}

.profile-store-entry, .profile-store-row, .account-row, .account-favorite {
  border-radius: var(--control-radius);
}

.showcase-hero > .brand-feedback, .detail-brand-art .brand-feedback {
  border-radius: 15px;
}

.discover .brand-card .card-action {
  border-radius: 9px;
  padding: 4px 8px;
}

.showcase-banner .campaign-link-label { border-radius: 9px; }

.review-compose .experience-stars label,
.showcase-hero .brand-feedback .brand-star,
.detail-brand-art .brand-feedback .brand-star {
  box-shadow: none;
}

@media (pointer: coarse) {
  .review-compose .experience-stars label { min-height: 44px; }
}
