html {
    box-sizing: border-box;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
    font-size: 16px;
    background: #fff6d6;
    color: #12333a;
    line-height: 1.5;
}

img {
    max-width: 100%;
    height: auto;
}

form {
    margin: 0;
    width: 100%;
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    background: #0d8a86;
    color: #fff;
    padding: 12px 20px;
    padding-top: calc(12px + env(safe-area-inset-top));
    padding-left: calc(20px + env(safe-area-inset-left));
    padding-right: calc(20px + env(safe-area-inset-right));
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.lang-link {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 10px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    white-space: nowrap;
}

.lang-link:hover,
.lang-link.active {
    background: #f5c518;
    color: #12333a;
    font-weight: 700;
}

.lang-sep {
    color: rgba(255, 255, 255, 0.7);
}

.page {
    max-width: 920px;
    margin: 0 auto;
    padding: 16px 16px 48px;
    padding-left: calc(16px + env(safe-area-inset-left));
    padding-right: calc(16px + env(safe-area-inset-right));
    padding-bottom: calc(48px + env(safe-area-inset-bottom));
}

.site-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    padding: 14px 16px;
    border-radius: 8px;
    background: #fff4e5;
    border: 1px solid #f0c36d;
    color: #7a4b00;
    box-shadow: 0 2px 10px rgba(18, 51, 58, 0.06);
}

.site-notice.is-hidden {
    display: none;
}

.site-notice-text {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    line-height: 1.45;
}

.site-notice-close {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    margin: -4px -6px 0 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #7a4b00;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.site-notice-close:hover,
.site-notice-close:focus {
    background: rgba(122, 75, 0, 0.1);
    outline: none;
}

.banner-wrap {
    border-radius: 8px;
    overflow: hidden;
}

.banner {
    display: block;
    width: 100%;
    height: auto;
}

.intro {
    background: #fff;
    margin-top: 16px;
    padding: 20px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(18, 51, 58, 0.08);
    overflow-wrap: anywhere;
    word-wrap: break-word;
}

.intro p {
    margin: 0 0 12px;
}

.intro ol {
    margin: 0 0 16px;
    padding-left: 22px;
}

.intro a {
    color: #0d8a86;
    word-break: break-all;
}

.form-card {
    background: #fff;
    margin-top: 16px;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(18, 51, 58, 0.08);
    min-width: 0;
}

.field {
    margin-bottom: 18px;
    min-width: 0;
}

.field-label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.4;
    white-space: normal;
}

.field-input,
.field-file,
.field-textarea,
input[type="text"],
input[type="tel"],
input[type="file"],
textarea {
    width: 100%;
    max-width: 100%;
    border: 1px solid #c5d4d4;
    border-radius: 6px;
    padding: 12px;
    font: inherit;
    font-size: 16px;
}

.field-file,
input[type="file"] {
    display: block;
    background: #fff;
}

.file-source-input {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    border: 0 !important;
}

.field-input:focus,
.field-textarea:focus {
    outline: 2px solid #0d8a86;
    border-color: #0d8a86;
}

.field-textarea {
    resize: vertical;
    min-height: 110px;
}

.field-hint {
    display: block;
    margin-top: 6px;
    color: #5b6f73;
    font-size: 13px;
}

.field-error {
    display: block;
    color: #b42318;
    font-size: 13px;
    margin-top: 6px;
}

.actions {
    margin-top: 8px;
}

.btn-submit {
    background: #0d8a86;
    color: #fff;
    border: 0;
    border-radius: 6px;
    padding: 12px 28px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    min-height: 48px;
}

.btn-submit:hover {
    background: #0a6f6c;
}

.btn-submit:disabled,
.btn-submit:disabled:hover {
    background: #9aa8a8;
    cursor: not-allowed;
}

.field-input:disabled,
.field-file:disabled {
    background: #f1f4f4;
    color: #8a9a9c;
    cursor: not-allowed;
}

.message {
    display: block;
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 6px;
    font-weight: 600;
}

.message-success {
    background: #e7f6ef;
    color: #0b6b3a;
}

.message-error {
    background: #fdecec;
    color: #b42318;
}

.receipt-pick {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin: 0;
    padding: 0 4px 4px;
}

.receipt-pick-btn {
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.receipt-pick-camera {
    background: #0d8a86;
    color: #fff;
}

.receipt-pick-gallery {
    background: #5b6f73;
    color: #fff;
}

.receipt-pick-or {
    text-align: center;
    color: #5b6f73;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1;
    padding: 2px 0;
}

.receipt-pick-popup {
    padding: 3em 1.5em 1.5em !important;
    width: min(22em, calc(100vw - 2rem)) !important;
}

.receipt-pick-html {
    margin: 0 !important;
    padding: 0 !important;
}

.receipt-pick-close {
    width: 2.25em !important;
    height: 2.25em !important;
    top: 0.35em !important;
    right: 0.35em !important;
    font-size: 1.75em !important;
    line-height: 1 !important;
    z-index: 3 !important;
}

@media (max-width: 768px) {
    .top-bar {
        flex-wrap: wrap;
        padding: 10px 12px;
        padding-top: calc(10px + env(safe-area-inset-top));
        padding-left: calc(12px + env(safe-area-inset-left));
        padding-right: calc(12px + env(safe-area-inset-right));
    }

    .lang-sep {
        display: none;
    }

    .lang-switcher {
        justify-content: flex-end;
        gap: 6px;
    }

    .lang-link {
        font-size: 13px;
        padding: 8px 12px;
        min-height: 44px;
        background: rgba(255, 255, 255, 0.12);
    }

    .page {
        padding: 10px 10px 32px;
        padding-left: calc(10px + env(safe-area-inset-left));
        padding-right: calc(10px + env(safe-area-inset-right));
        padding-bottom: calc(32px + env(safe-area-inset-bottom));
    }

    .banner-wrap {
        border-radius: 6px;
    }

    .intro,
    .form-card {
        margin-top: 12px;
        padding: 16px;
        border-radius: 6px;
    }

    .intro ol {
        padding-left: 20px;
    }

    .btn-submit {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .lang-link {
        flex: 1 1 auto;
        justify-content: center;
    }

    .field-textarea {
        min-height: 140px;
    }
}
