:root {
  --ink: #16324a;
  --mist: #647a8b;
  --paper: #f5f0e8;
  --paper-light: #fbf8f1;
  --graphite: #4a4a46;
  --gold: #c9a66b;
  --line: rgba(201, 166, 107, 0.45);
  --line-green: #06c755;
  --shadow: 0 22px 60px rgba(22, 50, 74, 0.13);
  --serif: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

* { box-sizing: border-box; }

html {
  color-scheme: light;
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--graphite);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.75;
  background:
    radial-gradient(circle at 12% 8%, rgba(100, 122, 139, 0.14), transparent 28rem),
    radial-gradient(circle at 88% 36%, rgba(201, 166, 107, 0.09), transparent 24rem),
    linear-gradient(115deg, rgba(255,255,255,.26), transparent 42%),
    var(--paper);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
  z-index: 10;
}

a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; display: block; }

.page-shell {
  width: min(100%, 680px);
  margin: 0 auto;
  min-height: 100vh;
  overflow: hidden;
  position: relative;
  background: rgba(245, 240, 232, .76);
  box-shadow: 0 0 80px rgba(22, 50, 74, .08);
}

.hero {
  position: relative;
  height: 330px;
  overflow: hidden;
  isolation: isolate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 62%;
  background: linear-gradient(to bottom, transparent, rgba(245, 240, 232, .97));
  z-index: 1;
}

.cover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.72) contrast(.94);
  animation: mountain-in 1.4s ease both;
}

.brand-ribbon {
  position: absolute;
  left: 24px;
  top: 22px;
  right: 24px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid rgba(201,166,107,.55);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(251, 248, 241, .88);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 30px rgba(22,50,74,.08);
}

.brand-logo { width: 46px; height: 46px; object-fit: contain; flex: 0 0 auto; }
.brand-name { font-family: var(--serif); font-weight: 700; letter-spacing: .13em; }
.brand-mini { display: block; font-size: 13px; line-height: 1.4; color: var(--mist); letter-spacing: .06em; }

.portrait-wrap {
  position: absolute;
  left: 50%;
  bottom: -2px;
  z-index: 4;
  width: 178px;
  height: 178px;
  transform: translateX(-50%);
}

.portrait-wrap::before,
.portrait-wrap::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.portrait-wrap::before {
  inset: -9px;
  border: 1px solid var(--gold);
  opacity: .72;
}

.portrait-wrap::after {
  inset: -23px;
  border: 1px solid rgba(100,122,139,.32);
  clip-path: inset(0 0 43% 0);
  animation: ripple 6s ease-in-out infinite;
}

.profile-image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 24%;
  border: 6px solid var(--paper-light);
  box-shadow: 0 18px 40px rgba(22,50,74,.22);
}

.content { position: relative; z-index: 2; padding: 6px 18px 0; }

.identity {
  text-align: center;
  padding: 0 12px 26px;
  animation: card-in .8s .14s ease both;
}

.kicker {
  margin: 0 0 3px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .3em;
}

h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(29px, 8vw, 38px);
  line-height: 1.3;
  letter-spacing: .08em;
}

.title { margin: 5px 0 0; color: var(--mist); font-weight: 700; letter-spacing: .08em; }
.specialty { margin: 13px auto 0; color: var(--ink); font-family: var(--serif); font-size: 19px; }
.intro { max-width: 540px; margin: 14px auto 0; color: #575b5b; }

.gold-divider {
  width: 128px;
  height: 1px;
  margin: 24px auto;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.brand-message { text-align: center; margin-bottom: 22px; }
.brand-message strong { color: var(--ink); font-family: var(--serif); font-size: 22px; letter-spacing: .12em; }
.brand-message span { display: block; color: var(--mist); font-size: 15px; margin-top: 3px; }

.panel {
  margin: 0 0 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 26px 8px 26px 8px;
  background: rgba(251,248,241,.9);
  box-shadow: var(--shadow);
  animation: card-in .9s .22s ease both;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 18px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: .1em;
}

.section-title::before { content: ""; width: 27px; height: 1px; background: var(--gold); }

.contact-list { display: grid; gap: 5px; }
.contact-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid rgba(100,122,139,.13);
}
.contact-row:last-child { border-bottom: 0; }
.contact-icon { color: var(--gold); line-height: 1.75; text-align: center; }
.contact-label { display: block; color: var(--mist); font-size: 13px; letter-spacing: .08em; line-height: 1.35; }
.contact-value { display: block; color: var(--ink); font-size: 18px; overflow-wrap: anywhere; text-decoration-thickness: 1px; text-underline-offset: 3px; }

.liff-status {
  position: relative;
  margin: 0 0 18px;
  padding: 19px 20px 19px 50px;
  border-radius: 18px;
  color: var(--ink);
  background: rgba(100,122,139,.11);
  border-left: 4px solid var(--mist);
}
.liff-status::before { content: "水"; position: absolute; left: 17px; top: 17px; color: var(--mist); font-family: var(--serif); font-weight: 700; }
.liff-status strong { display: block; font-size: 20px; line-height: 1.45; }
.liff-status span { display: block; margin-top: 4px; color: #626867; font-size: 15px; line-height: 1.55; }
.liff-status[data-state="ready"] { background: rgba(6,199,85,.1); border-left-color: var(--line-green); }
.liff-status[data-state="ready"]::before { content: "✓"; color: var(--line-green); }
.liff-status[data-state="error"] { background: rgba(148,65,56,.08); border-left-color: #945148; }
.liff-status[data-state="error"]::before { content: "!"; color: #945148; }

.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.action-button {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 16px;
  font: 700 18px/1.35 var(--sans);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.action-button:hover { transform: translateY(-2px); box-shadow: 0 9px 22px rgba(22,50,74,.12); }
.action-button:focus-visible { outline: 3px solid rgba(201,166,107,.75); outline-offset: 3px; }
.action-button.primary { color: var(--paper-light); background: var(--ink); }
.action-button.secondary { color: var(--ink); background: transparent; border-color: var(--line); }
.action-button.line { color: white; background: var(--line-green); }
.action-button.share { grid-column: 1 / -1; min-height: 60px; color: white; background: var(--line-green); font-size: 20px; box-shadow: 0 12px 28px rgba(6,199,85,.2); }
.action-button[aria-disabled="true"], .action-button:disabled { opacity: .48; cursor: not-allowed; transform: none; box-shadow: none; }
.optional-actions:empty { display: none; }
.optional-actions { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 12px; }

.footer-wave {
  position: relative;
  margin-top: 42px;
  padding: 86px 26px 36px;
  color: rgba(245,240,232,.9);
  text-align: center;
  background: var(--ink);
  overflow: hidden;
}
.footer-wave::before,
.footer-wave::after {
  content: "";
  position: absolute;
  left: -18%;
  width: 136%;
  height: 82px;
  border-radius: 50%;
}
.footer-wave::before { top: -50px; background: var(--paper); animation: wave-drift 9s ease-in-out infinite alternate; }
.footer-wave::after { top: -37px; border-top: 1px solid var(--gold); opacity: .7; animation: wave-drift 13s ease-in-out infinite alternate-reverse; }
.footer-wave p { position: relative; margin: 0; font-family: var(--serif); letter-spacing: .15em; }
.footer-wave small { position: relative; display: block; margin-top: 5px; opacity: .65; font-size: 13px; letter-spacing: .08em; }

.toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 20;
  width: min(calc(100% - 36px), 520px);
  padding: 14px 18px;
  border-radius: 14px;
  color: white;
  text-align: center;
  background: rgba(22,50,74,.95);
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
  transform: translate(-50%, 30px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes mountain-in { from { opacity: 0; transform: scale(1.025); } to { opacity: 1; transform: scale(1); } }
@keyframes card-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ripple { 0%,100% { transform: scale(.98); opacity: .24; } 50% { transform: scale(1.035); opacity: .48; } }
@keyframes wave-drift { from { transform: translateX(-2%) rotate(-1deg); } to { transform: translateX(2%) rotate(1deg); } }

@media (max-width: 480px) {
  body { font-size: 18px; }
  .hero { height: 315px; }
  .brand-ribbon { left: 14px; right: 14px; top: 14px; }
  .brand-name { font-size: 17px; }
  .content { padding-inline: 12px; }
  .panel { padding: 21px 18px; }
  .action-grid { grid-template-columns: 1fr; }
  .action-button.share { grid-column: auto; }
}

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