:root {
  --after-canvas: var(--wm-color-canvas);
  --after-panel: var(--wm-color-surface);
  --after-ink: var(--wm-color-ink);
  --after-muted: var(--wm-color-muted);
  --after-cyan: var(--wm-color-primary);
  --after-cyan-soft: var(--wm-color-primary-soft);
  --after-orange: var(--wm-color-live);
  --after-line: var(--wm-color-line);
  --page-width: var(--mobile-shell-content-width, 346.56px);
  --bottom-nav-height: 62px;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--wm-color-app-bg); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--after-ink);
  background: var(--wm-color-app-bg);
  font-family: var(--wm-font-ui);
  -webkit-font-smoothing: antialiased;
}

button { border: 0; cursor: pointer; font: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--after-cyan); outline-offset: 2px; }

.after-page {
  position: relative;
  width: min(100%, var(--page-width));
  height: 100%;
  min-height: 0;
  margin: 0 auto;
  overflow: hidden;
  background: var(--after-canvas);
}

.after-topbar {
  position: absolute;
  top: 25px;
  right: 0;
  left: 0;
  z-index: 6;
  display: grid;
  height: 51px;
  place-items: center;
  background: rgba(255, 255, 255, var(--chrome-alpha));
  border-bottom: 1px solid rgba(var(--wm-primary-rgb), calc(var(--chrome-alpha) * .2));
  backdrop-filter: blur(var(--chrome-blur));
  box-shadow: 0 2px 10px rgba(var(--wm-ink-rgb), calc(var(--chrome-alpha) * .08));
  text-shadow: 0 1px 8px rgba(255, 255, 255, .86);
  transition: background-color .05s linear, border-color .05s linear, box-shadow .05s linear;
}

.after-topbar h1 {
  margin: 0;
  color: var(--after-ink);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 20px;
}

.after-main {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 11px calc(var(--bottom-nav-height) + 28px + env(safe-area-inset-bottom));
  background: var(--after-canvas);
  scrollbar-width: none;
  overscroll-behavior: contain;
}

.after-main::-webkit-scrollbar { display: none; }

.after-hero {
  position: relative;
  height: 248px;
  min-height: 248px;
  margin: 0 -11px;
  overflow: hidden;
  isolation: isolate;
  background: var(--wm-color-primary-soft);
  border-radius: 0 0 24px 24px;
}

.after-hero-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 54%;
}

.after-hero-copy {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.after-hero-copy--sr-only {
  border: 0;
  padding: 0;
}

/* The approved option-3 hero carries its handwritten copy, title and live chip
   as one composited visual. Keep the real button as a transparent hit area so
   the live interaction remains keyboard and touch accessible. */
.after-hero-copy--sr-only,
.after-hero-copy--sr-only * {
  inset: auto;
  background: transparent;
  border: 0;
  box-shadow: none;
  text-shadow: none;
  color: transparent;
}

.after-hero-copy--sr-only {
  left: 0;
  bottom: 0;
  z-index: 1;
}

.after-hero-copy:not(.after-hero-copy--sr-only) {
  position: absolute;
  bottom: 16px;
  left: 22px;
  z-index: 1;
  display: grid;
  gap: 2px;
  max-width: 70%;
  padding: 7px 12px 8px;
  background: rgba(255, 255, 255, .7);
  border: 1px solid rgba(255, 255, 255, .52);
  border-radius: 15px;
  box-shadow: 0 8px 22px rgba(255, 255, 255, .34);
  backdrop-filter: blur(3px);
  text-shadow: 0 2px 10px rgba(255, 255, 255, .82);
}

.after-hero-kicker {
  color: var(--wm-color-muted-strong);
  font-size: 10px;
  font-weight: 700;
  line-height: 14px;
}

.after-hero-copy h2 {
  margin: 0;
  color: var(--after-ink);
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 32px;
}

.after-hero-copy p {
  margin: 0;
  color: var(--wm-color-muted-strong);
  font-size: 12px;
  line-height: 18px;
}

.after-live-state {
  position: absolute;
  left: 120px;
  bottom: 16px;
  z-index: 2;
  display: inline-flex;
  width: 76px;
  min-width: 76px;
  height: 28px;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0;
  color: transparent;
  background: transparent;
  border-radius: 999px;
  box-shadow: none;
  font-size: 0;
  line-height: 0;
  white-space: nowrap;
}

.after-live-dot {
  display: none;
}

.after-detail-button b { display: inline-flex; width: 14px; height: 14px; align-items: center; justify-content: center; font-size: 18px; font-weight: 400; line-height: 14px; transform: translateY(-.5px); }

.after-service-list { display: grid; gap: 8px; margin-top: 10px; }

.after-service-card {
  position: relative;
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) auto;
  min-height: 78px;
  align-items: center;
  gap: 11px;
  padding: 10px 10px 10px 10px;
  background: var(--after-panel);
  border: 1px solid var(--after-line);
  border-radius: 18px;
  box-shadow: 0 2px 10px rgba(var(--wm-ink-rgb), .03);
}

.after-service-card[data-action="detail"] {
  cursor: pointer;
}

.after-service-card[data-action="detail"]:focus-visible {
  outline: 2px solid var(--after-cyan);
  outline-offset: 2px;
}

.after-service-photo {
  display: block;
  width: 100px;
  height: 66px;
  object-fit: cover;
  border-radius: 12px;
}

.after-service-copy { display: grid; min-width: 0; gap: 7px; }

.after-service-copy h2 {
  margin: 0;
  color: var(--after-ink);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 18px;
}

.after-service-copy p {
  margin: 0;
  color: var(--after-muted);
  font-size: 10px;
  line-height: 15px;
  overflow-wrap: anywhere;
}

.after-detail-button {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  align-self: center;
  min-width: 82px;
  height: 30px;
  justify-content: center;
  padding: 0 8px;
  color: var(--after-cyan);
  background: var(--after-cyan-soft);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  line-height: 14px;
  white-space: nowrap;
}

.after-consult-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  min-height: 76px;
  align-items: center;
  gap: 11px;
  margin-top: 14px;
  padding: 10px 12px 10px 10px;
  background: var(--after-cyan-soft);
  border: 1px solid var(--wm-color-line);
  box-shadow: 0 3px 10px rgba(var(--wm-ink-rgb), .035);
  border-radius: 18px;
}

.after-consult-avatar {
  display: block;
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(var(--wm-action-rgb), .12);
}

.after-consult-copy { display: grid; min-width: 0; gap: 5px; }

.after-consult-copy strong {
  color: var(--after-ink);
  font-size: 16px;
  font-weight: 800;
  line-height: 22px;
}

.after-consult-copy span {
  color: var(--after-muted);
  max-width: 158px;
  font-size: 11px;
  line-height: 16px;
  white-space: normal;
}

.after-consult-card button {
  display: inline-flex;
  align-items: center;
  gap: 0;
  align-self: center;
  width: 76px;
  min-width: 76px;
  height: 32px;
  justify-content: center;
  padding: 0 6px;
  color: #fff;
  background: var(--wm-color-action);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 14px;
  text-align: center;
  white-space: nowrap;
}

.after-guarantee-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  min-height: 66px;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 14px;
  background: var(--wm-color-primary-wash);
  border-radius: 18px;
}

.after-guarantee-card > img {
  display: block;
  width: 54px;
  height: 54px;
  object-fit: cover;
}

.after-guarantee-card h2 {
  margin: 0 0 5px;
  color: var(--after-ink);
  font-size: 15px;
  font-weight: 800;
  line-height: 20px;
}

.after-guarantee-card p {
  margin: 0;
  color: var(--after-muted);
  font-size: 11px;
  line-height: 17px;
  overflow-wrap: anywhere;
}

.service-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(var(--wm-ink-rgb), .28);
}

.service-modal {
  width: min(100%, 326px);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--after-line);
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(var(--wm-ink-rgb), .2);
}

.service-modal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 17px;
  background: var(--after-cyan-soft);
  border-bottom: 1px solid var(--after-line);
}

.service-modal h2 { margin: 0; color: var(--after-ink); font-size: 16px; line-height: 22px; }
.service-modal header button { width: 28px; height: 28px; color: var(--after-cyan); background: #fff; border: 1px solid var(--after-line); border-radius: 50%; font-size: 20px; line-height: 1; }
.service-modal-body { padding: 14px 17px 17px; }
.service-modal-body p { margin: 0; color: var(--after-muted); font-size: 12px; line-height: 1.7; }
.service-modal-note { margin-top: 10px; padding: 9px 10px; color: var(--wm-color-muted-strong); background: var(--after-cyan-soft); border-radius: 10px; font-size: 10px; line-height: 1.55; }
.service-modal-primary { width: 100%; margin-top: 13px; padding: 10px; color: #fff; background: var(--after-cyan); border-radius: 10px; font-size: 12px; font-weight: 800; }

@media (max-width: 350px) {
  .after-main { padding-right: 9px; padding-left: 9px; }
  .after-service-card { grid-template-columns: 88px minmax(0, 1fr); gap: 8px; }
  .after-service-photo { width: 88px; height: 76px; }
  .after-detail-button { grid-column: 2; justify-self: start; }
  .after-consult-card { grid-template-columns: 68px minmax(0, 1fr); }
  .after-consult-avatar { width: 68px; height: 68px; }
  .after-consult-card button { grid-column: 2; justify-self: start; }
}
