/* ============================================================
   云卡商城 · 样式模块 03/11 —— 03-header.css
   ------------------------------------------------------------
   职责：页头与导航（含搜索框、主题/语言切换位）
   涵盖：§6

   ⚠️ 加载顺序即层叠顺序，请勿调整 <link> 的先后。
      本文件由 style.css 按分节边界切出，规则未做任何重排。
   ============================================================ */

/* ============================================================
   6 · 页头 / 导航
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  height: var(--header-h);
  background: var(--header-bg);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { height: 100%; display: flex; align-items: center; gap: var(--sp-5); }

.logo { display: flex; align-items: center; gap: var(--sp-2); flex: none; }
.logo .mark {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: var(--brand);
  color: var(--text-on);
  font-size: var(--fs-lg);
  font-weight: var(--fw-black);
}
/* The cloud is a freestanding brand mark, without the old letter tile. */
.logo .storefront-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 52px;
  width: 52px;
  height: 44px;
}
.storefront-brand-mark img {
  display: block;
  width: 100%;
  height: 40px;
  object-fit: contain;
}
@media (max-width: 480px) {
  .site-header .logo .storefront-brand-mark {
    flex-basis: 44px;
    width: 44px;
  }
  .site-header .storefront-brand-mark img { height: 34px; }
}
.logo .txt {
  color: var(--text);
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  line-height: 1.15;
  letter-spacing: .2px;
}
.logo .txt small {
  display: block;
  color: var(--text-3);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-medium);
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.nav { display: flex; align-items: center; gap: var(--sp-1); flex: 1; min-width: 0; }
.nav a {
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-sm);
  color: var(--text-2);
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
  white-space: nowrap;
  transition: background var(--tr), color var(--tr);
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.on {
  color: var(--text);
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px var(--brand-line);
}

.search-box {
  flex: none;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  width: 220px;
  height: var(--ctl-h);
  padding: 0 var(--sp-3);
  background: var(--inset);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  transition: border-color var(--tr), box-shadow var(--tr);
}
.search-box:focus-within { border-color: var(--brand); box-shadow: var(--ring); }
.search-box .ico { flex: none; display: grid; place-items: center; color: var(--text-3); }
.search-box .ico-svg { display: block; }
.search-box input {
  flex: 1;
  min-width: 0;
  height: 100%;
  background: none;
  border: 0;
  outline: none;
  color: var(--text);
}
.search-box input::placeholder { color: var(--text-3); }

/* A compact search entrance leaves room for the account and regional controls. */
.site-header:has(.hd-search){backdrop-filter:none;-webkit-backdrop-filter:none;background:var(--surface)}
.hd-search{position:relative;flex:none}
.hd-search-trigger,.hd-search-close{display:grid;place-items:center;flex:none;width:44px;height:44px;padding:0;border:0;border-radius:12px;background:var(--surface-2);color:var(--text-2);cursor:pointer}
.hd-search-trigger:hover,.hd-search-trigger[aria-expanded="true"]{background:var(--brand-bg);color:var(--brand-fg)}
.hd-search-trigger:focus-visible,.hd-search-close:focus-visible,.hd-search-form button:focus-visible{outline:2px solid var(--brand);outline-offset:3px}
.hd-search-panel{position:fixed;left:var(--hd-search-left,16px);top:var(--hd-search-top,90px);width:min(420px,calc(100vw - 32px));max-height:calc(100dvh - var(--hd-search-top,90px) - 16px);overflow:auto;padding:16px;background:var(--surface);border:1px solid var(--line);border-radius:16px;box-shadow:0 14px 40px #1727471f;animation:hd-search-reveal .16s ease-out}
.hd-search-panel[hidden]{display:none}
.hd-search-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.hd-search-heading strong{font-size:14px;font-weight:600;line-height:1.4;color:var(--text)}
.hd-search-close{width:36px;height:36px;background:transparent;border-radius:9px;color:var(--text-3)}
.hd-search-close:hover{background:var(--surface-2);color:var(--text)}
.hd-search-form{display:flex;align-items:center;gap:10px;padding:4px 4px 4px 12px;background:var(--surface-2);border:1px solid var(--line);border-radius:10px}
.hd-search-form:focus-within{border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-bg)}
.hd-search-form>span{display:flex;flex:none;color:var(--text-3)}
.hd-search-form input{width:0;min-width:0;flex:1;height:44px;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;outline:none;font:inherit;font-size:16px;color:var(--text)}
.hd-search-form input:focus{outline:none;box-shadow:none}
.hd-search-form input::placeholder{color:var(--text-3);font-size:13px}
.hd-search-form button{min-width:54px;min-height:44px;flex:none;padding:0 12px;border:0;border-radius:7px;background:var(--brand);color:var(--text-on);font:inherit;font-size:13px;font-weight:600;cursor:pointer}
.site-header .hd-cart{margin-left:0;width:44px;height:44px;min-height:44px;padding:0;border-color:transparent;border-radius:12px;background:var(--surface-2);position:relative}
.site-header .hd-cart>.badge{position:absolute;top:-3px;right:-3px;min-width:17px;height:17px;margin:0;padding:0 4px;font-size:10px;border-radius:10px}
@keyframes hd-search-reveal{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.hd-search-panel{animation:none}}

.header-actions { display: flex; align-items: center; gap: var(--sp-2); flex: none; }
/* ⚠️ 页头右侧这一组的定位靠两样东西：
      · 桌面端：.nav 是 flex:1，由它把右侧整组顶过去
      · ≤1080：.nav 被隐藏，撑开的元素没了 —— 整组会塌回左边，
        右上角头像就不再是"右上角"了。
      所以这里补一个 margin-left:auto 兜底：导航在时它拿不到空间（nav 的
      flex-grow 会先吃满），导航隐藏时它接管，两种宽度下都靠右。 */
.hd-cart { margin-left: auto; }
.burger { display: none; }

/* ---- 单色线性图标（继承 currentColor）---- */
.ico-svg { display: block; flex: none; }

/* ---- 偏好设置：主题 / 语言切换 ---- */
.prefs { display: flex; align-items: center; gap: var(--sp-1); flex: none; }
.pref-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1h);
  height: var(--ctl-h);
  min-width: var(--ctl-h);
  padding: 0 var(--sp-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text-2);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  line-height: 1;
  cursor: pointer;
  transition: background var(--tr), border-color var(--tr), color var(--tr);
}
.pref-btn:hover { background: var(--surface-2); border-color: var(--line-strong); color: var(--text); }
.pref-btn .ico { display: grid; place-items: center; }
.pref-btn .ico-sun { display: none; }
[data-theme="dark"] .pref-btn .ico-sun { display: inline; }
[data-theme="dark"] .pref-btn .ico-moon { display: none; }

/* ============================================================
   右上角头像下拉菜单（.um-*）
   ------------------------------------------------------------
   ⚠️ 页头是 position:sticky + 固定高度，但**没有 overflow:hidden**，
      所以弹层能正常溢出到页头外面。
      如果哪天给 .site-header 加了 overflow:hidden，下拉会被直接裁掉 ——
      这是这类"弹层放在 sticky 头里"最容易踩的坑。
   ============================================================ */
.um { position: relative; }
.um-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  height: 36px;
  padding: 0 var(--sp-2) 0 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  cursor: pointer;
  transition: background var(--tr), border-color var(--tr);
}
.um-btn:hover { background: var(--surface-2); border-color: var(--line-strong); }

/* 圆形头像（.avatar 默认是圆角矩形，这里必须重设，否则不是圆的） */
.um-ava {
  position: relative;
  flex: none;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: var(--r-full);
  background: var(--brand);
  color: var(--text-on);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
}
.um-ava-lg { width: 40px; height: 40px; font-size: var(--fs-md); }

/* 有未读通知时，头像右上角一个小红点 */
.um-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: var(--r-full);
  background: var(--danger);
  border: 2px solid var(--surface);
}

.um-bal { color: var(--gold-fg); font-size: var(--fs-sm); font-weight: var(--fw-semi); }
.um-caret {
  flex: none;
  width: 0;
  height: 0;
  margin-right: 4px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid var(--text-3);
  transition: transform var(--tr) var(--e-io);
}
.um.on .um-caret { transform: rotate(180deg); }

.um-pop {
  position: absolute;
  /* ⚠️ 偏移要按「页头下沿」算，不是按按钮下沿。
     按钮在页头里是垂直居中的，按钮下方还有约 14px 的页头padding，
     只给 8px 的话卡片顶边会压在页头那条下边框上（看起来像渲染错位）。
     16px 在桌面档（页头 64）和手机档（页头 58）都能干净地让开。 */
  top: calc(100% + var(--sp-4));
  right: 0;                      /* 右对齐：窄屏也不会把卡片顶出屏幕 */
  z-index: var(--z-modal);
  width: min(272px, calc(100vw - 32px));
  padding: var(--sp-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-3);
}
.um-pop[hidden] { display: none; }

.um-head { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-1) var(--sp-1) var(--sp-3); }
.um-name { color: var(--text); font-size: var(--fs-base); font-weight: var(--fw-semi); }
.um-mail { margin-top: 2px; color: var(--text-3); font-size: var(--fs-xs); }

.um-balrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-2) var(--sp-3);
  background: var(--gold-bg);
  border: 1px solid var(--gold-line);
  border-radius: var(--r-md);
}
.um-lbl { color: var(--text-3); font-size: var(--fs-xs); }
.um-amt { color: var(--gold-fg); font-size: var(--fs-lg); font-weight: var(--fw-bold); }

.um-menu { margin-top: var(--sp-2); }
.um-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-md);
  color: var(--text-2);
  font-size: var(--fs-base);
  transition: background var(--tr), color var(--tr);
}
.um-item:hover { background: var(--surface-2); color: var(--text); }
.um-item .ico { display: grid; place-items: center; color: var(--text-3); }
.um-item:hover .ico { color: var(--brand); }

/* 通知角标：红色数字气泡 */
.um-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--r-full);
  background: var(--danger);
  color: var(--text-on);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semi);
  line-height: 1;
}

.um-lang {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
  padding: var(--sp-3) var(--sp-1) var(--sp-1) var(--sp-3);
  border-top: 1px solid var(--line);
}
.um-seg { display: flex; gap: 2px; padding: 2px; background: var(--surface-3); border-radius: var(--r-md); }
.um-segbtn {
  padding: 4px var(--sp-3);
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--text-2);
  font-size: var(--fs-xs);
  cursor: pointer;
  transition: background var(--tr), color var(--tr);
}
.um-segbtn:hover { color: var(--text); }
.um-segbtn.on {
  background: var(--surface);
  color: var(--text);
  font-weight: var(--fw-semi);
  box-shadow: var(--sh-1);
}

.um-out {
  width: 100%;
  height: 36px;
  margin-top: var(--sp-3);
  border: 1px solid var(--danger-line);
  border-radius: var(--r-md);
  background: var(--danger-bg);
  color: var(--danger-fg);
  font-size: var(--fs-base);
  font-weight: var(--fw-semi);
  cursor: pointer;
  transition: background var(--tr), border-color var(--tr), color var(--tr);
}
.um-out:hover { background: var(--danger); border-color: var(--danger); color: var(--text-on); }

/* 图标保持原有语义尺寸，统一光学对齐与线条。 */
.ico-svg { vertical-align: middle; overflow: visible; }
.ico-svg [stroke] { vector-effect: non-scaling-stroke; }
.nav a { display: inline-flex; align-items: center; gap: var(--sp-2); min-height: var(--ctl-h); }
.nav a.on { color: var(--brand-fg); }
.search-box:hover { border-color: var(--line-strong); }
.search-box:focus-within { border-color: var(--brand); }

/* Unified inline icons: one optical baseline across text and controls. */
.ui-icon { display: inline-flex; align-items: center; justify-content: center; width: 1.15em; height: 1.15em; flex: none; vertical-align: -.18em; color: inherit; }
.ui-icon > .ico-svg { width: 100%; height: 100%; }
.btn > .ui-icon { width: var(--sp-4); height: var(--sp-4); }
.side-menu .ico .ico-svg { width: 18px; height: 18px; }
.notice-bar .ui-icon { margin-right: var(--sp-1); }

/* Icon-only cart retains its accessible name and item-count badge. */
.hd-cart{min-width:44px;min-height:44px;padding:10px!important;justify-content:center}.hd-cart>.ico-svg{width:20px;height:20px}

/* Account popover: identity, wallet, shortcuts, then preferences. */
.um-btn{height:46px;max-width:190px;padding:5px 10px 5px 5px;gap:10px;border:1px solid transparent;border-radius:24px;background:transparent;color:var(--text-2)}
.um-btn:hover,.um.on .um-btn{background:var(--surface-2);border-color:transparent}
.um-btn>.um-ava{width:34px;height:34px;flex:none;border-radius:50%;background:#eef3fb;color:#345780;border:1px solid #dfe8f5;font-size:13px;font-weight:500}
[data-theme="dark"] .um-btn>.um-ava{background:var(--brand-bg);color:var(--brand-fg);border-color:var(--brand-line)}
.um-trigger-copy{display:flex;align-items:center;text-align:left;min-width:0}.um-trigger-name{font-size:13px;line-height:1.5;font-weight:400;max-width:100px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.um-caret{width:6px;height:6px;border:0;border-right:1.5px solid var(--text-3);border-bottom:1.5px solid var(--text-3);transform:rotate(45deg);margin:0 2px 4px 3px}.um.on .um-caret{transform:rotate(225deg);margin-bottom:0}
.um-dot{width:7px;height:7px;top:-2px;right:-1px}
.um-pop{width:min(328px,calc(100vw - 32px));padding:20px 18px 8px;border-radius:18px;border-color:var(--line);box-shadow:0 16px 48px rgba(18,35,64,.14),0 2px 6px rgba(18,35,64,.03);max-height:calc(100dvh - 126px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;animation:um-reveal .16s ease-out}
.um-head{gap:12px;padding:0 2px 18px;align-items:center}.um-ava-lg{width:42px;height:42px;border-radius:14px;font-size:17px;background:var(--brand-bg);color:var(--brand-fg);border:1px solid var(--brand-line)}.um-identity{flex:1;min-width:0}.um-name{font-size:15px;line-height:1.5;overflow-wrap:anywhere}.um-mail{font-size:12px;line-height:1.5;color:var(--text-3);overflow-wrap:anywhere;margin-top:3px}
.um-close{display:grid;place-items:center;width:32px;height:32px;flex:none;border:0;border-radius:8px;background:transparent;color:var(--text-3);cursor:pointer;margin-right:-6px}.um-close:hover{background:var(--surface-3);color:var(--text)}
.um-balrow{padding:10px 12px;background:var(--brand-bg);border:0;border-radius:12px;gap:12px}.um-balrow>div{display:flex;flex-direction:row;align-items:baseline;flex-wrap:wrap;gap:4px 8px;min-width:0}.um-balrow .um-lbl{font-size:11px;color:var(--text-2)}.um-amt{font-size:18px;font-weight:600;line-height:1.3;color:var(--text);letter-spacing:-.2px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.um-topup{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:32px;padding:6px 9px;background:var(--brand);color:var(--text-on);border-radius:8px;font-size:12px;font-weight:500;flex:none}.um-topup:hover{background:var(--brand-hover);color:var(--text-on)}
.um-menu{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:14px 0;padding:0}.um-item{position:relative;padding:13px 10px;gap:9px;min-height:50px;border-radius:9px;font-size:13px;font-weight:500;color:var(--text-2)}.um-item .ico{color:var(--text-3);width:22px;height:22px}.um-item:hover{background:var(--surface-2);color:var(--brand-fg)}.um-badge{min-width:16px;height:16px;padding:0 4px;font-size:10px;margin-left:auto;background:var(--danger-bg);color:var(--danger-fg);border:1px solid var(--danger-line)}
.um-lang{padding:12px 0;margin:0;gap:10px}.um-lang>.um-lbl{display:flex;align-items:center;gap:8px;font-size:12px}.um-seg{padding:3px;border-radius:9px;background:var(--surface-2);border:1px solid var(--line)}.um-segbtn{min-height:32px;padding:6px 13px;border-radius:6px;font-size:11px}.um-segbtn.on{color:var(--text);box-shadow:0 1px 3px rgba(18,35,64,.08)}
.um-foot{border-top:1px solid var(--line);padding-top:4px}.um-out{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:40px;height:auto;margin:0;padding:10px;border:0;border-radius:8px;background:transparent;color:var(--text-3);font-size:12px;font-weight:400}.um-out:hover{background:var(--danger-bg);color:var(--danger-fg)}
.um :focus-visible{outline:2px solid var(--brand);outline-offset:3px}
@keyframes um-reveal{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:none}}
@media(max-width:480px){.um-btn{padding:5px;gap:6px;min-width:44px}.um-trigger-copy{display:none}.um-btn>.um-ava{width:32px;height:32px}.um-pop{padding:18px 16px 8px}.um-close{width:40px;height:40px}.um-segbtn{min-height:40px}.um-out,.um-topup{min-height:44px}.um-pop{max-height:calc(100dvh - 118px)}}
@media(prefers-reduced-motion:reduce){.um-pop{animation:none}.um-caret{transition:none}}

[data-theme="dark"] .um-topup{background:#9cbfff;color:#172033}[data-theme="dark"] .um-topup:hover{background:#bed2ff;color:#172033}

/* Selected obsidian wallet: compact amount, champagne contours, slow passing light. */
.um-balrow{display:block;min-height:84px;position:relative;isolation:isolate;overflow:hidden;padding:12px 16px;border-radius:11px;background:radial-gradient(ellipse at 0 -30%,#77705a44,transparent 66%),linear-gradient(112deg,#242626,#141617 60%,#212221);border:1px solid #8b795250;box-shadow:inset 0 1px 0 #e5d2a326,inset 0 -1px 0 #0008;color:#e5d3ac}
.um-balrow:before{content:"";position:absolute;inset:0;z-index:-1;background:repeating-linear-gradient(104deg,transparent 0,transparent 2px,#ffffff02 3px,transparent 4px);pointer-events:none}
.um-balrow:after{content:"";position:absolute;top:0;left:17px;width:70%;height:1px;background:linear-gradient(90deg,transparent,#ead29b88,transparent)}
.um-balrow>.um-wallet-label{position:relative;z-index:1;display:flex;align-items:center;gap:7px;flex-wrap:nowrap}
.um-balrow .um-lbl{font-size:11px;line-height:1.3;letter-spacing:.2px;color:#c5baa5}
.um-wallet-label>svg{width:14px;height:14px;color:#ddc793}
.um-balrow>.um-wallet-bottom{position:relative;z-index:1;display:flex;align-items:center;justify-content:space-between;flex-wrap:nowrap;gap:8px;margin-top:6px}
.um-balrow .um-amt{font-family:Inter,"Segoe UI",Arial,"Microsoft YaHei",sans-serif;font-size:28px;font-weight:600;line-height:1.1;letter-spacing:-.6px;color:#e5d3ac;text-shadow:none;max-width:100%;min-width:0;overflow-wrap:anywhere;font-variant-numeric:lining-nums tabular-nums}
.um-balrow .um-amt small{font-family:inherit;font-size:20px;letter-spacing:0}.um-balrow .um-amt small:first-child{font-size:15px;margin-right:4px;display:inline-block}
.um-balrow .um-topup{min-height:30px;padding:0 10px 0 12px;font-size:11px;gap:6px;background:linear-gradient(112deg,#c4aa79,#f2e3bd 53%,#c7ad7d);border:1px solid #ddc698a6;color:#4d3c22;box-shadow:inset 0 1px 0 #fff6,0 2px 5px #0003;border-radius:5px;transition:filter .2s,transform .2s}
.um-balrow .um-topup>svg{width:10px;height:10px}
.um-balrow .um-topup:hover{background:linear-gradient(112deg,#c4aa79,#f2e3bd 53%,#c7ad7d);color:#4d3c22;filter:brightness(1.09);transform:translateY(-1px)}
.um-balrow .um-topup:focus-visible{outline:2px solid #f0d99f;outline-offset:3px}
.um-wallet-lines{position:absolute;right:-28px;top:-37px;width:220px;height:168px;z-index:-1;opacity:.7;pointer-events:none}
.um-wallet-sheen{position:absolute;z-index:0;pointer-events:none;inset:-65% auto -65% -62%;width:42%;background:linear-gradient(110deg,transparent 12%,#e3c17a04 30%,#fae5b426 49%,#fff5d93b 52%,#e7c4810a 67%,transparent 88%);transform:translate3d(0,0,0) skewX(-17deg);opacity:0;animation:um-wallet-light 8s cubic-bezier(.25,.1,.25,1) infinite;animation-play-state:paused}
.um.on .um-wallet-sheen{animation-play-state:running}
@keyframes um-wallet-light{0%,8%{transform:translate3d(0,0,0) skewX(-17deg);opacity:0}14%{opacity:.8}44%{opacity:.8}52%,100%{transform:translate3d(540%,0,0) skewX(-17deg);opacity:0}}
@media(prefers-reduced-motion:reduce){.um-wallet-sheen{animation:none;opacity:0}.um-balrow .um-topup{transition:none}}
/* Language and currency are equal, directly accessible header controls. */
.hd-language{display:inline-flex;align-items:center;flex:none;white-space:nowrap;border:1px solid var(--line-strong);border-radius:9px;background:var(--surface)}
.hd-region-trigger{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:42px;padding:0 12px;border:0;border-radius:8px;background:transparent;color:var(--text-2);font:inherit;font-size:12px;font-weight:500;cursor:pointer;transition:background .15s,color .15s}
.hd-region-trigger+ .hd-region-trigger{border-left:1px solid var(--line);border-top-left-radius:0;border-bottom-left-radius:0}
.hd-lang-trigger{border-top-right-radius:0;border-bottom-right-radius:0}
.hd-region-trigger:hover,.hd-region-trigger[aria-expanded="true"]{background:var(--surface-2);color:var(--brand-fg)}
.hd-region-caret{flex:none;color:var(--text-3)}
.hd-region-trigger[aria-expanded="true"] .hd-region-caret{transform:rotate(180deg)}
.hd-lang-short{display:none}.hd-currency-trigger [data-fx-code]{font-variant-numeric:tabular-nums;letter-spacing:.2px}
.hd-language :focus-visible{position:relative;outline:2px solid var(--brand);outline-offset:2px}
.um-theme .um-segbtn{display:inline-flex;align-items:center;justify-content:center;gap:5px}.um-theme .um-seg{display:flex}

.fx-money{display:inline-flex;align-items:baseline;gap:3px;font-variant-numeric:tabular-nums;white-space:nowrap}.fx-money>small{font-size:.65em;font-weight:500}
.fx-reference{display:block;font-size:12px;font-weight:400;line-height:1.6;color:var(--text-3);margin-top:5px;letter-spacing:0}.fx-reference[hidden]{display:none}
.fx-source{display:flex;flex-wrap:wrap;gap:8px 16px;padding:18px 0;color:var(--text-3);font-size:11px;line-height:1.6;border-bottom:1px solid var(--line)}.fx-source a,.fx-note a{color:var(--text-3);text-decoration:underline;text-underline-offset:3px}
.fx-dialog{width:560px;max-width:calc(100vw - 48px);max-height:calc(100dvh - 48px);padding:0;border:1px solid var(--line);border-radius:20px;background:var(--surface);color:var(--text);box-shadow:0 24px 80px rgba(15,30,60,.18);overflow:hidden}
.fx-dialog::backdrop{background:rgba(20,30,50,.32);backdrop-filter:blur(3px)}
.fx-dialog[open]{animation:regional-enter .18s ease-out}
.fx-dialog form{display:flex;flex-direction:column;max-height:calc(100dvh - 48px);height:680px;margin:0;padding:0}
.fx-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;flex:none;padding:24px 28px 16px}
.fx-head h2{font-size:22px;font-weight:650;line-height:1.4;margin:0 0 6px;letter-spacing:-.4px}
.fx-head p{font-size:13px;line-height:1.6;color:var(--text-3);margin:0}
.fx-close{width:44px;height:44px;flex:none;display:grid;place-items:center;margin:-7px -10px 0 0;border:0;border-radius:50%;background:transparent;color:var(--text-3);cursor:pointer}.fx-close:hover{background:var(--surface-2);color:var(--text)}
.regional-tabs{display:flex;flex:none;gap:28px;margin:0 28px;border-bottom:1px solid var(--line)}
.regional-tab{position:relative;min-width:60px;min-height:48px;padding:10px 3px;border:0;background:transparent;color:var(--text-3);font:inherit;font-size:14px;font-weight:500;cursor:pointer}
.regional-tab[aria-selected="true"]{color:var(--brand-fg);font-weight:600}.regional-tab[aria-selected="true"]:after{content:"";position:absolute;bottom:-1px;left:0;right:0;height:2px;background:var(--brand);border-radius:2px}
.regional-panel{min-height:0;flex:1;overflow-y:auto;overscroll-behavior:contain;padding:20px 28px 12px;scrollbar-gutter:stable}
.regional-panel[hidden]{display:none}
.regional-languages{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.regional-language{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:60px;padding:16px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--text);text-align:left;font:inherit;font-size:14px;cursor:pointer}
.regional-language{min-height:82px;padding:14px;gap:10px}
.regional-language-icon{display:grid;place-items:center;flex:none;width:34px;height:34px;border-radius:9px;background:var(--surface-2);color:var(--text-2);font-size:14px;font-weight:600}
.regional-language-copy{flex:1;min-width:0;line-height:1.45}.regional-language-copy strong{display:block;font-size:14px;font-weight:600}
.regional-language[aria-pressed="true"] .regional-language-icon{background:var(--brand-bg);color:var(--brand-fg)}
[data-lang="ja"] body{font-family:"Noto Sans JP","Yu Gothic","Meiryo",var(--font-sans),sans-serif}
@media(max-width:400px){.regional-languages{gap:8px}.regional-language{padding:11px 9px;gap:7px}.regional-language-icon{width:28px;height:32px;font-size:12px}.regional-language-copy strong{font-size:14px}.regional-language>svg{width:14px;height:14px}}
.regional-language>svg{flex:none;color:var(--brand-fg);opacity:0}.regional-language[aria-pressed="true"]{border-color:var(--brand);background:var(--brand-bg);color:var(--brand-fg)}.regional-language[aria-pressed="true"]>svg{opacity:1}
.regional-language:hover{border-color:var(--line-strong);background:var(--surface-2)}
.fx-search{display:flex;align-items:center;gap:10px;padding:0 13px;border:1px solid var(--line);border-radius:9px;color:var(--text-3);background:var(--surface-2);margin-bottom:16px}
.fx-search input{min-width:0;flex:1;width:100%;height:44px;padding:0;border:0;background:transparent;outline:none;box-shadow:none;color:var(--text);font:inherit;font-size:14px}.fx-search:focus-within{outline:2px solid var(--brand);outline-offset:2px}
.fx-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.fx-option[hidden]{display:none}
.fx-option{display:flex;align-items:center;gap:10px;min-height:60px;padding:10px 12px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--text);text-align:left;cursor:pointer;transition:border-color .15s,background .15s}
.fx-option:hover:not(:disabled){background:var(--surface-2);border-color:var(--line-strong)}.fx-option[aria-pressed="true"]{background:var(--brand-bg);border-color:var(--brand)}.fx-option:disabled{opacity:.42;cursor:not-allowed}
.fx-flag{display:block;width:28px;height:21px;flex:none;object-fit:cover;border-radius:3px;box-shadow:0 0 0 1px rgba(15,23,42,.08)}
.fx-name{min-width:0;flex:1;font-size:13px;font-weight:500;line-height:1.45}.fx-name small{display:block;font-size:11px;font-weight:400;color:var(--text-3);margin-top:2px}.fx-option>svg{flex:none;opacity:0;color:var(--brand-fg)}.fx-option[aria-pressed="true"]>svg{opacity:1}
.fx-note{margin-top:16px;padding:14px 0 0;color:var(--text-3);border-top:1px solid var(--line);font-size:11px;line-height:1.7}.fx-note p{margin:0 0 5px;font-size:12px;color:var(--text-2)}
.fx-status-row{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.fx-retry{padding:0;background:transparent;border:0;color:var(--brand-fg);font:inherit;white-space:nowrap;cursor:pointer}.fx-retry:disabled{opacity:.5;cursor:wait}
.fx-actions{display:flex;align-items:center;gap:10px;flex:none;padding:16px 28px;border-top:1px solid var(--line);background:var(--surface)}
.fx-summary{flex:1;min-width:0;color:var(--text-3);font-size:12px;line-height:1.5;overflow-wrap:anywhere}.fx-actions .btn{min-height:44px;padding:10px 22px;font-size:13px}.fx-cancel{flex:none}
.fx-empty{font-size:13px;color:var(--text-3);padding:20px 0}
.regional-tab:focus-visible,.regional-language:focus-visible,.fx-option:focus-visible,.fx-close:focus-visible,.fx-retry:focus-visible{outline:2px solid var(--brand);outline-offset:3px}
@keyframes regional-enter{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@keyframes regional-sheet-enter{from{opacity:0;transform:translateY(32px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.fx-dialog[open]{animation:none}.hd-region-trigger,.fx-option{transition:none}}

/* Minimal white announcement strip. */
.notice-bar{background:#fff;color:#515966;border:0;border-bottom:1px solid #eceef1;font-size:12px}
.notice-bar .wrap{min-height:40px;display:flex;align-items:center;gap:18px;padding-top:7px;padding-bottom:7px}
.notice-label{display:inline-flex;align-items:center;gap:7px;flex:none;padding:0 16px 0 0;border:0;border-right:1px solid #e4e7ec;background:none;color:#252b35;font-size:12px;font-weight:600;line-height:1.5;letter-spacing:0}
.notice-label svg{flex:none;width:15px;height:15px;color:#687180}
.notice-copy{flex:1;min-width:0;color:#69717e;font-weight:400;line-height:1.8;overflow-wrap:anywhere}
.notice-copy .ui-icon{display:none}
.notice-link{display:inline-flex;align-items:center;justify-content:center;gap:7px;flex:none;min-height:26px;padding:3px 0;border:0;background:none;color:#555e6b;font-size:11px;font-weight:400;text-decoration:none;transition:color .18s}
.notice-link svg{width:13px;height:13px;color:inherit}
.notice-link:hover{color:#171c24;text-decoration:underline;text-underline-offset:4px}
#entry-notice-close{display:grid;place-items:center;flex:none;width:44px;height:44px;border:0;border-radius:8px;background:transparent;color:inherit;cursor:pointer}
#entry-notice-close:hover{background:var(--surface-2)}
#entry-notice-close:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
.notice-link:focus-visible{outline:2px solid #69717e;outline-offset:4px;border-radius:2px}
[data-theme="dark"] .notice-bar{background:#202329;border-bottom-color:#343942}
[data-theme="dark"] .notice-label{color:#e1e5ec;border-right-color:#404650}
[data-theme="dark"] .notice-copy,[data-theme="dark"] .notice-label svg,[data-theme="dark"] .notice-link{color:#b5bdc9}
@media(prefers-reduced-motion:reduce){.notice-link{transition:none}}

/* Storefront header controls: quiet utility surfaces, one clear account action. */
.site-header {
  --header-control-bg: color-mix(in srgb, var(--surface-2) 72%, var(--surface));
  --header-control-line: color-mix(in srgb, var(--line) 65%, transparent);
}
.site-header .hd-search-trigger,
.site-header .hd-cart,
.site-header .pref-btn {
  width: 44px;
  height: 44px;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--text-2);
  box-shadow: none;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.site-header .hd-search-trigger:hover,
.site-header .hd-search-trigger[aria-expanded="true"],
.site-header .hd-cart:hover,
.site-header .pref-btn:hover {
  background: var(--header-control-bg);
  border-color: var(--header-control-line);
  color: var(--brand-fg);
}
.site-header .hd-language {
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: var(--header-control-bg);
  box-shadow: inset 0 0 0 1px var(--header-control-line);
}
.site-header .hd-region-trigger {
  position: relative;
  height: 44px;
  min-height: 44px;
  padding-inline: 13px;
  border: 0;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 500;
  gap: 6px;
}
.site-header .hd-lang-trigger { border-radius: 14px 0 0 14px; }
.site-header .hd-currency-trigger { border-radius: 0 14px 14px 0; }
.site-header .hd-region-trigger + .hd-region-trigger { border-left: 0; }
.site-header .hd-region-trigger + .hd-region-trigger::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15px;
  height: 14px;
  width: 1px;
  background: var(--line);
}
.site-header .hd-region-caret { width: 8px; height: 8px; opacity: .65; }
.site-header .hd-region-trigger:hover,
.site-header .hd-region-trigger[aria-expanded="true"] {
  background: var(--brand-bg);
  color: var(--brand-fg);
}
.site-header .header-actions { gap: 6px; }
.site-header .header-actions > .btn {
  height: 44px;
  min-height: 44px;
  min-width: 52px;
  padding-inline: 16px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
}
.site-header .header-actions > .btn-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--text-2);
}
.site-header .header-actions > .btn-ghost:hover {
  background: var(--header-control-bg);
  color: var(--text);
}
.site-header .header-actions > .btn-primary {
  border-color: var(--brand);
  background: linear-gradient(160deg, var(--brand), var(--brand-hover));
  color: var(--text-on);
  box-shadow: inset 0 1px 0 #ffffff26, 0 3px 7px color-mix(in srgb, var(--brand) 16%, transparent);
}
.site-header .header-actions > .btn-primary:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
}
.site-header .header-actions > .btn-primary:active {
  background: var(--brand-active, var(--brand-hover));
  box-shadow: inset 0 1px 2px #00000012;
}
[data-theme="dark"] .site-header .header-actions > .btn-primary {
  color: var(--surface);
}
[data-theme="dark"] .site-header .header-actions > .btn-primary:active {
  background: var(--brand-hover);
}
.site-header :is(.hd-cart, .pref-btn, .header-actions > .btn):focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}
@media(prefers-reduced-motion:reduce) {
  .site-header :is(.hd-search-trigger, .hd-cart, .pref-btn, .header-actions > .btn) { transition: none; }
}
