:root {
  color-scheme: light;
  --paper: #f8f7f3;
  --white: #fff;
  --ink: #152d29;
  --muted: #536963;
  --line: #dce3dc;
  --mist: #eaf0e9;
  --green: #204d42;
  font-family: "Hedvig Letters Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #346950; outline-offset: 3px; }
.wrap { width: min(1160px, calc(100% - 72px)); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.muted { color: var(--muted); font-size: .86rem; }

.site-header { border-bottom: 1px solid #e1e5dc; }
.header-inner { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.header-inner nav { display: flex; align-items: center; gap: 24px; }
.wordmark { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-size: 1.28rem; font-weight: 800; }
.wordmark > span:last-child { font: 600 .66rem/1.2 "Bahnschrift", sans-serif; letter-spacing: .14em; color: var(--muted); }
.mark { width: 30px; height: 30px; border-radius: 9px; background: var(--green); position: relative; }
.mark::before, .mark::after { content: ""; position: absolute; width: 8px; height: 14px; border: 1.5px solid #d9e6d1; border-radius: 2px; top: 7px; }
.mark::before { left: 7px; transform: rotate(-12deg); }
.mark::after { left: 14px; top: 8px; background: var(--green); transform: rotate(12deg); }
.nav-link { color: var(--muted); text-decoration: none; font-size: .9rem; }
.nav-link:hover { color: var(--green); }

.button { display: inline-flex; justify-content: center; align-items: center; gap: 6px; border: 1px solid transparent; border-radius: 9px; min-height: 42px; padding: 8px 14px; color: var(--ink); background: transparent; font-size: .9rem; font-weight: 650; transition: background .15s, border-color .15s; }
.primary { background: var(--green); color: white; border-color: var(--green); }
.primary:hover { background: #173e33; }
.subtle { background: #fff; border-color: var(--line); }
.subtle:hover, .close:hover { background: var(--mist); }
.text-button { color: var(--muted); font-weight: 500; }
.text-button:hover:not(:disabled) { background: var(--mist); }
.close { font-size: 1.4rem; line-height: 1; padding: 0; min-width: 40px; }

.hero { position: relative; margin-top: 30px; min-height: 300px; overflow: hidden; isolation: isolate; display: flex; align-items: center; border: 1px solid #cddbd0; border-radius: 20px; background: radial-gradient(ellipse at 80% 50%, #eaf2e5, transparent 46%), linear-gradient(115deg, #eef2e9, #d9e6d9); }
.hero-copy { padding: 38px 52px; position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2.65rem, 6.2vw, 5rem); letter-spacing: -.045em; line-height: 1.09; font-weight: 900; }
.hero h1 span { color: var(--green); }
.hero p { margin-top: 17px; font-size: 1rem; color: var(--muted); }
.hero .primary { margin-top: 24px; min-height: 46px; padding-inline: 17px; }
.hero .primary span { font-size: 1.15rem; }
.hero-art { position: absolute; inset: 0 0 0 auto; width: 46%; background-image: linear-gradient(#4f7c6313 1px, transparent 1px), linear-gradient(90deg, #4f7c6313 1px, transparent 1px); background-size: 30px 30px; mask-image: linear-gradient(90deg, transparent, black 24%); }
.device { position: absolute; top: 50%; width: 128px; height: 235px; border-radius: 23px; box-shadow: 10px 17px 34px #0c2c2c39, inset 0 0 0 1px #ffffff9c; }
.device-back { left: 20%; transform: translateY(-51%) rotate(-20deg); background: linear-gradient(130deg, #f6dfc5, #c3a384 78%); border: 3px solid #b49679; }
.device-back i { position: absolute; top: 16px; left: 15px; width: 29px; height: 29px; border: 3px solid #827464; border-radius: 50%; background: radial-gradient(circle at 66% 30%, #d4b8ee, #332e40 29%, #101819 56%, #333b3a 77%); box-shadow: 1px 2px 3px #41322762; }
.device-back i:nth-child(2) { left: 46px; top: 32px; }
.device-back i:nth-child(3) { top: 47px; }
.device-front { left: 46%; transform: translateY(-48%) rotate(18deg); border: 5px solid #173a3b; background: radial-gradient(ellipse at 12% 90%, #e6a96c 0, #c97049 22%, transparent 50%), radial-gradient(ellipse at 90% 18%, #7eb0aa, #2a6a68 47%, #0e2e33 83%); }
.device-front i { position: absolute; width: 28px; height: 8px; border-radius: 6px; left: 50%; top: 8px; transform: translateX(-50%); background: #101e22; }

.selection, .comparison { margin-top: 34px; scroll-margin-top: 16px; }
.section-heading { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 12px; min-height: 42px; }
.heading-inline { display: flex; gap: 10px; align-items: center; }
.section-heading h2 { font-size: clamp(1.24rem, 3vw, 1.55rem); letter-spacing: -.04em; font-weight: 850; }
.count { color: var(--muted); font: 600 .83rem/1.5 "Bahnschrift", sans-serif; border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.slot { min-width: 0; min-height: 102px; display: flex; gap: 13px; align-items: center; padding: 12px 14px; border-radius: 13px; border: 1px solid var(--line); background: var(--white); position: relative; text-align: left; }
.slot-copy { min-width: 0; overflow-wrap: anywhere; padding-right: 12px; }
.slot-copy span, .table-brand { font-size: .75rem; font-weight: 500; color: var(--muted); display: block; }
.slot-copy h3 { font-size: .97rem; line-height: 1.3; margin-top: 4px; }
.remove { position: absolute; top: 1px; right: 1px; min-height: 34px; min-width: 34px; color: var(--muted); }
.add-slot { border: 1px dashed #aabeb0; background: #eef2ec83; justify-content: center; font-size: .9rem; color: var(--green); }
.add-slot:hover { background: var(--mist); border-color: #648b78; }
.add-slot b { font-size: 1.25rem; font-weight: 500; }
.thumbnail { --phone-color: #87a3a0; display: block; flex: 0 0 31px; width: 31px; height: 56px; position: relative; border: 1.5px solid #263b3a75; border-radius: 6px; background: linear-gradient(135deg, #ffffff8c, transparent 74%), var(--phone-color); box-shadow: inset 0 0 0 1px #ffffff66, 2px 3px 3px #142c2d19; }
.thumbnail i, .thumbnail i::after { position: absolute; top: 4px; left: 4px; width: 7px; height: 7px; background: radial-gradient(circle at 64% 30%, #7b879f, #20272b 58%); border-radius: 50%; }
.thumbnail i::after { content: ""; top: 8px; left: 1px; }
.tone-sand { --phone-color: #c6a98c; }
.tone-ink { --phone-color: #53666d; }
.tone-mint { --phone-color: #95b4a0; }
.tone-blue { --phone-color: #8ca2bf; }

.toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; position: relative; font-size: .9rem; cursor: pointer; }
.toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.toggle > span { width: 34px; height: 20px; padding: 3px; background: #bdcbc0; border-radius: 999px; display: inline-flex; align-items: center; }
.toggle > span::after { content: ""; width: 14px; height: 14px; border-radius: 50%; background: white; transition: transform .15s; }
.toggle input:checked + span { background: var(--green); }
.toggle input:checked + span::after { transform: translateX(14px); }
.toggle input:disabled + span { opacity: .6; }
.toggle input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 3px; }
.categories, .brands { display: flex; gap: 8px; padding: 2px 3px 9px; overflow: auto; }
.categories:empty { display: none; }
.tab { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: white; padding: 6px 13px; min-height: 36px; font-size: .86rem; }
.tab:hover { border-color: #8fa99d; }
.tab[aria-pressed="true"] { background: var(--green); color: white; border-color: var(--green); }
.table-scroll { overflow: auto; border: 1px solid var(--line); background: var(--white); border-radius: 13px; }
table { width: 100%; min-width: var(--min-width); border-collapse: separate; border-spacing: 0; table-layout: fixed; text-align: left; font-size: .9rem; overflow-wrap: anywhere; }
th, td { padding: 12px 16px; border-bottom: 1px solid #edf0ea; vertical-align: top; }
thead th { background: #fff; padding-top: 15px; padding-bottom: 15px; }
thead th:first-child { width: clamp(95px, 15vw, 172px); vertical-align: middle; color: var(--muted); }
tr > :first-child:not([colspan]) { position: sticky; left: 0; z-index: 1; background: #fff; }
tr > :not(:first-child) { border-left: 1px solid #edf0ea; }
tbody th[scope="row"] { color: var(--muted); font-weight: 560; }
tbody:last-child tr:last-child > * { border-bottom: 0; }
.group th { background: var(--mist); color: var(--green); padding: 9px 16px; font-weight: 750; }
.has-difference td:not(.missing) { color: #22493e; }
.source { display: block; width: fit-content; color: var(--muted); margin-top: 3px; font-weight: 450; font-size: .74rem; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.missing { color: #7e8e83; }
.empty { padding: 32px 16px; text-align: center; background: white; color: var(--muted); border: 1px solid var(--line); border-radius: 12px; }
.site-footer { color: var(--muted); border-top: 1px solid var(--line); margin-top: 38px; padding-block: 18px 25px; display: flex; justify-content: space-between; gap: 9px; font-size: .76rem; }

dialog { border: 1px solid var(--line); border-radius: 16px; padding: 0; width: min(600px, calc(100% - 24px)); max-height: 90vh; background: var(--paper); color: var(--ink); box-shadow: 0 24px 75px #14292344; }
dialog::backdrop { background: #102b24a0; }
.dialog-head, .dialog-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 20px; background: white; position: sticky; z-index: 2; }
.dialog-head { top: 0; border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: 1.17rem; }
.dialog-foot { bottom: 0; border-top: 1px solid var(--line); }
.search, .form-grid input { width: 100%; border: 1px solid #aebfb3; border-radius: 8px; color: var(--ink); background: white; min-height: 42px; padding: 9px 12px; }
.search { margin: 14px 20px 8px; width: calc(100% - 40px); }
.brands, .results, .form-body { margin-inline: 20px; }
.results { min-height: 125px; max-height: 42vh; overflow: auto; padding: 3px 3px 12px; }
.result { display: grid; grid-template-columns: 23px minmax(0, 1fr) auto; gap: 11px; align-items: center; padding: 9px 6px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.result .thumbnail { width: 23px; height: 40px; border-radius: 5px; }
.result h3 { font-size: .94rem; }
.result p { font-size: .77rem; color: var(--muted); }
.dialog-notice { padding: 7px 20px; background: var(--mist); color: var(--green); font-size: .84rem; }
.selected { background: var(--mist); color: var(--green); }
.form-body { padding-block: 15px 8px; max-height: 62vh; overflow: auto; padding-inline: 3px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-grid label { display: grid; align-content: start; gap: 5px; font-size: .85rem; }
.form-body > .muted { margin-block: 12px; }
details { border-top: 1px solid var(--line); }
summary { cursor: pointer; padding-block: 9px; font-weight: 650; }
details .form-grid { padding-bottom: 10px; }
.form-error { color: #a13620; margin: 10px 0 4px; }
.notice { position: fixed; z-index: 4; bottom: 16px; right: 16px; max-width: calc(100vw - 32px); padding: 11px 16px; background: var(--green); color: white; border-radius: 9px; box-shadow: 0 4px 20px #18362838; }

@media (max-width: 850px) {
  .wrap { width: calc(100% - 40px); }
  .hero-copy { padding-inline: 32px; }
  .hero-art { opacity: .86; }
  .slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .wrap { width: calc(100% - 28px); }
  .header-inner { height: 60px; }
  .wordmark > span:last-child, .nav-link { display: none; }
  .hero { margin-top: 14px; min-height: 221px; border-radius: 13px; }
  .hero-copy { padding: 22px 16px; }
  .hero h1 { font-size: clamp(2.15rem, 8.7vw, 3rem); }
  .hero p { max-width: 173px; font-size: .85rem; margin-top: 10px; }
  .hero .primary { margin-top: 16px; }
  .hero-art { width: 47%; opacity: .78; }
  .device { width: 68px; height: 125px; border-radius: 13px; }
  .device-front { left: 48%; border-width: 3px; }
  .device-back { left: 9%; border-width: 2px; }
  .device-back i { top: 9px; left: 7px; width: 15px; height: 15px; border-width: 1px; }
  .device-back i:nth-child(2) { top: 17px; left: 23px; }
  .device-back i:nth-child(3) { top: 25px; }
  .device-front i { width: 14px; height: 4px; top: 5px; }
  .selection, .comparison { margin-top: 22px; }
  .slots { gap: 8px; }
  .slot { padding: 9px; min-height: 80px; gap: 8px; }
  .slot-copy h3 { font-size: .82rem; }
  .thumbnail { flex-basis: 23px; width: 23px; height: 43px; }
  .remove { min-width: 32px; min-height: 32px; top: 0; right: 0; }
  th, td, .group th { padding-inline: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
