:root {
    color-scheme: light;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #322a25;
    background: #faf7f2;
    --accent: #9d452b;
    --accent-hover: #843720;
    --muted: #74665e;
    --line: #e9ded5;
    --surface: #fffdfb;
    --tint: #fcf0e9;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(ellipse at 80% 0, #fae9dd 0, transparent 45%), #faf7f2;
    padding: clamp(26px, 6vw, 82px) clamp(16px, 4vw, 38px);
}

main { max-width: 820px; margin: 0 auto; }

h2, p { margin: 0; }
.tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: #f3ebe4;
    margin-bottom: 18px;
}

button, .button {
    font: inherit;
    font-weight: 650;
    border: 1px solid transparent;
    border-radius: 11px;
    padding: 11px 17px;
    min-height: 44px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tabs button { background: transparent; color: var(--muted); }
.tabs button:hover { background: #f9f4ee; color: var(--accent); }
.tabs button[aria-selected="true"] {
    background: var(--surface);
    border-color: #eadfd7;
    box-shadow: 0 2px 6px #68401c12;
    color: var(--accent);
}

.tabs svg, .file-mark svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.panel, dialog {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 14px 34px #6b442014;
    padding: clamp(21px, 5vw, 38px);
}

dialog { width: min(420px, calc(100% - 32px)); color: inherit; }
dialog:focus-visible { outline-offset: 0; }
dialog::backdrop { background: #322a2566; }
dialog h2 { margin-bottom: 13px; }
.verify-code-row {
    position: relative;
    display: grid;
    place-items: center;
    margin-top: 16px;
    min-height: 53px;
    padding: 10px 49px;
    background: var(--tint);
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--accent);
}

.verify-command {
    font-size: clamp(16px, 4vw, 21px);
    font-weight: 700;
    text-align: center;
    overflow-wrap: anywhere;
    user-select: all;
    -webkit-user-select: all;
}
.copy-verification {
    position: absolute;
    inset-inline-end: 4px;
    width: 44px;
    padding: 0;
    color: var(--accent);
    background: transparent;
}
.copy-verification:hover { background: #f2dfd2; }
.copy-verification svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.renew-verification { margin-top: 14px; }

h2 { font-size: 22px; letter-spacing: .01em; margin-bottom: 25px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.field label { display: block; font-size: 14px; font-weight: 680; margin-bottom: 8px; }

textarea {
    display: block;
    width: 100%;
    min-width: 0;
    background: #fff;
    color: inherit;
    border: 1px solid #ded2c7;
    border-radius: 10px;
    padding: 11px 12px;
    min-height: 67px;
    font: inherit;
    line-height: 1.45;
    resize: vertical;
}

textarea::placeholder { color: #80716a; font-size: 14px; }
textarea:disabled { background: #f8f4f0; }

.drop-zone {
    display: grid;
    justify-items: center;
    gap: 11px;
    text-align: center;
    margin-top: 23px;
    padding: 28px 16px;
    min-height: 172px;
    border: 1.5px dashed #d9bdaa;
    border-radius: 15px;
    background: #fdf7f1;
}

.drop-zone:hover, .drop-zone.is-over { border-color: #a85034; background: var(--tint); }
.drop-zone.has-file { border-color: #9eb58f; background: #f3f7ee; }
fieldset:disabled .drop-zone { background: #faf6f2; }

.file-mark {
    display: grid;
    place-items: center;
    width: 45px;
    height: 45px;
    background: #f6e5d9;
    color: var(--accent);
    border-radius: 14px;
}
.file-mark svg { width: 25px; height: 25px; }
.has-file .file-mark { background: #e3eddc; color: #53734b; }
.drop-zone strong { font-size: 15px; font-weight: 620; }

.actions, .module-result { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-top: 23px; }
.module-result { padding-top: 17px; border-top: 1px solid var(--line); }
.primary { color: #fff; background: var(--accent); }
.primary:hover { background: var(--accent-hover); }
.secondary { color: #5c473b; background: #fffaf6; border-color: #e3d4c9; }
.secondary:hover { background: #f8eee6; }
button:disabled, fieldset:disabled button { opacity: .53; cursor: not-allowed; }
:focus-visible { outline: 3px solid #ae5838; outline-offset: 2px; }

.status { margin-top: 17px; color: #466841; font-size: 14px; line-height: 1.5; }
.status:empty { display: none; }
.status[data-error="true"] { color: #9e352b; }

@media (max-width: 560px) {
    .tabs { margin-bottom: 13px; }
    h2 { margin-bottom: 19px; font-size: 20px; }
    .drop-zone { margin-top: 18px; padding-block: 22px; }
}
