/* The title font, cut down to the headings' characters. */
@font-face {
  font-family: "LXGW WenKai TC"; font-weight: 700; font-display: swap;
  src: url("/fonts/lxgw-wenkai-tc-700.woff2") format("woff2");
}
html { color-scheme: light; }
body {
  margin: 0;
  background: #e9dbc1;
  color: #3a2c20;
  font-family: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
}
a { color: #7a3f1d; }
a:hover { color: #552a12; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid #7a3f1d; outline-offset: 2px; }

/* The photo and its watercolour cover the screen behind everything; the page scrolls over it on short screens. */
.scene { position: fixed; inset: 0; overflow: hidden; }
.art { position: absolute; inset: 0; width: 100%; height: 100%; will-change: transform; }
#sky { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.top {
  position: absolute; top: 12px; left: 16px; right: 16px; z-index: 1;
  display: flex; align-items: center; justify-content: space-between;
}
.pill { background: rgba(251, 245, 232, 0.92); border-radius: 22px; }
/* The baobutler.com wordmark on its night-market navy, linking home. */
.brand {
  height: 40px; padding: 0 14px 0 8px; border-radius: 22px; background: rgba(18, 23, 49, 0.92); color: #fff5e4;
  display: flex; align-items: center; gap: 8px; text-decoration: none; font-size: 15px; font-weight: 900;
}
.brand:hover { color: #fff5e4; background: #1b2246; }
.brand .latin { font-family: system-ui, sans-serif; font-weight: 400; color: #ffd45c; }
.bao { width: 32px; height: 29px; }
/* The split pill, as on the map and baobutler.com: the person's letter (My profile, Sign out), then the gear with this
   site's own settings, the language. One menu open at a time, above the card. */
.split { position: relative; height: 44px; display: flex; align-items: center; }
.me, .gear {
  height: 44px; padding: 0; border: 0; background: transparent; color: #6b5843; cursor: pointer;
  display: grid; place-items: center;
}
.me { width: 50px; padding-left: 4px; border-radius: 22px 0 0 22px; }
.gear { width: 44px; border-radius: 22px; }
.me:not([hidden]) + .gear { border-left: 1px solid #e3d6c1; border-radius: 0 22px 22px 0; }
.gear svg { width: 22px; height: 22px; }
.me:focus-visible, .gear:focus-visible { outline-offset: -3px; }
.me, .gear, .menu-item { -webkit-tap-highlight-color: transparent; }
.letter {
  width: 32px; height: 32px; border-radius: 50%; background: #7a3f1d; color: #fff8ec;
  display: grid; place-items: center; font-size: 15px; font-weight: 900;
}
.pill-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px; max-width: calc(100vw - 32px);
  padding: 12px; box-sizing: border-box; display: grid; background: #fbf5e8; border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}
.me-name { margin: 0 0 6px; font-size: 14px; font-weight: 700; color: #3a2c20; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-item {
  min-height: 44px; padding: 0; border: 0; border-top: 1px solid #e3d6c1; background: none; cursor: pointer;
  display: flex; align-items: center; font: inherit; font-size: 14px; color: #7a3f1d; text-decoration: none; text-align: left;
}
.menu-label { margin: 0 0 6px; font-size: 13px; color: #6b5843; }
.pill-menu .lang { justify-self: start; background: rgba(122, 63, 29, 0.08); border-radius: 22px; }
/* Both languages always shown; the one in use is filled in. */
.lang { height: 44px; padding: 4px; box-sizing: border-box; display: flex; gap: 2px; }
.lang button {
  min-width: 44px; padding: 0 12px; border: 0; border-radius: 18px;
  background: transparent; color: #6b5843; font-size: 14px; font-weight: 700;
}
.lang button[aria-pressed="true"] { background: #7a3f1d; color: #fff8ec; }

/* Room above the card for the magpie, the same below so the card sits in the middle. */
.main {
  position: relative; box-sizing: border-box; min-height: 100vh; min-height: 100dvh;
  padding: 112px 16px; display: flex; align-items: center; justify-content: center;
}
.card {
  position: relative; box-sizing: border-box; width: 100%; max-width: 420px;
  padding: 22px 22px 18px;
  background: rgba(251, 245, 232, 0.97); border: 1px solid #d9c7a8; border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}
.magpie { position: absolute; right: 22px; top: -96px; width: 160px; height: 130px; pointer-events: none; }
h1 {
  margin: 0; font-family: "LXGW WenKai TC", "Kaiti TC", "BiauKai", "DFKai-SB", serif;
  font-weight: 700; font-size: 32px; line-height: 1.15; letter-spacing: 0.06em; text-wrap: balance;
}
.card p { text-wrap: pretty; }
/* English reads better smaller and without the spacing that suits 來喝杯茶. */
:lang(en) h1 { font-size: min(24px, 6vw); line-height: 1.25; letter-spacing: 0.01em; }
.lead { margin: 6px 0 0; font-size: 14px; line-height: 1.55; color: #6b5843; }
.lead:empty { display: none; }
.error { margin: 12px 0 0; font-size: 13.5px; line-height: 1.55; color: #8a2d14; }
.google {
  margin-top: 16px; width: 100%; height: 56px; border-radius: 28px;
  border: 1px solid #747775; background: #fff; color: #1f1f1f;
  display: flex; align-items: center; justify-content: center; gap: 14px;
}
.google:hover { background: #f6f6f6; }
.google:disabled { opacity: 0.6; cursor: progress; }
.google-text { font-size: 16px; font-weight: 700; }
/* LINE and Facebook are shown but greyed out until they are set up. */
.providers { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.providers .google { margin-top: 0; }
.provider {
  width: 100%; height: 52px; padding: 0 16px; border-radius: 26px;
  border: 1px solid #c9bba4; background: rgba(255, 255, 255, 0.55); color: #3a2c20;
  display: flex; align-items: center; justify-content: center; gap: 14px;
}
.provider:disabled { cursor: not-allowed; }
.provider:disabled svg, .provider:disabled .provider-text { filter: grayscale(1); opacity: 0.55; }
.provider-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; font-size: 15px; font-weight: 700; white-space: nowrap; }
.soon { font-size: 11.5px; font-weight: 400; }
.shares { margin: 14px 0 0; font-size: 12.5px; line-height: 1.6; color: #6b5843; }
.shares:empty { display: none; }
.agree { margin: 6px 0 0; font-size: 12.5px; line-height: 1.6; color: #6b5843; }
/* The handle step: one field, then Continue. 16px text so phones don't zoom in. */
.handle { margin-top: 16px; display: flex; flex-direction: column; }
.handle label { font-size: 14px; font-weight: 700; }
.handle-field {
  margin-top: 6px; height: 52px; padding: 0 14px; box-sizing: border-box;
  display: flex; align-items: center; gap: 4px;
  border: 1px solid #c9bba4; border-radius: 12px; background: #fff;
}
.handle-field:focus-within { outline: 3px solid #7a3f1d; outline-offset: 2px; }
.handle-field span { color: #8a7660; font-size: 16px; }
.handle-field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font: inherit; font-size: 16px; color: #3a2c20; }
.hint { margin: 6px 0 0; font-size: 12.5px; line-height: 1.5; color: #6b5843; }
.continue {
  margin-top: 14px; height: 52px; border: 0; border-radius: 26px;
  background: #7a3f1d; color: #fff8ec; font-size: 16px; font-weight: 700;
}
.continue:hover { background: #552a12; }
.continue:disabled { opacity: 0.6; cursor: progress; }
/* Deleting an account: what goes, the phrase to type, then a red button that works only once it matches. */
.what { margin: 0 0 14px; font-size: 14px; line-height: 1.6; color: #3a2c20; }
.danger { background: #a3291a; }
.danger:not(:disabled):hover { background: #7d1d11; }
.danger:disabled { opacity: 0.45; cursor: not-allowed; }
.danger[aria-busy="true"] { cursor: progress; }
/* The heading takes focus when the step changes (sign-in.js); it is not a control, so no ring. */
#heading:focus { outline: none; }
.link { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.cancel { margin-top: 12px; align-self: center; font-size: 14px; color: #6b5843; }
/* My profile: what the account holds, the way back, and Delete account last and quiet. */
.profile { margin-top: 14px; display: flex; flex-direction: column; }
.details { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 8px 14px; font-size: 14px; line-height: 1.5; }
.details dt { color: #6b5843; }
.details dd { margin: 0; color: #3a2c20; overflow-wrap: anywhere; }
.delete-link { margin-top: 18px; min-height: 44px; display: flex; align-items: center; justify-content: center; border-top: 1px solid #e3d6c1; align-self: stretch; font-size: 13px; color: #8a2d14; }
/* Signing out, when a product asks: a short card with no art, and the language as two links. The title font holds only
   the sign-in headings' characters, so these headings use the body font. */
.logout-page h1 { font-family: inherit; letter-spacing: 0.02em; }
.logout { margin-top: 16px; display: flex; flex-direction: column; }
.logout .cancel { margin-top: 4px; min-height: 44px; padding: 0 16px; display: flex; align-items: center; }
.lang a {
  min-width: 44px; padding: 0 12px; box-sizing: border-box; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  color: #6b5843; font-size: 14px; font-weight: 700; text-decoration: none;
}
.lang a[aria-current="true"] { background: #7a3f1d; color: #fff8ec; }
[hidden] { display: none !important; }

@media (min-width: 600px) and (min-height: 560px) {
  .top { top: 24px; left: 28px; right: 28px; }
  .brand { height: 44px; padding: 0 16px 0 10px; font-size: 17px; }
  .bao { width: 36px; height: 33px; }
  .main { padding: 136px 28px; }
  .card { padding: 32px 32px 26px; border-radius: 16px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38); }
  .magpie { right: 26px; top: -120px; width: 200px; height: 163px; }
  h1 { font-size: 44px; line-height: 1.1; }
  :lang(en) h1 { font-size: 28px; }
  .lead { margin-top: 10px; font-size: 15.5px; line-height: 1.6; }
  .providers { margin-top: 24px; }
  .google { height: 58px; border-radius: 29px; }
  .provider { height: 54px; border-radius: 27px; }
  .shares { margin-top: 18px; font-size: 13px; line-height: 1.65; }
  .agree { margin-top: 8px; font-size: 13px; line-height: 1.65; }
  .handle { margin-top: 24px; }
}
