.pf-saved-page { padding: 16px 0 32px; }

.pf-saved-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-bottom: 16px;
}

.pf-saved-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.pf-saved-views {
  display: inline-flex;
  border: 1px solid var(--pf-border);
  border-radius: 6px;
  background: var(--pf-surface);
}

.pf-saved-toolbar button {
  min-height: 26px;
  padding: 0 12px;
  color: var(--pf-text-muted);
  font: 700 12px/1.25 "JetBrains Mono", monospace;
}

.pf-saved-views button:first-child { border-radius: 5px 0 0 5px; }
.pf-saved-views button:last-child { border-radius: 0 5px 5px 0; }
.pf-saved-toolbar button:hover { color: var(--pf-text-strong); background: var(--pf-surface-muted); }
.pf-saved-views button[aria-pressed="true"],
.pf-saved-toolbar .pf-saved-done {
  background: #2c5ebd;
  color: #fff;
}

.pf-saved-toolbar :is(.pf-saved-reorder, .pf-saved-done) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border: 1px solid var(--pf-border);
  border-radius: 6px;
}
.pf-saved-toolbar .pf-saved-reorder {
  width: 28px;
  padding: 0;
  background: var(--pf-surface);
}
.pf-saved-toolbar .pf-saved-reorder:hover { background: var(--pf-surface-muted); }
.pf-saved-reorder .material-symbols-outlined { font-size: 16px; }
.pf-saved-toolbar .pf-saved-done:hover { background: #244fa0; }
.pf-saved-toolbar button:focus-visible,
.pf-saved-order button:focus-visible,
.pf-saved-chart-scroll:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}

/* Use the Browse card as-is, with room for wrapping and a stable chart height. */
.pf-saved-compact .pf-resort-card { min-width: 0; }
.pf-saved-compact .pf-card-identity { overflow-wrap: anywhere; }
.pf-saved-compact .pf-card-name,
.pf-saved-name h2,
.pf-saved-order-label {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.pf-saved-compact .pf-card-chart > div:first-child { margin-bottom: 12px; }
.pf-saved-compact [data-card-viz] { min-height: 96px; }
.pf-saved-skeleton { min-height: 250px; border-radius: 6px; }

.pf-saved-details { display: grid; gap: 10px; }
.pf-saved-details .pf-saved-skeleton { min-height: 144px; }

.pf-saved-card {
  border: 1px solid var(--pf-border);
  border-radius: 6px;
  background: var(--pf-surface);
  min-width: 0;
}

.pf-saved-card:hover { border-color: var(--pf-border-strong); }
.pf-saved-link {
  display: grid;
  grid-template-columns: minmax(0, 248px) minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  color: inherit;
  text-decoration: none;
}

.pf-saved-name { display: flex; align-items: center; gap: 8px; }
.pf-saved-name h2 {
  min-width: 0;
  color: var(--pf-text-strong);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.pf-saved-region,
.pf-saved-elevation {
  margin-top: 2px;
  color: var(--pf-text-muted);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.pf-saved-elevation { font: 500 10px/1.4 'JetBrains Mono', monospace; }
.pf-saved-totals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.pf-saved-total dt { color: var(--pf-text-muted); font-size: 10px; }
.pf-saved-total dd {
  color: var(--pf-text-muted);
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  white-space: nowrap;
}

.pf-saved-chart {
  min-width: 0;
  padding-left: 16px;
  border-left: 1px solid var(--pf-border);
}

.pf-saved-chart-heading {
  margin-bottom: 5px;
  color: var(--pf-text-muted);
  font-size: 11px;
  line-height: 1.4;
}

.pf-saved-chart-scroll { overflow-x: auto; scrollbar-width: thin; }
.pf-saved-timeline {
  display: grid;
  grid-template-columns: repeat(var(--saved-columns), minmax(29px, 1fr));
  gap: 5px;
}

.pf-saved-day {
  display: grid;
  grid-template-rows: 17px 55px 15px 13px;
  align-items: center;
  text-align: center;
  font: 500 10px/1.3 'JetBrains Mono', monospace;
}

.pf-saved-day.is-past { padding-right: 4px; border-right: 1px dashed var(--pf-border-strong); }
.pf-saved-day strong { font-size: 11px; white-space: nowrap; }
.pf-saved-bar-track {
  display: flex;
  align-items: flex-end;
  height: 100%;
  border-bottom: 1px solid var(--pf-border);
}

.pf-saved-bar { display: block; width: 100%; border-radius: 2px 2px 0 0; }
.pf-saved-day.is-past .pf-saved-bar { opacity: .65; }
.pf-saved-day-name { color: var(--pf-text-strong); font-weight: 700; }
.pf-saved-date { color: var(--pf-text-muted); white-space: nowrap; font-size: 9px; }
.pf-saved-date-short { display: none; }
.pf-saved-chart-loading, .pf-saved-unavailable { min-height: 100px; }
.pf-saved-unavailable { display: flex; align-items: center; color: var(--pf-text-muted); font-size: 12px; }

.pf-saved-page.is-reordering { max-width: 620px; }
.pf-saved-order { list-style: none; margin: 0; padding: 0; }
.pf-saved-order li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  border-bottom: 1px solid var(--pf-border);
  color: var(--pf-text-strong);
  font-size: 14px;
}

.pf-saved-order li:first-child { border-top: 1px solid var(--pf-border); }
.pf-saved-order li.is-drop-target { background: var(--pf-surface-muted); }
.pf-saved-grip { color: var(--pf-text-muted); font-size: 18px; }
.pf-saved-order-move { display: flex; }
.pf-saved-order button { min-height: 40px; min-width: 36px; color: var(--pf-text-muted); }
.pf-saved-order button:disabled { opacity: .35; cursor: default; }
.pf-saved-order button:hover:not(:disabled) { color: var(--pf-text-strong); }
.pf-saved-order .pf-saved-order-name {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 4px;
  border-radius: 4px;
  color: var(--pf-text-strong);
  text-align: left;
  cursor: grab;
  user-select: none;
}
.pf-saved-order-name:active { cursor: grabbing; }
.pf-saved-order-name:hover,
.pf-saved-order-name[aria-pressed="true"] { background: var(--pf-surface-muted); }
.pf-saved-order-name[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--pf-border-strong); }
.pf-saved-order-label { overflow-wrap: anywhere; }
.pf-saved-remove .material-symbols-outlined { font-size: 19px; }
.pf-saved-empty { color: var(--pf-text-muted); }
.pf-saved-empty a { color: var(--pf-text-strong); text-decoration: underline; }

@media (max-width: 820px) {
  .pf-saved-date-full { display: none; }
  .pf-saved-date-short { display: inline; }
}

@media (max-width: 640px) {
  .pf-saved-header { margin-bottom: 12px; }
  .pf-saved-header h1 { font-size: 25px; line-height: 34px; }
  .pf-saved-compact { gap: 12px; }
  .pf-saved-compact [data-card-viz] { min-height: 72px; }
  .pf-saved-compact [data-card-viz] > .h-24 { height: 72px; }
  .pf-saved-link { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 10px; }
  .pf-saved-chart { padding: 6px 0 0; border-left: 0; border-top: 1px solid var(--pf-border); }
  .pf-saved-timeline { grid-template-columns: repeat(var(--saved-columns), minmax(25px, 1fr)); gap: 4px; }
  .pf-saved-day { grid-template-rows: 16px 38px 14px 12px; }
  .pf-saved-chart-loading, .pf-saved-unavailable { min-height: 80px; }
}

@media (pointer: coarse) {
  .pf-saved-views button { min-height: 38px; }
  .pf-saved-toolbar :is(.pf-saved-reorder, .pf-saved-done) { min-height: 40px; }
  .pf-saved-toolbar .pf-saved-reorder { width: 40px; }
  .pf-saved-grip { display: none; }
  .pf-saved-order button { min-height: 44px; min-width: 44px; }
}
