/* 主题变量(用户定 2026-06)：深/浅两套 srX 调色，配 theme.js 把 Tailwind 配色改引用本变量。
   :root = 深色(默认)；html.light = 苹果风明色。值用「空格分隔 RGB 三元组」配合 <alpha-value>，
   保留 bg-srblue-50/70 这类透明度写法。pre-paint 内联脚本按 localStorage / 系统偏好给 html 加 .light/.dark。 */
:root {
  --srink: 232 236 248;  --srcard: 20 26 48;
  --srgray-50: 13 18 38;  --srgray-100: 26 34 64;  --srgray-200: 35 44 78;
  --srgray-300: 48 60 100;  --srgray-400: 139 147 184;  --srgray-600: 189 197 224;
  --srblue-50: 13 40 71;  --srblue-100: 15 48 88;  --srblue-200: 28 74 133;
  --srblue-300: 88 166 255;  --srblue-400: 88 166 255;  --srblue-500: 56 139 253;
  --srblue-600: 31 111 235;  --srblue-700: 88 166 255;
  --srred: 248 81 73;  --srgreen: 63 185 80;  --sramber: 210 153 34;
  --srpurple-50: 39 26 77;  --srpurple-100: 46 33 84;  --srpurple-200: 68 48 140;  --srpurple-700: 163 113 247;
}
html.light {
  --srink: 23 28 42;  --srcard: 255 255 255;
  --srgray-50: 244 248 253;  --srgray-100: 234 241 250;  --srgray-200: 199 212 230;
  --srgray-300: 170 186 209;  --srgray-400: 108 122 148;  --srgray-600: 56 70 94;
  --srblue-50: 222 238 255;  --srblue-100: 203 228 255;  --srblue-200: 150 199 252;
  --srblue-300: 0 106 220;  --srblue-400: 0 122 255;  --srblue-500: 0 122 255;
  --srblue-600: 0 106 220;  --srblue-700: 8 82 178;
  --srred: 221 29 37;  --srgreen: 18 142 68;  --sramber: 186 86 0;
  --srteal: 6 148 138;  --srcoral: 232 51 90;
  --srpurple-50: 238 233 255;  --srpurple-100: 224 213 252;  --srpurple-200: 168 140 240;  --srpurple-700: 112 66 210;
}

html, body { transition: background-color .2s ease, color .2s ease; }

/* 切换按钮：深色显太阳(点→变浅)，浅色显月亮(点→变深) */
.theme-toggle { display:inline-flex; align-items:center; justify-content:center; width:30px; height:30px;
  border-radius:9px; border:1px solid rgb(var(--srgray-200)); background:transparent; color:rgb(var(--srgray-400));
  cursor:pointer; transition:color .15s, border-color .15s; }
.theme-toggle:hover { color:rgb(var(--srblue-700)); border-color:rgb(var(--srblue-300)); }
.theme-toggle svg { width:16px; height:16px; }
html.light .theme-toggle .ic-sun { display:none; }
html:not(.light) .theme-toggle .ic-moon { display:none; }

/* ================================================================
   全站 Liquid Glass kit(移植自关税外版·用户定 2026-07-08:全站统一玻璃)
   固定光晕背景层 .ed-bg + 大面板(bg-srcard rounded-2xl)转玻璃 + 弹窗玻璃遮罩+缓出。
   深=默认(html:not(.light))/ 浅=html.light。body 需去实色底、加 .ed-bg 才生效。
   ================================================================ */
html.light { background:#F5F8FC; }
html:not(.light) { background:#0b1020; }
.ed-bg { position:fixed; inset:0; z-index:-1; pointer-events:none;
  background:
    radial-gradient(1500px 1050px at 14% -12%, rgba(150,175,220,.26), transparent 58%),
    radial-gradient(1250px 950px at 100% 0%,   rgba(190,200,235,.22), transparent 58%),
    radial-gradient(1350px 1000px at 92% 108%, rgba(235,205,190,.22), transparent 58%),
    radial-gradient(1250px 980px at -10% 100%, rgba(175,190,225,.20), transparent 58%),
    radial-gradient(1100px 820px at 50% 40%,   rgba(180,198,230,.12), transparent 64%),
    linear-gradient(180deg,#F2F6FC 0%, #F7FAFE 46%, #FBF4EF 100%); }
html:not(.light) .ed-bg {
  background:
    radial-gradient(1100px 820px at 8% -8%,   rgba(72,150,235,.26), transparent 56%),
    radial-gradient(1000px 780px at 102% 6%,  rgba(30,150,160,.20), transparent 56%),
    radial-gradient(1050px 860px at 90% 104%, rgba(201,110,74,.24),  transparent 55%),
    radial-gradient(980px 820px at -6% 102%,  rgba(96,120,220,.20), transparent 56%),
    radial-gradient(760px 640px at 50% 48%,   rgba(70,130,200,.12), transparent 62%),
    linear-gradient(180deg,#0f1528 0%, #0a0f1f 55%, #121a36 100%); }
[class*="bg-srcard"][class*="rounded-2xl"] {
  background-color:rgba(255,255,255,.46) !important;
  background-image:linear-gradient(150deg, rgba(255,255,255,.7), rgba(255,255,255,.16) 42%, transparent 68%) !important;
  -webkit-backdrop-filter:blur(38px) saturate(240%); backdrop-filter:blur(38px) saturate(240%);
  border-color:rgba(255,255,255,.95) !important;
  box-shadow:0 2px 6px rgba(30,55,110,.07), 0 16px 34px -12px rgba(30,55,110,.18), 0 48px 84px -32px rgba(30,55,110,.32), inset 0 1.5px 0 rgba(255,255,255,1), inset 0 -1px 0 rgba(30,55,110,.05), inset 1px 0 0 rgba(255,255,255,.55) !important; }
html:not(.light) [class*="bg-srcard"][class*="rounded-2xl"] {
  background-color:rgba(22,30,58,.5) !important;
  background-image:linear-gradient(150deg, rgba(255,255,255,.11), rgba(255,255,255,.02) 40%, transparent 66%) !important;
  border-color:rgba(255,255,255,.13) !important;
  box-shadow:0 2px 8px rgba(0,0,0,.3), 0 16px 34px -10px rgba(0,0,0,.5), 0 44px 76px -30px rgba(0,0,0,.62), inset 0 1px 0 rgba(255,255,255,.14), inset 0 -1px 0 rgba(0,0,0,.25) !important; }
.ed-modal-back { background:rgba(8,12,20,.34);
  -webkit-backdrop-filter:blur(12px) saturate(140%); backdrop-filter:blur(12px) saturate(140%);
  animation:edBackIn .26s ease-out both; }
.ed-modal-back > * { animation:edPanelIn .34s cubic-bezier(.16,1,.3,1) both; }
@keyframes edBackIn { from{opacity:0} to{opacity:1} }
@keyframes edPanelIn { from{opacity:0; transform:translateY(14px) scale(.975)} to{opacity:1; transform:none} }
@media print { .ed-bg { display:none !important; } }
@media (prefers-reduced-motion:reduce){ .ed-modal-back, .ed-modal-back > * { animation:none; } }

/* 内嵌模式(?embed=1,被关税 Ocean 标签 iframe 内嵌):隐藏本工具自己的页头,
   放开 max-w-7xl 用满父容器宽度(航次表航名不再被挤截,右侧不留白)。用户定 2026-07-08。 */
html.embed header { display:none !important; }
html.embed .max-w-7xl { max-width:100% !important; }
html.embed [x-data].max-w-7xl { padding-top:.5rem !important; }
