:root {
    color-scheme: light;
    --bg: #ffffff;
    --panel: #ffffff;
    --line: #e8e8e8;
    --text: #242424;
    --muted: #707070;
    --accent: #333333;
    --accent-soft: #f4f4f4;
    --error: #a62f28;
    font-family: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 15px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.5; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: wait; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-icon { display: block; width: 46px; height: 46px; }
.brand-wordmark { display: block; width: 144px; height: auto; }
header { margin: 34px 0 28px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.eyebrow { color: var(--accent); font-size: 10px; letter-spacing: .16em; margin-bottom: 12px; }
h1 { font-size: 27px; font-weight: 500; letter-spacing: 0; line-height: 1.4; margin: 0; }
h1 > span, h2 > span { display: block; font-size: 14px; color: var(--muted); font-weight: 400; letter-spacing: 0; margin-top: 7px; }
.panel { border: 1px solid var(--line); background: var(--panel); padding: 30px; border-radius: 4px; }
label, legend { display: block; font-size: 14px; font-weight: 500; }
label > span, legend > span { color: var(--muted); font-size: 12px; font-weight: 400; }
input:not([type=radio]):not([type=checkbox]):not([type=file]) { width: 100%; background: #fafafa; border: 1px solid #dedede; color: var(--text); border-radius: 3px; padding: 12px 14px; margin: 9px 0 26px; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus { border-color: var(--accent) !important; box-shadow: 0 0 0 3px #33333312; }
input::placeholder { color: var(--muted); font-size: 13px; }
input[type=radio], input[type=checkbox] { accent-color: var(--accent); }
#code { font-family: ui-monospace, SFMono-Regular, monospace; font-size: 13px; }
fieldset { padding: 0; margin: 2px 0 24px; border: 0; }
.methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 12px; margin-top: 12px; }
.methods label { position: relative; display: flex; align-items: center; gap: 11px; min-height: 46px; padding: 10px 12px; border: 1px solid transparent; border-radius: 3px; cursor: pointer; transition: border-color .15s, background .15s; }
.methods label:hover { background: #f8f8f8; }
.methods label:has(:checked) { border-color: #bcbcbc; background: var(--accent-soft); }
.methods label:has(:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.methods label > span { color: var(--text); font-size: 14px; font-weight: 500; }
.methods small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; font-weight: 400; }
.methods input { margin: 0; width: 15px; height: 15px; flex-shrink: 0; }
.privacy { color: var(--muted); font-size: 12px; line-height: 1.7; margin: 24px 0 20px; }
.privacy span { font-size: 11px; }
.primary { display: flex; align-items: center; justify-content: center; gap: 6px; background: var(--accent); color: #fff; border: 0; width: 100%; padding: 12px 17px; border-radius: 3px; font-weight: 500; min-height: 48px; transition: background .15s; }
.primary:hover { background: #1f1f1f; }
.primary span { font-weight: 400; font-size: 12px; opacity: .9; }
.primary b { margin-left: auto; font-weight: 400; font-size: 21px; }
.secondary { padding: 10px 14px; border: 1px solid #d2d2d2; border-radius: 3px; background: #fff; color: var(--text); font-size: 12px; }
.secondary:hover { background: var(--accent-soft); }
.muted { color: var(--muted); font-size: 12px; }
.upload { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin: 11px 0 24px; padding: 16px; border: 1px dashed #d2d2d2; background: #fafafa; border-radius: 3px; }
.upload img { width: 100%; max-height: 230px; object-fit: contain; border-radius: 2px; }
.error { font-size: 13px; color: var(--error); white-space: pre-line; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 24px; font-size: 12px; color: var(--muted); }
footer a { color: var(--accent); }
.success { padding: 65px 20px; text-align: center; }
.check { display: grid; place-items: center; margin: auto; width: 54px; height: 54px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 26px; }
h2 { font-size: 23px; font-weight: 500; }
.admin-shell { max-width: 1100px; padding: 35px 24px; margin: auto; }
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 36px; }
.admin-title { margin-bottom: 26px; }
.admin-title h1 { font-size: 26px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar button { background: #fff; color: var(--muted); border: 1px solid var(--line); border-radius: 3px; padding: 10px 14px; }
.toolbar button[aria-selected=true] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.requests { margin-top: 22px; }
.request-row { width: 100%; display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr 18px; gap: 12px; align-items: center; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); text-align: left; padding: 21px 12px; }
.request-row:hover { background: var(--panel); }
.request-row small { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.request-row strong { font-size: 17px; font-weight: 500; }
.badge { font-size: 12px; color: var(--accent); }
.attention { color: var(--error); }
.empty { padding: 65px 20px; text-align: center; color: var(--muted); }
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 4px; padding: 26px; max-width: 580px; width: calc(100% - 32px); max-height: 90vh; box-shadow: 0 18px 70px #22222222; }
dialog::backdrop { background: #22222240; backdrop-filter: blur(4px); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; }
.dialog-head h2 { margin: 0; }
.details { margin: 24px 0; font-size: 14px; overflow-wrap: anywhere; }
.details dt { color: var(--muted); font-size: 12px; margin-top: 14px; }
.details dd { margin: 5px 0; }
.details img { display: block; max-height: 300px; max-width: 100%; background: white; margin-top: 12px; }
.details a { color: var(--accent); text-decoration: underline; }
.details section { margin-bottom: 20px; }
.checkbox-label { display: flex; gap: 9px; align-items: start; margin: 12px 0 22px; }
.admin-auth { max-width: 440px; margin: 70px auto; }
.status-line { margin: 14px 0; font-size: 12px; color: var(--muted); }
.inline-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.monthly { padding: 18px 0; border-bottom: 1px solid var(--line); }
.monthly-controls { display: flex; align-items: center; gap: 12px; }
.monthly-controls input { max-width: 190px; margin: 10px 0 !important; }
.monthly-controls button { min-height: 43px; }
.monthly p:empty { display: none; }
.sandbox-banner { background: #fcf2d9; color: #785419; border-bottom: 1px solid #eadcb5; text-align: center; padding: 10px 18px; font-size: 12px; font-weight: 500; }
/* Public form: macOS grouped controls, adapted to a neutral light website. */
.rewards-page {
    background: #ededf0;
    color: #1d1d1f;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", "PingFang SC", sans-serif;
    font-size: 13px;
    -webkit-font-smoothing: antialiased;
}
.public-shell { max-width: 628px; margin: 0 auto; padding: 48px 24px 28px; }
.settlement-window { background: #f5f5f7; border: 1px solid #0000001c; border-radius: 14px; box-shadow: 0 10px 38px #0000000b, 0 1px 2px #00000005, inset 0 1px 0 #ffffff; overflow: hidden; }
.public-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 24px 0; }
.public-top .brand { gap: 8px; }
.public-top .brand-icon { width: 30px; height: 30px; }
.public-top .brand-wordmark { width: 112px; }
.language-switch { display: inline-flex; flex-shrink: 0; gap: 1px; padding: 2px; background: #e3e3e7; border-radius: 7px; box-shadow: inset 0 1px 1px #00000005; }
.language-switch button { min-width: 48px; border: 1px solid transparent; border-radius: 5px; padding: 3px 10px; background: transparent; color: #5b5b60; font-size: 12px; font-weight: 500; line-height: 1.5; }
.language-switch button[aria-pressed=true] { background: #ffffff; border-color: #0000000a; color: #1d1d1f; box-shadow: 0 1px 3px #0000001f; }
.language-switch button:hover { color: #1d1d1f; }
.settlement-window > header { margin: 0; padding: 26px 24px 20px; border: 0; }
.settlement-window h1 { font-size: 22px; font-weight: 650; line-height: 1.3; letter-spacing: -.02em; }
.settlement-window > .panel { border: 0; border-radius: 0; padding: 0 24px 24px; background: transparent; }
.settlement-window label, .settlement-window legend { font-size: 13px; font-weight: 400; line-height: 1.45; }
.settlement-window .field-group { background: #ffffff; border: 1px solid #00000012; border-radius: 9px; box-shadow: 0 1px 2px #00000002; }
.settlement-window .field-group { margin: 0 0 12px; }
.form-row { display: grid; grid-template-columns: minmax(118px, .85fr) minmax(0, 1.55fr); align-items: center; gap: 16px; min-height: 56px; padding: 10px 14px; position: relative; }
.form-row + .form-row::before { content: ""; position: absolute; inset: 0 14px auto; height: 1px; background: #0000000d; }
.settlement-window input:not([type=radio]):not([type=checkbox]):not([type=file]) { min-width: 0; width: 100%; background: #fff; color: #1d1d1f; border: 1px solid #00000026; border-radius: 5px; padding: 7px 9px; margin: 0; font-size: 13px; line-height: 1.4; box-shadow: inset 0 1px 2px #00000005; }
.settlement-window input::placeholder { color: #85858a; font-size: 12px; }
.settlement-window #code { height: 34px; padding: 0 10px; font-family: ui-monospace, SFMono-Regular, monospace; font-size: 12px; line-height: normal; text-align: left; }
.settlement-window #code::placeholder { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", "PingFang SC", sans-serif; font-size: 13px; }
.claim-result { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
#claim-amount { font-size: 18px; font-weight: 600; line-height: 1.4; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
#claim-message { color: #6e6e73; font-size: 12px; }
.claim-preview[data-state=error] #claim-message { color: var(--error); }
.settlement-window input:focus { border-color: #77777d !important; box-shadow: 0 0 0 3px #8e8e932e !important; }
.settlement-window fieldset { min-width: 0; margin: 20px 0 16px; }
.settlement-window legend { padding: 0 3px; margin-bottom: 8px; font-weight: 500; color: #64646a; }
.settlement-window .methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.settlement-window .methods label { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 52px; border: 1px solid #00000018; border-radius: 9px; background: #fff; box-shadow: 0 1px 2px #00000004; }
.settlement-window .methods label:hover { background: #fafafb; border-color: #bdbdc3; }
.settlement-window .methods label:has(:checked) { background: #eaeaec; border-color: #929299; box-shadow: inset 0 0 0 .5px #929299; }
.settlement-window .methods label > span { order: -1; flex: 1; color: #1d1d1f; font-size: 13px; font-weight: 400; line-height: 1.4; }
.settlement-window .methods input { width: 15px; height: 15px; margin: 0; accent-color: #606067; }
.settlement-window .methods label:has(:focus-visible) { outline: 2px solid #85858b; outline-offset: 2px; }
.screenshot-group { padding: 14px; }
.screenshot-group > label { margin-bottom: 12px; }
.upload-dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 156px; padding: 24px 16px; border: 1px dashed #bdbdc3; border-radius: 7px; background: #fafafb; color: #6e6e73; font-size: 12px; line-height: 1.5; transition: background .15s, border-color .15s, box-shadow .15s; }
.upload-dropzone:hover { background: #f3f3f5; border-color: #929299; }
.upload-dropzone.is-dragging { background: #eaeaec; border-color: #606067; box-shadow: inset 0 0 0 1px #606067; }
.upload-dropzone:focus-visible { outline: 2px solid #85858b; outline-offset: 3px; }
.upload-plus { position: relative; display: block; width: 28px; height: 28px; color: #85858b; }
.upload-plus::before, .upload-plus::after { content: ""; position: absolute; background: currentColor; border-radius: 1px; }
.upload-plus::before { width: 24px; height: 2px; left: 2px; top: 13px; }
.upload-plus::after { width: 2px; height: 24px; left: 13px; top: 2px; }
.settlement-window .secondary { min-height: 28px; padding: 4px 11px; background: linear-gradient(#ffffff, #f7f7f8); border: 1px solid #00000020; border-radius: 5px; box-shadow: 0 1px 2px #00000010; font-size: 12px; color: #252528; white-space: nowrap; }
.settlement-window .secondary:hover { background: #f2f2f4; }
.settlement-window .secondary:active { background: #e8e8eb; box-shadow: inset 0 1px 2px #0000000a; }
.upload-preview:has(img[hidden]) { display: none; }
.upload-preview { padding-top: 14px; }
.upload-preview .muted { display: block; font-size: 11px; margin-bottom: 10px; overflow-wrap: anywhere; }
.upload-preview img { display: block; width: 100%; max-height: 220px; object-fit: contain; border-radius: 4px; }
.settlement-window .privacy { margin: 16px 3px 0; color: #6e6e73; font-size: 11px; line-height: 1.5; }
.settlement-window .error { margin: 12px 3px 0; }
.form-actions { display: flex; justify-content: flex-end; margin-top: 22px; }
.submit-button { width: auto; min-width: 116px; min-height: 32px; padding: 6px 17px; gap: 8px; border: 1px solid #343439; border-radius: 6px; background: linear-gradient(#57575d, #424247); color: #fff; box-shadow: inset 0 1px 0 #ffffff20, 0 1px 2px #00000020; font-size: 13px; font-weight: 500; transition: background .15s, box-shadow .15s; }
.submit-button span { font: inherit; opacity: 1; }
.submit-button:hover { background: linear-gradient(#626268, #4b4b51); }
.submit-button:active:not(:disabled) { background: #39393f; box-shadow: inset 0 1px 2px #00000025; }
.submit-button:disabled { cursor: wait; opacity: .65; }
.submit-button[aria-busy=true]::before { content: ""; width: 12px; height: 12px; border: 1.5px solid #ffffff60; border-top-color: #fff; border-radius: 50%; animation: submitting-spin .75s linear infinite; }
@keyframes submitting-spin { to { transform: rotate(360deg); } }
.public-shell > footer { display: flex; justify-content: center; gap: 8px; margin-top: 18px; padding: 0 10px; font-size: 11px; color: #77777d; }
.public-shell > footer a { color: #56565d; }
.settlement-window > .success { padding: 36px 24px 48px; }
.settlement-window .check { background: #e7e7eb; color: #525259; }
.settlement-window h2 { font-size: 20px; font-weight: 600; }

@media (max-width: 520px) {
    .brand-icon { width: 42px; height: 42px; }
    .brand-wordmark { width: 132px; }
    header { margin: 28px 0 24px; padding-bottom: 22px; }
    h1 { font-size: 25px; }
    h1 > span { font-size: 13px; }
    .panel { padding: 22px 18px; border-radius: 4px; }
    .methods { gap: 5px 8px; }
    .methods label { padding: 10px 8px; gap: 8px; }
    .methods small { font-size: 11px; }
    .methods label > span { font-size: 13px; }
    .request-row { grid-template-columns: 1fr auto; gap: 8px; }
    .request-row .row-date { grid-column: 1 / -1; grid-row: 2; }
    .request-row .badge { grid-column: 2; grid-row: 2; }
    .request-row .arrow { display: none; }
    .admin-shell { padding: 28px 18px; }
    .toolbar { gap: 6px; }
    .toolbar button { font-size: 12px; padding: 9px; }
    .inline-fields { grid-template-columns: 1fr; }
    footer { font-size: 11px; gap: 12px; }
    .public-shell { padding: 20px 16px; }
    .settlement-window { border-radius: 12px; }
    .public-top { padding: 18px 20px 0; gap: 12px; }
    .settlement-window > header { padding: 24px 20px 20px; }
    .settlement-window > .panel { padding: 0 20px 20px; }
    .form-row { grid-template-columns: 1fr; gap: 8px; padding: 12px; }
    .screenshot-group { padding: 12px; }
    .upload-dropzone { min-height: 160px; }
    .settlement-window .methods label { min-height: 52px; padding: 11px 12px; gap: 8px; }
    .settlement-window input:not([type=radio]):not([type=checkbox]):not([type=file]) { min-height: 38px; font-size: 16px; }
    .settlement-window #code { height: 40px; font-size: 16px; }
    .settlement-window #code::placeholder { font-size: 16px; }
    .settlement-window .secondary { min-height: 34px; }
    .submit-button { min-height: 40px; min-width: 128px; }
}
@media (max-width: 380px) {
    .public-shell { padding: 16px 12px; }
    .public-top { padding-right: 16px; padding-left: 16px; gap: 8px; }
    .public-top .brand-icon { width: 28px; height: 28px; }
    .public-top .brand-wordmark { width: 102px; }
    .language-switch button { padding-right: 7px; padding-left: 7px; min-width: 42px; }
    .settlement-window > header { padding-right: 16px; padding-left: 16px; }
    .settlement-window > .panel { padding-right: 16px; padding-left: 16px; }
    .settlement-window h1 { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
