:root {
  --pink: #e83f83;
  --pink-dark: #bd2f68;
  --pink-soft: #fff0f7;
  --ink: #4b2740;
  --muted: #76586a;
  --line: #f1cfdf;
  --mint: #61cbb6;
  --yellow: #ffc857;
  --purple: #8776dd;
  --shadow: 0 18px 48px rgba(130, 54, 88, .12);
}

* { box-sizing: border-box; }
html { overflow-x: hidden; scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 6% 0, rgba(255, 197, 223, .42), transparent 26rem),
    radial-gradient(circle at 96% 8%, rgba(255, 218, 122, .16), transparent 20rem),
    linear-gradient(180deg, #fff7fb 0%, #fff 40%, #fff9f2 100%);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
html[lang="zh-TW"] body {
  font-family: "PingFang TC", "LiHei Pro", "Microsoft JhengHei", "PingFang SC", system-ui, sans-serif;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--pink-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 80;
  padding: 8px 14px;
  border-radius: 10px;
  color: #fff;
  background: var(--pink);
  font-weight: 800;
}
.skip-link:focus { top: 12px; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.narrow { width: min(860px, calc(100% - 40px)); margin: 0 auto; }

.site-header { position: sticky; z-index: 50; top: 0; padding: 14px 20px 0; }
.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, 100%);
  min-height: 66px;
  margin: 0 auto;
  padding: 9px 12px 9px 14px;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 22px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 12px 35px rgba(94, 42, 67, .09);
  backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; color: inherit; }
.brand:hover { text-decoration: none; }
.brand > span:last-child { display: flex; min-width: 0; flex-direction: column; }
.brand strong { overflow: hidden; font-size: 15px; white-space: nowrap; text-overflow: ellipsis; }
.brand small { margin-top: 1px; color: #9b7187; font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 8px;
  border-radius: 14px;
  background: #fff0f7;
  box-shadow: inset 0 0 0 1px #f5ccdf;
}
.brand-mark i { border-radius: 4px; background: var(--pink); }
.brand-mark i:nth-child(2) { background: var(--yellow); }
.brand-mark i:nth-child(3) { background: var(--mint); }
.brand-mark i:nth-child(4) { background: var(--purple); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-actions a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 0 15px;
  border-radius: 13px;
  color: #6f4c61;
  font-size: 13px;
  font-weight: 800;
}
.nav-actions a:hover { background: #fff0f7; color: var(--pink-dark); text-decoration: none; }
.nav-actions .nav-primary {
  color: #fff;
  background: var(--pink);
  box-shadow: 0 8px 20px rgba(232, 63, 131, .2);
}
.nav-actions .nav-primary:hover { color: #fff; background: var(--pink-dark); }
.nav-actions .lang-switch {
  padding: 0 12px;
  font-size: 12px;
  letter-spacing: .04em;
}

.crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px auto 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.crumb a { color: var(--muted); }

.hero { padding: 28px 0 8px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid #f2c7da;
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  color: var(--pink-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
}
h1 {
  max-width: 16em;
  margin: 14px 0 0;
  font-size: clamp(30px, 4.6vw, 46px);
  line-height: 1.2;
  letter-spacing: -.03em;
}
.lead { max-width: 46em; margin: 14px 0 0; color: var(--muted); font-size: 17px; }
.warn {
  display: flex;
  gap: 12px;
  margin: 18px 0 0;
  padding: 14px 16px;
  border: 1px solid #f3d39a;
  border-radius: 16px;
  background: #fff7e8;
  color: #7a5420;
  font-size: 14px;
  font-weight: 700;
}

.toolbar {
  position: sticky;
  z-index: 20;
  top: 86px;
  margin: 22px 0 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}
.toolbar-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.toolbar-row + .toolbar-row { margin-top: 10px; }
.search {
  flex: 1 1 240px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #efc9db;
  border-radius: 12px;
  background: #fff;
}
.search:focus { outline: 2px solid #f7b3ce; border-color: var(--pink); }
.chip {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid #efc9db;
  border-radius: 999px;
  background: #fff;
  color: #624154;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.chip i { width: 12px; height: 12px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.chip[aria-pressed="true"] {
  color: #fff;
  background: var(--pink);
  border-color: var(--pink);
}
.chip:focus-visible { outline: 3px solid #f7b3ce; outline-offset: 2px; }
.count { margin-left: auto; color: var(--muted); font-size: 13px; font-weight: 800; }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
}
.bead {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 108px;
  padding: 8px 8px 10px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(90, 40, 62, .06);
  cursor: pointer;
  text-align: left;
  appearance: none;
}
.bead:hover, .bead.is-on {
  border-color: var(--pink);
  box-shadow: 0 10px 22px rgba(232, 63, 131, .16);
}
.bead:focus-visible { outline: 3px solid #f7b3ce; outline-offset: 2px; }
.swatch {
  height: 52px;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08), inset 0 10px 12px rgba(255,255,255,.22);
}
.bead strong { margin-top: 8px; font-size: 14px; }
.bead span { color: var(--muted); font-size: 11px; font-weight: 700; }
.badge {
  display: inline-flex;
  margin-top: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #fff0f7;
  color: var(--pink-dark);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}
.badge.extra { background: #eef6ff; color: #355d9c; }

.side {
  position: sticky;
  top: 210px;
  display: grid;
  gap: 12px;
}
.card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,.94);
}
.card h2 { margin: 0 0 8px; font-size: 16px; }
.preview {
  height: 88px;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}
.meta { margin: 10px 0 0; padding: 0; list-style: none; font-size: 13px; }
.meta li { display: flex; justify-content: space-between; gap: 10px; margin: 6px 0; }
.meta b { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.button, .ghost {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.button { border: 0; color: #fff; background: var(--pink); }
.button:hover { background: var(--pink-dark); text-decoration: none; color: #fff; }
.ghost { border: 1px solid #efc9db; color: #a93168; background: #fff; }
.ghost:hover { background: #fff0f7; }
.picker-row { display: flex; gap: 8px; align-items: center; }
.picker-row input[type="color"] {
  width: 48px;
  height: 42px;
  padding: 0;
  border: 1px solid #efc9db;
  border-radius: 10px;
  background: #fff;
}
.file {
  position: relative;
  overflow: hidden;
}
.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.sample {
  width: 100%;
  min-height: 140px;
  border: 1px dashed #efc9db;
  border-radius: 14px;
  background: #fff8fb;
  object-fit: contain;
  cursor: crosshair;
}
.hint { margin: 8px 0 0; color: var(--muted); font-size: 12px; }

.guide { padding: 48px 0 20px; }
.guide h2 {
  margin: 36px 0 10px;
  padding-left: 12px;
  border-left: 5px solid var(--pink);
  font-size: 24px;
  scroll-margin-top: 100px;
}
.guide p, .guide li { color: #5a3d4f; }
.tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0; }
.tips article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.88);
}
.tips h3 { margin: 0 0 8px; font-size: 16px; }
.tips p { margin: 0; font-size: 14px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  padding: 16px 40px 16px 0;
  cursor: pointer;
  font-weight: 900;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq p { margin: 0 0 14px; color: var(--muted); font-size: 14px; }

.empty { padding: 40px 16px; color: var(--muted); text-align: center; font-weight: 700; }

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  display: none;
  padding: 12px 16px;
  border-radius: 14px;
  color: #fff;
  background: #3d2740;
  font-size: 13px;
  font-weight: 800;
  box-shadow: var(--shadow);
}
.toast.show { display: block; }

footer { margin-top: 56px; border-top: 1px solid #f0d7e2; background: rgba(255,255,255,.72); }
.footer-shell {
  display: flex;
  width: min(1180px, calc(100% - 40px));
  min-height: 110px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
}
.footer-shell span { display: block; margin-top: 4px; color: #8d6b7d; font-size: 12px; }
.footer-shell nav { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-shell nav a { color: #76576a; font-size: 13px; font-weight: 700; }

@media (max-width: 980px) {
  .layout, .tips { grid-template-columns: 1fr; }
  .side { position: static; }
  .toolbar { top: 76px; }
}
@media (max-width: 780px) {
  .site-header { padding: 10px 12px 0; }
  .brand small, .nav-actions > a:first-child { display: none; }
  .shell, .narrow, .footer-shell { width: min(100% - 24px, 720px); }
  .board { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); }
}
@media (max-width: 520px) {
  h1 { font-size: 28px; }
  .chip { min-height: 34px; font-size: 12px; }
  .footer-shell { flex-direction: column; align-items: flex-start; padding: 24px 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
