:root {
    --bg: #f5f7fb;
    --panel: rgba(255, 255, 255, .94);
    --line: #e4e9f2;
    --text: #111827;
    --muted: #667085;
    --accent: #0a84ff;
    --accent-soft: #e8f2ff;
    --nav: #0f172a;
    --ok: #12805c;
    --bad: #b42318;
    --shadow: 0 10px 26px rgba(15, 23, 42, .06);
    --radius: 16px;
}

@font-face {
    font-family: "FZZZHSubset";
    src: url("/assets/fonts/fzzzh-subset.woff2?v=3") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: block;
}

@font-face {
    font-family: "FZLTSubset";
    src: url("/assets/fonts/fzlt-subset.woff2?v=3") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: block;
}

* { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, #fbfcff 0%, var(--bg) 42%, #eef3f9 100%);
    color: var(--text);
    font-family: "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
    font-size: 14px;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.boot-screen {
    min-height: 100vh;
    display: none;
    place-items: center;
    color: var(--muted);
}

body.booting .boot-screen {
    display: grid;
}

.login {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-box {
    width: min(390px, 100%);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .10);
}

.login-brand {
    font-size: 22px;
    font-weight: 800;
}

.login-box p {
    margin: 8px 0 22px;
    color: var(--muted);
    line-height: 1.6;
}

label {
    display: grid;
    gap: 7px;
    margin-bottom: 13px;
}

label span,
summary,
.form-upload-field span {
    color: #344054;
    font-weight: 700;
    font-size: 13px;
}

input, select, textarea {
    width: 100%;
    height: 38px;
    border: 1px solid #d7deea;
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    padding: 0 11px;
    outline: none;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(10, 132, 255, .12);
}

.check {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    margin: 0;
}

.check input {
    width: auto;
    height: auto;
}

.primary, .ghost, .mini, .logout, .link {
    min-height: 36px;
    border: 0;
    border-radius: 10px;
    padding: 0 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.primary {
    width: 100%;
    background: var(--accent);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 10px 20px rgba(10, 132, 255, .22);
}

.ghost {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--line);
}

.mini {
    min-height: 32px;
    background: #f8fafc;
    color: var(--text);
    border: 1px solid var(--line);
}

.form-message {
    min-height: 20px;
    margin-top: 12px;
    color: var(--bad);
}

.spinner {
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    display: inline-block;
    vertical-align: -2px;
    margin-right: 8px;
    animation: spin .75s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.toast {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    min-width: 180px;
    max-width: min(460px, calc(100vw - 28px));
    padding: 10px 14px;
    border-radius: 12px;
    background: #111827;
    color: #fff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .18);
    text-align: center;
}

.toast.error {
    background: #b42318;
}

.global-loading {
    position: fixed;
    top: 18px;
    right: 22px;
    z-index: 9998;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .96);
    border: 1px solid var(--line);
    box-shadow: 0 16px 34px rgba(15, 23, 42, .14);
    color: #344054;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.global-loading .spinner,
button .spinner {
    margin-right: 0;
}

.viz-tooltip {
    position: fixed;
    z-index: 10000;
    min-width: 150px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .96);
    border: 1px solid #e5edf7;
    box-shadow: 0 16px 34px rgba(15, 23, 42, .16);
    color: var(--text);
    pointer-events: none;
    font-size: 13px;
}

.viz-tooltip strong {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
}

.danger {
    min-height: 36px;
    border: 0;
    border-radius: 10px;
    padding: 0 14px;
    background: #fff1f0;
    color: #b42318;
    border: 1px solid #ffd8d6;
    font-weight: 700;
}

button.is-loading {
    opacity: .72;
    cursor: wait;
}

.view.loading {
    cursor: progress;
}

.view.loading .panel,
.view.loading .metric-card,
.view.loading .active-card {
    opacity: .72;
    transition: opacity .15s ease;
}

.app {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
}

.sidebar {
    background: var(--nav);
    color: #e5edf8;
    padding: 22px 14px;
    box-shadow: 12px 0 36px rgba(15, 23, 42, .12);
    position: sticky;
    top: 0;
    height: 100vh;
}

.brand {
    font-size: 18px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 10px 22px;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .12);
    display: grid;
    place-items: center;
}

.nav button,
.logout {
    width: 100%;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: #cbd5e1;
    background: transparent;
    text-align: left;
    padding: 0 14px;
    margin-bottom: 6px;
}

.nav button:hover,
.logout:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.nav button.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 10px 20px rgba(10, 132, 255, .22);
}

.logout {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 18px;
    width: calc(100% - 28px);
    border: 1px solid rgba(255, 255, 255, .12);
}

.main {
    min-width: 0;
    padding: 22px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

h1, h2, h3, p { margin: 0; }
h1 { font-size: 22px; }
h2 { font-size: 16px; }
.topbar p { margin-top: 7px; color: var(--muted); }

.top-actions, .inline-actions, .upload-line {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.top-actions .primary {
    width: auto;
}

#statsPageFilter {
    width: 180px;
}

.overview-controls {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.filter-item {
    display: grid;
    gap: 7px;
    min-width: 150px;
}

.filter-item.wide {
    min-width: min(360px, 100%);
    flex: 1 1 280px;
}

.overview-hero {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 14px;
    margin-bottom: 14px;
}

.active-card,
.metric-card,
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.active-card {
    min-height: 190px;
    padding: 22px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    text-align: center;
    background: linear-gradient(145deg, #f7fbff, #ffffff);
    border-color: #d8e8ff;
    border-radius: 22px;
}

.active-title {
    font-size: 17px;
    font-weight: 900;
}

.active-value {
    font-size: 54px;
    line-height: 1;
    font-weight: 900;
    color: #111827;
}

.active-sub {
    color: var(--muted);
    font-size: 18px;
}

.active-window-select {
    width: 166px;
    height: 46px;
    border-radius: 18px;
    border-color: #b9dcff;
    text-align: center;
    font-size: 18px;
    box-shadow: 0 0 0 4px rgba(10, 132, 255, .10);
}

.active-card strong {
    font-size: 42px;
    line-height: 1;
    margin: 16px 0 8px;
}

.active-card small,
.metric-card small,
.panel-head span {
    color: var(--muted);
}

.overview-metrics,
.metric-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    gap: 10px;
}

.metric-card {
    padding: 16px;
    min-height: 118px;
}

.metric-card span {
    color: var(--muted);
}

.metric-card strong {
    display: block;
    margin: 10px 0 6px;
    font-size: 25px;
}

.range-tabs,
.metric-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.range-tabs {
    margin: 12px 0 14px;
}

.range-tabs button,
.metric-tabs button {
    border: 0;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    font-weight: 700;
}

.range-tabs button.active,
.metric-tabs button.active {
    background: var(--accent-soft);
    color: #175cd3;
}

.overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, .8fr);
    gap: 14px;
}

.panel {
    padding: 18px;
    min-width: 0;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.chart-box,
.visitor-chart {
    min-height: 260px;
}

.chart-box {
    height: 280px;
    min-width: 0;
    position: relative;
    overflow: hidden;
}

.trend-svg {
    width: 100%;
    height: 280px;
    display: block;
    overflow: visible;
    font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    shape-rendering: geometricPrecision;
    text-rendering: geometricPrecision;
}

.trend-svg text {
    fill: #667085;
    font-size: 13px;
    font-weight: 600;
}

.trend-svg .grid-line {
    stroke: #e6ebf3;
    stroke-dasharray: 4 6;
    vector-effect: non-scaling-stroke;
}

.chart-box .axis-label {
    fill: #667085;
    font-size: 13px;
    font-weight: 600;
}

.chart-box .chart-tooltip {
    opacity: 0;
    transition: opacity .12s ease;
    pointer-events: none;
    filter: drop-shadow(0 12px 22px rgba(15, 23, 42, .16));
}

.chart-box .chart-point:hover .chart-tooltip,
.chart-box .chart-point:focus .chart-tooltip {
    opacity: 1;
}

.visitor-bars {
    height: 240px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 54px;
    padding: 24px 20px 18px;
}

.visitor-bars div {
    width: 58px;
    height: 190px;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.visitor-bars i {
    width: 100%;
    min-height: 8px;
    border-radius: 12px;
    display: block;
    background: #0a84ff;
}

.visitor-bars .old i {
    background: #ff7a1a;
}

.visitor-bars b {
    position: absolute;
    bottom: calc(100% + 8px);
}

.visitor-bars span {
    position: absolute;
    bottom: -24px;
    color: var(--muted);
    white-space: nowrap;
}

.visitor-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.visitor-card {
    background: #f8fbff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px;
}

.visitor-card.old {
    background: #fff8f0;
}

.visitor-card strong {
    display: block;
    font-size: 24px;
    margin: 8px 0 4px;
}

.visitor-card b {
    color: #2563eb;
}

.list-grid,
.insight-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.insight-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr);
}

.rank-list {
    display: grid;
    gap: 6px;
}

.rank-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-height: 33px;
    border-bottom: 1px dashed #e8edf5;
}

.rank-row span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #475467;
}

.region-layout {
    display: grid;
    grid-template-columns: minmax(360px, 1fr) minmax(190px, 260px);
    gap: 18px;
    align-items: stretch;
    margin-top: 14px;
    min-height: 480px;
}

.region-map {
    position: relative;
    min-height: 480px;
    border-radius: 12px;
    overflow: hidden;
    background:
        radial-gradient(circle at 36% 42%, rgba(14, 165, 233, .16), transparent 30%),
        linear-gradient(145deg, #fbfdff, #f8fbff);
}

.region-chart {
    position: absolute;
    inset: 1% 3% 3% 1%;
    width: auto;
    height: auto;
}

.region-rank {
    display: grid;
    gap: 7px;
    align-content: start;
    padding-top: 2px;
}

.region-rank-row {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
}

.region-rank-row:hover {
    background: #f8fbff;
}

.rank-no {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    color: #0369a1;
    background: #e0f2fe;
    font-size: 12px;
    font-weight: 800;
}

.device-layout {
    display: grid;
    gap: 16px;
    margin-top: 14px;
}

.device-donut-wrap {
    display: grid;
    place-items: center;
    min-height: 260px;
}

.device-donut {
    width: min(280px, 100%);
    height: auto;
    overflow: visible;
}

.device-slice {
    cursor: pointer;
    transition: opacity .18s ease, transform .18s ease;
    transform-origin: 150px 150px;
}

.device-slice:hover {
    opacity: .82;
    transform: scale(1.018);
}

.device-center {
    fill: #f8fbff;
    stroke: #e0f2fe;
    stroke-width: 3;
    filter: drop-shadow(0 8px 18px rgba(15, 23, 42, .10));
}

.device-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.device-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    background: linear-gradient(180deg, #f8fbff, #fff);
    cursor: pointer;
}

.device-card:hover {
    border-color: #bfdbfe;
    box-shadow: 0 10px 22px rgba(15, 23, 42, .06);
}

.device-cards .metric-main {
    display: block;
    font-size: 22px;
    margin: 6px 0;
    font-weight: 900;
}

.device-cards .metric,
.device-cards .metric-sub {
    color: var(--muted);
}

.empty-state {
    min-height: 52px;
    display: grid;
    place-items: center;
    color: var(--muted);
    text-align: center;
}

.visit-list {
    display: grid;
    gap: 10px;
    max-height: 320px;
    overflow: auto;
}

.visit-item {
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.visit-item strong {
    display: block;
    margin-bottom: 4px;
}

.visit-item span {
    color: var(--muted);
    font-size: 12px;
}

.split {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 12px;
}

.page-list {
    display: grid;
    gap: 8px;
}

.page-search {
    margin: 0 0 10px;
    min-height: 34px;
    font-size: 13px;
}

.page-item {
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

.page-item.active {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.page-item strong {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
}

.page-item span {
    color: var(--muted);
    font-size: 11px;
}

.page-item small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.editor-grid {
    display: grid;
    grid-template-columns: minmax(390px, 430px) minmax(0, 1fr);
    justify-content: stretch;
    gap: 18px;
    align-items: start;
}

.editor-form {
    order: 2;
    position: sticky;
    top: 96px;
    width: 100%;
    max-height: calc(100vh - 112px);
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    padding: 14px;
}

.editor-panel {
    padding: 0;
    overflow: visible;
}

.page-workbar {
    position: sticky;
    top: 0;
    z-index: 25;
    display: grid;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(12px);
    border-radius: 16px 16px 0 0;
}

.workbar-main,
.workbar-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.workbar-main .primary,
.workbar-main .ghost,
.workbar-main .danger,
.workbar-tools .ghost,
.workbar-tools .upload-btn {
    width: auto;
    min-height: 34px;
    padding: 0 12px;
}

.canvas-stage {
    order: 1;
    min-height: 820px;
    display: flex;
    justify-content: flex-end;
    padding: 14px 0 28px;
}

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

.property-head h2 {
    margin: 0 0 4px;
    font-size: 16px;
}

.property-head p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.form-row {
    display: grid;
    gap: 12px;
    margin-bottom: 12px;
}

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

.form-row.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-row.four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

details {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    padding: 12px;
    margin: 12px 0;
}

summary {
    cursor: pointer;
    margin-bottom: 12px;
}

.share-config-panel {
    background: #fbfdff;
}

.share-config-panel textarea {
    height: auto;
    min-height: 104px;
    padding-top: 9px;
    padding-bottom: 9px;
    line-height: 1.55;
    resize: vertical;
}

.share-lines-field {
    margin-top: 8px;
}

.upload-line input {
    flex: 1 1 240px;
}

.field-with-upload {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 8px;
    border-radius: 12px;
    transition: outline-color .16s ease, background .16s ease;
}

.field-with-upload label {
    margin: 0;
}

.field-with-upload.wide,
.wide-field {
    grid-column: 1 / -1;
}

.field-with-upload.dragover,
.field-with-upload.uploading {
    outline: 2px dashed #8ec5ff;
    outline-offset: 3px;
    background: #eff6ff;
}

.upload-dropzone {
    display: grid;
    place-items: center;
    gap: 6px;
    min-height: 138px;
    margin-top: 12px;
    padding: 18px;
    border: 1.5px dashed #93c5fd;
    border-radius: 14px;
    background: #f8fbff;
    color: #2563eb;
    text-align: center;
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.upload-dropzone strong {
    color: #0f172a;
    font-size: 15px;
}

.upload-dropzone span {
    color: var(--muted);
    font-size: 12px;
}

.upload-dropzone.dragover {
    border-color: var(--accent);
    background: #eff6ff;
    transform: translateY(-1px);
}

.image-list,
.element-list {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.image-row,
.element-row {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8fafc;
    padding: 10px;
}

.image-row {
    display: grid;
    grid-template-columns: 28px 72px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.image-row.dragging {
    opacity: .48;
}

.drag-handle {
    width: 28px;
    height: 72px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: #64748b;
    cursor: grab;
    user-select: none;
}

.drag-handle:active {
    cursor: grabbing;
}

.drag-handle::before {
    content: "↕";
    font-weight: 900;
}

.image-row img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    background: #fff;
}

.image-row code {
    display: block;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.element-row.active {
    border-color: var(--accent);
    background: #eff6ff;
    box-shadow: 0 10px 24px rgba(10, 132, 255, .10);
}

.row-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.element-row-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.element-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.form-upload-field {
    display: grid;
    gap: 7px;
}

.element-fields .wide {
    grid-column: 1 / -1;
}

.element-fields .span-4 {
    grid-column: 1 / -1;
}

.element-fields textarea {
    min-height: 82px;
    resize: vertical;
    line-height: 1.55;
}

.element-fields textarea[data-style-key="rows"] {
    min-height: 180px;
}

.preview-wrap {
    position: sticky;
    top: 96px;
    width: 414px;
    max-width: 100%;
    justify-self: start;
    border-radius: 20px;
    border: 1px solid #d7deea;
    background: #101828;
    padding: 12px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .18);
    order: 1;
}

.preview-head {
    height: 34px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.visual-editor {
    width: min(390px, 100%);
    height: 840px;
    min-height: 760px;
    max-height: calc(100vh - 120px);
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: 14px;
    background: #fff;
    overscroll-behavior: contain;
}

.visual-canvas-frame {
    width: 100%;
    position: relative;
}

.visual-canvas {
    width: var(--editor-page-width, 750px);
    max-width: none;
    margin: 0;
    transform: scale(var(--visual-scale, 1));
    transform-origin: top left;
}

.visual-top-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    width: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 5%;
    box-shadow: 0 1px 0 rgba(15, 23, 42, .10);
}

.visual-top-nav img {
    width: 34%;
    max-width: none;
    max-height: 70%;
    object-fit: contain;
    display: block;
}

.visual-nav-title {
    color: #fff;
    font-weight: 800;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.visual-nav-action {
    min-height: 32px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-family: inherit;
    line-height: 1;
    white-space: nowrap;
}

.visual-share-layer {
    position: absolute;
    z-index: 5;
    transform: translate(-50%, -50%);
    pointer-events: none;
    outline: 1px dashed rgba(14, 165, 233, .42);
}

.visual-share-selected {
    display: grid;
    place-items: center;
    color: #0f172a;
    font-weight: 800;
    font-size: 18px;
    background: rgba(255, 255, 255, .16);
}

.visual-share-selected img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.visual-share-progress {
    display: grid;
    align-content: center;
    gap: 4px;
    padding: 6px;
    border-radius: 8px;
    background: rgba(15, 23, 42, .12);
}

.visual-share-track {
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--share-progress-bg, #352114);
}

.visual-share-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--share-progress-bar, #ff315f);
}

.visual-share-progress strong {
    color: var(--share-progress-text, #fff);
    font-size: 12px;
    line-height: 1;
    text-align: center;
}

.visual-slice {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #fff;
}

.alignment-guide {
    position: absolute;
    z-index: 12;
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s ease;
}

.alignment-guide.show {
    opacity: 1;
}

.alignment-guide.vertical {
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: #ff2d2d;
}

.alignment-guide.horizontal {
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: #ff2d2d;
}

.visual-slice > img {
    width: 100%;
    display: block;
    pointer-events: none;
    user-select: none;
}

.visual-slice.ratio-ready > img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--visual-image-height, 100%);
    object-fit: fill;
}

.visual-bg-crop-handle {
    position: absolute;
    left: 50%;
    bottom: 0;
    z-index: 18;
    width: 96px;
    height: 24px;
    transform: translateX(-50%);
    cursor: ns-resize;
    touch-action: none;
    display: grid;
    place-items: center;
    opacity: .82;
}

.visual-bg-crop-handle::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    border-radius: 999px;
    background: rgba(14, 165, 233, .85);
    transform: translateY(-50%);
}

.visual-bg-crop-handle > span {
    position: relative;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 2px solid #fff;
    background: #0ea5e9;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .25);
}

.visual-bg-crop-handle > span::before,
.visual-bg-crop-handle > span::after {
    content: "";
    position: absolute;
    left: 50%;
    width: 8px;
    height: 8px;
    border-left: 2px solid #fff;
    border-top: 2px solid #fff;
}

.visual-bg-crop-handle > span::before {
    top: 3px;
    transform: translateX(-50%) rotate(45deg);
}

.visual-bg-crop-handle > span::after {
    bottom: 3px;
    transform: translateX(-50%) rotate(225deg);
}

.visual-bg-crop-handle::after {
    content: attr(data-crop-label);
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    min-width: max-content;
    padding: 3px 7px;
    border-radius: 6px;
    background: rgba(15, 23, 42, .82);
    color: #fff;
    font-size: 11px;
    line-height: 1.2;
    opacity: 0;
    pointer-events: none;
}

.visual-bg-crop-handle:hover,
.visual-bg-crop-handle.active,
.visual-slice.is-cropping .visual-bg-crop-handle {
    opacity: 1;
}

.visual-bg-crop-handle:hover::after,
.visual-bg-crop-handle.active::after,
.visual-slice.is-cropping .visual-bg-crop-handle::after {
    opacity: 1;
}

.visual-element {
    position: absolute;
    z-index: 6;
    transform: translate(-50%, -50%);
    display: block;
    border: 0;
    outline: 1px dashed rgba(15, 23, 42, .22);
    outline-offset: 0;
    background: transparent;
    background-color: transparent !important;
    cursor: move;
    touch-action: none;
    user-select: none;
}

.visual-element.active {
    outline-color: rgba(15, 23, 42, .24);
    box-shadow: none;
    background: transparent !important;
}

.visual-element.dragover {
    outline-color: #22c55e;
    background: rgba(34, 197, 94, .08) !important;
}

.visual-element.button {
    border-radius: 0;
}

.visual-element.text,
.visual-element.text-group {
    border-radius: 0;
    color: var(--text-color);
    transform: translateX(-50%);
    height: auto !important;
    min-height: 0;
}

.visual-element.text .resize-handle[data-handle="nw"],
.visual-element.text .resize-handle[data-handle="n"],
.visual-element.text .resize-handle[data-handle="ne"],
.visual-element.text .resize-handle[data-handle="s"],
.visual-element.text .resize-handle[data-handle="sw"],
.visual-element.text .resize-handle[data-handle="se"],
.visual-element.text-group .resize-handle[data-handle="nw"],
.visual-element.text-group .resize-handle[data-handle="n"],
.visual-element.text-group .resize-handle[data-handle="ne"],
.visual-element.text-group .resize-handle[data-handle="s"],
.visual-element.text-group .resize-handle[data-handle="sw"],
.visual-element.text-group .resize-handle[data-handle="se"] {
    display: none;
}

.visual-element-content {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    pointer-events: none;
}

.visual-button-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.visual-button-label {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: grid;
    place-items: center;
    border-radius: 999px;
    padding: 0 14px;
    background: #ff2c55;
    color: #fff;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 8px 18px rgba(255, 44, 85, .28);
    pointer-events: none;
}

.visual-text,
.visual-text-group {
    width: 100%;
    height: auto;
    color: var(--text-color);
    font-family: var(--text-font);
    font-size: var(--text-size);
    font-weight: var(--text-weight);
    line-height: var(--text-line);
    letter-spacing: var(--text-letter);
    text-align: var(--text-align);
    -webkit-text-stroke: var(--stroke-width) var(--stroke-color);
    paint-order: stroke fill;
    text-shadow: var(--text-bold-shadow, none);
    user-select: none;
    pointer-events: none;
    overflow: visible;
    font-synthesis: weight;
    text-rendering: geometricPrecision;
}

.visual-text {
    white-space: pre;
    overflow: visible;
}

.visual-text .highlight,
.visual-text-group .highlight {
    color: var(--text-highlight);
}

.visual-text-line {
    display: grid;
    grid-template-columns: var(--bullet-size) minmax(0, 1fr);
    column-gap: var(--bullet-gap);
    align-items: start;
}

.visual-text-line + .visual-text-line {
    margin-top: .18em;
}

.text-bullet {
    width: var(--bullet-size);
    height: var(--bullet-size);
    display: inline-block;
    align-self: start;
    margin-top: calc((1em * var(--text-line) - var(--bullet-size)) / 2);
    border-color: var(--bullet-color);
    background: var(--bullet-color);
    transform-origin: center;
}

.text-bullet.square {
    border: max(2px, calc(var(--bullet-size) * .18)) solid var(--bullet-color);
    background: transparent;
}

.text-bullet.dot {
    border-radius: 999px;
}

.text-bullet.image {
    border: 0;
    background-color: transparent;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.text-bullet-spacer {
    width: var(--bullet-size);
    height: var(--bullet-size);
    display: inline-block;
}

.visual-text-line .line-content,
.visual-text-line .line-content span {
    font-family: inherit;
    line-height: inherit;
    vertical-align: baseline;
}

.visual-text-line .line-content {
    min-width: 0;
}

.text-punct.colon {
    display: inline;
    position: static;
    width: auto;
    height: auto;
    font-family: inherit;
    font-size: 1em;
    line-height: inherit;
    vertical-align: baseline;
    color: inherit;
    overflow: visible;
    text-indent: 0;
    white-space: normal;
}

.text-punct.colon::before,
.text-punct.colon::after {
    content: none;
    display: none;
}

.visual-overlay-img {
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
    user-select: none;
}

.visual-image-empty {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    border: 1px dashed rgba(148, 163, 184, .8);
    color: #64748b;
    background: rgba(255,255,255,.42);
    font-size: 12px;
}

.visual-qr {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #fff;
    padding: 5px;
    pointer-events: none;
}

.visual-qr > img:not(.visual-qr-logo),
.visual-qr > canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.visual-qr-logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    background: #fff;
    border: 2px solid rgba(255, 255, 255, .9);
    pointer-events: none;
}

.resize-handle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #555;
    border: 1px solid #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .28);
    touch-action: none;
    opacity: 0;
    pointer-events: none;
}

.visual-element.active .resize-handle {
    opacity: 1;
    pointer-events: auto;
}

.resize-handle[data-handle="nw"] { left: -5px; top: -5px; cursor: nwse-resize; }
.resize-handle[data-handle="n"] { left: 50%; top: -5px; transform: translateX(-50%); cursor: ns-resize; }
.resize-handle[data-handle="ne"] { right: -5px; top: -5px; cursor: nesw-resize; }
.resize-handle[data-handle="e"] { right: -5px; top: 50%; transform: translateY(-50%); cursor: ew-resize; }
.resize-handle[data-handle="se"] { right: -5px; bottom: -5px; cursor: nwse-resize; }
.resize-handle[data-handle="s"] { left: 50%; bottom: -5px; transform: translateX(-50%); cursor: ns-resize; }
.resize-handle[data-handle="sw"] { left: -5px; bottom: -5px; cursor: nesw-resize; }
.resize-handle[data-handle="w"] { left: -5px; top: 50%; transform: translateY(-50%); cursor: ew-resize; }

.preview-wrap iframe {
    width: 100%;
    height: 0;
    border: 0;
    display: none;
}

.template-panel {
    max-width: 100%;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.template-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    padding: 14px;
}

.template-card h3 {
    margin: 0 0 10px;
}

.template-default-rows {
    display: none;
}

.template-card textarea {
    width: 100%;
    min-height: 170px;
    margin-bottom: 12px;
    line-height: 1.55;
    resize: vertical;
}

.template-presets {
    margin: 8px 0 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f8fbff;
}

.template-preset-title,
.template-preset-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.template-preset-list {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.template-preset-select-menu {
    margin-top: 10px;
}

.template-preset-item {
    display: none;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.template-preset-item.active {
    display: block;
}

.template-preset-item input {
    flex: 1;
}

.template-preset-item textarea {
    min-height: 150px;
    margin: 8px 0 0;
}

.upload-admin-grid {
    display: grid;
    grid-template-columns: minmax(360px, .95fr) minmax(520px, 1.35fr);
    gap: 14px;
    align-items: start;
}

.upload-admin-grid.cookie-only {
    grid-template-columns: minmax(360px, 880px);
}

.upload-record-layout {
    max-width: 1120px;
}

.compact-primary {
    width: auto;
}

.upload-cookie-list {
    display: grid;
    gap: 10px;
}

.upload-login-helper {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    padding: 14px;
    margin: 12px 0 14px;
}

.upload-login-helper-head,
.upload-login-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.upload-login-helper-head h3 {
    margin: 0 0 4px;
    font-size: 18px;
}

.upload-login-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.upload-login-actions {
    justify-content: flex-start;
    margin-top: 12px;
}

.upload-login-status {
    margin-top: 10px;
    padding: 9px 10px;
    border-radius: 10px;
    background: #f6f8fb;
}

.upload-cookie-row {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f8fbff;
    padding: 12px;
}

.upload-cookie-head,
.upload-cookie-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.upload-cookie-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 116px;
    gap: 10px;
    margin-top: 10px;
}

.upload-cookie-fields .wide {
    grid-column: 1 / -1;
}

.upload-cookie-fields textarea {
    min-height: 76px;
    line-height: 1.45;
    resize: vertical;
}

.cookie-state {
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    background: #e8f2ff;
    color: #175cd3;
    font-size: 12px;
    font-weight: 800;
}

.cookie-state.warning {
    background: #fff7e6;
    color: #b54708;
}

.cookie-state.expired,
.cookie-state.disabled {
    background: #fff1f0;
    color: #b42318;
}

.cookie-state.empty {
    background: #f1f5f9;
    color: #667085;
}

.upload-cookie-meta {
    justify-content: flex-start;
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
}

.bad-text {
    color: var(--bad);
}

.compact-filters {
    align-items: flex-end;
    margin-top: -2px;
}

.upload-record-list {
    display: grid;
    gap: 8px;
}

.upload-record-row {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.upload-record-row img {
    width: 58px;
    height: 58px;
    object-fit: cover;
    border-radius: 8px;
    background: #f1f5f9;
}

.upload-record-main {
    min-width: 0;
}

.upload-record-main strong,
.upload-record-main code,
.upload-record-main span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-record-main strong {
    margin-bottom: 3px;
}

.upload-record-main code {
    color: #d99000;
    font-size: 12px;
}

.upload-record-main span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.danger-mini {
    color: #b42318;
    background: #fff1f0;
    border-color: #ffd8d6;
}

.editor-grid:has(.share-editor-pane:not(.hidden)) {
    grid-template-columns: minmax(360px, 430px) minmax(360px, 1fr) minmax(300px, 360px);
}

.share-editor-pane {
    order: 3;
    position: sticky;
    top: 96px;
    max-height: calc(100vh - 112px);
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    padding: 14px;
}

.share-editor-head h2 {
    margin: 0 0 4px;
    font-size: 16px;
}

.share-editor-head p,
.share-side-title span {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.share-side-editor {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.share-side-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.share-module-card {
    grid-column: 1 / -1;
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8fbff;
}

.share-module-card summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    cursor: pointer;
    list-style: none;
}

.share-module-card summary::-webkit-details-marker {
    display: none;
}

.share-module-card summary::after {
    content: "展开";
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.share-module-card[open] summary::after {
    content: "收起";
}

.share-module-card h3 {
    margin: 0;
    font-size: 14px;
}

.share-module-card .form-row {
    margin-bottom: 0;
}

.share-clear-field {
    position: relative;
}

.share-clear-field input {
    padding-right: 58px;
}

.share-clear-field .mini {
    position: absolute;
    right: 7px;
    bottom: 7px;
    min-height: 26px;
    padding: 0 8px;
}

.form-row.five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.share-fields .field-with-upload {
    grid-column: 1 / -1;
}

.share-list-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.share-mini-list {
    display: grid;
    gap: 10px;
}

.share-mini-item {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.share-mini-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.share-visual-surface {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f8fafc;
}

.poster-surface.has-poster-image {
    aspect-ratio: auto;
}

.choice-surface {
    aspect-ratio: 1 / .78;
}

.share-visual-surface > img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    display: block;
    pointer-events: none;
}

.poster-surface.has-poster-image > img {
    height: auto;
    object-fit: contain;
}

.share-center-guide {
    position: absolute;
    z-index: 2;
    pointer-events: none;
    background: rgba(14, 165, 233, .36);
}

.share-center-guide.vertical {
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
}

.share-center-guide.horizontal {
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
}

.share-center-guide::after {
    content: "";
    position: absolute;
    background: rgba(14, 165, 233, .80);
}

.share-center-guide.vertical::after {
    left: -3px;
    top: 50%;
    width: 7px;
    height: 1px;
}

.share-center-guide.horizontal::after {
    left: 50%;
    top: -3px;
    width: 1px;
    height: 7px;
}

.share-poster-default-bg,
.share-choice-default-bg {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    gap: 8px;
    padding: 18px;
    background: #fff;
    color: #0f172a;
    text-align: center;
}

.share-visual-item {
    position: absolute;
    transform: translate(-50%, -50%);
    display: block;
    border: 1px solid rgba(56, 189, 248, .95);
    background: transparent;
    color: #0369a1;
    font-size: 12px;
    font-weight: 800;
    cursor: move;
    touch-action: none;
    user-select: none;
}

.share-visual-item.active {
    border-color: #38bdf8;
    box-shadow: none;
}

.share-resize-handle {
    position: absolute;
    z-index: 4;
    width: 8px;
    height: 8px;
    min-width: 0;
    max-width: none;
    background: #555;
    border: 1px solid #fff;
    border-radius: 0 !important;
    padding: 0 !important;
    color: transparent;
    font-size: 0;
    line-height: 0;
    overflow: visible;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .28);
    opacity: 0;
    pointer-events: none;
    touch-action: none;
}

.share-visual-item:hover .share-resize-handle,
.share-visual-item.active .share-resize-handle {
    opacity: 1;
    pointer-events: auto;
}

.share-resize-handle[data-handle="nw"] { left: 0; top: 0; transform: translate(-50%, -50%); cursor: nwse-resize; }
.share-resize-handle[data-handle="n"] { left: 50%; top: 0; transform: translate(-50%, -50%); cursor: ns-resize; }
.share-resize-handle[data-handle="ne"] { left: 100%; top: 0; transform: translate(-50%, -50%); cursor: nesw-resize; }
.share-resize-handle[data-handle="e"] { left: 100%; top: 50%; transform: translate(-50%, -50%); cursor: ew-resize; }
.share-resize-handle[data-handle="se"] { left: 100%; top: 100%; transform: translate(-50%, -50%); cursor: nwse-resize; }
.share-resize-handle[data-handle="s"] { left: 50%; top: 100%; transform: translate(-50%, -50%); cursor: ns-resize; }
.share-resize-handle[data-handle="sw"] { left: 0; top: 100%; transform: translate(-50%, -50%); cursor: nesw-resize; }
.share-resize-handle[data-handle="w"] { left: 0; top: 50%; transform: translate(-50%, -50%); cursor: ew-resize; }

.share-visual-item > span:not(.share-resize-handle):not(.share-irregular-point),
.share-visual-label {
    position: absolute;
    left: 4px;
    top: 4px;
    z-index: 1;
    max-width: calc(100% - 8px);
    padding: 2px 5px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .78);
    color: #0369a1;
    font-size: 11px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
}

.share-visual-item.qr {
    background: transparent;
    color: #111827;
}

.share-visual-item.close {
    display: grid;
    place-items: center;
    border-radius: 999px;
    aspect-ratio: 1 / 1;
    height: auto !important;
    background: rgba(15, 23, 42, .72);
    color: #fff;
    font-size: 18px;
}

.share-visual-item.reward img,
.share-visual-item.choice-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    position: relative;
    z-index: 1;
    pointer-events: none;
}

.share-visual-item.qr::after {
    content: "二维码";
    position: absolute;
    left: 4px;
    top: 4px;
    z-index: 1;
    padding: 2px 5px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .78);
    color: #111827;
    font-size: 11px;
    line-height: 1.2;
    pointer-events: none;
}

.share-choice-title-preview {
    display: grid;
    place-items: center;
    min-height: 34px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: #0f172a;
    font-weight: 800;
}

.share-visual-poly {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.share-visual-poly polygon {
    fill: rgba(14, 165, 233, .08);
    stroke: #38bdf8;
    stroke-width: 1.5;
    vector-effect: non-scaling-stroke;
}

.share-visual-irregular {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    touch-action: none;
    user-select: none;
}

.share-visual-irregular .share-visual-poly polygon {
    cursor: move;
    pointer-events: visiblePainted;
}

.share-visual-item.irregular {
    border: 0;
    background: transparent;
}

.share-visual-item.irregular.active,
.share-visual-irregular.active {
    border-color: transparent;
}

.share-irregular-point {
    position: absolute;
    z-index: 3;
    width: 8px;
    height: 8px;
    min-width: 0;
    max-width: none;
    border: 1px solid #fff;
    border-radius: 0 !important;
    background: #555;
    padding: 0 !important;
    color: transparent;
    font-size: 0;
    line-height: 0;
    overflow: visible;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .28);
    transform: translate(-50%, -50%);
    cursor: grab;
    touch-action: none;
    opacity: 0;
    pointer-events: none;
}

.share-visual-item.irregular.active .share-irregular-point,
.share-visual-item.irregular:hover .share-irregular-point,
.share-visual-irregular.active .share-irregular-point,
.share-visual-irregular:hover .share-irregular-point {
    opacity: 1;
    pointer-events: auto;
}

.share-irregular-point:active {
    cursor: grabbing;
}

.share-mini-item.is-focused,
.share-focus-target {
    outline: 2px solid #38bdf8;
    outline-offset: 2px;
    background: #eff6ff;
}

.share-mode-panel {
    display: grid;
    gap: 10px;
}

.share-component-part.share-part-button {
    border-radius: 999px;
}

.share-component-part .visual-element-content > span {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    border-radius: inherit;
    background: #ff2c55;
    color: #fff;
    font-weight: 800;
}

.visual-share-progress-inner {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    border-radius: 999px;
    background: var(--share-progress-bg, #35180f);
    box-shadow: inset 0 0 0 1px var(--share-progress-border, #ffe365);
}

.visual-share-progress-inner i {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--share-progress-bar, #ff2c55);
}

.visual-share-progress-inner strong {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--share-progress-text, #fff);
    font-size: 12px;
    line-height: 1;
}

.visual-element.visual-pulse .visual-element-content,
.share-component-part.visual-pulse .visual-element-content {
    animation: adminSharePulse 1.45s ease-in-out infinite;
}

@keyframes adminSharePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

@media (min-width: 1500px) {
    .element-fields {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .element-fields .wide {
        grid-column: span 2;
    }

    .element-fields .span-4 {
        grid-column: 1 / -1;
    }

    .element-fields textarea[data-style-key="rows"] {
        min-height: 220px;
    }
}

.table-wrap {
    overflow: auto;
}

.filters {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.filters .primary,
.filters .ghost {
    width: auto;
    min-height: 38px;
}

.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.pager-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pager-jump {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: var(--muted);
}

.pager-jump input {
    width: 76px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

th, td {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 12px;
}

td {
    background: rgba(255, 255, 255, .62);
}

.status {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 12px;
    background: #eef4ff;
    color: #175cd3;
}

.status.draft {
    background: #f2f4f7;
    color: #667085;
}

@media (max-width: 1180px) {
    .app { grid-template-columns: 190px minmax(0, 1fr); }
    .overview-hero,
    .overview-grid,
    .list-grid,
    .insight-grid,
    .region-layout,
    .device-layout,
    .split,
    .editor-grid,
    .template-grid,
    .upload-admin-grid,
    .upload-admin-grid.cookie-only { grid-template-columns: 1fr; }
    .preview-wrap,
    .editor-form,
    .share-editor-pane { position: static; max-height: none; }
    .overview-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-row.four,
    .form-row.five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .upload-login-fields { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .app { display: block; }
    .sidebar { position: static; height: auto; }
    .logout { position: static; width: 100%; }
    .main { padding: 14px; }
    .topbar { align-items: flex-start; flex-direction: column; }
    .metric-grid,
    .overview-metrics,
    .visitor-cards,
    .device-cards,
    .form-row.two,
    .form-row.three,
    .form-row.four,
    .form-row.five,
    .element-fields { grid-template-columns: 1fr; }
    .element-fields .wide { grid-column: span 1; }
}
