.album-launcher {
  position: static;
  z-index: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  background: #0f766e;
  color: #fff;
  box-shadow: 0 10px 22px rgba(24, 128, 56, 0.22);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.album-launcher:hover {
  background: #126d32;
}

.album-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 18px;
  background: rgba(12, 18, 28, 0.62);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.album-overlay.is-open {
  display: flex;
}

.album-panel {
  width: min(980px, 100%);
  max-height: min(760px, calc(100dvh - 36px));
  overflow: auto;
  border: 1px solid rgba(23, 32, 42, 0.14);
  border-radius: 8px;
  background: #fffdf8;
  color: #17202a;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.album-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(23, 32, 42, 0.1);
  background: #ffffff;
}

.album-header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.album-header p {
  margin: 3px 0 0;
  color: #637083;
  font-size: 0.92rem;
}

.album-close {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(23, 32, 42, 0.12);
  border-radius: 8px;
  background: #fff;
  color: #17202a;
  font-size: 1.3rem;
  cursor: pointer;
}

.album-body {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: min(540px, calc(100dvh - 140px));
}

.album-sidebar {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 16px;
  border-right: 1px solid rgba(23, 32, 42, 0.1);
  background: #f7fafc;
}

.album-content {
  overflow: auto;
  padding: 16px;
}

.album-card {
  border: 1px solid rgba(23, 32, 42, 0.1);
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
}

.album-card[hidden] {
  display: none;
}

.album-card h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.album-card p {
  margin: 0 0 12px;
  color: #637083;
  font-size: 0.88rem;
  line-height: 1.45;
}

.album-account-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  background: #ecfdf5;
  color: #047857;
  font-size: 0.78rem;
  font-weight: 900;
}

.album-form {
  display: grid;
  gap: 10px;
}

.album-create-account-help {
  border: 1px solid rgba(23, 32, 42, 0.1);
  border-radius: 8px;
  background: #f8fafc;
  padding: 0;
  overflow: hidden;
}

.album-create-account-help summary {
  min-height: 38px;
  padding: 9px 10px;
  color: #0f766e;
  font-size: 0.84rem;
  font-weight: 950;
  cursor: pointer;
}

.album-create-account-help p {
  margin: 0;
  padding: 0 10px 8px;
  font-size: 0.78rem;
}

.album-create-account-help label {
  padding: 0 10px 10px;
}

.album-form label {
  display: grid;
  gap: 5px;
  color: #334155;
  font-size: 0.84rem;
  font-weight: 850;
}

.album-form input,
.album-form select {
  min-height: 38px;
  border: 1px solid rgba(23, 32, 42, 0.16);
  border-radius: 8px;
  padding: 0 10px;
  background: #ffffff;
  color: #17202a;
  font: inherit;
}

.album-toggle-row {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 9px !important;
  min-height: 38px;
}

.album-toggle-row input {
  width: 18px;
  min-height: 18px;
  accent-color: #0f766e;
}

.album-switch-row {
  grid-template-columns: auto auto 1fr !important;
}

.album-switch-row > input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.album-switch {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #cbd5e1;
  box-shadow: inset 0 0 0 1px rgba(23, 32, 42, 0.14);
  transition: background 0.16s ease;
}

.album-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.24);
  transition: transform 0.16s ease;
}

.album-switch-row input:checked + .album-switch {
  background: #0f766e;
}

.album-switch-row input:checked + .album-switch::after {
  transform: translateX(18px);
}

.album-plan-picker {
  display: grid;
  gap: 8px;
  margin: 0;
  border: 0;
  padding: 0;
}

.album-plan-picker legend {
  margin-bottom: 2px;
  color: #334155;
  font-size: 0.84rem;
  font-weight: 900;
}

.album-plan-picker label {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border: 1px solid rgba(23, 32, 42, 0.12);
  border-radius: 8px;
  padding: 8px 10px;
  background: #f8fafc;
  cursor: pointer;
}

.album-plan-picker label:has(input:checked) {
  border-color: rgba(15, 118, 110, 0.5);
  background: #ecfdf5;
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.18);
}

.album-plan-picker input {
  width: 18px;
  min-height: 18px;
  accent-color: #0f766e;
}

.album-plan-picker span {
  display: grid;
  gap: 1px;
}

.album-plan-picker strong {
  color: #17202a;
  font-size: 0.9rem;
}

.album-plan-picker em {
  color: #64748b;
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 800;
}

.album-membership-box {
  border: 1px solid rgba(23, 32, 42, 0.12);
  border-radius: 12px;
  background: #f8fafc;
  overflow: hidden;
}

.album-membership-box summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.album-membership-box summary::-webkit-details-marker {
  display: none;
}

.album-membership-box summary span {
  display: grid;
  gap: 2px;
}

.album-membership-box summary strong {
  color: #17202a;
  font-size: 0.92rem;
}

.album-membership-box summary em {
  color: #64748b;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 800;
}

.album-membership-box summary b {
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  padding: 6px 10px;
  font-size: 0.76rem;
}

.album-membership-box > p,
.album-membership-box > small {
  display: block;
  margin: 0;
  padding: 0 14px 12px;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 750;
  line-height: 1.4;
}

.album-membership-box .album-plan-picker {
  padding: 0 14px 12px;
}

.album-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.album-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid rgba(23, 32, 42, 0.12);
  border-radius: 8px;
  padding: 0 12px;
  background: #17202a;
  color: #ffffff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 900;
  cursor: pointer;
}

.album-button.secondary {
  background: #ffffff;
  color: #17202a;
}

.album-button.warn {
  background: #b91c1c;
}

.album-scan-card {
  width: 100%;
  margin: 4px 0 12px;
  background: #0f8f7d;
  color: #ffffff;
}

.album-upload-preview {
  width: 86px;
  height: 118px;
  overflow: hidden;
  border: 1px solid rgba(23, 32, 42, 0.12);
  border-radius: 8px;
  background: #e5e7eb;
}

.album-upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.album-sell-card {
  min-width: 56px;
}

.album-button.good {
  background: #0f766e;
}

.album-quantity-actions {
  align-items: center;
  justify-content: flex-end;
}

.album-stepper {
  width: 38px;
  min-width: 38px;
  padding: 0;
  font-size: 1.15rem;
  line-height: 1;
}

.album-quantity-count {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  min-height: 38px;
  border: 1px solid rgba(23, 32, 42, 0.12);
  border-radius: 8px;
  background: #f8fafc;
  color: #17202a;
  font-size: 0.95rem;
  font-weight: 900;
}

.album-remove-all {
  width: 38px;
  min-width: 38px;
  padding: 0;
}

.album-remove-all svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.album-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.album-stat {
  min-height: 88px;
  border: 1px solid rgba(23, 32, 42, 0.1);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.album-stat span {
  display: block;
  color: #637083;
  font-size: 0.82rem;
  font-weight: 850;
}

.album-stat strong {
  display: block;
  margin-top: 6px;
  font-size: 1.55rem;
}

.album-value-chart {
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 8px;
  padding: 12px;
  margin: 0 0 14px;
  background:
    linear-gradient(180deg, rgba(236, 253, 245, 0.86), rgba(255, 255, 255, 0.98)),
    #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.album-chart-head,
.album-chart-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.album-chart-head span {
  color: #0f766e;
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.album-chart-head strong {
  display: block;
  margin-top: 3px;
  color: #102015;
  font-size: 1.55rem;
  line-height: 1;
}

.album-chart-head em,
.album-chart-foot span {
  color: #64748b;
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 850;
}

.album-chart-head b {
  border-radius: 999px;
  padding: 6px 9px;
  background: #ecfdf5;
  color: #047857;
  font-size: 0.8rem;
}

.album-chart-head b.negative {
  background: #eff6ff;
  color: #1d4ed8;
}

.album-value-chart svg {
  display: block;
  width: 100%;
  height: auto;
  margin: 8px 0 4px;
}

.album-chart-grid {
  fill: none;
  stroke: rgba(100, 116, 139, 0.2);
  stroke-width: 1;
}

.album-chart-fill {
  fill: url(#albumValueFill);
}

.album-chart-line {
  fill: none;
  stroke: #059669;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.album-chart-dot {
  fill: #ffffff;
  stroke: #059669;
  stroke-width: 4;
}

.album-insights {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}

.album-insights article {
  display: grid;
  gap: 4px;
  min-height: 82px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 8px;
  padding: 10px;
  background: linear-gradient(180deg, #ffffff, #f0fdfa);
}

.album-insights span {
  color: #0f766e;
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.album-insights strong {
  color: #17202a;
  font-size: 0.94rem;
  line-height: 1.2;
}

.album-insights em {
  color: #64748b;
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 850;
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}

.album-item {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 9px;
  align-items: stretch;
  border: 1px solid rgba(23, 32, 42, 0.1);
  border-radius: 8px;
  padding: 9px;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}

.album-item-image {
  width: 100%;
  aspect-ratio: 5 / 7;
  overflow: hidden;
  border-radius: 6px;
  background: #e5e7eb;
}

.album-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.album-item-body {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.album-item-body strong {
  color: #17202a;
  font-size: 0.92rem;
  font-weight: 950;
  line-height: 1.2;
}

.album-item-body span {
  color: #637083;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.3;
}

.album-item-body b {
  color: #0f766e;
  font-size: 1.45rem;
  font-weight: 950;
  line-height: 1.05;
}

.album-item-body em {
  color: #64748b;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 850;
}

.album-item .album-actions {
  justify-content: space-between;
  gap: 5px;
}

.album-item .album-button {
  min-height: 32px;
  border-radius: 7px;
  padding: 0 8px;
  font-size: 0.76rem;
}

.album-item .album-stepper,
.album-item .album-remove-all {
  width: 32px;
  min-width: 32px;
}

.album-item .album-quantity-count {
  min-width: 30px;
  min-height: 32px;
  font-size: 0.82rem;
}

.album-empty {
  display: grid;
  place-items: center;
  min-height: 220px;
  border: 1px dashed rgba(23, 32, 42, 0.22);
  border-radius: 8px;
  color: #637083;
  text-align: center;
}

.album-status {
  min-height: 20px;
  color: #637083;
  font-size: 0.86rem;
  font-weight: 800;
}

@media (max-width: 780px) {
  .album-overlay {
    padding: 0;
  }

  .album-panel {
    width: 100%;
    min-height: 100dvh;
    max-height: none;
    border-radius: 0;
  }

  .album-header {
    position: sticky;
    top: 0;
    z-index: 2;
  }

  .album-body {
    display: flex;
    flex-direction: column;
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .album-content {
    order: 1;
  }

  .album-sidebar {
    order: 2;
  }

  .album-sidebar {
    border-right: 0;
    border-top: 1px solid rgba(23, 32, 42, 0.1);
    border-bottom: 0;
  }

  .album-stats {
    grid-template-columns: 1fr;
  }

  .album-chart-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .album-chart-head strong {
    font-size: 1.35rem;
  }

  .album-insights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .album-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .album-item {
    grid-template-columns: none;
  }

  .album-content,
  .album-sidebar {
    overflow: visible;
  }
}

@media (max-width: 380px) {
  .album-grid {
    grid-template-columns: 1fr;
  }
}
