:root {
    --pd-accent: #e8553d;
    --pd-accent-dark: #c63f29;  /* hover state */
    --pd-accent-tint: rgba(232, 85, 61, 0.08);
    --pd-ink: #1f2430;
    --pd-muted: rgba(31, 36, 48, 0.62);
    --pd-line: rgba(31, 36, 48, 0.14);
    --pd-shadow: rgba(31, 36, 48, 0.1);
    --pd-error: #b8321d;
    --pd-ok: #2f7d4f;
    --pd-warn: #b7791f;
    --pd-bg: #faf8f5;
    --pd-card: #ffffff;
    /* overridden per album by App.js::themeStyle - these are photo-dump's own look */
    --pd-on-accent: #ffffff;
    --pd-secondary: #1f2430;
    --pd-on-secondary: #ffffff;
    --pd-field: #ffffff;
    --pd-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--pd-bg);
    color: var(--pd-ink);
    font-family: var(--pd-sans);
    font-size: 16px;
    line-height: 1.45;
}

.pd-loading { padding: 4rem 1rem; text-align: center; color: var(--pd-muted); }

.pd-page { max-width: 1100px; margin: 0 auto; padding: 1.25rem 1rem 4rem; }
.pd-narrow { max-width: 640px; margin: 0 auto; }

.pd-logo { margin: 0; font-weight: 800; font-size: 1.35rem; letter-spacing: -0.02em; color: var(--pd-ink); text-decoration: none; }
.pd-logo span { color: var(--pd-accent); }
.pd-title { margin: 0; color: var(--pd-secondary); font-weight: 800; font-size: 2rem; line-height: 1.15; letter-spacing: -0.02em; }
.pd-subtitle { margin: 0.4rem 0 1.25rem; color: var(--pd-muted); }
.pd-section-title { margin: 0 0 1rem; color: var(--pd-secondary); font-weight: 700; font-size: 1.3rem; }
.pd-hint { color: var(--pd-muted); font-size: 0.85rem; }
.pd-error { color: var(--pd-error); font-weight: 600; font-size: 0.9rem; margin: 0.4rem 0 0; }
.pd-notice { padding: 0.75rem 1rem; border-radius: 10px; background: var(--pd-accent-tint); margin-bottom: 1.25rem; }
.pd-notice--ok { background: rgba(47, 125, 79, 0.1); }
.pd-empty { color: var(--pd-muted); text-align: center; padding: 2rem 0; }

.pd-card {
    background: var(--pd-card);
    border: 1px solid var(--pd-line);
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px var(--pd-shadow);
    margin-bottom: 1.5rem;
}

/* form controls */
.pd-label { display: block; font-weight: 600; font-size: 0.9rem; margin: 0.9rem 0 0.35rem; }
.pd-label:first-child { margin-top: 0; }
.pd-input {
    width: 100%;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--pd-line);
    border-radius: 8px;
    background: var(--pd-field);
    font: inherit;
    color: inherit;
}
.pd-input:focus { outline: 2px solid var(--pd-accent); outline-offset: -1px; border-color: transparent; }
.pd-input--small { padding: 0.45rem 0.6rem; font-size: 0.9rem; }
.pd-textarea { resize: vertical; }

.pd-button {
    padding: 0.7rem 1.4rem;
    border: none;
    border-radius: 999px;
    background: var(--pd-accent);
    color: var(--pd-on-accent);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
.pd-button:hover:not(:disabled) { background: var(--pd-accent-dark); }
.pd-button:disabled { opacity: 0.5; cursor: default; }
.pd-button--ghost { background: transparent; color: var(--pd-accent); border: 1px solid var(--pd-accent); }
.pd-button--ghost:hover:not(:disabled) { background: var(--pd-accent-tint); }
.pd-button--danger { background: var(--pd-error); }
.pd-button--danger:hover:not(:disabled) { background: #8f2413; }
.pd-button--small { padding: 0.4rem 0.95rem; font-size: 0.88rem; }
.pd-button--block { width: 100%; margin-top: 1.2rem; }

.pd-link { background: none; border: none; padding: 0; color: var(--pd-muted); text-decoration: underline; cursor: pointer; font: inherit; }
.pd-actions { display: flex; justify-content: flex-end; align-items: center; gap: 0.6rem; margin-top: 1rem; flex-wrap: wrap; }

/* header */
.pd-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.75rem; }
.pd-header-actions { display: flex; align-items: center; gap: 1rem; font-size: 0.9rem; }

/* landing */
.pd-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 2.5rem; align-items: start; margin-top: 1rem; }
.pd-hero h1 { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.08; margin: 0 0 1rem; }
.pd-hero h1 span { color: var(--pd-accent); }
.pd-hero-lead { font-size: 1.1rem; color: var(--pd-muted); margin: 0 0 1.5rem; }
.pd-steps { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 0.75rem; }
.pd-steps li { display: flex; gap: 0.75rem; align-items: baseline; }
.pd-steps b { flex: 0 0 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--pd-accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 0.9rem; }
.pd-tabs { display: flex; gap: 0.25rem; margin-bottom: 1.1rem; border-bottom: 1px solid var(--pd-line); }
.pd-tab { background: none; border: none; padding: 0.5rem 0.9rem; font: inherit; font-weight: 600; color: var(--pd-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.pd-tab--active { color: var(--pd-accent); border-bottom-color: var(--pd-accent); }

/* sliders + price */
.pd-slider { margin-top: 1.1rem; }
.pd-slider-head { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; font-size: 0.95rem; }
.pd-slider-value { color: var(--pd-accent); font-variant-numeric: tabular-nums; }
.pd-slider input[type=range] { width: 100%; accent-color: var(--pd-accent); margin: 0.5rem 0 0; }
.pd-slider-scale { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--pd-muted); }
.pd-slider-note { margin: 0.45rem 0 0; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.pd-price { display: flex; justify-content: space-between; align-items: baseline; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px dashed var(--pd-line); }
.pd-price-amount { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pd-plan-toggle { display: flex; gap: 0.5rem; margin-top: 1.1rem; flex-wrap: wrap; }
.pd-plan-option {
    flex: 1 1 180px; text-align: left; padding: 0.8rem 1rem; border-radius: 10px;
    border: 1px solid var(--pd-line); background: var(--pd-field); font: inherit; color: inherit; cursor: pointer;
}
.pd-plan-option--active { border-color: var(--pd-accent); box-shadow: 0 0 0 1px var(--pd-accent); background: var(--pd-accent-tint); }
.pd-plan-option:disabled { opacity: 0.5; cursor: default; }
.pd-plan-option strong { display: block; }

/* storage usage */
.pd-usage { margin: 0.6rem 0 0.2rem; }
.pd-usage-bar { height: 8px; border-radius: 4px; background: var(--pd-line); overflow: hidden; }
.pd-usage-bar div { height: 100%; background: var(--pd-accent); transition: width 0.3s; }
.pd-usage-bar--full div { background: var(--pd-error); }
.pd-usage-text { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--pd-muted); margin-top: 0.3rem; font-variant-numeric: tabular-nums; }

/* album list */
.pd-album-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.pd-album-card { margin-bottom: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.pd-album-card h3 { margin: 0; font-size: 1.1rem; overflow-wrap: anywhere; }
.pd-album-meta { font-size: 0.85rem; color: var(--pd-muted); }
.pd-album-card .pd-actions { margin-top: auto; padding-top: 0.75rem; justify-content: flex-start; }
.pd-status { display: inline-block; padding: 0.1rem 0.55rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.pd-status--active { background: rgba(47, 125, 79, 0.12); color: var(--pd-ok); }
.pd-status--pending_payment { background: rgba(183, 121, 31, 0.14); color: var(--pd-warn); }
.pd-status--expired { background: var(--pd-line); color: var(--pd-muted); }
.pd-share { display: flex; gap: 0.5rem; align-items: center; margin-top: 0.4rem; }
.pd-share .pd-input { font-size: 0.85rem; padding: 0.45rem 0.6rem; }

/* upload */
.pd-dropzone {
    margin-top: 1.2rem;
    padding: 2rem 1rem;
    border: 2px dashed var(--pd-line);
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    background: var(--pd-field);
}
.pd-dropzone:hover, .pd-dropzone--active { border-color: var(--pd-accent); background: var(--pd-accent-tint); }
.pd-dropzone-main { margin: 0 0 0.25rem; font-weight: 700; color: var(--pd-accent); }
.pd-rejected { list-style: none; padding: 0; margin: 0.5rem 0 0; }

.pd-pending-list { list-style: none; padding: 0; margin: 1.2rem 0 0; display: flex; flex-direction: column; gap: 0.75rem; }
.pd-pending { position: relative; display: flex; gap: 0.9rem; padding: 0.75rem; border: 1px solid var(--pd-line); border-radius: 10px; background: var(--pd-card); }
.pd-pending--done { background: rgba(47, 125, 79, 0.06); }
.pd-pending--error { border-color: var(--pd-error); }
.pd-pending-preview { flex: 0 0 64px; height: 64px; border-radius: 8px; overflow: hidden; background: var(--pd-bg); display: flex; align-items: center; justify-content: center; }
.pd-pending-preview img { width: 100%; height: 100%; object-fit: cover; }
.pd-pending-icon { font-size: 1.5rem; color: var(--pd-muted); }
.pd-pending-body { flex: 1; min-width: 0; padding-right: 1.5rem; }
.pd-pending-header { display: flex; gap: 0.5rem; justify-content: space-between; margin-bottom: 0.4rem; font-size: 0.9rem; }
.pd-pending-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.pd-pending-size { flex-shrink: 0; color: var(--pd-muted); font-variant-numeric: tabular-nums; }
.pd-pending-done { margin: 0; font-size: 0.9rem; color: var(--pd-ok); }
.pd-remove { position: absolute; top: 0.35rem; right: 0.45rem; background: none; border: none; font-size: 1.4rem; line-height: 1; color: var(--pd-muted); cursor: pointer; }
.pd-progress { height: 6px; margin-top: 0.6rem; border-radius: 3px; background: var(--pd-line); overflow: hidden; }
.pd-progress div { height: 100%; background: var(--pd-accent); transition: width 0.2s; }

/* gallery */
.pd-gallery-header { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.pd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0.9rem; }
.pd-tile {
    display: flex; flex-direction: column; padding: 0;
    border: 1px solid var(--pd-line); border-radius: 10px; overflow: hidden;
    background: var(--pd-card); text-align: left; font: inherit; color: inherit; cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.pd-tile:hover { transform: translateY(-2px); box-shadow: 0 6px 16px var(--pd-shadow); }
.pd-tile-media { position: relative; aspect-ratio: 1 / 1; background: var(--pd-ink); }
.pd-tile-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-tile-play {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 44px; height: 44px; border-radius: 50%; background: rgba(0, 0, 0, 0.55); color: #fff;
    display: flex; align-items: center; justify-content: center; padding-left: 3px;
}
.pd-tile-status { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 0.85rem; }
.pd-tile-size {
    position: absolute; bottom: 0.45rem; right: 0.45rem; padding: 0.1rem 0.45rem; border-radius: 999px;
    background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 0.72rem; font-variant-numeric: tabular-nums;
}
.pd-tile-info { display: flex; flex-direction: column; padding: 0.5rem 0.7rem 0.65rem; font-size: 0.85rem; gap: 0.1rem; }
.pd-tile-who { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-tile-when { color: var(--pd-muted); font-size: 0.8rem; }

.pd-pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.35rem; margin-top: 2rem; }
.pd-pagination button { min-width: 2.4rem; padding: 0.45rem 0.7rem; border: 1px solid var(--pd-line); border-radius: 8px; background: var(--pd-card); font: inherit; color: inherit; cursor: pointer; }
.pd-pagination button.active { background: var(--pd-accent); border-color: var(--pd-accent); color: var(--pd-on-accent); }
.pd-pagination button:disabled { opacity: 0.4; cursor: default; }
.pd-pagination-gap { padding: 0.45rem 0.2rem; color: var(--pd-muted); }

/* footer */
.pd-footer { margin-top: 3rem; text-align: center; font-size: 0.8rem; color: var(--pd-muted); }
.pd-footer a { color: var(--pd-accent); text-decoration: none; }

/* media viewer */
.pd-modal {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(15, 17, 23, 0.94);
    display: flex; align-items: center; justify-content: center;
    padding: 3rem 3.5rem;
}
.pd-modal-content { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.pd-modal-content img, .pd-modal-content video { max-width: 100%; max-height: calc(100vh - 10rem); border-radius: 4px; }
.pd-modal-placeholder { max-width: 420px; padding: 3rem 2rem; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 8px; color: rgba(255, 255, 255, 0.85); text-align: center; }
.pd-modal-caption { margin-top: 0.9rem; text-align: center; color: #fff; max-width: 700px; }
.pd-modal-caption-text { margin: 0 0 0.3rem; font-size: 1.1rem; }
.pd-modal-meta { margin: 0; font-size: 0.85rem; color: rgba(255, 255, 255, 0.7); }
.pd-modal-meta a { color: #fff; }
.pd-modal-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 0.6rem; }
.pd-pill {
    padding: 0.3rem 0.8rem; border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 999px;
    background: none; color: rgba(255, 255, 255, 0.85); font: inherit; font-size: 0.8rem; cursor: pointer;
}
.pd-pill:hover:not(:disabled) { border-color: #fff; color: #fff; }
.pd-pill--danger { border-color: #ff8a75; color: #ff8a75; }
.pd-modal-close, .pd-modal-nav { position: absolute; background: none; border: none; color: #fff; cursor: pointer; opacity: 0.75; line-height: 1; }
.pd-modal-close:hover, .pd-modal-nav:hover { opacity: 1; }
.pd-modal-close { top: 0.6rem; right: 1rem; font-size: 2.4rem; }
.pd-modal-nav { top: 50%; transform: translateY(-50%); font-size: 3.2rem; padding: 1rem 0.6rem; }
.pd-modal-nav--prev { left: 0.2rem; }
.pd-modal-nav--next { right: 0.2rem; }

/* form dialogs */
.pd-modal--light { background: rgba(31, 36, 48, 0.55); padding: 1.5rem; overflow-y: auto; }
.pd-dialog-card { width: 100%; max-width: 400px; max-height: 100%; overflow-y: auto; margin: 0; }

/* guest page - wrapped in .pd-themed, which carries the album's colours. Its layout responds to
   the width of .pd-themed (a container query) rather than the viewport, so the owner's scaled-down
   phone preview lays out exactly like a real phone. */
.pd-themed { container-type: inline-size; min-height: 100vh; background: var(--pd-bg); color: var(--pd-ink); }
.pd-themed .pd-logo { color: var(--pd-ink); }
.pd-themed .pd-logo span { color: var(--pd-accent); }

.pd-gate { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.pd-gate-form { width: 100%; max-width: 420px; }
.pd-gate-card { width: 100%; text-align: center; border-top: 4px solid var(--pd-accent); }
.pd-gate-card .pd-label { text-align: left; }
/* with a photo: side by side on wide screens, as a banner above the form on phones */
.pd-gate--photo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 0; align-items: stretch; }
.pd-gate-photo { position: relative; background: var(--pd-secondary); min-height: 260px; }
.pd-gate-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pd-gate--photo .pd-gate-form { max-width: none; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem 1rem; }
.pd-gate--photo .pd-gate-card { max-width: 420px; }

.pd-banner { margin-bottom: 1.25rem; border-radius: 14px; overflow: hidden; height: 300px; background: var(--pd-secondary); }
.pd-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }

@container (max-width: 800px) {
    .pd-gate--photo { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .pd-gate-photo { height: 300px; }
    .pd-gate--photo .pd-gate-form { justify-content: flex-start; padding: 1.5rem 1rem 2.5rem; }
    .pd-banner { height: 200px; }
}
@container (max-width: 600px) {
    .pd-title { font-size: 1.6rem; }
    .pd-card { padding: 1.1rem; }
    .pd-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
}

/* the owner's live preview of that page */
.pd-customiser { display: grid; grid-template-columns: minmax(250px, 320px) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.pd-customiser-controls .pd-label { margin-top: 1rem; }
.pd-customiser-controls .pd-label:first-child { margin-top: 0; }
.pd-cover-picker { display: flex; gap: 0.9rem; align-items: center; }
.pd-cover-picker img, .pd-cover-empty { width: 96px; height: 72px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.pd-cover-empty { display: flex; align-items: center; justify-content: center; border: 2px dashed var(--pd-line); color: var(--pd-muted); font-size: 0.8rem; }
.pd-cover-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 0.4rem; }
.pd-presets { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pd-preset {
    display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.65rem 0.3rem 0.35rem;
    border: 1px solid var(--pd-line); border-radius: 999px; background: var(--pd-field); font: inherit; font-size: 0.8rem; color: inherit; cursor: pointer;
}
.pd-preset:hover:not(:disabled) { border-color: var(--pd-accent); }
.pd-preset-swatches { display: inline-flex; border-radius: 999px; overflow: hidden; border: 1px solid var(--pd-line); }
.pd-preset-swatches span { width: 10px; height: 18px; }
.pd-colour-field { display: flex; gap: 0.7rem; align-items: flex-start; margin-top: 0.9rem; }
.pd-colour-field .pd-label { margin: 0 0 0.25rem; }
.pd-colour-field input[type=color] {
    flex-shrink: 0; width: 44px; height: 44px; padding: 0; border: 1px solid var(--pd-line); border-radius: 10px;
    background: none; cursor: pointer;
}
.pd-colour-field input[type=color]::-webkit-color-swatch-wrapper { padding: 3px; }
.pd-colour-field input[type=color]::-webkit-color-swatch { border: none; border-radius: 7px; }
.pd-colour-hex { width: 7.5rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: lowercase; }
.pd-colour-field .pd-hint { display: block; margin-top: 0.2rem; }
.pd-warning { margin: 0.75rem 0 0; padding: 0.5rem 0.7rem; border-radius: 8px; background: rgba(183, 121, 31, 0.12); color: #7a4f10; font-size: 0.85rem; }

.pd-preview-toggles { display: flex; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.pd-segmented { display: inline-flex; border: 1px solid var(--pd-line); border-radius: 999px; overflow: hidden; }
.pd-segmented button { padding: 0.35rem 0.85rem; border: none; background: none; font: inherit; font-size: 0.85rem; color: var(--pd-muted); cursor: pointer; }
.pd-segmented button.active { background: var(--pd-accent); color: var(--pd-on-accent); }
.pd-preview-frame { position: relative; overflow: hidden; border: 1px solid var(--pd-line); border-radius: 12px; background: var(--pd-line); }
.pd-preview-canvas { position: absolute; top: 0; transform-origin: top left; overflow-y: auto; overflow-x: hidden; }
.pd-preview-canvas--phone { border-left: 1px solid var(--pd-line); border-right: 1px solid var(--pd-line); }
/* inside the preview, "full screen" means the preview canvas, not the owner's actual window */
.pd-preview-canvas .pd-themed { min-height: 100%; }
.pd-preview-canvas .pd-gate { min-height: 760px; }
.pd-preview-canvas * { pointer-events: none; }
.pd-preview-canvas { pointer-events: auto; }
.pd-tile-media--sample {
    background: linear-gradient(135deg, var(--pd-accent), var(--pd-secondary));
    filter: hue-rotate(var(--pd-sample-shift, 0deg)) saturate(0.8);
}

@media (max-width: 900px) {
    .pd-customiser { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
    .pd-hero { grid-template-columns: 1fr; gap: 1.5rem; }
    .pd-hero h1 { font-size: 2.1rem; }
}

@media (max-width: 600px) {
    .pd-title { font-size: 1.6rem; }
    .pd-card { padding: 1.1rem; }
    .pd-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
    .pd-album-list { grid-template-columns: 1fr; }
    .pd-modal { padding: 3rem 0.5rem; }
    .pd-modal-nav { top: auto; bottom: 0.5rem; transform: none; }
}

/* public/private + tags - toggleable pills for ticking on uploads and filtering the gallery */
.pd-checkbox { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.5rem; font-size: 0.9rem; cursor: pointer; flex-wrap: wrap; }
.pd-checkbox input { width: 1.1rem; height: 1.1rem; accent-color: var(--pd-accent); }
.pd-pending-tags { display: flex; flex-direction: column; gap: 0.35rem; margin-top: 0.6rem; }
.pd-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pd-chip {
    padding: 0.3rem 0.75rem; border: 1px solid var(--pd-line); border-radius: 999px;
    background: var(--pd-field); color: var(--pd-ink); font: inherit; font-size: 0.85rem; cursor: pointer;
}
.pd-chip:hover:not(:disabled) { border-color: var(--pd-accent); }
.pd-chip:disabled { opacity: 0.5; cursor: default; }
.pd-chip--selected { background: var(--pd-secondary); border-color: var(--pd-secondary); color: var(--pd-on-secondary); }
.pd-chips--static .pd-chip { cursor: default; background: var(--pd-accent-tint); border-color: transparent; }
.pd-modal-caption .pd-chips { justify-content: center; margin-bottom: 0.4rem; }
.pd-modal-caption .pd-chip { background: rgba(255, 255, 255, 0.12); color: #fff; }
.pd-pill--public { border-color: var(--pd-accent); color: var(--pd-accent); }
.pd-badge {
    position: absolute; top: 0.5rem; left: 0.5rem; padding: 0.15rem 0.5rem; border-radius: 999px;
    background: var(--pd-secondary); color: var(--pd-on-secondary); font-size: 0.75rem;
}
.pd-tile-caption { margin-top: 0.2rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* gallery search */
.pd-gallery { scroll-margin-top: 1rem; margin-top: 1rem; }
.pd-search { display: flex; flex-direction: column; gap: 0.6rem; margin: 0 0 1.3rem; }
.pd-search > .pd-input { max-width: 320px; }
.pd-search .pd-link { align-self: flex-start; }

/* tag manager */
.pd-tag-list { list-style: none; margin: 0.75rem 0 1rem; padding: 0; }
.pd-tag-row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; padding: 0.6rem 0; border-bottom: 1px solid var(--pd-line); }
.pd-tag-name { font-weight: 600; }
.pd-tag-actions { margin-left: auto; display: flex; gap: 0.75rem; }
.pd-tag-form { display: flex; gap: 0.5rem; align-items: center; flex: 1; }
.pd-tag-form .pd-input { flex: 1; min-width: 0; }
.pd-tag-error { flex-basis: 100%; }

/* upgrades */
.pd-upgrade-history { list-style: none; margin: 1rem 0 0; padding: 0.75rem 0 0; border-top: 1px dashed var(--pd-line); display: grid; gap: 0.25rem; }

/* album password on the dashboard cards */
.pd-album-password { margin-top: 0.4rem; }
.pd-album-password .pd-label { margin: 0 0 0.2rem; font-size: 0.8rem; }
.pd-share--compact { margin-top: 0; }
.pd-share--compact .pd-input { padding: 0.35rem 0.55rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* download everything */
.pd-download { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-top: 0.9rem; }

/* discount codes */
.pd-discount-toggle { margin-top: 0.75rem; font-size: 0.9rem; }
.pd-discount { margin-top: 0.75rem; max-width: 360px; }
.pd-discount .pd-input { text-transform: uppercase; }
.pd-discount-applied { margin: 0.75rem 0 0; color: var(--pd-ok); font-size: 0.9rem; }
.pd-price-was { color: var(--pd-muted); font-size: 0.6em; font-weight: 600; margin-right: 0.2em; }
