/* ═══════════════════════════════════════════════════════════════
   TEAM DOGS — design system "The Kennel"
   Void black + roar orange + ice cyan + bite yellow.
   Chamfered corners, low-poly brand shapes, terminal numerals.
   ═══════════════════════════════════════════════════════════════ */

/* ── tokens ── */
:root {
  --bg: #07080D;
  --bg2: #0C0E16;
  --panel: #10131D;
  --panel2: #161A28;
  --line: rgba(233, 236, 244, .09);
  --line2: rgba(233, 236, 244, .18);
  --txt: #E9ECF4;
  --dim: #98A1B3;
  --faint: #5C6478;
  --acc: #FF5D1F;
  --acc2: #FF4D0F;
  --cyan: #35E1FF;
  --yel: #FFD21A;
  --ok: #37F59B;
  --bad: #FF4D6E;
  --c: var(--acc);               /* 分部/主题动态色 */
  --f: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Code", ui-monospace, "SF Mono", Consolas, monospace;
  --cut: 16px;
  --hdr-h: 74px;
  --e: cubic-bezier(.22, .9, .28, 1);
}

/* ── reset ── */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--f);
  background: var(--bg);
  color: var(--txt);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button { font-family: inherit; cursor: pointer; background: none; border: 0; color: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
::selection { background: var(--acc); color: #0A0B10; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: #23283A; border: 2px solid var(--bg2); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--acc); }

/* ── 图标（形状自带 fill/stroke，这里只控尺寸）── */
.ic { width: var(--s, 16px); height: var(--s, 16px); flex: none; }

/* ── 通用布局 ── */
.wrap { width: min(1240px, 92vw); margin-inline: auto; }
main#app { min-height: 60vh; }
section { position: relative; }
.sec { padding: clamp(56px, 8vw, 104px) 0; }
.sec-alt { background: var(--bg2); border-block: 1px solid var(--line); }

/* 切角 */
.cut { clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%); }
.cut-tl { clip-path: polygon(var(--cut) 0, 100% 0, 100% 100%, 0 100%, 0 var(--cut)); }
.cut-2 { clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut))); }

/* ── 按钮体系 ── */
.btn {
  --cut: 12px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 28px;
  background: var(--acc); color: #0A0B10;
  font-weight: 800; font-size: 15px; letter-spacing: .04em;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
  transition: transform .18s var(--e), background .18s, box-shadow .18s;
  user-select: none;
}
.btn:hover { background: #FF7A42; transform: translateY(-2px); box-shadow: 0 10px 28px -10px rgba(255, 93, 31, .55); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.sm { padding: 10px 16px; font-size: 13px; gap: 7px; }
.btn.wide { width: 100%; }
.btn.ghost {
  background: transparent; color: var(--txt);
  box-shadow: inset 0 0 0 1.5px var(--line2);
}
.btn.ghost:hover { background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1.5px var(--acc); color: var(--acc); }
.btn.cyan { background: var(--cyan); }
.btn.cyan:hover { background: #63EAFF; box-shadow: 0 10px 28px -10px rgba(53, 225, 255, .5); }

/* ── 章节标题 ── */
.sec-head {
  display: flex; align-items: baseline; gap: 18px;
  margin-bottom: clamp(28px, 4vw, 48px);
}
.sec-idx {
  font-family: var(--mono); font-size: 13px; color: var(--acc);
  border: 1px solid rgba(255, 93, 31, .4); padding: 3px 9px; line-height: 1.3;
  transform: translateY(-4px);
}
.sec-title {
  font-size: clamp(24px, 3.4vw, 40px);
  font-weight: 900; letter-spacing: .02em; line-height: 1.15;
}
.sec-line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--line2), transparent); transform: translateY(-6px); }
.sec-sub { color: var(--dim); max-width: 640px; margin-top: -18px; margin-bottom: 36px; }

/* ── 页头 ── */
#hdr {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  height: var(--hdr-h);
  background: rgba(7, 8, 13, .78);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: height .25s var(--e), background .25s, border-color .25s;
}
#hdr.shrink { height: 60px; background: rgba(7, 8, 13, .92); border-color: var(--line); }
.hdr-in { height: 100%; display: flex; align-items: center; gap: 26px; }
.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.brand-mark { width: 34px; height: 34px; filter: drop-shadow(0 0 12px rgba(255, 93, 31, .45)); }
.brand-word { display: flex; flex-direction: column; line-height: 1.05; font-weight: 900; letter-spacing: .06em; font-size: 17px; }
.brand-word b { color: var(--acc); }
.brand-word em { font-style: normal; font-family: var(--mono); font-weight: 400; font-size: 9.5px; letter-spacing: .34em; color: var(--dim); margin-top: 3px; }

.nav { display: flex; gap: 2px; margin-left: auto; }
.nav-a {
  display: flex; align-items: baseline; gap: 5px;
  padding: 8px 13px; font-size: 14.5px; font-weight: 600; color: var(--dim);
  border-bottom: 2px solid transparent;
  transition: color .16s;
  position: relative;
}
.nav-a:hover { color: var(--txt); }
.nav-a.act { color: var(--txt); }
.nav-a.act::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -2px; height: 2px; background: var(--acc); }
.nav-i { font-family: var(--mono); font-size: 9.5px; color: var(--faint); letter-spacing: .05em; }
.nav-a.act .nav-i, .nav-a:hover .nav-i { color: var(--acc); }

.hdr-tools { display: flex; align-items: center; gap: 10px; margin-left: 8px; flex: none; }
.lang-sw { display: flex; border: 1px solid var(--line2); }
.lang-sw button {
  padding: 6px 11px; font-size: 12px; font-weight: 700; color: var(--dim);
  transition: all .15s;
}
.lang-sw button + button { border-left: 1px solid var(--line2); }
.lang-sw button.act { background: var(--acc); color: #0A0B10; }
.lang-sw button:not(.act):hover { color: var(--txt); }

.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--line2); color: var(--txt);
  transition: all .15s; position: relative;
}
.icon-btn:hover { border-color: var(--acc); color: var(--acc); }
.burger { display: none; }
.cart-n {
  position: absolute; top: -7px; right: -7px;
  min-width: 18px; height: 18px; padding: 0 4px;
  display: grid; place-items: center;
  background: var(--acc); color: #0A0B10;
  font-size: 10.5px; font-weight: 800; font-family: var(--mono);
  clip-path: polygon(0 0, 100% 0, 100% 65%, 65% 100%, 0 100%);
  opacity: 0; transform: scale(.5); transition: all .2s var(--e);
}
.cart-n.show { opacity: 1; transform: scale(1); }

/* ── 滚动战报 ── */
#ticker {
  display: flex; align-items: stretch;
  border-bottom: 1px solid var(--line);
  background: var(--bg2);
  position: relative; z-index: 5;
}
.tk-label {
  flex: none; display: flex; align-items: center; gap: 6px;
  padding: 0 16px; font-size: 11.5px; font-weight: 800; letter-spacing: .12em;
  color: var(--acc); background: rgba(255, 93, 31, .08);
  border-right: 1px solid var(--line);
}
.tk-roll { overflow: hidden; flex: 1; display: flex; align-items: center; }
.tk-track { display: flex; white-space: nowrap; animation: tk 46s linear infinite; }
#ticker:hover .tk-track { animation-play-state: paused; }
.tk-seq { display: inline-flex; }
.tk-i {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 26px; font-size: 12.5px; color: var(--dim);
  border-right: 1px solid var(--line);
}
.tk-i b { color: var(--txt); font-weight: 700; }
.tk-i em { font-style: normal; font-family: var(--mono); font-weight: 700; }
.tk-i em.win { color: var(--ok); }
.tk-i em.lose { color: var(--bad); }
.tk-dot { width: 7px; height: 7px; background: var(--c); transform: rotate(45deg); flex: none; }
@keyframes tk { to { transform: translateX(-50%); } }

/* ── 页脚 ── */
#ftr {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg2), #050609);
  padding: 64px 0 0; margin-top: 0;
}
.ftr-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 48px; }
.ftr-motto { color: var(--dim); font-size: 14px; margin: 18px 0 20px; max-width: 300px; }
.ftr-social { display: flex; gap: 8px; flex-wrap: wrap; }
.soc-chip {
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em;
  padding: 6px 12px; border: 1px solid var(--line2); color: var(--dim);
  transition: all .15s;
}
.soc-chip:hover { border-color: var(--acc); color: var(--acc); }
.ftr-col h4 {
  font-family: var(--mono); font-size: 11.5px; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase; color: var(--faint);
  margin-bottom: 18px;
}
.ftr-col a, .ftr-line { display: block; color: var(--dim); font-size: 14px; padding: 4px 0; transition: color .15s; }
.ftr-col a:hover { color: var(--acc); }
.ftr-line { font-size: 13px; }
.ftr-bar {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding: 20px 0 26px; color: var(--faint); font-size: 12.5px;
}
.ftr-made { font-family: var(--mono); letter-spacing: .04em; }

/* ── 购物车抽屉 ── */
#scrim { position: fixed; inset: 0; z-index: 70; background: rgba(4, 5, 9, .6); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.cart {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 71;
  width: min(420px, 92vw);
  background: var(--panel); border-left: 1px solid var(--line2);
  display: flex; flex-direction: column;
  transform: translateX(105%); transition: transform .32s var(--e);
}
.cart.open { transform: translateX(0); box-shadow: -30px 0 60px rgba(0, 0, 0, .5); }
.cart-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px; border-bottom: 1px solid var(--line);
  font-size: 17px; font-weight: 800; letter-spacing: .04em;
}
.cart-head i {
  font-style: normal; font-family: var(--mono); font-size: 12px; color: var(--acc);
  margin-left: 8px; vertical-align: 2px;
}
.cart-body { flex: 1; overflow-y: auto; padding: 8px 22px; }
.cart-empty { color: var(--dim); text-align: center; padding: 60px 0; font-size: 14px; }
.cart-row {
  display: grid; grid-template-columns: 52px 1fr auto auto; gap: 14px; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.cart-thumb {
  width: 52px; height: 52px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--pc) 16%, transparent);
  color: var(--pc);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}
.cart-mid b { display: block; font-size: 14px; line-height: 1.35; }
.cart-opt { display: block; font-style: normal; font-size: 12px; color: var(--dim); }
.cart-price { font-family: var(--mono); font-size: 13px; color: var(--acc); font-weight: 700; }
.cart-qty { display: flex; align-items: center; gap: 2px; border: 1px solid var(--line2); }
.cart-qty button { width: 26px; height: 26px; display: grid; place-items: center; color: var(--dim); }
.cart-qty button:hover { color: var(--acc); }
.cart-qty b { min-width: 24px; text-align: center; font-family: var(--mono); font-size: 13px; }
.cart-del { color: var(--faint); padding: 6px; transition: color .15s; }
.cart-del:hover { color: var(--bad); }
.cart-foot { border-top: 1px solid var(--line2); padding: 18px 22px 22px; }
.cart-line { display: flex; justify-content: space-between; font-size: 14px; padding: 3px 0; }
.cart-line.dim { color: var(--dim); font-size: 13px; }
.cart-line b { font-family: var(--mono); }
.cart-line:first-child b { font-size: 18px; color: var(--acc); }
.cart-note { font-size: 11.5px; color: var(--faint); margin: 8px 0 14px; }

/* ── 弹层 / Toast ── */
#modal-root { position: fixed; inset: 0; z-index: 90; pointer-events: none; }
#modal-root .scrim { pointer-events: auto; z-index: 0; }
#modal-root .modal {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(680px, 94vw); max-height: 86vh; overflow-y: auto;
  background: var(--panel2); border: 1px solid var(--line2);
  --cut: 18px;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
  padding: 34px; pointer-events: auto;
  animation: pop .22s var(--e);
}
#modal-root.closing .modal, #modal-root.closing .scrim { opacity: 0; transition: opacity .18s; }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -46%); } }
.modal-x { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; display: grid; place-items: center; color: var(--dim); border: 1px solid var(--line); }
.modal-x:hover { color: var(--acc); border-color: var(--acc); }
.ok-wrap { text-align: center; padding: 30px 10px; }
.ok-ic { color: var(--ok); margin: 0 auto 18px; }
.ok-wrap h3 { font-size: 17px; line-height: 1.6; }

.toast-root { position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%); z-index: 95; }
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel2); border: 1px solid rgba(55, 245, 155, .4);
  color: var(--txt); font-size: 14px; font-weight: 600;
  padding: 12px 22px;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
  animation: toastin .3s var(--e);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
}
.toast .ic { color: var(--ok); }
@keyframes toastin { from { opacity: 0; transform: translateY(16px); } }

/* ── 浮动元素 ── */
#prog {
  position: fixed; top: 0; left: 0; right: 0; height: 2.5px; z-index: 80;
  background: linear-gradient(90deg, var(--acc), var(--yel));
  transform-origin: 0 0; transform: scaleX(0);
}
.to-top {
  position: fixed; right: 26px; bottom: 26px; z-index: 65;
  width: 46px; height: 46px; display: grid; place-items: center;
  background: var(--panel2); color: var(--acc); border: 1px solid var(--line2);
  clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 11px, 100% 100%, 0 100%);
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: all .25s var(--e);
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--acc); color: #0A0B10; }

.noise {
  position: fixed; inset: 0; z-index: 99; pointer-events: none; opacity: .05;
  background-image: repeating-conic-gradient(rgba(255, 255, 255, .6) 0 .0001%, transparent 0 .0002%);
  mix-blend-mode: overlay;
}
.paw-fall {
  position: fixed; top: -40px; z-index: 98; pointer-events: none;
  animation: pawfall 2.4s linear forwards;
}
@keyframes pawfall {
  to { transform: translateY(110vh) rotate(340deg); opacity: 0; }
}

/* ── 移动端抽屉导航 ── */
.nav-drawer {
  position: fixed; inset: 0; z-index: 85;
  background: rgba(5, 6, 10, .7);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.nav-drawer.open { opacity: 1; pointer-events: auto; }
.nav-drawer-in {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(320px, 86vw); padding: 90px 30px 40px;
  background: var(--panel); border-left: 1px solid var(--line2);
  display: flex; flex-direction: column; gap: 4px; overflow-y: auto;
  transform: translateX(100%); transition: transform .3s var(--e);
}
.nav-drawer.open .nav-drawer-in { transform: translateX(0); }
.nav-a.big { font-size: 19px; padding: 13px 6px; border-bottom: 1px solid var(--line); }
.drawer-lang { margin-top: 22px; }
.nav-drawer .btn { margin-top: 14px; }

/* ── 滚动显现 ── */
.rv { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--e), transform .7s var(--e); transition-delay: calc(var(--i, 0) * 70ms); }
.rv.on { opacity: 1; transform: none; }

/* ── 页面切换 ── */
.page-in { animation: pagein .45s var(--e); }
@keyframes pagein { from { opacity: 0; transform: translateY(14px); } }

/* ── 表单 ── */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 12.5px; font-weight: 700; letter-spacing: .06em; color: var(--dim); }
.field input, .field select, .field textarea {
  background: var(--bg2); border: 1px solid var(--line2);
  padding: 13px 16px; font-size: 14.5px; outline: none;
  transition: border-color .15s, box-shadow .15s;
  border-radius: 0;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--acc); box-shadow: 0 0 0 3px rgba(255, 93, 31, .15);
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%), linear-gradient(135deg, var(--dim) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size: 6px 6px; background-repeat: no-repeat; }

/* ── 响应式 ── */
@media (max-width: 1080px) {
  .nav { display: none; }
  .burger { display: grid; }
  .ftr-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  :root { --hdr-h: 62px; --cut: 12px; }
  .lang-sw { display: none; }
  .brand-word em { display: none; }
  .ftr-grid { grid-template-columns: 1fr; gap: 28px; }
  .ftr-bar { flex-direction: column; }
  .cart-row { grid-template-columns: 44px 1fr auto; }
  .cart-qty { grid-column: 2 / 4; justify-self: start; }
  .to-top { right: 16px; bottom: 16px; }
  #ticker { display: none; }
}

/* ── 动效减弱 ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; }
}

/* ── chrome 补丁 ── */
.btn.ghost.btn-ghost, .btn-ghost { background: transparent; border: 0; box-shadow: inset 0 0 0 1.5px var(--line2); color: var(--dim); }
.btn-ghost:hover { color: var(--acc); box-shadow: inset 0 0 0 1.5px var(--acc); background: rgba(255, 93, 31, .06); }
.ftr-brand .brand { margin-bottom: 16px; }
.ftr-brand .brand-mark { width: 42px; height: 42px; }
.ftr-brand .brand-word { font-size: 19px; }
.ftr-motto { color: var(--dim); font-size: 13.5px; max-width: 300px; margin-bottom: 18px; }
.ftr-social { display: flex; gap: 8px; flex-wrap: wrap; }
