:root {
    color: #17201c;
    background: #f2f5f3;
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    font-synthesis: none;
}

* {
    box-sizing: border-box;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    background:
        linear-gradient(#dce8e1 1px, transparent 1px),
        linear-gradient(90deg, #dce8e1 1px, transparent 1px),
        #f2f5f3;
    background-size: 32px 32px;
}

button,
input {
    font: inherit;
}

button,
.drop-zone {
    -webkit-tap-highlight-color: transparent;
}

.page-shell {
    width: min(760px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0;
}

.topbar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.brand-mark {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    flex: 0 0 46px;
    border-radius: 8px;
    color: #ffffff;
    background: #126b4b;
    font-size: 20px;
    font-weight: 700;
}

h1,
h2,
p {
    margin: 0;
}

h1 {
    font-size: 22px;
    line-height: 1.35;
}

.topbar p,
.section-heading p {
    margin-top: 4px;
    color: #66736d;
    font-size: 14px;
    line-height: 1.6;
}

.upload-workspace {
    padding: 28px;
    border: 1px solid #d6ded9;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 16px 36px rgb(24 54 42 / 8%);
}

.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

h2 {
    font-size: 18px;
    line-height: 1.4;
}

.status-dot {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
    color: #306348;
    font-size: 13px;
}

.status-dot::before {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2ca66f;
    content: "";
}

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

.drop-zone {
    display: grid;
    min-height: 216px;
    padding: 28px;
    place-items: center;
    align-content: center;
    gap: 8px;
    border: 1px dashed #91a79b;
    border-radius: 8px;
    background: #f8faf9;
    cursor: pointer;
    text-align: center;
    transition: border-color 160ms ease, background-color 160ms ease;
}

.drop-zone:hover,
.drop-zone.is-dragging {
    border-color: #126b4b;
    background: #eef7f2;
}

.drop-zone:focus-within {
    outline: 3px solid rgb(18 107 75 / 18%);
    outline-offset: 2px;
}

.upload-symbol {
    display: grid;
    width: 44px;
    height: 44px;
    margin-bottom: 4px;
    place-items: center;
    border: 1px solid #9bb5a8;
    border-radius: 50%;
    color: #126b4b;
    background: #ffffff;
    font-size: 28px;
    line-height: 1;
}

.drop-zone strong {
    font-size: 16px;
    line-height: 1.5;
}

.drop-zone > span:last-child {
    color: #6d7873;
    font-size: 13px;
    line-height: 1.6;
}

.preview-panel {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid #dbe2de;
    border-radius: 8px;
    background: #ffffff;
}

.preview-panel[hidden],
.result-panel[hidden] {
    display: none;
}

.preview-frame {
    width: 88px;
    height: 66px;
    overflow: hidden;
    border-radius: 6px;
    background: #edf1ef;
}

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

.file-details {
    display: grid;
    min-width: 0;
    gap: 5px;
}

.file-details strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-details span,
.result-heading span {
    color: #6d7873;
    font-size: 13px;
}

.primary-button,
.secondary-button {
    min-height: 44px;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    transition: background-color 160ms ease, opacity 160ms ease;
}

.primary-button {
    width: 100%;
    color: #ffffff;
    background: #126b4b;
}

.primary-button:hover:not(:disabled) {
    background: #0c573c;
}

.primary-button:disabled {
    cursor: not-allowed;
    opacity: 0.48;
}

.result-panel {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e6e2;
}

.result-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.url-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.url-row input {
    min-width: 0;
    height: 44px;
    padding: 0 12px;
    border: 1px solid #cfd9d3;
    border-radius: 6px;
    color: #26362e;
    background: #f7f9f8;
}

.secondary-button {
    padding: 0 18px;
    color: #ffffff;
    background: #d7583d;
}

.secondary-button:hover {
    background: #bd452e;
}

.text-link {
    display: inline-block;
    margin-top: 12px;
    color: #126b4b;
    font-size: 14px;
    font-weight: 700;
    text-underline-offset: 3px;
}

.feedback {
    min-height: 22px;
    margin-top: 12px;
    overflow-wrap: anywhere;
    color: #65716b;
    font-size: 14px;
    line-height: 1.55;
}

.feedback.success {
    color: #187047;
}

.feedback.error {
    color: #b53728;
}

@media (max-width: 560px) {
    .page-shell {
        width: min(100% - 20px, 760px);
        padding: 20px 0;
    }

    .upload-workspace {
        padding: 20px 16px;
    }

    .section-heading {
        display: grid;
    }

    .drop-zone {
        min-height: 190px;
        padding: 22px 16px;
    }

    .url-row {
        grid-template-columns: 1fr;
    }

    .secondary-button {
        width: 100%;
    }
}
