:root {
  color-scheme: light;
  font-family: Inter, "SF Pro Display", "SF Pro Text", "Noto Sans SC", "Noto Sans JP", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #11110f;
  background: #dddcd9;
  font-synthesis: none;
  --paper: #f3efe8;
  --paper-raised: #faf7f2;
  --ink: #11110f;
  --muted: #6e6a64;
  --line: rgba(17, 17, 15, 0.23);
}

* { box-sizing: border-box; }

html { background: #dddcd9; }

body {
  margin: 0;
  min-width: 280px;
  min-height: 100vh;
  background: radial-gradient(circle at 50% 0%, #eeeeec 0, #deddda 50%, #d4d3d0 100%);
  color: var(--ink);
}

button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }
a { color: inherit; }
svg { display: block; width: 1.45rem; height: 1.45rem; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.card-shell, .services-shell {
  width: 100%;
  min-height: 100svh;
  display: grid;
  place-items: start center;
}

.card-page, .services-page {
  width: min(100%, 30.75rem);
  min-height: 100svh;
  background: var(--paper);
  box-shadow: 0 1.25rem 3.4rem rgba(27, 24, 20, 0.12);
}

.card-page {
  display: flex;
  flex-direction: column;
  padding: max(5rem, calc(env(safe-area-inset-top) + 2.25rem)) max(2.5rem, calc(env(safe-area-inset-right) + 1.75rem)) max(1rem, calc(env(safe-area-inset-bottom) + 0.75rem)) max(2.5rem, calc(env(safe-area-inset-left) + 1.75rem));
}

.card-header, .services-header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 10;
}

.brand-lockup img { display: block; width: 10.5rem; height: auto; }
.brand-lockup p { margin: 0.55rem 0 0 0.3rem; font-size: 1.01rem; line-height: 1.15; letter-spacing: 0.42em; }

.language-control { position: relative; }
.language-trigger {
  display: grid;
  place-items: center;
  align-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.language-trigger svg, .language-trigger img { display: block; width: 1.25rem; height: 1.25rem; }
.language-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  min-width: 8.5rem;
  padding: 0.4rem;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  box-shadow: 0 0.8rem 2rem rgba(20, 18, 15, 0.12);
  color: var(--ink);
  font-size: 0.85rem;
  line-height: 1.2;
}
.language-menu button {
  display: block;
  width: 100%;
  min-height: 2.65rem;
  padding: 0.6rem 0.75rem;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.language-menu button:hover, .language-menu button:focus-visible { background: #ede9e2; }
.language-menu button.active { font-weight: 650; }

.identity-block { margin-top: clamp(17rem, 40svh, 21.5rem); padding-top: 0; }
.preview-label { margin: 0 0 0.375rem; color: var(--muted); font-size: 0.6375rem; line-height: 1.15; letter-spacing: 0.14em; text-transform: uppercase; }
.identity-block h1 { margin: 0; font-size: clamp(1.12rem, 5.334vw, 1.638rem); font-weight: 500; line-height: 1; letter-spacing: 0.055em; white-space: nowrap; }
.identity-block .role { margin: 0.45rem 0 0; font-size: clamp(0.98rem, 4.5vw, 1.23rem); line-height: 1.2; letter-spacing: 0.025em; }
.invalid-title { margin: 0 0 0.375rem; font-size: 0.935rem; line-height: 1.2; font-weight: 600; }
.invalid-copy { margin: 0 0 1.35rem; max-width: 24rem; color: var(--muted); font-size: 0.85rem; line-height: 1.36; }
.identity-block.invalid h1, .identity-block.invalid .role { color: #77726b; }

.contact-list { margin-top: 1.6rem; padding: 1.2rem 0 0.75rem; border-top: 1px solid var(--line); }
.contact-row { display: flex; align-items: center; min-height: 2.45rem; font-size: 0.85rem; line-height: 1.2; }
.contact-icon { display: grid; flex: 0 0 3.35rem; place-items: center start; }
.contact-icon svg { width: 1.25rem; height: 1.25rem; stroke-width: 1.5; }
.contact-row a { text-decoration: none; overflow-wrap: anywhere; }
.contact-row a:hover { text-decoration: underline; text-underline-offset: 0.25rem; }
.disabled-value { color: #8c877f; }
.contact-row.is-pending svg { color: #8c877f; }

.card-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 0; margin-top: 0; padding-top: 0.5rem; border-top: 1px solid var(--line); }
.card-actions a, .card-actions button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  height: 2.75rem;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: clamp(0.6375rem, 2.85vw, 0.744rem);
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}
.card-actions a { justify-content: flex-end; }
.card-actions a:hover, .card-actions button:hover { text-decoration: underline; text-underline-offset: 0.3rem; }

.services-page { padding: max(1.75rem, calc(env(safe-area-inset-top) + 0.75rem)) max(1.5rem, calc(env(safe-area-inset-right) + 1.1rem)) max(2rem, calc(env(safe-area-inset-bottom) + 1.25rem)) max(1.5rem, calc(env(safe-area-inset-left) + 1.1rem)); }
.services-header { align-items: center; }
.back-link { display: grid; width: 2.75rem; height: 2.75rem; place-items: center start; text-decoration: none; }
.back-link svg { width: 1.75rem; height: 1.75rem; }
.services-header-right { display: flex; align-items: center; gap: 0.45rem; }
.services-header .mark { display: block; width: 2.9rem; height: 2.55rem; object-fit: contain; background: transparent; }
.services-page > h1 { margin: 1.65rem 0 1.3rem; font-size: clamp(1.68rem, 7.48vw, 2.43rem); font-weight: 400; line-height: 1; letter-spacing: 0.005em; }
.services-list { border-bottom: 1px solid var(--line); }
.service-item {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 0.6rem;
  align-items: center;
  min-height: 10.25rem;
  padding: 1.05rem 0;
  border-top: 1px solid var(--line);
}
.service-item:first-child { border-top: 0; }
.service-copy { position: relative; z-index: 1; }
.service-item h2 { margin: 0 0 0.46rem; font-size: clamp(0.95rem, 4.25vw, 1.15rem); font-weight: 650; line-height: 1.15; word-break: keep-all; overflow-wrap: normal; hyphens: none; }
.service-item p { margin: 0; max-width: 14rem; font-size: 0.744rem; line-height: 1.32; word-break: normal; overflow-wrap: break-word; line-break: strict; }
.service-item img { display: block; width: 100%; max-height: 9.25rem; object-fit: contain; object-position: center; }
.service-2 { grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); min-height: 12.8rem; }
.service-2 img { max-height: 11.8rem; }
.service-3 { min-height: 9.85rem; }
.service-3 img { max-height: 8.4rem; }
.services-page footer { padding-top: 1.7rem; }
.presentation-link { display: inline-block; padding: 0.4rem 0 0.5rem; border-bottom: 1px solid currentColor; font-size: 0.85rem; line-height: 1.2; text-decoration: none; }
.presentation-link.disabled { color: var(--muted); border-bottom-color: var(--line); }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: end center;
  padding: 1rem;
  background: rgba(16, 15, 13, 0.42);
  backdrop-filter: blur(0.25rem);
}
.modal {
  position: relative;
  width: min(100%, 28rem);
  max-height: calc(100svh - 2rem);
  overflow: auto;
  padding: 2rem;
  background: var(--paper-raised);
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.22);
  font-size: 0.85rem;
  line-height: 1.35;
}
.modal h2 { margin: 0 3rem 1.45rem 0; font-size: 1.4rem; line-height: 1.15; font-weight: 500; }
.modal-close { position: absolute; top: 1.25rem; right: 1.25rem; display: grid; width: 2.75rem; height: 2.75rem; place-items: center; border: 0; background: transparent; cursor: pointer; }
.modal-close svg { width: 1.35rem; height: 1.35rem; }
.qr-link { display: block; width: min(100%, 19rem); margin: 0 auto; }
.qr-link img { display: block; width: 100%; height: auto; }
.wechat-id { display: flex; justify-content: space-between; gap: 1rem; margin: 1.4rem 0; padding: 1rem 0; border-block: 1px solid var(--line); }
.wechat-id span { color: var(--muted); }
.wechat-id strong { overflow-wrap: anywhere; text-align: right; }
.modal-primary { width: 100%; min-height: 3.2rem; padding: 0.7rem 1rem; border: 1px solid var(--ink); background: var(--ink); color: white; cursor: pointer; }
.qr-hint { margin: 1rem 0; color: var(--muted); line-height: 1.36; }
.full-qr { display: inline-block; margin-top: 0.35rem; text-underline-offset: 0.25rem; }
.modal-notice { margin: 0.85rem 0 0; font-size: 0.765rem; line-height: 1.2; text-align: center; }
.empty-state { display: grid; place-items: center; min-height: 13rem; text-align: center; }
.empty-state img { width: 5rem; height: 4.4rem; object-fit: contain; opacity: 0.22; }
.empty-state p { margin: 1rem 0 0; color: var(--muted); }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

@media (min-width: 48rem) {
  body { padding: 2.5rem; }
  .card-shell, .services-shell { min-height: calc(100vh - 5rem); }
  .card-page, .services-page { min-height: min(54rem, calc(100vh - 5rem)); }
  .modal-backdrop { place-items: center; }
}

@media (max-width: 22rem) {
  .card-page { padding-inline: 1.15rem; }
  .brand-lockup img { width: 8.4rem; }
  .brand-lockup p { font-size: 0.875rem; }
  .language-trigger { width: 2.75rem; height: 2.75rem; }
  .identity-block { padding-top: 2rem; }
  .contact-icon { flex-basis: 3rem; }
  .card-actions a, .card-actions button { font-size: 0.612rem; }
  .services-page { padding-inline: 1rem; }
  .services-header-right { gap: 0.2rem; }
  .service-item, .service-2 { grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr); gap: 0.25rem; }
  .service-item p { font-size: 0.697rem; }
}

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