/* =========================================================
   Matin Kim — 正品认证页
   ========================================================= */

[hidden] { display: none !important; }

:root {
  --ink: #111111;
  --ink-soft: #2c2c2c;
  --muted: #767676;
  --hair: #cfcfcf;
  --seal: #16233f;
  --blue: #2166ac;
  --blue-domain: #1668c4;
  --nav-h: 52px;
  --shell-w: 520px;
  --serif: "Times New Roman", "Songti SC", "Noto Serif KR", "Bodoni MT", Georgia, serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  max-width: var(--shell-w);
  background: #ffffff;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.07);
}

body.lock { overflow: hidden; }

/* ============================= 顶部导航 ============================= */

.nav {
  position: sticky;
  top: 0;
  z-index: 80;
  height: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  display: flex;
  align-items: center;
  background: #ffffff;
}

/* 三条横杠：点开抽屉菜单 */
.nav-menu {
  flex: 0 0 56px;
  width: 56px;
  height: var(--nav-h);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 5px;
  padding: 0 0 0 18px;
  border: 0;
  background: none;
  outline: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.nav-menu:active span { transform: scaleX(.86); }

.nav-menu span {
  display: block;
  width: 18px;
  height: 1.7px;
  background: #161616;
  border-radius: 1px;
  transition: transform .16s ease;
  transform-origin: left center;
}

.nav-brand {
  flex: 1 1 auto;
  text-align: center;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 400;
  letter-spacing: 0.06em;
  word-spacing: 0.5em;
  color: #141414;
  white-space: nowrap;
  transform: translateX(-6px);
}

.nav-tail { flex: 0 0 56px; width: 56px; }

/* ============================= 侧边抽屉菜单 ============================= */

.drawer-mask {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(0, 0, 0, .42);
  opacity: 0;
  transition: opacity .28s ease;
  -webkit-tap-highlight-color: transparent;
}

.drawer-mask.show { opacity: 1; }

.drawer {
  position: fixed;
  top: 0;
  left: max(0px, calc(50vw - var(--shell-w) / 2));
  bottom: 0;
  z-index: 160;
  width: 82vw;
  max-width: 340px;
  background: #ffffff;
  overflow: hidden;
  padding-top: env(safe-area-inset-top, 0px);
  box-shadow: 6px 0 28px rgba(0, 0, 0, .16);
  transform: translateX(-100%);
  transition: transform .32s cubic-bezier(.32, .72, 0, 1);
  will-change: transform;
}

.drawer.show { transform: translateX(0); }

/* 抽屉内的两级视图容器（菜单 ←→ 语言），横向滑动切换 */
.drawer-stage {
  display: flex;
  width: 200%;
  height: 100%;
  transition: transform .3s cubic-bezier(.32, .72, 0, 1);
}

.drawer-stage.slide { transform: translateX(-50%); }

.drawer-view {
  flex: 0 0 50%;
  width: 50%;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.drawer-head {
  flex: 0 0 auto;
  height: 54px;
  padding: 0 12px 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f0f0f0;
}

.drawer-brand {
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 0.06em;
  word-spacing: 0.32em;
  color: #141414;
}

.drawer-close {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.drawer-close:active { opacity: .5; }
.drawer-close svg { width: 19px; height: 19px; }

.drawer-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0 10px;
}

.drawer-group { padding: 0; }

.drawer-group-title {
  padding: 15px 22px 5px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #b0b0b0;
}

.drawer-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* 菜单项：只做展示，点击完全无反应 */
.drawer-item {
  position: relative;
  height: 42px;
  margin: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  letter-spacing: 0.09em;
  color: #1c1c1c;
  border-bottom: 1px solid #f4f4f4;
  pointer-events: none;        /* 关键：点不进去 */
  user-select: none;
}

.drawer-item:last-child { border-bottom: 0; }

.drawer-item .chev {
  width: 6px;
  height: 6px;
  border-top: 1px solid #c6c6c6;
  border-right: 1px solid #c6c6c6;
  transform: rotate(45deg);
  margin-right: 2px;
  flex: 0 0 auto;
}

.drawer-item.is-current {
  color: #0a0a0a;
  font-weight: 600;
}

.drawer-item.is-current .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #0a0a0a;
  flex: 0 0 auto;
}

.drawer-foot {
  flex: 0 0 auto;
  padding: 12px 22px 16px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-lang {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: #b8b8b8;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.drawer-lang:active { opacity: .55; }
.drawer-lang span { transition: color .15s ease; }
.drawer-lang .lang-on { color: #111; font-weight: 600; }

.drawer-lang-arrow {
  width: 6px;
  height: 6px;
  border-top: 1px solid #c6c6c6;
  border-right: 1px solid #c6c6c6;
  transform: rotate(45deg);
  margin-left: 3px;
  flex: 0 0 auto;
}

.drawer-copy {
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: #c4c4c4;
}

/* ============================= 黑色主视觉 ============================= */

/* Hero 直接用原站截图整块做背景，文字是图片自带的，页面不再重复渲染文字 */
.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 1220 / 882;
  background: #0b0b0b url("img/hero-bg.jpg") center center / cover no-repeat;
  overflow: hidden;
}

/* 文字已在背景图里，这里全部隐藏（保留结构，需要时可切回） */
.hero-inner,
.hero-grain,
.hero-shade,
.hero::after {
  display: none !important;
}

.hero-grain {
  position: absolute;
  inset: -15%;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='320' height='320' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  background-size: 210px 210px;
  opacity: 0.18;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 1;
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(96deg,
      transparent 0 17%,
      rgba(255, 255, 255, .05) 17.5%,
      transparent 18.6% 33%,
      rgba(0, 0, 0, .55) 33.8%,
      transparent 35% 51%,
      rgba(255, 255, 255, .055) 51.6%,
      transparent 52.8% 69%,
      rgba(0, 0, 0, .5) 69.7%,
      transparent 71% 85%,
      rgba(255, 255, 255, .03) 85.6%,
      transparent 86.8%),
    radial-gradient(125% 72% at 41% 16%, rgba(255, 255, 255, .11), transparent 63%),
    radial-gradient(92% 62% at 79% 89%, rgba(255, 255, 255, .075), transparent 67%),
    radial-gradient(72% 92% at 6% 68%, rgba(255, 255, 255, .045), transparent 61%),
    radial-gradient(120% 100% at 50% 50%, transparent 42%, rgba(0, 0, 0, .55) 100%);
}

/* 皮革褶皱细纹 */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    repeating-linear-gradient(95deg,
      rgba(255, 255, 255, .03) 0 1px,
      transparent 1px 7px,
      rgba(0, 0, 0, .34) 7px 10px,
      transparent 10px 24px);
  opacity: .5;
  mix-blend-mode: overlay;
  filter: blur(0.5px);
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding: 0 20px;
  text-align: center;
  transform: translateY(-2%);
}

.hero-title {
  margin: 0 0 20px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(25px, 8vw, 36px);
  line-height: 1.16;
  letter-spacing: 0.055em;
  word-spacing: 0.5em;
  color: #ffffff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .55);
  white-space: nowrap;
}

.hero-desc {
  margin: 0 auto;
  max-width: 32em;
  font-size: clamp(8.4px, 2.42vw, 10.6px);
  line-height: 1.78;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, .88);
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
}

/* ============================= 认证信息区 ============================= */

.panel {
  flex: 1 1 auto;
  position: relative;
  background: #ffffff;
  padding: 24px 12px 0;
}

.cert {
  position: relative;
  padding-right: 76px;
  min-height: 88px;
}

/* 两行共享一套网格列宽，切换语言后标签长度变化也能对齐 */
.cert-lines {
  display: grid;
  grid-template-columns: max-content 1px 1fr;
  align-items: center;
  column-gap: 6px;
  row-gap: 16px;
  padding-top: 4px;
  font-size: 15px;
  line-height: 1.45;
}

.cert-row {
  display: contents;
}

.cert-row .k {
  color: #131313;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.cert-row .bar {
  width: 1px;
  height: 13px;
  background: var(--hair);
}

.cert-row .v {
  font-size: 13px;
  color: #1f1f1f;
  letter-spacing: 0.01em;
}

.cert-row .v.muted { color: var(--muted); }

/* 认证次数：3 次以内绿色，超过 3 次红色并带 + */
.cert-row .v .cnt {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.cert-row .v .cnt--ok { color: #12984a; }
.cert-row .v .cnt--over { color: #e0301e; }

/* 次数由接口返回，延迟淡入避免数字跳变 */
#certCount { animation: countIn .24s ease-out .3s both; }

@keyframes countIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* 环形印章 */
.seal {
  position: absolute;
  top: -2px;
  right: 0;
  width: 74px;
  height: 74px;
  color: var(--seal);
  pointer-events: none;
}

.seal svg { display: block; width: 100%; height: 100%; overflow: visible; }

.seal-arc {
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-size: 13.6px;
  letter-spacing: 1.4px;
  fill: currentColor;
}

.seal-arc--cn {
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 11px;
  letter-spacing: 0.4px;
}

.seal-core {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 0.02em;
  fill: currentColor;
}

/* 防伪说明两行 */
.notes {
  margin-top: 20px;
}

.notes p {
  position: relative;
  margin: 0 0 5px;
  padding-left: 11px;
  font-size: 12.5px;
  line-height: 1.8;
  color: #2c2c2c;
  letter-spacing: 0.01em;
}

.notes p:last-child { margin-bottom: 0; }

.notes p::before {
  content: "·";
  position: absolute;
  left: 0;
  top: -1px;
  color: #555;
}

/* 钓鱼网站识别 */
.phish {
  margin-top: 28px;
  border: 1.5px solid #a9c6e2;
  border-radius: 8px;
  background: #ffffff;
  padding: 15px 15px 17px;
}

.phish-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-bottom: 9px;
}

.shield { width: 21px; height: 24px; flex: 0 0 auto; }

.phish-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--blue);
}

.phish-body {
  margin: 0;
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}

.domain {
  color: var(--blue-domain);
  font-size: 0.95em;
  white-space: nowrap;
}

/* 放大提示 */
.tip {
  margin-top: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  font-size: 14.5px;
  color: #202020;
  letter-spacing: 0.01em;
}

.tip-icon { width: 26px; height: 31px; flex: 0 0 auto; }

.panel-tail { height: 56px; }

/* ============================= 固定按钮 ============================= */

.to-top {
  position: fixed;
  right: 14px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 18px);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid #e6e6e6;
  background: #ffffff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 60;
  transition: opacity .2s, transform .2s;
}

.to-top:active { transform: scale(.94); }
.to-top svg { width: 24px; height: 24px; }

@media (min-width: 560px) {
  .to-top { right: calc(50% - (var(--shell-w) / 2) + 14px); }
}


/* ============================= 定位授权弹窗 ============================= */

.consent {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, .5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 18px;
  animation: consentFade .2s ease-out;
}

.consent[hidden] { display: none !important; }

@keyframes consentFade { from { opacity: 0; } to { opacity: 1; } }

.consent-card {
  width: 100%;
  max-width: 400px;
  max-height: 86vh;
  max-height: 86dvh;
  background: #fff;
  border-radius: 16px;
  padding: 26px 16px 18px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 14px 44px rgba(0, 0, 0, .3);
  animation: consentIn .28s cubic-bezier(.32, .72, 0, 1);
}

@keyframes consentIn {
  from { transform: translateY(18px) scale(.965); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

.consent-title {
  margin: 0 0 18px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.28;
  text-align: center;
  color: #1a1a1a;
  letter-spacing: -0.01em;
}

.consent-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #f4f4f4;
  border-radius: 8px;
  padding: 14px 14px 6px;
  margin-bottom: 14px;
}

.consent-body {
  font-size: 13.5px;
  line-height: 1.72;
  color: #333;
  letter-spacing: 0.01em;
}

.consent-body p { margin: 0 0 9px; }
.consent-body p:last-child { margin-bottom: 3px; }
.consent-body b { font-weight: 600; color: #1a1a1a; }

.consent-link {
  display: block;
  text-align: center;
  font-size: 13px;
  color: #7d7d7d;
  text-decoration: underline;
  text-underline-offset: 2px;
  margin-bottom: 16px;
  word-break: break-word;
}

.consent-actions {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
}

.consent-btn {
  flex: 1 1 0;
  min-height: 52px;
  border: 0;
  border-radius: 9px;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0.01em;
  padding: 8px 10px;
  cursor: pointer;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
  transition: opacity .15s;
}

.consent-btn--ghost {
  background: #f0f0f0;
  color: #2c2c2c;
}

.consent-btn--primary {
  background: #1f3a93;
  color: #ffffff;
}

.consent-btn:active { opacity: .8; }

@media (max-width: 360px) {
  .consent-title { font-size: 19px; }
  .consent-body { font-size: 12.5px; }
  .consent-btn { font-size: 13px; min-height: 48px; }
}


/* ============================= 整块截图模式 ============================= */
/* 认证结果整块用原站截图，下面的 HTML 版隐藏 */
.shot {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
}

body.use-shot .cert,
body.use-shot .notes,
body.use-shot .phish,
body.use-shot .tip {
  display: none;
}
