@font-face {
  font-family: 'Alibaba PuHuiTi 3.0';
  src: url('/fonts/AlibabaPuHuiTi-3-55-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Alibaba PuHuiTi 3.0';
  src: url('/fonts/AlibabaPuHuiTi-3-65-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Alibaba PuHuiTi 3.0';
  src: url('/fonts/AlibabaPuHuiTi-3-75-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Alibaba PuHuiTi 3.0';
  src: url('/fonts/AlibabaPuHuiTi-3-85-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ── Shared Styles ── */
:root {
  --primary: #afa3ff;
  --primary-light: #c8c1ff;
  --accent: #7fb2ff;
  --accent2: #f35757;
  --red: #f35757;
  --yellow: #ecd227;
  --orange: #ec683e;
  --green: #a6be59;
  --blue: #7fb2ff;
  --stone: #bfbdb9;
  --sand: #e4e0dc;
  --cream: #f3f0eb;
  --ink: #0b0b0b;
  --paper: #e4e0dc;
  --bg: #f3f0eb;
  --card-bg: #ffffff;
  --text: #0b0b0b;
  --text-light: #3e3a36;
  --border: rgba(11,11,11,0.12);
  --mem-border: transparent;
  --radius: 18px;
  --shadow: none;
  --mem-shadow: none;
  --mem-shadow-soft: none;
  --font: 'Alibaba PuHuiTi 3.0', 'Alibaba PuHuiTi', '阿里巴巴普惠体 3.0', '阿里巴巴普惠体', 'Inter Tight', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}
a { color: inherit; }
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 14px;
  transition: all 0.2s;
}
button:hover { opacity: 0.92; transform: translateY(-1px); }
button:active { transform: translateY(0); }
.btn-primary {
  background: var(--ink);
  color: white;
  border: 2px solid transparent;
}
.btn-accent {
  background: var(--green);
  color: var(--ink);
  border: 2px solid transparent;
}
.btn-danger {
  background: var(--orange);
  color: white;
  border: 2px solid transparent;
}
.btn-outline {
  background: rgba(11,11,11,0.08);
  border: 0;
  color: var(--text);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
input, textarea, select {
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px 14px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--primary);
}
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.badge-mc { background: #dfe6e9; color: #636e72; }
.badge-wc { background: var(--green); color: var(--ink); }
.badge-ot { background: var(--orange); color: var(--ink); }
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--text);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  z-index: 9999;
  animation: fadeIn 0.3s;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }

/* ── Hooing Dialog ── */
.hoo-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(11,11,11,0.24);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.16s ease-out;
}
.hoo-dialog {
  width: min(420px, 100%);
  background: white;
  color: var(--ink);
  border-radius: 18px;
  padding: 22px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(11,11,11,0.16);
}
.hoo-dialog::before {
  content: "";
  position: absolute;
  right: -26px;
  bottom: 22px;
  width: 120px;
  height: 28px;
  border-radius: 999px;
  background: var(--primary);
  transform: rotate(-42deg);
  opacity: 0.55;
}
.hoo-dialog::after {
  content: "";
  position: absolute;
  right: 22px;
  bottom: -12px;
  width: 110px;
  height: 28px;
  border-radius: 999px;
  background: var(--accent);
  transform: rotate(-42deg);
  opacity: 0.45;
}
.hoo-dialog-title {
  position: relative;
  z-index: 1;
  font-size: 20px;
  font-weight: 950;
  margin-bottom: 8px;
}
.hoo-dialog-message {
  position: relative;
  z-index: 1;
  color: var(--text-light);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.6;
  white-space: pre-line;
}
.hoo-dialog-input {
  position: relative;
  z-index: 1;
  margin-top: 16px;
  background: var(--cream);
  border: 0;
  border-radius: 12px;
  font-weight: 850;
}
.hoo-dialog-actions {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}
.hoo-dialog-actions button {
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 950;
}
.hoo-dialog-cancel { background: rgba(11,11,11,0.08); color: var(--ink); }
.hoo-dialog-confirm { background: var(--ink); color: white; }
.hoo-dialog-danger { background: var(--red); color: white; }

/* ── Memphis System ── */
.mem-button {
  border: 0;
  border-radius: 999px;
  box-shadow: none;
  font-weight: 800;
  transform: translate(0, 0);
}
.mem-button:hover {
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: none;
}
.mem-button:active {
  transform: translateY(0);
  box-shadow: none;
}
.mem-button-primary {
  background: var(--ink);
  color: white;
}
.mem-button-purple {
  background: var(--primary);
  color: var(--ink);
}
.mem-button-aqua {
  background: var(--green);
  color: var(--ink);
}
.mem-card {
  background: var(--sand);
  border: 0;
  border-radius: 18px;
  box-shadow: var(--mem-shadow-soft);
}
.mem-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(11,11,11,0.1);
  color: var(--text-light);
  font-size: 12px;
  font-weight: 800;
}
.mem-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 900;
}
.mem-logo img {
  width: 42px;
  height: 42px;
  display: block;
}
.mem-shape {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}
.mem-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent2);
  border: 0;
}
.mem-ring {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 14px solid var(--green);
}
.mem-triangle {
  width: 0;
  height: 0;
  border-left: 34px solid transparent;
  border-right: 34px solid transparent;
  border-bottom: 62px solid var(--yellow);
  filter: none;
}
.mem-squiggle {
  width: 120px;
  height: 28px;
  background:
    radial-gradient(18px 18px at 18px 14px, transparent 12px, var(--ink) 13px, var(--ink) 15px, transparent 16px) 0 0 / 36px 28px repeat-x;
}
.mem-grid {
  width: 104px;
  height: 104px;
  border: 0;
  background:
    linear-gradient(45deg, var(--ink) 25%, transparent 25%) 0 0 / 26px 26px,
    linear-gradient(45deg, transparent 75%, var(--ink) 75%) 0 0 / 26px 26px,
    var(--paper);
}
