:root {
  color-scheme: light;
  --forest: #397565;
  --forest-deep: #294b42;
  --forest-soft: #e6f1ed;
  --coral: #f46f61;
  --coral-deep: #d9574c;
  --coral-soft: #fff0ed;
  --cream: #f5f7f6;
  --paper: #ffffff;
  --ink: #26332e;
  --muted: #727d78;
  --line: #e5e9e6;
  --gold: #d29a3d;
  --gold-soft: #fff4dd;
  --blue: #4d8eae;
  --blue-soft: #e9f3f7;
  --shadow: 0 18px 48px rgba(39, 67, 57, 0.14);
  --frame-width: 480px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: #e9eeeb;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: #e9eeeb;
}

body.sheet-open {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
  letter-spacing: 0;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(214, 83, 69, 0.28);
  outline-offset: 2px;
}

.page-frame {
  width: min(100%, var(--frame-width));
  min-height: 100vh;
  position: relative;
  margin: 0 auto;
  overflow: hidden;
  background: var(--cream);
  box-shadow: 0 0 60px rgba(39, 67, 57, 0.1);
}

.topbar {
  width: min(100%, var(--frame-width));
  height: calc(64px + env(safe-area-inset-top));
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 40;
  padding: env(safe-area-inset-top) 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transform: translateX(-50%);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(57, 117, 101, 0.1);
  backdrop-filter: blur(12px);
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand-symbol {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--forest);
  border-radius: 10px;
  font-size: 16px;
  font-weight: 900;
}

.brand-copy strong,
.brand-copy small {
  display: block;
  letter-spacing: 0;
}

.brand-copy strong {
  font-size: 15px;
  line-height: 1.1;
}

.brand-copy small {
  margin-top: 4px;
  color: #7d9990;
  font-size: 8px;
  font-weight: 750;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.icon-button {
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}

.icon-button svg {
  width: 19px;
  height: 19px;
}

.topbar .icon-button {
  color: #587068;
}

.topbar .icon-button:active {
  background: var(--forest-soft);
}

.saved-shortcut {
  position: relative;
}

.saved-shortcut span {
  min-width: 17px;
  height: 17px;
  position: absolute;
  top: 0;
  right: -1px;
  padding: 0 4px;
  display: none;
  place-items: center;
  color: white;
  background: var(--coral);
  border: 2px solid white;
  border-radius: 9px;
  font-size: 8px;
  font-weight: 800;
}

.saved-shortcut span.visible {
  display: grid;
}

main {
  padding-top: calc(64px + env(safe-area-inset-top));
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}

.hero {
  min-height: 272px;
  position: relative;
  overflow: hidden;
  padding: 28px 18px 27px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(148px, 0.92fr);
  gap: 2px;
  color: var(--ink);
  background: #f9fbfa;
  border-bottom: 1px solid rgba(57, 117, 101, 0.08);
}

.hero::after {
  content: "";
  width: 54px;
  height: 5px;
  position: absolute;
  left: 18px;
  bottom: 17px;
  background: var(--coral);
  border-radius: 3px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.hero-kicker {
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  color: var(--forest-deep);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(57, 117, 101, 0.14);
  border-radius: 14px;
  font-size: 10px;
  font-weight: 700;
}

.hero-kicker svg {
  width: 13px;
  height: 13px;
  color: var(--forest);
}

.hero h1 {
  margin: 14px 0 8px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 31px;
  line-height: 1.2;
  font-weight: 820;
  letter-spacing: 0;
}

.hero-copy > p {
  max-width: 210px;
  margin: 0;
  color: #62766e;
  font-size: 11px;
  line-height: 1.7;
}

.hero-proof {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hero-proof span {
  min-height: 22px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  color: var(--forest-deep);
  background: rgba(255, 255, 255, 0.82);
  border-radius: 11px;
  font-size: 9px;
  font-weight: 750;
}

.hero-proof span:nth-child(2) {
  color: #755112;
  background: #fff2d4;
}

.hero-proof span:nth-child(3) {
  color: #93483f;
  background: #ffe8e4;
}

.hero-art {
  min-width: 0;
  position: relative;
  display: grid;
  place-items: center;
}

#heroImage {
  width: 175%;
  max-width: none;
  position: absolute;
  right: -39%;
  bottom: -26px;
  display: none;
  object-fit: contain;
}

#heroImage.loaded {
  display: block;
}

.hero-fallback {
  width: 100%;
  height: 100%;
  position: relative;
  display: grid;
  place-items: center;
}

.hero-fallback.hidden {
  display: none;
}

.hero-app-stack {
  width: 166px;
  height: 220px;
  position: relative;
  transform: scale(0.9);
  transform-origin: center;
}

.hero-app-tile {
  width: 142px;
  height: 62px;
  position: absolute;
  right: 0;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  background: white;
  border: 1px solid rgba(57, 117, 101, 0.1);
  border-radius: 16px;
  box-shadow: 0 16px 34px rgba(41, 75, 64, 0.12);
}

.hero-app-tile > span:last-child {
  min-width: 0;
}

.hero-app-tile strong,
.hero-app-tile small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-app-tile strong {
  color: var(--ink);
  font-size: 11px;
}

.hero-app-tile small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 7px;
}

.hero-app-logo {
  width: 42px;
  height: 42px;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--forest);
  background: var(--forest-soft);
  border-radius: 12px;
  font-size: 13px;
}

.hero-app-logo img {
  width: 34px;
  height: 34px;
  position: absolute;
  inset: 4px;
  object-fit: contain;
  border-radius: 9px;
}

.tile-primary {
  top: 23px;
  z-index: 3;
  transform: rotate(3deg);
}

.tile-secondary {
  top: 89px;
  right: 18px;
  z-index: 2;
  transform: rotate(-4deg);
}

.tile-tertiary {
  top: 153px;
  right: 4px;
  z-index: 1;
  transform: rotate(2deg);
}

.hero-index-stamp {
  width: 51px;
  height: 51px;
  position: absolute;
  top: 0;
  left: -1px;
  z-index: 5;
  display: grid;
  place-content: center;
  color: white;
  background: var(--coral);
  border: 3px solid #f9fbfa;
  border-radius: 50%;
  box-shadow: 0 9px 20px rgba(217, 87, 76, 0.2);
  text-align: center;
}

.hero-index-stamp strong,
.hero-index-stamp small {
  display: block;
}

.hero-index-stamp strong {
  font-size: 16px;
  line-height: 1;
}

.hero-index-stamp small {
  margin-top: 3px;
  font-size: 6px;
  font-weight: 750;
}

.signal-bar {
  min-height: 58px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: white;
  border-bottom: 1px solid var(--line);
}

.signal-bar div {
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.signal-bar div:not(:last-child)::after {
  content: "";
  width: 1px;
  height: 28px;
  position: absolute;
  top: 15px;
  right: 0;
  background: var(--line);
}

.signal-bar strong {
  color: var(--forest-deep);
  font-size: 15px;
  line-height: 1;
}

.signal-bar span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 8px;
}

.quick-panel {
  padding: 13px 16px 10px;
  background: var(--cream);
  border-bottom: 0;
}

.search-bar {
  height: 43px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 7px;
  padding: 0 5px 0 13px;
  background: white;
  border: 1px solid rgba(57, 117, 101, 0.1);
  border-radius: 13px;
  box-shadow: 0 7px 20px rgba(47, 75, 65, 0.06);
  transition: background 150ms ease, border-color 150ms ease;
}

.search-bar:focus-within {
  background: white;
  border-color: #83a799;
}

.search-bar > svg {
  width: 17px;
  color: var(--muted);
}

.search-bar input {
  min-width: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 12px;
}

.search-bar input::placeholder {
  color: #8a938e;
}

.clear-search {
  width: 34px;
  height: 34px;
  opacity: 0;
  pointer-events: none;
  color: var(--muted);
}

.search-bar.has-value .clear-search {
  opacity: 1;
  pointer-events: auto;
}

.category-rail {
  display: none;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-rail::-webkit-scrollbar {
  display: none;
}

.category-chip {
  min-height: 31px;
  flex: 0 0 auto;
  padding: 0 12px;
  color: #59635d;
  background: white;
  border: 1px solid #d9ddd9;
  border-radius: 16px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
}

.category-chip.active {
  color: white;
  background: var(--coral);
  border-color: var(--coral);
}

.ranking-section {
  padding: 23px 14px 20px;
  background: #f5f7f6;
}

.section-heading {
  padding: 0 3px 14px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.section-index {
  display: block;
  color: var(--forest);
  font-size: 8px;
  line-height: 1.2;
  font-weight: 850;
  letter-spacing: 0;
}

.section-heading h2,
.sheet-heading h2 {
  margin: 5px 0 0;
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: 0;
}

.filter-button {
  min-height: 34px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--forest);
  background: transparent;
  border: 1px solid #b9c5bf;
  border-radius: 17px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
}

.filter-button svg {
  width: 14px;
}

.filter-button span {
  min-width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--coral);
  border-radius: 8px;
  font-size: 8px;
}

.result-line {
  min-height: 30px;
  padding: 0 3px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  border-bottom: 1px solid #cfd3cf;
  font-size: 9px;
}

.result-line p {
  margin: 0;
  color: #3f4944;
  font-size: 10px;
  font-weight: 750;
}

.platform-list {
  display: grid;
  gap: 13px;
  padding-top: 14px;
}

.platform-card {
  min-height: 196px;
  position: relative;
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr);
  overflow: hidden;
  background: var(--paper);
  border: 1px solid rgba(57, 117, 101, 0.08);
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(48, 77, 66, 0.08);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.platform-card:active {
  transform: scale(0.992);
  box-shadow: 0 7px 20px rgba(48, 77, 66, 0.07);
}

.rank-number {
  position: relative;
  z-index: 1;
  padding-top: 19px;
  color: var(--rank-color, var(--forest));
  background: transparent;
  border-right: 0;
  text-align: center;
  font-family: Inter, "PingFang SC", sans-serif;
  font-size: 13px;
  font-weight: 800;
}

.rank-number::before {
  content: "";
  width: 25px;
  height: 28px;
  position: absolute;
  top: 12px;
  left: 3px;
  z-index: -1;
  background: var(--rank-bg, #edf3f0);
  border-radius: 10px;
}

.platform-main {
  min-width: 0;
  padding: 15px 14px 13px;
}

.platform-head {
  min-width: 0;
  display: grid;
  grid-template-columns: 47px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
}

.app-icon {
  width: 49px;
  height: 49px;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--icon-color, var(--forest));
  background: var(--icon-bg, var(--forest-soft));
  border: 1px solid rgba(30, 55, 45, 0.13);
  border-radius: 14px;
}

.icon-fallback {
  font-size: 16px;
  font-weight: 900;
}

.app-icon img {
  width: 37px;
  height: 37px;
  position: absolute;
  inset: 6px;
  object-fit: contain;
  border-radius: 10px;
}

.platform-title {
  min-width: 0;
}

.title-line {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.title-line h3 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  line-height: 1.3;
}

.verify-label {
  min-height: 18px;
  flex: 0 0 auto;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  color: var(--forest);
  background: var(--forest-soft);
  border-radius: 10px;
  font-size: 8px;
  font-weight: 800;
}

.verify-label.pending {
  color: #8b6118;
  background: #fff2d7;
}

.platform-kind {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.save-button {
  width: 34px;
  height: 34px;
  color: #7c8680;
}

.save-button.saved {
  color: var(--coral-deep);
  background: var(--coral-soft);
  border-radius: 10px;
}

.save-button.saved svg {
  fill: currentColor;
}

.platform-description {
  min-height: 38px;
  margin: 12px 0 8px;
  color: #59655f;
  font-size: 11px;
  line-height: 1.65;
}

.tag-row {
  min-height: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tag-row span {
  min-height: 20px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  color: #56615b;
  background: #f1f5f3;
  border-radius: 10px;
  font-size: 8px;
}

.platform-foot {
  min-height: 42px;
  margin-top: 10px;
  padding-top: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid #e5e6e2;
}

.review-date {
  color: #8a938e;
  font-size: 8px;
  white-space: nowrap;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.more-button,
.official-button,
.primary-button,
.secondary-button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 11px;
  border-radius: 11px;
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
  text-decoration: none;
}

.more-button,
.secondary-button {
  color: #4e5953;
  background: #f7f9f8;
  border: 1px solid #dde4e0;
}

.official-button,
.primary-button {
  color: white;
  background: var(--coral);
  border: 1px solid var(--coral);
  box-shadow: 0 6px 14px rgba(217, 87, 76, 0.13);
}

.official-button:active,
.primary-button:active {
  background: var(--coral-deep);
}

.official-button svg {
  width: 13px;
  height: 13px;
}

.empty-state {
  padding: 54px 20px 58px;
  text-align: center;
}

.empty-state > span {
  width: 52px;
  height: 52px;
  margin: 0 auto 15px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #e2e5e1;
  border-radius: 50%;
}

.empty-state h2 {
  margin: 0 0 7px;
  font-size: 17px;
}

.empty-state p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 11px;
}

.seo-index-section {
  margin-top: 34px;
  padding: 25px 3px 0;
  border-top: 1px solid #dfe4e1;
}

.seo-index-section h2 {
  margin: 6px 0 7px;
  font-size: 18px;
  letter-spacing: 0;
}

.seo-index-section > div > p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}

.guide-links {
  display: grid;
  gap: 8px;
}

.guide-links a {
  min-height: 62px;
  padding: 12px 13px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--ink);
  background: white;
  border: 1px solid rgba(57, 117, 101, 0.1);
  border-radius: 13px;
  text-decoration: none;
  box-shadow: 0 7px 18px rgba(48, 77, 66, 0.05);
}

.guide-links a:nth-child(2) {
  border-left: 3px solid var(--coral);
}

.guide-links a:nth-child(3) {
  border-left: 3px solid var(--gold);
}

.guide-links span {
  font-size: 11px;
  font-weight: 850;
}

.guide-links small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.app-index-heading {
  margin: 24px 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.app-index-heading strong {
  font-size: 10px;
}

.app-index-heading a {
  color: var(--forest);
  font-size: 8px;
  font-weight: 800;
  text-decoration: none;
}

.seo-app-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.seo-app-links a {
  min-height: 46px;
  padding: 8px 11px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--ink);
  background: white;
  border: 1px solid rgba(57, 117, 101, 0.08);
  border-radius: 13px;
  text-decoration: none;
  box-shadow: 0 7px 18px rgba(48, 77, 66, 0.05);
}

.seo-app-links span {
  font-size: 10px;
  font-weight: 800;
}

.seo-app-links small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.safety-banner {
  margin: 14px 14px 0;
  padding: 19px 17px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  background: #ffe9e5;
  border: 1px solid rgba(244, 111, 97, 0.12);
  border-radius: 14px;
}

.safety-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--coral-deep);
  background: white;
  border-radius: 12px;
}

.safety-mark svg {
  width: 21px;
}

.safety-banner .section-index {
  color: var(--coral-deep);
}

.safety-banner h2 {
  margin: 5px 0 5px;
  font-size: 14px;
}

.safety-banner p {
  margin: 0;
  color: #756b67;
  font-size: 9px;
  line-height: 1.55;
}

.round-arrow {
  width: 34px;
  height: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  color: white;
  background: var(--coral);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.round-arrow svg {
  width: 16px;
}

.footer {
  padding: 35px 18px 22px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}

.footer strong {
  color: var(--ink);
  font-size: 12px;
}

.footer p {
  margin: 7px 0 0;
}

.footer-links {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.footer-links a {
  color: var(--forest);
  font-size: 9px;
  font-weight: 750;
  text-decoration: none;
}

.bottom-nav {
  width: min(100%, var(--frame-width));
  height: calc(64px + env(safe-area-inset-bottom));
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 45;
  padding: 5px 8px env(safe-area-inset-bottom);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid #e1e6e3;
  box-shadow: 0 -8px 24px rgba(25, 45, 37, 0.06);
  backdrop-filter: blur(12px);
}

.nav-item {
  min-width: 0;
  position: relative;
  padding: 4px 0 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #7c8680;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 9px;
  z-index: 0;
}

.nav-item svg {
  width: 19px;
  height: 19px;
}

.nav-item.active {
  color: var(--coral-deep);
  font-weight: 800;
}

.nav-item.active::before {
  content: "";
  width: 36px;
  height: 28px;
  position: absolute;
  top: 3px;
  z-index: -1;
  background: var(--coral-soft);
  border-radius: 14px;
}

.nav-item b {
  min-width: 15px;
  height: 15px;
  position: absolute;
  top: 1px;
  right: calc(50% - 21px);
  padding: 0 3px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--coral);
  border-radius: 8px;
  font-size: 7px;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(10, 25, 20, 0.62);
  backdrop-filter: blur(3px);
}

.sheet-backdrop[hidden] {
  display: none;
}

.bottom-sheet {
  width: min(100%, var(--frame-width));
  max-height: min(84vh, 760px);
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 80;
  padding: 12px 20px calc(22px + env(safe-area-inset-bottom));
  overflow-y: auto;
  transform: translateX(-50%);
  color: var(--ink);
  background: var(--paper);
  border-radius: 22px 22px 0 0;
  box-shadow: var(--shadow);
}

.bottom-sheet[hidden] {
  display: none;
}

.detail-sheet {
  height: calc(100dvh - 10px);
  max-height: calc(100dvh - 10px);
  padding-bottom: calc(22px + env(safe-area-inset-bottom));
}

.sheet-handle {
  width: 38px;
  height: 4px;
  margin: 0 auto 12px;
  background: #cbd1cd;
  border-radius: 2px;
}

.sheet-close {
  position: absolute;
  top: 17px;
  right: 14px;
  color: var(--muted);
  background: #f0f4f2;
  border-radius: 11px;
}

.sheet-heading {
  padding: 10px 44px 20px 0;
  border-bottom: 1px solid var(--line);
}

.detail-wrap {
  padding-top: 7px;
}

.detail-sheet .sheet-close {
  position: sticky;
  top: 6px;
  z-index: 6;
  float: right;
  margin-bottom: -38px;
}

.detail-head {
  min-width: 0;
  padding: 7px 44px 17px 0;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.detail-head .app-icon {
  width: 58px;
  height: 58px;
}

.detail-head .app-icon img {
  width: 44px;
  height: 44px;
  inset: 7px;
}

.detail-head h2 {
  margin: 0 0 6px;
  font-size: 21px;
}

.detail-head p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.detail-nav {
  position: sticky;
  top: -12px;
  z-index: 4;
  margin: 0 -20px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.detail-nav a {
  min-height: 42px;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-decoration: none;
  font-size: 10px;
  font-weight: 750;
}

.detail-nav a:first-child {
  color: var(--coral-deep);
  box-shadow: inset 0 -2px var(--coral);
}

.detail-section {
  padding: 23px 0;
  scroll-margin-top: 48px;
  border-bottom: 1px solid var(--line);
}

.detail-section:last-of-type {
  border-bottom: 0;
}

.detail-eyebrow {
  display: block;
  color: var(--forest);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0;
}

.detail-section h3 {
  margin: 5px 0 13px;
  font-size: 17px;
  line-height: 1.3;
}

.detail-section h4 {
  margin: 20px 0 10px;
  font-size: 11px;
}

.detail-summary {
  margin: 0;
  padding: 0;
  color: #4f5c55;
  font-size: 11px;
  line-height: 1.8;
}

.suitable-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  list-style: none;
}

.suitable-list li {
  min-height: 30px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  color: #50605a;
  font-size: 10px;
}

.suitable-list svg {
  width: 20px;
  height: 20px;
  padding: 4px;
  color: var(--forest);
  background: var(--forest-soft);
  border-radius: 50%;
}

.detail-facts {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.detail-facts div {
  min-width: 0;
  padding: 13px 8px 13px 0;
  border-bottom: 1px solid var(--line);
}

.detail-facts div:nth-child(even) {
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.detail-facts dt {
  color: #87908b;
  font-size: 8px;
}

.detail-facts dd {
  margin: 5px 0 0;
  color: #36423c;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.5;
}

.risk-note {
  margin: 15px 0;
  padding: 12px;
  display: flex;
  gap: 9px;
  color: #754a0c;
  background: var(--gold-soft);
  border-left: 3px solid var(--gold);
  font-size: 9px;
  line-height: 1.6;
  border-radius: 0 11px 11px 0;
}

.risk-note svg {
  width: 16px;
  flex: 0 0 auto;
}

.guide-steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide-steps li {
  min-height: 72px;
  padding: 13px 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  border-top: 1px solid var(--line);
}

.guide-steps li > span {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  color: var(--coral-deep);
  background: var(--coral-soft);
  border-radius: 9px;
  font-size: 8px;
  font-weight: 850;
}

.guide-steps strong {
  display: block;
  font-size: 11px;
}

.guide-steps p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.65;
}

.faq-list {
  border-top: 1px solid var(--line);
}

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list summary {
  min-height: 51px;
  position: relative;
  padding: 13px 32px 13px 0;
  display: flex;
  align-items: center;
  cursor: pointer;
  list-style: none;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.5;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  width: 22px;
  height: 22px;
  position: absolute;
  top: 14px;
  right: 0;
  display: grid;
  place-items: center;
  color: var(--forest);
  background: var(--forest-soft);
  border-radius: 50%;
  font-size: 15px;
  font-weight: 500;
}

.faq-list details[open] summary::after {
  content: "−";
}

.faq-list details p {
  margin: -3px 0 14px;
  padding-right: 28px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.75;
}

.detail-actions {
  position: sticky;
  bottom: calc(-22px - env(safe-area-inset-bottom));
  z-index: 5;
  margin: 0 -20px;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid var(--line);
  box-shadow: 0 -10px 28px rgba(45, 72, 62, 0.08);
  backdrop-filter: blur(12px);
}

.detail-actions .save-button {
  width: 42px;
  height: 42px;
  border: 1px solid #ccd2ce;
}

.detail-actions .primary-button {
  min-height: 42px;
}

.filter-group {
  margin: 0;
  padding: 18px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.filter-group legend {
  margin-bottom: 12px;
  font-size: 11px;
  font-weight: 800;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 3px;
  background: #eceeea;
  border-radius: 12px;
}

.segmented-control label {
  min-width: 0;
  cursor: pointer;
}

.segmented-control input,
.check-grid input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-control span {
  min-height: 34px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border-radius: 9px;
  font-size: 10px;
  font-weight: 700;
}

.segmented-control input:checked + span {
  color: var(--forest);
  background: white;
  box-shadow: 0 2px 7px rgba(31, 49, 42, 0.09);
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.check-grid label {
  min-width: 0;
  cursor: pointer;
}

.check-grid span {
  min-height: 62px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
  background: white;
  border: 1px solid #d5d9d5;
  border-radius: 12px;
  font-size: 9px;
}

.check-grid svg {
  width: 18px;
}

.check-grid input:checked + span {
  color: var(--forest);
  background: var(--forest-soft);
  border-color: #83a99a;
  font-weight: 800;
}

.switch-row {
  min-height: 70px;
  padding: 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  cursor: pointer;
}

.switch-row strong,
.switch-row small {
  display: block;
}

.switch-row strong {
  font-size: 11px;
}

.switch-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
}

.switch-row input {
  width: 40px;
  height: 23px;
  position: relative;
  flex: 0 0 auto;
  appearance: none;
  background: #cbd1cd;
  border-radius: 12px;
  cursor: pointer;
}

.switch-row input::after {
  content: "";
  width: 19px;
  height: 19px;
  position: absolute;
  top: 2px;
  left: 2px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  transition: transform 150ms ease;
}

.switch-row input:checked {
  background: var(--forest);
}

.switch-row input:checked::after {
  transform: translateX(17px);
}

.sheet-actions {
  display: grid;
  grid-template-columns: 0.65fr 1.35fr;
  gap: 8px;
}

.sheet-actions button {
  min-height: 42px;
}

.safety-heading {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.safety-symbol {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: var(--coral-deep);
  background: var(--coral-soft);
  border-radius: 12px;
}

.safety-symbol svg {
  width: 23px;
}

.safety-list {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.safety-list li {
  min-height: 73px;
  padding: 13px 0;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 8px;
  border-bottom: 1px solid var(--line);
}

.safety-list li > span {
  color: var(--coral-deep);
  font-family: Georgia, serif;
  font-size: 11px;
  font-weight: 800;
}

.safety-list strong {
  display: block;
  font-size: 11px;
}

.safety-list p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.full-width {
  width: 100%;
  min-height: 42px;
}

.toast {
  max-width: calc(min(100%, var(--frame-width)) - 32px);
  position: fixed;
  left: 50%;
  bottom: calc(78px + env(safe-area-inset-bottom));
  z-index: 100;
  padding: 10px 14px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  color: white;
  background: #14251f;
  border-radius: 12px;
  box-shadow: var(--shadow);
  font-size: 10px;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 370px) {
  .hero {
    min-height: 292px;
    grid-template-columns: minmax(0, 1fr) 132px;
    padding-left: 16px;
    padding-right: 14px;
  }

  .hero h1 {
    font-size: 30px;
  }

  .hero-app-stack {
    transform: scale(0.88);
    transform-origin: center right;
  }

  .platform-main {
    padding-left: 10px;
    padding-right: 10px;
  }

  .platform-head {
    grid-template-columns: 43px minmax(0, 1fr) 32px;
    gap: 8px;
  }

  .app-icon {
    width: 43px;
    height: 43px;
  }

  .app-icon img {
    width: 33px;
    height: 33px;
    inset: 5px;
  }

  .official-button,
  .more-button {
    padding-left: 8px;
    padding-right: 8px;
  }
}

@media (min-width: 481px) {
  body::before,
  body::after {
    content: "";
    position: fixed;
    top: 0;
    bottom: 0;
    width: calc((100vw - var(--frame-width)) / 2);
    pointer-events: none;
    background: #e9eeeb;
  }

  body::before {
    left: 0;
  }

  body::after {
    right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
