/* Final compact interface layer: calmer spacing, lighter controls, denser admin surfaces. */
:root {
    --radius: 12px;
    --button-radius: 10px;
    --card-shadow: 0 10px 28px rgba(15, 23, 42, .07);
    --lift-shadow: 0 14px 42px rgba(15, 23, 42, .10);
    --layout-gap: clamp(12px, 1.8vw, 22px);
    --layout-card-pad: clamp(14px, 1.6vw, 20px);
    --layout-tight-pad: clamp(12px, 1.4vw, 16px);
    --cd-navy: #122033;
    --cd-teal: #16b8a5;
    --cd-blue: #3468f6;
    --cd-gold: #e6a93e;
    --cd-border: #dbe6ef;
    --cd-surface: #ffffff;
    --cd-soft: #f7fafc;
}

body {
    font-size: 15px;
    line-height: 1.45;
}

h1,
h2,
h3,
p {
    letter-spacing: 0;
}

.site-header {
    min-height: 64px;
    padding-block: 8px;
}

.site-header::before {
    height: 64px;
}

.brand,
.admin-brand {
    gap: 10px;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 16px;
}

.brand-mark.has-logo-image {
    overflow: hidden;
    padding: 0;
    background: #ffffff;
}

.brand-mark.has-logo-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    padding: 5px;
}

.brand strong,
.admin-brand strong {
    font-size: 16px;
}

.brand small,
.admin-brand small {
    font-size: 12px;
}

.header-user-toggle {
    width: 40px;
    height: 40px;
}

.auth-label-short {
    display: none;
}

.mode-label-short {
    display: none;
}

.header-user-avatar {
    width: 30px;
    height: 30px;
}

.nav-toggle,
.header-auth-link,
.site-nav a,
.admin-nav a,
.admin-sidebar-footer a {
    min-height: 38px;
    font-size: 14px;
}

.site-main {
    padding-block: 22px 44px;
}

.login-wrap {
    width: min(100% - 48px, 520px);
    margin-inline: auto;
}

.login-wrap .login-card {
    width: 100%;
    max-width: 520px;
    margin-inline: auto;
}

.login-code-info {
    margin: 8px 0 16px;
    color: #667085;
    font-size: 14px;
    line-height: 1.5;
}

.trust-browser-check {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    margin-top: 14px;
    padding: 12px;
    color: #344054 !important;
    background: #f7fafc;
    border: 1px solid var(--cd-border);
    border-radius: 12px;
    line-height: 1.35;
}

.trust-browser-check input {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: var(--cd-teal);
}

.account-head,
.share-header {
    margin-bottom: 16px;
    padding-top: 10px;
}

.account-head h1,
.share-header h1,
.admin-topbar h1 {
    font-size: clamp(28px, 3.2vw, 42px);
    line-height: 1.08;
}

.hero-text,
.account-head p,
.share-header p,
.section-head p {
    margin-block: 6px 0;
    font-size: 15px;
    line-height: 1.5;
}

.eyebrow {
    font-size: 11px;
    letter-spacing: .08em;
}

.panel,
.file-table-card,
.share-link-panel,
.access-panel,
.profile-identity-panel,
.profile-settings-panel,
.modal-card,
.metric-card,
.tariff-card,
.quota-addon-card,
.request-card,
.public-profile-card,
.public-profile-item,
.public-profile-section,
.home-media-card {
    border-radius: 14px;
    box-shadow: var(--card-shadow);
}

.panel,
.file-table-card,
.share-link-panel,
.access-panel,
.profile-identity-panel,
.profile-settings-panel,
.metric-card,
.tariff-card,
.quota-addon-card,
.request-card,
.public-profile-card,
.public-profile-item,
.public-profile-section,
.settings-shell .toggle-row,
.home-media-card {
    border-color: var(--cd-border);
}

.panel,
.file-table-card,
.share-link-panel,
.access-panel,
.profile-identity-panel,
.profile-settings-panel {
    padding: var(--layout-card-pad);
}

.section-head {
    margin-bottom: 12px;
}

.section-head h2,
.panel h2,
.file-table-card h2,
.profile-settings-head h2 {
    font-size: clamp(20px, 2vw, 26px);
    line-height: 1.18;
}

.metric-grid,
.admin-grid,
.tariff-grid,
.quota-addon-grid,
.request-card-grid,
.public-profile-grid {
    gap: 12px;
    align-items: stretch;
}

.metric-card {
    min-height: 92px;
    gap: 4px;
    padding: var(--layout-tight-pad);
    height: 100%;
}

.metric-card span,
.metric-card small {
    font-size: 12px;
}

.metric-card strong {
    margin: 4px 0 2px;
    font-size: clamp(21px, 2.4vw, 29px);
    line-height: 1.08;
    overflow-wrap: anywhere;
}

.primary-button,
.small-button,
.picker-button,
.icon-button,
.tab-button,
.subtab-button {
    border-radius: var(--button-radius);
    font-size: 14px;
}

.primary-button {
    min-height: 42px;
    padding: 10px 14px;
}

.small-button,
.picker-button {
    min-height: 36px;
    padding: 8px 10px;
}

.icon-button {
    width: 34px;
    height: 34px;
}

input,
select,
textarea {
    min-height: 38px;
    border-radius: 10px;
}

@media (min-width: 721px) {
    input,
    select,
    textarea {
        font-size: 14px;
    }
}

.form-grid,
.option-grid {
    gap: 12px;
}

label {
    font-size: 13px;
}

th,
td {
    padding: 10px 12px;
    font-size: 14px;
}

th {
    font-size: 11px;
}

.responsive-table table {
    min-width: 720px;
}

.admin-main {
    padding: clamp(16px, 2.2vw, 26px);
}

.admin-grid .panel,
.tariff-card,
.quota-addon-card,
.request-card,
.public-profile-item {
    height: 100%;
}

.event-row {
    align-items: flex-start;
    min-height: 56px;
    padding: 10px;
    border: 1px solid var(--cd-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, .72);
}

.event-row div,
.request-card h2,
.request-card p,
.public-profile-item h3,
.public-profile-item p,
.filename-cell {
    min-width: 0;
    overflow-wrap: anywhere;
}

.request-card h2,
.tariff-card h3,
.quota-addon-card h3,
.public-profile-item h3 {
    font-size: clamp(18px, 1.4vw, 22px);
    line-height: 1.18;
}

.request-actions,
.table-actions {
    align-items: center;
}

.account-transfer-list {
    display: none;
}

.site-main > .request-filter-tabs,
.site-main > .request-legacy-note,
.site-main > .request-card-grid,
.site-main > .request-empty-state {
    width: var(--layout-page);
    margin-left: auto;
    margin-right: auto;
}

.site-main > .request-filter-tabs {
    margin-bottom: 14px;
}

.request-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 390px), 1fr));
    align-items: start;
}

.request-card {
    min-height: 0;
}

.request-card h2,
.request-card p,
.request-link-row,
.request-link-row input {
    min-width: 0;
}

.request-link-row input {
    font-size: 14px;
}

.request-card .request-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(132px, max-content));
    justify-content: start;
    align-items: stretch;
    gap: 8px;
}

.request-card .request-actions form {
    display: grid;
    margin: 0;
}

.request-card .request-actions .small-button,
.request-card .request-actions form button {
    min-height: 38px;
    padding: 8px 12px;
}

.account-transfer-empty {
    padding: 16px;
    color: var(--muted);
    text-align: center;
    border: 1px solid var(--cd-border);
    border-radius: 14px;
    background: #f8fbff;
}

.account-managed-file-list {
    display: none;
}

.account-managed-file-list .share-file-actions form {
    margin: 0;
}

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

.transfer-mode a,
.tab-button,
.subtab-button,
.request-filter-tabs a {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.transfer-mode a {
    white-space: nowrap;
}

.tab-list,
.subtab-list,
.ipban-tabs .tab-list {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.tab-button,
.subtab-button {
    white-space: nowrap;
}

.share-badges span,
.public-profile-meta span,
.request-meta span,
.transfer-note span {
    border-color: var(--cd-border);
}

.admin-shell {
    grid-template-columns: 236px minmax(0, 1fr);
}

.admin-topbar {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 14px;
}

.admin-sidebar {
    width: 236px;
    padding: 18px;
}

.admin-nav a,
.admin-sidebar-footer a {
    padding: 8px 10px;
}

.admin-nav {
    gap: 6px;
    margin-top: 20px;
}

.admin-sidebar-footer {
    left: 18px;
    right: 18px;
    bottom: 18px;
}

.transfer-desktop-scene {
    width: min(100% - 44px, 1240px);
    grid-template-columns: minmax(330px, 420px) minmax(0, 1fr);
    gap: clamp(28px, 5vw, 68px);
    padding-top: clamp(24px, 5vh, 52px);
}

.transfer-stage {
    width: min(100%, 420px);
}

.transfer-stage .upload-panel,
.upload-panel {
    padding: 16px;
    border-radius: 18px;
}

.upload-panel-head {
    margin-bottom: 10px;
}

.transfer-stage .upload-panel-head h1,
.upload-panel-head h1,
.upload-panel-head h2 {
    font-size: 20px;
    line-height: 1.15;
}

.transfer-mode {
    margin-bottom: 10px;
}

.transfer-mode a {
    min-height: 38px;
    font-size: 14px;
}

.drop-zone,
.transfer-stage .drop-zone {
    min-height: 190px;
    padding: 22px 16px;
    border-radius: 14px;
}

.drop-zone .drop-plus,
.drop-plus {
    width: 48px;
    height: 48px;
    font-size: 24px;
}

.drop-zone strong {
    margin-top: 8px;
    font-size: 21px;
}

.drop-zone span {
    font-size: 15px;
}

.upload-picker-actions {
    gap: 8px;
}

.file-list {
    max-height: 230px;
}

.file-list.upload-file-list {
    max-height: none;
    overflow: hidden;
}

.file-list.upload-file-list ul {
    max-height: clamp(180px, 32vh, 290px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.file-list-item {
    padding: 8px;
}

.transfer-stage .primary-button {
    min-height: 48px;
    border-radius: 13px;
    font-size: 16px;
}

.transfer-note {
    margin-top: 14px;
    gap: 8px;
}

.transfer-note span {
    min-height: 31px;
    padding: 6px 9px;
    font-size: 13px;
}

.album-promo {
    min-height: 66px;
    padding: 10px 14px;
    border-radius: 18px;
}

.transfer-story-panel {
    min-height: clamp(340px, 46vh, 460px);
    padding: clamp(24px, 3.4vw, 40px);
    border-radius: 22px;
}

.transfer-story-panel h2 {
    font-size: clamp(28px, 3.4vw, 42px);
    line-height: 1.06;
}

.transfer-story-panel p:not(.eyebrow) {
    font-size: clamp(15px, 1.35vw, 17px);
}

.story-metrics {
    margin-top: 18px;
}

.story-metrics span {
    padding: 10px;
    border-radius: 12px;
}

.story-metrics strong {
    font-size: 20px;
}

.profile-console {
    gap: 16px;
}

.profile-identity-panel,
.profile-settings-panel {
    padding: 16px;
}

.profile-avatar-button--compact {
    width: 82px;
    height: 82px;
}

.profile-setting-row {
    gap: 12px;
    padding: 12px 0;
}

.profile-setting-icon {
    width: 38px;
    height: 38px;
    font-size: 18px;
}

.profile-setting-row h3 {
    font-size: 16px;
}

.profile-setting-row p {
    font-size: 13px;
}

.profile-state-pill,
.points-pill,
.request-type-badge,
.request-status {
    padding: 5px 8px;
    font-size: 11px;
}

.modal-card {
    gap: 14px;
    padding: 18px;
}

.modal-head h2 {
    font-size: 22px;
}

.tariff-grid,
.quota-addon-grid,
.request-card-grid {
    gap: 14px;
}

.tariff-card,
.quota-addon-card,
.request-card {
    padding: 16px;
    border-radius: 16px;
}

.request-meta,
.request-actions {
    gap: 8px;
}

.notice {
    padding: 11px 13px;
    border-radius: 12px;
    font-size: 14px;
}

@media (max-width: 920px) {
    .admin-sidebar {
        width: auto;
    }

    .transfer-desktop-scene {
        width: min(100% - 28px, 760px);
        gap: 20px;
    }
}

@media (max-width: 720px) {
    :root {
        --layout-card-pad: 14px;
    }

    body {
        font-size: 14px;
    }

    .site-header {
        min-height: 58px;
    }

    .site-header::before {
        height: 58px;
    }

    .brand-mark {
        width: 34px;
        height: 34px;
    }

    .brand strong,
    .admin-brand strong {
        font-size: 15px;
    }

    .account-head h1,
    .share-header h1,
    .admin-topbar h1 {
        font-size: 28px;
    }

    .panel,
    .file-table-card,
    .share-link-panel,
    .access-panel,
    .profile-identity-panel,
    .profile-settings-panel {
        padding: 14px;
    }

    .transfer-desktop-scene {
        width: 100%;
        padding-top: 0;
    }

    .transfer-stage {
        width: min(100% - 24px, 520px);
    }

    .transfer-stage .upload-panel {
        padding: 14px;
        border-radius: 18px;
    }

    .drop-zone,
    .transfer-stage .drop-zone {
        min-height: 180px;
    }

    .responsive-table table {
        min-width: 640px;
    }

    th,
    td {
        padding: 9px 10px;
    }

    .account-transfer-table {
        display: none;
    }

    .account-transfer-list {
        display: grid;
        gap: 12px;
    }

    .account-share-file-table > .responsive-table {
        display: none;
    }

    .account-managed-file-list {
        display: grid;
    }

    .account-transfer-card {
        display: grid;
        gap: 14px;
        padding: 14px;
        border: 1px solid var(--cd-border);
        border-radius: 16px;
        background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
        box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
    }

    .account-transfer-card-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        min-width: 0;
    }

    .account-transfer-card-head div {
        min-width: 0;
    }

    .account-transfer-card-head span,
    .account-transfer-meta dt {
        display: block;
        color: #667085;
        font-size: 11px;
        font-weight: 850;
        letter-spacing: .06em;
        text-transform: uppercase;
    }

    .account-transfer-card-head code {
        display: block;
        max-width: 100%;
        margin-top: 4px;
        overflow: hidden;
        color: #0f766e;
        font-size: 15px;
        line-height: 1.25;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .account-transfer-card-head strong {
        flex: 0 0 auto;
        color: #111827;
        font-size: 15px;
        white-space: nowrap;
    }

    .account-transfer-meta {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin: 0;
    }

    .account-transfer-meta div {
        min-width: 0;
        padding: 10px;
        border: 1px solid #e5edf6;
        border-radius: 12px;
        background: rgba(255, 255, 255, .72);
    }

    .account-transfer-meta dd {
        margin: 4px 0 0;
        overflow-wrap: anywhere;
        color: #111827;
        font-size: 14px;
        font-weight: 750;
        line-height: 1.25;
    }

    .account-transfer-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .account-transfer-actions .small-button,
    .account-transfer-actions form,
    .account-transfer-actions form button {
        width: 100%;
    }

    .account-transfer-actions .small-button {
        justify-content: center;
        min-height: 40px;
    }

    .site-main > .request-filter-tabs,
    .site-main > .request-legacy-note,
    .site-main > .request-card-grid,
    .site-main > .request-empty-state {
        width: var(--layout-page);
    }

    .request-card-grid {
        grid-template-columns: 1fr;
    }

    .request-filter-tabs {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .request-filter-tabs a {
        min-height: 38px;
        padding: 8px 6px;
        gap: 5px;
        font-size: 13px;
        line-height: 1.1;
    }

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

    .request-card .request-actions .small-button,
    .request-card .request-actions form button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 720px) {
    .site-body:not(.admin-body) {
        background:
            linear-gradient(180deg, #ffffff 0, #ffffff 58px, #dbe8ff 58px, #cfe0ff 100%);
    }

    .site-body:not(.admin-body) .site-header {
        width: 100%;
        min-height: 58px;
        display: grid;
        grid-template-columns: 52px minmax(0, 1fr) minmax(96px, auto);
        gap: 8px;
        padding: 8px 14px;
        background: #ffffff;
    }

    .site-body:not(.admin-body) .site-header::before {
        height: 58px;
        background: #ffffff;
        border-bottom-color: #e7edf5;
    }

    .site-body:not(.admin-body) .nav-toggle {
        display: inline-flex;
        width: 42px;
        height: 42px;
        justify-self: start;
        border: 0;
        box-shadow: none;
        background: transparent;
        color: #1f2937;
        font-size: 24px;
    }

    .site-body:not(.admin-body) .brand {
        justify-self: center;
        gap: 0;
    }

    .site-body:not(.admin-body) .brand-mark {
        width: 42px;
        height: 42px;
        border-radius: 14px;
        background: #101827;
        color: #ffffff;
        box-shadow: none;
    }

    .site-body:not(.admin-body) .brand span:last-child {
        display: none;
    }

    .site-body:not(.admin-body) .header-auth-link {
        justify-self: end;
        max-width: 116px;
        min-height: 42px;
        padding: 0;
        overflow: hidden;
        color: #111827;
        background: transparent;
        border: 0;
        box-shadow: none;
        text-align: right;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 15px;
        font-weight: 850;
    }

    .site-body:not(.admin-body) .header-user-menu {
        grid-column: 3;
        justify-self: end;
    }

    .site-body:not(.admin-body) .auth-label-full {
        display: none;
    }

    .site-body:not(.admin-body) .auth-label-short {
        display: inline;
    }

    .site-body.is-home .site-main {
        width: 100%;
        padding: 28px 0 28px;
    }

    .login-wrap {
        width: min(100% - 44px, 520px);
    }

    .site-body.is-home .transfer-desktop-scene {
        width: min(100% - 32px, 430px);
        display: grid;
        gap: 18px;
        margin-inline: auto;
        padding: 0;
    }

    .site-body.is-home .transfer-stage {
        width: 100%;
    }

    .site-body.is-home .album-promo {
        width: 100%;
        min-height: 78px;
        margin: 0 0 16px;
        padding: 12px 14px;
        border-radius: 18px;
        box-shadow: 0 14px 34px rgba(52, 104, 246, .13);
    }

    .site-body.is-home .album-promo-art {
        width: 76px;
        flex: 0 0 76px;
    }

    .site-body.is-home .album-promo-copy span {
        font-size: 20px;
        line-height: 1.1;
    }

    .site-body.is-home .album-promo-copy small {
        margin-top: 3px;
        font-size: 15px;
        line-height: 1.18;
    }

    .site-body.is-home .upload-panel {
        padding: 15px;
        border-radius: 20px;
        box-shadow: 0 18px 46px rgba(21, 44, 86, .14);
    }

    .site-body.is-home .upload-panel::before {
        display: none;
    }

    .site-body.is-home .upload-panel-head {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
        margin-bottom: 12px;
        text-align: left;
    }

    .site-body.is-home .upload-panel-head .eyebrow {
        margin: 0 0 8px;
        color: #3468f6;
        font-size: 12px;
        letter-spacing: .12em;
    }

    .site-body.is-home .upload-panel-head h1 {
        margin: 0;
        font-size: 24px;
        line-height: 1.08;
    }

    .site-body.is-home .upload-state-pill {
        display: none;
    }

    .site-body.is-home .transfer-mode {
        margin: 12px 0 12px;
        padding: 4px;
        border-radius: 13px;
    }

    .site-body.is-home .transfer-mode a {
        min-height: 42px;
        gap: 5px;
        padding: 8px 6px;
        justify-content: center;
        font-size: 15px;
        line-height: 1.1;
        white-space: nowrap;
    }

    .site-body.is-home .mode-label-full {
        display: none;
    }

    .site-body.is-home .mode-label-short {
        display: inline;
    }

    .request-filter-tabs {
        grid-template-columns: 1fr;
    }

    .request-card .request-actions {
        grid-template-columns: 1fr;
    }

    .site-body.is-home .transfer-mode i {
        font-size: 17px;
    }

    .site-body.is-home .drop-zone,
    .site-body.is-home .transfer-stage .drop-zone {
        min-height: 196px;
        padding: 20px 14px;
        border-radius: 17px;
    }

    .site-body.is-home .drop-zone .drop-plus,
    .site-body.is-home .drop-plus {
        width: 58px;
        height: 58px;
        font-size: 28px;
    }

    .site-body.is-home .drop-zone strong {
        margin-top: 10px;
        font-size: 25px;
        line-height: 1.05;
    }

    .site-body.is-home .drop-zone span {
        max-width: 260px;
        font-size: 18px;
        line-height: 1.28;
    }

    .site-body.is-home .upload-picker-actions {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-top: 10px;
    }

    .site-body.is-home .picker-button {
        min-height: 48px;
        justify-content: center;
        font-size: 16px;
        border-radius: 13px;
    }

    .site-body.is-home .file-list.empty,
    .site-body.is-home .upgrade-note {
        font-size: 14px;
    }

    .site-body.is-home .transfer-note {
        justify-content: center;
        margin-top: 14px;
    }

    .site-body.is-home .transfer-note span {
        font-size: 12px;
    }

    .site-body.is-home .transfer-story-panel {
        display: none;
    }
}

@media (max-width: 380px) {
    .site-body.is-home .transfer-desktop-scene {
        width: min(100% - 24px, 380px);
    }

    .site-body:not(.admin-body) .header-auth-link {
        max-width: 98px;
        font-size: 14px;
    }

    .site-body.is-home .transfer-mode a {
        gap: 4px;
        font-size: 14px;
    }

    .site-body.is-home .drop-zone strong {
        font-size: 24px;
    }

    .site-body.is-home .drop-zone span {
        font-size: 18px;
    }
}

.share-email-code-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
    margin-top: 12px;
}

.share-email-code-form label {
    display: grid;
    gap: 6px;
    color: #667085;
    font-weight: 650;
}

.share-email-code-form input {
    width: 100%;
    min-width: 0;
}

.cookie-card {
    width: min(94vw, 640px);
    gap: 14px;
    padding: clamp(18px, 2.4vw, 26px);
    border: 1px solid rgba(52, 104, 246, .14);
    background:
        radial-gradient(circle at 10% 0%, rgba(22, 184, 165, .12), transparent 34%),
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.cookie-card .modal-head {
    align-items: flex-start;
}

.cookie-card .modal-head h2 {
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.06;
}

.cookie-close-button[hidden] {
    display: none;
}

.cookie-summary {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 14px;
    border: 1px solid rgba(22, 184, 165, .22);
    border-radius: 14px;
    background: rgba(231, 248, 245, .72);
}

.cookie-summary-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
    color: #0f766e;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 118, 110, .10);
}

.cookie-summary p,
.cookie-legal-note {
    margin: 0;
    color: #475467;
    font-size: 14px;
    line-height: 1.55;
}

.cookie-choice-list {
    display: grid;
    gap: 8px;
    margin: 2px 0 0;
}

.cookie-option {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-height: 68px;
    padding: 12px;
    border: 1px solid var(--cd-border);
    border-radius: 14px;
    background: rgba(255, 255, 255, .82);
    cursor: pointer;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.cookie-option:hover {
    border-color: rgba(52, 104, 246, .28);
    box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
    transform: translateY(-1px);
}

.cookie-option.is-required {
    cursor: default;
}

.cookie-option-copy {
    display: grid;
    gap: 3px;
}

.cookie-option-copy strong {
    color: #101828;
    font-size: 15px;
    line-height: 1.2;
}

.cookie-option-copy small,
.cookie-badge {
    color: #667085;
    font-size: 13px;
    line-height: 1.35;
}

.cookie-badge {
    padding: 5px 9px;
    border-radius: 999px;
    color: #0f766e;
    background: #e7f8f5;
    font-weight: 800;
    white-space: nowrap;
}

.cookie-toggle {
    position: relative;
    display: inline-grid;
    width: 42px;
    height: 24px;
    align-items: center;
}

.cookie-toggle input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: inherit;
}

.cookie-toggle span {
    position: relative;
    display: block;
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: #dbe6ef;
    transition: background .16s ease;
}

.cookie-toggle span::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 3px 8px rgba(15, 23, 42, .16);
    transition: transform .16s ease;
}

.cookie-toggle input:checked + span {
    background: linear-gradient(135deg, var(--cd-teal), #22c7b6);
}

.cookie-toggle input:checked + span::after {
    transform: translateX(18px);
}

.cookie-legal-note a {
    color: #0f766e;
    font-weight: 800;
    text-decoration: none;
}

.cookie-legal-note a:hover {
    text-decoration: underline;
}

.cookie-actions {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, .92fr);
    gap: 10px;
    margin-top: 2px;
}

.cookie-actions .primary-button,
.cookie-actions .small-button {
    width: 100%;
    justify-content: center;
    min-height: 44px;
}

.cookie-actions .small-button.ghost {
    color: #475467;
    background: transparent;
}

.notification-grid .toggle-row {
    min-height: 54px;
    padding: 12px;
    border: 1px solid var(--cd-border);
    border-radius: 12px;
    background: #f8fbff;
}

.site-body:not(.admin-body) .header-user-dropdown {
    width: min(320px, calc(100vw - 24px));
    padding: 12px;
    border-radius: 16px;
}

.site-body:not(.admin-body) .header-user-card {
    gap: 10px;
    padding: 10px;
    border-radius: 12px;
}

.site-body:not(.admin-body) .header-user-avatar.large {
    width: 42px;
    height: 42px;
}

.site-body:not(.admin-body) .header-user-nav {
    gap: 4px;
    margin-top: 8px;
}

.site-body:not(.admin-body) .header-user-nav a,
.site-body:not(.admin-body) .site-nav a {
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 14px;
}

.site-body:not(.admin-body) .site-nav {
    width: min(360px, calc(100vw - 28px));
    padding: 14px;
    border-radius: 18px;
}

.upload-picker-actions {
    align-items: stretch;
}

.picker-button {
    min-height: 44px;
}

/* Final density pass: keep upload controls orderly without hiding later fields. */
.transfer-stage .file-list.upload-file-list,
.file-list.upload-file-list {
    position: relative;
    z-index: 0;
    display: grid;
    gap: 10px;
    max-height: none;
    margin: 12px 0 14px;
    padding: 12px;
    overflow: hidden;
}

.transfer-stage .file-list.upload-file-list ul,
.file-list.upload-file-list ul {
    max-height: clamp(180px, 30vh, 300px);
    padding-right: 3px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.upload-options,
.upgrade-note,
.transfer-stage .primary-button {
    position: relative;
    z-index: 1;
}

.upload-file-row {
    min-height: 58px;
    padding: 9px;
    border-radius: 12px;
}

.upload-file-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
}

.upload-file-remove {
    width: 31px;
    height: 31px;
    border-radius: 10px;
}

.upload-file-meta strong {
    font-size: 13px;
    line-height: 1.15;
}

@media (max-width: 720px) {
    input,
    select,
    textarea {
        font-size: 16px;
    }

    .site-body:not(.admin-body) .site-nav,
    .site-body:not(.admin-body) .header-user-dropdown {
        border-radius: 16px;
    }

    .site-body:not(.admin-body) .site-nav a,
    .site-body:not(.admin-body) .header-user-nav a {
        min-height: 36px;
        font-size: 14px;
    }

    .site-body.is-home .upload-panel {
        padding: 13px;
    }

    .site-body.is-home .transfer-mode {
        padding: 3px;
        border-radius: 12px;
    }

    .site-body.is-home .transfer-mode a {
        min-height: 38px;
        padding: 7px 5px;
        font-size: 14px;
    }

    .site-body.is-home .drop-zone,
    .site-body.is-home .transfer-stage .drop-zone {
        min-height: 176px;
        padding: 18px 12px;
    }

    .site-body.is-home .drop-zone .drop-plus,
    .site-body.is-home .drop-plus {
        width: 52px;
        height: 52px;
        font-size: 25px;
    }

    .site-body.is-home .drop-zone strong {
        font-size: 23px;
    }

    .site-body.is-home .drop-zone span {
        font-size: 16px;
    }

    .site-body.is-home .picker-button {
        min-height: 42px;
        font-size: 15px;
    }

    .transfer-stage .file-list.upload-file-list ul,
    .file-list.upload-file-list ul {
        max-height: min(260px, 34vh);
    }

    .share-email-code-form {
        grid-template-columns: 1fr;
    }

    .cookie-actions {
        grid-template-columns: 1fr;
    }

    .cookie-card {
        width: min(100vw - 20px, 560px);
        padding: 16px;
        border-radius: 18px;
    }

    .cookie-summary {
        grid-template-columns: 1fr;
    }

    .cookie-summary-icon {
        width: 38px;
        height: 38px;
    }

    .cookie-option {
        grid-template-columns: auto minmax(0, 1fr);
        min-height: 62px;
    }

    .cookie-badge {
        grid-column: 2;
        justify-self: start;
    }

    .cookie-option-copy strong {
        font-size: 14px;
    }

    .cookie-option-copy small,
    .cookie-legal-note,
    .cookie-summary p {
        font-size: 13px;
    }
}
