/* Base */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

@media (max-width: 768px) and (pointer: coarse) {
  html,
  body {
    overscroll-behavior-y: none;
  }
}

.mobile-pull-action-indicator {
  --pull-progress: 0;
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  left: 50%;
  z-index: 10000;
  min-height: 34px;
  box-sizing: border-box;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(16, 18, 21, 0.94);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.36);
  color: rgba(248, 246, 239, 0.94);
  font-size: 12px;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-150% + (18px * var(--pull-progress)))) scale(0.96);
  transition: opacity 120ms ease, transform 120ms ease, border-color 120ms ease;
  white-space: nowrap;
}

.mobile-pull-action-visible .mobile-pull-action-indicator {
  opacity: 1;
}

.mobile-pull-action-indicator.is-armed {
  border-color: rgba(85, 207, 255, 0.78);
  transform: translate(-50%, 0) scale(1);
}

/* My Deck Manager */
.deck-manager-page {
  min-height: 100vh;
  margin: 0;
  color: #171717;
  background:
    radial-gradient(circle at 12% 0%, rgba(99, 69, 255, 0.12), transparent 32rem),
    #f5f4f0;
}

.deck-manager-shell {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 36px 0 88px;
}

.deck-manager-header {
  display: grid;
  gap: 30px;
  margin-bottom: 38px;
}

.deck-manager-header-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.deck-manager-back-link,
.deck-manager-text-button {
  width: max-content;
  color: inherit;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
}

.deck-manager-public-link {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.deck-manager-public-link:disabled {
  cursor: default;
  opacity: 0.35;
}

.deck-manager-text-button {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.deck-manager-header-copy {
  max-width: 720px;
}

.deck-manager-eyebrow {
  margin-bottom: 8px;
  color: #6650d8;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.deck-manager-header h1 {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 5.5rem);
  line-height: 0.94;
  letter-spacing: -0.065em;
}

.deck-manager-header p {
  max-width: 620px;
  margin: 20px 0 0;
  color: #5e5b55;
  font-size: 1.05rem;
  line-height: 1.65;
}

.deck-manager-view {
  min-width: 0;
}

.deck-manager-list-toolbar,
.deck-manager-editor-head,
.deck-manager-status-row,
.deck-manager-save-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.deck-manager-list-toolbar {
  margin-bottom: 20px;
}

.deck-manager-list-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.deck-manager-list-toolbar h2,
.deck-manager-editor-head h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: -0.04em;
}

.deck-manager-filters {
  display: flex;
  gap: 6px;
  padding: 5px;
  border: 1px solid #d7d3ca;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
}

.deck-manager-filter {
  padding: 9px 15px;
  border: 0;
  border-radius: 999px;
  color: #5e5b55;
  background: transparent;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 750;
  cursor: pointer;
}

.deck-manager-filter.is-active {
  color: #fff;
  background: #171717;
}

.deck-manager-status,
.deck-manager-inline-status {
  min-height: 1.4em;
  color: #6650d8;
  font-size: 0.9rem;
  line-height: 1.45;
}

.deck-manager-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  min-width: 0;
  gap: 14px;
}

.deck-manager-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  align-items: center;
  gap: 24px;
  padding: 24px;
  border: 1px solid #d9d5cd;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 10px 28px rgba(33, 29, 20, 0.04);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.deck-manager-card:hover,
.deck-manager-card:focus-visible {
  border-color: #9b8ff0;
  box-shadow: 0 16px 36px rgba(67, 48, 150, 0.11);
  outline: none;
  transform: translateY(-2px);
}

.deck-manager-card h3 {
  max-width: 100%;
  margin: 0;
  font-size: 1.25rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.deck-manager-card p {
  display: -webkit-box;
  max-width: 720px;
  margin: 8px 0 15px;
  overflow: hidden;
  color: #6b675f;
  line-height: 1.5;
  overflow-wrap: anywhere;
  word-break: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.deck-manager-card-body {
  min-width: 0;
  max-width: 100%;
}

.deck-manager-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.deck-manager-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.deck-manager-meta-pill,
.deck-manager-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid #dedad1;
  border-radius: 999px;
  color: #68645d;
  background: #f8f7f3;
  font-size: 0.76rem;
  font-weight: 760;
}

.deck-manager-meta-pill.private,
.deck-manager-badge.private {
  color: #4f4b45;
  background: #ece9e2;
}

.deck-manager-meta-pill.public,
.deck-manager-badge.public {
  border-color: #b5aaff;
  color: #4f37bc;
  background: #eeeaff;
}

.deck-manager-meta-pill.favorite { gap: 5px; }
.deck-manager-meta-pill.favorite .ui-icon { width: 13px; height: 13px; color: #d6a700; }

.deck-manager-empty {
  padding: 70px 28px;
  border: 1px dashed #c8c2b7;
  border-radius: 22px;
  text-align: center;
  background: rgba(255, 255, 255, 0.54);
}

.deck-manager-empty h3 {
  margin: 0 0 8px;
  font-size: 1.5rem;
}

.deck-manager-empty p {
  margin: 0 0 24px;
  color: #6b675f;
}

.deck-manager-editor-head {
  margin: 28px 0 18px;
}

.deck-manager-editor-head > div {
  min-width: 0;
  max-width: 100%;
}

.deck-manager-editor-head h2 {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.deck-manager-muted {
  margin: 8px 0 0;
  color: #777269;
  font-size: 0.88rem;
}

.deck-manager-form {
  display: grid;
  gap: 16px;
}

.deck-manager-section {
  margin-top: 16px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid #d9d5cd;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 34px rgba(33, 29, 20, 0.045);
}

.deck-manager-section.danger {
  border-color: #edc8c3;
  background: #fff9f8;
}

.deck-manager-section-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 24px;
}

.deck-manager-section-number {
  display: grid;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #171717;
  font-size: 0.78rem;
  font-weight: 820;
}

.deck-manager-section-heading h3 {
  margin: 2px 0 4px;
  font-size: 1.15rem;
}

.deck-manager-section-heading p,
.deck-manager-note {
  margin: 0;
  color: #706c64;
  font-size: 0.9rem;
  line-height: 1.55;
}

.deck-manager-field {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  font-size: 0.88rem;
  font-weight: 760;
}

.deck-manager-field input,
.deck-manager-field textarea,
.deck-manager-field select,
.deck-manager-field-grid select {
  width: 100%;
  box-sizing: border-box;
  padding: 13px 14px;
  border: 1px solid #cbc6bc;
  border-radius: 12px;
  color: #171717;
  background: #fff;
  font: inherit;
  font-weight: 500;
}

.deck-manager-field textarea {
  resize: vertical;
}

.deck-manager-field small {
  justify-self: end;
  color: #837e75;
  font-weight: 500;
}

.deck-manager-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.deck-manager-row-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 18px;
  border: 1px solid #cbc6bc;
  border-radius: 14px;
  color: #171717;
  background: #fff;
  font: inherit;
  font-weight: 780;
  cursor: pointer;
}

.deck-manager-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.deck-manager-actions.compact {
  justify-content: flex-end;
  margin-top: 0;
}

.deck-manager-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #171717;
  border-radius: 11px;
  color: #171717;
  background: transparent;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 780;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.deck-manager-button.primary {
  color: #fff;
  background: #171717;
}

.deck-manager-button.secondary {
  border-color: #c9c4ba;
  background: #fff;
}

.deck-manager-button.ghost {
  border-color: transparent;
  color: #685fc1;
}

.deck-manager-button.danger {
  border-color: #c64136;
  color: #ad2f27;
  background: #fff;
}

.deck-manager-button.small {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 0.77rem;
}

.deck-manager-button:disabled,
.deck-manager-row-action:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.deck-manager-save-row {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e3dfd6;
}

.deck-manager-status-row {
  padding: 15px 17px;
  border-radius: 13px;
  background: #f3f1ec;
}

.deck-manager-playlist-status {
  padding: 14px 16px;
  border-radius: 13px;
  color: #57524a;
  background: #f3f1ec;
  font-size: 0.9rem;
}

.deck-manager-playlist-list {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.deck-manager-playlist-actions {
  align-items: flex-start;
  flex-direction: column;
}

.deck-manager-playlist-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 15px;
  border: 1px solid #dfdbd2;
  border-radius: 13px;
  background: #fff;
}

.deck-manager-playlist-row > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.deck-manager-playlist-row strong {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.deck-manager-playlist-kind {
  color: #777168;
  font-size: 0.72rem;
  font-weight: 760;
  text-transform: uppercase;
}

.deck-track-drawer,
.deck-manager-dialog {
  position: fixed;
  z-index: 1000;
  inset: 0;
  visibility: hidden;
  pointer-events: none;
}

.deck-track-drawer {
  z-index: 1300;
}

.deck-track-drawer.open,
.deck-manager-dialog.open {
  visibility: visible;
  pointer-events: auto;
}

.deck-track-drawer-backdrop,
.deck-manager-dialog-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(20, 18, 15, 0.46);
  opacity: 0;
  transition: opacity 200ms ease;
}

.deck-track-drawer.open .deck-track-drawer-backdrop,
.deck-manager-dialog.open .deck-manager-dialog-backdrop {
  opacity: 1;
}

.deck-track-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr) auto auto;
  width: min(560px, 94vw);
  height: 100%;
  box-sizing: border-box;
  padding: 24px;
  background: #f8f7f3;
  box-shadow: -22px 0 60px rgba(15, 12, 8, 0.2);
  transform: translateX(102%);
  transition: transform 220ms ease;
}

.deck-track-drawer.open .deck-track-drawer-panel {
  transform: translateX(0);
}

.deck-track-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid #ddd8ce;
}

.deck-track-drawer-header h2 {
  margin: 0;
  font-size: 1.65rem;
}

.deck-track-drawer-header p {
  margin: 5px 0 0;
  color: #777168;
}

.deck-track-drawer-close {
  width: 40px;
  height: 40px;
  border: 1px solid #d3cec5;
  border-radius: 50%;
  background: #fff;
  font-size: 1.4rem;
  cursor: pointer;
}

.deck-track-public-note {
  margin: 16px 0 0;
  padding: 11px 13px;
  border-radius: 10px;
  color: #5140a8;
  background: #eeeaff;
  font-size: 0.84rem;
  line-height: 1.5;
}

.deck-track-drawer-panel > .deck-manager-note {
  margin: 14px 0;
}

.deck-track-add-from-cart {
  justify-self: start;
  margin: 0 0 14px;
}

.deck-track-drawer-list {
  display: grid;
  align-content: start;
  min-height: 0;
  gap: 8px;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.deck-track-row {
  display: grid;
  grid-template-columns: 24px 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 10px;
  border: 1px solid #ddd8ce;
  border-radius: 13px;
  background: #fff;
}

.deck-track-row.dragging {
  opacity: 0.45;
}

.deck-track-row.touch-dragging {
  box-shadow: 0 0 0 2px rgba(255, 216, 77, 0.42);
}

.deck-track-handle {
  color: #8a857c;
  cursor: grab;
  font-size: 18px;
  text-align: center;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.deck-track-row img {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  object-fit: cover;
  background: #e8e4dc;
}

.deck-track-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.deck-track-copy strong,
.deck-track-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deck-track-copy span {
  color: #777168;
  font-size: 0.78rem;
}

.deck-track-actions {
  display: flex;
  gap: 4px;
}

.deck-track-actions button {
  min-width: 30px;
  min-height: 30px;
  padding: 4px 7px;
  border: 1px solid #d3cec5;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 0.72rem;
  cursor: pointer;
}

.deck-track-actions button:disabled {
  opacity: 0.35;
}

.deck-track-drawer-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid #ddd8ce;
}

.deck-track-drawer-open {
  overflow: hidden;
}

.deck-manager-toast {
  position: fixed;
  z-index: 1100;
  right: 26px;
  bottom: 26px;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 13px 15px;
  border-radius: 12px;
  color: #fff;
  background: #171717;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.24);
}

.deck-manager-toast button {
  padding: 0;
  border: 0;
  color: #c7bbff;
  background: transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.deck-manager-dialog {
  display: grid;
  place-items: center;
  padding: 18px;
  box-sizing: border-box;
}

.deck-manager-dialog-panel {
  position: relative;
  width: min(500px, 100%);
  box-sizing: border-box;
  padding: 28px;
  border-radius: 20px;
  background: #f8f7f3;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transition: opacity 180ms ease, transform 180ms ease;
}

.deck-manager-dialog.open .deck-manager-dialog-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.deck-cart-picker-dialog {
  z-index: 1400;
}

.deck-cart-picker-dialog .deck-manager-dialog-panel {
  display: flex;
  flex-direction: column;
  max-height: min(720px, calc(100vh - 36px));
  max-height: min(720px, calc(100dvh - 36px));
  overflow: hidden;
}

.deck-cart-picker-dialog.has-items .deck-manager-dialog-panel {
  height: min(720px, calc(100vh - 36px));
  height: min(720px, calc(100dvh - 36px));
}

.deck-playlist-compare-dialog {
  z-index: 1400;
}

.deck-playlist-compare-dialog .deck-manager-dialog-panel {
  display: flex;
  flex-direction: column;
  width: min(1120px, 100%);
  height: min(780px, calc(100dvh - 36px));
  max-height: min(780px, calc(100dvh - 36px));
  overflow: hidden;
}

.deck-playlist-compare-mobile-nav,
.deck-playlist-compare-mobile-close {
  display: none;
}

.deck-playlist-simple-sync {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(196, 181, 253, 0.35);
  border-radius: 14px;
  background: linear-gradient(120deg, rgba(79, 195, 255, 0.1), rgba(67, 232, 153, 0.08));
}

.deck-playlist-simple-sync strong {
  color: #ddd6fe;
  font-size: 0.9rem;
}

.deck-playlist-simple-sync p {
  margin: 3px 0 0;
  color: rgba(248, 246, 239, 0.66);
  font-size: 0.78rem;
  line-height: 1.4;
}

.deck-playlist-simple-sync-actions {
  display: flex;
  gap: 8px;
}

.deck-playlist-simple-sync-actions .deck-manager-button {
  min-height: 38px;
  padding: 8px 12px;
  white-space: nowrap;
}

.deck-playlist-simple-sync-actions .sync-to-deck {
  border-color: rgba(79, 195, 255, 0.65);
  color: #7dd3fc;
  background: rgba(79, 195, 255, 0.13);
}

.deck-playlist-simple-sync-actions .sync-to-playlist {
  border-color: rgba(67, 232, 153, 0.65);
  color: #6ee7b7;
  background: rgba(67, 232, 153, 0.13);
}

.deck-playlist-compare-viewport {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 12px;
  overflow: hidden;
}

.deck-playlist-compare-panes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  height: 100%;
  gap: 16px;
}

.deck-playlist-compare-pane {
  --compare-accent: #4fc3ff;
  --compare-accent-rgb: 79, 195, 255;
  --compare-choice-column: 32px;
  --compare-choice-gap: 4px;
  --compare-row-padding: 10px;
  --compare-artwork-size: 48px;
  --compare-artwork-offset: 8px;
  --compare-copy-offset: 8px;
  --compare-artwork-column: calc(var(--compare-artwork-size) + var(--compare-artwork-offset));
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 16px;
  border: 1px solid rgba(var(--compare-accent-rgb), 0.58);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(var(--compare-accent-rgb), 0.14), rgba(255, 255, 255, 0.025) 30%);
}

.deck-playlist-compare-pane.is-playlist {
  --compare-accent: #43e899;
  --compare-accent-rgb: 67, 232, 153;
}

.deck-playlist-compare-pane-header {
  display: grid;
  min-height: 108px;
  gap: 5px;
  align-content: start;
}

.deck-playlist-compare-pane-label {
  color: var(--compare-accent);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.deck-playlist-compare-pane-header h3 {
  margin: 0;
  overflow-wrap: anywhere;
  color: rgba(248, 246, 239, 0.96);
  font-size: 1.15rem;
  line-height: 1.25;
}

.deck-playlist-compare-pane-header strong {
  color: rgba(248, 246, 239, 0.9);
  font-size: 0.88rem;
  line-height: 1.45;
}

.deck-playlist-compare-pane .deck-cart-picker-list {
  margin-top: 6px;
  padding-right: 4px;
}

.deck-playlist-compare-pane .deck-playlist-compare-item {
  grid-template-columns: var(--compare-choice-column) var(--compare-choice-column) var(--compare-artwork-column) minmax(0, 1fr);
  column-gap: var(--compare-choice-gap);
  padding: var(--compare-row-padding);
  cursor: default;
}

.deck-playlist-compare-item.is-missing {
  border-color: rgba(var(--compare-accent-rgb), 0.58);
  background: rgba(var(--compare-accent-rgb), 0.12);
}

.deck-playlist-compare-item.is-own-only {
  border-color: rgba(248, 113, 113, 0.5);
  background: rgba(220, 38, 38, 0.1);
}

.deck-playlist-compare-item.is-add-selected {
  box-shadow: inset 3px 0 0 var(--compare-accent);
}

.deck-playlist-compare-item.is-remove-selected {
  border-color: rgba(248, 113, 113, 0.58);
  background: rgba(220, 38, 38, 0.13);
  box-shadow: inset 3px 0 0 #ef4444;
}

.deck-playlist-compare-item.is-common {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.035);
}

.deck-playlist-compare-pane .deck-playlist-compare-item > img {
  grid-column: 3;
  width: var(--compare-artwork-size);
  height: var(--compare-artwork-size);
  margin-left: var(--compare-artwork-offset);
}

.deck-playlist-compare-item > .deck-cart-picker-copy {
  grid-column: 4;
  box-sizing: border-box;
  padding-left: var(--compare-copy-offset);
}

.deck-playlist-compare-overflow {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deck-cart-picker-copy .deck-playlist-compare-overflow-text {
  display: inline;
  max-width: none;
  overflow: visible;
  color: inherit;
  font: inherit;
  text-overflow: clip;
  white-space: nowrap;
}

.deck-playlist-compare-choice {
  display: grid;
  width: var(--compare-choice-column);
  height: 36px;
  place-items: center;
  border-radius: 8px;
}

.deck-playlist-compare-choice.is-add {
  background: rgba(var(--compare-accent-rgb), 0.1);
}

.deck-playlist-compare-choice.is-remove {
  background: rgba(239, 68, 68, 0.1);
}

.deck-playlist-compare-choice input {
  width: 17px;
  height: 17px;
  margin: 0;
}

.deck-playlist-compare-choice.is-add input {
  accent-color: var(--compare-accent);
}

.deck-playlist-compare-choice.is-remove input {
  accent-color: #ef4444;
}

.deck-playlist-compare-choice:has(input:disabled) {
  opacity: 0.34;
  cursor: not-allowed;
}

.deck-playlist-compare-item-note {
  font-size: 0.72rem;
  font-weight: 800;
}

.deck-playlist-compare-item-note.is-missing {
  color: var(--compare-accent);
}

.deck-playlist-compare-item-note.is-own-only {
  color: #fca5a5;
}

.deck-playlist-compare-item-note.is-common {
  color: rgba(248, 246, 239, 0.46);
}

.deck-playlist-compare-bulk {
  display: grid;
  grid-template-columns: repeat(2, var(--compare-choice-column));
  align-items: center;
  justify-content: start;
  gap: var(--compare-choice-gap);
  padding: 6px var(--compare-row-padding);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.18);
}

.deck-playlist-compare-bulk.is-top {
  border-radius: 10px 10px 0 0;
}

.deck-playlist-compare-bulk label {
  display: grid;
  align-items: center;
  justify-items: center;
  gap: 2px;
  width: var(--compare-choice-column);
  color: rgba(248, 246, 239, 0.72);
  font-size: 0.52rem;
  font-weight: 800;
  cursor: pointer;
}

.deck-playlist-compare-bulk label.is-add {
  color: var(--compare-accent);
}

.deck-playlist-compare-bulk label.is-remove {
  color: #fca5a5;
}

.deck-playlist-compare-bulk input {
  width: 17px;
  height: 17px;
  margin: 0;
}

.deck-playlist-compare-bulk .is-add input {
  accent-color: var(--compare-accent);
}

.deck-playlist-compare-bulk .is-remove input {
  accent-color: #ef4444;
}

.deck-playlist-compare-bulk label:has(input:disabled) {
  opacity: 0.38;
  cursor: not-allowed;
}

.deck-playlist-compare-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding-top: 10px;
}

.deck-playlist-compare-pane .deck-manager-button.primary.deck-playlist-compare-add {
  width: 100%;
  min-height: 42px;
  border-color: rgba(var(--compare-accent-rgb), 0.72);
  color: var(--compare-accent);
  background: rgba(var(--compare-accent-rgb), 0.16);
  box-shadow: inset 0 0 0 1px rgba(var(--compare-accent-rgb), 0.18);
}

.deck-playlist-compare-pane .deck-playlist-compare-remove {
  width: 100%;
  min-height: 42px;
  border-color: rgba(248, 113, 113, 0.72);
  color: #fecaca;
  background: rgba(220, 38, 38, 0.18);
}

.deck-playlist-compare-close-row {
  flex: 0 0 auto;
  margin-top: 14px;
}

.deck-playlist-confirm-dialog {
  z-index: 1500;
}

.deck-playlist-confirm-dialog .deck-manager-dialog-panel {
  width: min(480px, 100%);
  border: 1px solid rgba(248, 113, 113, 0.36);
}

.deck-playlist-confirm-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin-bottom: 14px;
  border: 1px solid rgba(248, 113, 113, 0.55);
  border-radius: 50%;
  color: #fecaca;
  background: rgba(220, 38, 38, 0.16);
  font-size: 1.2rem;
  font-weight: 900;
}

.deck-playlist-confirm-summary {
  display: grid;
  gap: 8px;
  margin: 20px 0 0;
}

.deck-playlist-confirm-summary > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.deck-playlist-confirm-summary > div[hidden] {
  display: none;
}

.deck-playlist-confirm-summary dt {
  color: rgba(248, 246, 239, 0.65);
  font-size: 0.8rem;
}

.deck-playlist-confirm-summary dd {
  margin: 0;
  color: rgba(248, 246, 239, 0.96);
  font-weight: 850;
  text-align: right;
}

.deck-playlist-confirm-summary .is-add dd {
  color: #7dd3fc;
}

.deck-playlist-confirm-summary .is-remove dd {
  color: #fca5a5;
}

.deck-playlist-confirm-actions .deck-manager-button {
  flex: 1 1 0;
}

.deck-cart-picker-list {
  display: grid;
  flex: 1 1 auto;
  min-height: 0;
  gap: 8px;
  margin-top: 18px;
  overflow: auto;
  overscroll-behavior: contain;
}

.deck-cart-picker-item {
  display: grid;
  grid-template-columns: auto 48px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 10px;
  border: 1px solid #ddd8ce;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

.deck-cart-picker-item.is-duplicate {
  opacity: 0.58;
  cursor: default;
}

.deck-cart-picker-item input {
  width: 18px;
  height: 18px;
  accent-color: #1db954;
}

.deck-cart-picker-item img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  background: #e8e4dc;
}

.deck-cart-picker-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.deck-cart-picker-copy strong,
.deck-cart-picker-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deck-cart-picker-copy span {
  color: #777168;
  font-size: 0.78rem;
}

.deck-cart-picker-copy .deck-cart-picker-duplicate {
  color: #b44d3f;
  font-weight: 750;
}

.deck-cart-picker-select-all {
  flex: 0 0 auto;
  justify-self: start;
  margin-top: 14px;
}

.deck-cart-picker-empty {
  display: grid;
  justify-items: start;
  gap: 16px;
  margin-top: 18px;
  line-height: 1.6;
}

.deck-cart-picker-empty[hidden] {
  display: none;
}

.deck-cart-picker-empty p {
  margin: 0;
  white-space: pre-line;
}

.deck-cart-picker-actions {
  flex: 0 0 auto;
  margin-top: 0;
  padding-top: 18px;
}

.deck-manager-dialog-panel h2 {
  margin: 0 0 8px;
  font-size: 1.45rem;
}

.deck-manager-dialog-panel > p {
  margin: 0;
  color: #6d6860;
  line-height: 1.55;
}

.deck-manager-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  cursor: pointer;
}

.deck-manager-checkbox input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: #1db954;
}

.deck-manager-checkbox span {
  display: grid;
  gap: 4px;
}

.deck-manager-checkbox strong {
  font-size: 0.9rem;
}

.deck-manager-checkbox small {
  color: rgba(248, 246, 239, 0.62);
  font-size: 0.78rem;
  line-height: 1.45;
}

@media (max-width: 720px) {
  .deck-manager-shell {
    width: min(100% - 22px, 1120px);
    padding-top: 22px;
  }

  .deck-manager-list-toolbar,
  .deck-manager-save-row,
  .deck-manager-playlist-row {
    align-items: stretch;
    flex-direction: column;
  }

  .deck-manager-list-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .deck-manager-filters {
    align-self: flex-start;
  }

  .deck-manager-card {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 19px;
  }

  .deck-manager-card-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
    width: 100%;
  }

  .deck-manager-card-actions > .deck-manager-button {
    width: 100%;
  }

  .deck-manager-field-grid {
    grid-template-columns: 1fr;
  }

  .deck-manager-actions,
  .deck-manager-actions.compact {
    justify-content: stretch;
  }

  .deck-manager-actions > .deck-manager-button {
    flex: 1 1 100%;
  }

  .deck-track-drawer-panel {
    top: auto;
    bottom: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: min(92dvh, 860px);
    padding: 18px 14px;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
    transform: translateY(102%);
  }

  .deck-track-drawer-list {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
  }

  .deck-track-drawer-header,
  .deck-track-public-note,
  .deck-track-drawer-panel > .deck-manager-note,
  .deck-track-add-from-cart,
  #deck-track-drawer-status,
  .deck-track-drawer-footer {
    flex: 0 0 auto;
  }

  .deck-track-drawer.open .deck-track-drawer-panel {
    transform: translateY(0);
  }

  .deck-track-row {
    grid-template-columns: 24px 48px minmax(0, 1fr);
  }

  .deck-track-row img {
    width: 48px;
    height: 48px;
  }

  .deck-track-actions {
    grid-column: 2 / -1;
    justify-content: flex-end;
  }

  .deck-manager-toast {
    right: 16px;
    bottom: 16px;
    left: 16px;
    max-width: none;
  }

  .deck-playlist-compare-dialog {
    padding: 10px;
  }

  .deck-playlist-compare-dialog .deck-manager-dialog-panel {
    width: 100%;
    height: calc(100dvh - 20px);
    max-height: calc(100dvh - 20px);
    padding: 18px 14px;
    border-radius: 18px;
  }

  .deck-playlist-compare-dialog .deck-manager-dialog-panel > h2 {
    padding-right: 46px;
  }

  .deck-playlist-compare-mobile-close {
    position: absolute;
    z-index: 2;
    top: 8px;
    right: 8px;
    display: grid;
    width: 44px;
    height: 44px;
    padding: 10px;
    place-items: center;
    border: 0;
    border-radius: 0;
    color: rgba(248, 246, 239, 0.78);
    background: transparent;
    cursor: pointer;
  }

  .deck-playlist-compare-mobile-close:active {
    color: #fff;
    transform: scale(0.92);
  }

  .deck-playlist-compare-mobile-close svg,
  .deck-playlist-compare-mobile-switch svg {
    display: block;
    width: 24px;
    height: 24px;
    pointer-events: none;
  }

  .deck-playlist-compare-dialog .deck-manager-dialog-panel > p {
    font-size: 0.84rem;
    line-height: 1.45;
  }

  .deck-playlist-simple-sync {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 10px;
    padding: 10px;
  }

  .deck-playlist-simple-sync p {
    display: none;
  }

  .deck-playlist-simple-sync-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .deck-playlist-simple-sync-actions .deck-manager-button {
    min-width: 0;
    padding-inline: 7px;
    white-space: normal;
    font-size: 0.74rem;
  }

  .deck-playlist-compare-mobile-nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr);
    gap: 4px;
    margin-top: 12px;
  }

  .deck-playlist-compare-mobile-nav button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    color: rgba(248, 246, 239, 0.62);
    background: rgba(255, 255, 255, 0.05);
    font: inherit;
    font-size: 0.84rem;
    font-weight: 800;
  }

  .deck-playlist-compare-mobile-nav .deck-playlist-compare-mobile-switch {
    min-height: 42px;
    padding: 8px;
    border: 0;
    border-radius: 0;
    color: rgba(248, 246, 239, 0.7);
    background: transparent;
  }

  .deck-playlist-compare-mobile-nav .deck-playlist-compare-mobile-switch:active {
    color: #fff;
    transform: scale(0.92);
  }

  #deck-playlist-compare-show-deck[aria-pressed="true"] {
    border-color: rgba(79, 195, 255, 0.72);
    color: #4fc3ff;
    background: rgba(79, 195, 255, 0.14);
  }

  #deck-playlist-compare-show-playlist[aria-pressed="true"] {
    border-color: rgba(67, 232, 153, 0.72);
    color: #43e899;
    background: rgba(67, 232, 153, 0.14);
  }

  .deck-playlist-compare-viewport {
    margin-top: 10px;
  }

  .deck-playlist-compare-panes {
    display: flex;
    width: 100%;
    gap: 0;
    transition: transform 240ms cubic-bezier(0.22, 0.75, 0.25, 1);
    will-change: transform;
  }

  .deck-playlist-compare-panes[data-active-pane="playlist"] {
    transform: translateX(-100%);
  }

  .deck-playlist-compare-pane {
    --compare-choice-column: 30px;
    --compare-row-padding: 8px;
    --compare-artwork-size: 44px;
    flex: 0 0 100%;
    width: 100%;
    padding: 13px;
    box-sizing: border-box;
  }

  .deck-playlist-compare-pane-header {
    min-height: 82px;
  }

  .deck-playlist-compare-pane-header h3 {
    font-size: 1rem;
  }

  .deck-playlist-compare-pane-header strong {
    font-size: 0.8rem;
  }

  .deck-playlist-compare-close-row {
    display: none;
  }

  .deck-playlist-compare-actions {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .deck-playlist-compare-pane .deck-playlist-compare-item {
    grid-template-columns: var(--compare-choice-column) var(--compare-choice-column) var(--compare-artwork-column) minmax(0, 1fr);
  }

  .deck-playlist-compare-pane .deck-cart-picker-list {
    overflow-y: auto;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
  }

  .deck-playlist-compare-choice {
    width: var(--compare-choice-column);
  }

  .deck-playlist-compare-bulk {
    grid-template-columns: repeat(2, var(--compare-choice-column));
  }

  .deck-playlist-compare-bulk label {
    width: var(--compare-choice-column);
  }

  .deck-playlist-compare-overflow.is-overflowing {
    text-overflow: clip;
  }

  .deck-playlist-compare-overflow.is-overflowing > .deck-playlist-compare-overflow-text {
    display: inline-block;
    animation: deck-playlist-compare-scroll var(--compare-scroll-duration) ease-in-out infinite alternate;
    will-change: transform;
  }

  .deck-playlist-confirm-dialog {
    padding: 12px;
  }
}

@keyframes deck-playlist-compare-scroll {
  0%,
  12% {
    transform: translateX(0);
  }

  88%,
  100% {
    transform: translateX(calc(-1 * var(--compare-scroll-distance)));
  }
}

@media (max-width: 720px) and (prefers-reduced-motion: reduce) {
  .deck-playlist-compare-overflow.is-overflowing {
    text-overflow: ellipsis;
  }

  .deck-playlist-compare-overflow.is-overflowing > .deck-playlist-compare-overflow-text {
    display: inline;
    animation: none;
  }
}

.deck-cart-picker-actions.deck-manager-actions {
  flex-wrap: nowrap;
}

.deck-cart-picker-actions.deck-manager-actions > .deck-manager-button {
  flex: 1 1 0;
  min-width: 0;
}

body {
  background: #000; /* 任意：全体の地色を固定して綺麗に */
  color: #fff;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans JP", sans-serif;
}

/* My Deck Manager: dark editor + live preview */
.deck-manager-page {
  color: rgba(248, 246, 239, 0.96);
  background:
    radial-gradient(circle at top left, rgba(29, 185, 84, 0.12), transparent 30%),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.07), transparent 24%),
    #050505;
  background-attachment: fixed;
}

.deck-manager-shell {
  width: min(1280px, calc(100% - 32px));
}

.deck-manager-back-link,
.deck-manager-text-button {
  color: rgba(248, 246, 239, 0.8);
}

.deck-manager-back-link:hover,
.deck-manager-text-button:hover {
  color: #fff;
}

.deck-manager-eyebrow,
.deck-manager-status,
.deck-manager-inline-status {
  color: rgba(63, 224, 142, 0.9);
}

.deck-manager-header p,
.deck-manager-muted,
.deck-manager-card p,
.deck-manager-empty p,
.deck-manager-section-heading p,
.deck-manager-note,
.deck-manager-field small,
.deck-track-drawer-header p,
.deck-track-copy span,
.deck-manager-dialog-panel > p {
  color: rgba(248, 246, 239, 0.6);
}

.deck-manager-filters {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
}

.deck-manager-filter {
  color: rgba(248, 246, 239, 0.62);
}

.deck-manager-filter.is-active {
  color: #050505;
  background: rgba(248, 246, 239, 0.94);
}

.deck-manager-card,
.deck-manager-empty,
.deck-manager-section {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.deck-manager-card.is-public {
  border-color: rgba(63, 224, 142, 0.44);
  background:
    linear-gradient(105deg, rgba(29, 185, 84, 0.19), rgba(29, 185, 84, 0.045) 58%),
    rgba(255, 255, 255, 0.05);
}

.deck-manager-card.is-private {
  border-color: rgba(166, 177, 198, 0.3);
  background:
    linear-gradient(105deg, rgba(113, 128, 150, 0.17), rgba(113, 128, 150, 0.035) 58%),
    rgba(255, 255, 255, 0.05);
}

.deck-manager-card:hover,
.deck-manager-card:focus-visible {
  border-color: rgba(63, 224, 142, 0.64);
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.38);
}

.deck-manager-card.is-private:hover,
.deck-manager-card.is-private:focus-visible {
  border-color: rgba(191, 201, 219, 0.58);
}

.deck-manager-meta-pill,
.deck-manager-badge,
.deck-manager-meta-pill.private,
.deck-manager-badge.private {
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(248, 246, 239, 0.76);
  background: rgba(255, 255, 255, 0.06);
}

.deck-manager-meta-pill.public,
.deck-manager-badge.public {
  border-color: rgba(63, 224, 142, 0.45);
  color: rgba(143, 255, 193, 0.96);
  background: rgba(29, 185, 84, 0.12);
}

.deck-manager-editor-layout {
  display: grid;
  grid-template-columns: minmax(300px, 400px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.deck-manager-editor-controls {
  min-width: 0;
}

.deck-manager-section {
  padding: 20px;
  border-radius: 18px;
}

.deck-manager-section.danger {
  border-color: rgba(248, 113, 113, 0.3);
  background: rgba(127, 29, 29, 0.12);
}

.deck-manager-section-number {
  color: #050505;
  background: rgba(248, 246, 239, 0.94);
}

.deck-manager-field input,
.deck-manager-field textarea,
.deck-manager-field select,
.deck-manager-field-grid select,
.deck-manager-row-action,
.deck-manager-status-row,
.deck-manager-playlist-status,
.deck-manager-playlist-row {
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(248, 246, 239, 0.94);
  background: rgba(0, 0, 0, 0.28);
}

.deck-manager-field select option,
.deck-manager-field-grid select option {
  color: #fff;
  background: #151515;
}

.deck-manager-save-row,
.deck-track-drawer-header,
.deck-track-drawer-footer {
  border-color: rgba(255, 255, 255, 0.12);
}

.deck-manager-button {
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(248, 246, 239, 0.94);
}

#deck-manager-link-playlist[hidden] {
  display: none !important;
}

.deck-manager-button.primary {
  border-color: rgba(248, 246, 239, 0.94);
  color: #050505;
  background: rgba(248, 246, 239, 0.94);
}

.deck-manager-button.secondary,
.deck-manager-button.danger {
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(248, 246, 239, 0.9);
  background: rgba(255, 255, 255, 0.06);
}

.deck-manager-button.ghost {
  color: rgba(143, 255, 193, 0.94);
}

.deck-manager-button.danger {
  border-color: rgba(248, 113, 113, 0.5);
  color: #ffb4a8;
}

.deck-manager-source-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 0;
  border: 0;
  color: rgba(248, 246, 239, 0.74);
  background: transparent;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 760;
  cursor: pointer;
}

.deck-manager-source-trigger[hidden] {
  display: none;
}

.deck-manager-source-trigger:hover,
.deck-manager-source-trigger:focus-visible {
  color: #fff;
}

.deck-manager-preview {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 540px;
  max-height: calc(100vh - 48px);
  padding: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  box-sizing: border-box;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

.deck-manager-preview.theme-midnight {
  background:
    radial-gradient(circle at top left, rgba(255, 122, 89, 0.18), transparent 38%),
    radial-gradient(circle at top right, rgba(46, 134, 222, 0.16), transparent 34%),
    #050505;
}

.deck-manager-preview.theme-signal {
  background:
    radial-gradient(circle at top left, rgba(30, 215, 96, 0.18), transparent 36%),
    radial-gradient(circle at bottom right, rgba(35, 176, 255, 0.14), transparent 38%),
    #020706;
}

.deck-manager-preview.theme-ember {
  background:
    radial-gradient(circle at top left, rgba(255, 92, 57, 0.2), transparent 36%),
    radial-gradient(circle at top right, rgba(255, 201, 71, 0.12), transparent 32%),
    #050202;
}

.deck-manager-preview.theme-recordshop {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.76)),
    url("./DigDeck_BG1.jpg") center / cover no-repeat;
}

.deck-manager-preview-hero {
  flex: 0 0 auto;
  margin-bottom: 20px;
}

.deck-manager-preview .public-title {
  margin-top: 8px;
  font-size: clamp(30px, 4vw, 56px);
}

.deck-manager-preview .public-description {
  margin-top: 12px;
  color: rgba(248, 246, 239, 0.7);
  line-height: 1.55;
  white-space: pre-wrap;
}

.deck-manager-preview-meta-row {
  margin-top: 18px;
}

.deck-manager-preview .public-card {
  overflow: visible;
}

.deck-manager-preview .public-card-meta {
  box-sizing: border-box;
  overflow: hidden;
  max-height: 0;
  min-height: 0;
  padding: 0 14px;
  opacity: 0;
  transform: translateY(-18px);
  pointer-events: none;
  transition:
    max-height 360ms ease-in-out,
    padding 360ms ease-in-out,
    opacity 220ms ease-in-out,
    transform 360ms ease-in-out;
}

.deck-manager-preview.is-info-visible .public-card-meta {
  max-height: 190px;
  padding: 14px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.deck-manager-preview .public-card:has(.public-card-comment-wrap:is(:hover, :focus-within, .is-open)) {
  z-index: 60;
}

.deck-manager-preview .public-deck-grid {
  flex: 1;
  grid-template-columns: repeat(var(--deck-columns, 5), minmax(0, 1fr));
  min-height: 0;
  padding-right: 8px;
  overflow-y: auto;
  align-content: start;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.deck-track-drawer-backdrop,
.deck-manager-dialog-backdrop {
  background: rgba(0, 0, 0, 0.74);
}

.deck-track-drawer-panel,
.deck-manager-dialog-panel {
  color: rgba(248, 246, 239, 0.94);
  background: #111;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.58);
}

.deck-track-drawer-close,
.deck-track-row,
.deck-cart-picker-item,
.deck-track-actions button {
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(248, 246, 239, 0.9);
  background: rgba(255, 255, 255, 0.06);
}

.deck-track-public-note {
  color: rgba(143, 255, 193, 0.94);
  background: rgba(29, 185, 84, 0.14);
}

.deck-manager-dialog-panel.compact {
  width: min(420px, 100%);
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
}

.deck-playlist-unlink-name {
  display: block;
  margin-top: 16px;
  overflow-wrap: anywhere;
  color: rgba(248, 246, 239, 0.92);
}

.deck-playlist-unlink-dialog .deck-manager-button.danger {
  border-color: #ef4444;
  color: #fff;
  background: #dc2626;
}

.deck-playlist-unlink-dialog .deck-manager-button.danger:hover,
.deck-playlist-unlink-dialog .deck-manager-button.danger:focus-visible {
  border-color: #ff7b7b;
  background: #ef4444;
}

.public-edit-item-comment-dialog {
  z-index: 1200;
}

.deck-manager-source-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.deck-manager-source-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 13px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: rgba(248, 246, 239, 0.88);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.86rem;
  text-decoration: none;
}

.deck-manager-source-item strong {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: break-word;
}

@media (max-width: 900px) {
  .deck-manager-editor-layout {
    grid-template-columns: 1fr;
  }

  .deck-manager-preview {
    position: relative;
    top: auto;
    min-height: 520px;
    max-height: none;
  }

  .deck-manager-preview .public-deck-grid {
    max-height: none;
    overflow: visible;
  }
}

.digdeck-env-badge {
  position: fixed;
  left: 10px;
  bottom: 10px;
  z-index: 5000;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 6px;
  background: rgba(217, 37, 37, 0.92);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  pointer-events: none;
  text-transform: uppercase;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Layout */
.page {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
}

.user-page {
  display: block;
  margin: 0;
  padding: 0;
}

/* Header */
.topbar {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #0b0b0b;
  z-index: 10;
}

.user-page > .topbar {
  margin-top: 0;
  padding-top: calc(10px + env(safe-area-inset-top));
}

.brand {
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.brand:hover {
  color: rgba(255, 255, 255, 0.86);
}

.brand:focus-visible {
  outline: none;
  border-radius: 6px;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.18);
}

.icon-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.ui-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: currentColor;
  stroke: currentColor;
}

.menu-item .ui-icon,
.public-copy-btn .ui-icon,
.public-link-btn .ui-icon {
  width: 16px;
  height: 16px;
}

.user-area {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-area[data-auth-only] {
  display: none;
}

.global-user-area-item {
  box-sizing: border-box;
  text-decoration: none;
}

.global-user-area-floating {
  position: fixed;
  top: 10px;
  right: 12px;
  z-index: 1200;
}

.landing-page.has-floating-user-area .landing-language {
  top: 58px;
}

.deck-manager-page.has-floating-user-area .deck-manager-shell {
  padding-top: 76px;
}

.info-page.has-floating-user-area .info-shell {
  padding-top: 80px;
}

.topbar-icon-btn {
  width: auto;
  min-width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  padding: 0 11px;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.88);
}

.topbar-nav-label {
  display: inline-block;
  color: currentColor;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.topbar-icon-btn:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.30);
}

.topbar-icon-btn:active {
  transform: translateY(1px);
}

.topbar-icon-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.72);
  outline-offset: 3px;
}

.topbar-icon-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.topbar-icon-btn .ui-icon {
  width: 18px;
  height: 18px;
}

#top-shelf-surf-btn {
  border-color: rgba(125, 211, 252, 0.28);
  background:
    linear-gradient(rgba(12, 14, 18, 0.88), rgba(12, 14, 18, 0.88)) padding-box,
    linear-gradient(135deg, #ff7a59, #facc15, #2dd4bf, #60a5fa, #c084fc) border-box;
  color: rgba(248, 246, 239, 0.94);
  box-shadow: 0 0 18px rgba(96, 165, 250, 0.12);
}

#top-shelf-surf-btn:hover {
  border-color: transparent;
  box-shadow:
    0 0 18px rgba(45, 212, 191, 0.2),
    0 0 28px rgba(192, 132, 252, 0.14);
}

.user-fallback-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Menu */
.menu {
  position: absolute;
  right: 42px;
  top: calc(100% + 8px);
  min-width: 248px;
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  overflow: hidden;
  display: none; /* JSで開閉 */
}

.settings-menu {
  right: 0;
  min-width: 180px;
}

.shared-settings-menu {
  width: min(340px, calc(100vw - 24px));
  max-height: calc(100dvh - 72px);
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
}

.shared-settings-heading {
  padding: 14px 14px 10px;
  color: rgba(255, 255, 255, 0.94);
  font-size: 14px;
  font-weight: 900;
}

.shared-settings-field {
  display: grid;
  gap: 7px;
  padding: 10px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.shared-settings-label {
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.shared-settings-select,
.shared-settings-input {
  width: 100%;
  height: 38px;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
  font-size: 13px;
}

.shared-settings-select {
  padding: 0 10px;
}

.shared-settings-select option {
  color: #111;
}

.shared-settings-input {
  min-width: 0;
  padding: 0 11px;
}

.shared-settings-current-id-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.shared-settings-current-id {
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.94);
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shared-settings-id-editor,
.shared-settings-id-confirm {
  display: grid;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-7px);
  transition: max-height 180ms ease, opacity 150ms ease, transform 180ms ease;
}

.shared-settings-id-editor[hidden],
.shared-settings-id-confirm[hidden] {
  display: none;
}

.shared-settings-id-editor.is-open {
  max-height: 180px;
  margin-top: 2px;
  opacity: 1;
  transform: translateY(0);
}

.shared-settings-id-confirm.is-open {
  max-height: 110px;
  margin-top: 2px;
  opacity: 1;
  transform: translateY(0);
}

.shared-settings-id-form {
  display: grid;
  gap: 7px;
}

.shared-settings-id-confirm {
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.shared-settings-id-confirm p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  line-height: 1.5;
}

.shared-settings-inline-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.shared-settings-save {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(85, 207, 255, 0.46);
  border-radius: 8px;
  background: rgba(85, 207, 255, 0.14);
  color: rgba(235, 250, 255, 0.96);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.shared-settings-secondary {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.78);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.shared-settings-save:disabled,
.shared-settings-menu .menu-item:disabled {
  opacity: 0.5;
  cursor: wait;
}

.shared-settings-help,
.shared-settings-status {
  margin: 0;
  color: rgba(255, 255, 255, 0.56);
  font-size: 11px;
  line-height: 1.45;
}

.shared-settings-status {
  min-height: 0;
  padding: 0 14px;
  color: rgba(125, 211, 252, 0.88);
}

.shared-settings-status:not(:empty) {
  padding-top: 8px;
  padding-bottom: 8px;
}

.shared-settings-google-linked {
  color: rgba(134, 239, 172, 0.94);
  font-size: 13px;
  font-weight: 800;
}

.shared-settings-google-link {
  display: grid;
  gap: 8px;
}

.shared-settings-google-button {
  min-height: 40px;
  overflow: hidden;
}

.shared-settings-google-link.is-busy {
  opacity: 0.58;
  pointer-events: none;
}

.shared-settings-link {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  text-decoration: none;
}

.shared-settings-select:focus-visible,
.shared-settings-input:focus-visible,
.shared-settings-save:focus-visible,
.shared-settings-secondary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(85, 207, 255, 0.18);
}

#user-menu {
  right: 103px;
}

.public-deck-menu {
  right: auto;
  left: 0;
  min-width: 248px;
}

@media (max-width: 720px) {
  .topbar-icon-btn {
    width: 34px;
    min-width: 34px;
    padding: 0;
    gap: 0;
  }

  .topbar-nav-label {
    display: none;
  }

  #user-menu {
    right: 42px;
  }

  .public-deck-menu {
    right: 84px;
    left: auto;
  }

  .landing-page.has-floating-user-area .landing-language {
    top: 58px;
  }
}

.menu.open {
  display: block;
}

.menu-head {
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.035);
}

.menu-name {
  font-weight: 700;
  line-height: 1.25;
}

.menu-sub {
  color: rgba(255, 255, 255, 0.64);
  font-size: 12px;
  line-height: 1.35;
  margin-top: 3px;
}

.menu-item {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.menu-item:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.menu-item.danger {
  color: #ffb4b4;
}

.menu-item.danger:hover {
  background: rgba(255, 80, 80, 0.12);
}

.menu-separator {
  height: 1px;
  margin: 4px 0;
  background: rgba(255, 255, 255, 0.10);
}

/* Controls */
.controls {
  padding: 12px;
}

#playlist-select {
  position: static;
}

/* selectを隠してもレイアウト上の場所は確保 */
.select-wrap{
  position: relative;
  display: inline-flex;
  align-items: center;
  width: clamp(220px, 30vw, 520px); /* 横幅を安定させる */
}

.select-wrap.is-hidden{
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-2px);
}

.select-wrap{
  transition: opacity 140ms ease, transform 140ms ease;
}

/* Deck */
#deck {
  width: 100%;
  height: auto;
  min-height: 0;
  display: grid;
  gap: 0;
  grid-template-columns: repeat(6, 1fr);
  align-items: start;
  align-content: start;
}

.deck-load-sentinel {
  width: 100%;
  height: 1px;
  pointer-events: none;
}

.deck-meta {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.32);
}

.deck-meta[hidden] {
  display: none;
}

.deck-meta-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.deck-meta-title {
  font-size: 14px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.92);
  min-width: 0;
  overflow-wrap: anywhere;
}

.deck-meta-edit-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(125, 211, 252, 0.34);
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.12);
  color: rgba(230, 246, 255, 0.92);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
  flex: 0 0 auto;
}

.deck-meta-edit-btn:hover {
  background: rgba(14, 165, 233, 0.22);
  border-color: rgba(125, 211, 252, 0.54);
}

.deck-meta-edit-btn[hidden] {
  display: none;
}

.deck-meta-creator,
.deck-meta-description {
  margin: 0;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  line-height: 1.45;
}

.deck-meta-description {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  word-break: break-word;
}

.deck-meta-actions {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin-top: 4px;
  flex-wrap: wrap;
}

.deck-meta-source-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(29, 185, 84, 0.44);
  border-radius: 999px;
  background: rgba(29, 185, 84, 0.12);
  color: rgba(235, 255, 242, 0.94);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.deck-meta-source-link:hover {
  background: rgba(29, 185, 84, 0.2);
  border-color: rgba(29, 185, 84, 0.64);
}

.deck-meta-source-link[hidden] {
  display: none;
}

.deck-save-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.deck-save-actions[hidden] {
  display: none;
}

.deck-save-btn {
  appearance: none;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(125, 211, 252, 0.36);
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.12);
  color: rgba(230, 246, 255, 0.94);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.deck-save-btn.primary {
  border-color: rgba(34, 211, 238, 0.64);
  background: rgba(6, 182, 212, 0.22);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.12);
}

.deck-save-btn:hover:not(:disabled) {
  background: rgba(14, 165, 233, 0.22);
}

.deck-save-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  box-shadow: none;
}

.deck-save-status {
  min-height: 18px;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

.deck-save-status.error {
  color: #ffb4a8;
}

.deck-save-status.success {
  color: #8ff0c8;
}

.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
}

.cart-drawer.open {
  pointer-events: auto;
}

.cart-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 180ms ease;
}

.cart-drawer.open .cart-drawer-backdrop {
  background: rgba(0, 0, 0, 0.42);
}

.cart-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  width: min(420px, 92vw);
  height: 100%;
  flex-direction: column;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(9, 16, 24, 0.97);
  box-shadow: -24px 0 52px rgba(0, 0, 0, 0.38);
  transform: translateX(105%);
  transition: transform 220ms ease;
}

.cart-drawer.open .cart-drawer-panel {
  transform: translateX(0);
}

.cart-drawer-header,
.cart-drawer-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
}

.cart-drawer-header {
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-drawer-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-drawer-title {
  margin: 0;
  color: rgba(255, 255, 255, 0.96);
  font-size: 20px;
}

.cart-drawer-count {
  margin: 3px 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 800;
}

.cart-drawer-close {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.cart-drawer-status {
  min-height: 20px;
  padding: 10px 16px 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
  font-weight: 800;
}

.cart-drawer-status.error {
  color: rgba(252, 165, 165, 0.96);
}

.cart-drawer-list {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  overflow: auto;
  padding: 12px 16px;
}

.cart-empty {
  margin: auto 0;
  padding: 28px 6px;
  color: rgba(255, 255, 255, 0.68);
  text-align: center;
}

.cart-empty-title {
  margin: 0 0 6px;
  color: rgba(255, 255, 255, 0.96);
  font-size: 16px;
  font-weight: 900;
}

.cart-empty-copy {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.cart-item-row {
  display: grid;
  grid-template-columns: 24px 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.cart-item-row.dragging {
  opacity: 0.34;
}

.cart-drop-indicator {
  position: relative;
  z-index: 3;
  display: block;
  align-self: stretch;
  height: 3px;
  min-height: 3px;
  flex: 0 0 3px;
  margin: 0 4px;
  border: 0;
  border-radius: 999px;
  background: #ffd84d;
  box-shadow: 0 0 10px rgba(255, 216, 77, 0.72);
  opacity: 1;
  pointer-events: none;
}

.cart-item-handle {
  color: rgba(255, 255, 255, 0.46);
  cursor: grab;
  font-size: 18px;
  text-align: center;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.cart-item-row.touch-dragging {
  box-shadow: 0 0 0 2px rgba(255, 216, 77, 0.42);
}

.cart-swap-animating .cart-item-row {
  pointer-events: none;
}

.cart-item-art {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  object-fit: cover;
}

.cart-item-meta {
  min-width: 0;
}

.cart-item-title,
.cart-item-artist {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-item-title {
  color: rgba(255, 255, 255, 0.94);
  font-size: 13px;
  font-weight: 900;
}

.cart-item-artist {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.cart-item-remove {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(248, 113, 113, 0.24);
  border-radius: 999px;
  background: rgba(248, 113, 113, 0.1);
  color: rgba(254, 202, 202, 0.94);
  cursor: pointer;
  font-size: 15px;
  font-weight: 900;
  justify-self: end;
  overflow: hidden;
  transform-origin: right center;
  transition:
    width 180ms ease,
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cart-item-move {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(248, 246, 239, 0.9);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.cart-item-move:disabled {
  cursor: default;
  opacity: 0.35;
}

.cart-item-remove.confirm,
.cart-drawer-action.confirm {
  border-color: rgba(255, 255, 255, 0.28);
  background: #d92d20;
  color: #ffffff;
}

.cart-item-remove.confirm {
  width: 54px;
  box-shadow: 0 0 14px rgba(217, 45, 32, 0.42);
  font-size: 12px;
  letter-spacing: 0;
}

.cart-drawer-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-drawer-footer > .cart-drawer-action {
  width: 100%;
  min-width: 0;
}

.cart-drawer-action {
  min-height: 38px;
  flex: 1 1 120px;
  border: 1px solid rgba(125, 211, 252, 0.35);
  border-radius: 8px;
  background: rgba(14, 165, 233, 0.13);
  color: rgba(230, 246, 255, 0.94);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.cart-drawer-action.primary {
  border-color: rgba(45, 212, 191, 0.78);
  background: rgba(13, 148, 136, 0.52);
  color: #f0fdfa;
}

.cart-drawer-action.playlist {
  border-color: rgba(96, 165, 250, 0.78);
  background: rgba(37, 99, 235, 0.48);
  color: #eff6ff;
}

.cart-drawer-action.subtle {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.065);
}

.cart-drawer-clear {
  width: 132px;
  min-height: 34px;
  flex: none;
  overflow: hidden;
  padding: 7px 11px;
  transform-origin: right center;
  transition:
    width 180ms ease,
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
  white-space: nowrap;
}

.cart-drawer-clear.confirm {
  width: 156px;
  border-color: rgba(255, 255, 255, 0.28);
  background: #d92d20;
  box-shadow: 0 0 14px rgba(217, 45, 32, 0.42);
  color: #ffffff;
}

.cart-drawer-action:disabled {
  opacity: 0.44;
  cursor: not-allowed;
}

.visually-hidden {
  display: none !important;
}

.deck-help-layer {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  flex: 0 0 auto;
}

.deck-help-btn {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 50%;
  background: rgba(0,0,0,0.62);
  color: rgba(255,255,255,0.92);
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.deck-help-btn:hover,
.deck-help-btn[aria-expanded="true"] {
  background: #fff;
  color: #111;
  border-color: #fff;
}

.deck-help-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 5;
  width: min(280px, calc(100vw - 24px));
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  background: rgba(12,12,12,0.94);
  color: rgba(255,255,255,0.88);
  box-shadow: 0 16px 40px rgba(0,0,0,0.36);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.deck-help-panel[hidden] {
  display: none;
}

.deck-help-title {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 900;
}

.deck-help-list {
  margin: 0;
  padding-left: 18px;
  color: rgba(255,255,255,0.7);
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 520px) {
  .cart-drawer-panel {
    top: auto;
    right: 0;
    bottom: 0;
    width: 100%;
    height: min(78vh, 680px);
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    border-left: 0;
    border-radius: 18px 18px 0 0;
    transform: translateY(105%);
  }

  .cart-drawer.open .cart-drawer-panel {
    transform: translateY(0);
  }

  .deck-meta-actions {
    align-items: flex-start;
  }

  .deck-save-actions {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .deck-save-btn {
    flex: 1 1 0;
  }
}

.deck-load-status {
  min-height: 36px;
  padding: 10px 12px 18px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 12px;
  text-align: center;
}

.deck-load-more-btn {
  appearance: none;
  min-height: 38px;
  margin: 0 auto 8px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.deck-load-more-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.deck-load-more-btn[hidden] {
  display: none;
}

.browse-page #deck {
  height: auto;
  min-height: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.browse-page #deck .cover {
  min-width: 0;
  background: rgba(255, 255, 255, 0.04);
}

.browse-page #deck .cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.browse-debug-panel {
  position: fixed;
  right: 8px;
  bottom: 8px;
  z-index: 3000;
  box-sizing: border-box;
  max-width: calc(100vw - 16px);
  max-height: 42vh;
  margin: 0;
  padding: 10px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.82);
  color: rgba(255, 255, 255, 0.9);
  font-size: 11px;
  line-height: 1.35;
  white-space: pre-wrap;
}

.browse-debug-panel[hidden] {
  display: none;
}

.site-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.52);
  font-size: 12px;
}

.site-footer-brand {
  font-weight: 900;
  color: rgba(255,255,255,0.72);
}

.site-footer-links {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.site-footer a {
  color: rgba(255,255,255,0.68);
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
}

body.info-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(29, 185, 84, 0.12), transparent 30%),
    linear-gradient(180deg, #080808 0%, #020202 100%);
  color: #fff;
}

.info-shell {
  box-sizing: border-box;
  width: min(820px, calc(100% - 32px));
  min-height: calc(100vh - 68px);
  margin: 0 auto;
  padding: clamp(32px, 6vw, 72px) 0;
}

.info-back-link {
  display: inline-flex;
  margin-bottom: 22px;
  color: rgba(255,255,255,0.62);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.info-back-link:hover {
  color: #fff;
}

.info-top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.info-top-row .info-back-link {
  margin-bottom: 0;
}

.info-language.landing-language {
  position: static;
  flex: 0 0 auto;
  transform: none;
}

.info-shell h1 {
  margin: 0 0 28px;
  color: rgba(255,255,255,0.94);
  font-size: clamp(26px, 5vw, 44px);
  line-height: 1.1;
}

.about-copy[hidden],
.policy-copy[hidden],
.commerce-copy[hidden] {
  display: none;
}

.about-copy p {
  margin: 0 0 18px;
  max-width: 760px;
  color: rgba(255,255,255,0.76);
  font-size: 15px;
  line-height: 1.75;
}

.support-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin-top: 12px;
  padding: 0 16px;
  border: 1px solid rgba(29, 185, 84, 0.46);
  border-radius: 999px;
  background: rgba(29, 185, 84, 0.14);
  color: rgba(235, 255, 242, 0.96);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
}

.support-link:hover {
  background: rgba(29, 185, 84, 0.22);
  border-color: rgba(29, 185, 84, 0.66);
}

.policy-copy {
  color: rgba(255,255,255,0.76);
  font-size: 15px;
  line-height: 1.75;
}

.policy-version {
  margin: 0 0 10px;
  color: rgba(255,255,255,0.48);
  font-size: 12px;
  font-weight: 900;
}

.policy-copy h2 {
  margin: 30px 0 10px;
  color: rgba(255,255,255,0.92);
  font-size: 18px;
  line-height: 1.25;
}

.policy-copy p {
  margin: 0 0 16px;
}

.policy-definition-list {
  display: grid;
  gap: 8px 18px;
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
  margin: 0 0 18px;
}

.policy-definition-list dt {
  color: rgba(255,255,255,0.92);
  font-weight: 900;
}

.policy-definition-list dd {
  margin: 0;
}

.commerce-list {
  display: grid;
  gap: 0;
  margin: 0;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.commerce-list div {
  display: grid;
  grid-template-columns: minmax(140px, 0.35fr) 1fr;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.commerce-list dt {
  color: rgba(255,255,255,0.58);
  font-size: 13px;
  font-weight: 800;
}

.commerce-list dd {
  margin: 0;
  color: rgba(255,255,255,0.88);
  font-size: 14px;
  line-height: 1.6;
}

.cover {
  position: relative;
  width: 100%;
  min-width: 0;
  height: auto;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  touch-action: manipulation;
}

.cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.cover.pending { opacity: 0.6; }

.quick-add-feedback {
  align-items: center;
  animation: quickAddFeedback 1100ms ease-out forwards;
  color: #fff;
  display: flex;
  font-size: 15px;
  font-weight: 900;
  inset: 0;
  justify-content: center;
  letter-spacing: 0;
  pointer-events: none;
  position: absolute;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95);
  z-index: 4;
}

@keyframes quickAddFeedback {
  0% { opacity: 0; transform: scale(0.94); }
  18%, 58% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.03); }
}

@media (max-width: 520px) {
  .quick-add-feedback {
    display: flex;
    background: rgba(0, 0, 0, 0.34);
    font-size: 13px;
    visibility: visible;
    z-index: 12;
  }
}

.cover.empty {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* 追加中 */
.cover.pending { opacity: 0.6; }

#deck.deck-slide-from-right {
  animation: deck-slide-from-right 260ms ease-out;
}

#deck.deck-slide-from-left {
  animation: deck-slide-from-left 260ms ease-out;
}

@keyframes deck-slide-from-right {
  from {
    opacity: 0;
    transform: translateX(28px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes deck-slide-from-left {
  from {
    opacity: 0;
    transform: translateX(-28px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Mobile */
@media (max-width: 768px) {
  #deck {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===== Modal base (必須) ===== */
.modal{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1000;
}

.settings-panel {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1000;
}

.settings-panel.open {
  display: block;
}

.settings-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.settings-dialog {
  position: relative;
  width: min(460px, calc(100vw - 32px));
  margin: 72px auto 0;
  padding: 22px;
  border-radius: 14px;
  background: #151515;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
}

.settings-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  font-size: 24px;
  line-height: 36px;
  cursor: pointer;
}

.settings-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.settings-title {
  margin: 0;
  padding-right: 42px;
  font-size: 22px;
}

.settings-intro {
  margin: 8px 0 20px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  line-height: 1.5;
}

.settings-field {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.settings-label {
  font-size: 13px;
  font-weight: 700;
}

.settings-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.settings-toggle-label input {
  width: 18px;
  height: 18px;
  accent-color: #1ed760;
}

.settings-help {
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  line-height: 1.45;
}

.settings-status {
  min-height: 18px;
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.profile-edit-intro {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.70);
  line-height: 1.5;
}

.profile-edit-input {
  box-sizing: border-box;
  width: 100%;
  border-radius: 8px;
}

.profile-edit-textarea {
  min-height: 96px;
  resize: vertical;
}

.profile-edit-id-value {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.profile-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

/* ===== Public User Profile ===== */
.profile-page {
  min-height: 100vh;
  margin: 0;
  color: #f8f6ef;
  background:
    radial-gradient(circle at 15% 8%, rgba(45, 212, 191, 0.13), transparent 30%),
    radial-gradient(circle at 88% 12%, rgba(96, 165, 250, 0.12), transparent 28%),
    #070809;
  background-color: #070809;
  background-repeat: no-repeat;
  background-size: 100% max(100vh, 900px);
  background-attachment: fixed;
}

.profile-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0 72px;
}

.profile-back {
  display: inline-flex;
  margin-bottom: 32px;
  color: rgba(248, 246, 239, 0.82);
  font-weight: 800;
  text-decoration: none;
}

.profile-hero {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 30px;
  align-items: center;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.055);
}

.profile-identity {
  min-width: 0;
}

.profile-avatar-wrap {
  position: relative;
  width: 180px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.profile-avatar-wrap.small { width: 96px; }

.profile-avatar,
.profile-avatar-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar-fallback {
  display: block;
  background:
    radial-gradient(circle at 50% 35%, #d8d6cf 0 17%, transparent 18%),
    radial-gradient(ellipse at 50% 88%, #d8d6cf 0 34%, transparent 35%),
    #292b2e;
}

.profile-identity h1 { margin: 0; font-size: clamp(32px, 5vw, 58px); line-height: 1.04; }
.profile-digdeck-id { margin: 10px 0 0; color: rgba(248, 246, 239, 0.62); font-size: 18px; font-weight: 750; }
.profile-bio { max-width: 700px; margin: 20px 0 0; color: rgba(248, 246, 239, 0.82); line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.profile-bio a { color: #72d8ff; text-decoration: underline; text-underline-offset: 3px; }
.profile-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 0; }
.profile-social-actions { display: contents; }
.profile-social-button { text-decoration: none; }
.profile-actions .profile-native-share { display: none; }

.profile-button,
.profile-text-button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #f8f6ef;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.profile-button.primary { background: #f2f0e9; color: #090a0b; }
.profile-button .ui-icon { width: 17px; height: 17px; flex: 0 0 auto; }
.profile-actions .profile-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.profile-actions .profile-button[hidden] { display: none; }
.profile-button:disabled { opacity: 0.52; cursor: wait; }
.profile-text-button { min-height: 34px; padding: 0; border: 0; background: transparent; }
.profile-text-button.danger { color: #ff7777; }
.file-button { display: inline-flex; align-items: center; }

.profile-status { min-height: 24px; color: rgba(248, 246, 239, 0.68); }
.profile-decks-section { margin-top: 52px; }
.profile-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.profile-section-heading h2 { margin: 0 0 22px; font-size: 28px; }
.profile-section-heading span { color: rgba(248, 246, 239, 0.6); }
.profile-deck-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.profile-deck-card { min-width: 0; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.13); border-radius: 14px; background: rgba(255, 255, 255, 0.055); }
.profile-deck-link { display: block; height: 100%; color: inherit; text-decoration: none; }
.profile-deck-artwork-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; aspect-ratio: 1; overflow: hidden; background: #111; }
.profile-deck-artwork { width: 100%; height: 100%; min-width: 0; min-height: 0; display: block; object-fit: cover; }
.profile-deck-content { padding: 16px; }
.profile-deck-content h3 { margin: 0; font-size: 19px; overflow-wrap: anywhere; }
.profile-deck-content p { display: -webkit-box; margin: 9px 0; overflow: hidden; color: rgba(248, 246, 239, 0.7); line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.profile-deck-meta { color: rgba(248, 246, 239, 0.54); font-size: 12px; }
.profile-playlist-link { display: inline-flex; margin: 0 16px 16px; color: #ff5a75; font-size: 12px; font-weight: 800; }
.profile-empty { padding: 40px; border: 1px dashed rgba(255, 255, 255, 0.18); border-radius: 14px; color: rgba(248, 246, 239, 0.6); text-align: center; }

.profile-dialog { position: fixed; inset: 0; z-index: 7000; display: none; place-items: center; padding: 18px; }
.profile-dialog.open { display: grid; }
.profile-dialog-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.78); }
.profile-dialog-panel { position: relative; width: min(540px, 100%); max-height: calc(100vh - 36px); overflow-y: auto; box-sizing: border-box; padding: 26px; border: 1px solid rgba(255, 255, 255, 0.17); border-radius: 20px; background: #121315; box-shadow: 0 28px 90px rgba(0,0,0,.58); }
.profile-dialog-panel h2 { margin: 0 48px 24px 0; }
.profile-dialog-close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; background: transparent; color: #fff; font-size: 25px; cursor: pointer; }
.profile-field { display: grid; gap: 8px; margin-top: 18px; color: rgba(248,246,239,.75); font-size: 13px; font-weight: 800; }
.profile-field input:not([type="range"]), .profile-field textarea { width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1px solid rgba(255,255,255,.17); border-radius: 9px; background: #08090a; color: #fff; font: inherit; }
.profile-field input[type="range"] { width: 100%; }
.profile-avatar-editor-row { display: flex; gap: 18px; align-items: center; }
.profile-avatar-editor-row > div:last-child { display: grid; justify-items: start; gap: 8px; }
.profile-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }
.crop-panel canvas { display: block; width: min(100%, 420px); aspect-ratio: 1; margin: 0 auto; border-radius: 12px; background: #050505; touch-action: none; }
.profile-crop-help { color: rgba(248,246,239,.58); font-size: 12px; }
.profile-toast { position: fixed; left: 50%; bottom: 24px; z-index: 8000; transform: translateX(-50%); padding: 12px 18px; border-radius: 999px; background: #f4f1e9; color: #080808; font-weight: 800; box-shadow: 0 12px 34px rgba(0,0,0,.4); }

.profile-shell *,
.profile-dialog-panel *,
.profile-toast {
  font-weight: 400 !important;
}

.public-creator-profile-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
}
.public-creator-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: #2a2b2d; }
.public-creator-link-copy { display: grid; line-height: 1.15; }
.public-creator-link-copy small { color: rgba(248,246,239,.58); font-size: 10px; }

@media (max-width: 640px) {
  .profile-shell { width: min(100%, calc(100% - 24px)); padding-top: 18px; }
  .profile-back { margin-bottom: 16px; }
  .profile-hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 12px 14px;
    align-items: start;
    max-height: 48svh;
    padding: 14px;
    overflow: hidden;
    border-radius: 16px;
    text-align: left;
  }
  .profile-avatar-wrap { width: min(100%, 88px); justify-self: center; }
  .profile-identity h1 { font-size: clamp(19px, 6vw, 26px); line-height: 1.08; overflow-wrap: anywhere; }
  .profile-digdeck-id { margin-top: 5px; font-size: 13px; }
  .profile-bio {
    display: -webkit-box;
    margin-top: 8px;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
  }
  .profile-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
  }
  .profile-actions .profile-native-share { display: inline-flex; }
  .profile-social-actions,
  .profile-actions #profile-copy-url { display: none; }
  .profile-actions .profile-button { width: 100%; min-width: 0; min-height: 38px; padding: 0 10px; box-sizing: border-box; }
  .profile-shell > .profile-status { min-height: 0; margin: 0; }
  .profile-decks-section { margin-top: 18px; }
  .profile-section-heading h2 { margin-bottom: 12px; font-size: 24px; }
  .profile-deck-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .profile-deck-content { padding: 11px; }
  .profile-deck-content h3 { font-size: 15px; }
  .profile-dialog-panel { padding: 22px 18px; }
}

.cart-edit-panel {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.cart-edit-panel.open {
  display: flex;
}

.cart-edit-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.cart-edit-dialog {
  position: relative;
  z-index: 1;
  width: min(460px, 100%);
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  background: rgba(14, 14, 14, 0.96);
  color: rgba(255,255,255,0.9);
  box-shadow: 0 22px 70px rgba(0,0,0,0.44);
}

.cart-edit-title {
  margin: 0;
  font-size: 17px;
  font-weight: 900;
}

.cart-edit-intro {
  margin: 6px 0 14px;
  color: rgba(255,255,255,0.58);
  font-size: 12px;
  line-height: 1.5;
}

.cart-edit-field {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.cart-edit-label {
  color: rgba(255,255,255,0.76);
  font-size: 12px;
  font-weight: 850;
}

.cart-edit-input,
.cart-edit-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.92);
  font: inherit;
  font-size: 13px;
  outline: none;
}

.cart-edit-input {
  min-height: 38px;
  padding: 0 11px;
}

.cart-edit-textarea {
  min-height: 96px;
  padding: 10px 11px;
  resize: vertical;
}

.cart-edit-input:focus,
.cart-edit-textarea:focus {
  border-color: rgba(125, 211, 252, 0.64);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.14);
}

.cart-edit-status {
  min-height: 18px;
  margin-top: 10px;
  color: #ffb4a8;
  font-size: 12px;
}

.cart-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.cart-edit-action {
  appearance: none;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.cart-edit-action.cancel {
  border: 1px solid rgba(248, 113, 113, 0.58);
  background: rgba(185, 28, 28, 0.42);
}

.cart-edit-action.cancel:hover {
  background: rgba(185, 28, 28, 0.6);
}

.cart-edit-action.save {
  border: 1px solid rgba(45, 212, 191, 0.62);
  background: rgba(13, 148, 136, 0.48);
}

.cart-edit-action.save:hover {
  background: rgba(13, 148, 136, 0.66);
}

.deck-save-panel {
  position: fixed;
  inset: 0;
  z-index: 72;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.deck-save-panel.open {
  display: flex;
}

.deck-save-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.deck-save-dialog {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  background: rgba(14, 14, 14, 0.97);
  color: rgba(255,255,255,0.92);
  box-shadow: 0 22px 70px rgba(0,0,0,0.46);
}

.deck-save-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.82);
  font-size: 24px;
  line-height: 30px;
  cursor: pointer;
}

.deck-save-close:hover {
  background: rgba(255,255,255,0.13);
  color: #fff;
}

.deck-save-title {
  margin: 0;
  padding-right: 38px;
  font-size: 18px;
  font-weight: 900;
}

.deck-save-intro {
  margin: 7px 0 14px;
  color: rgba(255,255,255,0.6);
  font-size: 12px;
  line-height: 1.5;
}

.deck-save-field {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.deck-save-label {
  color: rgba(255,255,255,0.76);
  font-size: 12px;
  font-weight: 850;
}

.deck-save-input,
.deck-save-textarea {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.92);
  font: inherit;
  font-size: 13px;
  outline: none;
}

.deck-save-input {
  min-height: 40px;
  padding: 0 11px;
}

.deck-save-textarea {
  min-height: 96px;
  padding: 10px 11px;
  resize: vertical;
}

.deck-save-input:focus,
.deck-save-textarea:focus {
  border-color: rgba(125, 211, 252, 0.64);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.14);
}

.deck-save-segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.deck-save-segmented label {
  display: block;
}

.deck-save-segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.deck-save-segmented span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.76);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.deck-save-segmented input:checked + span {
  border-color: rgba(45, 212, 191, 0.66);
  background: rgba(13, 148, 136, 0.42);
  color: #fff;
}

.deck-save-dialog-status {
  min-height: 18px;
  margin-top: 10px;
  color: rgba(255,255,255,0.66);
  font-size: 12px;
}

.deck-save-dialog-status.error {
  color: #ffb4a8;
}

.deck-save-dialog-actions,
.deck-save-complete-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 15px;
}

.deck-save-complete-actions {
  justify-content: flex-start;
}

.deck-save-dialog-action {
  appearance: none;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.deck-save-dialog-action:hover {
  background: rgba(255,255,255,0.14);
}

.deck-save-dialog-action.cancel {
  border-color: rgba(248, 113, 113, 0.58);
  background: rgba(185, 28, 28, 0.42);
}

.deck-save-dialog-action.cancel:hover {
  background: rgba(185, 28, 28, 0.6);
}

.deck-save-dialog-action.save {
  border-color: rgba(45, 212, 191, 0.62);
  background: rgba(13, 148, 136, 0.48);
}

.deck-save-dialog-action.save:hover {
  background: rgba(13, 148, 136, 0.66);
}

.playlist-export-summary {
  display: grid;
  gap: 10px;
  margin: 14px 0 4px;
}

.playlist-export-count {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 800;
}

.playlist-export-preview {
  display: grid;
  gap: 8px;
  max-height: 210px;
  overflow: auto;
}

.playlist-export-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.playlist-export-item img,
.playlist-export-item span {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  object-fit: cover;
}

.playlist-export-item strong,
.playlist-export-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.playlist-export-item strong {
  color: rgba(255, 255, 255, 0.94);
  font-size: 13px;
}

.playlist-export-item small {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.modal-track{
  margin-top: 6px;
  font-weight: 700;
  font-size: 13px;
  opacity: 0.9;
}

.modal-meta {
  width: min(420px, 86vw);
  color: rgba(255,255,255,0.9);
  text-align: left;
}

.modal-title {
  margin-top: 14px;
  font-size: 18px;
  font-weight: 800;
}

.modal-sub {
  margin-top: 4px;
  color: rgba(255,255,255,0.68);
  font-size: 13px;
}

.modal-source-link{
  display: inline-flex;
  align-items: center;
  margin-top: 12px;
  color: rgba(255,255,255,0.92);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.35);
}

.modal-source-link:hover{
  color: #fff;
  border-bottom-color: rgba(255,255,255,0.75);
}

.modal-item-comment {
  box-sizing: border-box;
  width: 100%;
  max-height: min(180px, 24vh);
  margin: 14px 0 0;
  padding: 12px 14px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: #000;
  color: rgba(255, 255, 255, 0.94);
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.modal-item-comment[hidden] {
  display: none;
}

.modal-track-list {
  width: min(420px, 86vw);
  max-height: min(280px, 36vh);
  margin-top: 16px;
  padding-right: 4px;
  padding-bottom: 72px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-padding-bottom: 72px;
  -webkit-overflow-scrolling: touch;
}

.modal-track-list-title {
  margin-bottom: 8px;
  color: rgba(255,255,255,0.72);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.modal-track-list-message {
  margin: 0;
  color: rgba(255,255,255,0.62);
  font-size: 13px;
}

.modal-track-list-items {
  display: grid;
  gap: 6px;
}

.modal-track-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 5px 6px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  background: rgba(255,255,255,0.045);
}

.modal-track-row.saved {
  background: rgba(255,255,255,0.025);
}

.modal-track-number {
  color: rgba(255,255,255,0.48);
  font-size: 11px;
  text-align: right;
}

.modal-track-name {
  min-width: 0;
  color: rgba(255,255,255,0.9);
  font-size: 13px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-track-add {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.modal-track-add:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.3);
}

.modal-track-add:disabled {
  cursor: default;
  opacity: 0.65;
}

.modal-track-row.saved .modal-track-add {
  background: rgba(255,80,80,0.14);
  border-color: rgba(255,120,120,0.22);
}

.modal.has-track-picker .modal-figure {
  gap: 10px;
}

.modal.has-track-picker .modal-img {
  max-width: min(46vw, 360px);
  max-height: min(40vh, 360px);
}

.modal.has-track-picker .modal-actions {
  display: none;
}

.modal.has-track-picker .modal-track-list {
  max-height: min(420px, 46vh);
  margin-top: 12px;
}

.modal.has-track-picker .modal-title {
  margin-top: 10px;
}

.modal.open{
  display: block;
}

.modal-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
}

.modal-close{
  position: fixed;         /* 画面右上に固定 */
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;

  border: none;
  background: transparent; /* シンプル */
  color: rgba(255,255,255,0.9);

  font-size: 28px;
  line-height: 44px;
  text-align: center;

  cursor: pointer;
  z-index: 1100;
}

.modal-close:hover{
  color: #fff;
}

.modal-close:active{
  opacity: 0.7;
}

/* 画像+ボタンを縦積み */
.modal-figure{
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

.modal-media{
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin-top: 32px;
}

.modal-source-badge{
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1201;
  transform: translateY(calc(-100% - 8px));
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.92);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ボタン列：画像の“下” */
.modal-actions{
  position: static;          /* ★absoluteをやめる */
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.public-modal-actions {
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.modal-cart-select {
  min-width: min(100%, 260px);
  max-width: 320px;
  background: rgba(255, 255, 255, 0.96);
  color: #111;
}

.modal-cart-status {
  flex-basis: 100%;
  min-height: 18px;
  color: rgba(248, 246, 239, 0.78);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.modal-cart-status.error {
  color: #ffb4a8;
}

#btn-delete.unavailable-action {
  cursor: help;
  position: relative;
}

#btn-delete.unavailable-action::after {
  background: #fff;
  border-radius: 6px;
  bottom: calc(100% + 10px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
  color: #111;
  content: attr(data-tip);
  font-size: 12px;
  font-weight: 700;
  left: 50%;
  line-height: 1.45;
  max-width: min(280px, 72vw);
  opacity: 0;
  padding: 8px 10px;
  pointer-events: none;
  position: absolute;
  transform: translate(-50%, 4px);
  transition: opacity 150ms ease, transform 150ms ease;
  visibility: hidden;
  white-space: normal;
  width: max-content;
  z-index: 30;
}

#btn-delete.unavailable-action:hover::after,
#btn-delete.unavailable-action:focus-visible::after,
#btn-delete.unavailable-action.tip-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
  visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
  .quick-add-feedback {
    animation: quickAddFeedbackReduced 900ms linear forwards;
  }
}

@keyframes quickAddFeedbackReduced {
  0%, 100% { opacity: 0; }
  12%, 78% { opacity: 1; }
}

/* いままで通り画像サイズは制限（必要なら調整） */
.modal-img{
  max-width: min(86vw, 660px);
  max-height: min(62vh, 660px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 16px 60px rgba(0,0,0,0.6);
  display: block;
}

/* 背景クリックは backdrop が受け取る */
.modal-content{
  position: relative;
  height: 100%;
  width: 100%;
  display: grid;
  place-items: center;
  pointer-events: none; /* ★これが肝 */
}

.modal-nav{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 48px;

  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.92);

  font-size: 42px;
  line-height: 48px;
  text-align: center;
  cursor: pointer;

  z-index: 1200;          /* 念のため上に */
  pointer-events: auto;   /* 念のため */
}

.modal-nav:hover{
  color: #fff;
}

.modal-nav:disabled{
  opacity: 0.25;
  cursor: not-allowed;
  transform: translateY(-50%);
}

/* アートの「すぐ外側」 */
.modal-nav.prev{ left: -54px; }
.modal-nav.next{ right: -54px; }

/* 画面が狭い時ははみ出し防止で内側に寄せる */
@media (max-width: 520px){
  .modal-source-badge{
    top: 10px;
    right: 10px;
    transform: none;
  }

  .modal-nav.prev{ left: 10px; }
  .modal-nav.next{ right: 10px; }
}


/* 操作できる要素だけ戻す */
  .modal-figure,
  .modal-media,
  .modal-close,
  .modal-meta,
  .modal-nav{
  pointer-events: auto;
}

.btn{
  appearance: none;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
  padding: 12px 14px;
  border-radius: 999px;                /* モダン感：ピル形 */
  cursor: pointer;
  min-width: 180px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease, opacity 120ms ease;
  backdrop-filter: blur(8px);          /* 対応ブラウザで良い感じ */
}

.btn:hover{
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.10);
}

.btn:active{
  transform: translateY(0);
}

.btn.primary{
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.24);
}

.btn.danger{
  background: rgba(255,80,80,0.14);
  border-color: rgba(255,120,120,0.22);
}

.btn:disabled{
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

/* “Added” の見た目（Addボタンがグレーアウトしても映える） */
.btn.added{
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.14);
}

/* モバイルでボタンがはみ出る場合の保険 */
@media (max-width: 480px){
  .btn{ min-width: 130px; }
}

/* ===== Controls polish ===== */
.deck-source-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 12px 12px 4px;
}

.deck-source-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.deck-source-title {
  color: rgba(255,255,255,0.72);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.deck-toolbar-expand-btn,
.deck-toolbar-collapse-row {
  display: none;
}

.deck-source-tabs {
  --tab-indicator-left: 4px;
  --tab-indicator-width: 0px;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
}

.deck-source-tabs::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: var(--tab-indicator-width);
  border-radius: 999px;
  background: #fff;
  transform: translateX(var(--tab-indicator-left));
  transition: transform 220ms ease, width 220ms ease;
}

.deck-source-tab {
  position: relative;
  z-index: 1;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255,255,255,0.68);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: background 120ms ease, color 120ms ease;
}

.deck-source-tab:hover {
  color: rgba(255,255,255,0.92);
  background: rgba(255,255,255,0.08);
}

.deck-source-tab.active {
  color: #111;
  background: transparent;
}

.deck-source-tab:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.18);
}

.deck-source-panel[hidden] {
  display: none;
}

.deck-source-panel {
  min-height: 64px;
  padding-bottom: 4px;
}

.playlist-source-switch {
  display: inline-flex;
  gap: 4px;
  margin: 12px 12px 0;
  padding: 4px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
}

.playlist-source-option {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 7px 12px;
  background: transparent;
  color: rgba(255,255,255,0.7);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.playlist-source-option.active {
  background: rgba(255,255,255,0.94);
  color: #111;
}

.playlist-source-option:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.18);
}

.playlist-source-panel[hidden] {
  display: none;
}

.public-deck-controls-hidden[hidden] {
  display: none;
}

.controls{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 12px 8px;
}

.secondary-controls {
  padding-top: 0;
}

.source-control-row {
  width: 100%;
}

.cart-slot {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.shared-cart-controls {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex-wrap: nowrap;
}

.cart-control-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: nowrap;
}

.cart-control-group #cart-wrap {
  width: clamp(220px, 24vw, 360px);
  flex: 0 1 360px;
}

.cart-control-group .btn-lite {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* Playlist select (dropdown) */
.select{
  appearance: none;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);

  padding: 12px 14px; /* 右側に矢印スペース */
  border-radius: 999px;
  font-weight: 700;

  min-width: 260px;
  max-width: min(520px, 60vw);

  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#profile-edit-panel .profile-edit-input {
  border-radius: 8px;
}

/* hover */
.select:hover{
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.28);
}

/* focus ring（アクセシブルでカッコいい） */
.select:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.34);
}

/* custom chevron for select */
.controls{
  position: relative;
}

.controls::after{
  content: "";
  position: absolute;
  display: none;
}

/* より確実な矢印：selectを包む */
.select-wrap{
  position: relative;
  display: inline-flex;
  align-items: center;
  width: clamp(220px, 30vw, 520px);
}

.select-wrap::after{
  content: "";
  position: absolute;
  right: 16px;
  pointer-events: none;
  opacity: 0.8;
  font-size: 14px;
}

.arrow{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  font-weight: 800;
  padding: 0 2px;
}

.flow-arrow-icon {
  display: block;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}

.cart-flow-arrow {
  display: none;
  width: 100%;
  color: rgba(255, 255, 255, 0.72);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.cart-flow-arrow .flow-arrow-icon {
  margin: 0 auto;
}

/* 小さめの補助ボタン（Create New Stash用） */
.btn-lite{
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
  padding: 12px 14px;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease, opacity 120ms ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-lite:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.28);
}

.btn-lite.cart-open{
  background: rgba(0, 174, 255, 0.18);
  border-color: rgba(0, 225, 255, 0.72);
  color: rgba(232, 251, 255, 0.98);
  box-shadow:
    0 0 0 1px rgba(0, 225, 255, 0.16) inset,
    0 0 18px rgba(0, 196, 255, 0.42);
}

.btn-lite.cart-open:hover{
  background: rgba(0, 188, 255, 0.26);
  border-color: rgba(85, 238, 255, 0.9);
  box-shadow:
    0 0 0 1px rgba(85, 238, 255, 0.22) inset,
    0 0 24px rgba(0, 204, 255, 0.56);
}

#open-current-cart.cart-hover-pulse-once {
  animation: cartButtonHoverPulse 300ms ease-in-out 1;
}

#open-current-cart.cart-hover-pulse-twice {
  animation: cartButtonHoverPulse 300ms ease-in-out 2;
}

@keyframes cartButtonHoverPulse {
  0%, 100% {
    transform: translateY(0);
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.16);
  }
  50% {
    transform: translateY(-1px);
    background: rgba(255,255,255,0.10);
    border-color: rgba(255,255,255,0.28);
  }
}

.btn-lite:disabled{
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* モバイルでは縦積み */
@media (max-width: 480px){
  .controls{
    flex-direction: column;
    align-items: stretch;
  }
  #playlist-select{
    min-width: 0;
    max-width: 100%;
    width: 100%;
  }
}

@media (max-width: 520px){
  .modal{
    --modal-mobile-width: min(72vw, 280px);
    overflow: hidden;
  }

  .modal-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: auto;
    max-width: none;
    min-width: 0;
    overflow-y: auto;
    overflow-x: hidden;
    margin: 0;
    padding: 50px 18px 28px;
    box-sizing: border-box;
  }

  .modal-close{
    position: absolute;
    top: 8px;
    right: 8px;
  }

  .modal-figure{
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 10px;
  }

  .modal-media{
    position: relative;
    display: block;
    width: var(--modal-mobile-width);
    max-width: 100%;
    margin-top: 30px;
  }

  .modal-img{
    width: 100%;
    max-width: var(--modal-mobile-width);
    max-height: 42vh;
  }

  .modal-source-badge{
    position: absolute;
    top: 0;
    right: 0;
    transform: translateY(calc(-100% - 6px));
  }

  .modal-nav{
    position: absolute;
    top: 50%;
    width: 28px;
    height: 48px;
    color: rgba(255,255,255,0.9);
    font-size: 36px;
    line-height: 48px;
  }

  .modal-nav:hover{
    color: #fff;
  }

  .modal-nav:disabled{
    opacity: 0.24;
    transform: translateY(-50%);
  }

  #modal-prev{
    left: -30px;
    transform: translateY(-50%);
  }

  #modal-next{
    right: -30px;
    transform: translateY(-50%);
  }

  .modal-actions{
    display: flex;
    justify-content: center;
    gap: 8px;
    width: min(100%, calc(var(--modal-mobile-width) + 28px));
    max-width: calc(100vw - 36px);
  }

  .modal-meta {
    width: 100%;
    max-width: calc(100vw - 36px);
  }

  .modal-actions .btn,
  .modal-actions .btn-lite{
    flex: 1 1 0;
    min-width: 0;
    max-width: 100%;
    padding: 11px 10px;
    box-sizing: border-box;
    font-size: 12px;
    letter-spacing: 0;
  }

  .modal-track-list {
    max-height: 34vh;
    padding-bottom: 96px;
    scroll-padding-bottom: 96px;
  }

  .modal.has-track-picker .modal-content {
    padding-top: 38px;
  }

  .modal.has-track-picker .modal-figure {
    width: 100%;
    gap: 8px;
  }

  .modal.has-track-picker .modal-media{
    width: min(64vw, 240px);
    margin-left: auto;
    margin-right: auto;
  }

  .modal.has-track-picker .modal-img{
    width: 100%;
    max-width: 100%;
    max-height: 30vh;
    border-radius: 8px;
  }

  .modal.has-track-picker .modal-nav{
    font-size: 30px;
  }

  .modal.has-track-picker #modal-prev{
    left: -28px;
  }

  .modal.has-track-picker #modal-next{
    right: -28px;
  }

  .modal.has-track-picker .modal-actions {
    display: none;
  }

  .modal.has-track-picker .modal-title {
    margin-top: 10px;
    font-size: 16px;
  }

  .modal.has-track-picker .modal-track {
    margin-top: 4px;
    font-size: 12px;
  }

  .modal.has-track-picker .modal-sub,
  .modal.has-track-picker .modal-source-link {
    font-size: 12px;
  }

  .modal.has-track-picker .modal-track-list {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    max-height: 48vh;
    margin-top: 10px;
  }
}

/* ===== Playlist search ===== */

.playlist-search-block,
.playlist-url-block,
.itunes-search-block,
.artist-search-block,
.track-search-block,
.playlist-shuffle-block {
  width: 100%;
  padding: 12px 12px 12px;
  box-sizing: border-box;
}

.playlist-shuffle-block {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.shuffle-cta-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.shuffle-first-run-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(0,0,0,0.28);
  animation: shuffleTipFloat 1400ms ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}

.shuffle-first-run-tip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #fff;
}

.shuffle-first-run-tip[hidden] {
  display: none;
}

@keyframes shuffleTipFloat {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -4px); }
}

@media (prefers-reduced-motion: reduce) {
  .shuffle-first-run-tip {
    animation: none;
  }
}

.playlist-search-row,
.itunes-search-row,
.artist-search-row,
.track-search-row,
.playlist-url-row {
  width: 100%;
  max-width: 100%;
  margin: 0;

  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;

  box-sizing: border-box;
}

.playlist-search-input {
  flex: 1;
  min-width: 220px;
  height: 40px;
  padding: 0 14px;

  border: 1px solid #333;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 14px;

  box-sizing: border-box;
}

.playlist-search-input::placeholder {
  color: #777;
}

/* Keep the source-tab inputs aligned with the playlist selector. */
#artist-search-input,
#playlist-search-input,
#track-search-input,
#shared-playlist-url-input {
  flex: 0 1 clamp(220px, 30vw, 520px);
  width: clamp(220px, 30vw, 520px);
}

.playlist-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  padding: 0 16px;

  border: 1px solid #333;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;

  box-sizing: border-box;
}

.playlist-paste-btn {
  flex: 0 0 auto;
  width: auto;
}

.playlist-random-btn {
  --shuffle-ring-angle: 0deg;
}

@property --shuffle-ring-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.playlist-random-btn {
  position: relative;
  isolation: isolate;
  overflow: visible;
  border-color: rgba(255, 255, 255, 0.18);
  background: linear-gradient(180deg, rgba(31, 35, 38, 0.96), rgba(14, 17, 20, 0.98));
  color: rgba(250, 255, 252, 0.98);
  font-weight: 800;
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.11);
  transition:
    transform 120ms ease,
    background 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease,
    filter 140ms ease;
}

.playlist-random-btn::before,
.playlist-random-btn::after {
  content: "";
  position: absolute;
  border-radius: inherit;
  background: conic-gradient(
    from var(--shuffle-ring-angle),
    #ff6b6b,
    #ffd166,
    #7bd88f,
    #4cc9f0,
    #8b7cf6,
    #ff7ac8,
    #ff6b6b
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: shuffleButtonRing 4.4s linear infinite;
  pointer-events: none;
}

.playlist-random-btn::before {
  inset: -2px;
  padding: 2px;
  z-index: -1;
}

.playlist-random-btn::after {
  inset: -6px;
  padding: 6px;
  z-index: -2;
  opacity: 0.34;
  filter: blur(10px);
}

.playlist-random-btn:hover:not(:disabled) {
  background: linear-gradient(180deg, rgba(39, 43, 46, 0.98), rgba(17, 20, 24, 0.99));
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow:
    0 12px 26px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.playlist-random-btn:hover:not(:disabled)::after {
  opacity: 0.52;
  filter: blur(12px);
}

.playlist-random-btn:active:not(:disabled) {
  transform: translateY(1px);
  filter: brightness(0.96);
  box-shadow:
    0 6px 14px rgba(0, 0, 0, 0.22),
    inset 0 1px 3px rgba(0, 0, 0, 0.28);
}

@keyframes shuffleButtonRing {
  to {
    --shuffle-ring-angle: 1turn;
  }
}

@media (prefers-reduced-motion: reduce) {
  .playlist-random-btn::before,
  .playlist-random-btn::after {
    animation: none;
  }
}

.playlist-search-results {
  width: 640px;
  max-width: 100%;
  max-height: min(228px, 28vh);
  margin: 12px 0 0;
  padding-right: 4px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

.track-search-results {
  width: 720px;
  max-width: 100%;
  max-height: min(228px, 28vh);
  margin-top: 8px;
  padding-right: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-sizing: border-box;
}

.track-search-result {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 68px;
  margin-top: 6px;
  padding: 6px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  box-sizing: border-box;
}

.track-search-artwork {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(255,255,255,0.08);
}

.track-search-meta {
  min-width: 0;
}

.track-search-name,
.track-search-artist,
.track-search-album {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-search-name {
  color: rgba(255,255,255,0.96);
  font-size: 14px;
  font-weight: 850;
}

.track-search-artist {
  margin-top: 3px;
  color: rgba(255,255,255,0.7);
  font-size: 12px;
}

.track-search-album {
  margin-top: 2px;
  color: rgba(255,255,255,0.48);
  font-size: 11px;
}

.track-search-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  color: #111;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
  cursor: pointer;
}

.track-search-add:disabled {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.55);
  cursor: default;
}

.playlist-url-message {
  width: 640px;
  max-width: 100%;
  min-height: 18px;
  margin: 8px 0 0;
  box-sizing: border-box;
}

.saved-deck-discovery {
  width: 640px;
  max-width: 100%;
  margin-top: 12px;
}

.public-decks-list {
  margin-top: 8px;
}

.public-deck-card {
  width: 100%;
  min-height: 54px;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.9);
  cursor: pointer;
  text-align: left;
}

.public-deck-card:hover {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.22);
}

.public-deck-card-title {
  font-size: 13px;
  font-weight: 850;
}

.public-deck-card-meta {
  margin-top: 3px;
  color: rgba(255,255,255,0.58);
  font-size: 12px;
}

.search-message {
  margin: 8px 0 0;
  color: rgba(255,255,255,0.72);
  font-size: 13px;
}

.search-message.error {
  color: #ff9b9b;
}

.search-fallback-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin-top: 10px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.search-fallback-link:hover {
  background: rgba(255, 255, 255, 0.12);
}

.search-fallback-button {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin-top: 10px;
  margin-right: 8px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.search-fallback-button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.playlist-result-card {
  width: 100%;
  margin-top: 8px;
  padding: 8px;

  display: flex;
  align-items: center;
  gap: 10px;

  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.92);

  cursor: pointer;
  text-align: left;
}

.playlist-result-card:hover {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.22);
}

.playlist-load-more-btn {
  width: 100%;
  min-height: 38px;
  margin-top: 8px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.86);
  font-weight: 800;
  cursor: pointer;
}

.playlist-load-more-btn:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.26);
}

.playlist-load-more-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.playlist-result-img {
  width: 48px;
  height: 48px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center center;
  display: block;
  border-radius: 8px;
  flex: 0 0 48px;
  background: rgba(255,255,255,0.08);
}

.playlist-result-img-empty {
  display: block;
}

.playlist-result-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.playlist-result-name {
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playlist-result-owner,
.playlist-result-count {
  font-size: 12px;
  color: rgba(255,255,255,0.62);
}

/* ===== Mobile fix ===== */
@media (max-width: 520px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .page {
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
  }

  .page > .topbar,
  .page > .deck-toolbar,
  .page > .deck-meta,
  .page > #deck,
  .page > .deck-load-status,
  .page > .deck-load-sentinel,
  .page > .site-footer {
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    box-sizing: border-box;
  }

  .topbar {
    min-width: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .brand {
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .user-area {
    width: 100%;
    justify-content: flex-end;
  }

  .controls {
    width: 100%;
    box-sizing: border-box;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 12px;
    overflow: hidden;
  }

  .cart-control-group {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .cart-control-group #cart-wrap {
    width: 100%;
    flex: none;
  }

  .cart-slot,
  .shared-cart-controls {
    width: 100%;
  }

  .shared-cart-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .btn-lite {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .select-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .arrow {
    display: none;
  }

  .cart-flow-arrow {
    display: block;
    margin: 0 auto 2px;
  }

  .playlist-search-block,
  .playlist-url-block,
  .itunes-search-block,
  .artist-search-block,
  .track-search-block,
  .playlist-shuffle-block {
    width: 100%;
    padding: 10px 12px;
    box-sizing: border-box;
    overflow: hidden;
  }

  .deck-source-panel,
  .playlist-source-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    contain: inline-size;
  }

  .playlist-search-row,
  .itunes-search-row,
  .artist-search-row,
  .track-search-row,
  .playlist-url-row {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .playlist-search-input {
    min-width: 0;
    width: 100%;
    flex-basis: 100%;
  }

  #artist-search-input,
  #playlist-search-input,
  #track-search-input,
  #shared-playlist-url-input {
    width: 100%;
    flex-basis: 100%;
  }

  .playlist-search-btn {
    flex: 1;
    flex-shrink: 0;
    padding: 0 10px;
  }

  .playlist-search-row > .cart-slot {
    flex: 1 1 calc(50% - 4px);
    width: auto;
  }

  .playlist-search-row > .playlist-search-btn {
    flex: 1 1 calc(50% - 4px);
  }

  .playlist-search-row > .cart-slot .shared-cart-controls,
  .playlist-search-row > .cart-slot .cart-control-group {
    width: 100%;
    flex-direction: row;
    align-items: center;
  }

  .playlist-search-row > .cart-slot .arrow,
  .playlist-search-row > .cart-slot .cart-flow-arrow {
    display: none;
  }

  .playlist-paste-btn {
    width: auto;
  }

  .playlist-url-row > #shared-playlist-paste-btn,
  .playlist-url-row > #shared-playlist-url-btn {
    flex: 1 1 calc(50% - 4px);
    width: calc(50% - 4px);
    min-width: 0;
  }

  .playlist-url-row > .cart-slot {
    flex: 1 1 100%;
    width: 100%;
  }

  .playlist-random-btn {
    flex-basis: calc(100% - 4px);
    max-width: calc(100% - 4px);
    margin: 2px;
  }

  .playlist-search-results,
  .track-search-results,
  .playlist-url-message {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .playlist-search-results {
    max-height: min(190px, 23vh);
    overscroll-behavior-y: auto;
  }

  .track-search-results {
    max-height: min(190px, 23vh);
    overscroll-behavior-y: auto;
  }

  .playlist-result-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 56px;
    margin-top: 6px;
    padding: 6px;
    gap: 8px;
    box-sizing: border-box;
    overflow: hidden;
  }

  .playlist-result-img {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    border-radius: 6px;
  }

  .playlist-result-meta {
    flex: 1;
    min-width: 0;
    overflow: hidden;
  }

  .playlist-result-name,
  .playlist-result-owner,
  .playlist-result-count {
    max-width: 100%;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* ===== Auto hide toolbar on mobile ===== */

.deck-toolbar {
  position: sticky;
  top: 48px; /* topbarの高さに近い値 */
  z-index: 9;
  background: #000;
  transition:
    transform 220ms ease,
    opacity 180ms ease;
  will-change: transform;
}

.deck-toolbar.is-hidden {
  transform: translateY(calc(-100% - 8px));
  opacity: 0;
  pointer-events: none;
}

body.is-toolbar-search-focused .deck-toolbar {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 768px) {
  #playlist-source-search #playlist-search-input,
  #deck-source-artists #artist-search-input,
  #deck-source-tracks #track-search-input {
    font-size: 16px;
  }

  #playlist-source-search #playlist-search-input::placeholder,
  #deck-source-artists #artist-search-input::placeholder,
  #deck-source-tracks #track-search-input::placeholder {
    font-size: 14px;
  }
}

@media (max-width: 520px) {
  .info-top-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .commerce-list div {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer-links {
    justify-content: flex-start;
  }

  .deck-toolbar {
    top: calc(80px + env(safe-area-inset-top));
  }

  .deck-toolbar.is-hidden {
    transform: translateY(calc(-100% - 8px));
  }

  .deck-source-header {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    padding: 0 12px 4px;
  }

  .deck-source-heading-row {
    width: 100%;
  }

  .deck-toolbar-toggle-btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.86);
    font: inherit;
    font-size: 11px;
    font-weight: 850;
    cursor: pointer;
  }

  .deck-toolbar-toggle-btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.72);
    outline-offset: 2px;
  }

  .deck-toolbar-expand-btn {
    display: none;
  }

  .deck-toolbar-collapse-row {
    display: flex;
    justify-content: flex-end;
    padding: 0 12px 8px;
  }

  .deck-toolbar.is-collapsed .deck-toolbar-expand-btn {
    display: inline-flex;
  }

  .deck-toolbar.is-collapsed .deck-toolbar-collapse-row,
  .deck-toolbar.is-collapsed .deck-source-tabs,
  .deck-toolbar.is-collapsed .deck-source-panel {
    display: none;
  }

  .deck-source-title {
    white-space: normal;
  }

  .deck-source-tabs {
    width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .deck-source-tabs::-webkit-scrollbar {
    display: none;
  }

  .deck-source-tab {
    flex: 1 0 auto;
    padding: 8px 6px;
    font-size: 12px;
  }

  .playlist-source-switch {
    display: flex;
    width: calc(100vw - 24px);
    width: calc(100dvw - 24px);
    max-width: calc(100vw - 24px);
    max-width: calc(100dvw - 24px);
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
  }

  .playlist-source-option {
    flex: 1 1 0;
    width: 0;
    min-width: 0;
    padding-inline: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #playlist-source-search .playlist-search-row {
    display: grid;
    width: calc(100vw - 24px);
    width: calc(100dvw - 24px);
    max-width: calc(100vw - 24px);
    max-width: calc(100dvw - 24px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: hidden;
    contain: inline-size;
  }

  #playlist-source-search #playlist-search-input {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  #playlist-source-search .playlist-search-row > .playlist-search-btn,
  #playlist-source-search .playlist-search-row > .cart-slot,
  #playlist-source-search .shared-cart-controls,
  #playlist-source-search .cart-control-group,
  #playlist-source-search .cart-control-group .btn-lite {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
  }

  #playlist-source-search .playlist-search-row > .cart-slot,
  #playlist-source-search .shared-cart-controls,
  #playlist-source-search .cart-control-group {
    display: flex;
    flex-direction: row;
    align-items: stretch;
  }

  #playlist-source-search .cart-control-group .btn-lite {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #playlist-source-search .playlist-search-results {
    width: calc(100vw - 24px);
    width: calc(100dvw - 24px);
    max-width: calc(100vw - 24px);
    max-width: calc(100dvw - 24px);
  }

  .track-search-result {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 8px;
    min-height: 56px;
    margin-top: 6px;
    padding: 6px;
    box-sizing: border-box;
  }

  .track-search-artwork {
    width: 42px;
    height: 42px;
    border-radius: 6px;
  }

  .track-search-name {
    font-size: 13px;
  }

  .track-search-artist {
    margin-top: 1px;
    font-size: 11px;
  }

  .track-search-album {
    margin-top: 1px;
    font-size: 10px;
  }

  .track-search-add {
    grid-column: auto;
    width: auto;
    min-height: 32px;
    gap: 4px;
    padding: 0 8px;
    font-size: 11px;
  }

  .track-search-load-more {
    display: none;
  }
}

@media (max-width: 379px) {
  .deck-source-tabs {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 4px;
    overflow: visible;
    border-radius: 20px;
  }

  .deck-source-tabs::before {
    display: none;
  }

  .deck-source-tab {
    width: auto;
    min-width: 0;
    padding-inline: 2px;
    font-size: clamp(11px, 3.1vw, 12px);
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .deck-source-tab:nth-child(-n + 3) {
    grid-column: span 2;
  }

  .deck-source-tab:nth-child(n + 4) {
    grid-column: span 3;
  }

  .deck-source-tab.active {
    background: #fff;
  }
}

@media (max-width: 768px) {
  .deck-toolbar,
  .deck-toolbar.is-hidden {
    position: relative;
    top: auto;
    z-index: auto;
    opacity: 1;
    transform: none;
    transition: none;
    pointer-events: auto;
    will-change: auto;
  }
}

/* ===== Public deck ===== */
body.public-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255, 122, 89, 0.18), transparent 34%),
    radial-gradient(circle at top right, rgba(46, 134, 222, 0.16), transparent 30%),
    linear-gradient(180deg, #090909 0%, #020202 100%);
  background-color: #020202;
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  color: #f8f6ef;
}

body.public-page.public-theme-midnight {
  background:
    radial-gradient(circle at top left, rgba(255, 122, 89, 0.18), transparent 34%),
    radial-gradient(circle at top right, rgba(46, 134, 222, 0.16), transparent 30%),
    linear-gradient(180deg, #090909 0%, #020202 100%);
  background-color: #020202;
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

body.public-page.public-theme-signal {
  background:
    radial-gradient(circle at top left, rgba(30, 215, 96, 0.18), transparent 32%),
    radial-gradient(circle at bottom right, rgba(35, 176, 255, 0.14), transparent 34%),
    linear-gradient(180deg, #07120d 0%, #020706 100%);
  background-color: #020706;
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

body.public-page.public-theme-ember {
  background:
    radial-gradient(circle at top left, rgba(255, 92, 57, 0.18), transparent 32%),
    radial-gradient(circle at top right, rgba(255, 201, 71, 0.12), transparent 28%),
    linear-gradient(180deg, #130807 0%, #050202 100%);
  background-color: #050202;
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

body.public-page.public-theme-recordshop {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.72)),
    radial-gradient(circle at 18% 20%, rgba(29, 185, 84, 0.14), transparent 22%),
    radial-gradient(circle at 86% 16%, rgba(255, 255, 255, 0.08), transparent 18%),
    url("./DigDeck_BG1.jpg") center center / cover no-repeat;
  background-color: #050505;
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
}

.public-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(24px, 4vw, 48px) 0 56px;
}

.public-hero {
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
}

.public-view-topline {
  margin-bottom: 4px;
}

.public-eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(248, 246, 239, 0.66);
}

.public-title {
  min-width: 0;
  max-width: 100%;
  margin: 0;
  font-size: clamp(32px, 7vw, 68px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.public-creator,
.public-description {
  margin: 0;
  max-width: 720px;
}

.public-creator {
  position: relative;
  display: inline-block;
  justify-self: start;
  font-size: 16px;
  font-weight: 700;
  color: rgba(248, 246, 239, 0.82);
}

.public-edit-preview-creator {
  position: relative;
  display: inline-block;
}

.public-creator-button,
.public-edit-creator-button {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.public-creator-button:hover,
.public-creator-button:focus-visible,
.public-edit-creator-button:hover,
.public-edit-creator-button:focus-visible {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.public-creator-popover,
.public-edit-creator-popover {
  position: absolute;
  z-index: 10;
  top: calc(100% + 8px);
  left: 0;
  width: min(260px, calc(100vw - 40px));
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 12px;
  background: rgba(14, 18, 24, 0.96);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
  color: rgba(248, 246, 239, 0.82);
}

.public-creator-popover[hidden],
.public-edit-creator-popover[hidden] {
  display: none;
}

.public-creator-name,
.public-edit-creator-name {
  margin: 0 0 6px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
}

.public-creator-bio,
.public-edit-creator-bio {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}

.public-creator-bio {
  display: -webkit-box;
  overflow: hidden;
  max-height: calc(1.45em * 2);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.public-description {
  min-width: 0;
  max-width: min(720px, 100%);
  font-size: 15px;
  line-height: 1.7;
  color: rgba(248, 246, 239, 0.72);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  word-break: break-word;
}

.public-description-toggle {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: rgba(248, 246, 239, 0.88);
  font: inherit;
  font-size: 0.88em;
  font-weight: 800;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.public-description-toggle:hover,
.public-description-toggle:focus-visible {
  color: #fff;
}

.public-description-toggle:focus-visible {
  border-radius: 2px;
  outline: 2px solid rgba(248, 246, 239, 0.78);
  outline-offset: 3px;
}

.public-meta-row,
.public-actions,
.public-card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.public-hero-controls {
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.public-badge-row,
.public-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.public-badge-row .public-pill {
  min-height: 26px;
  padding: 0 9px;
  border-color: rgba(255, 255, 255, 0.28);
  border-radius: 5px;
  background: transparent;
  box-shadow: none;
  color: rgba(248, 246, 239, 0.82);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.public-badge-row .public-pill-muted {
  color: rgba(248, 246, 239, 0.66);
  background: transparent;
}

.public-link-btn-wrap {
  display: flex;
  justify-content: flex-end;
  margin-left: auto;
}

.public-link-btn-wrap[hidden] {
  display: none;
}

.public-pill,
.public-source-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(248, 246, 239, 0.92);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

a.public-source-badge {
  text-decoration: none;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

a.public-original-playlist-link {
  text-decoration: none;
}

a.public-original-playlist-link[hidden] {
  display: none;
}

a.public-source-badge:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
}

.public-source-badge-apple-music,
a.public-source-badge-apple-music:hover {
  display: block;
  min-height: 0;
  max-width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  line-height: 0;
  transform: none;
}

.public-source-badge-apple-music img {
  display: block;
  width: min(140.62px, 100%);
  height: auto;
}

a.public-original-playlist-link:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
}

.public-info-toggle {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  color: rgba(248, 246, 239, 0.86);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
}

.public-info-toggle-label {
  line-height: 1;
  white-space: nowrap;
}

.public-info-toggle-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.public-info-toggle-input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.public-info-toggle-track {
  position: relative;
  display: inline-flex;
  width: 50px;
  height: 28px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(120, 126, 134, 0.34);
  box-shadow:
    inset 0 1px 5px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(0, 0, 0, 0.1);
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.public-info-toggle-track::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(248, 246, 239, 0.92);
  box-shadow:
    0 3px 10px rgba(0, 0, 0, 0.3),
    inset 0 -1px 1px rgba(0, 0, 0, 0.1);
  transition: transform 0.18s ease, background 0.18s ease;
}

.public-info-toggle-input:checked + .public-info-toggle-track {
  border-color: rgba(101, 213, 255, 0.72);
  background: #55cfff;
  box-shadow:
    inset 0 1px 5px rgba(0, 88, 122, 0.24),
    0 0 16px rgba(85, 207, 255, 0.18);
}

.public-info-toggle-input:checked + .public-info-toggle-track::before {
  transform: translateX(22px);
  background: #f7fdff;
}

.public-info-toggle-input:focus-visible + .public-info-toggle-track {
  outline: 2px solid rgba(248, 246, 239, 0.78);
  outline-offset: 3px;
}

.public-pill-muted {
  color: rgba(248, 246, 239, 0.72);
  background: rgba(255, 255, 255, 0.04);
}

.public-share-panel {
  display: grid;
  gap: 10px;
  max-width: 720px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.public-share-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.public-share-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(248, 246, 239, 0.62);
}

.public-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(248, 246, 239, 0.94);
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.public-copy-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.26);
}

.public-export-share-btn {
  border-color: rgba(29, 185, 84, 0.42);
  background: rgba(29, 185, 84, 0.14);
}

.public-export-share-btn:hover {
  border-color: rgba(29, 185, 84, 0.68);
  background: rgba(29, 185, 84, 0.22);
}

.public-favorite-btn {
  border-color: rgba(250, 204, 21, 0.42);
  background: rgba(250, 204, 21, 0.1);
}

.public-favorite-btn:hover {
  border-color: rgba(250, 204, 21, 0.72);
  background: rgba(250, 204, 21, 0.18);
}

.public-favorite-btn.is-favorite {
  border-color: rgba(250, 204, 21, 0.86);
  background: rgba(250, 204, 21, 0.24);
  color: #ffe681;
}

.public-favorite-btn.is-favorite .ui-icon {
  fill: currentColor;
}

.favorites-page {
  min-height: 100vh;
  background: #090909;
  color: #f8f6ef;
}

.favorites-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 36px 0 80px;
}

.favorites-page.has-floating-user-area .favorites-shell { padding-top: 82px; }
.favorites-hero { margin: 46px 0 34px; }
.favorites-hero h1 { display: flex; align-items: center; gap: 12px; margin: 8px 0 10px; font-size: clamp(36px, 6vw, 72px); line-height: 1; }
.favorites-hero h1 .ui-icon { width: 0.82em; height: 0.82em; color: #facc15; }
.favorites-hero p { margin: 0; color: rgba(248, 246, 239, 0.64); }
.favorites-status { min-height: 24px; color: rgba(248, 246, 239, 0.62); }
.favorites-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.favorites-card { position: relative; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.13); border-radius: 18px; background: rgba(255, 255, 255, 0.055); }
.favorites-card-link { display: block; height: 100%; color: inherit; text-decoration: none; }
.favorites-artwork-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); aspect-ratio: 1; overflow: hidden; background: #151515; }
.favorites-artwork-grid img, .favorites-artwork-placeholder { width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: cover; }
.favorites-artwork-placeholder { background: linear-gradient(135deg, #202020, #101010); }
.favorites-card-content { padding: 17px 17px 70px; }
.favorites-card-content h2 { margin: 0; overflow-wrap: anywhere; font-size: 20px; }
.favorites-card-creator, .favorites-card-description { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; }
.favorites-card-creator { margin: 8px 0 0; color: rgba(248, 246, 239, 0.62); font-size: 13px; -webkit-line-clamp: 1; }
.favorites-card-description { min-height: 3em; margin: 10px 0; color: rgba(248, 246, 239, 0.72); line-height: 1.5; -webkit-line-clamp: 2; }
.favorites-card-meta { color: rgba(248, 246, 239, 0.52); font-size: 12px; }
.favorites-remove {
  position: absolute;
  right: 14px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 106px;
  min-height: 34px;
  overflow: hidden;
  padding: 0 12px;
  border-radius: 999px;
  cursor: pointer;
  transform-origin: right center;
  transition:
    width 180ms ease,
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
  white-space: nowrap;
}
.favorites-remove.confirm {
  width: 126px;
  border-color: rgba(255, 255, 255, 0.28);
  background: #d92d20;
  box-shadow: 0 0 14px rgba(217, 45, 32, 0.42);
  color: #fff;
}
.favorites-empty { padding: 80px 24px; border: 1px dashed rgba(255, 255, 255, 0.2); border-radius: 20px; text-align: center; }
.favorites-empty h2 { margin: 0 0 8px; }
.favorites-empty p { margin: 0 0 22px; color: rgba(248, 246, 239, 0.64); }
.favorites-empty .public-copy-btn { width: max-content; margin: 0 auto; text-decoration: none; }

@media (max-width: 780px) {
  .favorites-shell { width: min(100% - 24px, 620px); padding-top: 24px; }
  .favorites-page.has-floating-user-area .favorites-shell { padding-top: 76px; }
  .favorites-hero { margin: 34px 0 26px; }
  .favorites-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .favorites-card-content { padding: 12px 12px 62px; }
  .favorites-card-content h2 { font-size: 15px; }
  .favorites-card-description { font-size: 13px; }
  .favorites-remove { right: 9px; bottom: 11px; padding: 0 10px; }
}

.public-copy-btn:disabled,
.public-link-btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.46;
}

.public-current-cart-btn {
  white-space: nowrap;
}

@media (min-width: 641px) {
  .public-deck-cart-btn,
  .shelf-surf-cart-btn,
  .shelf-surf-page #shelf-surf-btn {
    width: 132px;
    box-sizing: border-box;
  }
}

.public-deck-primary-flow,
.public-deck-quick-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.public-deck-modal .modal-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  box-sizing: border-box;
}

.public-deck-modal .modal-figure {
  flex: 0 1 auto;
}

.public-deck-modal .modal-meta {
  margin: 0;
}

@media (max-width: 520px) {
  .public-deck-modal .modal-content {
    justify-content: flex-start;
    padding-top: 26px;
  }
}

.public-link-btn[aria-disabled="true"] {
  pointer-events: none;
}

.public-link-btn[aria-disabled="true"]:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.public-copy-btn-muted {
  color: rgba(248, 246, 239, 0.72);
  background: rgba(255, 255, 255, 0.04);
}

.public-edit-save-btn {
  border-color: rgba(31, 224, 123, 0.48);
  background: rgba(31, 224, 123, 0.18);
  color: #eafff2;
}

.public-edit-save-btn:hover {
  border-color: rgba(31, 224, 123, 0.72);
  background: rgba(31, 224, 123, 0.26);
}

.public-edit-reset-btn {
  border-color: rgba(255, 122, 122, 0.42);
  background: rgba(255, 122, 122, 0.12);
  color: #ffe6e6;
}

.public-edit-reset-btn:hover {
  border-color: rgba(255, 122, 122, 0.68);
  background: rgba(255, 122, 122, 0.2);
}

.public-edit-publish-toggle-btn {
  border-color: rgba(31, 224, 123, 0.52);
  background: rgba(31, 224, 123, 0.2);
  color: #eafff2;
}

.public-edit-publish-toggle-btn:hover {
  border-color: rgba(31, 224, 123, 0.78);
  background: rgba(31, 224, 123, 0.3);
}

.public-edit-unpublish-toggle-btn {
  border-color: rgba(255, 171, 71, 0.52);
  background: rgba(255, 171, 71, 0.16);
  color: #fff0dc;
}

.public-edit-unpublish-toggle-btn:hover {
  border-color: rgba(255, 171, 71, 0.76);
  background: rgba(255, 171, 71, 0.24);
}

.public-link-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(248, 246, 239, 0.88);
  font-size: 13px;
}

.public-link-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(248, 246, 239, 0.62);
}

.public-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(248, 246, 239, 0.94);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.public-link-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
}

.public-deck-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

#public-deck-grid {
  grid-template-columns: repeat(var(--deck-columns, 5), minmax(0, 1fr));
}

.public-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.065);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.06) inset,
    0 10px 24px rgba(0, 0, 0, 0.24),
    0 2px 8px rgba(0, 0, 0, 0.18);
}

.public-cover-wrap {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}

.public-cover-wrap[role="button"] {
  cursor: zoom-in;
}

.public-cover-wrap[role="button"]:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.88);
  outline-offset: 4px;
}

.public-cover {
  width: 100%;
  height: 100%;
  border-radius: 4px 4px 0 0;
  object-fit: cover;
  display: block;
}

.public-card-meta {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  gap: 10px;
  padding: 14px;
}

body.public-page:not(.public-edit-page) .public-card-meta {
  box-sizing: border-box;
  overflow: hidden;
  max-height: 0;
  min-height: 0;
  padding: 0 14px;
  opacity: 0;
  transform: translateY(-18px);
  pointer-events: none;
  transition:
    max-height 360ms ease-in-out,
    padding 360ms ease-in-out,
    opacity 220ms ease-in-out,
    transform 360ms ease-in-out;
}

body.public-page:not(.public-edit-page).public-card-info-visible .public-card-meta {
  max-height: 420px;
  padding: 14px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

body.public-page:not(.public-edit-page).public-card-info-visible .public-card-meta:has(.public-card-comment-inline.is-expanded) {
  max-height: 620px;
}

.public-card-title {
  min-width: 0;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.public-card-artist {
  min-width: 0;
  color: rgba(248, 246, 239, 0.72);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.public-card-footer {
  display: flex;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
  margin-top: auto;
}

.public-source-list {
  display: flex;
  min-width: 0;
  flex: 1 1 0;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
}

body.public-page:not(.public-edit-page) .public-card-footer {
  flex-direction: column;
  align-items: stretch;
  padding-bottom: 4px;
}

body.public-page:not(.public-edit-page) .public-source-list {
  flex: 0 0 auto;
  width: 100%;
}

.public-card-comment-inline {
  min-width: 0;
  max-width: 100%;
}

.public-card-comment-inline.is-empty {
  min-height: 31px;
  pointer-events: none;
}

.public-card-comment-marquee {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 6px 8px;
  border: 1px solid rgba(248, 246, 239, 0.16);
  border-radius: 4px;
  background: rgba(248, 246, 239, 0.06);
  color: rgba(248, 246, 239, 0.84);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
  white-space: nowrap;
}

.public-card-comment-marquee:focus-visible {
  outline: 2px solid rgba(248, 246, 239, 0.9);
  outline-offset: 2px;
}

.public-card-comment-marquee-track {
  display: inline-flex;
  width: max-content;
  min-width: 100%;
  gap: 32px;
  animation: public-card-comment-scroll 24s linear infinite;
  animation-play-state: paused;
}

.public-card-comment-marquee-copy {
  flex: 0 0 auto;
}

.public-card-comment-inline:not(.is-scrollable) .public-card-comment-marquee-track {
  width: 100%;
  gap: 0;
}

.public-card-comment-inline:not(.is-scrollable) .public-card-comment-marquee-copy:not(:first-child) {
  display: none;
}

.public-card-comment-inline.is-scrollable .public-card-comment-marquee-track {
  animation-play-state: running;
}

.public-card-comment-marquee:focus-visible .public-card-comment-marquee-track {
  animation-play-state: paused;
}

@media (hover: hover) and (pointer: fine) {
  .public-card-comment-marquee:hover .public-card-comment-marquee-track {
    animation-play-state: paused;
  }
}

.public-card-comment-full {
  display: block;
  width: 100%;
  margin: 8px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(248, 246, 239, 0.9);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  line-height: 1.5;
  text-align: left;
  overflow-wrap: anywhere;
}

.public-card-comment-full[hidden] {
  display: none;
}

.public-card-comment-full:focus-visible {
  outline: 2px solid rgba(248, 246, 239, 0.9);
  outline-offset: 2px;
}

.public-card-comment-inline.is-expanded .public-card-comment-marquee {
  display: none;
}

@keyframes public-card-comment-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(calc(-50% - 16px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .public-card-comment-marquee-track {
    animation: none;
  }
}

.public-card-comment-wrap {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  margin-left: auto;
}

.public-card-comment-btn {
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(248, 246, 239, 0.3);
  border-radius: 50%;
  background: rgba(248, 246, 239, 0.1);
  color: rgba(248, 246, 239, 0.88);
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.public-card-comment-btn .ui-icon {
  width: 16px;
  height: 16px;
}

.public-card-comment-btn:not(:disabled):hover,
.public-card-comment-btn:not(:disabled):focus-visible,
.public-card.has-item-comment .public-card-comment-btn {
  border-color: rgba(248, 246, 239, 0.72);
  background: rgba(248, 246, 239, 0.2);
  transform: translateY(-1px);
}

.public-card-comment-btn:disabled {
  cursor: not-allowed;
  opacity: 0.36;
  border-color: rgba(248, 246, 239, 0.16);
  background: rgba(248, 246, 239, 0.045);
  color: rgba(248, 246, 239, 0.48);
}

.public-card-comment-popover {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 1000;
  display: none;
  box-sizing: border-box;
  width: min(260px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  transform: translateX(-50%);
  padding: 12px;
  border: 1px solid rgba(248, 246, 239, 0.22);
  border-radius: 6px;
  background: rgba(22, 24, 30, 0.96);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.4);
}

.public-card-comment-popover::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 10px;
  height: 10px;
  transform: translateX(-50%) rotate(45deg);
  border-right: 1px solid rgba(248, 246, 239, 0.22);
  border-bottom: 1px solid rgba(248, 246, 239, 0.22);
  background: rgba(22, 24, 30, 0.96);
}

.public-card-comment-wrap.align-left .public-card-comment-popover {
  left: 0;
  transform: none;
}

.public-card-comment-wrap.align-left .public-card-comment-popover::after {
  left: 17px;
}

.public-card-comment-wrap.align-right .public-card-comment-popover {
  right: 0;
  left: auto;
  transform: none;
}

.public-card-comment-wrap.align-right .public-card-comment-popover::after {
  right: 17px;
  left: auto;
  transform: rotate(45deg);
}

.public-card-comment-wrap.is-open .public-card-comment-popover {
  display: block;
}

@media (max-width: 640px) {
  .public-card-comment-wrap.is-open .public-card-comment-popover {
    position: fixed;
    left: var(--comment-popover-viewport-left);
    right: auto;
    bottom: var(--comment-popover-viewport-bottom);
    transform: none;
  }

  .public-card-comment-wrap.is-open .public-card-comment-popover::after {
    right: auto;
    bottom: -6px;
    left: var(--comment-popover-arrow-left);
    transform: translateX(-50%) rotate(45deg);
  }
}

.public-card-comment-author {
  margin-bottom: 6px;
  color: rgba(248, 246, 239, 0.74);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.public-card-comment-text {
  margin: 0;
  color: rgba(248, 246, 239, 0.92);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.public-edit-item-comment-dialog {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.public-edit-item-comment-dialog.open {
  display: flex;
}

.public-edit-item-comment-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 12, 0.68);
  backdrop-filter: blur(8px);
}

.public-edit-item-comment-panel {
  position: relative;
  box-sizing: border-box;
  width: min(460px, 100%);
  border: 1px solid rgba(248, 246, 239, 0.2);
  border-radius: 6px;
  background: rgba(22, 24, 30, 0.96);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.44);
  padding: 22px;
}

.public-edit-item-comment-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(248, 246, 239, 0.22);
  border-radius: 50%;
  background: rgba(248, 246, 239, 0.08);
  color: rgba(248, 246, 239, 0.86);
  cursor: pointer;
}

.public-edit-item-comment-title {
  margin: 0 42px 6px 0;
  font-size: 18px;
  line-height: 1.25;
}

.public-edit-item-comment-track {
  margin-bottom: 14px;
  color: rgba(248, 246, 239, 0.68);
  font-size: 13px;
  line-height: 1.4;
}

.public-edit-item-comment-textarea {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-height: 132px;
  resize: vertical;
  border: 1px solid rgba(248, 246, 239, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(248, 246, 239, 0.95);
  font: inherit;
  line-height: 1.5;
  padding: 12px;
}

.public-edit-item-comment-foot {
  display: flex;
  min-height: 22px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 9px;
  color: rgba(248, 246, 239, 0.62);
  font-size: 12px;
}

.public-edit-title-dialog {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.public-edit-title-dialog.open {
  display: flex;
}

.public-edit-title-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 12, 0.62);
  backdrop-filter: blur(8px);
}

.public-edit-title-dialog-panel {
  position: relative;
  box-sizing: border-box;
  width: min(360px, 100%);
  border: 1px solid rgba(248, 246, 239, 0.2);
  border-radius: 6px;
  background: rgba(22, 24, 30, 0.97);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
  padding: 20px;
}

.public-edit-title-dialog-label {
  display: block;
  margin-bottom: 10px;
  color: rgba(248, 246, 239, 0.94);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.public-edit-title-dialog-input {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid rgba(248, 246, 239, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(248, 246, 239, 0.95);
  font: inherit;
  font-weight: 800;
  line-height: 1.45;
  padding: 12px;
}

.public-edit-title-dialog-input:focus-visible {
  outline: none;
  border-color: rgba(63, 224, 142, 0.72);
  box-shadow: 0 0 0 3px rgba(63, 224, 142, 0.18);
}

.public-edit-title-dialog-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

/* ===== Shelf Surf ===== */
body.shelf-surf-page {
  background:
    radial-gradient(circle at 12% 16%, rgba(45, 212, 191, 0.18), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(192, 132, 252, 0.16), transparent 26%),
    radial-gradient(circle at 52% 0%, rgba(250, 204, 21, 0.08), transparent 34%),
    linear-gradient(180deg, #08090c 0%, #020202 100%);
  background-color: #020202;
}

.shelf-surf-shell {
  width: min(1240px, calc(100% - 32px));
}

.shelf-surf-hero {
  position: relative;
}

.shelf-surf-topline {
  margin-bottom: 4px;
}

.shelf-surf-meta-row {
  justify-content: flex-start;
}

.shelf-surf-primary-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.shelf-surf-quick-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.shelf-surf-open-link[hidden],
.shelf-surf-original-playlist-link[hidden] {
  display: none;
}

.shelf-surf-original-playlist-link {
  min-height: 34px;
  text-decoration: none;
}

.shelf-surf-original-playlist-link .ui-icon {
  width: 15px;
  height: 15px;
}

.shelf-surf-share-modal .export-share-editor {
  padding-right: 0;
}

.shelf-surf-stage {
  position: relative;
  padding-top: 16px;
}

.shelf-surf-current-line {
  position: absolute;
  top: 0;
  left: 4%;
  right: 4%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(248, 246, 239, 0.34), transparent);
  box-shadow: 0 0 18px rgba(45, 212, 191, 0.16);
}

.shelf-surf-grid {
  perspective: 1100px;
  transform-origin: center top;
}

.shelf-surf-grid .public-card {
  transform-origin: center bottom;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.shelf-surf-grid .public-card:hover {
  transform: translateY(-4px) rotateX(2deg);
  border-color: rgba(248, 246, 239, 0.28);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.08) inset,
    0 16px 34px rgba(0, 0, 0, 0.34),
    0 0 24px rgba(45, 212, 191, 0.08);
}

body.shelf-surfing .shelf-surf-grid {
  animation: shelf-surf-sweep 760ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

body.shelf-surfing .shelf-surf-grid .public-card {
  animation: shelf-surf-card-in 620ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

body.shelf-surfing .shelf-surf-grid .public-card:nth-child(3n + 2) {
  animation-delay: 35ms;
}

body.shelf-surfing .shelf-surf-grid .public-card:nth-child(3n) {
  animation-delay: 70ms;
}

@keyframes shelf-surf-sweep {
  0% {
    opacity: 0;
    transform: translateX(42px) rotateY(-8deg);
    filter: blur(8px);
  }
  58% {
    opacity: 1;
    transform: translateX(-6px) rotateY(2deg);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateX(0) rotateY(0);
    filter: blur(0);
  }
}

@keyframes shelf-surf-card-in {
  0% {
    opacity: 0;
    transform: translateY(20px) rotateX(10deg) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotateX(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.shelf-surfing .shelf-surf-grid,
  body.shelf-surfing .shelf-surf-grid .public-card {
    animation-duration: 1ms;
    animation-iteration-count: 1;
  }
}

.public-edit-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(22px, 4vw, 44px) 0 56px;
}

.public-edit-head {
  display: grid;
  gap: 18px;
  margin-bottom: 28px;
}

.public-edit-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.public-edit-back,
.public-edit-open-head {
  width: fit-content;
  color: rgba(248, 246, 239, 0.82);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.public-edit-open-head {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.public-edit-back:hover,
.public-edit-open-head:hover {
  color: #fff;
}

.public-edit-open-head[aria-disabled="true"] {
  color: rgba(248, 246, 239, 0.34);
  pointer-events: none;
}

.public-edit-layout {
  display: grid;
  grid-template-columns: minmax(280px, 400px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.public-edit-form,
.public-edit-preview {
  min-width: 0;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.public-edit-form {
  position: sticky;
  top: 72px;
  display: grid;
  gap: 16px;
  padding: 18px;
}

.public-edit-input,
.public-edit-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.26);
  color: #fff;
  font: inherit;
}

.public-edit-input {
  min-height: 42px;
  padding: 0 12px;
}

.public-edit-original-playlist {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin-top: 7px;
  color: rgba(248, 246, 239, 0.66);
  font-size: 12px;
  line-height: 1.35;
}

.public-edit-original-playlist[hidden] {
  display: none;
}

.public-edit-original-playlist-name {
  min-width: 0;
  overflow: hidden;
  color: rgba(248, 246, 239, 0.82);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-edit-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: rgba(248, 246, 239, 0.78);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.public-edit-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: #f8f6ef;
}

.public-edit-checkbox-disabled {
  cursor: help;
  color: rgba(248, 246, 239, 0.46);
}

.public-edit-checkbox-disabled input {
  cursor: help;
}

.public-edit-original-playlist-link {
  display: inline-grid;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  color: rgba(248, 246, 239, 0.78);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
}

.public-edit-original-playlist-link:hover,
.public-edit-original-playlist-link:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.public-edit-textarea-wrap {
  position: relative;
}

.public-edit-textarea {
  resize: vertical;
  min-height: 112px;
  padding: 12px 12px 28px;
  line-height: 1.55;
}

.public-edit-description-count {
  position: absolute;
  right: 12px;
  bottom: 9px;
  color: rgba(248, 246, 239, 0.58);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.public-edit-d1-panel {
  display: none;
}

.public-edit-flow-arrow {
  display: grid;
  place-items: center;
  min-height: 20px;
  margin: -4px 0;
  color: rgba(248, 246, 239, 0.76);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.public-edit-options,
.public-edit-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.public-edit-options .settings-field {
  min-width: 0;
}

.public-edit-options .select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.public-edit-public-deck-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.public-edit-public-deck-actions .is-attention:not(:disabled) {
  animation: public-edit-attention-pulse 1.15s ease-in-out infinite;
  border-color: rgba(63, 224, 142, 0.9);
  box-shadow: 0 0 0 0 rgba(63, 224, 142, 0.42);
}

@keyframes public-edit-attention-pulse {
  0%, 100% {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 0 rgba(63, 224, 142, 0.34);
  }
  50% {
    background: rgba(63, 224, 142, 0.20);
    box-shadow: 0 0 0 6px rgba(63, 224, 142, 0);
  }
}

.public-edit-share {
  padding: 12px;
}

.public-edit-preview {
  padding: 18px;
}

.public-edit-preview-hero {
  margin-bottom: 18px;
}

.public-edit-preview .public-title {
  font-size: clamp(30px, 5vw, 56px);
}

@media (min-width: 641px) {
  .public-edit-layout {
    align-items: start;
  }

  .public-edit-preview {
    position: sticky;
    top: 72px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: calc(100vh - 96px);
    box-sizing: border-box;
    overflow: hidden;
  }

  .public-edit-preview-hero {
    flex: 0 0 auto;
  }

  .public-edit-preview .public-deck-grid {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    grid-auto-rows: max-content;
    scrollbar-gutter: stable;
    padding-right: 14px;
    align-content: start;
  }
}

@media (max-width: 640px) {
  .public-shell {
    width: min(100%, calc(100% - 24px));
    padding-top: 20px;
  }

  .public-deck-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #public-deck-grid,
  .deck-manager-preview .public-deck-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .public-share-head {
    align-items: stretch;
    flex-direction: column;
  }

  .public-share-head .public-copy-btn {
    width: 100%;
  }

  .public-link-btn-wrap {
    flex: 0 0 100%;
    width: 100%;
    box-sizing: border-box;
    margin-left: 0;
  }

  .public-link-btn-wrap .public-link-btn {
    width: 100%;
  }

  .shelf-surf-page .public-action-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    gap: 10px;
  }

  .shelf-surf-page #shelf-surf-btn {
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .shelf-surf-primary-flow {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    gap: 10px;
  }

  .shelf-surf-quick-actions {
    display: grid;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    gap: 8px;
    width: 100%;
  }

  .shelf-surf-quick-actions .public-copy-btn {
    width: 100%;
    min-width: 0;
    gap: 5px;
    padding-inline: 6px;
    white-space: nowrap;
  }

  .shelf-surf-primary-flow > .arrow {
    display: none;
  }

  .shelf-surf-primary-flow > .cart-flow-arrow {
    display: block;
    margin: 0 auto;
  }

  .shelf-surf-cart-btn {
    width: 100%;
    max-width: none;
  }

  .public-page .public-action-row,
  .public-deck-primary-flow {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    gap: 10px;
  }

  .public-deck-cart-btn {
    width: 100%;
    max-width: none;
  }

  .public-deck-quick-actions {
    display: grid;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    width: 100%;
    gap: 8px;
  }

  .public-deck-quick-actions .public-copy-btn {
    width: 100%;
    min-width: 0;
    gap: 5px;
    padding-inline: 4px;
    white-space: nowrap;
  }

  .public-deck-quick-actions .public-export-share-btn {
    font-size: clamp(10px, 3.1vw, 12px);
  }

  .public-card-footer {
    align-items: flex-start;
  }

  .public-edit-shell {
    width: min(100%, calc(100% - 24px));
    padding-top: 20px;
  }

  .public-edit-layout {
    grid-template-columns: 1fr;
  }

  .public-edit-form {
    position: static;
  }

  .public-edit-options,
  .public-edit-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .playlist-shuffle-block .shuffle-cta-wrap,
  .playlist-shuffle-block #playlist-random-btn {
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
    box-sizing: border-box;
  }
}

/* ===== Landing page ===== */
body.landing-page {
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  background: #050505;
}

body.landing-page::before,
body.landing-page::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body.landing-page::before {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.56), rgba(0, 0, 0, 0.68)),
    radial-gradient(circle at 18% 20%, rgba(29, 185, 84, 0.14), transparent 22%),
    radial-gradient(circle at 86% 16%, rgba(255, 255, 255, 0.08), transparent 18%),
    url("./DigDeck_BG1.jpg") center center / cover no-repeat;
  transform: scale(1.02);
}

body.landing-page::after {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.16)),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.03) 0,
      rgba(255, 255, 255, 0.03) 1px,
      transparent 1px,
      transparent 120px
    );
  mix-blend-mode: screen;
  opacity: 0.28;
}

.landing-language {
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.36);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
  color: rgba(255, 255, 255, 0.72);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.landing-language-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.landing-language-select {
  appearance: none;
  min-width: 118px;
  height: 32px;
  padding: 0 28px 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background:
    linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.82) 50%) calc(100% - 15px) 13px / 5px 5px no-repeat,
    linear-gradient(135deg, rgba(255, 255, 255, 0.82) 50%, transparent 50%) calc(100% - 10px) 13px / 5px 5px no-repeat,
    rgba(255, 255, 255, 0.1);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  cursor: pointer;
}

.landing-language-select option {
  color: #111;
}

.landing-language-select:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.14);
}

.landing-shell {
  box-sizing: border-box;
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.landing-hero {
  box-sizing: border-box;
  width: min(980px, 100%);
  padding: clamp(28px, 6vw, 72px);
  text-align: center;
}

.landing-beta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  margin-bottom: 18px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  color: rgba(255, 255, 255, 0.52);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.landing-logo {
  display: block;
  width: clamp(112px, 14vw, 168px);
  max-width: 42vw;
  height: auto;
  margin: 0 auto 22px;
  object-fit: contain;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.34));
}

.landing-brand-lockup {
  max-width: 100%;
  margin: 0 auto;
}

.landing-brand-pattern-b {
  display: flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 2.8vw, 34px);
}

.landing-brand-pattern-b .landing-logo {
  width: clamp(104px, 11vw, 136px);
  max-width: 24vw;
  margin: 0;
  flex: 0 1 auto;
}

.landing-brand-pattern-b .landing-title {
  flex: 0 1 auto;
  text-align: left;
}

.landing-title {
  margin: 0;
  color: #fff;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  text-shadow: 0 18px 38px rgba(0, 0, 0, 0.32);
}

.landing-title-main,
.landing-title-sub {
  display: block;
  letter-spacing: 0;
}

.landing-title-main {
  font-size: 84px;
  font-weight: 800;
  line-height: 0.92;
}

.landing-title-sub {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.18;
}

.landing-actions {
  display: grid;
  justify-items: center;
  gap: 12px;
  width: min(360px, 100%);
  margin: 52px auto 0;
}

.landing-disclosure {
  max-width: 720px;
  margin: 26px auto 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  line-height: 1.55;
  text-align: center;
}

.landing-disclosure p {
  margin: 0;
}

.landing-disclosure p + p {
  margin-top: 8px;
}

.landing-login-status {
  min-height: 18px;
  margin: 14px auto 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}

.landing-login-status.error {
  color: #ffb4a8;
}

.landing-google-login {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.landing-google-login[hidden] {
  display: none;
}

.landing-google-login.is-busy {
  opacity: 0.6;
  pointer-events: none;
}

.service-request-panel {
  width: min(360px, 100%);
  margin: 18px auto 0;
}

.service-request-toggle {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  color: rgba(255, 255, 255, 0.9);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.service-request-toggle:hover,
.service-request-toggle[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.service-request-toggle:active {
  transform: translateY(1px);
}

.service-request-toggle:focus-visible,
.service-request-item:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(125, 211, 252, 0.22);
}

.service-request-chevron {
  font-size: 18px;
  line-height: 1;
}

.service-request-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.34);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.24);
}

.service-request-list[hidden] {
  display: none;
}

.service-request-item {
  appearance: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0;
  text-align: left;
  cursor: pointer;
}

.service-request-item:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
}

.service-request-item:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.service-request-item[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.05);
  opacity: 0.46;
}

.service-request-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.service-request-count {
  min-width: 32px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.16);
  color: rgba(224, 247, 255, 0.94);
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.service-request-status {
  min-height: 17px;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}

.landing-primary-btn,
.landing-spotify-btn,
.landing-secondary-btn {
  box-sizing: border-box;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  padding: 0 28px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease, background 140ms ease;
}

.landing-primary-btn,
.landing-spotify-btn {
  background: rgba(255, 255, 255, 0.92);
  color: #050505;
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.44);
}

.landing-secondary-btn {
  background: rgba(0, 0, 0, 0.26);
  color: rgba(255, 255, 255, 0.9);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.landing-secondary-btn:disabled {
  cursor: wait;
  opacity: 0.64;
}

.landing-primary-btn:hover,
.landing-spotify-btn:hover,
.landing-secondary-btn:hover {
  transform: translateY(-1px);
}

.landing-primary-btn:hover,
.landing-spotify-btn:hover {
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  filter: brightness(1.02);
}

.landing-secondary-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.landing-primary-btn:active,
.landing-spotify-btn:active,
.landing-secondary-btn:active {
  transform: translateY(0);
}

.landing-primary-btn:focus-visible,
.landing-spotify-btn:focus-visible,
.landing-secondary-btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.12),
    0 18px 42px rgba(0, 0, 0, 0.34);
}

@media (max-width: 640px) {
  .landing-language {
    top: 12px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }

  .landing-shell {
    padding: 68px 16px 16px;
  }

  .landing-hero {
    padding: 22px 12px 30px;
  }

  .landing-actions {
    margin-top: 30px;
  }

  .landing-logo {
    width: 118px;
    max-width: 38vw;
    margin-bottom: 18px;
  }

  .landing-brand-pattern-b {
    gap: 14px;
  }

  .landing-brand-pattern-b .landing-logo {
    width: 82px;
    max-width: 24vw;
    margin: 0;
  }

  .landing-brand-pattern-b .landing-title-main {
    font-size: 48px;
  }

  .landing-brand-pattern-b .landing-title-sub {
    font-size: 18px;
  }

  .landing-title-main {
    font-size: 56px;
  }

  .landing-title-sub {
    margin-top: 10px;
    font-size: 22px;
  }

  .landing-disclosure {
    font-size: 10px;
    line-height: 1.5;
    text-align: left;
  }

  .landing-primary-btn,
  .landing-spotify-btn,
  .landing-secondary-btn {
    width: 100%;
  }
}

/* ===== DigDeck auth ===== */
body.auth-page {
  min-height: 100%;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.78)),
    url("./DigDeck_BG1.jpg") center center / cover no-repeat fixed,
    #050505;
  color: #fff;
}

.auth-shell {
  box-sizing: border-box;
  width: min(460px, calc(100% - 32px));
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: 32px 0;
  display: grid;
  align-content: center;
  gap: 18px;
}

.auth-brand {
  justify-self: center;
  color: rgba(255, 255, 255, 0.92);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 28px;
  font-weight: 850;
  text-decoration: none;
}

.auth-panel {
  box-sizing: border-box;
  width: 100%;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(10, 10, 10, 0.86);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.auth-panel[hidden] {
  display: none;
}

.auth-title {
  margin: 0;
  color: rgba(255, 255, 255, 0.96);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 24px;
  font-weight: 850;
  line-height: 1.14;
}

.auth-copy {
  margin: 10px 0 18px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
  line-height: 1.55;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-field {
  display: grid;
  gap: 7px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  font-weight: 800;
}

.auth-input {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.94);
  font: inherit;
  font-size: 15px;
  outline: none;
}

.auth-input:focus {
  border-color: rgba(125, 211, 252, 0.7);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.16);
}

.auth-submit {
  appearance: none;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #050505;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 850;
  letter-spacing: 0;
  text-decoration: none;
  cursor: pointer;
}

.auth-submit:hover {
  filter: brightness(1.04);
}

.auth-submit:disabled {
  cursor: wait;
  opacity: 0.7;
}

.auth-link-btn {
  appearance: none;
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(191, 219, 254, 0.92);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.auth-link-btn:hover {
  color: #fff;
}

.auth-hint {
  margin: -4px 0 0;
  color: rgba(255, 255, 255, 0.54);
  font-size: 12px;
  line-height: 1.45;
}

.auth-consent {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  line-height: 1.55;
}

.auth-consent input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: #1db954;
}

.auth-consent a {
  color: rgba(191, 219, 254, 0.95);
  font-weight: 800;
}

.auth-footer {
  width: min(920px, calc(100% - 32px));
  margin: -8px auto 0;
}

.auth-status {
  min-height: 18px;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.auth-status.error {
  color: #ffb4a8;
}

.google-auth-section {
  margin-top: 4px;
}

.google-auth-section[hidden] {
  display: none;
}

.google-auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin: 12px 0;
  color: rgba(255, 255, 255, 0.48);
  font-size: 11px;
  font-weight: 800;
}

.google-auth-divider::before,
.google-auth-divider::after {
  content: "";
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.google-auth-button {
  display: flex;
  min-height: 44px;
  justify-content: center;
  overflow: hidden;
}

.google-auth-section.is-busy {
  opacity: 0.6;
  pointer-events: none;
}

.auth-try-link {
  display: block;
  text-align: center;
  text-decoration: none;
}

.auth-anchor[hidden] {
  display: none;
}

/* ===== Browse page ===== */
.browse-page {
  background:
    radial-gradient(circle at top left, rgba(29, 185, 84, 0.12), transparent 30%),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 24%),
    #050505;
}

.browse-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(24px, 4vw, 44px) 0 56px;
}

.browse-hero {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.browse-title {
  margin: 0;
  color: #fff;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 0.95;
}

.browse-copy {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 15px;
  line-height: 1.65;
}

.browse-search-block {
  padding-left: 0;
  padding-right: 0;
}

@media (max-width: 520px) {
  .browse-search-block {
    padding-right: 12px;
  }

  .browse-search-block .playlist-random-btn {
    flex: 0 0 calc(100vw - 44px);
    width: calc(100vw - 44px);
    max-width: calc(100vw - 44px);
  }
}

.browse-collection-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.browse-collection-actions .btn-lite {
  min-height: 36px;
}

.export-share-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1300;
}

.export-share-modal.open {
  display: block;
}

.export-share-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
}

.export-share-dialog {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(280px, 520px);
  gap: 22px;
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  margin: 24px auto;
  padding: 18px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: #111;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.62);
}

.export-share-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
  font-size: 26px;
  line-height: 38px;
  cursor: pointer;
}

.export-share-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.export-share-editor {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-right: 8px;
}

.export-share-title {
  margin: 0;
  padding-right: 42px;
  font-size: 24px;
  line-height: 1.1;
}

.export-share-copy {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
  line-height: 1.45;
}

.export-share-field {
  display: grid;
  gap: 8px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 800;
}

.export-share-field input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font-size: 14px;
  box-sizing: border-box;
}

.export-share-field input:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.export-share-image-option {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  user-select: none;
}

.export-share-field .export-share-image-checkbox {
  width: 18px;
  min-width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  accent-color: #1db954;
  cursor: pointer;
}

.export-share-image-option:has(.export-share-image-checkbox:disabled) {
  cursor: not-allowed;
  opacity: 0.56;
}

.export-share-modal.is-unauthenticated .export-share-auth-only,
.export-share-modal.is-unauthenticated #export-share-download-btn {
  display: none;
}

.export-share-layouts,
.export-share-actions,
.export-share-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.export-share-links[hidden] {
  display: none;
}

.export-share-layout {
  min-width: 72px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.86);
  font-weight: 900;
  cursor: pointer;
}

.export-share-layout.active {
  border-color: rgba(29, 185, 84, 0.72);
  background: rgba(29, 185, 84, 0.2);
  color: #fff;
}

.export-share-layout:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.export-share-status {
  min-height: 20px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  line-height: 1.45;
}

.export-share-status.error {
  color: #ff8585;
}

.export-share-actions .playlist-search-btn {
  flex: 1;
  min-width: 128px;
}

.export-share-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.export-share-service-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.export-share-service-buttons a.export-share-service-btn {
  min-width: 0;
  height: 40px;
  gap: 8px;
  border-radius: 8px;
  color: #fff;
}

.export-share-copy-url {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.export-share-copy-url:hover {
  background: rgba(255, 255, 255, 0.14);
}

.export-share-copy-url .ui-icon {
  width: 17px;
  height: 17px;
}

.export-share-service-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: currentColor;
}

.export-share-service-x {
  background: #000;
}

.export-share-service-threads {
  background: #101010;
}

.export-share-service-bluesky {
  border-color: rgba(17, 133, 254, 0.42);
  background: #1185fe;
}

.export-share-service-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.export-share-preview-wrap {
  display: grid;
  place-items: center;
  min-height: 320px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.export-share-preview-wrap[hidden] {
  display: none;
}

.export-share-modal.is-url-share-only .export-share-dialog {
  grid-template-columns: minmax(0, 440px);
  width: min(440px, calc(100vw - 24px));
}

.export-share-preview {
  display: block;
  width: min(100%, 520px);
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 8px;
  background: #050505;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.45);
}

@media (max-width: 760px) {
  .export-share-dialog {
    grid-template-columns: 1fr;
    gap: 16px;
    width: min(440px, calc(100vw - 24px));
    margin: 12px auto;
    padding: 14px;
  }

  .export-share-editor {
    padding-right: 0;
  }

  .export-share-preview-wrap {
    min-height: 0;
    padding: 8px;
  }

  .export-share-service-buttons {
    display: none;
  }
}

.browse-back-link,
.browse-login-link {
  color: rgba(255, 255, 255, 0.84);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.browse-back-link:hover,
.browse-login-link:hover {
  color: #fff;
}

.trial-tutorial-modal {
  position: fixed;
  inset: 0;
  z-index: 2400;
  display: none;
  place-items: center;
  box-sizing: border-box;
  padding: 12px;
}

.trial-tutorial-modal.open {
  display: grid;
}

.trial-tutorial-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.trial-tutorial-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  width: min(1120px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  max-height: calc(100svh - 24px);
  box-sizing: border-box;
  padding: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  background: #0c0e0f;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.72);
}

.trial-tutorial-header,
.trial-tutorial-footer,
.trial-tutorial-actions,
.trial-tutorial-dots {
  display: flex;
  align-items: center;
}

.trial-tutorial-header,
.trial-tutorial-footer {
  justify-content: space-between;
  gap: 14px;
}

.trial-tutorial-title {
  margin: 0;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
}

.trial-tutorial-counter {
  margin: 3px 0 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 800;
}

.trial-tutorial-close {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font: inherit;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.trial-tutorial-stage {
  display: grid;
  min-height: 0;
  place-items: center;
  overflow: hidden;
  border-radius: 10px;
  background: #dff4f4;
}

.trial-tutorial-image {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 168px);
  max-height: calc(100svh - 168px);
  aspect-ratio: 16 / 9;
  object-fit: contain;
  touch-action: pinch-zoom;
}

.trial-tutorial-dots {
  flex-wrap: wrap;
  gap: 7px;
}

.trial-tutorial-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.trial-tutorial-dot.active {
  border-color: #fff;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(61, 220, 211, 0.16);
}

.trial-tutorial-actions {
  gap: 8px;
}

.trial-tutorial-nav {
  min-width: 96px;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.trial-tutorial-nav.primary {
  border-color: rgba(78, 222, 213, 0.58);
  background: rgba(21, 117, 112, 0.5);
}

.trial-tutorial-nav:disabled {
  cursor: default;
  opacity: 0.32;
}

.trial-tutorial-close:hover,
.trial-tutorial-nav:hover:not(:disabled),
.trial-tutorial-dot:hover {
  border-color: rgba(255, 255, 255, 0.72);
  background-color: rgba(255, 255, 255, 0.14);
}

.trial-tutorial-close:focus-visible,
.trial-tutorial-nav:focus-visible,
.trial-tutorial-dot:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(84, 221, 213, 0.3);
}

@media (max-width: 640px) {
  .trial-tutorial-modal {
    padding: 8px;
  }

  .trial-tutorial-dialog {
    gap: 9px;
    width: calc(100vw - 16px);
    max-height: calc(100svh - 16px);
    padding: 9px;
    border-radius: 12px;
  }

  .trial-tutorial-title {
    font-size: 14px;
  }

  .trial-tutorial-close {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .trial-tutorial-image {
    max-height: calc(100svh - 144px);
  }

  .trial-tutorial-footer {
    align-items: flex-end;
  }

  .trial-tutorial-dots {
    max-width: 104px;
  }

  .trial-tutorial-nav {
    min-width: 76px;
    min-height: 44px;
    padding: 0 13px;
  }
}

.browse-user-area {
  margin-left: auto;
}

.browse-language-select {
  min-width: 112px;
  height: 34px;
  background-color: rgba(255, 255, 255, 0.08);
}

@media (max-width: 520px) {
  .browse-user-area {
    flex-wrap: nowrap;
  }

  .browse-language-select {
    min-width: 0;
    width: min(132px, 42vw);
  }

  .browse-login-link {
    white-space: nowrap;
  }
}

/* Guest Shuffle and local-only Stash */
.browse-source-tabs {
  display: flex;
  width: min(420px, 100%);
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
}

.browse-source-tab {
  flex: 1 1 0;
  min-width: 132px;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  font: inherit;
  font-size: 14px;
  font-weight: 900;
}

.browse-source-tab.active {
  background: rgba(255, 255, 255, 0.94);
  color: #090909;
}

.browse-primary-actions {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(180px, 0.48fr) auto;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
  padding: 14px 0;
}

.browse-source-action-area,
.browse-source-panel,
.browse-source-panel > .playlist-search-btn,
.browse-cart-btn {
  width: 100%;
  min-width: 0;
}

.browse-source-panel > .playlist-search-btn,
.browse-cart-btn {
  min-height: 52px;
  justify-content: center;
  font-size: 15px;
}

.browse-source-panel[hidden] {
  display: none;
}

.browse-itunes-search-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  gap: 8px;
}

.browse-itunes-search-row .playlist-search-input,
.browse-itunes-search-row .playlist-search-btn {
  min-width: 0;
  height: 52px;
}

.browse-cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
}

.browse-cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  display: inline-grid;
  min-width: 23px;
  min-height: 23px;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 11px;
}

.browse-action-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.58);
}

.browse-info-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
}

.browse-secondary-tools {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.browse-deck-help-layer {
  margin-left: 0;
}

.browse-info-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.browse-toggle-track {
  position: relative;
  width: 48px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  transition: background 160ms ease, border-color 160ms ease;
}

.browse-toggle-track span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
  transition: transform 160ms ease;
}

.browse-info-toggle input:checked + .browse-toggle-track {
  border-color: rgba(45, 212, 191, 0.8);
  background: rgba(13, 148, 136, 0.65);
}

.browse-info-toggle input:checked + .browse-toggle-track span {
  transform: translateX(20px);
}

.browse-info-toggle input:focus-visible + .browse-toggle-track {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.browse-apple-music-badge,
.browse-apple-music-badge:hover {
  display: inline-block;
  padding: 0;
  border: 0;
  background: transparent;
  line-height: 0;
}

.browse-apple-music-badge img {
  display: block;
  width: min(140.62px, 100%);
  height: auto;
}

.browse-page .export-share-image-option {
  display: none !important;
}

.browse-page #deck {
  gap: 2px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.browse-page #deck .browse-cover {
  appearance: none;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  color: #fff;
  cursor: pointer;
  text-align: left;
}

.browse-page #deck .browse-cover:focus-visible {
  z-index: 2;
  outline: 3px solid #fff;
  outline-offset: -3px;
}

.browse-cover-info {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  gap: 2px;
  padding: 34px 10px 10px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.94));
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.browse-show-info .browse-cover-info {
  opacity: 1;
  transform: translateY(0);
}

.browse-cover-info strong,
.browse-cover-info span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.browse-cover-info strong {
  font-size: 12px;
}

.browse-cover-info span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 10px;
}

.guest-cart-footer {
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}

.guest-gate-modal,
.landing-confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: none;
  place-items: center;
  padding: 16px;
}

.guest-gate-modal.open,
.landing-confirm-modal.open {
  display: grid;
}

.guest-gate-backdrop,
.landing-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
}

.guest-gate-dialog,
.landing-confirm-dialog {
  position: relative;
  width: min(460px, calc(100vw - 32px));
  box-sizing: border-box;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: #121619;
  color: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.62);
}

.guest-gate-dialog h2,
.landing-confirm-dialog h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.guest-gate-dialog p,
.landing-confirm-dialog p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
  line-height: 1.7;
}

.guest-gate-links {
  display: grid;
  gap: 8px;
  margin: 18px 0;
}

.guest-gate-links a {
  color: #7dd3fc;
  font-size: 14px;
  font-weight: 800;
}

.guest-gate-dialog > .btn-lite {
  width: 100%;
  min-height: 42px;
}

.browse-toast {
  position: fixed;
  bottom: max(24px, calc(env(safe-area-inset-bottom) + 12px));
  left: 50%;
  z-index: 1700;
  max-width: calc(100vw - 32px);
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(10, 16, 20, 0.94);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.browse-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.guest-dialog-open,
.landing-modal-open {
  overflow: hidden;
}

.landing-confirm-status {
  min-height: 20px;
  margin-top: 12px;
  color: #fca5a5;
  font-size: 13px;
  font-weight: 800;
}

.landing-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}

.landing-confirm-actions button {
  min-height: 44px;
  border-radius: 9px;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.landing-confirm-cancel {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.landing-confirm-danger {
  border: 1px solid rgba(248, 113, 113, 0.64);
  background: #b42318;
}

.landing-confirm-actions button:disabled {
  cursor: wait;
  opacity: 0.56;
}

@media (max-width: 768px) {
  .browse-page #deck {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 641px) {
  .browse-primary-actions {
    grid-template-columns: auto auto auto auto;
    justify-content: start;
  }

  .browse-source-action-area,
  .browse-source-panel,
  .browse-source-panel > .playlist-search-btn,
  .browse-cart-btn {
    width: auto;
  }

  .browse-source-panel > .playlist-search-btn,
  .browse-cart-btn {
    min-height: 40px;
    height: 40px;
    font-size: 14px;
  }

  .browse-itunes-search-row {
    width: min(620px, 58vw);
  }
}

@media (max-width: 640px) {
  .browse-shell {
    width: min(100% - 24px, 1200px);
    padding-top: 22px;
  }

  .browse-title {
    font-size: clamp(40px, 14vw, 58px);
  }

  .browse-primary-actions {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px 8px;
  }

  .browse-source-action-area {
    grid-column: 1 / -1;
  }

  .browse-itunes-search-row {
    grid-template-columns: 1fr;
  }

  .browse-action-arrow {
    display: none;
  }

  .browse-cart-btn {
    min-height: 50px;
  }

  .browse-info-toggle {
    justify-self: end;
  }

  .cart-drawer-header {
    padding-top: 18px;
  }

  .guest-cart-footer {
    grid-template-columns: 1fr;
  }

  .browse-page .export-share-service-buttons {
    display: none;
  }

  .landing-confirm-actions {
    grid-template-columns: 1fr;
  }
}

/* ===== Onboarding ===== */
.onboarding-shell {
  gap: 18px;
}

.onboarding-panel {
  min-height: 360px;
}

.onboarding-step {
  color: rgba(17, 17, 17, 0.54);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.onboarding-textarea {
  min-height: 112px;
  resize: vertical;
}

.onboarding-date-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tutorial-callout {
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  color: #111;
  font-size: 12px;
  font-weight: 900;
  left: 50%;
  letter-spacing: 0;
  line-height: 1;
  padding: 6px 10px;
  pointer-events: none;
  position: absolute;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  white-space: nowrap;
  z-index: 25;
  animation: shuffleTipFloat 1400ms ease-in-out infinite;
}

.tutorial-callout::after {
  border: 6px solid transparent;
  border-top-color: #fff;
  top: 100%;
  content: "";
  left: 50%;
  position: absolute;
  transform: translateX(-50%);
}

.tutorial-callout.right {
  animation: tutorialRightTipFloat 1400ms ease-in-out infinite;
  bottom: auto;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
}

.tutorial-callout.right::after {
  border: 6px solid transparent;
  border-right-color: #fff;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
}

.tutorial-anchor {
  position: relative;
  z-index: 24;
}

.tutorial-anchor::before {
  border: 2px solid #111;
  border-radius: 10px;
  bottom: -6px;
  content: "";
  left: -6px;
  pointer-events: none;
  position: absolute;
  right: -6px;
  top: -6px;
}

@keyframes tutorialRightTipFloat {
  0%, 100% { transform: translateY(-50%); }
  50% { transform: translateY(calc(-50% - 4px)); }
}

@media (prefers-reduced-motion: reduce) {
  .tutorial-callout {
    animation: none;
  }
}

@media (max-width: 640px) {
  .policy-definition-list {
    grid-template-columns: 1fr;
  }

  .policy-definition-list dt {
    margin-top: 6px;
  }

  .browse-collection-actions .btn-lite {
    flex: 1 1 100%;
  }

  .onboarding-date-grid {
    grid-template-columns: 1fr;
  }

  .tutorial-callout {
    font-size: 0.78rem;
    max-width: min(260px, 80vw);
    text-align: center;
    white-space: normal;
  }

  .tutorial-callout.right {
    animation: shuffleTipFloat 1400ms ease-in-out infinite;
    bottom: calc(100% + 10px);
    left: 50%;
    top: auto;
    transform: translateX(-50%);
  }

  .tutorial-callout.right::after {
    border: 6px solid transparent;
    border-top-color: #fff;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
  }
}
.cookie-consent-panel {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: end center;
  padding: 16px;
  background: rgb(0 0 0 / 0.58);
}

.cookie-consent-panel[hidden] {
  display: none;
}

.cookie-consent-card {
  width: min(680px, 100%);
  padding: 20px;
  border: 1px solid rgb(255 255 255 / 0.2);
  border-radius: 14px;
  color: #fff;
  background: #111;
  box-shadow: 0 18px 60px rgb(0 0 0 / 0.45);
}

.cookie-consent-card h2,
.cookie-consent-card p {
  margin: 0;
}

.cookie-consent-card p {
  margin-top: 8px;
  color: #d4d4d4;
  line-height: 1.6;
}

.cookie-consent-card a {
  color: #fff;
}

.cookie-consent-options {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.cookie-consent-options label {
  display: flex;
  gap: 8px;
  align-items: center;
}

.cookie-consent-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.cookie-consent-actions button,
.cookie-preferences-button {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid rgb(255 255 255 / 0.3);
  border-radius: 999px;
  color: #fff;
  background: #222;
  cursor: pointer;
}

.cookie-consent-actions button[data-cookie-action="accept"] {
  color: #000;
  background: #fff;
}

@media (max-width: 520px) {
  .cookie-consent-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}
