/* =========================================================
   PhotoDrive Customer Album v2
   Premium wedding gallery · Dark/Light · Vietnamese-safe typography
   ========================================================= */

:root {
    --pd-font-sans: "Be Vietnam Pro", "Segoe UI", Arial, sans-serif;
    --pd-font-serif: "Lora", Georgia, "Times New Roman", serif;

    --pd-bg: #0b0b0b;
    --pd-bg-soft: #111110;
    --pd-surface: #151514;
    --pd-surface-2: #1a1918;
    --pd-surface-glass: rgba(17,17,16,.88);

    --pd-text: #f5f2ec;
    --pd-text-soft: #d8d2c8;
    --pd-muted: #99938b;
    --pd-muted-2: #6e6962;

    --pd-line: rgba(255,255,255,.11);
    --pd-line-soft: rgba(255,255,255,.065);

    --pd-accent: #e47b8e;
    --pd-accent-soft: rgba(228,123,142,.12);
    --pd-cream: #e8dbc9;
    --pd-success: #76c89d;

    --pd-shadow: 0 24px 70px rgba(0,0,0,.30);
}

html[data-theme="light"] {
    --pd-bg: #f4f0ea;
    --pd-bg-soft: #ebe5dd;
    --pd-surface: #fffdf9;
    --pd-surface-2: #f7f2eb;
    --pd-surface-glass: rgba(255,253,249,.92);

    --pd-text: #1c1a18;
    --pd-text-soft: #3f3a35;
    --pd-muted: #756f68;
    --pd-muted-2: #9a938b;

    --pd-line: rgba(31,28,25,.13);
    --pd-line-soft: rgba(31,28,25,.075);

    --pd-accent: #c9576d;
    --pd-accent-soft: rgba(201,87,109,.09);
    --pd-cream: #6c5644;
    --pd-success: #31825b;

    --pd-shadow: 0 22px 60px rgba(58,48,39,.13);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background: var(--pd-bg);
}

body {
    margin: 0;
    overflow-x: hidden;
    background: var(--pd-bg);
    color: var(--pd-text);
    font-family: var(--pd-font-sans);
    -webkit-font-smoothing: antialiased;
    transition: background .25s ease, color .25s ease;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
    text-decoration: none;
}

svg {
    width: 1em;
    height: 1em;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.pd-modal-open,
body.pd-lightbox-open {
    overflow: hidden;
}

/* ---------------- Studio preview ---------------- */

.pd-preview-bar {
    min-height: 58px;
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 8px 20px;
    border-bottom: 1px solid rgba(255,255,255,.10);
    background: rgba(9,9,9,.96);
    backdrop-filter: blur(18px);
    color: #f4f1ec;
}

.pd-preview-bar__left,
.pd-preview-bar__controls {
    display: flex;
    align-items: center;
    gap: 9px;
}

.pd-preview-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 9px;
    border: 1px solid rgba(118,200,157,.18);
    border-radius: 999px;
    background: rgba(118,200,157,.055);
    color: #abd0b9;
    font-size: 9px;
    font-weight: 700;
}

.pd-preview-live i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #76c89d;
}

.pd-preview-bar__left strong {
    font-size: 12px;
}

.pd-preview-bar__controls label {
    min-width: 150px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 8px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 8px;
    background: #151515;
}

.pd-preview-bar__controls label > span {
    color: #777;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.pd-preview-bar__controls select {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: #151515;
    color: #ddd;
    font-size: 9px;
}

.pd-preview-bar__controls button,
.pd-preview-bar__controls > a {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 8px;
    background: #191919;
    color: #e5e2dd;
    font-size: 9px;
    font-weight: 700;
}

/* ---------------- Topbar ---------------- */

.pd-public-topbar {
    height: 76px;
    position: absolute;
    inset: 0 0 auto 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(18px, 4vw, 64px);
    color: #fff;
}

.pd-public-topbar.has-preview {
    top: 58px;
}

.pd-public-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pd-public-brand > span {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.34);
    border-radius: 50%;
    background: rgba(0,0,0,.22);
    backdrop-filter: blur(10px);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

.pd-public-brand > div {
    display: flex;
    flex-direction: column;
}

.pd-public-brand strong {
    font-size: 13px;
    font-weight: 700;
}

.pd-public-brand small {
    margin-top: 2px;
    color: rgba(255,255,255,.62);
    font-size: 6.8px;
    font-weight: 700;
    letter-spacing: 1.7px;
}

.pd-public-topbar__actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.pd-theme-toggle,
.pd-top-action {
    min-height: 38px;
    border: 1px solid rgba(255,255,255,.20);
    background: rgba(10,10,10,.25);
    backdrop-filter: blur(12px);
    color: rgba(255,255,255,.94);
}

.pd-theme-toggle {
    width: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
}

.pd-theme-toggle > span {
    display: grid;
    place-items: center;
}

html[data-theme="dark"] .pd-theme-toggle .is-sun,
html[data-theme="light"] .pd-theme-toggle .is-moon {
    display: none;
}

.pd-top-action {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 700;
}

.pd-top-action--drive {
    text-decoration: none;
    white-space: nowrap;
}

.pd-drive-label-mobile {
    display: none;
}

/* ---------------- Hero cover ---------------- */

.pd-cover {
    height: min(900px, 94vh);
    min-height: 650px;
    position: relative;
    overflow: hidden;
    background: #181513;
}

body[data-preview="1"] .pd-cover {
    margin-top: 58px;
}

.pd-cover > img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transform: scale(1.012);
    transition: object-position .2s ease, opacity .2s ease;
}

.pd-cover__shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0,0,0,.48) 0%, rgba(0,0,0,.11) 26%, rgba(0,0,0,.09) 48%, rgba(8,8,8,.88) 100%),
        linear-gradient(90deg, rgba(0,0,0,.18), transparent 40%, rgba(0,0,0,.09));
}

.pd-cover__grain {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .10;
    background-image:
        radial-gradient(circle at 15% 30%, rgba(255,255,255,.24) 0 1px, transparent 1.3px),
        radial-gradient(circle at 70% 70%, rgba(255,255,255,.20) 0 1px, transparent 1.4px);
    background-size: 25px 25px, 31px 31px;
    mix-blend-mode: soft-light;
}

.pd-cover__content {
    width: min(1200px, calc(100% - 36px));
    position: absolute;
    left: 50%;
    bottom: clamp(88px, 11vh, 125px);
    z-index: 4;
    transform: translateX(-50%);
    text-align: center;
}

.pd-cover__eyebrow {
    margin-bottom: 16px;
    color: rgba(255,255,255,.72);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 3.4px;
    text-transform: uppercase;
}

.pd-cover h1 {
    margin: 0;
    color: #fffdf8;
    font-family: var(--pd-font-serif);
    font-size: clamp(52px, 8.4vw, 118px);
    font-weight: 400;
    line-height: .96;
    letter-spacing: -4.2px;
    text-shadow: 0 8px 34px rgba(0,0,0,.24);
}

.pd-cover__meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    margin-top: 22px;
    color: rgba(255,255,255,.74);
    font-family: var(--pd-font-serif);
    font-size: 12px;
    font-style: italic;
}

.pd-cover__meta i {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(255,255,255,.58);
}

.pd-cover__down {
    width: 42px;
    height: 42px;
    position: absolute;
    left: 50%;
    bottom: 24px;
    z-index: 4;
    display: grid;
    place-items: center;
    transform: translateX(-50%);
    border: 1px solid rgba(255,255,255,.20);
    border-radius: 50%;
    background: rgba(0,0,0,.18);
    backdrop-filter: blur(8px);
}

.pd-cover__down span {
    width: 9px;
    height: 9px;
    border-right: 1.5px solid #fff;
    border-bottom: 1.5px solid #fff;
    transform: translateY(-2px) rotate(45deg);
}

.pd-cover.has-no-cover {
    height: 470px;
    min-height: 470px;
    background:
        radial-gradient(circle at 20% 20%, rgba(228,123,142,.12), transparent 28%),
        radial-gradient(circle at 78% 30%, rgba(177,142,102,.10), transparent 30%),
        #171514;
}

.pd-cover__empty-art {
    position: absolute;
    inset: 0;
}

.pd-cover__empty-art span {
    position: absolute;
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 42%;
}

.pd-cover__empty-art span:nth-child(1) {
    width: 320px; height: 320px; left: 8%; top: 16%; transform: rotate(16deg);
}
.pd-cover__empty-art span:nth-child(2) {
    width: 420px; height: 420px; right: 10%; top: -8%; transform: rotate(-12deg);
}
.pd-cover__empty-art span:nth-child(3) {
    width: 240px; height: 240px; left: 48%; bottom: -20%; transform: rotate(30deg);
}

/* ---------------- Main typography ---------------- */

.pd-album-main {
    width: min(1580px, 100%);
    margin: 0 auto;
    padding: 0 clamp(10px, 2.2vw, 34px) 130px;
}

.pd-section-kicker {
    color: var(--pd-cream);
    font-size: 7.5px;
    font-weight: 700;
    letter-spacing: 2.8px;
    text-transform: uppercase;
}

.pd-album-intro {
    display: grid;
    grid-template-columns: minmax(0,1.2fr) minmax(280px,.8fr);
    align-items: end;
    gap: 44px;
    padding: clamp(64px, 8vw, 106px) clamp(5px, 3vw, 42px) 48px;
}

.pd-album-intro h2,
.pd-album-ending h2,
.pd-album-empty h2 {
    max-width: 760px;
    margin: 11px 0 13px;
    color: var(--pd-text);
    font-family: var(--pd-font-serif);
    font-size: clamp(34px, 4.3vw, 61px);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -2px;
}

.pd-album-intro p,
.pd-album-empty p {
    max-width: 690px;
    margin: 0;
    color: var(--pd-muted);
    font-size: 11px;
    line-height: 1.8;
}

.pd-album-intro__note {
    max-width: 410px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    justify-self: end;
    padding: 16px 17px;
    border-top: 1px solid var(--pd-line);
    border-bottom: 1px solid var(--pd-line-soft);
}

.pd-album-intro__note > span {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid color-mix(in srgb, var(--pd-accent) 32%, transparent);
    border-radius: 50%;
    color: var(--pd-accent);
}

.pd-album-intro__note p {
    margin: 2px 0 0;
    color: var(--pd-muted);
    font-size: 9px;
    line-height: 1.6;
}

/* ---------------- Toolbar ---------------- */

.pd-gallery-toolbar {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 14px;
    padding: 0 4px 12px;
    border-bottom: 1px solid var(--pd-line-soft);
}

.pd-gallery-toolbar__count {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.pd-gallery-toolbar__count b {
    color: var(--pd-text);
    font-family: var(--pd-font-serif);
    font-size: 18px;
    font-weight: 400;
}

.pd-gallery-toolbar__count em {
    color: var(--pd-muted-2);
    font-size: 8px;
    font-style: normal;
}

.pd-gallery-toolbar__right {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--pd-muted-2);
    font-size: 8px;
}

.pd-gallery-toolbar__right i {
    width: 3px; height: 3px; border-radius: 50%; background: var(--pd-muted-2);
}

.pd-gallery-toolbar__right strong {
    color: var(--pd-text-soft);
    font-size: 8px;
    font-weight: 700;
}

/* ---------------- Gallery layouts ---------------- */

.pd-gallery {
    transition: opacity .16s ease;
}

.pd-gallery.is-sorting {
    opacity: .45;
}

.pd-photo[hidden] {
    display: none !important;
}

/* editorial default */
.pd-gallery.pd-layout-editorial {
    display: grid;
    grid-template-columns: repeat(12, minmax(0,1fr));
    gap: 12px;
}

.pd-layout-editorial .pd-photo {
    grid-column: span 4;
    aspect-ratio: 4/5;
}

.pd-layout-editorial .pd-photo:nth-child(6n + 1) {
    grid-column: span 7;
    aspect-ratio: 3/2;
}

.pd-layout-editorial .pd-photo:nth-child(6n + 2) {
    grid-column: span 5;
    aspect-ratio: 4/5;
}

.pd-layout-editorial .pd-photo:nth-child(6n + 5) {
    grid-column: span 5;
}

.pd-layout-editorial .pd-photo:nth-child(6n + 6) {
    grid-column: span 7;
    aspect-ratio: 3/2;
}

.pd-layout-editorial .pd-photo__open,
.pd-layout-editorial .pd-photo__open img {
    height: 100%;
}

.pd-layout-editorial .pd-photo__open img {
    object-fit: cover;
}

/* masonry */
.pd-gallery.pd-layout-masonry {
    columns: 3 360px;
    column-gap: 12px;
}

.pd-layout-masonry .pd-photo {
    width: 100%;
    break-inside: avoid;
    margin: 0 0 12px;
}

.pd-layout-masonry .pd-photo__open img {
    aspect-ratio: var(--ratio);
    object-fit: cover;
}

/* equal grid */
.pd-gallery.pd-layout-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 10px;
}

.pd-layout-grid .pd-photo {
    aspect-ratio: 1/1;
}

.pd-layout-grid .pd-photo__open,
.pd-layout-grid .pd-photo__open img {
    height: 100%;
}

.pd-layout-grid .pd-photo__open img {
    object-fit: cover;
}

/* large */
.pd-gallery.pd-layout-large {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 14px;
}

.pd-layout-large .pd-photo {
    min-height: 470px;
}

.pd-layout-large .pd-photo__open,
.pd-layout-large .pd-photo__open img {
    height: 100%;
}

.pd-layout-large .pd-photo__open img {
    object-fit: cover;
}

/* ---------------- Photo card ---------------- */

.pd-photo {
    position: relative;
    overflow: hidden;
    border-radius: 3px;
    background: var(--pd-surface);
}

.pd-photo__open {
    width: 100%;
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
}

.pd-photo__open img {
    width: 100%;
    display: block;
    transition: transform .7s cubic-bezier(.2,.7,.1,1), filter .25s ease;
}

.pd-photo:hover .pd-photo__open img {
    transform: scale(1.018);
}

.pd-photo__top-actions {
    position: absolute;
    right: 10px;
    top: 10px;
    z-index: 5;
    display: flex;
    gap: 6px;
}

.pd-photo__top-actions button {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 50%;
    background: rgba(12,12,12,.48);
    backdrop-filter: blur(11px);
    color: #fff;
    box-shadow: 0 7px 22px rgba(0,0,0,.16);
}

.pd-photo__top-actions button:hover {
    transform: translateY(-1px);
    border-color: rgba(255,255,255,.50);
    background: rgba(12,12,12,.67);
}

.pd-photo-heart.is-active {
    border-color: rgba(228,123,142,.74);
    background: rgba(198,66,90,.88);
    color: #fff;
}

.pd-photo-heart.is-active svg {
    fill: currentColor;
}

.pd-photo__caption {
    position: absolute;
    inset: auto 0 0;
    z-index: 4;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    padding: 46px 11px 10px;
    background: linear-gradient(180deg, transparent, rgba(0,0,0,.58));
    color: #fff;
    pointer-events: none;
}

.pd-photo__caption span {
    font-size: 7.5px;
    font-weight: 600;
    letter-spacing: .2px;
}

.pd-photo__caption small {
    color: rgba(255,255,255,.60);
    font-family: var(--pd-font-serif);
    font-size: 9px;
}

.pd-photo__selected {
    width: 26px;
    height: 26px;
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 6;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 50%;
    background: var(--pd-accent);
    color: #fff;
    opacity: 0;
    transform: scale(.8);
    transition: .18s ease;
}

.pd-photo.is-selected .pd-photo__selected {
    opacity: 1;
    transform: scale(1);
}

/* ---------------- Pagination ---------------- */

.pd-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 38px auto 0;
}

.pd-pagination__numbers {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px;
    border: 1px solid var(--pd-line-soft);
    border-radius: 999px;
    background: var(--pd-surface);
}

.pd-pagination__numbers button {
    min-width: 35px;
    height: 35px;
    display: grid;
    place-items: center;
    padding: 0 9px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--pd-muted);
    font-size: 9px;
    font-weight: 700;
}

.pd-pagination__numbers button:hover {
    color: var(--pd-text);
    background: var(--pd-surface-2);
}

.pd-pagination__numbers button.is-active {
    background: var(--pd-text);
    color: var(--pd-bg);
}

.pd-pagination__arrow {
    min-height: 39px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    border: 1px solid var(--pd-line);
    border-radius: 999px;
    background: var(--pd-surface);
    color: var(--pd-text-soft);
    font-size: 8px;
    font-weight: 700;
}

.pd-pagination__arrow:disabled {
    opacity: .35;
    cursor: default;
}

/* ---------------- Ending / Empty ---------------- */

.pd-album-ending {
    display: flex;
    align-items: center;
    flex-direction: column;
    padding: 105px 20px 35px;
    text-align: center;
}

.pd-album-ending h2 {
    max-width: 850px;
}

.pd-album-ending p {
    margin: 8px 0 0;
    color: var(--pd-muted-2);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .6px;
}

.pd-album-empty {
    min-height: 390px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 75px 20px;
    text-align: center;
}

.pd-album-empty__icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    margin-bottom: 14px;
    border: 1px solid var(--pd-line);
    border-radius: 50%;
    color: var(--pd-muted);
}

.pd-album-empty h2 {
    margin-left: auto;
    margin-right: auto;
}

.pd-album-empty p {
    max-width: 600px;
}

/* ---------------- Selection dock ---------------- */

.pd-selection-dock {
    width: min(1030px, calc(100% - 24px));
    min-height: 72px;
    position: fixed;
    left: 50%;
    bottom: 16px;
    z-index: 950;
    display: grid;
    grid-template-columns: auto minmax(90px,1fr) auto;
    align-items: center;
    gap: 13px;
    padding: 9px 10px 9px 15px;
    transform: translateX(-50%) translateY(125px);
    border: 1px solid var(--pd-line);
    border-radius: 18px;
    background: var(--pd-surface-glass);
    box-shadow: var(--pd-shadow);
    backdrop-filter: blur(20px);
    transition: transform .28s cubic-bezier(.2,.8,.2,1), background .2s ease;
}

.pd-selection-dock.is-visible {
    transform: translateX(-50%) translateY(0);
}

.pd-selection-dock__count {
    min-width: 80px;
    display: flex;
    flex-direction: column;
}

.pd-selection-dock__count strong {
    color: var(--pd-text);
    font-family: var(--pd-font-serif);
    font-size: 25px;
    font-weight: 400;
}

.pd-selection-dock__count span {
    color: var(--pd-muted);
    font-size: 7.5px;
}

.pd-selection-dock__thumbs {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 5px;
    overflow: hidden;
}

.pd-selection-dock__thumbs img {
    width: 45px;
    height: 45px;
    flex: 0 0 auto;
    object-fit: cover;
    border-radius: 8px;
}

.pd-selection-dock__thumbs span {
    color: var(--pd-muted);
    font-size: 8px;
}

.pd-selection-dock__actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pd-dock-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 12px;
    border: 1px solid var(--pd-line);
    border-radius: 10px;
    background: var(--pd-surface-2);
    color: var(--pd-text-soft);
    font-size: 8.5px;
    font-weight: 700;
}

.pd-dock-button.is-primary {
    border-color: color-mix(in srgb, var(--pd-accent) 30%, transparent);
    background: var(--pd-accent-soft);
    color: var(--pd-text);
}

.pd-dock-button:disabled {
    opacity: .42;
}


.pd-dock-button--download-direct {
    border-color: #2f6fed;
    background: #2f6fed;
    color: #fff;
}

.pd-download-menu-wrap {
    position: relative;
}

.pd-download-menu {
    width: 280px;
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    overflow: hidden;
    padding: 5px;
    border: 1px solid var(--pd-line);
    border-radius: 13px;
    background: var(--pd-surface);
    box-shadow: var(--pd-shadow);
}

.pd-download-menu[hidden] {
    display: none;
}

.pd-download-menu button {
    width: 100%;
    display: grid;
    grid-template-columns: 31px 1fr;
    align-items: center;
    gap: 9px;
    padding: 10px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--pd-text-soft);
    text-align: left;
}

.pd-download-menu button:hover {
    background: var(--pd-surface-2);
}

.pd-download-menu button > svg {
    width: 16px;
    height: 16px;
    justify-self: center;
    color: var(--pd-muted);
}

.pd-download-menu button > span {
    display: flex;
    flex-direction: column;
}

.pd-download-menu strong {
    color: var(--pd-text);
    font-size: 8.5px;
}

.pd-download-menu small {
    margin-top: 2px;
    color: var(--pd-muted);
    font-size: 6.8px;
}

/* ---------------- Lightbox ---------------- */

.pd-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1700;
    display: grid;
    grid-template-rows: 1fr auto;
    background: rgba(5,5,5,.985);
    color: #fff;
}

.pd-lightbox[hidden] {
    display: none;
}

.pd-lightbox__stage {
    min-height: 0;
    display: grid;
    place-items: center;
    padding: 58px 82px 20px;
}

.pd-lightbox__stage img {
    max-width: 100%;
    max-height: calc(100vh - 150px);
    object-fit: contain;
    box-shadow: 0 20px 80px rgba(0,0,0,.38);
}

.pd-lightbox__close,
.pd-lightbox__nav {
    position: absolute;
    z-index: 3;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 50%;
    background: rgba(22,22,22,.74);
    color: #fff;
}

.pd-lightbox__close {
    width: 40px;
    height: 40px;
    top: 18px;
    right: 18px;
}

.pd-lightbox__nav {
    width: 46px;
    height: 46px;
    top: 50%;
    transform: translateY(-50%);
}

.pd-lightbox__nav.is-prev { left: 18px; }
.pd-lightbox__nav.is-next { right: 18px; }

.pd-lightbox__footer {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 18px;
    border-top: 1px solid rgba(255,255,255,.08);
    background: #0d0d0d;
}

.pd-lightbox__footer > div:first-child {
    display: flex;
    flex-direction: column;
}

.pd-lightbox__footer strong {
    font-size: 10px;
}

.pd-lightbox__footer small {
    margin-top: 3px;
    color: #777;
    font-size: 7px;
}

.pd-lightbox__actions {
    display: flex;
    gap: 6px;
}

.pd-lightbox__actions button {
    min-height: 39px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 11px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 9px;
    background: #181818;
    color: #ddd;
    font-size: 8px;
    font-weight: 700;
}

#lightboxHeart.is-active {
    border-color: rgba(228,123,142,.38);
    background: rgba(228,123,142,.12);
    color: #ff91a2;
}

#lightboxHeart.is-active svg {
    fill: currentColor;
}

/* ---------------- Modal / Cover editor ---------------- */

.pd-modal {
    position: fixed;
    inset: 0;
    z-index: 1850;
    display: grid;
    place-items: center;
    padding: 18px;
}

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

.pd-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.72);
    backdrop-filter: blur(10px);
}

.pd-submit-card,
.pd-cover-editor {
    width: min(550px, 100%);
    position: relative;
    z-index: 2;
    padding: 27px;
    border: 1px solid var(--pd-line);
    border-radius: 18px;
    background: var(--pd-surface);
    box-shadow: var(--pd-shadow);
}

.pd-cover-editor {
    width: min(780px, 100%);
}

.pd-modal__close {
    width: 35px;
    height: 35px;
    position: absolute;
    right: 14px;
    top: 14px;
    display: grid;
    place-items: center;
    border: 1px solid var(--pd-line);
    border-radius: 50%;
    background: var(--pd-surface-2);
    color: var(--pd-muted);
}

.pd-submit-card h2,
.pd-cover-editor h2 {
    margin: 8px 38px 8px 0;
    color: var(--pd-text);
    font-family: var(--pd-font-serif);
    font-size: 30px;
    font-weight: 400;
    line-height: 1.1;
}

.pd-submit-card > p,
.pd-cover-editor > p {
    margin: 0 0 18px;
    color: var(--pd-muted);
    font-size: 9px;
    line-height: 1.65;
}

.pd-submit-card > p strong {
    color: var(--pd-text-soft);
}

.pd-submit-card form {
    display: grid;
    gap: 11px;
}

.pd-submit-card label {
    display: grid;
    gap: 6px;
}

.pd-submit-card label > span,
.pd-cover-editor__position > span {
    color: var(--pd-text-soft);
    font-size: 8.5px;
    font-weight: 700;
}

.pd-submit-card label b {
    color: var(--pd-accent);
}

.pd-submit-card label em {
    color: var(--pd-muted-2);
    font-size: 6.5px;
    font-style: normal;
}

.pd-submit-card input,
.pd-submit-card textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--pd-line-soft);
    border-radius: 9px;
    outline: none;
    background: var(--pd-bg-soft);
    color: var(--pd-text);
    font-size: 9px;
}

.pd-submit-card input:focus,
.pd-submit-card textarea:focus {
    border-color: var(--pd-line);
}

.pd-submit-card textarea {
    resize: vertical;
}

.pd-submit-card__codes {
    padding: 10px;
    border: 1px solid var(--pd-line-soft);
    border-radius: 9px;
    background: var(--pd-bg-soft);
}

.pd-submit-card__codes > span {
    display: block;
    margin-bottom: 7px;
    color: var(--pd-muted);
    font-size: 6.5px;
    font-weight: 800;
    letter-spacing: .7px;
    text-transform: uppercase;
}

.pd-submit-card__codes > div {
    max-height: 95px;
    overflow-y: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.pd-submit-card__codes code {
    padding: 4px 6px;
    border: 1px solid var(--pd-line-soft);
    border-radius: 5px;
    background: var(--pd-surface);
    color: var(--pd-muted);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 7px;
}

.pd-submit-button {
    min-height: 45px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid color-mix(in srgb, var(--pd-accent) 30%, transparent);
    border-radius: 10px;
    background: var(--pd-accent-soft);
    color: var(--pd-text);
    font-size: 9px;
    font-weight: 800;
}

.pd-submit-card__note {
    display: block;
    margin-top: 10px;
    color: var(--pd-muted-2);
    font-size: 6.5px;
    line-height: 1.5;
}

.pd-cover-editor__preview {
    height: 255px;
    overflow: hidden;
    border-radius: 12px;
    background: #111;
}

.pd-cover-editor__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 48%;
}

.pd-cover-editor__thumbs {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    padding-bottom: 3px;
    overflow-x: auto;
}

.pd-cover-editor__thumbs button {
    width: 74px;
    height: 56px;
    flex: 0 0 auto;
    overflow: hidden;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
}

.pd-cover-editor__thumbs button.is-active {
    border-color: var(--pd-accent);
}

.pd-cover-editor__thumbs img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.pd-cover-editor__position {
    display: grid;
    gap: 7px;
    margin-top: 15px;
}

.pd-cover-editor__position input {
    width: 100%;
    accent-color: var(--pd-accent);
}

.pd-cover-editor__actions {
    display: flex;
    justify-content: flex-end;
    gap: 7px;
    margin-top: 17px;
}

.pd-cover-editor__actions button {
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--pd-line);
    border-radius: 8px;
    background: var(--pd-surface-2);
    color: var(--pd-muted);
    font-size: 8px;
    font-weight: 700;
}

.pd-cover-editor__actions button.is-primary {
    border-color: color-mix(in srgb, var(--pd-accent) 30%, transparent);
    background: var(--pd-accent-soft);
    color: var(--pd-text);
}

/* ---------------- Toast ---------------- */

.pd-toast {
    min-width: min(320px, calc(100% - 28px));
    max-width: min(560px, calc(100% - 28px));
    position: fixed;
    left: 50%;
    top: 50%;
    bottom: auto;
    z-index: 2100;
    padding: 16px 22px;
    transform: translate(-50%, calc(-50% + 18px));
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 18px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 24px 60px rgba(15, 23, 42, .24);
    backdrop-filter: blur(14px);
    color: var(--pd-text);
    font-size: clamp(14px, 1.7vw, 18px);
    line-height: 1.45;
    font-weight: 800;
    letter-spacing: .01em;
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease, transform .22s ease;
    text-align: center;
}

.pd-toast.is-show {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.pd-toast.is-success {
    border-color: rgba(22, 163, 74, .22);
}

.pd-toast.is-error {
    border-color: rgba(220, 38, 38, .18);
}

.pd-toast.is-info {
    border-color: rgba(37, 99, 235, .18);
}


/* ---------------- Responsive ---------------- */

@media (max-width: 1100px) {
    .pd-preview-bar {
        align-items: flex-start;
        flex-direction: column;
    }

    .pd-preview-bar__controls {
        width: 100%;
        flex-wrap: wrap;
    }

    body[data-preview="1"] .pd-cover {
        margin-top: 112px;
    }

    .pd-public-topbar.has-preview {
        top: 112px;
    }

    .pd-gallery.pd-layout-grid {
        grid-template-columns: repeat(3, minmax(0,1fr));
    }

    .pd-layout-editorial .pd-photo,
    .pd-layout-editorial .pd-photo:nth-child(n) {
        grid-column: span 6;
    }

    .pd-layout-editorial .pd-photo:nth-child(4n + 1) {
        grid-column: span 12;
        aspect-ratio: 3/2;
    }
}

@media (max-width: 780px) {
    .pd-public-topbar {
        height: 64px;
        padding: 0 13px;
    }

    .pd-public-brand small {
        display: none;
    }

    .pd-top-action {
        min-height: 36px;
        padding: 0 8px;
    }

    .pd-top-action--drive {
        gap: 5px;
        padding-left: 8px;
        padding-right: 8px;
    }

    .pd-drive-label-full {
        display: none;
    }

    .pd-drive-label-mobile {
        display: inline;
    }

    .pd-cover {
        height: 79vh;
        min-height: 560px;
    }

    .pd-cover h1 {
        font-size: clamp(47px, 15vw, 78px);
        letter-spacing: -2.8px;
    }

    .pd-album-main {
        padding-left: 8px;
        padding-right: 8px;
    }

    .pd-album-intro {
        grid-template-columns: 1fr;
        gap: 22px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .pd-album-intro__note {
        justify-self: stretch;
    }

    .pd-gallery-toolbar__right span,
    .pd-gallery-toolbar__right i {
        display: none;
    }

    .pd-gallery.pd-layout-masonry {
        columns: 2 160px;
        column-gap: 7px;
    }

    .pd-layout-masonry .pd-photo {
        margin-bottom: 7px;
    }

    .pd-gallery.pd-layout-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
        gap: 7px;
    }

    .pd-gallery.pd-layout-editorial {
        gap: 7px;
    }

    .pd-layout-editorial .pd-photo,
    .pd-layout-editorial .pd-photo:nth-child(n) {
        grid-column: span 6;
        aspect-ratio: 4/5;
    }

    .pd-layout-editorial .pd-photo:nth-child(5n + 1) {
        grid-column: span 12;
        aspect-ratio: 3/2;
    }

    .pd-gallery.pd-layout-large {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .pd-layout-large .pd-photo {
        min-height: 0;
    }

    .pd-photo__top-actions button {
        width: 34px;
        height: 34px;
    }

    .pd-photo__caption span {
        font-size: 6.8px;
    }

    .pd-pagination {
        gap: 6px;
    }

    .pd-pagination__arrow span {
        display: none;
    }

    .pd-pagination__arrow {
        width: 38px;
        padding: 0;
        justify-content: center;
    }

    .pd-selection-dock {
        grid-template-columns: auto 1fr;
        gap: 8px;
        padding: 8px 9px;
    }

    .pd-selection-dock__thumbs {
        justify-content: flex-end;
    }

    .pd-selection-dock__actions {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: .95fr .85fr 1.15fr;
    }

    .pd-dock-button {
        justify-content: center;
        padding: 0 8px;
    }

    .pd-download-menu {
        left: 0;
        right: auto;
    }

    .pd-lightbox__stage {
        padding: 54px 10px 14px;
    }

    .pd-lightbox__nav {
        width: 38px;
        height: 38px;
        top: auto;
        bottom: 90px;
    }

    .pd-lightbox__nav.is-prev { left: 10px; }
    .pd-lightbox__nav.is-next { right: 10px; }

    .pd-lightbox__footer {
        align-items: stretch;
        flex-direction: column;
    }

    .pd-lightbox__actions {
        display: grid;
        grid-template-columns: repeat(3,1fr);
    }

    .pd-lightbox__actions button {
        justify-content: center;
        padding: 0 7px;
    }
}

@media (max-width: 540px) {
    .pd-preview-bar__controls label {
        min-width: calc(50% - 5px);
        flex: 1;
    }

    .pd-preview-bar__controls button,
    .pd-preview-bar__controls > a {
        flex: 1;
        justify-content: center;
    }

    .pd-cover__content {
        bottom: 82px;
    }

    .pd-cover__eyebrow {
        font-size: 6.8px;
        letter-spacing: 2.3px;
    }

    .pd-cover__meta {
        font-size: 10px;
    }

    .pd-selection-dock__actions {
        grid-template-columns: 1fr 1fr;
    }

    .pd-selection-dock__actions .is-primary {
        grid-column: 1 / -1;
    }

    .pd-submit-card,
    .pd-cover-editor {
        padding: 20px 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}


/* =========================================================
   PhotoDrive Customer Album v2.1
   Preserve-original layout + premium cover + mobile swipe
   ========================================================= */

/* ---------- Ảnh bìa có chiều sâu hơn ---------- */
.pd-cover::before{
    content:"";
    position:absolute;
    inset:0;
    z-index:2;
    pointer-events:none;
    background:
        radial-gradient(circle at 50% 42%, transparent 0 36%, rgba(0,0,0,.17) 72%, rgba(0,0,0,.38) 100%),
        linear-gradient(180deg, rgba(0,0,0,.08), transparent 28%, rgba(0,0,0,.10) 62%, rgba(0,0,0,.30));
}

.pd-cover > img{
    animation:pdCoverBreath 18s ease-in-out infinite alternate;
    will-change:transform;
}

@keyframes pdCoverBreath{
    from{ transform:scale(1.012); }
    to{ transform:scale(1.055); }
}

.pd-cover__monogram{
    position:absolute;
    left:50%;
    top:50%;
    z-index:3;
    transform:translate(-50%,-53%);
    color:rgba(255,255,255,.055);
    font-family:var(--pd-font-serif);
    font-size:clamp(210px,31vw,520px);
    font-weight:400;
    line-height:.8;
    pointer-events:none;
    user-select:none;
}

.pd-cover__collection{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    margin-bottom:13px;
    color:rgba(255,255,255,.62);
}

.pd-cover__collection span{
    width:34px;
    height:1px;
    background:rgba(255,255,255,.35);
}

.pd-cover__collection b{
    font-size:6.8px;
    font-weight:600;
    letter-spacing:2.1px;
}

.pd-cover__content{
    z-index:5;
    animation:pdCoverTextIn .9s cubic-bezier(.2,.75,.25,1) both;
}

@keyframes pdCoverTextIn{
    from{ opacity:0; transform:translate(-50%,22px); }
    to{ opacity:1; transform:translate(-50%,0); }
}

.pd-cover h1{
    position:relative;
}

.pd-cover h1 span{
    position:relative;
    display:inline-block;
}

.pd-cover h1 span::after{
    content:"";
    width:56px;
    height:1px;
    position:absolute;
    left:50%;
    bottom:-16px;
    transform:translateX(-50%);
    background:rgba(255,255,255,.50);
}

.pd-cover__meta{
    margin-top:34px;
}

/* ---------- Ảnh album: nguyên tắc TUYỆT ĐỐI KHÔNG CẮT ---------- */
.pd-photo{
    background:var(--pd-surface);
}

.pd-photo__open{
    overflow:hidden;
    background:var(--pd-surface);
}

.pd-photo__open img{
    width:100%;
    height:auto;
    max-width:100%;
    object-fit:contain !important;
    object-position:center center !important;
    display:block;
}

/* Editorial = justified rows do JS tính theo aspect ratio thật.
   Không dùng nth-child span / object-fit:cover nữa. */
.pd-gallery.pd-layout-editorial{
    display:flex !important;
    flex-wrap:wrap;
    align-items:flex-start;
    align-content:flex-start;
    gap:12px;
}

.pd-layout-editorial .pd-photo,
.pd-layout-editorial .pd-photo:nth-child(n){
    flex:0 0 auto;
    grid-column:auto !important;
    min-width:0;
    aspect-ratio:auto !important;
    margin:0;
}

.pd-layout-editorial .pd-photo__open,
.pd-layout-editorial .pd-photo__open img{
    height:100%;
}

.pd-layout-editorial .pd-photo__open img{
    object-fit:contain !important;
}

/* Masonry: dùng kích thước tự nhiên của ảnh */
.pd-gallery.pd-layout-masonry{
    columns:3 360px;
    column-gap:12px;
}

.pd-layout-masonry .pd-photo{
    aspect-ratio:auto !important;
}

.pd-layout-masonry .pd-photo__open img{
    width:100%;
    height:auto !important;
    aspect-ratio:auto !important;
    object-fit:contain !important;
}

/* Grid: có nền letterbox nhẹ thay vì crop mất người */
.pd-layout-grid .pd-photo{
    aspect-ratio:1/1;
    background:color-mix(in srgb,var(--pd-surface) 90%,#000);
}

.pd-layout-grid .pd-photo__open,
.pd-layout-grid .pd-photo__open img{
    width:100%;
    height:100%;
}

.pd-layout-grid .pd-photo__open img{
    object-fit:contain !important;
}

/* Ảnh lớn: giữ nguyên tỷ lệ, không ép chiều cao */
.pd-layout-large .pd-photo{
    min-height:0 !important;
    aspect-ratio:auto !important;
}

.pd-layout-large .pd-photo__open,
.pd-layout-large .pd-photo__open img{
    height:auto !important;
}

.pd-layout-large .pd-photo__open img{
    object-fit:contain !important;
}

/* Caption rõ hơn */
.pd-photo__caption{
    align-items:flex-end;
}

.pd-photo__caption > div{
    min-width:0;
    display:flex;
    flex-direction:column;
    gap:2px;
}

.pd-photo__caption em{
    color:rgba(255,255,255,.58);
    font-size:6.3px;
    font-style:normal;
    font-weight:500;
}

/* ---------- Gợi ý 2 chế độ xem trên mobile ---------- */
.pd-mobile-view-hint{
    display:none;
}

/* ---------- Pagination cho album lớn ---------- */
.pd-pagination__numbers{
    min-height:45px;
}

.pd-pagination__numbers .pd-page-ellipsis{
    min-width:26px;
    display:grid;
    place-items:center;
    color:var(--pd-muted-2);
    font-size:9px;
    user-select:none;
}

/* ---------- Lightbox swipe ---------- */
.pd-lightbox__stage{
    touch-action:pan-y;
    user-select:none;
    -webkit-user-select:none;
    overflow:hidden;
}

.pd-lightbox__stage img{
    transition:transform .16s ease,opacity .16s ease;
    will-change:transform;
}

.pd-lightbox__stage.is-swiping img{
    transition:none;
}

.pd-lightbox__swipe-hint{
    display:none;
    margin-top:4px;
    color:#666;
    font-size:6.5px;
    font-style:normal;
}

/* ---------- Responsive ---------- */
@media (max-width:780px){
    .pd-mobile-view-hint{
        display:flex;
        align-items:center;
        justify-content:center;
        gap:8px;
        margin:-4px 0 12px;
        padding:8px 10px;
        border:1px solid var(--pd-line-soft);
        border-radius:10px;
        background:var(--pd-surface);
        color:var(--pd-muted);
        font-size:7.2px;
        text-align:center;
    }

    .pd-mobile-view-hint i{
        width:3px;
        height:3px;
        flex:0 0 auto;
        border-radius:50%;
        background:var(--pd-muted-2);
    }

    .pd-lightbox__swipe-hint{
        display:block;
    }

    .pd-gallery.pd-layout-editorial{
        gap:7px;
    }

    .pd-layout-editorial .pd-photo,
    .pd-layout-editorial .pd-photo:nth-child(n){
        grid-column:auto !important;
    }

    .pd-gallery.pd-layout-masonry{
        columns:2 150px;
        column-gap:7px;
    }

    .pd-cover__monogram{
        font-size:55vw;
    }

    .pd-cover__collection b{
        font-size:5.8px;
        letter-spacing:1.5px;
    }
}

@media (prefers-reduced-motion:reduce){
    .pd-cover > img,
    .pd-cover__content{
        animation:none !important;
    }
}


/* =========================================================
   PhotoDrive Album v2.2
   Justified gallery: không crop, không lỗ đen, không nhãn góc chụp
   ========================================================= */

.pd-gallery{
    --pd-gallery-gap:6px;
}

/* Editorial và Grid đều được JS chia hàng theo tỷ lệ ảnh thật.
   Mỗi hàng luôn lấp đầy 100% chiều ngang, không tạo khoảng đen bên phải. */
.pd-gallery.pd-layout-editorial,
.pd-gallery.pd-layout-grid{
    display:flex !important;
    flex-wrap:wrap;
    align-items:flex-start;
    align-content:flex-start;
    gap:var(--pd-gallery-gap) !important;
    columns:auto !important;
}

.pd-layout-editorial .pd-photo,
.pd-layout-editorial .pd-photo:nth-child(n),
.pd-layout-grid .pd-photo,
.pd-layout-grid .pd-photo:nth-child(n){
    min-width:0;
    flex:0 0 auto;
    grid-column:auto !important;
    aspect-ratio:auto !important;
    margin:0 !important;
}

/* Card luôn cùng tỷ lệ với ảnh thật, vì vậy contain không sinh letterbox. */
.pd-layout-editorial .pd-photo__open,
.pd-layout-editorial .pd-photo__open img,
.pd-layout-grid .pd-photo__open,
.pd-layout-grid .pd-photo__open img{
    width:100%;
    height:100% !important;
}

.pd-photo{
    border-radius:2px;
    background:transparent !important;
}

.pd-photo__open{
    background:transparent !important;
}

.pd-photo__open img{
    display:block;
    width:100%;
    max-width:100%;
    object-fit:contain !important;
    object-position:center center !important;
    background:transparent !important;
}

/* Masonry: ảnh nối nhau theo cột, giữ nguyên tỷ lệ */
.pd-gallery.pd-layout-masonry{
    columns:4 280px !important;
    column-gap:var(--pd-gallery-gap) !important;
}

.pd-layout-masonry .pd-photo{
    margin:0 0 var(--pd-gallery-gap) !important;
    break-inside:avoid;
    aspect-ratio:auto !important;
}

.pd-layout-masonry .pd-photo__open,
.pd-layout-masonry .pd-photo__open img{
    width:100%;
    height:auto !important;
}

/* Ảnh lớn = một cột, không ép 2 ảnh khác tỷ lệ vào cùng hàng */
.pd-gallery.pd-layout-large{
    display:block !important;
}

.pd-layout-large .pd-photo{
    width:min(1180px,100%) !important;
    height:auto !important;
    margin:0 auto var(--pd-gallery-gap) !important;
    aspect-ratio:auto !important;
}

.pd-layout-large .pd-photo__open,
.pd-layout-large .pd-photo__open img{
    width:100%;
    height:auto !important;
}

/* Caption không còn dòng loại góc chụp */
.pd-photo__caption{
    align-items:flex-end;
}

.pd-photo__caption > div{
    display:contents !important;
}

.pd-photo__caption em{
    display:none !important;
}

/* Giảm khoảng cách để album có cảm giác liền mạch */
.pd-album-main{
    padding-left:clamp(5px,1.1vw,16px) !important;
    padding-right:clamp(5px,1.1vw,16px) !important;
}

@media (max-width:780px){
    .pd-gallery{
        --pd-gallery-gap:4px;
    }

    .pd-gallery.pd-layout-masonry{
        columns:2 145px !important;
    }

    .pd-layout-large .pd-photo{
        width:100% !important;
    }
}


/* =========================================================
   PhotoDrive Album v2.3
   4–9 hàng/trang + quick cover Studio
   ========================================================= */

.pd-dock-button--cover{
    border-color:rgba(225,168,97,.24) !important;
    background:rgba(225,168,97,.075) !important;
    color:#f3d3aa !important;
}

html[data-theme="light"] .pd-dock-button--cover{
    border-color:rgba(171,104,36,.22) !important;
    background:rgba(171,104,36,.07) !important;
    color:#8a5525 !important;
}

.pd-dock-button--cover[hidden]{
    display:none !important;
}

@media (max-width:780px){
    .pd-selection-dock__actions{
        grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    }

    .pd-selection-dock__actions .is-primary{
        grid-column:1 / -1;
    }

    .pd-dock-button--cover{
        justify-content:center;
    }
}


/* =========================================================
   PhotoDrive Album v2.4 - demo source labels
   ========================================================= */
.pd-demo-source-note{
    position:absolute;
    z-index:8;
    display:inline-flex;
    align-items:center;
    min-height:25px;
    padding:0 8px;
    border:1px solid rgba(255,255,255,.16);
    border-radius:999px;
    background:rgba(9,9,9,.46);
    backdrop-filter:blur(8px);
    -webkit-backdrop-filter:blur(8px);
    color:rgba(255,255,255,.72);
    font-size:6.6px;
    font-weight:600;
    letter-spacing:.1px;
    pointer-events:none;
}

.pd-demo-source-note--cover{
    right:clamp(14px,2vw,30px);
    bottom:18px;
}

.pd-demo-gallery-source{
    display:flex;
    justify-content:flex-end;
    margin:0 3px 8px;
    color:var(--pd-muted-2);
    font-size:6.8px;
    font-weight:500;
}

html[data-theme="light"] .pd-demo-source-note{
    border-color:rgba(255,255,255,.22);
    background:rgba(28,25,22,.46);
    color:rgba(255,255,255,.78);
}

@media(max-width:780px){
    .pd-demo-source-note--cover{
        right:10px;
        bottom:12px;
    }

    .pd-demo-gallery-source{
        padding-right:3px;
        font-size:6.4px;
    }
}


/* =========================================================
   PhotoDrive Album v2.6
   Customer-selected cover
   ========================================================= */

.pd-dock-button--cover{
    border-color:rgba(214,166,107,.28) !important;
    background:rgba(214,166,107,.085) !important;
    color:#f0d2aa !important;
}

.pd-dock-button--cover:hover{
    border-color:rgba(214,166,107,.46) !important;
    background:rgba(214,166,107,.14) !important;
}

html[data-theme="light"] .pd-dock-button--cover{
    border-color:rgba(148,94,39,.22) !important;
    background:rgba(148,94,39,.065) !important;
    color:#7d4e24 !important;
}

.pd-photo__cover-mark{
    position:absolute;
    left:10px;
    top:43px;
    z-index:7;
    display:none;
    align-items:center;
    gap:4px;
    min-height:24px;
    padding:0 7px;
    border:1px solid rgba(255,255,255,.24);
    border-radius:999px;
    background:rgba(28,23,18,.68);
    backdrop-filter:blur(9px);
    -webkit-backdrop-filter:blur(9px);
    color:#fff1dc;
    font-size:6.5px;
    font-weight:700;
    pointer-events:none;
}

.pd-photo__cover-mark svg{
    width:11px;
    height:11px;
}

.pd-photo.is-customer-cover .pd-photo__cover-mark{
    display:inline-flex;
}

.pd-photo.is-customer-cover{
    outline:1px solid rgba(214,166,107,.54);
    outline-offset:-1px;
}

/* ---------- Customer cover picker ---------- */

.pd-customer-cover-card{
    width:min(760px,100%);
    max-height:min(760px,calc(100vh - 36px));
    position:relative;
    z-index:2;
    overflow:auto;
    padding:27px;
    border:1px solid var(--pd-line);
    border-radius:18px;
    background:var(--pd-surface);
    box-shadow:var(--pd-shadow);
}

.pd-customer-cover-card h2{
    margin:8px 38px 8px 0;
    color:var(--pd-text);
    font-family:var(--pd-font-serif);
    font-size:30px;
    font-weight:400;
    line-height:1.1;
}

.pd-customer-cover-card > p{
    max-width:620px;
    margin:0 0 18px;
    color:var(--pd-muted);
    font-size:9px;
    line-height:1.65;
}

.pd-customer-cover-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:8px;
}

.pd-customer-cover-choice{
    min-width:0;
    overflow:hidden;
    padding:0;
    border:1px solid var(--pd-line-soft);
    border-radius:10px;
    background:var(--pd-bg-soft);
    color:var(--pd-text-soft);
    text-align:left;
}

.pd-customer-cover-choice:hover{
    border-color:var(--pd-line);
    transform:translateY(-1px);
}

.pd-customer-cover-choice.is-active{
    border-color:rgba(214,166,107,.55);
    box-shadow:0 0 0 2px rgba(214,166,107,.08);
}

.pd-customer-cover-choice img{
    width:100%;
    aspect-ratio:4/3;
    display:block;
    object-fit:cover;
}

.pd-customer-cover-choice span{
    display:block;
    overflow:hidden;
    padding:8px 9px 9px;
    color:var(--pd-muted);
    font-size:7px;
    font-weight:700;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.pd-customer-cover-choice.is-active span{
    color:var(--pd-text);
}

.pd-customer-cover-actions{
    display:flex;
    justify-content:flex-end;
    gap:7px;
    margin-top:16px;
    padding-top:14px;
    border-top:1px solid var(--pd-line-soft);
}

.pd-customer-cover-actions button{
    min-height:39px;
    padding:0 12px;
    border:1px solid var(--pd-line);
    border-radius:9px;
    background:var(--pd-surface-2);
    color:var(--pd-text-soft);
    font-size:8px;
    font-weight:700;
}

.pd-customer-cover-actions button:first-child{
    margin-right:auto;
}

@media(max-width:900px){
    .pd-customer-cover-grid{
        grid-template-columns:repeat(3,minmax(0,1fr));
    }
}

@media(max-width:780px){
    .pd-selection-dock__actions{
        grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    }

    .pd-selection-dock__actions .is-primary{
        grid-column:1 / -1;
    }

    .pd-customer-cover-card{
        padding:20px 15px;
    }

    .pd-customer-cover-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:6px;
    }

    .pd-customer-cover-actions{
        display:grid;
        grid-template-columns:1fr 1fr;
    }

    .pd-customer-cover-actions button:first-child{
        margin-right:0;
        grid-column:1 / -1;
    }
}


/* =========================================================
   PhotoDrive Album v2.6.1
   "Bỏ chọn tất cả" là nút riêng trên selection dock
   ========================================================= */

.pd-selection-dock{
    width:min(1180px,calc(100% - 24px));
}

.pd-dock-button--clear{
    border-color:rgba(255,255,255,.10) !important;
    background:var(--pd-surface-2) !important;
    color:var(--pd-muted) !important;
}

.pd-dock-button--clear svg{
    color:#c98585;
}

.pd-dock-button--clear:hover{
    border-color:rgba(201,92,92,.26) !important;
    background:rgba(178,73,73,.075) !important;
    color:var(--pd-text) !important;
}

html[data-theme="light"] .pd-dock-button--clear{
    border-color:rgba(31,37,34,.10) !important;
    background:#f7f5f1 !important;
    color:#6f6861 !important;
}

html[data-theme="light"] .pd-dock-button--clear:hover{
    border-color:rgba(176,70,70,.20) !important;
    background:rgba(176,70,70,.055) !important;
    color:#413a35 !important;
}

@media(max-width:980px){
    .pd-selection-dock{
        width:min(960px,calc(100% - 16px));
    }

    .pd-selection-dock__actions{
        flex-wrap:wrap;
        justify-content:flex-end;
    }
}

@media(max-width:780px){
    .pd-selection-dock__actions{
        display:grid !important;
        grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    }

    .pd-dock-button--clear{
        justify-content:center;
    }

    .pd-selection-dock__actions .is-primary{
        grid-column:1 / -1;
    }
}


/* =========================================================
   PhotoDrive Album v2.7
   Original file download note
   ========================================================= */

.pd-download-menu__note{
    margin:2px 3px 5px;
    padding:7px 9px;
    border-bottom:1px solid var(--pd-line-soft);
    color:var(--pd-muted);
    font-size:6.8px;
    font-weight:600;
    line-height:1.4;
}

html[data-theme="light"] .pd-download-menu__note{
    color:#817a73;
}

/* v3.1.0 - watermark + full album image export */
.pd-photo-watermark {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    max-width: 82%;
    transform: translate(-50%, -50%) rotate(-12deg);
    color: rgba(255,255,255,.66);
    font-size: clamp(12px, 1.4vw, 22px);
    font-weight: 800;
    letter-spacing: .08em;
    line-height: 1.2;
    text-align: center;
    text-shadow: 0 1px 8px rgba(0,0,0,.3);
    pointer-events: none;
    user-select: none;
}

.pd-export-card {
    width: min(560px, calc(100vw - 32px));
    position: relative;
    z-index: 2;
    padding: 28px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 20px;
    background: #111315;
    color: #efefeb;
    box-shadow: 0 26px 80px rgba(0,0,0,.4);
}

[data-theme="light"] .pd-export-card {
    border-color: rgba(20,22,23,.12);
    background: #fbfaf7;
    color: #17191a;
}

.pd-export-card h2 {
    margin: 8px 0 8px;
    font-size: clamp(23px, 3vw, 32px);
    line-height: 1.15;
}

.pd-export-card > p {
    margin: 0;
    color: #888e97;
    font-size: 12px;
    line-height: 1.65;
}

.pd-export-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 20px 0 16px;
}

.pd-export-summary > div {
    padding: 13px 14px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 12px;
    background: rgba(255,255,255,.025);
}

[data-theme="light"] .pd-export-summary > div {
    border-color: rgba(20,22,23,.09);
    background: rgba(20,22,23,.025);
}

.pd-export-summary strong,
.pd-export-summary span {
    display: block;
}

.pd-export-summary strong {
    font-size: 21px;
}

.pd-export-summary span {
    margin-top: 3px;
    color: #7d838c;
    font-size: 10px;
}

.pd-export-field > span,
.pd-export-field > small {
    display: block;
}

.pd-export-field > span {
    margin-bottom: 7px;
    font-size: 11px;
    font-weight: 800;
}

.pd-export-field input {
    width: 100%;
    height: 46px;
    box-sizing: border-box;
    padding: 0 13px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 10px;
    outline: 0;
    background: #0b0d0e;
    color: #fff;
    font: inherit;
}

[data-theme="light"] .pd-export-field input {
    border-color: rgba(20,22,23,.14);
    background: #fff;
    color: #17191a;
}

.pd-export-field > small,
.pd-export-note {
    margin-top: 7px;
    color: #777d86;
    font-size: 9.5px;
    line-height: 1.55;
}

.pd-export-progress {
    margin-top: 18px;
}

.pd-export-progress[hidden] { display: none !important; }

.pd-export-progress > div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 7px;
    color: #9298a0;
    font-size: 10px;
}

.pd-export-progress__track {
    height: 6px;
    display: block;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
}

.pd-export-progress__track i {
    width: 0;
    height: 100%;
    display: block;
    border-radius: inherit;
    background: currentColor;
    color: #ff6f86;
    transition: width .2s ease;
}

.pd-export-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 20px;
}

.pd-export-actions button {
    min-height: 40px;
    padding: 0 15px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 9px;
    background: #151719;
    color: #ecece8;
    font: inherit;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
}

.pd-export-actions button.is-primary {
    border-color: #ecece8;
    background: #ecece8;
    color: #111315;
}

.pd-export-actions button:disabled { opacity: .55; cursor: wait; }

[data-theme="light"] .pd-export-actions button {
    border-color: rgba(20,22,23,.14);
    background: #f0eee9;
    color: #17191a;
}

[data-theme="light"] .pd-export-actions button.is-primary {
    background: #17191a;
    color: #fff;
}

.pd-export-note { display: block; }

@media (max-width: 620px) {
    .pd-export-card { padding: 22px 18px; border-radius: 16px; }
    .pd-export-summary { grid-template-columns: 1fr 1fr; }
    .pd-export-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .pd-export-actions button { width: 100%; }
}

/* v3.9.6 - optional lightweight Studio logo */
.pd-public-brand__mark{overflow:hidden}
.pd-public-brand__mark img{display:block;width:100%;height:100%;object-fit:contain;border-radius:inherit}

/* =========================================================
   PhotoDrive v3.10.8 rc12 — public album visual refinements
   ========================================================= */

/* Keep the cover cinematic without making the representative photo too dark. */
.pd-cover__shade{
    background:
        linear-gradient(180deg,rgba(0,0,0,.30) 0%,rgba(0,0,0,.055) 28%,rgba(0,0,0,.04) 52%,rgba(8,8,8,.60) 100%),
        linear-gradient(90deg,rgba(0,0,0,.08),transparent 42%,rgba(0,0,0,.04))!important;
}
.pd-cover::before{
    background:
        radial-gradient(circle at 50% 42%,transparent 0 42%,rgba(0,0,0,.08) 76%,rgba(0,0,0,.20) 100%),
        linear-gradient(180deg,rgba(0,0,0,.035),transparent 32%,rgba(0,0,0,.045) 66%,rgba(0,0,0,.15))!important;
}

/* Selection submit form: larger fields, compact 10px data-entry type. */
#submitModal .pd-submit-card{
    width:min(640px,100%);
    padding:32px 34px;
}
#submitModal .pd-submit-card form{gap:13px}
#submitModal .pd-submit-card label{gap:7px}
#submitModal .pd-submit-card label > span{font-size:10px}
#submitModal .pd-submit-card label em{font-size:8px}
#submitModal .pd-submit-card input{
    min-height:49px;
    padding:0 14px;
    font-size:11px;
    border-radius:10px;
}
#submitModal .pd-submit-card textarea{
    min-height:96px;
    padding:13px 14px;
    font-size:11px;
    line-height:1.55;
    border-radius:10px;
}
#submitModal .pd-submit-card__codes{padding:12px 13px}
#submitModal .pd-submit-card__codes > span{font-size:8px}
#submitModal .pd-submit-card__codes code{font-size:8px;padding:5px 7px}
#submitModal .pd-submit-button{min-height:48px;font-size:10px}
#submitModal .pd-submit-card__note{font-size:8px}

@media(max-width:680px){
    #submitModal .pd-submit-card{padding:26px 20px}
    #submitModal .pd-submit-card h2{font-size:27px}
}

/* =========================================================
   PhotoDrive v3.10.8 rc13 — larger selection information dock
   ========================================================= */
.pd-selection-dock{
    width:min(1240px,calc(100% - 24px));
    min-height:84px;
    grid-template-columns:auto minmax(120px,1fr) auto;
    gap:16px;
    padding:11px 14px 11px 17px;
    border-radius:19px;
}
.pd-selection-dock__count{
    min-width:88px;
}
.pd-selection-dock__count strong{
    font-size:28px;
    line-height:1;
}
.pd-selection-dock__count span,
.pd-selection-dock__thumbs span{
    font-size:12px;
    line-height:1.25;
}
.pd-selection-dock__thumbs{
    gap:7px;
}
.pd-selection-dock__thumbs img{
    width:52px;
    height:52px;
    border-radius:9px;
}
.pd-selection-dock__actions{
    gap:8px;
}
.pd-dock-button{
    min-height:48px;
    padding:0 15px;
    gap:8px;
    border-radius:11px;
    font-size:12px;
    line-height:1;
}
.pd-dock-button svg{
    width:13px;
    height:13px;
}

@media(max-width:980px){
    .pd-selection-dock{
        width:min(960px,calc(100% - 16px));
        min-height:78px;
        padding:10px 12px;
        gap:11px;
    }
    .pd-dock-button{
        min-height:44px;
        padding:0 11px;
        font-size:11px;
    }
    .pd-selection-dock__thumbs img{
        width:46px;
        height:46px;
    }
}

@media(max-width:780px){
    .pd-selection-dock__count span,
    .pd-selection-dock__thumbs span,
    .pd-dock-button{
        font-size:11px;
    }
}

/* =========================================================
   PhotoDrive v3.10.58 — mobile-first public album polish
   Approved mobile preview: 2-column phone gallery + compact bottom dock.
   Desktop/tablet behavior above 620px remains unchanged.
   ========================================================= */
@media (max-width: 620px) {
    body.pd-public-album {
        --pd-mobile-radius: 14px;
        --pd-mobile-gap: 9px;
        padding-bottom: calc(118px + env(safe-area-inset-bottom));
    }

    body.pd-public-album .pd-album-main {
        padding-left: 10px !important;
        padding-right: 10px !important;
        padding-bottom: 36px;
    }

    /* Compact gallery context instead of a wide desktop toolbar. */
    body.pd-public-album .pd-gallery-toolbar {
        min-height: 30px;
        margin: 2px 2px 8px;
        padding: 0 2px;
        border: 0;
        background: transparent;
    }
    body.pd-public-album .pd-gallery-toolbar__right {
        display: none;
    }
    body.pd-public-album .pd-gallery-toolbar__count b,
    body.pd-public-album .pd-gallery-toolbar__count em {
        font-size: 10px;
        line-height: 1.2;
    }

    /* Two clean hint chips, matching the approved mobile mockup. */
    body.pd-public-album .pd-mobile-view-hint {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin: 0 0 10px;
        padding: 0;
        border: 0;
        background: transparent;
    }
    body.pd-public-album .pd-mobile-view-hint i {
        display: none;
    }
    body.pd-public-album .pd-mobile-view-hint span {
        min-height: 42px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        padding: 7px 9px;
        border: 1px solid color-mix(in srgb, var(--pd-accent) 16%, var(--pd-line));
        border-radius: 999px;
        background: color-mix(in srgb, var(--pd-accent-soft) 68%, var(--pd-surface));
        color: var(--pd-text-soft);
        font-size: 11px;
        font-weight: 700;
        line-height: 1.25;
        text-align: center;
    }
    body.pd-public-album .pd-mobile-view-hint span:first-child::before {
        content: "↕";
        color: var(--pd-accent);
        font-size: 15px;
        font-weight: 800;
    }
    body.pd-public-album .pd-mobile-view-hint span:last-child::before {
        content: "▣";
        color: var(--pd-accent);
        font-size: 13px;
        font-weight: 800;
    }

    /* JS fixes Editorial/Grid to exactly 2 images per row on phones. */
    body.pd-public-album .pd-gallery {
        --pd-gallery-gap: var(--pd-mobile-gap) !important;
        gap: var(--pd-mobile-gap) !important;
    }

    body.pd-public-album .pd-photo {
        overflow: hidden;
        border-radius: var(--pd-mobile-radius) !important;
        background: var(--pd-surface) !important;
        box-shadow: 0 2px 12px rgba(15, 23, 42, .08);
        isolation: isolate;
    }
    body.pd-public-album .pd-photo__open,
    body.pd-public-album .pd-photo__open img {
        border-radius: inherit;
    }

    /* Refined tap targets: still easy to press, less visual obstruction. */
    body.pd-public-album .pd-photo__top-actions {
        top: 8px;
        right: 8px;
        gap: 5px;
    }
    body.pd-public-album .pd-photo__top-actions button {
        width: 36px;
        height: 36px;
        border: 1px solid rgba(255,255,255,.30);
        background: rgba(33, 48, 68, .64);
        box-shadow: 0 4px 14px rgba(0,0,0,.15);
        backdrop-filter: blur(10px) saturate(125%);
        -webkit-backdrop-filter: blur(10px) saturate(125%);
    }
    body.pd-public-album .pd-photo__top-actions button svg {
        width: 17px;
        height: 17px;
    }

    /* Stronger but compact photo-code/index footer. */
    body.pd-public-album .pd-photo__caption {
        padding: 34px 10px 8px;
        background: linear-gradient(180deg, transparent, rgba(0,0,0,.56));
    }
    body.pd-public-album .pd-photo__caption span {
        overflow: hidden;
        max-width: calc(100% - 34px);
        font-size: 9px !important;
        font-weight: 800;
        letter-spacing: .05px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    body.pd-public-album .pd-photo__caption small {
        color: #fff;
        font-size: 15px;
        font-weight: 700;
        line-height: 1;
        text-shadow: 0 1px 5px rgba(0,0,0,.28);
    }

    /* Compact iPhone/Android action dock with safe-area padding. */
    body.pd-public-album .pd-selection-dock {
        width: calc(100% - 16px);
        min-height: 72px;
        bottom: max(8px, env(safe-area-inset-bottom));
        grid-template-columns: 62px minmax(0, 1fr);
        gap: 9px;
        padding: 9px 9px calc(9px + env(safe-area-inset-bottom));
        border-radius: 21px;
        background: color-mix(in srgb, var(--pd-surface) 91%, transparent);
        box-shadow: 0 18px 46px rgba(15, 23, 42, .18);
        backdrop-filter: blur(22px) saturate(135%);
        -webkit-backdrop-filter: blur(22px) saturate(135%);
    }
    body.pd-public-album .pd-selection-dock__count {
        min-width: 0;
        padding-left: 3px;
    }
    body.pd-public-album .pd-selection-dock__count strong {
        font-size: 27px;
        line-height: .95;
    }
    body.pd-public-album .pd-selection-dock__count span {
        margin-top: 4px;
        font-size: 10px;
        line-height: 1.15;
    }
    body.pd-public-album .pd-selection-dock__thumbs {
        display: none;
    }
    body.pd-public-album .pd-selection-dock__actions {
        grid-column: 2;
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 7px;
    }
    body.pd-public-album .pd-download-menu-wrap {
        min-width: 0;
    }
    body.pd-public-album .pd-dock-button {
        width: 100%;
        min-height: 46px;
        justify-content: center;
        gap: 6px;
        padding: 0 9px;
        border-radius: 13px;
        font-size: 11px !important;
        font-weight: 800;
    }
    body.pd-public-album #downloadMenuButton,
    body.pd-public-album .pd-dock-button--download-direct {
        border-color: #2f6fed;
        background: #2f6fed;
        color: #fff;
        box-shadow: 0 7px 18px rgba(47,111,237,.24);
    }
    body.pd-public-album .pd-dock-button--clear {
        border-color: rgba(190,71,81,.18) !important;
        background: rgba(207,82,93,.08) !important;
        color: #a83f49 !important;
    }
    body.pd-public-album #setSelectedAsCover,
    body.pd-public-album #copySelectedCodes {
        min-height: 40px;
    }
    body.pd-public-album #openSubmitSelection {
        grid-column: 1 / -1;
        min-height: 44px;
    }
    body.pd-public-album #copySelectedCodes:disabled,
    body.pd-public-album #openSubmitSelection:disabled {
        display: none;
    }

    body.pd-public-album .pd-download-menu {
        width: 232px;
        max-width: calc(100vw - 32px);
        min-width: 0;
        left: 50%;
        right: auto;
        bottom: calc(100% + 10px);
        transform: translateX(-50%);
        overflow: visible;
        border-radius: 0;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    /* Avoid duplicate instruction card on small screens. */
    body.pd-public-album .pd-album-intro__note {
        display: none;
    }
}

@media (max-width: 380px) {
    body.pd-public-album .pd-mobile-view-hint span {
        font-size: 10px;
        padding-inline: 7px;
    }
    body.pd-public-album .pd-photo__top-actions button {
        width: 34px;
        height: 34px;
    }
    body.pd-public-album .pd-selection-dock {
        grid-template-columns: 56px minmax(0, 1fr);
    }
    body.pd-public-album .pd-dock-button {
        font-size: 10px !important;
    }
}

/* =========================================================
   v3.10.65 - iPhone heart rendering lock
   - visual-only override; no selection/download logic changed
   - selected heart = red on light circular button
   - fixed SVG geometry for Safari/WebKit
   ========================================================= */
.pd-photo-heart svg,
#lightboxHeart svg {
    display: block !important;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    flex: 0 0 18px !important;
    overflow: visible !important;
    transform: none !important;
    -webkit-transform: none !important;
}

.pd-photo-heart svg path,
#lightboxHeart svg path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.pd-photo-heart.is-active {
    border-color: rgba(222, 73, 96, .58) !important;
    background: rgba(255,255,255,.94) !important;
    color: #de4960 !important;
}

.pd-photo-heart.is-active svg path {
    fill: #de4960 !important;
    stroke: #de4960 !important;
}

#lightboxHeart.is-active {
    border-color: rgba(222, 73, 96, .55) !important;
    background: rgba(255,255,255,.96) !important;
    color: #de4960 !important;
}

#lightboxHeart.is-active svg path {
    fill: #de4960 !important;
    stroke: #de4960 !important;
}

@media (max-width: 620px) {
    body.pd-public-album .pd-photo-heart svg {
        width: 18px !important;
        height: 18px !important;
        min-width: 18px !important;
        min-height: 18px !important;
    }
}

/* =========================================================
   v3.10.78 - Mobile favorite-download confirmation styling
   Visual-only. Download batching/behavior is unchanged.
   ========================================================= */
@media (max-width: 620px) {
    body.pd-public-album #downloadMenu #downloadSelected {
        width: 100%;
        margin: 0;
        min-height: 52px;
        border: 1px solid rgba(203, 95, 112, .26);
        border-radius: 15px;
        background: linear-gradient(180deg, #fff9fa 0%, #fff1f3 100%);
        color: #bb5060;
        box-shadow: 0 8px 18px rgba(186, 96, 111, .10);
        padding: 11px 16px;
        grid-template-columns: 28px minmax(0, 1fr);
        gap: 9px;
    }

    body.pd-public-album #downloadMenu #downloadSelected > span {
        min-width: 0;
        justify-content: center;
    }

    body.pd-public-album #downloadMenu #downloadSelected > svg {
        color: #c45163;
        width: 18px;
        height: 18px;
    }

    body.pd-public-album #downloadMenu #downloadSelected > svg path {
        stroke: currentColor;
    }

    body.pd-public-album #downloadMenu #downloadSelected strong {
        color: #b84a5b;
        font-size: 10.8px;
        font-weight: 800;
        letter-spacing: .01em;
        white-space: nowrap;
        line-height: 1.2;
    }

    body.pd-public-album #downloadMenu #downloadSelected:hover,
    body.pd-public-album #downloadMenu #downloadSelected:focus-visible {
        background: linear-gradient(180deg, #fff4f6 0%, #ffe8ec 100%);
        border-color: rgba(203, 95, 112, .34);
    }

    body.pd-public-album #downloadMenu #downloadSelected:active {
        transform: translateY(1px);
        box-shadow: 0 4px 12px rgba(186, 96, 111, .12);
    }
}


/* v3.10.84 - iOS Safari download chooser. Runtime-only on iPhone/iPad. */
.pd-ios-download-choice[hidden] { display: none !important; }
.pd-ios-download-choice {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 18px;
}
.pd-ios-download-choice__backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(20,24,28,.42);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}
.pd-ios-download-choice__card {
    position: relative;
    width: min(420px,100%);
    padding: 24px 18px 18px;
    border: 1px solid rgba(128,111,102,.14);
    border-radius: 24px;
    background: #fffdf9;
    box-shadow: 0 22px 60px rgba(27,31,36,.24);
    color: #211f1d;
    text-align: center;
}
.pd-ios-download-choice__close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(29,29,31,.06);
    color: #4c4743;
    font-size: 24px;
    line-height: 1;
}
.pd-ios-download-choice__eyebrow {
    margin-bottom: 5px;
    color: #b45160;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.pd-ios-download-choice h3 { margin: 0; font-size: 22px; line-height: 1.2; }
.pd-ios-download-choice p {
    margin: 10px auto 16px;
    max-width: 330px;
    color: #706b66;
    font-size: 14px;
    line-height: 1.5;
}
.pd-ios-download-choice__primary {
    width: 100%;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
}
.pd-ios-download-choice__primary {
    border: 1px solid #2f6fed;
    background: #2f6fed;
    color: #fff;
    box-shadow: 0 8px 20px rgba(47,111,237,.20);
}
.pd-ios-download-choice small {
    display: block;
    margin-top: 13px;
    color: #8a8580;
    font-size: 11px;
    line-height: 1.45;
}
html.pd-ios-download-choice-open,
html.pd-ios-download-choice-open body { overflow: hidden; }
@media (min-width: 621px) { .pd-ios-download-choice { display: none !important; } }


/* v3.10.87 - iOS stable browser handoff (copy-link, no custom schemes) */
.pd-ios-download-choice__primary {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}
.pd-ios-download-choice__primary.is-copied {
    border-color: #2d8a69;
    background: #2d8a69;
    box-shadow: 0 8px 20px rgba(45,138,105,.18);
}


/* =========================================================
   FIX43 — Studio branding in public album viewer
   Uses the logo/tagline configured in Studio information.
   The logo viewport stays fixed so uploaded artwork can never
   stretch or break the public album header.
   ========================================================= */
.pd-public-topbar{
    height:96px;
}
.pd-public-brand{
    gap:14px;
    min-width:0;
    max-width:min(680px,62vw);
}
.pd-public-brand > span.pd-public-brand__mark{
    width:64px;
    height:64px;
    flex:0 0 64px;
    position:relative;
    overflow:hidden;
    display:grid;
    place-items:center;
    border-radius:16px;
    border:1px solid rgba(255,255,255,.40);
    background:rgba(13,13,13,.36);
    box-shadow:0 7px 22px rgba(0,0,0,.16);
    backdrop-filter:blur(12px);
    -webkit-backdrop-filter:blur(12px);
}
.pd-public-brand__mark img{
    width:100%;
    height:100%;
    max-width:none;
    max-height:none;
    object-fit:contain;
    border-radius:0;
    transform:translate(var(--pd-brand-logo-x,0%),var(--pd-brand-logo-y,0%)) scale(var(--pd-brand-logo-scale,1));
    transform-origin:center center;
    will-change:transform;
}
.pd-public-brand__text{
    min-width:0;
    justify-content:center;
}
.pd-public-brand strong{
    display:block;
    max-width:100%;
    color:#fff;
    font-size:16px;
    line-height:1.12;
    font-weight:800;
    letter-spacing:.1px;
    text-shadow:0 1px 8px rgba(0,0,0,.26);
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.pd-public-brand small{
    display:block;
    max-width:100%;
    margin-top:6px;
    color:rgba(255,255,255,.78);
    font-size:9px;
    line-height:1.15;
    font-weight:800;
    letter-spacing:2.05px;
    text-transform:uppercase;
    text-shadow:0 1px 7px rgba(0,0,0,.26);
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

@media (max-width:780px){
    .pd-public-topbar{
        height:78px;
        padding-left:13px;
        padding-right:13px;
    }
    .pd-public-brand{
        gap:9px;
        max-width:56vw;
    }
    .pd-public-brand > span.pd-public-brand__mark{
        width:52px;
        height:52px;
        flex-basis:52px;
        border-radius:13px;
    }
    .pd-public-brand strong{
        font-size:12.5px;
        line-height:1.1;
    }
    .pd-public-brand small{
        display:block;
        margin-top:4px;
        font-size:6.2px;
        line-height:1.12;
        letter-spacing:1.25px;
    }
}

@media (max-width:430px){
    .pd-public-brand{
        max-width:52vw;
    }
    .pd-public-brand > span.pd-public-brand__mark{
        width:48px;
        height:48px;
        flex-basis:48px;
        border-radius:12px;
    }
    .pd-public-brand strong{font-size:11.5px}
    .pd-public-brand small{font-size:5.8px;letter-spacing:1.05px}
}
