:root {
  --bg: #f5f4f0;
  --surface: #fff;
  --text: #181816;
  --muted: #77756f;
  --line: #e8e5dd;
  --accent: #17a673;
  --accent-dark: #0d7e56;
  --danger: #d64242;
  --available: #16a765;
  --busy: #e2a412;
  --closed: #df3e3e;
  --shadow: 0 10px 30px rgba(30, 29, 25, .07);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
}
html { width: 100%; min-height: 100%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; touch-action: pan-y; }
.broadcast-audiences { display: grid; gap: 0; }
.broadcast-audiences > button { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 15px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); text-align: left; }
.broadcast-audiences > button span:last-child { color: var(--muted); white-space: nowrap; }
.broadcast-record { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.broadcast-record > summary { display: flex; justify-content: space-between; gap: 12px; cursor: pointer; font-size: 13px; }
.broadcast-progress { color: var(--muted); font-size: 12px; line-height: 1.8; margin: 6px 0 14px; overflow-wrap: anywhere; }
.broadcast-message, #broadcast-preview-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; font-size: 14px; margin: 12px 0; }
#broadcast-dialog { inset: 50% auto auto 50%; transform: translate(-50%, -50%); width: min(520px, calc(100% - 24px)); height: auto; margin: 0; max-height: 85dvh; overflow-y: auto; padding: 20px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--surface); }
#broadcast-dialog::backdrop { background: rgba(0,0,0,.45); }
#broadcast-dialog > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#broadcast-dialog h2 { font-size: 18px; margin: 0; }
#broadcast-close { width: 44px; height: 44px; flex-shrink: 0; border: 0; background: transparent; color: var(--muted); font-size: 28px; }
#broadcast-form { display: grid; gap: 8px; margin-top: 12px; }
#broadcast-text { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 6px; resize: vertical; min-height: 140px; max-height: 35dvh; }
#broadcast-length { text-align: right; color: var(--muted); font-size: 12px; }
#broadcast-preview-count { font-size: 13px; line-height: 1.7; }
#broadcast-error { color: var(--danger); font-size: 13px; overflow-wrap: anywhere; margin: 0; }
.broadcast-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.broadcast-actions button { min-height: 44px; padding: 10px 14px; border-radius: 6px; border: 1px solid var(--line); }
#broadcast-dialog button:disabled, .broadcast-audiences button:disabled { opacity: .5; cursor: default; }
* { box-sizing: border-box; }
body { margin: 0; overflow-x: hidden; color: var(--text); background: var(--bg); padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
button, input, textarea, select { min-width: 0; font-family: inherit; font-size: 16px; }
button { cursor: pointer; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; padding: calc(18px + env(safe-area-inset-top)) 18px 14px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(18px); }
.eyebrow { margin: 0 0 4px; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .12em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 26px; }
h2 { margin-bottom: 0; font-size: 18px; }
.round-button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow); }
main { max-width: 760px; margin: 0 auto; }
.view { display: none; padding: 0 14px 22px; }
.view.active { display: block; }
.form-card { background: var(--surface); border-radius: 20px; padding: 14px; box-shadow: var(--shadow); }
.two-columns { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-top: 9px; }
.two-columns { grid-template-columns: 1fr 1fr; margin-top: 0; }
input, textarea, select { width: 100%; color: var(--text); background: var(--bg); border: 1px solid transparent; border-radius: 12px; padding: 12px; outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
textarea { min-height: 90px; resize: vertical; }
.primary { border: 0; border-radius: 12px; padding: 12px 18px; color: white; background: var(--accent); font-weight: 700; }
.primary:active { background: var(--accent-dark); }
.primary:disabled { cursor: wait; opacity: .65; }
.primary.full { width: 100%; min-height: 50px; margin-top: 8px; }
.compact { padding-inline: 16px; }
.section { margin-top: 20px; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 10px; }
.section-title span, .hint, small { color: var(--muted); font-size: 12px; }
.admin-collapsible > summary { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 10px; cursor: pointer; list-style: none; }
.admin-collapsible > summary::-webkit-details-marker { display: none; }
.admin-collapsible > summary::after { content: "⌄"; color: var(--muted); font-size: 20px; transition: transform .2s; }
.admin-collapsible[open] > summary::after { transform: rotate(180deg); }
.admin-collapsible:not([open]) > summary { margin-bottom: 0; }
.admin-panel-actions { justify-content: flex-end; margin: -2px 3px 8px; }
.keyboard-row-editor { margin-bottom: 10px; padding: 10px; border: 1px dashed #cbc8c0; border-radius: 14px; }
.keyboard-row-editor > header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.keyboard-row-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.keyboard-button-editor { display: grid; grid-template-columns: minmax(110px, 1fr) 82px 36px; gap: 6px; flex: 1 1 220px; }
.keyboard-button-editor input, .keyboard-button-editor select { padding: 10px; }
.group-button-remove { min-height: 42px; border: 0; border-radius: 10px; color: var(--danger); background: var(--bg); font-size: 20px; }
.sponsor-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 70%); gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.sponsor-card, .listing-card { background: var(--surface); border-radius: 18px; padding: 15px; box-shadow: var(--shadow); }
.sponsor-card { scroll-snap-align: start; border: 1px solid #e7d7a3; }
.sponsor-card .sponsor-label { color: #97731c; font-size: 11px; font-weight: 700; }
.card-list { display: grid; gap: 10px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.card-head strong { font-size: 17px; }
.mine-card-head > strong { display: block; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mine-card-location { color: var(--muted); font-size: 13px; font-weight: 400; }
.status { white-space: nowrap; font-size: 13px; font-weight: 700; }
.meta { margin: 8px 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.price { font-weight: 800; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tags span, .badge { padding: 4px 8px; border-radius: 999px; color: var(--accent-dark); background: #e6f7f0; font-size: 11px; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.card-actions a, .card-actions button { border: 0; border-radius: 10px; padding: 8px 11px; color: var(--text); background: var(--bg); text-decoration: none; font-size: 13px; }
.card-actions .danger { color: var(--danger); }
.hidden { display: none !important; }
.form-card { display: grid; gap: 14px; }
.compact-form { gap: 10px; }
.separated-form { margin-top: 12px; }
.compact-list { margin-top: 12px; }
.form-card > *, .two-columns > * { min-width: 0; }
.form-heading { display: flex; align-items: center; justify-content: space-between; }
label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { margin-bottom: 8px; font-size: 13px; font-weight: 600; }
.tag-grid { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-grid label { display: block; }
.tag-grid input { position: absolute; opacity: 0; pointer-events: none; }
.tag-grid span { display: block; border-radius: 999px; padding: 8px 11px; background: var(--bg); font-size: 12px; }
.tag-grid input:checked + span { color: white; background: var(--accent); }
.check { display: flex; align-items: flex-start; gap: 9px; font-weight: 400; }
.check input { width: 20px; height: 20px; }
.location-picker { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; border: 0; border-radius: 14px; padding: 13px; text-align: left; color: var(--text); background: var(--bg); }
.location-picker small { display: block; margin-top: 3px; }
.text-button { border: 0; padding: 5px; color: var(--muted); background: transparent; }
.text-button.accent { color: var(--accent); font-weight: 700; }
.tabbar { position: fixed; z-index: 20; left: 50%; bottom: 0; transform: translateX(-50%); display: flex; width: min(760px, 100%); padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(20px); }
.tabbar button { flex: 1; display: grid; gap: 2px; place-items: center; border: 0; color: var(--muted); background: transparent; font-size: 11px; }
.tabbar button span { font-size: 21px; }
.tabbar button.active { color: var(--accent); font-weight: 700; }
dialog { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--bg); }
dialog::backdrop { background: rgba(0,0,0,.5); }
.dialog-shell { min-height: 100%; }
.dialog-shell > header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: calc(12px + env(safe-area-inset-top)) 14px 12px; }
.dialog-shell > header button:last-child { justify-self: end; }
.device-location-card { display: grid; justify-items: center; gap: 10px; margin: 14px; padding: 24px 18px 18px; border-radius: 18px; color: var(--text); background: linear-gradient(145deg, #e7f8f1, #f7fbf9); text-align: center; }
.place-search-card { margin: 14px; padding: 15px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.place-search-card > strong { font-size: 16px; }
.place-search-card > p { margin: 5px 0 11px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.place-search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.place-search-row input { min-height: 46px; }
.place-search-row button { min-width: 74px; }
.place-search-card .place-search-status { min-height: 0; margin: 9px 2px 0; }
.place-search-results { display: grid; gap: 7px; margin-top: 9px; }
.place-search-result { display: grid; gap: 3px; width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; color: var(--text); background: var(--bg); text-align: left; }
.place-search-result strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.place-search-result span { overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.location-privacy-icon { display: grid; width: 56px; height: 56px; place-items: center; border-radius: 50%; color: white; background: var(--accent); font-size: 28px; }
.device-location-card strong { font-size: 17px; }
.device-location-card p { margin: 6px 0 2px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.device-location-card .primary { width: min(280px, 100%); margin: 4px 0 0; }
.device-location-card .primary:disabled { opacity: .65; }
.device-location-card .location-capture-status { margin: 0; color: var(--muted); font-weight: 700; }
.device-location-card .location-capture-status.success { color: var(--accent-dark); }
.location-map-wrap { position: relative; overflow: hidden; height: 310px; margin: 0 14px 14px; border: 1px solid var(--line); border-radius: 18px; background: #dfe9e4; box-shadow: var(--shadow); }
#location-adjust-map { width: 100%; height: 100%; }
.coordinate-preview { position: absolute; z-index: 5; left: 9px; right: 9px; bottom: 36px; overflow: hidden; padding: 6px 8px; border-radius: 8px; color: white; background: rgba(16,27,23,.72); pointer-events: none; font-size: 9px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
#location-dialog .dialog-shell { height: 100%; overflow-y: auto; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
#location-dialog .dialog-shell > header { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.place-fields { display: grid; gap: 13px; padding: 0 14px 24px; }
.place-fields label { padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.place-fields label > span { display: flex; align-items: center; justify-content: space-between; }
.place-fields label b { font-size: 14px; }
.place-fields label small { font-weight: 400; }
.place-fields input { padding: 11px 0 2px; border: 0; border-radius: 0; background: transparent; }
.place-fields .place-name-field p { margin: 9px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.location-summary { margin: 0; padding: 12px 13px; border-radius: 12px; color: var(--muted); background: var(--surface); font-size: 12px; line-height: 1.5; }
.location-summary strong { color: var(--text); }
.admin-listing-fields { padding-block: 10px; border-color: rgba(23,166,115,.35); }
.admin-listing-fields .card-section-heading { padding: 4px 0 5px; }
.admin-listing-fields select { border: 0; background: transparent; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 92px; transform: translate(-50%, 20px); max-width: 88%; padding: 10px 14px; border-radius: 12px; color: white; background: rgba(18,18,18,.9); opacity: 0; pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 首页：参考卡片式 Mini App，同时保留现有业务入口 */
.topbar { justify-content: center; padding-block: calc(14px + env(safe-area-inset-top)) 12px; background: color-mix(in srgb, var(--surface) 96%, transparent); border-bottom: 1px solid var(--line); }
.topbar > div { text-align: center; }
.topbar .eyebrow { display: none; }
.topbar h1 { font-size: 19px; }
.topbar .round-button { position: absolute; right: 16px; width: 38px; height: 38px; box-shadow: none; background: var(--bg); }
#search-view { padding-inline: 12px; }
.home-tabs { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 -12px 12px; padding: 0 10px; background: var(--surface); border-bottom: 1px solid var(--line); }
.home-tabs button { position: relative; height: 48px; border: 0; color: var(--muted); background: transparent; font-size: 15px; }
.home-tabs button.active { color: var(--accent); font-weight: 800; }
.home-tabs button.active::after { content: ""; position: absolute; left: 31%; right: 31%; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }
.map-panel { --map-panel-line: #d8e8df; --map-panel-muted: #61756b; --map-filter-bg: #fff; --map-filter-active: #0d7e56; --map-total-bg: #d9f1e4; --map-total-text: #0b704d; min-width: 0; margin: 0 0 18px; padding-top: 12px; border: 1px solid var(--map-panel-line); border-radius: 22px; background: linear-gradient(155deg, #eaf6ef, #f6faf7 72%); box-shadow: 0 8px 24px rgba(25,79,54,.07); }
.map-panel .map-toolbar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 10px 8px; }
.map-panel .map-toolbar select { min-width: 0; min-height: 42px; padding: 9px 7px; border: 1px solid var(--map-panel-line); border-radius: 12px; color: var(--text); background: var(--map-filter-bg); box-shadow: 0 2px 5px rgba(25,79,54,.035); font-size: 12px; text-overflow: ellipsis; }
.map-panel .map-toolbar select:has(option:checked:not([value=""])) { border-color: #92c8ae; color: var(--map-filter-active); }
.map-panel .map-toolbar select:focus { border-color: var(--accent); outline: 2px solid rgba(23,166,115,.2); outline-offset: 1px; }
.map-panel .map-stage { position: relative; overflow: hidden; height: clamp(325px, 47.5vh, 466.667px); border: 1px solid var(--map-panel-line); border-radius: 17px; background: #dfe9e4; box-shadow: 0 3px 12px rgba(25,79,54,.06); }
#realtime-map { position: relative; width: 100%; height: 100%; }
.map-message { position: absolute; z-index: 5; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; color: #315346; background: linear-gradient(145deg, rgba(239,249,245,.94), rgba(224,240,234,.94)); font-size: 13px; }
.map-message.map-message-compact { inset: 12px auto auto 12px; display: flex; gap: 8px; padding: 9px 12px; border-radius: 10px; pointer-events: none; }
.map-message-compact .map-spinner { width: 16px; height: 16px; }
.map-spinner { width: 25px; height: 25px; border: 3px solid rgba(23,166,115,.2); border-top-color: var(--accent); border-radius: 50%; animation: map-spin .8s linear infinite; }
@keyframes map-spin { to { transform: rotate(360deg); } }
.map-locate { position: absolute; z-index: 4; right: 10px; bottom: 28px; display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid rgba(0,0,0,.08); border-radius: 50%; color: var(--accent-dark); background: white; box-shadow: 0 5px 18px rgba(0,0,0,.2); font-size: 23px; font-weight: 800; }
.map-locate.locating { animation: locate-pulse .9s ease-in-out infinite alternate; }
@keyframes locate-pulse { to { transform: scale(.88); opacity: .72; } }
.customer-location-marker { position: relative; width: 22px; height: 22px; pointer-events: none; }
.customer-location-pulse { position: absolute; inset: -12px; border-radius: 50%; background: rgba(35, 125, 255, .2); animation: customer-location-pulse 1.6s ease-out infinite; }
.customer-location-dot { position: absolute; inset: 2px; border: 3px solid white; border-radius: 50%; background: #237dff; box-shadow: 0 2px 9px rgba(0, 74, 181, .5); }
.customer-location-marker b { position: absolute; left: 50%; top: 27px; padding: 4px 7px; border-radius: 7px; color: white; background: #237dff; box-shadow: 0 2px 8px rgba(0,0,0,.2); transform: translateX(-50%); font-size: 10px; white-space: nowrap; }
@keyframes customer-location-pulse { from { transform: scale(.45); opacity: 1; } to { transform: scale(1.2); opacity: 0; } }
.map-panel .map-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; min-height: 48px; margin: 0 10px 9px; color: var(--map-panel-muted); font-size: 11px; }
.map-panel .map-legend span { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.map-panel .map-legend b { color: var(--text); font-size: 12px; font-variant-numeric: tabular-nums; }
.map-panel .map-legend i { flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; }
.map-panel .map-legend i.available { background: var(--available); }
.map-panel .map-legend i.busy { background: var(--busy); }
.map-panel .map-legend i.closed { background: var(--closed); }
.map-panel .map-legend strong { max-width: 100%; margin-left: auto; padding: 7px 10px; border: 1px solid var(--map-panel-line); border-radius: 999px; color: var(--map-total-text); background: var(--map-total-bg); font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.map-panel .map-updated-at { padding: 10px 12px 11px; color: var(--map-panel-muted); font-size: 10px; line-height: 1.4; font-variant-numeric: tabular-nums; text-align: right; }
.map-panel .map-fallback { flex-wrap: wrap; margin: 0 10px 11px; border: 1px solid #e6d69e; }
.map-panel .map-fallback span { min-width: 100px; overflow-wrap: anywhere; }
.map-fallback { display: flex; align-items: center; gap: 8px; margin-top: 9px; padding: 10px 12px; border-radius: 11px; color: #725e22; background: #fff4cf; font-size: 11px; }
.map-fallback span { flex: 1; }
.map-fallback button { flex: 0 0 auto; border: 0; border-radius: 8px; padding: 7px 9px; color: #725e22; background: rgba(255,255,255,.75); font-size: 11px; font-weight: 700; }
.map-avatar-marker-anchor { position: absolute; width: 44px; height: 44px; overflow: visible; pointer-events: none; }
.map-cluster-marker { display: grid; width: 44px; height: 44px; place-items: center; padding: 0; border: 3px solid white; border-radius: 50%; color: white; background: var(--cluster-fill, #efad1c); box-shadow: 0 5px 14px rgba(8,75,110,.28); font-size: 14px; font-weight: 800; cursor: pointer; }
.map-avatar-marker { --marker-color: var(--closed); position: absolute; inset: 0; display: grid; width: 44px; height: 44px; place-items: center; overflow: visible; padding: 0; border: 0; color: white; background: transparent; transform: translate(var(--marker-offset-x, 0px), var(--marker-offset-y, 0px)); font-size: 14px; font-weight: 800; cursor: pointer; pointer-events: auto; }
.map-avatar-marker.available { --marker-color: var(--available); }
.map-avatar-marker.busy { --marker-color: var(--busy); }
.map-avatar-marker.closed { --marker-color: var(--closed); }
.map-avatar-frame { position: relative; z-index: 1; display: grid; width: 40px; height: 40px; place-items: center; overflow: hidden; border: 3px solid var(--marker-color); border-radius: 50% 50% 50% 12%; color: white; background: #314a42; box-shadow: 0 5px 12px rgba(0,0,0,.3); transform: rotate(-45deg); }
.map-avatar-frame img { position: absolute; left: 50%; top: 50%; display: block; width: 58px; max-width: none; height: 58px; border-radius: 0; object-fit: cover; object-position: 50% 28%; transform: translate(-50%, -50%) rotate(45deg); }
.map-avatar-marker .marker-initial { transform: rotate(45deg); }
.marker-status-dot { position: absolute; z-index: 2; top: 31px; right: 0; width: 11px; height: 11px; border: 2px solid white; border-radius: 50%; background: var(--marker-color); box-shadow: 0 1px 4px rgba(0,0,0,.24); transform: none; }
.map-avatar-marker.status-changed .map-avatar-frame { animation: marker-change .55s ease-in-out 3 alternate; }
@keyframes marker-change { to { filter: brightness(1.25); box-shadow: 0 0 0 8px rgba(23,166,115,.2), 0 5px 16px rgba(0,0,0,.32); } }
.maplibregl-ctrl-bottom-right { right: 0; bottom: 0; }
.maplibregl-ctrl-bottom-right .maplibregl-ctrl { margin: 0; }
.maplibregl-ctrl-logo { display: none !important; }
.map-source-widget { position: absolute; z-index: 4; right: 10px; bottom: 0; max-width: calc(100% - 20px); }
.map-source-widget summary { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; background: transparent; cursor: pointer; }
.map-source-dot { display: block; flex: 0 0 10px; width: 10px; height: 10px; border-radius: 50%; background: #000; }
.map-source-widget summary::marker { content: ""; }
.map-source-widget summary::-webkit-details-marker { display: none; }
.map-source-widget summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.map-source-details { position: absolute; right: 0; bottom: calc(100% + 58px); width: max-content; max-width: min(280px, calc(100vw - 40px)); padding: 9px 11px; border: 1px solid var(--line); border-radius: 6px; color: var(--text); background: rgba(255,255,255,.97); box-shadow: 0 3px 12px rgba(0,0,0,.17); font-size: 11px; line-height: 1.5; }
.map-source-details a { color: var(--accent-dark); }
.map-source-widget.fallback .map-provider-credit { display: none; }
.featured-grid, .profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.featured-card, .profile-card { position: relative; display: block; overflow: hidden; width: 100%; padding: 0; border: 0; border-radius: 14px; color: white; background: linear-gradient(145deg, #2e3b4b, #152331); text-align: left; box-shadow: 0 6px 18px rgba(25, 39, 52, .12); }
.featured-card { aspect-ratio: 1.2 / 1; }
.featured-card.submit-card { padding: 18px 14px; background: linear-gradient(145deg, #0a86c7, #42b7ed); }
.submit-card .feature-icon { display: block; margin-bottom: 25px; font-size: 32px; }
.submit-card strong { display: block; font-size: 19px; }
.submit-card small { display: block; margin-top: 6px; color: rgba(255,255,255,.82); font-size: 12px; }
.profile-card { min-height: 230px; }
.featured-card.profile-card { min-height: 0; }
.profile-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.profile-placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.62); background: radial-gradient(circle at 70% 20%, #50b8a0, transparent 42%), linear-gradient(145deg, #243d48, #17242b); font-size: 44px; font-weight: 800; }
.profile-shade { position: absolute; inset: 36% 0 0; background: linear-gradient(transparent, rgba(0,0,0,.78)); }
.profile-copy { position: absolute; z-index: 2; left: 12px; right: 12px; bottom: 11px; }
.profile-copy strong { display: block; overflow: hidden; font-size: 17px; white-space: nowrap; text-overflow: ellipsis; }
.profile-copy small { display: block; overflow: hidden; margin-top: 4px; color: rgba(255,255,255,.86); white-space: nowrap; text-overflow: ellipsis; }
.profile-copy .tile-price { margin-top: 6px; font-size: 12px; font-weight: 700; }
.status-pill { position: absolute; z-index: 3; top: 9px; right: 9px; padding: 5px 8px; border-radius: 999px; color: white; background: rgba(12, 25, 26, .66); backdrop-filter: blur(8px); font-size: 11px; font-weight: 800; }
.favorite-button { position: absolute; z-index: 4; top: 8px; left: 8px; width: auto; height: 30px; display: grid; place-items: center; padding: 0 8px; border: 0; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; color: white; background: rgba(12,25,26,.55); transition: color .15s, background-color .15s; }
.favorite-button.active { color: var(--accent); background: #e7f6f0; }
.section-title { margin-top: 2px; }
.section-title h2 { font-size: 17px; }
.sponsor-strip { grid-auto-columns: minmax(190px, 58%); }
.sponsor-card { padding: 7px; border-radius: 15px; }
.sponsor-card .profile-card { min-height: 210px; }

/* 投稿页：分组卡片、横向字段和固定提交按钮 */
#submit-view { padding: 0 0 80px; }
.application-title { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; min-height: 52px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--surface); text-align: center; }
.application-title strong { font-size: 17px; }
.application-form { display: grid; gap: 12px; padding: 12px; }
.application-card { padding: 0 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 4px 14px rgba(30,29,25,.04); }
.form-row { display: grid; grid-template-columns: 108px minmax(0, 1fr); align-items: center; min-height: 58px; gap: 10px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 500; }
.application-card > .form-row:last-child { border-bottom: 0; }
.row-label { color: var(--text); white-space: nowrap; }
.required::before { content: "*"; margin-right: 4px; color: var(--danger); }
.form-row > input, .form-row textarea, .input-with-unit input { border: 0; border-radius: 0; padding: 12px 0; background: transparent; }
.form-row > input:focus, .form-row textarea:focus, .input-with-unit input:focus { box-shadow: inset 0 -2px 0 var(--accent); }
.input-with-unit { display: flex; align-items: center; min-width: 0; color: var(--muted); }
.input-with-unit input { flex: 1; min-width: 0; }
.input-with-unit b { flex: 0 0 auto; font-size: 12px; font-weight: 500; }
.bust-row { margin: 0; padding: 0; }
.bust-row legend { margin: 0; }
.bust-options { display: flex; align-items: center; justify-content: space-between; gap: 3px; }
.bust-options label { display: block; }
.bust-options input { position: absolute; opacity: 0; pointer-events: none; }
.bust-options span { display: grid; width: 27px; height: 27px; place-items: center; border: 1px solid #cfd5da; border-radius: 50%; color: var(--muted); font-size: 12px; }
.bust-options input:checked + span { color: white; border-color: var(--accent); background: var(--accent); }
.form-row .location-picker { grid-template-columns: 1fr auto; width: 100%; padding: 8px 0; border-radius: 0; background: transparent; }
.form-row .location-picker strong { display: block; color: var(--muted); font-weight: 500; }
.form-row .location-picker small { max-width: 210px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.description-row { align-items: start; padding-top: 14px; }
.description-row textarea { min-height: 88px; padding-top: 2px; }
.card-section-heading { display: flex; align-items: center; justify-content: space-between; padding: 16px 0 12px; }
.card-section-heading strong { font-size: 16px; }
.card-section-heading span { color: var(--muted); font-size: 12px; }
.tag-card { padding-bottom: 16px; }
.tag-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px 4px; }
.tag-grid label { min-width: 0; }
.tag-grid span { display: flex; align-items: center; gap: 5px; overflow-wrap: anywhere; padding: 0; border-radius: 0; background: transparent; color: var(--text); font-size: 12px; white-space: normal; }
.tag-grid span::before { content: ""; flex: 0 0 18px; width: 18px; height: 18px; border: 1px solid #cfd5da; background: var(--surface); }
.tag-grid input:checked + span { color: var(--text); background: transparent; }
.tag-grid input:checked + span::before { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 4px var(--surface); }
.bust-options input, .tag-grid input { width: 1px; height: 1px; margin: 0; padding: 0; clip-path: inset(50%); }
.media-card { padding-block: 15px; }
.media-block + .media-block { margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--line); }
.media-heading { display: flex; align-items: center; justify-content: space-between; }
.media-heading span { color: var(--muted); font-size: 12px; }
.media-block > p { margin: 6px 0 12px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.verification-script { margin: 9px 0 8px; padding: 10px 12px; border: 1px solid #bfe4d2; border-radius: 10px; background: #effaf5; }
.verification-script span { display: block; margin-bottom: 4px; color: #287757; font-size: 11px; }
.verification-script strong { display: block; color: #154d39; font-size: 13px; line-height: 1.55; }
.verification-visibility { margin: 14px 0 0; padding: 0; border: 0; }
.verification-visibility legend { margin-bottom: 8px; font-size: 13px; font-weight: 700; }
.verification-visibility label { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; }
.verification-visibility input { width: 18px; height: 18px; }
.upload-tile { position: relative; overflow: hidden; display: grid; width: 96px; height: 96px; place-content: center; gap: 7px; border: 1px dashed #b9c6cc; border-radius: 12px; color: var(--muted); text-align: center; font-weight: 500; }
.upload-tile span { font-size: 25px; font-weight: 300; }
.upload-tile b { font-size: 12px; font-weight: 500; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.upload-input { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; font-size: 16px; touch-action: manipulation; }
.media-preview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-top: 10px; }
.media-preview:empty { display: none; }
.media-upload-row { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 8px; min-width: 0; }
.media-upload-row > .upload-tile { flex: 0 0 96px; }
.media-upload-row > .media-preview-item { flex: 0 1 96px; width: 96px; height: 96px; min-width: 80px; }
.media-preview-item { position: relative; overflow: hidden; aspect-ratio: 1; border-radius: 9px; background: var(--bg); }
.media-preview-item img, .media-preview-item video { width: 100%; height: 100%; object-fit: cover; }
.media-item-status { position: absolute; left: 4px; right: 4px; bottom: 4px; z-index: 2; padding: 4px 6px; border-radius: 6px; background: rgba(20, 30, 32, .78); color: #fff; font-size: 11px; line-height: 1.25; }
.media-item-status.failed { background: rgba(160, 35, 45, .9); }
.media-retry { position: absolute; left: 50%; top: 50%; z-index: 3; transform: translate(-50%, -50%); border: 0; border-radius: 7px; padding: 7px 10px; color: #fff; background: var(--accent); font-size: 12px; white-space: nowrap; }
.media-remove { position: absolute; top: 5px; right: 5px; z-index: 2; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: #e53935; color: #fff; font-size: 22px; line-height: 26px; box-shadow: 0 2px 8px #0005; }
.existing-media::after { content: "原始资料"; position: absolute; left: 5px; bottom: 5px; padding: 2px 6px; border-radius: 5px; background: #0009; color: #fff; font-size: 11px; }
.video-preview-label { position: absolute; inset: auto 5px 5px; overflow: hidden; color: white; font-size: 10px; text-shadow: 0 1px 3px #000; white-space: nowrap; text-overflow: ellipsis; }
.video-preview-status { position: absolute; top: 5px; left: 5px; right: 5px; z-index: 1; padding: 4px 6px; border-radius: 5px; background: rgba(20, 30, 32, .72); color: #fff; font-size: 10px; line-height: 1.3; text-align: center; }
.video-preview-status:empty { display: none; }
.video-preview-status.failed { top: 50%; right: 8px; left: 8px; transform: translateY(-50%); background: rgba(20, 30, 32, .84); font-size: 11px; }
.declarations { padding-block: 14px; }
.declarations .check + .check { margin-top: 12px; }
.application-submit-bar { position: fixed; z-index: 19; left: 50%; bottom: calc(65px + env(safe-area-inset-bottom)); display: flex; width: min(760px, 100%); transform: translateX(-50%); gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 96%, transparent); backdrop-filter: blur(18px); }
.application-submit-bar .primary.full { flex: 1; min-height: 50px; margin: 0; }
.application-submit-bar .text-button { flex: 0 0 82px; }

/* 资料详情 */
.listing-dialog { padding: 0; border: 0; background: transparent; }
.listing-dialog::backdrop { background: rgba(0,0,0,.55); }
.listing-dialog-shell { position: fixed; left: 50%; bottom: 0; width: min(760px, 100%); max-height: 88vh; overflow-y: auto; transform: translateX(-50%); padding: 14px 14px calc(22px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; background: var(--bg); }
.listing-dialog-shell > header { display: flex; align-items: center; justify-content: space-between; padding: 0 3px 12px; }
#listing-dialog .listing-dialog-shell { padding-top: 0; }
#listing-dialog .listing-dialog-shell > header { position: sticky; top: 0; z-index: 10; margin: 0 -14px; padding: 14px 17px 12px; background: var(--bg); }
.dialog-close { width: 36px; height: 36px; border: 0; border-radius: 50%; color: var(--muted); background: var(--surface); font-size: 24px; }
.listing-detail-cover { width: 100%; max-height: 46vh; margin-bottom: 10px; border-radius: 14px; object-fit: cover; }
.detail-loading { display: grid; min-height: 260px; place-content: center; justify-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.public-media-gallery { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; margin: 0 -14px 15px; overflow: hidden; border-radius: 16px; background: #101413; }
.public-media-gallery > img, .public-media-gallery > figure { grid-column: span 3; min-width: 0; display: block; width: 100%; aspect-ratio: 3 / 4; margin: 0; overflow: hidden; background: #101413; }
.public-media-gallery--odd > :nth-last-child(-n + 3) { grid-column: span 2; }
.public-media-gallery--single > :only-child { grid-column: 1 / -1; }
.public-media-gallery img, .public-media-gallery video { display: block; width: 100%; height: 100%; object-fit: cover; }
.public-media-gallery figure { position: relative; }
.public-media-gallery figcaption { position: absolute; left: 9px; bottom: 9px; max-width: calc(100% - 18px); box-sizing: border-box; overflow-wrap: anywhere; pointer-events: none; padding: 5px 8px; border-radius: 999px; color: white; background: rgba(0,0,0,.62); font-size: 10px; }
.public-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.public-detail-head strong { display: block; font-size: 22px; }
.public-detail-head small { display: block; margin-top: 3px; }
.public-detail-head .status { padding: 6px 9px; border-radius: 999px; color: white; background: var(--closed); }
.public-detail-head .status.available { background: var(--available); }
.public-detail-head .status.busy { background: var(--busy); }
.map-location-warning { margin: 12px 0; padding: 10px 12px; border-radius: 12px; color: var(--accent-dark); background: #e7f6f0; font-size: 13px; line-height: 1.5; }
.map-location-warning small { color: #55917a; }
.detail-price { font-size: 18px; font-weight: 900; }
.detail-price span { color: var(--muted); font-weight: 400; }
.detail-facts { margin: 13px 0; }
.detail-facts > div { display: grid; grid-template-columns: 82px 1fr; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.detail-facts dt { color: var(--muted); }
.detail-facts dd { margin: 0; }
.feedback-fact { grid-template-columns: 128px auto minmax(118px, max-content) !important; align-items: center; column-gap: 10px; }
.feedback-fact dd { display: contents; }
.feedback-fact dd span { color: var(--text); font-weight: 700; }
.homework-open-button { justify-self: end; min-height: 36px; padding: 7px 12px; border: 0; border-radius: 999px; color: white; background: var(--accent); font-size: 12px; font-weight: 800; white-space: nowrap; }
.homework-form { display: grid; gap: 13px; margin: 14px 0; padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); scroll-margin-top: 10px; }
.homework-form.hidden { display: none; }
.homework-form h3 { margin: 0; }
.homework-form label { display: grid; gap: 7px; font-size: 13px; font-weight: 700; }
.homework-form label b { color: #c83232; }
.homework-form textarea { min-height: 132px; resize: vertical; line-height: 1.6; }
.homework-form input, .homework-form textarea { width: 100%; box-sizing: border-box; }
.homework-form small { justify-self: end; color: var(--muted); font-weight: 400; }
.homework-form .hint { margin: 0; }
.homework-photo-field { display: grid; gap: 8px; }
.homework-photo-field > span { font-size: 13px; font-weight: 700; }
.homework-photo-field > span small { margin-left: 6px; font-weight: 400; }
.homework-photo-picker { position: relative; display: grid !important; min-height: 86px; place-items: center; overflow: hidden; border: 1px dashed #a9bbb4; border-radius: 14px; color: var(--accent-dark); background: #eef9f5; background: color-mix(in srgb, var(--accent) 7%, var(--surface)); cursor: pointer; }
.homework-photo-picker input { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; opacity: 0; cursor: pointer; }
.homework-photo-picker > span { font-size: 13px; font-weight: 800; }
.homework-photo-preview { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 12px; }
.homework-photo-preview.hidden { display: none; }
.homework-photo-preview img { width: 64px; height: 64px; border-radius: 9px; object-fit: cover; }
.homework-photo-preview span { min-width: 0; overflow-wrap: anywhere; color: var(--muted); font-size: 12px; }
.homework-photo-preview button { min-height: 40px; border: 0; color: #c83232; background: transparent; font-weight: 700; }
.description-details { margin-top: 12px; padding: 11px 12px; border-radius: 12px; background: var(--surface); }
.description-details summary { color: var(--accent-dark); font-size: 13px; font-weight: 700; }
.description-details p { margin: 9px 0 0; white-space: pre-wrap; color: var(--text); font-size: 13px; line-height: 1.65; }
.detail-primary-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 15px; }
.detail-primary-actions a { padding: 12px; border-radius: 12px; color: white; background: var(--accent); text-align: center; text-decoration: none; font-size: 14px; font-weight: 800; }
.profile-empty { grid-column: 1 / -1; }

@media (max-width: 350px) {
  .form-row { grid-template-columns: 92px minmax(0, 1fr); }
  .tag-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .bust-options span { width: 24px; height: 24px; }
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #111210; --surface: #1b1d1a; --text: #f2f2ee; --muted: #a09f99; --line: #2d302b; --shadow: 0 10px 30px rgba(0,0,0,.2); }
  .map-panel { --map-panel-line: #314b3e; --map-panel-muted: #a6bdb0; --map-filter-bg: #21382c; --map-filter-active: #8ed9b7; --map-total-bg: #244c39; --map-total-text: #b2e8cb; background: linear-gradient(155deg, #1c3327, #17251e 72%); box-shadow: 0 8px 24px rgba(0,0,0,.18); }
  .map-panel .map-toolbar select:has(option:checked:not([value=""])) { border-color: #589d7b; }
  .map-panel .map-toolbar select:focus { outline-color: rgba(81,199,151,.3); }
  .map-panel .map-fallback { border-color: #685a31; color: #f1d997; background: #3c3521; }
  .map-panel .map-fallback button { color: #f1d997; background: #51472d; }
  .device-location-card { background: linear-gradient(145deg, #173a30, #18221f); }
  .map-message { color: #b9d8cc; background: linear-gradient(145deg, rgba(21,42,35,.95), rgba(17,31,27,.95)); }
  .map-location-warning { color: #8bd0b3; background: #183a2f; }
  .map-location-warning small { color: #76a894; }
}
.service-tags-settings h3 { margin: 0; }
.service-tag-input-row { display: flex; gap: 8px; align-items: center; }
.service-tag-input-row input { flex: 1; min-width: 0; }
.service-tag-input-row button { flex-shrink: 0; }
.service-tags-editor { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.service-tag-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: start; align-items: center; gap: 2px; min-width: 0; padding: 5px 4px; border: 1px solid #d9e2eb; border-radius: 12px; background: #f8fafc; }
.service-tag-card span { grid-column: auto; overflow-wrap: anywhere; min-width: 0; }
.service-tag-card button { min-width: 0; padding: 2px; font-size: 13px; }
.service-tag-remove { border: 0; background: transparent; color: #c53030; padding: 4px 6px; font-size: 20px; }
.archive-review-media { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 16px 0; }
.archive-review-media img, .archive-review-media video { width: 100%; border-radius: 8px; }
.archive-review-confirm { display: flex; align-items: flex-start; gap: 8px; margin: 16px 0; }
.archive-review-confirm input { flex-shrink: 0; width: 20px; height: 20px; padding: 0; margin: 0; }
.archive-review-media figure { margin: 0; min-width: 0; }
.archive-review-media figcaption { font-size: 12px; }
.archive-risk-report h4 { margin: 12px 0 6px; }
.archive-finding { overflow-wrap: anywhere; }
.archive-risk-report mark { border-radius: 3px; padding: 1px 3px; background: #ffe0d8; }
.archive-preserve-lines { white-space: pre-wrap; overflow-wrap: anywhere; }
#archive-declaration-panel { margin-bottom: 16px; }
.service-tags-settings form { display: grid; gap: 10px; }

.qualification-row { padding: 12px 0; }
.qualification-options { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 3px; }
.qualification-option { position: relative; display: inline-flex; margin: 0; cursor: pointer; }
.qualification-option input { position: absolute; width: 1px; height: 1px; opacity: 0; padding: 0; }
.qualification-option span { display: grid; place-items: center; width: 100%; max-width: 26px; aspect-ratio: 1; box-sizing: border-box; border: 1px solid var(--line); border-radius: 50%; font-size: 11px; font-weight: 600; }
.qualification-option input:checked + span { background: var(--accent); color: white; border-color: var(--accent); }
.qualification-option input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }

.ad-slot-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) 68px; gap: 8px; padding-block: 12px; border-bottom: 1px solid var(--line); align-items: start; }
.ad-slot-row > label { min-width: 0; font-size: 12px; }
.ad-slot-row input { min-width: 0; width: 100%; padding-inline: 8px; }
.ad-slot-row .ad-countdown { font-size: 10px; font-weight: 400; overflow-wrap: anywhere; }
.service-tag-card { touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.service-tag-card span { cursor: grab; }
.service-tag-card button { touch-action: manipulation; }
.service-tags-dragging .service-tag-card { cursor: grabbing; }
.service-tag-dragging { outline: 2px solid #12a675; background: #e5f8ef; box-shadow: 0 3px 10px #12a67533; }

/* Android 投稿体验：触控尺寸、软键盘和持久进度 */
#submit-view { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
.qualification-options { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; width: 100%; }
.qualification-option { min-width: 0; min-height: 44px; align-items: center; justify-content: center; }
.qualification-option span { width: min(100%, 44px); max-width: 44px; min-width: 0; min-height: 0; aspect-ratio: 1; border-radius: 50%; font-size: 13px; }
.tag-grid label { min-height: 44px; }
.tag-grid span { min-height: 44px; align-items: center; gap: 3px; font-size: 11px; }
.tag-grid span::before { flex-basis: 18px; width: 18px; height: 18px; }
.media-remove { top: 4px; right: 4px; width: 44px; height: 44px; font-size: 28px; line-height: 42px; }
.application-submit-bar { flex-wrap: wrap; }
.submission-progress { display: grid; flex: 1 0 100%; gap: 5px; min-width: 0; color: var(--muted); font-size: 12px; }
.submission-progress span { overflow-wrap: anywhere; }
.submission-progress progress { width: 100%; height: 6px; accent-color: var(--accent); }
.android-keyboard-open .tabbar { display: none; }
.android-keyboard-open .application-submit-bar { bottom: env(safe-area-inset-bottom); }
.android-keyboard-open #submit-view { padding-bottom: calc(118px + env(safe-area-inset-bottom)); }

@media (max-width: 480px) {
  .qualification-row { grid-template-columns: 1fr; align-items: start; gap: 8px; }
  .qualification-row .row-label { white-space: normal; }
  .application-form { padding-inline: 10px; }
}

@media (max-width: 380px) {
  .form-row { grid-template-columns: 92px minmax(0, 1fr); }
  .qualification-row { grid-template-columns: 1fr; }
  .qualification-options { gap: 2px; }
  .qualification-option span { font-size: 12px; }
  .tag-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* 品牌启动页：苹果端优先，兼容安卓 WebView */
body.app-booting { overflow: hidden; }
.brand-splash {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  min-height: 100%;
  height: 100dvh;
  overflow: hidden;
  place-items: center;
  padding: calc(28px + env(safe-area-inset-top)) 24px calc(28px + env(safe-area-inset-bottom));
  color: #2a654b;
  background:
    radial-gradient(circle at 18% 16%, rgba(255,255,255,.96), transparent 28%),
    linear-gradient(155deg, #f8fdf8 0%, #e4f3e7 44%, #fff9e8 100%);
  color-scheme: light;
  opacity: 1;
  visibility: visible;
  transition: opacity .42s ease, visibility .42s ease;
  isolation: isolate;
}
.brand-splash.is-leaving { opacity: 0; visibility: hidden; pointer-events: none; }
.brand-splash-content {
  position: relative;
  z-index: 2;
  display: grid;
  width: min(360px, 100%);
  justify-items: center;
  text-align: center;
  transform: translateY(-2vh);
}
.brand-mark {
  position: relative;
  width: 94px;
  height: 94px;
  margin-bottom: 28px;
  animation: brand-float 3.8s ease-in-out infinite;
}
.brand-lens {
  position: absolute;
  inset: 8px 20px 20px 8px;
  border: 6px solid rgba(40,145,99,.9);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255,255,255,.92), rgba(177,225,194,.38));
  box-shadow: 0 14px 34px rgba(45,126,85,.18), inset 0 0 0 8px rgba(255,255,255,.5);
}
.brand-lens::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -17px;
  width: 32px;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, #348e65, #77b88e);
  transform: rotate(45deg);
  transform-origin: left center;
}
.brand-spark { position: absolute; display: block; border-radius: 50%; background: #9bcfab; box-shadow: 0 0 0 6px rgba(155,207,171,.16); }
.brand-spark-one { top: 4px; right: 7px; width: 10px; height: 10px; }
.brand-spark-two { left: 3px; bottom: 10px; width: 7px; height: 7px; background: #ffd779; box-shadow: 0 0 0 5px rgba(255,215,121,.2); }
.brand-name,
.brand-promise,
.brand-tagline { margin: 0; font-family: "Yuanti SC", "STYuanti-SC", "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif; }
.brand-name { color: #285f46; font-size: clamp(36px, 10vw, 48px); font-weight: 600; letter-spacing: .12em; text-indent: .12em; text-shadow: 0 5px 20px rgba(45,126,85,.12); animation: brand-copy-in .7s ease both; }
.brand-promise { margin-top: 17px; color: #3a8962; font-size: clamp(20px, 5.5vw, 25px); font-weight: 500; letter-spacing: .28em; text-indent: .28em; animation: brand-copy-in .7s .12s ease both; }
.brand-tagline { margin-top: 11px; color: #718672; font-size: clamp(15px, 4.2vw, 18px); font-weight: 400; letter-spacing: .34em; text-indent: .34em; animation: brand-copy-in .7s .24s ease both; }
.brand-loading-dots { display: flex; gap: 7px; height: 10px; margin-top: 42px; align-items: center; }
.brand-loading-dots i { width: 6px; height: 6px; border-radius: 50%; background: #60aa7b; animation: brand-dot 1.35s ease-in-out infinite; }
.brand-loading-dots i:nth-child(2) { background: #9bcfab; animation-delay: .16s; }
.brand-loading-dots i:nth-child(3) { background: #d5b76a; animation-delay: .32s; }
.brand-load-status { min-height: 18px; margin: 12px 0 0; color: #6d8372; font-size: 12px; letter-spacing: .05em; }
.brand-glow { position: absolute; z-index: 1; border-radius: 50%; filter: blur(2px); opacity: .55; animation: brand-drift 7s ease-in-out infinite alternate; }
.brand-glow-coral { top: 13%; right: -32px; width: 116px; height: 116px; background: rgba(166,218,182,.35); }
.brand-glow-gold { left: -28px; bottom: 16%; width: 94px; height: 94px; background: rgba(255,216,121,.4); animation-delay: -2s; }
.brand-glow-lavender { right: 8%; bottom: 8%; width: 56px; height: 56px; background: rgba(172,202,156,.35); animation-delay: -4s; }
@keyframes brand-copy-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes brand-float { 50% { transform: translateY(-7px) rotate(-1deg); } }
@keyframes brand-dot { 0%, 70%, 100% { opacity: .35; transform: scale(.75); } 35% { opacity: 1; transform: scale(1.15); } }
@keyframes brand-drift { to { transform: translate3d(14px, -18px, 0) scale(1.08); } }
@media (max-height: 560px) { .brand-mark { width: 72px; height: 72px; margin-bottom: 18px; } .brand-loading-dots { margin-top: 24px; } }
@media (prefers-reduced-motion: reduce) {
  .brand-mark,
  .brand-name,
  .brand-promise,
  .brand-tagline,
  .brand-loading-dots i,
  .brand-glow { animation: none !important; }
  .brand-splash { transition-duration: .18s; }
}

.mine-points-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-actions.mine-points-actions button { min-width: 0; min-height: 44px; background: var(--accent); color: #fff; }
.card-actions.mine-points-actions button:disabled { opacity: .5; cursor: not-allowed; }
.mine-expiry { margin: 12px 0 4px; font-size: 16px; overflow-wrap: anywhere; }
.mine-expiry-remaining { color: #d32f2f; }
.mine-points-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 10px 0; }
.mine-points-toggle input { appearance: none; -webkit-appearance: none; position: relative; flex: 0 0 44px; width: 44px; height: 26px; border: 0; border-radius: 20px; background: #999; cursor: pointer; }
.mine-points-toggle input::before { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; left: 3px; top: 3px; background: #fff; transition: transform .15s; }
.mine-points-toggle input:checked { background: var(--accent); }
.mine-points-toggle input:checked::before { transform: translateX(18px); }
.mine-points-toggle input:disabled { opacity: .5; cursor: not-allowed; }
.points-payment-entry button { border: 0; background: transparent; color: var(--accent, #00a876); padding: 0; text-decoration: underline; font: inherit; text-align: left; }
.points-payment-entry small { display: block; margin-top: 4px; }
.points-activity { overflow-wrap: anywhere; }
.points-user-dialog { box-sizing: border-box; width: min(420px, calc(100vw - 24px)); max-height: 85vh; overflow-y: auto; border: 0; border-radius: 16px; padding: 20px; color: var(--text); background: var(--surface); }
.points-user-dialog::backdrop { background: #0008; }
.points-user-dialog input { box-sizing: border-box; width: 100%; min-height: 44px; margin-top: 8px; padding: 8px; }
.points-dialog-actions { display: flex; gap: 8px; margin-top: 16px; }
.points-dialog-actions button { flex: 1; min-height: 44px; border-radius: 8px; padding: 8px; }
[data-points-error] { color: var(--danger, #e44); overflow-wrap: anywhere; }

#points-transaction-list p { overflow-wrap: anywhere; }

.mine-points-settings { min-width: 0; }
.mine-points-settings-hint { color: var(--muted); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.mine-points-settings input:disabled, .mine-points-settings button:disabled { opacity: .5; cursor: not-allowed; }
.mine-points-limit { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; margin-top: 8px; }
.mine-points-limit label { min-width: 0; font-size: 13px; }
.mine-points-limit input { width: 100%; box-sizing: border-box; min-height: 44px; margin-top: 6px; }
.mine-points-limit button { min-height: 44px; padding: 8px 12px; border: 0; border-radius: 8px; background: var(--accent); color: #fff; }
.mine-points-limit small { grid-column: 1 / -1; color: var(--muted); }

.mine-expired-label { color: #d32f2f; margin-left: 6px; }
.mine-expiry-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.mine-expiry-row .mine-expiry { flex: 1; min-width: 0; margin: 0; font-size: 16px; line-height: 1.5; }
.mine-expiry-row .mine-expired-label { margin-left: 4px; white-space: nowrap; }
.mine-expiry-row .mine-renew-contact { flex: 0 0 auto; background: var(--accent); color: #fff; min-height: 44px; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; padding: 8px; border-radius: 10px; text-decoration: none; font-size: 12px; white-space: nowrap; }

.existing-preview-controls { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 16px 4px 4px; background: rgba(20,30,32,.55); color: #fff; font-size: 10px; text-align: center; }
.existing-preview-controls button { padding: 3px 5px; font-size: 10px; }
.existing-media .media-remove, .existing-media .media-retry, .existing-media .media-item-status { z-index: 2; }
#existing-media-list-status button { margin-left: 8px; }

.admin-expired-label, #admin-view .badge.admin-expired-badge { color: #d32f2f; }

/* Compact overview belongs only to the owner's cards. */
.mine-card-summary { display: flex; align-items: stretch; gap: 10px; }
.mine-card-summary > .listing-detail-cover { align-self: flex-end; display: block; flex: 0 0 50%; width: 50%; min-width: 0; height: auto; max-height: 23vh; margin: 0; border-radius: 8px; }
.mine-card-info { display: flex; flex: 1 1 0; min-width: 0; flex-direction: column; gap: 8px; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.mine-card-info .mine-card-head { display: flex; align-items: center; gap: 3px; width: 100%; min-width: 0; line-height: 20px; }
.mine-card-info .mine-card-head > strong { min-width: 1em; font-size: calc(14px * 4 / 3); }
.mine-card-code { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: calc(10px * 4 / 3); white-space: nowrap; }
.mine-card-info .status { align-self: flex-start; margin-top: auto; line-height: 20px; flex: 0 0 auto; font-size: calc(11px * 4 / 3); }
.mine-card-row { display: block; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 20px; }
.mine-card-info .meta { margin: 0; font-size: 12px; }
.mine-card-info .price { font-size: 12px; }
.mine-listing-card > .tags:not(:empty) { margin-top: 10px; }
.mine-summary-full { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; }
@media (max-width: 350px) {
  .mine-card-info .mine-card-head > strong { font-size: calc(12px * 4 / 3); }
  .mine-card-code { font-size: calc(9px * 4 / 3); }
  .mine-card-info .status { font-size: calc(10px * 4 / 3); }
}


/* Payment is a compact card, independent of the full-screen dialog defaults. */
.points-payment-dialog {
  inset: 50% auto auto 50%; transform: translate(-50%, -50%); margin: 0;
  width: min(440px, calc(100vw - 28px)); height: auto;
  max-height: min(88vh, 760px); max-height: min(88dvh, 760px);
  padding: 24px; border: 1px solid #b9ddcf; border-radius: 26px;
  background: linear-gradient(155deg, #eaf7f0 0%, #f8fcf9 32%, #fffdf7 100%);
  box-shadow: 0 24px 70px #153e302b, inset 0 0 0 4px #ffffffa6;
  overscroll-behavior: contain; scroll-padding: 20px; overflow-wrap: anywhere;
}
.points-payment-dialog::backdrop { background: #142d2866; backdrop-filter: blur(3px); }
.points-payment-dialog h3 { margin: 0 0 20px; font-size: 21px; letter-spacing: .02em; }
.points-payment-recipient { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; min-width: 0; }
.points-payment-avatar { display: grid; place-items: center; flex: 0 0 42px; height: 42px; border-radius: 14px; background: #d7eee2; color: #187451; border: 1px solid #b5d6c4; font-weight: 700; }
.points-payment-recipient > div { flex: 1; min-width: 0; }
.points-payment-recipient > div strong { display: block; font-size: 17px; line-height: 1.5; }
.points-payment-recipient > div > span { display: block; color: #74847b; font-size: 12px; margin-top: 1px; }
.points-payment-tag { flex: 0 0 auto; color: #247756; background: #ffffffb3; border: 1px solid #c9e1d4; border-radius: 20px; padding: 5px 9px; font-size: 11px; }
.points-payment-total { display: grid; gap: 9px; padding: 20px 14px; text-align: center; border-radius: 19px; border: 1px solid #bcdcca; background: linear-gradient(120deg, #dff2e6, #edf8eb); box-shadow: inset 0 1px #fff; color: #27664b; }
.points-payment-eyebrow { color: #608474; font-size: 12px; letter-spacing: .12em; }
.points-payment-total > strong { font-size: clamp(22px, 5.8vw, 28px); line-height: 1.4; font-weight: 750; color: #106843; }
.points-payment-total > span:last-child { color: #5d7e6c; font-size: 13px; }
.points-payment-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 18px 0 20px; padding: 14px 0; background: #ffffffa6; border: 1px solid #e0e9df; border-radius: 14px; }
.points-payment-stats > div { display: grid; gap: 7px; text-align: center; min-width: 0; padding: 0 8px; }
.points-payment-stats > div + div { border-left: 1px solid #e0e9df; }
.points-payment-stats > div > span { color: #798279; font-size: 12px; }
.points-payment-stats strong { font-size: 19px; font-variant-numeric: tabular-nums; }
.points-payment-stats small { margin-left: 4px; font-size: 11px; color: #7d867e; font-weight: 400; }
.points-payment-label { display: block; margin-bottom: 9px; font-size: 13px; font-weight: 650; }
.points-payment-input { display: flex; align-items: center; gap: 8px; padding: 0 14px; background: #fff; border: 1px solid #cbdcd0; border-radius: 13px; box-shadow: 0 2px 5px #274c3210; }
.points-payment-input:focus-within { border-color: #29956b; box-shadow: 0 0 0 3px #29956b1a; }
.points-payment-dialog .points-payment-input input { flex: 1; min-width: 0; width: 0; margin: 0; padding: 13px 0; min-height: 52px; border: 0; outline: none; background: transparent; box-shadow: none; font-size: 20px; color: #20392b; border-radius: 0; }
.points-payment-dialog .points-payment-input input::placeholder { font-size: 14px; color: #9aa79c; }
.points-payment-input > span { color: #859184; font-size: 13px; }
.points-payment-dialog [data-payment-hint] { margin: 12px 0 0; font-size: 12px; line-height: 1.6; color: #738274; }
.points-payment-dialog [data-payment-hint].is-warning { padding: 10px 12px; border: 1px solid #ead7ac; border-radius: 10px; background: #fff5df; color: #8d661d; }
.points-payment-dialog [data-points-error]:empty { display: none; }
.points-payment-dialog [data-points-error]:not(:empty) { color: #a83f3f; padding: 10px 12px; border: 1px solid #eccdcd; border-radius: 10px; background: #fff0ed; font-size: 13px; line-height: 1.6; }
.points-payment-dialog .points-dialog-actions { margin-top: 22px; padding-top: 18px; border-top: 1px solid #dce8dc; gap: 10px; }
.points-payment-dialog .points-dialog-actions button { min-width: 0; min-height: 48px; padding: 11px 8px; border-radius: 12px; font-size: 14px; font-weight: 650; line-height: 1.5; }
.points-payment-dialog [data-points-cancel] { flex: .7; color: #647469; border: 1px solid #d0ddd2; background: #ffffffb3; }
.points-payment-dialog [data-points-confirm] { flex: 1.3; background: #15865c; color: white; border: 1px solid #10754e; box-shadow: 0 4px 10px #15865c20; }
.points-payment-dialog [data-points-confirm]:disabled { opacity: 1; color: #81988a; background: #dbe9df; border-color: #d0ded4; box-shadow: none; cursor: not-allowed; }
.points-payment-dialog button:focus-visible { outline: 3px solid #2689af; outline-offset: 3px; }
.points-payment-success { padding: 10px 0; text-align: center; }
.points-payment-success > span { display: grid; place-items: center; width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 50%; color: #187451; background: #d7eee2; border: 1px solid #b5d6c4; font-size: 30px; }
.points-payment-success h4 { font-size: 22px; margin: 12px 0; }
.points-payment-success p { font-size: 14px; line-height: 1.7; color: #647469; }
@media (max-width: 350px) { .points-payment-dialog { padding: 20px 16px; border-radius: 22px; } .points-payment-tag { display: none; } }

/* Mint and warm-white treatment scoped to the application page. */
#submit-view {
  background: radial-gradient(ellipse 80% 360px at 0 0, #dcefe2 0%, transparent 100%),
    linear-gradient(165deg, #edf6ef 0%, #faf8f0 55%, #f1f7ef 100%);
}
#submit-view .application-title {
  background: linear-gradient(110deg, #f5fcf7, #fffdf7);
  border-bottom-color: #cdddce; color: #254735;
  box-shadow: 0 2px 8px #294c3210;
}
#submit-view .application-form { gap: 16px; padding-top: 16px; }
#submit-view .application-card {
  border: 1px solid #c9dfcf; border-top: 3px solid #9ccbb1; border-radius: 20px;
  background: radial-gradient(ellipse 140px 100px at 100% 0, #e9f6ed99, transparent),
    linear-gradient(150deg, #ffffff 0%, #fffcf6 100%);
  box-shadow: 0 6px 18px #274f3210, inset 0 0 0 3px #ffffffb3;
}
#submit-view .application-card:nth-of-type(2) {
  border-top-color: #d7cba2;
  background: radial-gradient(ellipse 150px 100px at 100% 0, #f6edce66, transparent),
    linear-gradient(155deg, #fffef9, #f9fcf7);
}
#submit-view .application-card .form-row { border-bottom-color: #e0e9df; transition: background-color .15s, border-color .15s; }
#submit-view .application-card .form-row:focus-within { background-color: #edf7ef; border-bottom-color: #8ec8a6; border-radius: 7px; }
#submit-view .application-card .row-label { color: #304638; }
#submit-view .application-card .form-row > input:focus,
#submit-view .application-card .form-row textarea:focus,
#submit-view .application-card .input-with-unit input:focus { box-shadow: inset 0 -2px #3a9d70; }
#submit-view .application-card input::placeholder,
#submit-view .application-card textarea::placeholder { color: #8f9d91; }
#submit-view .input-with-unit b { color: #78887a; }
#submit-view .qualification-option span { background: #fbfefb; color: #476050; border-color: #cadfd0; box-shadow: 0 2px 4px #294b3310; }
#submit-view .qualification-option input:checked + span { color: #fff; border-color: #238b5f; background: linear-gradient(145deg, #2da773, #18845a); box-shadow: 0 3px 7px #25895725; }
#submit-view .qualification-option input:focus-visible + span { outline: 3px solid #3786a1; outline-offset: 2px; }
#submit-view .location-picker strong { color: #50735c; }
#submit-view .location-picker > b { color: #4a8d67; }
#submit-view .card-section-heading { border-bottom: 1px solid #e2ebdf; margin-bottom: 8px; }
#submit-view .card-section-heading strong, #submit-view .media-heading strong { color: #305a40; }
#submit-view .tag-grid span::before { border-color: #aecab7; border-radius: 5px; background: #fbfefb; }
#submit-view .tag-grid input:checked + span { color: #236d48; }
#submit-view .tag-grid input:checked + span::before { background: #269261; border-color: #269261; box-shadow: inset 0 0 0 4px #f9fdf9; }
#submit-view .tag-grid input:focus-visible + span { outline: 2px solid #3786a1; outline-offset: 2px; border-radius: 4px; }
#submit-view .media-card { border-top-color: #a8cbb9; }
#submit-view .media-block + .media-block { border-top-color: #dce7dc; }
#submit-view .upload-tile { border-color: #97bea5; background: linear-gradient(145deg, #f0faf2, #fffdf5); color: #4a785a; box-shadow: inset 0 0 0 3px #ffffff99; }
#submit-view .upload-tile:focus-within { outline: 3px solid #3786a1; outline-offset: 2px; }
#submit-view .verification-script { border-color: #bdd8c5; background: linear-gradient(110deg, #e6f5ea, #f6faec); }
#submit-view .verification-visibility { padding: 12px; border: 1px solid #d4e3d5; border-radius: 12px; background: #f7fcf6; }
#submit-view .verification-visibility legend { padding: 0 5px; }
#submit-view .application-submit-bar {
  border-top: 1px solid #bbd5c4;
  background: linear-gradient(110deg, #f0f9f2, #fffdf6);
  box-shadow: 0 -5px 20px #294f3210;
}
#submit-view #submit-listing-button { min-height: 48px; border: 1px solid #128055; border-radius: 14px; background: linear-gradient(120deg, #16845c, #126e4b); box-shadow: 0 4px 10px #17895f20, inset 0 1px #ffffff33; }
#submit-view #submit-listing-button:disabled { box-shadow: none; }
#submit-view #cancel-edit { color: #457653; }
@media (prefers-reduced-motion: reduce) { #submit-view .application-card .form-row { transition: none; } }

/* Shared mint / warm-white surfaces for all Mini App pages. */
:root { --mint-line: #ccdfd1; --mint-surface: #fffef9; --mint-shadow: 0 6px 20px #294f3210; }
body { background: linear-gradient(150deg, #edf6ef, #faf8f0 65%, #f0f7ef); }
.topbar, .home-tabs, .tabbar { background: linear-gradient(110deg, #f5fcf7, #fffdf6); border-color: var(--mint-line); }
.topbar { box-shadow: 0 2px 10px #274f3210; }
.topbar .round-button { border: 1px solid #d3e3d6; background: #edf7ef; }
.tabbar { box-shadow: 0 -4px 16px #294f320c; }
.tabbar button.active { border-radius: 12px; background: #e4f2e8; }
.home-tabs button.active { background: linear-gradient(0deg, #e6f3e9, transparent); border-radius: 10px 10px 0 0; }
#search-view, #mine-view { background: radial-gradient(ellipse 80% 280px at 0 0, #e0f0e4, transparent), linear-gradient(155deg, #f0f7ef, #fcf9f1); }
:is(#search-view, #mine-view) :is(.form-card, .listing-card) { border: 1px solid var(--mint-line); background: linear-gradient(145deg, #fff, #fffdf6); box-shadow: var(--mint-shadow); border-radius: 20px; }
.sponsor-card { background: linear-gradient(140deg, #fffdf2, #fff); box-shadow: var(--mint-shadow); }
.featured-card, .profile-card { border: 1px solid #c9ddcd; border-radius: 18px; box-shadow: var(--mint-shadow); }
.featured-card.submit-card { background: linear-gradient(135deg, #277d60, #62b58a); }
.profile-placeholder { background: radial-gradient(circle at 70% 20%, #6da58b, transparent 50%), linear-gradient(145deg, #315947, #1c3b31); }
.map-panel { border-color: #c3dccb; background: linear-gradient(145deg, #e2f2e7, #fffdf3); box-shadow: var(--mint-shadow), inset 0 0 0 3px #ffffff88; }
.map-panel .map-stage { border-color: #c4dccc; }
.map-panel .map-toolbar select { background: #fffffff0; border-color: #c6ddce; }
.map-panel .map-legend > strong { border: 1px solid #bee1ce; }
.map-fallback { background: #fffbef; border-color: #e4d8b4; }
#mine-view .card-actions :is(button,a):not(.danger) { border: 1px solid #d0e1d5; background-color: #edf7ef; }
#mine-view .mine-points-actions button { background-color: var(--accent); background-image: linear-gradient(120deg, #16845c, #126e4b); border-color: #168a60; color: white; }
#mine-view .mine-points-toggle { padding: 12px 10px; background: #f1f8ef; border: 1px solid #d9e7d7; border-radius: 12px; }
#mine-view .mine-points-limit { background: #fbfdf7; border-radius: 12px; }
#search-view .section-title, #mine-view .section-title { color: #315a40; }
.listing-dialog-shell { border: 1px solid #bdd9c7; background: linear-gradient(150deg, #eff8f1, #fffdf6); box-shadow: 0 -8px 30px #203f3020, inset 0 0 0 3px #ffffff88; }
#listing-dialog .listing-dialog-shell > header { background: linear-gradient(110deg, #edf8f0, #fffdf6); border-bottom: 1px solid #d0e2d5; }
.dialog-close { border: 1px solid #c9dfd0; color: #436e53; background: #f7fcf7; }
.public-detail-head { color: #2c4c37; }
.detail-facts { padding: 4px 12px; background: #ffffffb3; border: 1px solid #dce7db; border-radius: 13px; }
.detail-facts > div { border-bottom-color: #e2eade; }
.description-details { padding: 12px; background: #f8fbf1; border: 1px solid #dbe6d1; border-radius: 12px; }
.detail-primary-actions a { border: 1px solid #168a60; background-image: linear-gradient(120deg, #16845c, #126e4b); }
#location-dialog, #edit-dialog { background: linear-gradient(145deg, #eff8f1, #fffdf5); }
.dialog-shell > header, #location-dialog .dialog-shell > header { background: linear-gradient(110deg, #edf8f0, #fffdf6); border-bottom: 1px solid #cddfd1; }
#location-dialog .form-card { border: 1px solid #cddfd1; background: #fffef9; box-shadow: var(--mint-shadow); }
.points-user-dialog:not(.points-payment-dialog), .cloud-secret-dialog {
  inset: 50% auto auto 50%; transform: translate(-50%, -50%); margin: 0; height: auto;
  max-height: 88vh; max-height: 88dvh; border: 1px solid #bfdac8; border-radius: 22px;
  background: linear-gradient(145deg, #edf8f0, #fffdf5); box-shadow: 0 24px 70px #153e302b, inset 0 0 0 3px #ffffff99;
}
.points-user-dialog:not(.points-payment-dialog) h3 { color: #305a40; }
.points-user-dialog:not(.points-payment-dialog) input { border-color: #c8dccd; background: #fff; }
.points-user-dialog:not(.points-payment-dialog) .points-dialog-actions { padding-top: 16px; border-top: 1px solid #d3e2d4; }
.points-user-dialog:not(.points-payment-dialog) [data-points-cancel] { color: #52715b; background: #fffdf8; border: 1px solid #cddfd1; }

/* Keep payment editing inside the visible area above the software keyboard. */
.points-payment-dialog {
  top: calc(var(--payment-visible-top, 0px) + var(--payment-visible-height, 100dvh) / 2);
  max-height: min(calc(var(--payment-visible-height, 100dvh) - 24px), 760px);
  scroll-padding-block: 16px 80px;
}
.points-payment-dialog.payment-input-active {
  top: calc(var(--payment-visible-top, 0px) + 12px);
  transform: translateX(-50%); padding: 16px 20px; border-radius: 22px;
}
.payment-input-active h3 { margin-bottom: 10px; font-size: 18px; }
.payment-input-active .points-payment-recipient { margin-bottom: 10px; gap: 8px; }
.payment-input-active .points-payment-avatar { flex-basis: 32px; height: 32px; border-radius: 10px; }
.payment-input-active .points-payment-total { padding: 9px 12px; gap: 3px; border-radius: 12px; }
.payment-input-active .points-payment-total > strong { font-size: 21px; }
.payment-input-active .points-payment-eyebrow { display: none; }
.payment-input-active .points-payment-stats { margin: 10px 0; padding: 8px 0; }
.payment-input-active .points-payment-stats > div { gap: 3px; }
.payment-input-active .points-payment-label { margin-bottom: 5px; }
.payment-input-active [data-payment-hint] { margin-top: 6px; }
.payment-input-active [data-payment-hint].is-warning { padding: 6px 8px; }
.points-payment-dialog.payment-input-active .points-dialog-actions {
  position: sticky; bottom: -16px; z-index: 2; margin-top: 10px; padding: 10px 0 6px;
  background: #f8fcf7;
}
.payment-input-active #points-dialog-title { display: none; }
.payment-input-active .points-payment-total > span:last-child { display: none; }
.payment-input-active .points-payment-stats > div { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px; }
.payment-input-active .points-payment-stats > div > span { font-size: 11px; }
.payment-input-active .points-payment-stats strong { font-size: 16px; }
.payment-input-active .points-payment-stats small { display: none; }
.points-payment-dialog.payment-input-active { padding: 12px 16px; }
.payment-input-active .points-payment-recipient { margin-bottom: 8px; }
.points-payment-dialog.payment-input-active .points-payment-input input { min-height: 46px; padding-block: 10px; }
.points-payment-dialog.payment-input-active .points-dialog-actions { bottom: -12px; }
.points-payment-dialog.payment-input-active .points-dialog-actions button { min-height: 44px; padding-block: 9px; }

/* Public listing detail: clear information groups within the mint theme. */
#listing-dialog .listing-dialog-shell { padding-inline: 16px; border-radius: 24px 24px 0 0; }
#listing-dialog .listing-dialog-shell > header { margin-inline: -16px; padding: 12px 18px; font-size: 15px; }
#listing-dialog .dialog-close { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid #cfe0d4; background: #ffffffb3; color: #53745e; line-height: 1; }
#listing-dialog .dialog-close:focus-visible { outline: 3px solid #248b66; outline-offset: 2px; }
.public-detail { color: #283d30; overflow-wrap: anywhere; }
.public-detail .public-media-gallery { margin: 14px 0 18px; gap: 6px; border-radius: 16px; background: #dce8dd; }
.public-detail .public-media-gallery > img, .public-detail .public-media-gallery > figure { border-radius: 10px; }
.public-detail .public-media-gallery img, .public-detail .public-media-gallery video { object-fit: contain; }
.public-detail .public-media-gallery figcaption { bottom: 38px; font-size: 10px; }
.detail-overview { margin-top: 16px; }
.public-detail-head > div { min-width: 0; }
.public-detail .public-detail-head strong { font-size: 23px; line-height: 1.4; }
.public-detail .public-detail-head small { color: #7b8d80; font-size: 12px; letter-spacing: .04em; }
.public-detail .public-detail-head .status { flex-shrink: 0; font-size: 12px; margin-top: 3px; }
.public-detail .map-location-warning { margin: 14px 0 16px; padding: 10px 12px; border: 1px solid #d5e9dd; background: #e6f3ec; color: #326f53; }
.public-detail .map-location-warning span { display: block; font-size: 13px; font-weight: 600; }
.public-detail .map-location-warning small { display: block; margin-top: 3px; color: #789783; font-size: 11px; }
.detail-pricing { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); border: 1px solid #d1e2d4; border-radius: 16px; background: linear-gradient(120deg,#fffef9,#f2f8f0); padding: 16px 0; }
.public-detail .detail-price { min-width: 0; padding: 0 16px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; }
.public-detail .detail-price + .detail-price { border-left: 1px solid #dce7da; }
.public-detail .detail-price > span { flex-basis: 100%; font-size: 11px; color: #788873; margin-bottom: 4px; }
.public-detail .detail-price > strong { font-size: clamp(19px,5.4vw,25px); line-height: 1.35; color: #2e6546; }
.public-detail .detail-price > small { color: #86917f; font-size: 10px; font-weight: 400; }
.detail-points-card { margin-top: 12px; padding: 12px 14px; border: 1px solid #c7e2d2; border-radius: 14px; background: #e9f6ee; }
.public-detail .points-payment-entry { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; font-size: 13px; }
.public-detail .points-payment-entry strong { font-weight: 650; color: #386b4d; }
.public-detail .points-payment-entry button { min-height: 36px; flex-shrink: 0; padding: 7px 11px; border: 1px solid #b8d8c6; border-radius: 10px; background: #ffffffb3; color: #18744f; text-decoration: none; font-size: 12px; font-weight: 650; }
.public-detail .points-payment-entry small { color: #758779; font-size: 11px; line-height: 1.5; }
.public-detail .points-activity { margin: 9px 0 0; padding-top: 9px; border-top: 1px solid #cfe5d7; font-size: 12px; color: #30744d; }
.public-detail .detail-facts { margin: 14px 0; padding: 0 12px; border-color: #d7e4d8; background: #ffffffb3; border-radius: 14px; }
.public-detail .feedback-fact { grid-template-columns: minmax(68px,1fr) auto !important; padding: 12px 0; border: 0; }
.public-detail .feedback-fact dt { font-size: 12px; color: #748576; }
.public-detail .feedback-fact dd { display: flex; align-items: center; gap: 12px; font-size: 12px; }
.public-detail .homework-open-button { min-height: 36px; padding: 7px 12px; border-radius: 10px; }
.public-detail .detail-tags { gap: 7px; margin: 16px 0; }
.public-detail .detail-tags span { padding: 5px 9px; font-size: 11px; line-height: 1.5; color: #4f8267; background: #e5f2e9; border: 1px solid #d5e8db; border-radius: 9px; }
.public-detail .description-details { padding: 13px 14px; border: 1px solid #d8e4d0; background: #f8fbf2; }
.public-detail .description-details summary { min-height: 20px; font-size: 13px; }
.public-detail .description-details p { color: #566a57; line-height: 1.8; }
.public-detail .detail-primary-actions { gap: 10px; margin-top: 18px; }
.public-detail .detail-primary-actions a { min-width: 0; padding: 13px 8px; border-radius: 13px; }
.public-detail .detail-primary-actions a:only-child { grid-column: 1 / -1; }
@media (max-width: 350px) { .public-detail .detail-price { padding-inline: 12px; } .public-detail .feedback-fact dd { gap: 8px; } }

/* Detail carousel uses native horizontal scrolling, with vertical page scrolling retained. */
html.detail-media-open { touch-action: pan-x pan-y pinch-zoom; }
.public-detail .public-media-viewer { margin: 14px 0 18px; }
.public-detail .public-media-gallery {
  display: flex; gap: 0; margin: 0; height: min(54dvh, 480px); overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none;
  touch-action: pan-x pan-y pinch-zoom; background: #e3ede4; border: 1px solid #d0e1d3;
}
.public-detail .public-media-gallery::-webkit-scrollbar { display: none; }
.public-media-slide { flex: 0 0 100%; min-width: 0; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; }
.public-media-slide > img, .public-media-slide > figure { width: 100%; height: 100%; margin: 0; background: #e3ede4; }
.public-media-slide > figure { position: relative; }
.public-detail .public-media-slide img, .public-detail .public-media-slide video { width: 100%; height: 100%; object-fit: contain; }
.public-media-toolbar { display: flex; justify-content: center; align-items: center; gap: 16px; padding-top: 8px; }
.public-media-toolbar button { width: 40px; height: 36px; padding: 0; border-radius: 10px; border: 1px solid #cfe1d4; background: #ffffffb3; color: #356a4c; font-size: 24px; }
.public-media-toolbar button[hidden] { display: none; }
.public-media-toolbar button:disabled { opacity: .4; }
.public-media-toolbar output { min-width: 54px; text-align: center; color: #748578; font-size: 12px; font-variant-numeric: tabular-nums; }
.public-media-gallery:focus-visible, .public-media-toolbar button:focus-visible { outline: 3px solid #248b66; outline-offset: 2px; }
.public-detail .detail-feedback-links { display: block; padding: 0 0 12px; border: 0; }
.detail-feedback-links dd { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-feedback-links a { display: inline-flex; padding: 7px 4px; min-height: 36px; align-items: center; color: #18744f; background: #e9f6ee; border: 1px solid #cde3d4; border-radius: 9px; text-decoration: none; font-size: 12px; }
.feedback-empty { font-size: 12px; color: #7c8b7e; }
.detail-feedback-links .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Feedback links start at the top left; the writing action has its own column. */
.public-detail .feedback-compact { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px; padding: 12px; }
.public-detail .feedback-compact .detail-feedback-links { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; padding: 0; border: 0; }
.feedback-compact .homework-open-button { align-self: start; }
.feedback-compact .feedback-empty { display: inline-flex; align-items: center; min-height: 36px; }

/* Clear personal-profile summary and one compact points settings block. */
.mine-listing-card { padding: 14px; }
.mine-listing-card .mine-card-summary { display: grid; grid-template-columns: minmax(0,.36fr) minmax(0,.64fr); gap: 12px; align-items: start; }
.mine-listing-card .mine-card-summary.without-cover { grid-template-columns: minmax(0,1fr); }
.mine-listing-card .mine-card-summary > .listing-detail-cover { align-self: start; width: 100%; height: auto; aspect-ratio: 3 / 4; max-height: 210px; border-radius: 12px; object-fit: cover; margin: 0; }
.mine-listing-card .mine-card-info { gap: 6px; width: 100%; }
.mine-listing-card .mine-card-head { flex-direction: column; align-items: flex-start; gap: 2px; }
.mine-listing-card .mine-card-head > strong { font-size: 20px; line-height: 1.35; overflow-wrap: anywhere; }
.mine-listing-card .mine-card-code { font-size: 11px; line-height: 1.5; color: #829084; }
.mine-listing-card .mine-card-row { white-space: normal; overflow: visible; overflow-wrap: anywhere; }
.mine-listing-card .mine-card-info .meta { font-size: 12px; line-height: 1.5; color: #79867b; }
.mine-listing-card .mine-card-prices { display: grid; gap: 3px; margin-top: 2px; }
.mine-card-prices > span { display: flex; align-items: baseline; gap: 5px; min-width: 0; }
.mine-card-prices strong { font-size: 16px; color: #315b42; line-height: 1.4; overflow-wrap: anywhere; }
.mine-card-prices small { flex-shrink: 0; font-size: 11px; font-weight: 400; color: #7d8b7e; }
.mine-listing-card .mine-card-info .status { margin-top: 3px; font-size: 13px; line-height: 1.5; }
.mine-listing-card > .tags { margin-top: 14px; gap: 6px; }
.mine-listing-card > .tags span { font-size: 11px; padding: 4px 7px; border-radius: 8px; }
.mine-listing-card .mine-expiry { margin: 12px 0; padding: 9px 10px; border: 1px solid #e0e7d8; border-radius: 10px; background: #f8faf2; font-size: 13px; line-height: 1.6; }
.mine-listing-card .mine-expiry-row .mine-expiry { margin: 0; font-size: 13px; }
.mine-listing-card .mine-points-actions { margin-top: 12px; gap: 8px; }
.mine-listing-card .mine-points-actions button, #mine-view .mine-listing-card .mine-points-actions button { min-height: 44px; border-radius: 11px; font-size: 13px; color: #426d52; border: 1px solid #cbded0; background: #eef6ef; background-image: none; box-shadow: none; }
.mine-listing-card .mine-points-actions [data-points-renew], #mine-view .mine-listing-card .mine-points-actions [data-points-renew] { color: #fff; background: linear-gradient(120deg,#18835b,#126e4b); border-color: #168157; }
.mine-listing-card .mine-points-settings { margin-top: 14px; padding: 12px; border: 1px solid #d3e4d7; border-radius: 13px; background: #f5faf1; }
.mine-listing-card .mine-points-toggle, #mine-view .mine-listing-card .mine-points-toggle { margin: 0; padding: 0 0 10px; min-height: 36px; border: 0; border-bottom: 1px solid #dbe7d8; border-radius: 0; background: transparent; font-size: 13px; font-weight: 650; }
.mine-listing-card .mine-points-limit { margin-top: 10px; gap: 8px; }
.mine-listing-card .mine-points-limit label { font-size: 12px; line-height: 1.5; color: #617c65; }
.mine-listing-card .mine-points-limit input { min-width: 0; min-height: 44px; padding: 10px 12px; font-size: 16px; border: 1px solid #cddfd0; border-radius: 10px; background: #fff; }
.mine-listing-card .mine-points-limit button { min-height: 44px; border-radius: 10px; padding: 10px 12px; font-size: 13px; background: #18835b; }
.mine-listing-card .mine-points-settings-hint { margin-bottom: 0; font-size: 12px; }
.mine-listing-card .mine-card-head > strong { max-width: 100%; }

/* Detail sheets own vertical scrolling while the original page is frozen. */
html.detail-scroll-locked { overscroll-behavior: none; touch-action: pan-x pan-y pinch-zoom; }
#listing-dialog { inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; overflow: hidden; overscroll-behavior: none; }
#listing-dialog .listing-dialog-shell { overflow-y: auto; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; max-height: min(88dvh,calc(var(--visual-viewport-height,100dvh) - 20px)); bottom: max(0px,calc(100dvh - var(--visual-viewport-height,100dvh))); }


/* Full-width navigation and safe area share the Telegram host bottom color. */
:root { --nav-surface: #f5fcf7; --nav-active: #e4f2e8; }
html { background-color: var(--nav-surface); }
body { min-height: 100vh; min-height: 100dvh; }
.tabbar { width: 100%; padding-inline: max(10px,calc((100vw - 740px) / 2)); padding-bottom: calc(8px + max(env(safe-area-inset-bottom),var(--tg-safe-area-inset-bottom,0px))); background: linear-gradient(110deg, #f5fcf7, #fffdf6); border-color: var(--mint-line); box-shadow: 0 -4px 16px #294f320c; }
.tabbar button { min-height: 48px; color: var(--muted); background: transparent; }
.tabbar button.active { color: var(--accent); background: var(--nav-active); border-radius: 12px; }
.tabbar button:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: -2px; }
/* Location remains scrollable while exposing a genuine dismissible backdrop. */
#location-dialog { background: transparent; overflow: hidden; }
#location-dialog .dialog-shell { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: min(760px,100%); min-height: 0; height: 90dvh; max-height: 90dvh; border-radius: 24px 24px 0 0; border: 1px solid #c7ddce; overflow-y: auto; overscroll-behavior-y: contain; background: linear-gradient(145deg,#edf8f0,#fffdf5); }
#location-dialog .dialog-shell > header { padding-top: 14px; }
/* Renewal: compact balance, clear preview and keyboard-safe controls. */
.points-renewal-dialog { padding: 22px; width: min(440px,calc(100vw - 28px)); }
.points-renewal-dialog h3 { margin: 0 0 18px; font-size: 20px; }
.renewal-balance { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; padding: 16px; border: 1px solid #cce1d1; border-radius: 16px; background: #e4f2e8; }
.renewal-balance > div { flex: 1; display: grid; gap: 4px; }
.renewal-balance > div > span { color: #627a6a; font-size: 12px; }
.renewal-balance strong { color: #185b41; font-size: 30px; line-height: 1.25; }
.renewal-balance small { margin-left: 6px; font-size: 12px; font-weight: 400; }
.renewal-protected { color: #52735e; font-size: 12px; padding: 6px 8px; border-radius: 8px; background: #ffffff9e; }
.renewal-rule { margin: 12px 0 18px; font-size: 12px; color: #6b7e6e; }
.renewal-label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 650; }
.renewal-input { position: relative; }
.renewal-input > span { position: absolute; right: 14px; top: 17px; font-size: 13px; color: #758578; pointer-events: none; }
.points-renewal-dialog .renewal-input input { width: 100%; margin: 0; min-height: 52px; padding: 12px 52px 12px 14px; border-radius: 12px; font-size: 18px; }
[data-points-preview] { margin: 10px 0 0; font-size: 13px; color: #506b58; line-height: 1.65; }
[data-points-preview] > strong, [data-points-preview] > span { display: block; }
[data-points-preview] > strong { margin-bottom: 3px; color: #216443; font-size: 17px; }
.points-renewal-dialog [data-points-error]:empty { display: none; }
.points-renewal-dialog .points-dialog-actions { margin-top: 18px; gap: 10px; }
.points-renewal-dialog .points-dialog-actions button { min-height: 46px; border-radius: 12px; font-size: 14px; }
.points-renewal-dialog.payment-input-active { inset: var(--payment-visible-top,0px) auto auto 50%; transform: translateX(-50%); max-height: calc(var(--payment-visible-height,100dvh) - 12px); margin-top: 6px; padding: 12px 16px; }
.points-renewal-dialog.payment-input-active .renewal-balance { padding: 10px 12px; }
.points-renewal-dialog.payment-input-active .renewal-balance strong { font-size: 23px; }
.points-renewal-dialog.payment-input-active .renewal-rule { margin: 8px 0; }
.points-renewal-dialog.payment-input-active .points-dialog-actions { position: sticky; bottom: -12px; z-index: 2; background: #f8fcf7; padding: 10px 0 6px; margin-top: 10px; }

/* Marker decorations stay inside the avatar hit target. */
.map-avatar-marker > * { pointer-events: none; }

/* The independent activity switch hides all limit controls when off. */
[data-points-collapsed="true"] .mine-points-limit { display: none; }
