:root {
    --paper: #fff5df;
    --red-deep: #8f0306;
    --red: #c00000;
    --red-hot: #ee0000;
    --gold: #faa242;
    --ink: #2f0b07;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
    color: #24100c;
    background:
        radial-gradient(circle at 15% 8%, rgba(250, 162, 66, .16), transparent 26rem),
        linear-gradient(135deg, #fff8ea 0%, #f3e4cc 48%, #ead4ba 100%);
}

.app-shell {
    width: min(1720px, calc(100vw - 32px));
    margin: 0 auto;
    padding: 24px 0;
    display: grid;
    grid-template-columns: 400px minmax(720px, 1fr);
    gap: 22px;
    align-items: start;
}

.panel {
    background: rgba(255, 252, 245, .92);
    border: 1px solid rgba(153, 35, 12, .16);
    border-radius: 8px;
    box-shadow: 0 18px 45px rgba(92, 20, 6, .14);
}

.form-panel {
    position: sticky;
    top: 22px;
    padding: 22px;
}

.brand-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(192, 0, 0, .12);
}

.brand-head span {
    font-size: 22px;
    font-weight: 900;
    color: var(--red-deep);
}

.brand-head strong {
    font-size: 13px;
    color: #9b5b1e;
    letter-spacing: .08em;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 13px;
}

label {
    display: grid;
    gap: 7px;
    font-size: 13px;
    font-weight: 800;
    color: #6c210d;
}

.span-2 {
    grid-column: span 2;
}

input, select, button {
    font: inherit;
}

input, select {
    width: 100%;
    min-height: 40px;
    border: 1px solid rgba(140, 31, 10, .22);
    border-radius: 6px;
    padding: 9px 10px;
    font: inherit;
    font-weight: 600;
    color: #32110b;
    background: #fffdf8;
    outline: none;
}

input:focus, select:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(192, 0, 0, .12);
}

input[type="file"] {
    padding: 8px;
    background: #fff8ec;
}

.image-tools {
    display: grid;
    grid-template-columns: 1fr 120px 86px;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid rgba(140, 31, 10, .14);
    border-radius: 6px;
    background: #fffaf0;
}

.image-tools span {
    font-size: 12px;
    color: #8c4318;
    font-weight: 800;
}

.image-tools input[type="range"] {
    min-height: auto;
    padding: 0;
}

.image-tools button {
    min-height: 30px;
    border: 1px solid rgba(140, 31, 10, .22);
    border-radius: 6px;
    background: #fffdf8;
    color: #8f0306;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

.export-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 18px;
}

.copy-btn,
.export-btn {
    width: 100%;
    min-height: 46px;
    border: 0;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 900;
    color: #fff9e8;
    background: linear-gradient(135deg, #980405, #d01e22 64%, #ee0000);
    box-shadow: 0 12px 22px rgba(192, 0, 0, .22);
    cursor: pointer;
}

.copy-btn {
    border: 1px solid rgba(152, 4, 5, .28);
    border-radius: 6px;
    min-height: 46px;
    font-size: 16px;
    font-weight: 900;
    color: #980405;
    background: #fff8ec;
    cursor: pointer;
}

.copy-btn:active,
.export-btn:active {
    transform: translateY(1px);
}

.preview-wrap {
    overflow: hidden;
    padding-bottom: 12px;
}

.poster {
    position: relative;
    width: 1280px;
    height: 720px;
    transform-origin: top left;
    overflow: hidden;
    background: #ba0000;
    box-shadow: 0 22px 56px rgba(87, 18, 7, .25);
}

.template-bg {
    position: absolute;
    inset: 0;
    width: 1280px;
    height: 720px;
    object-fit: fill;
    z-index: 0;
    user-select: none;
    pointer-events: none;
}

.ppt-shot,
.ppt-text {
    position: absolute;
}


.score-stamp {
    position: absolute;
    left: 448.3px;
    top: 240.2px;
    width: 350.8px;
    height: 255.9px;
    z-index: 4;
    transform-origin: center center;
    cursor: grab;
    touch-action: none;
}

.score-stamp.dragging-stamp {
    cursor: grabbing;
}

.center-badge-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    user-select: none;
}

.ppt-shot {
    background: #fff;
    overflow: hidden;
    display: grid;
    place-items: center;
    z-index: 1;
    cursor: grab;
    touch-action: none;
}

.ppt-shot.active-shot {
    outline: none;
}

.ppt-shot.dragging {
    cursor: grabbing;
}

.shot-left {
    left: 216px;
    top: 229.9px;
    width: 372.2px;
    height: 286.9px;
}

.shot-right {
    left: 703.5px;
    top: 230.5px;
    width: 363.9px;
    height: 280.6px;
}

.ppt-shot img {
    display: none;
    position: absolute;
    left: 50%;
    top: 50%;
    max-width: none;
    max-height: none;
    width: auto;
    height: auto;
    background: #fff;
    user-select: none;
    pointer-events: none;
    transform-origin: center center;
}

.ppt-shot.has-image img {
    display: block;
}

.placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 2px dashed rgba(152, 4, 5, .28);
    color: #9c4b1a;
    font-size: 22px;
    font-weight: 800;
    background: #fffaf0;
}

.ppt-shot.has-image .placeholder {
    display: none;
}

.ppt-text {
    font-family: "Microsoft YaHei", "SimHei", Arial, sans-serif;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    z-index: 3;
}

.poster-title {
    left: 199.3px;
    top: 46.6px;
    width: 881.4px;
    height: 79.9px;
    text-align: center;
    font-size: 60px;
    line-height: 1;
    font-weight: 900;
    color: #faa242;
}

.title-prefix-subject {
    color: #fff;
    font-weight: 900;
}

.title-hit-level {
    color: #faa242;
    font-weight: 900;
}

.label-left,
.label-right {
    height: 34.7px;
    text-align: center;
    font-size: 26px;
    line-height: 32px;
    font-weight: 900;
    color: #980405;
    white-space: nowrap;
    overflow: visible;
}

.label-left {
    left: 286px;
    top: 170.8px;
    width: 238px;
}

.label-right {
    left: 760px;
    top: 165.7px;
    width: 230px;
}

.score-line {
    left: 50%;
    top: 50%;
    width: 380px;
    height: 54px;
    text-align: center;
    font-size: 36px;
    line-height: 54px;
    font-weight: 900;
    color: #d60000;
    transform: translate(-50%, -50%) rotate(-16deg);
    transform-origin: center center;
    pointer-events: none;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .25);
    z-index: 1;
}

.similarity-stamp {
    position: absolute;
    left: 639.9px;
    top: 541px;
    width: 99.6px;
    height: 91.8px;
    display: grid;
    place-items: center;
    align-content: center;
    z-index: 4;
    pointer-events: none;
    color: #fff;
    text-align: center;
}

.similarity-stamp-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: -1;
}

.similarity-percent {
    margin-top: 6px;
    font-size: 30px;
    line-height: 1;
    font-weight: 900;
    color: #fff;
}

.similarity-stamp-label {
    margin-top: 3px;
    font-size: 11px;
    line-height: 1;
    font-style: italic;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    transform: rotate(-10deg);
}

.info {
    height: 27.8px;
    font-size: 18px;
    line-height: 28px;
    font-weight: 800;
    color: #1e100b;
}

.info b {
    color: #d01e22;
}

.paper {
    left: 284px;
    top: 561.1px;
    width: 310px;
}

.type {
    left: 284px;
    top: 586.3px;
    width: 310px;
}

.scene {
    left: 770px;
    top: 561.1px;
    width: 305px;
}

.points {
    left: 770px;
    top: 586.3px;
    width: 305px;
}

.info span {
    color: #1e100b;
}

@media (max-width: 1180px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .form-panel {
        position: static;
    }
}

@media (max-width: 760px) {
    .app-shell {
        width: calc(100vw - 20px);
        padding: 10px 0;
    }

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

    .span-2 {
        grid-column: span 1;
    }
}
