@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;600;700;900&family=Noto+Serif+TC:wght@600;700&display=swap");

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --ink: #12241f;
  --ink-muted: #45605a;
  --jade: #0f766e;
  --jade-deep: #0b5a54;
  --sky: #0369a1;
  --paper: #f3efe6;
  --surface: #fffdf8;
  --hairline: rgba(18, 36, 31, 0.09);
  --seal: #b88452;
}

html,
body {
  margin: 0;
  padding: 0;
}

body.dcard-page {
  min-height: 100dvh;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.dcard-shell {
  width: 100%;
  max-width: 30rem;
  margin: 0 auto;
  padding: 10px 16px calc(16px + env(safe-area-inset-bottom, 0px));
}

.dcard-pass {
  overflow: hidden;
  border-radius: 22px;
  background: var(--surface);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 20px 50px rgba(18, 36, 31, 0.11);
}

.dcard-pass-header {
  position: relative;
  padding: 14px 18px 18px;
  color: #ffffff;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.1), transparent 42%),
    linear-gradient(145deg, var(--jade) 0%, var(--jade-deep) 62%, #094743 100%);
}

.dcard-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.86);
  cursor: pointer;
  transition: color 0.2s ease;
}

.dcard-back svg {
  width: 15px;
  height: 15px;
}

.dcard-back:hover,
.dcard-back:focus-visible {
  color: #ffffff;
}

.dcard-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  margin-top: 14px;
  border-radius: 13px;
  background: linear-gradient(145deg, #f8efe3, #e8d4bc);
  color: #6b3f1f;
  font-family: "Noto Serif TC", "Songti TC", serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.14em;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
}

.dcard-kicker {
  margin: 10px 0 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.7);
}

.dcard-name {
  margin: 0 0 6px;
  font-size: clamp(1.15rem, 4.8vw, 1.32rem);
  font-weight: 800;
  line-height: 1.4;
  text-wrap: balance;
}

.dcard-tagline {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.88);
}

.dcard-body {
  padding: 16px 16px 14px;
}

.dcard-call {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 12px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--jade), var(--jade-deep));
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.24);
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.dcard-call:hover,
.dcard-call:focus-visible {
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.3);
  transform: translateY(-1px);
}

.dcard-call-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.16);
  flex-shrink: 0;
}

.dcard-call-icon svg {
  width: 20px;
  height: 20px;
}

.dcard-call-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  opacity: 0.88;
}

.dcard-call-number {
  display: block;
  margin-top: 1px;
  font-size: clamp(1.2rem, 5.5vw, 1.38rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}

.dcard-quick {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.dcard-quick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 68px;
  padding: 10px 4px;
  border-radius: 14px;
  border: 1px solid var(--hairline);
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.dcard-quick-item:hover,
.dcard-quick-item:focus-visible {
  border-color: rgba(15, 118, 110, 0.22);
  background: rgba(15, 118, 110, 0.03);
}

.dcard-quick-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--jade-deep);
}

.dcard-quick-icon svg {
  width: 18px;
  height: 18px;
}

.dcard-quick-label {
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  line-height: 1.25;
}

.dcard-section {
  margin-top: 16px;
}

.dcard-section-title {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
}

.dcard-service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.dcard-service {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 88px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--hairline);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.dcard-service:hover,
.dcard-service:focus-visible {
  border-color: rgba(15, 118, 110, 0.22);
}

.dcard-service--land {
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(15, 118, 110, 0.02));
}

.dcard-service--urban {
  background: linear-gradient(135deg, rgba(3, 105, 161, 0.08), rgba(3, 105, 161, 0.02));
}

.dcard-service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #ffffff;
  color: var(--jade-deep);
}

.dcard-service--urban .dcard-service-icon {
  color: var(--sky);
}

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

.dcard-service-name {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
}

.dcard-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
}

.dcard-links a {
  font-size: 12px;
  font-weight: 700;
  color: var(--jade);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.dcard-share {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px dashed rgba(18, 36, 31, 0.14);
}

.dcard-qr-wrap {
  flex-shrink: 0;
  padding: 5px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid var(--hairline);
}

.dcard-qr-image {
  width: 88px;
  height: 88px;
  border-radius: 6px;
}

.dcard-share-title {
  margin: 0 0 3px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.dcard-share-hint {
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
  color: var(--ink-muted);
}

.dcard-footer {
  padding: 10px 4px 0;
  text-align: center;
  font-size: 10px;
  color: var(--ink-muted);
}

.dcard-footer p {
  margin: 0;
}

.dcard-address {
  margin-top: 3px !important;
  line-height: 1.45;
}

@media (min-width: 480px) {
  .dcard-shell {
    padding-top: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dcard-call,
  .dcard-quick-item,
  .dcard-service,
  .dcard-back {
    transition: none;
  }

  .dcard-call:hover,
  .dcard-call:focus-visible {
    transform: none;
  }
}
