@import url("./shared-login/login-motion.css?v=20260915-2");
/* Portal palette and a persistent, keyboard-accessible appearance control. */
:root, html[data-theme="light"] {
  --chrono-bg:#f5f1e6; --chrono-card:#fffdf7; --chrono-text:#2d2820;
  --chrono-muted:#6f6a5e; --chrono-border:#d9ceb6; --chrono-gold:#a8851f;
  --chrono-soft:#eee7d7;
}
html[data-theme="dark"] {
  --chrono-bg:#070b14; --chrono-card:#121626; --chrono-text:#e8e4d8;
  --chrono-muted:#b4afa3; --chrono-border:#45402f; --chrono-gold:#d4af37;
  --chrono-soft:#202334;
}
html { background:var(--chrono-bg); color:var(--chrono-text); }
body { background-color:var(--chrono-bg); color:var(--chrono-text); }
.chrono-theme-control,
.chrono-theme-toggle {
  position:fixed; right:max(16px,env(safe-area-inset-right)); bottom:max(16px,env(safe-area-inset-bottom));
  z-index:10000; display:grid; place-items:center; width:42px; height:42px; padding:0;
  border:1px solid var(--chrono-border); border-radius:50%; background:var(--chrono-card);
  color:var(--chrono-text); font:20px/1 system-ui,sans-serif; box-shadow:0 3px 16px #0002;
  cursor:pointer; transition:transform .2s ease, border-color .2s ease, background-color .28s ease;
}
.chrono-theme-control:hover,
.chrono-theme-toggle:hover { transform:translateY(-2px); border-color:var(--chrono-gold); }
.chrono-theme-control:active,
.chrono-theme-toggle:active { transform:scale(.94); }
.chrono-theme-control:focus-visible,
.chrono-theme-toggle:focus-visible { outline:2px solid var(--chrono-gold); outline-offset:3px; }
html[data-theme] .sx-brand { display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:4px 10px; min-width:0; }
html[data-theme] .sx-brand h3 { white-space:nowrap; margin:0; text-align:center; font-size:clamp(20px,5vw,26px); letter-spacing:.08em; }
html[data-theme] .sx-brand p, html[data-theme] .sx-brand .sx-subtitle { flex:0 0 100%; grid-column:1/-1; white-space:normal; overflow-wrap:anywhere; text-align:center; line-height:1.5; }

@media(max-width:767px) { body:has(.mobile-nav) .chrono-theme-control, body:has(.mobile-nav) .chrono-theme-toggle { bottom:calc(80px + env(safe-area-inset-bottom)); } }
html[data-theme="light"] .sx-stage { --sx-btn-bg:linear-gradient(135deg,#b58922,#8f6c14 55%,#70530d); --sx-btn-text:#fff8e6; }
html[data-theme] .sx-stage .sx-btn:disabled { opacity:.68; }
html[data-theme] .sx-stage .sx-theme-toggle { display:none !important; }
html[data-theme] .sx-chronoseq-brand-mark span[aria-label*="当前"] { display:none !important; }
@media(min-width:768px) {
  html[data-theme] .sx-mobile-shell:not([data-layout]) .sx-mobile-container {
    max-width:680px !important; margin:28px auto !important; border-radius:24px !important;
    padding:28px 36px 40px !important; border:1px solid var(--chrono-border) !important;
  }
}
/* ChronoHealth shared theme bridge: automatic by local time with an explicit user override. */
:root[data-theme="dark"] {
  --bg-page: #0b0b1c;
  --bg-card: rgba(24, 26, 44, .92);
  --bg-warm: #15152b;
  --bg-warm-end: #0b0b1c;
  --text-primary: #f4eddc;
  --text-secondary: #c4bba8;
  --text-muted: #9a9080;
  --border: rgba(212, 175, 55, .28);
  --border-light: rgba(212, 175, 55, .16);
  --navbar-bg: rgba(17, 18, 34, .94);
  --navbar-title-color: #f4eddc;
  --navbar-back-color: #f4eddc;
  --shadow-sm: 0 1px 5px rgba(0, 0, 0, .24);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, .28);
  --shadow-lg: 0 12px 30px rgba(0, 0, 0, .36);
}

:root[data-theme="light"] {
  --bg-page: #fbf7f0;
  --bg-card: #fffdf8;
  --bg-warm: #f5f0e6;
  --bg-warm-end: #e8e0d0;
  --text-primary: #2d2418;
  --text-secondary: #5c4d3c;
  --text-muted: #8b7355;
  --border: #e8dcc0;
  --border-light: #f0e8d8;
  --navbar-bg: rgba(255, 253, 248, .94);
  --navbar-title-color: #2d2418;
  --navbar-back-color: #2d2418;
}

html, body { background-color: var(--bg-page); color: var(--text-primary); }
body, .card, .panel, .modal, .unified-navbar, .bottom-bar, .bottom-button-group,
.calendar-notes, .dress-section, input, textarea, select { transition: background-color .28s ease, color .28s ease, border-color .28s ease, box-shadow .28s ease; }

.sx-theme-control {
  position: fixed; right: 14px; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); z-index: 1100;
  border: 1px solid var(--border); border-radius: 999px; padding: 8px 12px;
  background: var(--bg-card); color: var(--text-secondary); box-shadow: var(--shadow-md);
  font: 500 12px/1 var(--font-sans); cursor: pointer;
}
.sx-theme-control:hover { color: var(--primary); border-color: var(--primary); }

@media (min-width: 768px) { .sx-theme-control { bottom: 20px; } }

html[data-theme] {
  --bg-page:var(--chrono-bg); --bg-card:var(--chrono-card); --bg-warm:var(--chrono-soft);
  --bg-warm-end:var(--chrono-bg); --text-primary:var(--chrono-text);
  --text-secondary:var(--chrono-muted); --border:var(--chrono-border);
  --navbar-bg:var(--chrono-card); --navbar-title-color:var(--chrono-text);
  --navbar-back-color:var(--chrono-text);
}
@media(max-width:767px) { .chrono-theme-control, .chrono-theme-toggle { bottom:calc(76px + env(safe-area-inset-bottom)); } }

html[data-theme] body, html[data-theme] .container { background:var(--chrono-bg) !important; }
html[data-theme] .calendar td { background-color:var(--chrono-card); border-color:var(--chrono-border); }
html[data-theme] .calendar td.other-month { background-color:var(--chrono-soft) !important; }
html[data-theme] .calendar-header-area { background:transparent; }
html[data-theme] .bottom-button-group, html[data-theme] .calendar-notes { background:var(--chrono-card); color:var(--chrono-text); border-color:var(--chrono-border); }
html[data-theme] .bottom-btn:not(.active) { background:var(--chrono-soft); }
html[data-theme] .bottom-btn:not(.active) span { color:var(--chrono-gold); }
html[data-theme="dark"] .heidao { color:var(--chrono-text); }
html[data-theme] .welcome-page { background:var(--chrono-bg) !important; }
html[data-theme] .welcome-page .slogan, html[data-theme] .welcome-page .footer-text { color:var(--chrono-muted); }
html[data-theme] .welcome-page .feat-tag, html[data-theme] .welcome-page .skip-btn { background:var(--chrono-card); color:var(--chrono-text); border-color:var(--chrono-border); }
html[data-theme] #calendarResult { overflow-x:clip; }
html[data-theme] .controls-row { width:auto; max-width:100%; }
html[data-theme] .lunar-text { color:var(--chrono-muted); }
html[data-theme="dark"] .solar-term { color:#7fb4ff !important; }
html[data-theme] #icpFooter { background:linear-gradient(transparent,var(--chrono-bg) 30%) !important; }
html[data-theme] #icpFooter a { color:var(--chrono-muted) !important; }

/* CHRONOSEQ 宋式通书历法表格与矿物设色规范 */
html[data-theme="light"] .calendar th {
  background:linear-gradient(180deg,#ede4d3 0%,#dfd2ba 100%) !important;
  color:#3d311e !important; border-bottom:1.5px solid #c5b28e !important;
  font-family:"Songti SC","Noto Serif SC",serif !important; letter-spacing:.12em; font-weight:600 !important;
}
html[data-theme="light"] .calendar th:nth-child(6),
html[data-theme="light"] .calendar th:nth-child(7) {
  background:linear-gradient(180deg,#ead8d3 0%,#dcc3bc 100%) !important;
  color:#7a2c20 !important; border-bottom:1.5px solid #b88a7e !important;
}
html[data-theme="dark"] .calendar th {
  background:linear-gradient(180deg,#181d31 0%,#111524 100%) !important;
  color:#d4af37 !important; border-bottom:1.5px solid rgba(212,175,55,.35) !important;
  font-family:"Songti SC","Noto Serif SC",serif !important; letter-spacing:.12em; font-weight:600 !important;
}
html[data-theme="dark"] .calendar th:nth-child(6),
html[data-theme="dark"] .calendar th:nth-child(7) {
  background:linear-gradient(180deg,#261822 0%,#1b1118 100%) !important;
  color:#e59a8d !important; border-bottom:1.5px solid rgba(229,154,141,.35) !important;
}
html[data-theme="light"] .jiuxing-special, html[data-theme="light"] .touxiu { color:#2b7a58 !important; }
html[data-theme="dark"] .jiuxing-special, html[data-theme="dark"] .touxiu { color:#7dd6c2 !important; }
html[data-theme="light"] .solar-term { color:#2f5c8f !important; }
html[data-theme="light"] .hongsha, html[data-theme="light"] .holiday-tag { color:#9e3428 !important; }
html[data-theme="dark"] .hongsha, html[data-theme="dark"] .holiday-tag { color:#e5857b !important; }
html[data-theme="light"] .huangdao, html[data-theme="light"] .jinshen { color:#9a7418 !important; }
html[data-theme="dark"] .huangdao, html[data-theme="dark"] .jinshen { color:#d4af37 !important; }
html[data-theme] .zeji-nav-svg {
  width:20px; height:20px; margin-bottom:3px; stroke:var(--chrono-gold); fill:none;
  stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round;
}
html[data-theme] .jiji-fab {
  width:46px !important; height:46px !important; border-radius:50% !important;
  background:var(--chrono-card) !important; border:1.5px solid var(--chrono-gold) !important;
  box-shadow:0 6px 20px rgba(45,40,32,.18) !important; position:relative;
}
html[data-theme] .jiji-fab .jiji-image-el, html[data-theme] .jiji-fab .jiji-emoji { display:none !important; }
html[data-theme] .jiji-fab::after {
  content:"吉"; font:600 18px/1 "Songti SC","Noto Serif SC",Georgia,serif;
  color:var(--chrono-gold); letter-spacing:0;
}
