:root {
    color-scheme: light;
    font: 16px/1.55 system-ui, -apple-system, sans-serif;
    color: #181818;
    background: #fff;
}
* { box-sizing: border-box; }
body { margin: 0; }
header {
    min-height: 65px;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem clamp(1.1rem, 5vw, 3rem);
}
main { width: min(100% - 2.5rem, 690px); margin: clamp(2rem, 8vw, 5rem) auto; }
h1, h2 { line-height: 1.2; letter-spacing: -0.035em; }
h1 { font-size: clamp(1.95rem, 5vw, 2.65rem); margin: 0 0 1rem; }
h2 { font-size: 1.25rem; margin: 0 0 1rem; }
p { margin: 0 0 1.3rem; }
small, .back, .empty { color: #565656; }
small { font-size: .85rem; }
a { color: inherit; text-underline-offset: .2em; }
.back { display: inline-block; margin-bottom: 1.15rem; }
form { margin: 0; }
.stack { display: grid; gap: 1rem; justify-items: start; max-width: 520px; }
label { display: grid; gap: .35rem; width: 100%; font-weight: 550; }
input, textarea, select {
    min-width: 0;
    width: 100%;
    border: 1px solid #bdbdbd;
    border-radius: 10px;
    padding: .68rem .8rem;
    background: #fff;
    color: inherit;
    font: inherit;
    font-weight: 400;
}
button, .button {
    display: inline-block;
    padding: .63rem 1rem;
    border: 1px solid #181818;
    border-radius: 999px;
    background: #181818;
    color: #fff;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
button:hover, .button:hover { background: #353535; }
.secondary, .quiet { background: #fff; color: #181818; }
.quiet { border-color: transparent; font-size: .9rem; }
.secondary:hover, .quiet:hover { background: #f1f1f1; }
:focus-visible { outline: 2px solid #222; outline-offset: 3px; }
.notice, .empty { background: #f6f6f6; border-radius: 12px; padding: .85rem 1rem; margin: 0 0 1.3rem; }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.title-row h1 { margin: 0; }
nav { display: flex; gap: 1.2rem; border-bottom: 1px solid #ddd; margin-bottom: 1rem; }
nav a { text-decoration: none; padding: .55rem 0; border-bottom: 2px solid transparent; }
nav a[aria-current] { border-color: #181818; font-weight: 650; }
.items { list-style: none; padding: 0; }
.appointment-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: .65rem;
    border-bottom: 1px solid #e8e8e8;
    padding: .75rem .35rem;
}
.appointment-link {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .35rem .75rem;
    text-decoration: none;
    overflow-wrap: anywhere;
}
.appointment-link:hover { text-decoration: underline; }
.row-actions { display: flex; gap: .25rem; }
.items small { display: block; overflow-wrap: anywhere; }
.pill { display: inline-block; background: #f1f1f1; padding: .25rem .65rem; border-radius: 999px; font-size: .85rem; }
dl { display: grid; grid-template-columns: minmax(95px, 8rem) minmax(0, 1fr); gap: .5rem; margin: 0 0 1.4rem; }
dt { color: #565656; }
dd { margin: 0; overflow-wrap: anywhere; }
section, details { border-top: 1px solid #e8e8e8; margin-top: 1.6rem; padding-top: 1.25rem; }
summary { cursor: pointer; font-weight: 600; }
details form, .spaced { margin-top: 1rem; }

.actions { display: flex; flex-wrap: wrap; gap: .65rem; }

.appointment h1 { margin-bottom: .55rem; font-size: 1.18rem; font-weight: 500; letter-spacing: normal; color: #565656; font-variant-numeric: tabular-nums; }
.appointment p { font-size: 1.125rem; margin-bottom: .45rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.appointment-address { font-weight: 600; }
.appointment-status { margin-top: 1rem; font-size: .9rem; color: #565656; }
details > dl { margin-top: .8rem; }


.email-feedback {
    position: static;
    padding: 0;
    border: 0;
    background: transparent;
    margin: .5rem 0 0;
    color: #565656;
    font-size: .8rem;
    animation: hide-mail-sent 0s 3s forwards;
}
@keyframes hide-mail-sent { to { visibility: hidden; } }

.appointment-sheet { text-align: left; min-width: 0; }
main.appointment-page {
    width: min(100% - clamp(2.5rem, 10vw, 8rem), 30rem);
    display: grid;
    align-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    margin-block: 0;
    padding-block: 2rem;
}
.appointment-actions { margin-top: 1.5rem; }
.appointment-sheet button, .appointment-sheet .button {
    min-height: 36px;
    padding: .35rem .7rem;
    border-color: #ddd;
    background: #fff;
    color: #181818;
    font-size: .825rem;
    font-weight: 500;
}
.appointment-sheet button:hover, .appointment-sheet .button:hover {
    background: #f6f6f6;
    border-color: #aaa;
}
.manage-link {
    padding: .3rem .45rem;
    font-size: .85rem;
    white-space: nowrap;
}
.manage-link:hover { background: #f7f7f7; }

.check { display: flex; align-items: center; gap: .55rem; }
.check input { width: auto; margin: 0; accent-color: #181818; }
.field-settings { align-items: center; }
.field-settings .check { width: auto; }
.field-readonly { overflow-wrap: anywhere; }
.field-readonly p { margin: .25rem 0 0; }

.draft-field {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: .8rem 1rem 1rem;
    border: 1px solid #ddd;
    border-radius: .5rem;
}

.appointment .field-readonly { margin-top: .65rem; }
.field-readonly .check { font-weight: 400; }
.field-readonly .check input:disabled { opacity: 1; }

.copy-row { display: flex; align-items: center; gap: .5rem; margin-top: .35rem; }
.copy-row input { flex: 1; }
.copy-row button[hidden] { display: none; }
.copy-feedback { margin: .35rem 0 0; font-size: .85rem; color: #565656; }

main.login-page {
    display: grid;
    align-content: center;
    width: min(100% - 2.5rem, 20rem);
    min-height: 100vh;
    min-height: 100dvh;
    margin-block: 0;
    padding-block: 2rem;
}

details.guest-contact {
    border: 0;
    margin-top: 1.25rem;
    padding-top: 0;
    font-size: .85rem;
    color: #565656;
    overflow-wrap: anywhere;
}
.guest-contact p { margin: .4rem 0; }

.appointment h1 { margin-bottom: .2rem; }
.appointment .appointment-address { margin-bottom: 0; white-space: normal; }
.appointment .map-link {
    position: relative;
    display: inline-block;
    width: 24px;
    height: 0;
    margin-left: .1rem;
    vertical-align: baseline;
    color: #777;
}
.appointment .map-link svg {
    position: absolute;
    width: 24px;
    height: 24px;
    padding: 5.5px;
    bottom: -.45em;
    left: 0;
    border-radius: 4px;
}
.appointment .map-link:focus-visible svg { outline: 2px solid #222; }
.appointment .map-link:hover svg { background: #f0f0f0; color: #181818; }

.proposition-form {
    grid-template-columns: minmax(0, 1fr);
}
.proposition-form input:not([type="hidden"]) {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: 3rem;
    padding: .65rem .8rem;
    font-size: 1rem;
    line-height: 1.25;
    -webkit-appearance: none;
    appearance: none;
}
.proposal-date {
    position: relative;
    width: 100%;
    min-width: 0;
}
.proposal-date input::-webkit-date-and-time-value { text-align: left; }
.proposal-date span {
    display: none;
    position: absolute;
    inset: 1px;
    align-items: center;
    padding-inline: .8rem;
    border-radius: 9px;
    background: #fff;
    color: #565656;
    pointer-events: none;
}
.proposal-date input:invalid:not(:focus) + span { display: flex; }
.proposition-form input::placeholder { color: #565656; opacity: 1; }

@media (max-width: 600px) {
    .admin-page .stack { grid-template-columns: minmax(0, 1fr); }
    .admin-page .stack label { min-width: 0; }
    .admin-page input:is([type="datetime-local"], [type="email"], [type="tel"], [type="password"], [type="text"], :not([type])),
    .admin-page select {
        display: block;
        box-sizing: border-box;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        height: 3rem;
        padding: .65rem .8rem;
        font-size: 1rem;
        line-height: 1.25;
        -webkit-appearance: none;
        appearance: none;
    }
    .admin-page input::-webkit-date-and-time-value { text-align: left; }
}

.credit-row { padding: 1rem 0; border-bottom: 1px solid #e8e8e8; }
.credit-row p { margin: .65rem 0 0; }

/* Language controls keep the existing black-on-white appearance. */
.language-picker { display:flex; align-items:center; justify-content:flex-end; gap:.7rem; flex-wrap:wrap; max-width:1060px; margin:1rem auto; padding:0 1rem; }
.language-picker label { display:flex; align-items:center; gap:.5rem; }
.language-picker select { width:auto; min-width:7rem; }
.language-picker button { padding:.45rem .8rem; }
.language-preferences { margin:1rem 0 2rem; }
.language-preferences summary { font-size:.85rem; cursor:pointer; }
.language-preferences form { max-width:420px; }
html:lang(zh-CN) { font-family:system-ui,-apple-system,"PingFang SC","Microsoft YaHei","Noto Sans CJK SC",sans-serif; }
@media(max-width:520px) { .language-picker { justify-content:flex-start; } }
