:root {
  --paper: #f6f6f0;
  --card: #fffefa;
  --ink: #202b25;
  --mute: #526159;
  --line: #dce2d8;
  --accent: #1b5e45;
  --dark: #163d31;
  --wash: #e9efe6;
  --mono: ui-monospace, "SF Mono", Consolas, "Liberation Mono", monospace;
  --body: "Segoe UI", system-ui, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.55 var(--body); }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .52; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid #287f60; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
svg { flex: 0 0 auto; width: 18px; height: 18px; }
img { max-width: 100%; }
.frame { width: min(1280px, calc(100% - 80px)); margin-inline: auto; }
.sr-only, .skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip { position: fixed; z-index: 8; top: 8px; left: 8px; padding: 10px; background: var(--card); }

.site-head { border-bottom: 1px solid var(--line); background: var(--card); }
.head-inner { min-height: 69px; display: flex; gap: 27px; align-items: center; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 22px; font-weight: 750; letter-spacing: -.055em; flex-shrink: 0; }
.brand > span { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--accent); color: var(--card); }
.brand svg { width: 20px; height: 20px; }
.crumb { display: flex; align-items: center; gap: 10px; color: var(--mute); font-size: 13px; }
.crumb > a { color: var(--accent); font-weight: 650; }
.crumb :nth-child(2) { color: #8b998c; }
.head-links { display: flex; align-items: center; gap: 22px; margin-left: auto; white-space: nowrap; font-size: 13px; font-weight: 600; }
.index-link { color: var(--mute); }
.lang { min-width: 62px; }
.foot { border-top: 1px solid var(--line); margin-top: 55px; color: var(--mute); font-size: 13px; }
.foot-inner { min-height: 78px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }

.hero {
  display: grid;
  grid-template-columns: 57fr 43fr;
  border: 1px solid #dce3d8;
  border-radius: 19px;
  margin-top: 31px;
  min-height: 275px;
  overflow: hidden;
  background: #eaf0e6;
}
.hero-copy { align-self: center; padding: 32px 36px; }
h1 { line-height: 1.09; font-size: clamp(36px, 4.2vw, 61px); letter-spacing: -.064em; font-weight: 750; }
html[lang="zh-Hans"] h1 { letter-spacing: -.055em; }
.hero p, .detail-head p, .compare-head p { margin-top: 16px; color: var(--mute); font-size: 16px; }
.hero p { max-width: 41ch; }
.coverage { display: inline-flex; margin-top: 21px; color: #315b49; font-size: 12px; font-weight: 650; letter-spacing: .02em; }
.cover {
  background-color: #173e32;
  background-image: radial-gradient(circle at 77% 24%, #71938040, transparent 62%),
    radial-gradient(circle, #b5d0bb42 1px, transparent 1.5px);
  background-size: 100% 100%, 17px 17px;
  overflow: hidden;
  min-width: 0;
  position: relative;
}
.cover::after {
  position: absolute; inset: auto 0 0; height: 23%;
  background: linear-gradient(transparent, #12332950); content: "";
  pointer-events: none;
}
.cover-phone {
  display: block;
  position: absolute;
  top: 37px;
  left: 50%;
  width: min(29%, 145px);
  padding: 5px;
  border: 1px solid #eaf4ca50;
  border-radius: 17px;
  background: #253f37;
  box-shadow: 0 10px 30px #0a271c80;
  transform: translateX(-50%) rotate(-1deg);
  z-index: 2;
}
.cover-phone:first-child { left: 26%; top: 62px; transform: translateX(-50%) rotate(-11deg); z-index: 1; }
.cover-phone:last-child { left: 74%; top: 70px; transform: translateX(-50%) rotate(11deg); z-index: 1; }
.cover-phone:hover, .cover-phone:focus-visible { z-index: 3; }
.cover-phone img { display: block; width: 100%; height: auto; border-radius: 12px; }

.filters { padding-top: 24px; }
.categories, .control-row, .gallery-bar { display: flex; align-items: center; gap: 8px; }
.categories { flex-wrap: wrap; padding-bottom: 13px; }
.filter, .segment, .button, .icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  font-size: 13px;
  font-weight: 620;
  padding: 9px 12px;
  min-height: 38px;
  white-space: nowrap;
  line-height: 1.2;
}
.filter { border-radius: 999px; padding-inline: 15px; }
.filter[aria-pressed="true"] { background: var(--dark); border-color: var(--dark); color: white; }
.button:hover, .filter:hover, .segment:hover, .icon-button:hover { border-color: #83a18d; }
.button.primary { background: var(--accent); border-color: var(--accent); color: white; }
.button.primary:hover { background: var(--dark); border-color: var(--dark); }
.button.quiet { background: transparent; border-color: transparent; color: var(--mute); }
.button.quiet:hover { border-color: var(--line); color: var(--ink); }
.button.small { min-height: 34px; padding: 6px 9px; }
.button[aria-pressed="true"], .icon-button[aria-pressed="true"], .segment[aria-pressed="true"] {
  color: var(--dark);
  background: #e7efe6;
  border-color: #8cad9b;
}
.icon-button { width: 34px; min-height: 34px; padding: 0; }
.icon-button span { display: none; }
[data-favorite][aria-pressed="true"] svg, #only-favorites[aria-pressed="true"] svg { fill: currentColor; }
.search {
  display: flex;
  align-items: center;
  flex: 1 1 270px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--mute);
  border-radius: 8px;
  min-height: 42px;
  gap: 9px;
  padding: 0 12px;
  min-width: 0;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px #1b5e451a; }
.search input {
  border: 0;
  appearance: none;
  background: transparent;
  outline: none;
  color: var(--ink);
  font-size: 14px;
  padding: 9px 0;
  width: 100%;
  min-width: 0;
}
.search input::placeholder { color: var(--mute); }
.control-row > .button { min-height: 42px; }
.segments {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #eeefe9;
}
.segment { padding: 5px 9px; min-height: 34px; border-radius: 6px; background: transparent; border-color: transparent; }
.segment svg { width: 15px; height: 15px; }
.gallery-bar { justify-content: space-between; height: 57px; }
#result-count { color: var(--mute); font-size: 13px; font-weight: 650; }
.style-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.style-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: 13px;
  background: var(--card);
  border: 1px solid #d9e0d4;
  box-shadow: 0 2px 2px #253b2d05;
}
.style-card:hover { border-color: #a7b9a5; }
.preview-strip {
  padding: 17px 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  background: color-mix(in srgb, var(--canvas), #dce5d9 51%);
  border-bottom: 1px solid #101f1522;
}
.preview-strip:focus-visible { outline-offset: -3px; }
.preview-strip.dark { background: color-mix(in srgb, var(--canvas), #4a6158 38%); }
.preview-strip img {
  width: 100%;
  height: auto;
  aspect-ratio: 320 / 692;
  object-fit: cover;
  border: 1px solid #25332e45;
  border-radius: 7px;
  box-shadow: 0 4px 10px #18251d2a;
}
.preview-strip.dark img { border-color: #dce6de55; }
.card-body { display: grid; flex: 1; gap: 13px; padding: 13px 13px 12px; }
.card-head, .card-foot, .card-tools, .chips { display: flex; align-items: center; gap: 7px; }
.card-head, .card-foot { justify-content: space-between; }
.card-title { min-width: 0; }
.card-title h2 { font-size: 19px; font-weight: 730; line-height: 1.2; letter-spacing: -.035em; overflow-wrap: anywhere; }
.chips { gap: 8px; flex-wrap: wrap; margin-top: 6px; color: var(--mute); font-size: 12px; line-height: 1.25; }
.chips span { display: inline-flex; align-items: center; gap: 4px; }
.chips span:first-child { border-radius: 4px; background: #eef2e9; color: #3d5650; padding: 4px 6px; font-weight: 600; }
.chips svg { width: 13px; height: 13px; }
.swatch-dots { display: flex; align-items: center; gap: 5px; }
.swatch-dots i { width: 14px; height: 14px; border: 1px solid #172a2350; border-radius: 50%; background: var(--color); }
.copy-ai { color: var(--accent); }
.copy-ai svg { width: 15px; height: 15px; }
.empty { padding: 14px 0 38px; color: var(--mute); }
.empty p { margin-bottom: 14px; }

.back { margin-block: 25px 15px; display: inline-flex; align-items: center; gap: 7px; color: var(--accent); font-weight: 650; font-size: 13px; }
.back svg { width: 16px; height: 16px; }
.detail-head, .compare-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; }
.detail-head .chips { margin: 0 0 12px; }
.detail-head h1, .compare-head h1 { font-size: clamp(32px, 3.8vw, 54px); }
.detail-head p, .compare-head p { max-width: 68ch; margin-top: 10px; }
.inline-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inline-actions .button { min-height: 41px; }
.detail-section { margin-top: 26px; }
.detail-section > h2 { font-size: 20px; letter-spacing: -.025em; margin-bottom: 12px; }
.detail-phones {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px;
  background: #e9eee5;
  border: 1px solid #dae3d8;
  border-radius: 15px;
  padding: 21px max(22px, 5%);
}
.detail-phones.dark { background: #243f35; border-color: #3c544b; color: #f6f6f0; }
.detail-phones figure { display: grid; justify-items: center; gap: 9px; margin: 0; min-width: 0; }
.detail-phones a { display: block; width: 100%; max-width: 240px; line-height: 0; border-radius: 12px; }
.detail-phones img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid #3b504763;
  box-shadow: 0 6px 18px #2235292e;
}
.detail-phones.dark img { border-color: #b9c9bd60; }
.detail-phones figcaption { font-size: 13px; font-weight: 650; text-align: center; }
.palette-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.swatch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  min-width: 0;
  min-height: 49px;
  text-align: left;
  padding: 6px 10px 6px 6px;
  font-size: 13px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 8px;
}
.swatch:hover { border-color: #88aa97; }
.sample { width: 29px; height: 29px; flex: 0 0 auto; background: var(--color); border: 1px solid #19292140; border-radius: 5px; }
.swatch code { margin-left: auto; white-space: nowrap; color: var(--mute); }
.markdown { padding: 25px 28px 32px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.markdown h3 { margin-top: 1em; font-size: 1.32em; }
.markdown h4 { margin: 1.5em 0 .4em; font-size: 1.17em; }
.markdown h5, .markdown h6 { font-size: 1em; margin-bottom: 0; }
.markdown > *:first-child { margin-top: 0; }
.markdown p, .markdown li { line-height: 1.75; }
.markdown p { margin-top: .75em; }
.markdown ul, .markdown ol { padding-left: 1.4em; }
.markdown code, .swatch code { font-family: var(--mono); font-size: .9em; }
.markdown :not(pre) > code { padding: 1px 4px; background: var(--wash); border-radius: 3px; overflow-wrap: anywhere; }
.markdown blockquote { margin: 12px 0; border-left: 3px solid #a8b8a9; padding-left: 13px; color: var(--mute); }
.markdown hr { border: 0; border-top: 1px solid var(--line); margin-block: 1.5em; }
.markdown pre, .spec-table { overflow: auto; max-width: 100%; }
.markdown pre { background: var(--wash); border-radius: 8px; padding: 12px; }
.markdown table { width: 100%; border-collapse: collapse; font-size: .94em; margin-top: .8em; }
.markdown th, .markdown td { border-bottom: 1px solid var(--line); text-align: left; padding: 8px 10px; }
.markdown th { background: var(--wash); }

#compare-grid { padding-bottom: 30px; }
#compare-grid .card-body { grid-template-rows: auto auto 1fr auto; }
.screen-key {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  text-align: center;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--mute);
  font-size: 11px;
}
.compare-concept { color: var(--mute); font-size: 13px; }
.compare-specs {
  display: grid;
  grid-template-columns: 1fr auto;
  font-size: 13px;
  align-items: center;
  margin: 0;
}
.compare-specs dt, .compare-specs dd { border-top: 1px solid var(--line); padding-block: 7px; margin: 0; }
.compare-specs dt { color: var(--mute); }
.compare-specs dd { text-align: right; font-family: var(--mono); font-size: 12px; }
.compare-tray {
  position: fixed;
  z-index: 5;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(790px, calc(100% - 30px));
  border: 1px solid #a8b8a9;
  border-radius: 13px;
  padding: 8px 10px 8px 14px;
  background: var(--card);
  box-shadow: 0 5px 28px #172b2140;
  white-space: nowrap;
}
.selection-names { display: flex; gap: 5px; flex: 1; min-width: 0; overflow: auto; }
.selection-names > button { padding-inline: 7px; }
.compare-tray b { flex: 0 0 auto; font-size: 13px; }
.toast {
  z-index: 9;
  position: fixed;
  pointer-events: none;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 8px;
  background: var(--dark);
  color: white;
  padding: 8px 14px;
  width: max-content;
  max-width: calc(100% - 24px);
  opacity: 0;
}
.toast.visible { opacity: 1; }

@media (max-width: 1070px) {
  .frame { width: calc(100% - 44px); }
  .card-title h2 { font-size: 17px; }
  .card-head { align-items: flex-start; }
  .card-tools { gap: 4px; }
  .detail-head { display: block; }
  .detail-head .inline-actions { margin-top: 13px; }
}
@media (max-width: 850px) {
  .style-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { grid-template-columns: 59fr 41fr; }
  .hero-copy { padding-inline: 24px; }
  .detail-phones { gap: 12px; padding: 14px; }
  .palette-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 580px) {
  .frame { width: calc(100% - 30px); }
  .head-inner { min-height: 58px; gap: 13px; }
  .brand { font-size: 20px; gap: 5px; }
  .brand > span { width: 27px; height: 27px; }
  .brand svg { width: 17px; height: 17px; }
  .crumb { gap: 5px; font-size: 11px; flex-wrap: wrap; line-height: 1.2; }
  .head-links .index-link { display: none; }
  .head-links .lang { min-width: auto; padding-inline: 9px; }
  .hero { display: block; min-height: 0; margin-top: 15px; border-radius: 12px; }
  .hero-copy { padding: 19px 16px; }
  .hero h1 { font-size: 33px; }
  .hero p { margin-top: 9px; font-size: 14px; }
  .coverage { margin-top: 12px; font-size: 11px; }
  .cover { display: none; }
  .filters { padding-top: 15px; }
  .categories { gap: 5px; padding-bottom: 9px; }
  .filter, .button, .segment { font-size: 12px; padding-inline: 8px; min-height: 36px; }
  .control-row { flex-wrap: wrap; gap: 6px; }
  .search { flex-basis: 100%; }
  .search input { font-size: 16px; }
  .segments { gap: 2px; }
  .segment { min-height: 32px; }
  #only-favorites { margin-left: auto; min-height: 38px; }
  .gallery-bar { height: 47px; }
  .style-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .preview-strip { padding: 10px; }
  .card-body { padding: 11px; gap: 9px; }
  .icon-button { width: 39px; min-height: 39px; }
  .detail-head, .compare-head { display: block; }
  .compare-head .inline-actions { margin-top: 12px; }
  .detail-phones { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .swatch { flex-wrap: wrap; gap: 5px; }
  .sample { width: 23px; height: 23px; }
  .markdown { padding: 15px; }
  .foot { margin-top: 33px; }
  .foot-inner { min-height: 62px; }
}
@media (max-width: 345px) {
  .crumb > span { display: none; }
  .compare-tray { gap: 3px; padding-left: 8px; }
}
