/*
Theme Name: MATRIX Official
Theme URI: http://127.0.0.1:18080
Description: 中文官方站主题。卡片门户布局，用于软件商城与内容发布。
Version: 3.6.5
Author: 矩阵软件
Text Domain: matrix-portal
*/

:root {
  --bg: #f3f5f8;
  --card: #fff;
  --ink: #1f2329;
  --muted: #6b7280;
  --line: #e6e8ee;
  --blue: #3b82f6;
  --blue-deep: #2563eb;
  --navy: #1e3a5f;
  --shadow: 0 10px 30px rgba(31, 35, 41, 0.08);
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  line-height: 1.7;
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 0% 8%, #f7c6e6 0%, transparent 55%),
    radial-gradient(800px 380px at 100% 0%, #b9d4ff 0%, transparent 50%),
    radial-gradient(700px 360px at 90% 90%, #ddd6fe 0%, transparent 45%),
    var(--bg);
}
img { max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-deep); }
.wrap { width: min(1240px, calc(100% - 28px)); margin: 0 auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }

.top-brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.top-logo { width: 18px; height: 18px; border-radius: 5px; flex: 0 0 18px; display: block; object-fit: cover; }

.site-header {
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 30;
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}
.header-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--navy);
  font-weight: 800;
}
.site-logo:hover { color: var(--navy); }
.site-logo .logo-mark { display: flex; flex: 0 0 40px; color: inherit; }
.site-logo-img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  flex: 0 0 40px;
  object-fit: cover;
  display: block;
  box-shadow: 0 6px 14px rgba(37,99,235,.22);
}
.logo-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.logo-copy strong {
  display: block;
  font-size: 18px;
  white-space: nowrap;
}
.logo-copy em {
  display: block;
  margin: 3px 0 0;
  font-style: normal;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 148px;
}
.subnav {
  display: flex;
  align-items: center;
  margin: 0 0 14px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow-x: auto;
}
.subnav .primary-menu,
.primary-menu, .primary-menu ul {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
  width: 100%;
}
.subnav .primary-menu > li { flex: 1 1 0; min-width: 0; }
.subnav .primary-menu a { width: 100%; }
.primary-menu a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  color: var(--ink);
  font-weight: 700;
  border-radius: 10px;
  white-space: nowrap;
  line-height: 1;
}
.primary-menu .ico { width: 16px; height: 16px; flex: 0 0 16px; }
.primary-menu .current-menu-item > a,
.primary-menu a.is-on,
.primary-menu a:hover { background: #eef4ff; color: var(--blue-deep); }
.header-tools { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.search-form, .store-search { display: flex; gap: 8px; align-items: center; min-width: 0; }
.search-field { display: block; min-width: 0; }
.search-form input, .store-search input {
  border: 1px solid #d9e2f2;
  border-radius: 12px;
  padding: 9px 12px;
  background: #fff;
  width: 168px;
  min-width: 0;
  max-width: 100%;
  outline: none;
}
.search-form input:focus, .store-search input:focus { border-color: #93c5fd; box-shadow: 0 0 0 4px rgba(59,130,246,.12); }
.btn, .search-form button {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 12px;
  height: 38px;
  padding: 0 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
  background: linear-gradient(180deg, #4f8ef7, #2563eb);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 8px 18px rgba(37,99,235,.22);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  line-height: 1;
}
.ico { display: block; flex: 0 0 auto; }
.btn-ico { padding: 0 12px; }
.btn:hover, .search-form button:hover { transform: translateY(-1px); filter: brightness(1.04); color: #fff; }
.btn:active { transform: translateY(0); }
.btn-ghost {
  background: #fff;
  color: var(--blue-deep);
  border-color: #d9e2f2;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.btn-ghost:hover { background: #f8fbff; color: var(--blue-deep); }
.btn-post { background: linear-gradient(180deg, #3b82f6, #1d4ed8); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 10px; box-shadow: none; }

.page-shell { padding: 14px 0 80px; }
.hero-b2 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.home-card, .hero-main, .hero-side article, .list-card, .grid-card, .side-card, .channel-card, .entry, .widget, .product-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.home-card {
  display: block;
  color: #fff;
  transition: transform .16s ease, box-shadow .16s ease;
}
.home-card:hover { color: #fff; transform: translateY(-3px); box-shadow: 0 16px 34px rgba(31,35,41,.12); }
.home-card-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #60a5fa, #a78bfa 55%, #f472b6);
}
.home-card-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cover-mark {
  position: absolute;
  left: 50%;
  top: 38%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.18);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.28);
  z-index: 1;
  pointer-events: none;
}
.cover-mark .ico { width: 34px; height: 34px; color: #fff; }
.product-shot .cover-mark { top: 46%; width: 72px; height: 72px; }
.product-shot .cover-mark .ico { width: 38px; height: 38px; }
.grid-cover .cover-mark { top: 46%; width: 52px; height: 52px; border-radius: 14px; }
.grid-cover .cover-mark .ico { width: 26px; height: 26px; }
.home-card .meta {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 16px;
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(transparent, rgba(0,0,0,.68));
}
.home-card h2 {
  margin: 6px 0 0;
  font-size: 20px;
  line-height: 1.3;
  min-height: 1.3em;
  color: #fff;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-card p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 6px 0 0;
  min-height: 2.6em;
  line-height: 1.3;
  color: rgba(255,255,255,.9);
}
.hero-main { min-height: 0; position: relative; color: #fff; display: block; }
.hero-main .cover, .list-thumb, .hero-side .cover {
  background: linear-gradient(135deg, #60a5fa, #a78bfa 55%, #f472b6);
  min-height: 0;
}
.hero-main .meta {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 16px;
  background: linear-gradient(transparent, rgba(0,0,0,.62));
}
.hero-main h2 { margin: 6px 0 0; font-size: 22px; color: #fff; overflow-wrap: anywhere; }
.hero-main p, .hero-side p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-side { display: grid; gap: 14px; }
.hero-side article { display: grid; grid-template-columns: 118px 1fr; min-height: 152px; }
.hero-side .cover { min-height: 100%; }
.hero-side .txt, .list-body { padding: 14px 16px; }
.hero-side h3, .list-card h3 { margin: 4px 0 8px; font-size: 18px; }
.hero-side h3 a, .list-card h3 a, .product-card h3 a { color: var(--ink); }
.cat-tag { color: var(--blue); font-size: 12px; font-weight: 700; }

.channel-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 14px 0 18px;
}
.channel-card {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 108px;
  transition: transform .16s ease, box-shadow .16s ease;
}
.channel-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  background: #eef4ff;
  color: var(--blue-deep);
}
.channel-ico .ico { width: 18px; height: 18px; }
.channel-card:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(31,35,41,.12); color: inherit; }
.channel-card strong { display: block; margin-bottom: 4px; color: var(--ink); }
.channel-card span { color: var(--muted); font-size: 13px; }
.channel-card.is-active { outline: 2px solid #93c5fd; }

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
}
.list-head, .side-card h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 12px;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.waterfall {
  column-count: 4;
  column-gap: 16px;
}
.waterfall > .grid-card,
.waterfall > .ad-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 16px;
  break-inside: avoid;
  page-break-inside: avoid;
}
.grid-cover.h0, .grid-cover.h1, .grid-cover.h2 { min-height: 0; }
.ad-card img { width: 100%; display: block; }
.ad-banner { margin: 16px auto; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: #9aa3b2; }
.grid-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition: transform .16s ease, box-shadow .16s ease;
}
.grid-card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(31,35,41,.12); }
.grid-cover.has-img, .cover.has-img, .product-hero {
  position: relative;
  padding: 0;
  overflow: hidden;
}
.grid-cover img, .cover.has-img img, .product-hero img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  display: block;
}
.cover-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  z-index: 2;
}
.pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(15,23,42,.55);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}
.pill.tone-off { background: #2563eb; }
.pill.tone-price { background: rgba(15,23,42,.72); }
.pill.tone-dev { background: #d97706; }
.pill.tone-plan { background: #64748b; }
.pill.tone-beta { background: #059669; }
.has-corner { position: relative; }
.corner-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 2px #fff;
}
.corner-badge.tone-blue { background: #2563eb; }
.corner-badge.tone-hot { background: #ef4444; }
.tabbar a.has-corner, .tabbar .plus { position: relative; }
.product-hero {
  position: relative;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 0 0 16px;
  min-height: 160px;
  overflow: hidden;
}
.product-crumb { margin: 0 0 10px; }
.product-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}
.product-intro {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.product-shot {
  position: relative;
  width: 100%;
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  flex: 0 0 auto;
}
.product-shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  display: block;
}
.product-head { padding: 18px 20px 20px; }
.product-head h1 { margin: 0; font-size: 28px; line-height: 1.25; }
.product-head .lead { margin: 6px 0 10px; color: var(--muted); }
.fact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.fact-row span {
  background: #f3f6fb;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
}
.product-head .formats { margin: 0 0 14px; }
.product-buy { position: sticky; top: 76px; }
.product-buy .side-card { overflow: visible; }
.admin-bar .product-buy { top: 108px; }
.buy-price {
  margin: 0 0 12px;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--navy);
}
.buy-price small { display: block; margin-top: 4px; font-size: 12px; font-weight: 400; color: var(--muted); }
.product-detail { margin-top: 4px; }
.lab-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.grid-cover {
  min-height: 0;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: flex-end;
  padding: 12px;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, #60a5fa, #2563eb);
}
.grid-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.grid-body h2, .grid-body h3 { margin: 0; font-size: 17px; line-height: 1.4; min-height: 2.8em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.grid-body h2 a, .grid-body h3 a { color: var(--ink); }
.grid-body p { margin: 0; color: var(--muted); font-size: 13px; min-height: 2.6em; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 10px; }
.list-card {
  display: grid;
  grid-template-columns: 168px 1fr;
  margin-bottom: 12px;
}
.list-thumb {
  min-height: 118px;
  display: flex;
  align-items: flex-end;
  padding: 10px;
  color: #fff;
  font-weight: 700;
}
.cover-0 { background: linear-gradient(135deg, #60a5fa, #2563eb); }
.cover-1 { background: linear-gradient(135deg, #34d399, #059669); }
.cover-2 { background: linear-gradient(135deg, #f472b6, #db2777); }
.cover-3 { background: linear-gradient(135deg, #a78bfa, #6d28d9); }
.cover-4 { background: linear-gradient(135deg, #fbbf24, #d97706); }
.cover-5 { background: linear-gradient(135deg, #22d3ee, #0284c7); }
.meta-row { color: var(--muted); font-size: 12px; display: flex; gap: 12px; flex-wrap: wrap; }
.side-card { padding: 16px; margin-bottom: 12px; }
.side-card ul { margin: 0; padding-left: 18px; }
.hi-card p { margin: 8px 0 14px; color: var(--muted); }
.dock-btns { display: flex; gap: 8px; flex-wrap: wrap; }

.page-hero { padding: 8px 0 18px; }
.page-hero h1 { margin: 0; font-size: 30px; }
.breadcrumb { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.entry { padding: 28px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.product-card { padding: 16px; min-height: 150px; }
.sm-pricing { display: flex; flex-direction: column; gap: 12px; }
.sm-pricing .price-field { display: block; margin: 0; }
.sm-pricing .field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy);
}
.sm-pricing .field-label .ico { width: 15px; height: 15px; color: var(--blue-deep); }
.sm-pricing input[type="email"],
.sm-pricing input[type="text"],
.sm-pricing select {
  display: block;
  width: 100%;
  min-width: 0;
  height: 42px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid #d9e2f2;
  border-radius: 12px;
  background: #fff;
  outline: none;
  font: inherit;
}
.sm-pricing input[type="email"]:focus,
.sm-pricing select:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(59,130,246,.12);
}
.pay-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.pay-opt, .sku-line {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #d9e2f2;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-weight: 700;
  line-height: 1.2;
}
.pay-opt { min-height: 46px; }
.sm-pricing input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}
.pay-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  color: #fff;
}
.pay-ico .ico { width: 16px; height: 16px; }
.pay-ico.tone-ali { background: #1677ff; }
.pay-ico.tone-wx { background: #07c160; }
.pay-name, .sku-name { flex: 1; min-width: 0; }
.sku-list { display: flex; flex-direction: column; gap: 8px; }
.sku-dot {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 2px solid #c5d0e0;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 3px #fff;
}
.sku-price { color: var(--navy); font-variant-numeric: tabular-nums; }
.pay-opt:has(input:checked),
.sku-line:has(input:checked) {
  border-color: #2563eb;
  background: #eef4ff;
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.sku-line:has(input:checked) .sku-dot {
  border-color: #2563eb;
  background: #2563eb;
  box-shadow: inset 0 0 0 3px #fff;
}
.sm-pricing .btn-buy {
  width: 100%;
  height: 44px;
  margin-top: 2px;
  overflow: visible;
}
.sm-pricing .btn-buy .btn-txt { overflow: hidden; text-overflow: ellipsis; }
.sm-pricing .btn-buy .corner-badge { top: -8px; right: -8px; }
.sm-keys code { display: block; background: #f8fafc; border: 1px dashed var(--line); padding: 10px; margin: 8px 0; }

.site-footer {
  background: rgba(255,255,255,.88);
  border-top: 1px solid var(--line);
  padding: 36px 0 90px;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 20px; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.footer-brand h3 { margin: 0; }
.footer-logo { width: 36px; height: 36px; border-radius: 10px; display: block; object-fit: cover; }
.site-footer h3 { margin: 0 0 10px; font-size: 15px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 6px 0; }
.site-footer a { display: inline-flex; align-items: center; gap: 6px; }
.site-footer .ico { width: 14px; height: 14px; }
.copyright { color: var(--muted); font-size: 13px; margin-top: 18px; }

.float-dock {
  position: fixed;
  right: 16px;
  bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 40;
}
.dock-btn {
  width: 52px;
  min-height: 52px;
  border: 0;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
  color: var(--navy);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 0;
  text-decoration: none;
}
.dock-btn .ico { width: 18px; height: 18px; }
.dock-btn em {
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  color: var(--muted);
}
.dock-btn:hover { color: var(--blue-deep); }
.dock-btn:hover em { color: var(--blue-deep); }

.tabbar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #fff;
  border-top: 1px solid var(--line);
  z-index: 50;
  padding: 6px 8px 10px;
}
.tabbar nav {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  text-align: center;
  font-size: 11px;
  align-items: end;
}
.tabbar a {
  color: var(--ink);
  padding: 4px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  line-height: 1.2;
}
.tabbar a .ico { width: 20px; height: 20px; }
.tabbar .plus {
  width: 48px;
  height: 48px;
  margin: -18px auto 0;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.tabbar .plus .ico { width: 22px; height: 22px; }

.dock-btn:hover { transform: translateY(-2px); }

.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid #d9e2f2;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  align-items: center;
  justify-content: center;
}
.nav-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .42);
  z-index: 60;
}
.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(360px, 88vw);
  height: 100%;
  background: #fff;
  z-index: 70;
  padding: 18px 16px 100px;
  box-shadow: -12px 0 32px rgba(15,23,42,.16);
  overflow: auto;
}
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.mobile-drawer nav { display: grid; gap: 4px; margin: 14px 0; }
.drawer-menu, .drawer-menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.mobile-drawer nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 10px;
  color: var(--ink);
  font-weight: 700;
  border-radius: 10px;
}
.mobile-drawer nav .ico { width: 18px; height: 18px; color: var(--blue-deep); }
.mobile-drawer nav a:hover { background: #eef4ff; }
.drawer-actions { display: flex; gap: 8px; }
.drawer-actions .btn { flex: 1; text-align: center; line-height: 38px; }
.mobile-drawer .search-form { display: flex; }
.mobile-drawer .search-form input { min-width: 0; flex: 1; }
body.nav-open { overflow: hidden; }

.account-hero, .order-card, .account-form, .stat-card, .flash {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.account-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  margin-bottom: 14px;
}
.account-hero p { margin: 4px 0 0; color: var(--muted); }
.account-hero .btn { margin-left: auto; }
.avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, #60a5fa, #2563eb);
}
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.stat-card { padding: 14px; text-align: center; }
.stat-card b { display: block; font-size: 22px; }
.stat-card span { color: var(--muted); font-size: 12px; }
.account-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0 0 14px;
  -webkit-overflow-scrolling: touch;
}
.account-tabs button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  height: 36px;
  padding: 0 14px;
  font: inherit;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.account-tabs button.is-on { background: #2563eb; color: #fff; border-color: #2563eb; }
.account-form, .order-card { padding: 18px; margin-bottom: 12px; }
.account-form label { display: block; margin: 0 0 12px; font-weight: 700; }
.account-form input, .account-form select {
  width: 100%;
  min-width: 0;
  margin-top: 6px;
}
.order-card header { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.order-card header .meta-row { display: block; margin-top: 4px; }
.order-items { margin: 10px 0; padding-left: 18px; }
.key-row { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.key-row code { flex: 1; overflow-wrap: anywhere; }
.order-status { font-style: normal; font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 999px; background: #eef2ff; color: #3730a3; }
.order-status.s-delivered, .order-status.s-completed, .order-status.s-paid { background: #ecfdf5; color: #047857; }
.order-status.s-pending { background: #fff7ed; color: #c2410c; }
.hint { color: var(--muted); font-size: 13px; }
.flash { padding: 12px 14px; margin-bottom: 12px; }
.flash-err { background: #fef2f2; color: #b91c1c; }
.flash-ok { background: #ecfdf5; color: #047857; }
.panel-title { font-size: 18px; margin: 18px 0 10px; }
.tabbar a.is-on { color: var(--blue-deep); font-weight: 800; }

@media (hover: none) {
  .grid-card:hover, .channel-card:hover { transform: none; }
}

@media (max-width: 1360px) {
  .logo-copy em { display: none; }
}
@media (max-width: 1200px) {
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .waterfall { column-count: 3; }
  .search-form input { width: 120px; }
  .header-tools .btn-txt { display: none; }
  .header-tools .btn-ico { width: 38px; padding: 0; }
}
@media (max-width: 980px) {
  body { overflow-x: hidden; }
  .subnav, .header-tools .search-form, .hide-sm, .float-dock { display: none !important; }
  .nav-toggle { display: inline-flex; }
  .header-inner { grid-template-columns: minmax(0, 1fr) auto; padding: 8px 0; gap: 10px; }
  .hero-b2 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .main-grid, .footer-grid, .list-card, .hero-side article { grid-template-columns: 1fr; }
  .channel-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .waterfall { column-count: 2; }
  .home-card h2 { font-size: 16px; }
  .page-hero h1 { font-size: 24px; overflow-wrap: anywhere; }
  .entry { padding: 18px; }
  .page-shell { padding: 12px 0 108px; }
  .site-footer { padding-bottom: 110px; }
  .tabbar {
    display: block;
    padding: 6px 8px calc(10px + env(safe-area-inset-bottom));
  }
  .account-hero { flex-wrap: wrap; }
  .account-hero .btn { margin-left: 0; width: 100%; text-align: center; line-height: 38px; }
  .lab-grid { grid-template-columns: 1fr; }
  .product-hero, .product-shot { min-height: 0; max-height: none; }
  .product-stage { grid-template-columns: 1fr; }
  .product-buy { position: static; }
  .product-head h1 { font-size: 24px; }
  .header-tools .btn-txt { display: inline; }
  .header-tools .btn-ico { width: auto; padding: 0 12px; }
}
@media (max-width: 560px) {
  .wrap { width: min(1240px, calc(100% - 20px)); }
  .card-grid, .channel-row { grid-template-columns: 1fr; }
  .hero-b2 {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .home-card { flex: 0 0 min(168px, 42vw); scroll-snap-align: start; }
  .waterfall { column-count: 1; }
  .admin-bar .site-header { top: 46px; }
  .logo-copy strong { font-size: 16px; }
  .site-logo .logo-mark, .site-logo-img { width: 34px; height: 34px; flex-basis: 34px; }
  .header-tools .btn-txt { display: none; }
  .header-tools .btn-ico { width: 36px; padding: 0; }
  .stat-row { gap: 8px; }
  .key-row { flex-wrap: wrap; }
}
