/*
 * 【我方原创业务代码】展藏导览系统
 * Copyright © 2026 西宁君信商业管理有限责任公司
 * 本文件由本公司组织开发，著作权归本公司所有；未经书面许可不得复制、分发或用于衍生作品。
 */

/* 展藏导览 · 基础样式 */

:root {
  --paper: #f5efe3;
  --paper-deep: #ede3d1;
  --card: #fdfaf3;
  --card-soft: #faf5ea;
  --ink: #221d17;
  --ink-2: #4e4539;
  --ink-3: #8b7d6a;
  --line: rgba(34, 29, 23, 0.12);
  --line-strong: rgba(34, 29, 23, 0.24);
  --vermilion: #a33b2b;
  --vermilion-dark: #7f2b1e;
  --vermilion-soft: rgba(163, 59, 43, 0.09);
  --gold: #b08a4f;
  --green: #4d6b4a;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", SimSun, serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --shadow-sm: 0 6px 20px rgba(62, 44, 22, 0.07);
  --shadow-md: 0 18px 50px rgba(62, 44, 22, 0.12);
  --shadow-lg: 0 30px 80px rgba(40, 28, 14, 0.24);
  --radius: 14px;
  --radius-lg: 20px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  background-color: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, figure, dl, dd {
  margin: 0;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

::selection {
  background: rgba(163, 59, 43, 0.18);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
  border-color: var(--ink);
  background: rgba(34, 29, 23, 0.05);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  border-color: var(--vermilion);
  background: var(--vermilion);
  color: #fdf8ef;
  box-shadow: 0 8px 22px rgba(163, 59, 43, 0.22);
}

.btn-primary:hover {
  background: var(--vermilion-dark);
  border-color: var(--vermilion-dark);
}

.btn-dark {
  border-color: var(--ink);
  background: var(--ink);
  color: #f8f2e6;
}

.btn-dark:hover {
  background: #35302a;
  border-color: #35302a;
}

.btn-ghost {
  border-color: var(--line);
  background: rgba(255, 253, 247, 0.6);
}

.btn-danger {
  color: var(--vermilion);
  border-color: rgba(163, 59, 43, 0.35);
}

.btn-danger:hover {
  background: var(--vermilion-soft);
  border-color: var(--vermilion);
}

.btn-sm {
  min-height: 32px;
  padding: 0 12px;
  font-size: 13px;
}

.btn-icon {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 50%;
  border-color: transparent;
  color: var(--ink-2);
}

.btn-icon:hover {
  background: rgba(34, 29, 23, 0.07);
  border-color: transparent;
}

.btn-icon svg {
  width: 17px;
  height: 17px;
}

.btn[disabled] {
  opacity: 0.5;
  pointer-events: none;
}

/* ---------- 表单 ---------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field > label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink-2);
}

.field .hint {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.6;
}

.input,
.textarea,
.select {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(255, 253, 247, 0.8);
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.6;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.input:hover,
.textarea:hover,
.select:hover {
  border-color: rgba(34, 29, 23, 0.4);
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--gold);
  background: #fffdf8;
  box-shadow: 0 0 0 3px rgba(176, 138, 79, 0.16);
}

.textarea {
  resize: vertical;
  min-height: 160px;
}

.input::placeholder,
.textarea::placeholder {
  color: #a99c89;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* ---------- 弹层 ---------- */

.layer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
}

.layer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 21, 15, 0.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: fade-in 0.2s ease both;
}

.layer-panel {
  position: relative;
  margin: auto;
  background: var(--paper);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: pop-in 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.1) both;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pop-in {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

/* ---------- 提示 ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 200;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(30, 25, 19, 0.94);
  color: #f7f1e5;
  font-size: 14px;
  box-shadow: 0 12px 40px rgba(20, 15, 8, 0.3);
  animation: toast-in 0.24s ease both;
  max-width: calc(100vw - 40px);
}

.toast::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  flex: none;
}

.toast.is-error::before {
  background: #d46a52;
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------- 通用小件 ---------- */

.seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 7px;
  background: var(--vermilion);
  color: #fdf7ec;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1;
  box-shadow: inset 0 0 0 1.5px rgba(255, 248, 235, 0.35);
  overflow: hidden;
}

.seal img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fffdf7;
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--vermilion);
  text-transform: uppercase;
}

.muted {
  color: var(--ink-3);
}

.spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 技术支持署名：固定品牌，不随馆方设置变化；版本号由运行版本注入。 */
.vendor-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 14px 16px 18px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}

.vendor-foot img {
  width: 16px;
  height: 16px;
  flex: none;
  object-fit: contain;
}

.vendor-foot b {
  font-weight: 500;
  letter-spacing: 0.04em;
}

.auth-vendor {
  padding-top: 22px;
}

.app-vendor {
  border-top: 1px solid var(--line);
  padding: 16px 24px 20px;
}
