:root {
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  color: #35462f;
  background: #f7f8f5;
  font-synthesis: none;
  --green: #46643c;
  --muted: #7d8876;
  --line: #e3e8dc;
  --danger: #a85143;
}

* { box-sizing: border-box; }
body { margin: 0; font-size: 14px; line-height: 1.65; }
button, input, select, textarea { font: inherit; }
button, input, select { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; border: 0; background: none; touch-action: manipulation; }
button:disabled { cursor: wait; opacity: .55; }
button:focus-visible, summary:focus-visible { outline: 3px solid #a4bb78; outline-offset: 3px; }
input:focus, select:focus { outline: 2px solid #9fb99f; outline-offset: 1px; }
input:disabled, select:disabled { opacity: .65; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 28px; line-height: 1.4; letter-spacing: -.8px; font-weight: 650; }
h2 { font-size: 17px; font-weight: 650; }
h3 { font-size: 15px; }
strong { font-weight: 600; }
svg { display: block; width: 20px; height: 20px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.eyebrow { color: #718268; font-size: 10px; font-weight: 600; letter-spacing: 1.8px; margin-bottom: 10px; }
.site-header { height: 86px; background: #fcfdfb; border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1184px; margin: auto; padding: 0 32px; height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 23px; font-weight: 700; letter-spacing: -.6px; line-height: 1.25; }
.brand-mark { color: var(--green); }
.brand-mark svg { width: 36px; height: 40px; }
.brand-label { font-size: 16px; font-weight: 500; margin-left: 5px; letter-spacing: 0; }
.brand-sub { display: block; margin-top: 5px; font-size: 10px; font-weight: 400; color: var(--muted); letter-spacing: 1.5px; }
.header-caption { color: #929a8c; font-size: 12px; }
.main-content { max-width: 1120px; margin: auto; padding: 38px 0 56px; min-height: calc(100vh - 160px); }
.site-footer { max-width: 1120px; margin: auto; min-height: 74px; display: flex; align-items: center; border-top: 1px solid var(--line); color: #8c9683; font-size: 11px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 23px; }
.panel-head > div { min-width: 0; }
.panel-head > button { flex-shrink: 0; }
.page-title { margin-bottom: 8px; }
.section-title { margin-bottom: 8px; }
.primary, .secondary, .ghost, .danger { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 10px 17px; border-radius: 8px; font-size: 12px; font-weight: 500; transition: background .15s; }
.primary { background: var(--green); color: #fff; }
.primary:hover:not(:disabled) { background: #354f2d; }
.secondary { color: #526d44; background: #f3f6ed; border: 1px solid #dce4d2; }
.secondary:hover:not(:disabled) { background: #eaf0df; }
.ghost { color: #7c8b71; }
.ghost:hover:not(:disabled) { background: #f0f3ea; }
.danger { color: var(--danger); background: #fcf1ed; }
.danger:hover:not(:disabled) { background: #f9e8e1; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; font-size: 12px; font-weight: 500; }
.field input, .field select { width: 100%; min-width: 0; min-height: 42px; padding: 10px 12px; border: 1px solid #dfe6d7; border-radius: 8px; background: #fff; color: #3e4b35; font-size: 13px; font-weight: 400; }
.field input::placeholder { color: #9ba591; }
.field > .muted { font-size: 11px; font-weight: 400; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-stack { display: grid; gap: 18px; }
.inline-note { padding: 14px 17px; background: #f0f4e9; border-radius: 9px; color: #748564; font-size: 12px; line-height: 1.85; }
.inline-note .row-actions { margin-top: 10px; }
[data-navigation-guard]:not(:empty) { margin-bottom: 20px; }
.status-text { font-size: 12px; color: var(--muted); }
.status-text:empty { display: none; }
.status-text[data-type="error"] { color: var(--danger); }
.status-text[data-type="success"] { color: #567c3d; }
.empty-state { text-align: center; padding: 50px 24px; color: var(--muted); }
.empty-state h2, .empty-state h3 { margin-bottom: 8px; color: #5f7251; }
.empty-state p { margin: 10px 0 18px; font-size: 13px; }
.error-title { font-size: 23px; }
.login-card { max-width: 430px; padding: 32px; margin: 48px auto; }
.login-card .muted { font-size: 12px; margin-bottom: 26px; }
.login-card .primary { width: 100%; min-height: 44px; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 7px; border-bottom: 1px solid var(--line); padding-bottom: 15px; margin-bottom: 24px; }
.admin-tabs button { padding: 10px 19px; min-height: 42px; border-radius: 8px; color: #7f8c73; font-size: 13px; }
.admin-tabs button:hover { background: #edf2e7; }
.admin-tabs button.active { background: var(--green); color: #fff; }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px; font-size: 12px; }
.stat-card strong { display: block; font-size: 28px; color: #49623c; font-weight: 500; margin-top: 6px; }
.admin-toolbar { display: grid; grid-template-columns: 1fr 1fr 1.5fr; gap: 18px; margin: 18px 0; }
.table-wrap { overflow: auto; -webkit-overflow-scrolling: touch; }
.orders-table { border-collapse: collapse; width: 100%; font-size: 12px; text-align: left; white-space: nowrap; }
.orders-table th { font-weight: 400; color: #8a9780; padding: 13px 12px; background: #f5f7f0; }
.orders-table td { padding: 18px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.orders-table tbody tr:last-child td { border-bottom: 0; }
.orders-table .muted { font-size: 11px; max-width: 210px; white-space: normal; overflow-wrap: anywhere; }
.orders-table .row-actions { margin-top: 8px; flex-wrap: nowrap; }
.orders-table details { max-width: 210px; white-space: normal; }
summary { cursor: pointer; color: #6d825d; margin-top: 5px; }
details p { margin-top: 7px; }
.badge { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 5px; font-size: 10px; font-weight: 400; background: #f1f3ed; color: #86917b; white-space: nowrap; }
.badge.green { background: #edf4e7; color: #608343; }
.badge.gray { background: #f0f1ee; color: #89927f; }
.row-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.row-actions button { padding: 7px 12px; font-size: 11px; }
.range-row { display: flex; align-items: end; gap: 14px; margin: 12px 0; }
.range-row .field { flex: 1; }
.range-row > .muted { padding-bottom: 10px; }
.range-row > button { margin-bottom: 1px; }
.mobile-orders { display: none; }
.order-card { padding: 18px 0; border-bottom: 1px solid var(--line); }
.order-card:last-child { padding-bottom: 0; border-bottom: 0; }
.order-card-head, .order-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.order-card-head { margin-bottom: 12px; }
.order-card-head > strong { font-size: 13px; }
.order-card-details { margin: 10px 0; overflow-wrap: anywhere; font-size: 13px; }
.order-card-details .muted { margin-top: 3px; }
.order-card-footer { align-items: start; margin-top: 15px; flex-wrap: wrap; }
.order-card-footer > div { min-width: 0; }
.order-card-footer strong { font-size: 14px; }
.order-card-footer .row-actions { margin-left: auto; }
.toast { position: fixed; z-index: 20; bottom: 28px; left: 50%; transform: translateX(-50%); max-width: calc(100vw - 36px); padding: 13px 20px; border-radius: 10px; background: #3e5935; color: white; font-size: 13px; box-shadow: 0 6px 24px #273b2726; overflow-wrap: anywhere; }
.toast.error { background: #9b5548; }
.toast[hidden] { display: none; }

@media (max-width: 1180px) {
  .main-content, .site-footer { margin-left: 28px; margin-right: 28px; }
}

@media (max-width: 760px) {
  .site-header { height: 76px; }
  .header-inner { padding: 0 20px; }
  .header-caption { display: none; }
  .main-content, .site-footer { margin-left: 20px; margin-right: 20px; }
  .main-content { padding-top: 28px; min-height: calc(100vh - 148px); }
  .site-footer { min-height: 72px; font-size: 10px; }
  .panel { padding: 20px; }
  .panel-head { gap: 12px; }
  .panel-head .muted { font-size: 12px; }
  h1 { font-size: 24px; }
  .admin-layout > .panel-head { align-items: start; }
  .admin-layout > .panel-head > button { padding: 8px 4px; }
  .stats-grid { gap: 10px; }
  .stat-card { padding: 16px 12px; font-size: 11px; }
  .stat-card strong { font-size: 25px; }
  .admin-toolbar { grid-template-columns: 1fr 1fr; gap: 12px; }
  .admin-toolbar .field:last-child { grid-column: 1 / -1; }
  .desktop-orders { display: none; }
  .mobile-orders { display: grid; }
  .field-grid { gap: 16px; }
}

@media (max-width: 480px) {
  .header-inner { padding: 0 16px; }
  .brand { font-size: 21px; gap: 9px; }
  .brand-mark svg { width: 31px; height: 36px; }
  .brand-label { font-size: 15px; }
  .main-content, .site-footer { margin-left: 16px; margin-right: 16px; }
  .main-content { padding-top: 24px; padding-bottom: 36px; }
  .panel { padding: 18px; }
  .panel-head { margin-bottom: 18px; }
  h1 { font-size: 22px; }
  .eyebrow { font-size: 9px; letter-spacing: 1.2px; }
  .admin-tabs { gap: 3px; }
  .admin-tabs button { padding: 9px 13px; font-size: 12px; }
  .stats-grid { gap: 7px; }
  .stat-card { padding: 14px 10px; font-size: 10px; }
  .stat-card strong { font-size: 24px; }
  .field-grid { grid-template-columns: 1fr; }
  .field input, .field select { font-size: 16px; padding: 9px 10px; }
  .field { font-size: 12px; }
  .range-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; }
  .range-row > .muted { display: none; }
  .range-row .ghost { padding: 8px 5px; font-size: 11px; }
  .range-row input, .range-row select { font-size: 14px; }
  .row-actions button { min-height: 40px; }
  .login-card { margin: 30px auto; padding: 25px; }
  .login-card h1 { font-size: 25px; }
  .order-card-footer { flex-direction: column; }
  .order-card-footer .row-actions { margin-left: 0; width: 100%; }
  .order-card-footer .row-actions button { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* The management workspace keeps all seven days together. */
.header-inner { max-width: 1664px; }
.main-content, .site-footer { width: calc(100% - 64px); max-width: 1600px; margin-left: auto; margin-right: auto; }
.main-content { padding-top: 30px; }
.admin-heading { margin-bottom: 20px; }
.admin-heading .page-title { margin-bottom: 0; }
.admin-heading .eyebrow { margin-bottom: 5px; }
.admin-tabs { margin-bottom: 26px; }
.range-navigation { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 22px; }
.range-navigation > div:first-child { display: flex; align-items: center; gap: 14px; }
.range-navigation strong { font-size: 19px; letter-spacing: -.4px; font-variant-numeric: tabular-nums; }
.range-navigation .row-actions { flex-wrap: nowrap; }
.range-navigation button { white-space: nowrap; }
button:disabled { cursor: not-allowed; }
[aria-busy="true"] button:disabled { cursor: wait; }
.admin-toolbar { display: grid; grid-template-columns: auto minmax(220px, 460px) auto; justify-content: start; align-items: end; gap: 20px; margin: 0 0 22px; }
.admin-toolbar > button { min-height: 42px; }
.order-visibility { display: flex; flex-wrap: wrap; gap: 0 18px; border: 0; padding: 0; margin: 0; min-width: 0; }
.order-visibility legend { padding: 0; margin-bottom: 7px; font-size: 12px; font-weight: 500; }
.order-visibility label { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; font-size: 13px; white-space: nowrap; cursor: pointer; }
.order-visibility input { width: 16px; height: 16px; margin: 0; accent-color: var(--green); cursor: pointer; }
[data-admin-content] > .status-text:not(:empty) { margin: 0 0 16px; }
.service-board { margin-top: 25px; }
.board-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.board-heading h2 { font-size: 16px; }
.week-scroll { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-color: #c9d3c0 transparent; scrollbar-width: thin; padding: 1px 1px 12px; }
.week-scroll:focus-visible { outline: 2px solid #a4bb78; outline-offset: 3px; border-radius: 8px; }
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; min-width: 1344px; align-items: stretch; }
.day-column { min-width: 0; background: #eff2eb; border: 1px solid #e2e7dc; border-radius: 11px; overflow: hidden; }
.day-column.is-today { border-color: #b4c5a4; }
.day-heading { min-height: 48px; display: flex; align-items: center; gap: 7px; padding: 12px 10px; border-bottom: 1px solid #e1e6db; white-space: nowrap; }
.day-heading > strong { font-size: 13px; }
.day-heading > span:not(.badge) { font-size: 11px; color: #8c9683; }
.day-heading > .badge { margin-left: auto; font-size: 9px; padding: 2px 5px; }
.is-today .day-heading { background: #e9f0e0; }
.day-orders { padding: 9px; }
.day-empty { font-size: 12px; color: #9aa58e; padding: 24px 2px; text-align: center; }
.order-card { background: #fff; border: 1px solid #e2e7dc; border-radius: 8px; padding: 11px; margin-bottom: 9px; }
.order-card:last-child { padding-bottom: 11px; border-bottom: 1px solid #e2e7dc; margin-bottom: 0; }
.order-card-head { display: flex; align-items: center; gap: 5px; justify-content: space-between; margin-bottom: 8px; }
.order-card-head > strong { font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.order-card-head > .badge { font-size: 9px; padding: 2px 5px; }
.order-card .character-name { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; margin-bottom: 2px; }
.order-card .small { font-size: 10px; overflow-wrap: anywhere; }
.order-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px; font-size: 15px; font-weight: 600; margin-top: 9px; }
.order-price .small { font-weight: 400; }
.order-payment { margin-top: 8px; }
.order-payment .badge { font-weight: 500; }
.payment-coins { background: #f6f0df; color: #8d773b; }
.payment-rmb { background: #eaf0f5; color: #58758b; }
.order-rmb-price { margin-top: 8px; }
.order-rmb-price > strong { font-size: 12px; color: #58758b; }
.order-rmb-price > p { margin-top: 3px; }
.order-detail { margin-top: 8px; font-size: 11px; }
.order-detail summary { margin-top: 0; color: #809174; }
.order-detail-content { margin-top: 6px; border-top: 1px dashed #e5e9e0; padding-top: 5px; color: #7c8972; overflow-wrap: anywhere; }
.order-detail-content p { margin-top: 4px; }
.order-actions { display: grid; grid-template-columns: 1fr; margin-top: 11px; gap: 6px; padding-top: 10px; border-top: 1px solid #edf0e8; }
.order-actions button { width: 100%; min-height: 36px; font-size: 11px; padding: 7px 10px; }
.order-actions > span { display: block; color: #78866d; line-height: 1.65; }
.order-help { margin: -6px 0 15px; }
.cancelled-order { background: #f9faf7; }
.cancelled-order .character-name { color: #8b9582; }
.scroll-hint { display: none; margin-bottom: 10px; }
.schedule-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.schedule-heading h2 { font-size: 16px; margin-bottom: 4px; }
.schedule-heading > span { flex-shrink: 0; }
.schedule-day { background: #fff; }
.day-editor { padding: 10px 9px 13px; }
.schedule-range { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 20px; gap: 5px; align-items: end; margin-bottom: 13px; }
.schedule-range .field { font-size: 10px; gap: 5px; color: #839075; }
.schedule-range .field select { min-height: 36px; padding: 7px 3px; font-size: 12px; border-radius: 6px; }
.schedule-range .remove-range { padding: 6px 0; min-height: 36px; font-size: 20px; line-height: 1; }
.add-range { min-height: 35px; width: 100%; font-size: 11px; padding: 7px 4px; border-style: dashed; background: #fafcf6; }
.disabled-day { background: #f1f2ee; color: #a6ae9e; border-color: #e8eae3; }
.disabled-day .day-heading, .disabled-day .field { opacity: .65; }
.disabled-day .day-empty { font-size: 11px; }
.schedule-save { display: flex; align-items: center; justify-content: space-between; gap: 18px; background: #fff; padding: 17px 20px; border: 1px solid var(--line); border-radius: 11px; position: sticky; bottom: 15px; z-index: 2; box-shadow: 0 4px 18px #38512608; }
.schedule-save > button { flex-shrink: 0; min-width: 144px; }
.schedule-save .status-text:not(:empty) { margin-bottom: 5px; }
.navigation-warning { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.navigation-warning .row-actions { margin-top: 0; flex-shrink: 0; }
.settings-panel { max-width: 1056px; }
.price-form { margin-top: 25px; }
.price-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }

@media (max-width: 1410px) {
  .scroll-hint { display: block; }
}

@media (max-width: 760px) {
  .header-inner { padding: 0 20px; }
  .main-content, .site-footer { width: calc(100% - 40px); }
  .range-navigation { align-items: start; flex-direction: column; gap: 12px; }
  .range-navigation strong { font-size: 17px; }
  .range-navigation > div:first-child { gap: 10px; }
  .range-navigation .row-actions { gap: 5px; }
  .range-navigation button { padding: 8px 12px; }
  .admin-toolbar { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
  .admin-toolbar .order-visibility { grid-column: 1 / -1; }
  .admin-toolbar .search-field { grid-column: 1; }
  .admin-toolbar > button { grid-column: 2; justify-self: start; }
  .week-grid { grid-template-columns: repeat(7, 220px); min-width: 1600px; }
  .order-card .small { font-size: 11px; }
  .order-card-head > strong { font-size: 13px; }
  .order-actions button { min-height: 36px; font-size: 11px; }
  .schedule-range .field select { font-size: 14px; min-height: 40px; }
  .schedule-range .remove-range { min-height: 40px; }
  .price-grid { grid-template-columns: 1fr; gap: 18px; }
  .navigation-warning { align-items: start; flex-direction: column; }
  .schedule-heading { align-items: start; }
  .schedule-heading > span { display: none; }
}

@media (max-width: 480px) {
  .header-inner { padding: 0 16px; }
  .main-content, .site-footer { width: calc(100% - 32px); }
  .main-content { padding-top: 22px; }
  .range-navigation > div:first-child { flex-wrap: wrap; gap: 4px 10px; }
  .range-navigation strong { font-size: 16px; }
  .range-navigation .row-actions { width: 100%; }
  .range-navigation .row-actions button { flex: 1; padding: 8px 5px; }
  .admin-toolbar { grid-template-columns: minmax(0, 1fr) auto; }
  .admin-toolbar .search-field { grid-column: 1; grid-row: 2; }
  .admin-toolbar > button { grid-column: 2; grid-row: 2; }
  .admin-toolbar .field input, .admin-toolbar .field select { font-size: 14px; }
  .schedule-save { padding: 14px; align-items: stretch; flex-direction: column; gap: 10px; bottom: 10px; }
  .schedule-save > button { width: 100%; }
}
