@font-face {
  font-family: "Tenor Sans";
  src: url("./assets/fonts/tenor.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Unicase";
  src: url("./assets/fonts/cormorant.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --ap-paper: #f6f1e9;
  --ap-ink: #35291f;
  --ap-soft: #756453;
  --ap-line: #d9cbbb;
  --ap-wash: #ece3d6;
  --ap-bronze: #80613e;
  --ap-solid: #493425;
  --ap-solid-ink: #fffaf2;
  --ap-error: #9c3529;
  --ap-error-wash: #f4e5de;
  --ap-focus: #8c6541;
  --ap-card: #735742;
  --ap-card-ink: #fff3df;
  font-family: "Tenor Sans", -apple-system, BlinkMacSystemFont, "PingFang TC", "Microsoft JhengHei", sans-serif;
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ap-paper: #17110e;
    --ap-ink: #eee3d3;
    --ap-soft: #b8a592;
    --ap-line: #4c3a2d;
    --ap-wash: #261c16;
    --ap-bronze: #d0b083;
    --ap-solid: #d8c2a1;
    --ap-solid-ink: #241b14;
    --ap-error: #f0a08b;
    --ap-error-wash: #39211b;
    --ap-focus: #e4bf88;
    --ap-card: #493425;
  }
}

:root[data-theme="light"] { color-scheme: light; }

:root[data-theme="dark"] {
  color-scheme: dark;
  --ap-paper: #17110e;
  --ap-ink: #eee3d3;
  --ap-soft: #b8a592;
  --ap-line: #4c3a2d;
  --ap-wash: #261c16;
  --ap-bronze: #d0b083;
  --ap-solid: #d8c2a1;
  --ap-solid-ink: #241b14;
  --ap-error: #f0a08b;
  --ap-error-wash: #39211b;
  --ap-focus: #e4bf88;
  --ap-card: #493425;
}

* { box-sizing: border-box; }

html { background: var(--ap-paper); }

body {
  min-width: 280px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--ap-paper);
  color: var(--ap-ink);
  font-size: 14px;
  line-height: 1.65;
}

button, input, select, textarea { font: inherit; }

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

button, a { touch-action: manipulation; }

button { cursor: pointer; }

button:disabled { opacity: .5; cursor: default; }

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--ap-focus);
  outline-offset: 4px;
}

input:focus-visible, textarea:focus-visible { outline-offset: 2px; }

[hidden] { display: none !important; }

p, h1, h2, h3 { margin: 0; }

h1, h2, h3 { font-weight: 400; }

a { color: var(--ap-bronze); text-underline-offset: 4px; }

.ap-header {
  width: 100%;
  max-width: 450px;
  margin: 0 auto;
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: max(15px, env(safe-area-inset-top)) 24px 15px;
  border-bottom: 1px solid var(--ap-line);
}

.ap-wordmark {
  color: var(--ap-bronze);
  font-family: "Cormorant Unicase", "Iowan Old Style", Baskerville, Georgia, serif;
  font-size: 29px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .2em;
  white-space: nowrap;
}

.ap-languages { display: flex; align-items: center; gap: 1px; }

.ap-languages button {
  min-width: 44px;
  min-height: 48px;
  padding: 10px 8px;
  border: 0;
  background: transparent;
  color: var(--ap-soft);
  font-size: 12px;
}

.ap-languages button[data-language="ja"] { white-space: nowrap; }

.ap-languages button[aria-pressed="true"] {
  color: var(--ap-ink);
  text-decoration: underline;
  text-underline-offset: 6px;
}

#app {
  width: 100%;
  max-width: 450px;
  flex: 1;
  margin: 0 auto;
  padding: 36px 24px 32px;
}

.ap-form-body { width: 100%; min-width: 0; }

.ap-eyebrow {
  display: block;
  margin-bottom: 13px;
  color: var(--ap-bronze);
  font-size: 10px;
  line-height: 1.7;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.ap-title {
  color: var(--ap-ink);
  font-family: "Cormorant Unicase", "Iowan Old Style", Baskerville, Georgia, "Songti TC", serif;
  font-size: clamp(30px, 8.5vw, 36px);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -.02em;
  overflow-wrap: break-word;
}

.ap-description { margin-top: 13px; color: var(--ap-soft); font-size: 13px; line-height: 1.8; }

.ap-auth-options { display: grid; gap: 11px; margin-top: 28px; }

.ap-auth-button {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 12px 16px;
  border: 1px solid var(--ap-line);
  border-radius: 2px;
  background: transparent;
  color: var(--ap-ink);
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
  transition: background-color .15s ease;
}

.ap-auth-button::after { content: ""; width: 32px; }

.ap-line-button { border-color: #06c755; background: #06c755; color: #fff; }

.ap-google-button { border-color: #747775; background: #fff; color: #1f1f1f; }

.ap-provider { display: grid; place-items: center; width: 32px; height: 32px; min-width: 32px; line-height: 0; }

.ap-provider img, .ap-provider svg { display: block; flex-shrink: 0; object-fit: contain; }

.ap-provider img.ap-line-icon { width: 32px; height: 32px; }

.ap-provider img.ap-google-icon, .ap-provider svg { width: 24px; height: 24px; }

.ap-auth-label { min-width: 0; }

.ap-field { display: grid; gap: 8px; margin-top: 20px; color: var(--ap-soft); font-size: 12px; }

.ap-field input, .ap-field textarea, .ap-field select {
  width: 100%;
  min-width: 0;
  min-height: 54px;
  padding: 13px 14px;
  border: 1px solid var(--ap-line);
  border-radius: 2px;
  background: var(--ap-paper);
  color: var(--ap-ink);
  font-size: 16px;
  line-height: 1.5;
  appearance: none;
}

.ap-field input::placeholder, .ap-field textarea::placeholder { color: var(--ap-soft); opacity: .8; }

.ap-field input[aria-invalid="true"] { border-color: var(--ap-error); }

.ap-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  margin-top: 13px;
  padding: 13px 18px;
  border: 1px solid var(--ap-solid);
  border-radius: 2px;
  background: var(--ap-solid);
  color: var(--ap-solid-ink);
  font-size: 13px;
  line-height: 1.6;
}

.ap-submit > :last-child:not(:first-child) { margin-left: auto; }

.ap-text-button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 48px;
  max-width: 100%;
  padding: 10px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ap-bronze);
  font-size: 12px;
  line-height: 1.7;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.ap-support { margin-top: 16px; text-align: center; }

.ap-support > span, .ap-support > p { display: block; color: var(--ap-soft); font-size: 12px; }

.ap-back { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; margin: -10px 0 16px; padding: 10px 0; border: 0; background: transparent; color: var(--ap-soft); font-size: 12px; text-align: left; }

.ap-separator { display: flex; align-items: center; gap: 12px; margin: 23px 0 17px; color: var(--ap-soft); font-size: 11px; }

.ap-separator::before, .ap-separator::after { content: ""; flex: 1; height: 1px; background: var(--ap-line); }

.ap-address { margin: 20px 0 16px; padding: 15px; border-radius: 2px; background: var(--ap-wash); color: var(--ap-ink); font-size: 14px; overflow-wrap: anywhere; }

.ap-status { margin-top: 12px; color: var(--ap-bronze); font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }

.ap-status:empty, .ap-error:empty { display: none; }

.ap-error { margin-top: 17px; padding: 12px 14px; border-left: 2px solid var(--ap-error); background: var(--ap-error-wash); color: var(--ap-error); font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }

.ap-small-note, .ap-new-note { margin-top: 13px; color: var(--ap-soft); font-size: 12px; line-height: 1.8; }

.ap-new-note { margin-top: 19px; text-align: center; }

.ap-sent-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 18px; margin-top: 13px; }

.ap-icon-disc { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 21px; border: 1px solid var(--ap-line); border-radius: 50%; color: var(--ap-bronze); font-size: 22px; }

.ap-recovery-note { margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--ap-line); color: var(--ap-soft); font-size: 12px; line-height: 1.8; }

.ap-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  max-width: 450px;
  margin: 0 auto;
  padding: 18px 24px max(20px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--ap-line);
  color: var(--ap-soft);
  font-size: 8px;
  line-height: 1.7;
  letter-spacing: .09em;
  text-align: center;
}

.member-dashboard { min-width: 0; }

.member-dashboard > .ap-title { font-size: 31px; }

.member-card {
  position: relative;
  overflow: hidden;
  min-height: 145px;
  margin-top: 24px;
  padding: 22px;
  border: 1px solid #f1dfbd33;
  border-radius: 5px;
  background: var(--ap-card);
  color: var(--ap-card-ink);
  isolation: isolate;
}

.member-card::before, .member-card::after { content: ""; position: absolute; z-index: -1; width: 170px; height: 170px; top: -90px; right: -45px; border: 1px solid #f1dfbd33; border-radius: 50%; pointer-events: none; }

.member-card::after { width: 210px; height: 210px; top: -110px; right: -65px; border-color: #f1dfbd23; }

.member-card .ap-wordmark { color: inherit; font-size: 25px; }

.member-card .ap-title, .member-card .ap-text-button { color: inherit; }

.member-card .ap-eyebrow, .member-card .member-label { color: #f3e5d1; }

.member-card h2, .member-card h3 { font-family: "Cormorant Unicase", Georgia, serif; font-size: 25px; line-height: 1.2; }

.member-code { display: block; margin-top: 21px; font-size: 16px; line-height: 1.6; letter-spacing: .1em; overflow-wrap: anywhere; }

.member-card p, .member-card small { font-size: 11px; line-height: 1.7; }

.member-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 22px; padding: 17px 0; border-top: 1px solid var(--ap-line); border-bottom: 1px solid var(--ap-line); }

.member-summary > * { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 0 10px; text-align: center; }

.member-summary > :first-child { padding-left: 0; }

.member-summary > :last-child { padding-right: 0; }

.member-summary > * + * { border-left: 1px solid var(--ap-line); }

.member-summary .member-value { font-size: 17px; }

.member-summary .member-label { font-size: 10px; }

.member-panel { margin-top: 25px; }

.member-panel > h2, .member-panel > h3 { margin-bottom: 13px; font-size: 14px; line-height: 1.6; }

.member-panel > p { color: var(--ap-soft); font-size: 12px; line-height: 1.8; }

.member-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-width: 0; padding: 14px 0; border-bottom: 1px solid var(--ap-line); }

.member-row > div { min-width: 0; }

.member-row .ap-text-button { flex-shrink: 0; }

.member-label { display: block; color: var(--ap-soft); font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }

.member-value { display: block; color: var(--ap-ink); font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }

.member-row > .member-value { text-align: right; }

.member-progress { display: block; width: 100%; height: 4px; margin-top: 13px; overflow: hidden; border: 0; border-radius: 2px; background: var(--ap-line); accent-color: var(--ap-bronze); }

.member-progress > span { display: block; height: 100%; border-radius: inherit; background: var(--ap-bronze); }

progress.member-progress::-webkit-progress-bar { border-radius: 2px; background: var(--ap-line); }

progress.member-progress::-webkit-progress-value { border-radius: 2px; background: var(--ap-bronze); }

progress.member-progress::-moz-progress-bar { border-radius: 2px; background: var(--ap-bronze); }

.member-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin: 28px -5px 0; padding-top: 13px; border-top: 1px solid var(--ap-line); }

.member-nav button, .member-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 56px; min-width: 0; padding: 7px 3px; border: 0; border-radius: 2px; background: transparent; color: var(--ap-soft); font-size: 10px; line-height: 1.5; text-align: center; text-decoration: none; }

.member-nav button[aria-current="page"], .member-nav a[aria-current="page"], .member-nav button[aria-selected="true"], .member-nav .is-active { color: var(--ap-ink); background: var(--ap-wash); }

.member-nav svg { width: 18px; height: 18px; }

.funding-panel { min-width: 0; }
.funding-fields { min-width: 0; margin: 0; padding: 0; border: 0; }
.funding-panel h2 { margin: 24px 0 10px; font-size: 16px; font-weight: 500; }
.funding-instructions p, .funding-copy, .funding-notice { white-space: pre-wrap; overflow-wrap: anywhere; }
.funding-instructions p, .funding-copy { color: var(--ap-soft); font-size: 13px; line-height: 1.7; }
.funding-notice { padding: 12px 14px; border-left: 2px solid var(--ap-bronze); background: var(--ap-wash); font-size: 13px; line-height: 1.6; }
.funding-notice .ap-text-button { display: block; padding-left: 0; text-align: left; }
.funding-consent { display: flex; align-items: center; gap: 10px; margin: 18px 0; min-height: 44px; font-size: 13px; }
.funding-consent input { flex: 0 0 auto; width: 20px; height: 20px; accent-color: var(--ap-ink); }
.funding-status { display: inline-block; margin: 14px 0 0; padding: 5px 9px; border: 1px solid var(--ap-line); color: var(--ap-bronze); font-size: 12px; }
.funding-copy .member-label { display: block; margin-bottom: 4px; }
.funding-file-name { color: var(--ap-soft); overflow-wrap: anywhere; font-size: 13px; }
.funding-panel input[type="file"] { min-height: 54px; padding: 10px 8px; color: var(--ap-soft); font-size: 12px; }
.funding-panel input[type="file"]::file-selector-button { min-height: 32px; margin-right: 8px; padding: 4px 8px; border: 1px solid var(--ap-line); background: var(--ap-wash); color: var(--ap-ink); font: inherit; }
.funding-proofs ul { list-style: none; margin: 0 0 18px; padding: 0; }
.funding-proofs li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--ap-line); color: var(--ap-soft); font-size: 13px; }
.funding-list-heading { padding-top: 24px; border-top: 1px solid var(--ap-line); }
.funding-request-row { display: flex; justify-content: space-between; gap: 12px; width: 100%; min-height: 78px; padding: 14px 0; border: 0; border-bottom: 1px solid var(--ap-line); background: transparent; color: var(--ap-ink); text-align: left; }
.funding-request-row>span { min-width: 0; overflow-wrap: anywhere; }
.funding-request-row>span:last-child { flex: 0 0 auto; text-align: right; }
.funding-request-row strong { font-size: 13px; font-weight: 500; }
.funding-request-row small { display: block; margin-top: 5px; color: var(--ap-soft); font-size: 11px; }
.funding-panel .ap-submit { margin-top: 16px; }

.ap-entry-nav { display: flex; justify-content: flex-end; gap: 22px; width: 100%; max-width: 450px; margin: 0 auto; padding: 0 24px; border-bottom: 1px solid var(--ap-line); }
.ap-entry-nav button, .ap-entry-nav a { min-height: 48px; padding: 8px 0; border: 0; background: transparent; color: var(--ap-bronze); font-size: 12px; }
.booking-demo-note { margin-top: 8px; }
.booking-duration { margin-top: 7px; color: var(--ap-soft); font-size: 12px; }
.booking-summary { margin: 24px 0; border-top: 1px solid var(--ap-line); }
.booking-summary > div { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; padding: 11px 0; border-bottom: 1px solid var(--ap-line); }
.booking-summary dt { flex-shrink: 0; color: var(--ap-soft); font-size: 12px; }
.booking-summary dd { min-width: 0; margin: 0; color: var(--ap-ink); font-size: 13px; text-align: right; overflow-wrap: anywhere; }
.booking-signin-summary { margin-bottom: 20px; }
.booking-signin-summary .booking-summary { margin-bottom: 0; }
.booking-record { margin-top: 18px; padding: 17px 0; border-top: 1px solid var(--ap-line); }
.booking-record-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; margin-bottom: 9px; }
.booking-record-heading strong { font-size: 16px; font-weight: 400; }
.booking-record-heading span, .booking-record small { color: var(--ap-soft); font-size: 11px; }
.booking-record p { margin-top: 4px; font-size: 13px; overflow-wrap: anywhere; }
.booking-record small { display: block; margin-top: 9px; overflow-wrap: anywhere; }
.booking-reference { margin-top: 15px; color: var(--ap-bronze); font-size: 13px; letter-spacing: .03em; overflow-wrap: anywhere; }
.ap-field select { width: 100%; min-width: 0; padding-right: 24px; }

.member-binding-status { color: var(--ap-bronze); font-size: 11px; }

.member-empty { padding: 20px 0; color: var(--ap-soft); font-size: 12px; line-height: 1.8; }

.ap-skeleton, .skeleton { display: block; min-height: 16px; margin-top: 12px; border-radius: 2px; background: var(--ap-wash); animation: ap-breathe 1.4s ease-in-out infinite alternate; }

.ap-skeleton.is-title, .skeleton.is-title { width: 65%; min-height: 31px; }

.ap-skeleton.is-card, .skeleton.is-card { min-height: 145px; }

[aria-busy="true"] .ap-submit, [aria-busy="true"] .ap-auth-button { cursor: progress; }

.ap-busy, .is-busy { cursor: progress; }

.ap-spinner { display: inline-block; flex-shrink: 0; width: 15px; height: 15px; border: 1.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: ap-spin .8s linear infinite; }

.sr-only, .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }

@media (hover: hover) {
  .ap-auth-button:not(.ap-line-button):not(.ap-google-button):not(:disabled):hover, .member-nav button:not(:disabled):hover, .member-nav a:hover { background: var(--ap-wash); }
  .ap-line-button:not(:disabled):hover { background: #05b34c; }
  .ap-google-button:not(:disabled):hover { background: #f2f2f2; }
  .ap-submit:not(:disabled):hover { filter: brightness(1.08); }
  .ap-text-button:not(:disabled):hover, .ap-back:not(:disabled):hover { color: var(--ap-ink); }
}

@media (max-width: 359px) {
  .ap-header { padding-inline: 19px; gap: 10px; }
  .ap-wordmark { font-size: 26px; }
  #app { padding: 30px 20px 27px; }
  .ap-auth-button { padding-inline: 12px; gap: 8px; }
  .ap-footer { padding-inline: 20px; }
  .member-card { padding: 19px; }
  .member-row { gap: 10px; }
  .member-summary .member-value { font-size: 15px; }
}

@media (min-width: 700px) {
  .ap-header { padding-top: 24px; padding-bottom: 19px; }
  #app { padding-top: 45px; padding-bottom: 45px; }
  .ap-footer { padding-bottom: 25px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@keyframes ap-spin { to { transform: rotate(360deg); } }

@keyframes ap-breathe { from { opacity: .45; } to { opacity: .85; } }

.history-record { padding: 18px 0; border-bottom: 1px solid var(--ap-line); }
.history-record p { margin-top: 5px; font-size: 13px; overflow-wrap: anywhere; }

.ap-entry-nav a { display: inline-flex; align-items: center; text-decoration: none; }
a.ap-submit { text-decoration: none; }

.member-overview .ap-title { margin-bottom: 2px; }
.member-overview-code { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; }
.member-overview-code .member-code { margin: 0; font-size: 13px; }
.member-home-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 20px; }

.member-content { min-width: 0; }
[data-appointments-summary] { margin-top: 24px; padding-block: 20px; border-top: 1px solid var(--ap-line); border-bottom: 1px solid var(--ap-line); font-size: 13px; }
[data-appointments-summary] p + p { margin-top: 5px; }
[data-appointments-summary] .member-empty { margin: 0; }

@media (min-width: 800px) {
  body.member-session .ap-header, body.member-session .ap-entry-nav, #app[data-member-layout="true"] { max-width: 1040px; }
  #app[data-member-layout="true"] { padding-top: 32px; }
  .member-dashboard { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 48px; }
  .member-content { grid-column: 2; grid-row: 1; }
  .member-dashboard .member-nav { position: sticky; top: 24px; grid-column: 1; grid-row: 1; align-self: start; display: flex; flex-direction: column; margin: 0; padding: 0 20px 0 0; border-top: 0; border-right: 1px solid var(--ap-line); gap: 4px; }
  .member-dashboard .member-nav button { align-items: flex-start; min-height: 48px; padding: 10px 14px; font-size: 12px; text-align: left; }
  .member-content > .member-panel:first-child { margin-top: 0; }
  .member-overview-code { justify-content: flex-start; gap: 24px; }
  .member-content > .ap-submit { max-width: 300px; }
}
