:root {
  --tcb-brand: #008e6a;
  --tcb-brand-2: #21bc95;
  --tcb-link: #0c75ee;
  --tcb-text: #424242;
  --tcb-text-tertiary: #666666;
  --tcb-placeholder: #a8a8a8;
  --tcb-line: #ececec;
  --tcb-bg-top: #f6ffef;
  --tcb-bg-bottom: #ffffff;
  --tcb-radius-sm: 8px;
  --tcb-radius-ml: 16px;
  --tcb-radius-pill: 999px;
  --tcb-shadow-card: 0 4px 20px rgba(0, 0, 0, 0.25);
  --tcb-shadow-footer-mobile: 0 -4px 10px rgba(0, 0, 0, 0.1);
  --tcb-shadow-footer-desktop: 0 4px 20px rgba(0, 0, 0, 0.25);
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  color: var(--tcb-text);
  font-family:
    "Noto Sans TC",
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    "PingFang TC",
    "Microsoft JhengHei",
    sans-serif;
  background: linear-gradient(
    180deg,
    var(--tcb-bg-top) 15.042%,
    var(--tcb-bg-bottom) 26.815%
  );
}

.tcb-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.tcb-header {
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tcb-header__pill {
  width: 100%;
  max-width: 1376px;
  height: 64px;
  margin: 0 16px;
  border-radius: 50px;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  padding: 0 48px;
}

.tcb-logo {
  display: block;
  width: 200px;
  height: 28px;
}

/* ── 快捷選單浮動按鈕 ── */
.tcb-qm-wrapper {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000;
  height: 100px;
}

/* 觸發按鈕：絕對定位，未展開時靠右；展開時向左 slide */
.tcb-fast-menu {
  position: absolute;
  right: 0;
  top: 0;
  width: 45px;
  border: 0;
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
  background: linear-gradient(
    180deg,
    rgba(0, 194, 145, 0.6) 0%,
    rgba(0, 142, 106, 0.6) 100%
  );
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  padding: 10px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: right 0.3s ease;
  outline: none;
}

/* 展開時按鈕向左滑 */
.tcb-qm-wrapper.open .tcb-fast-menu {
  right: 96px;
}

.tcb-fast-menu__text {
  font-size: 16px;
  line-height: 1.2;
  text-align: center;
}

/* 面板：絕對定位在右邊，展開時寬度由 0 → 96px */
.tcb-qm-panel {
  position: absolute;
  right: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  background: #fff;
  border-radius: 0 8px 8px 8px;
  border: 1px solid #ccc;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  width: 0;
  opacity: 0;
  pointer-events: none;
  transition:
    width 0.3s ease,
    opacity 0.2s ease;
}

.tcb-qm-panel.open {
  width: 96px;
  opacity: 1;
  pointer-events: auto;
}

/* 各選項 */
.tcb-qm-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--tcb-text);
  text-decoration: none;
  font-weight: 400;
  white-space: nowrap;
  border-radius: 4px;
  transition: background 0.15s;
  outline: none;
}

/* .tcb-qm-item:hover {
  background: #f0faf7;
} */

.tcb-qm-item img {
  width: 40px;
  height: 40px;
  display: block;
  flex-shrink: 0;
}

/* ── 背景裝飾層 ── */
.tcb-decoration {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.tcb-decoration__blob-yellow {
  position: absolute;
  top: 160px;
  right: calc(50% - 470px);
  width: 220px;
  height: 220px;
  opacity: 0.85;
}

.tcb-decoration__curve-right {
  position: absolute;
  right: calc(50% - 500px);
  top: 180px;
  width: 280px;
  height: auto;
  opacity: 0.7;
}

.tcb-decoration__curve-left {
  position: absolute;
  left: -60px;
  top: 380px;
  width: 180px;
  height: auto;
  opacity: 0.5;
}

.tcb-decoration__wave-line {
  position: absolute;
  left: 0;
  top: 650px;
  width: 100%;
  height: auto;
  opacity: 0.4;
}

.tcb-main {
  width: 100%;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px 64px;
  position: relative;
  z-index: 1;
}

.tcb-title {
  margin: 0 0 24px;
  font-weight: 700;
  color: var(--tcb-brand);
  text-align: center;
  font-size: 24px;
}

.tcb-card {
  width: 100%;
  max-width: 760px;
  background: #fff;
  border-radius: var(--tcb-radius-sm);
  box-shadow: var(--tcb-shadow-card);
  padding: 24px;
}

.tcb-alert {
  background: #fff3f3;
  border: 1px solid #ffd1d1;
  color: #b00020;
  border-radius: 8px;
  padding: 12px 14px;
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.4;
}

.tcb-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.tcb-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tcb-label {
  font-size: 18px;
  color: var(--tcb-text-tertiary);
}

.tcb-field__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tcb-input {
  position: relative;
  display: flex;
  align-items: center;
}

.tcb-input input {
  width: 100%;
  border: 2px solid var(--tcb-line);
  border-radius: var(--tcb-radius-sm);
  padding: 10px 44px 10px 12px;
  font-size: 16px;
  outline: none;
  background: #fff;
}

.tcb-input input::placeholder {
  color: var(--tcb-placeholder);
}
.tcb-input input:focus {
  border-color: rgba(0, 142, 106, 0.6);
  box-shadow: 0 0 0 3px rgba(0, 142, 106, 0.12);
}

.tcb-icon-btn {
  border: 0;
  background: transparent;
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}

.tcb-icon-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.tcb-icon-btn img {
  width: 24px;
  height: 24px;
  display: block;
}

.tcb-input .tcb-icon-btn {
  position: absolute;
  right: 6px;
}

.tcb-link {
  color: var(--tcb-link);
  text-decoration: underline;
  font-size: 18px;
  white-space: nowrap;
}

.tcb-captcha-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: end;
}

.tcb-captcha {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tcb-captcha__img {
  width: 148px;
  height: 55px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--tcb-line);
  background: #fff;
}

.tcb-captcha__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tcb-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tcb-btn {
  width: 136px;
  height: 45px;
  border: 0;
  border-radius: var(--tcb-radius-pill);
  color: #fff;
  font-size: 16px;
  background: linear-gradient(
    180deg,
    var(--tcb-brand) 15.385%,
    var(--tcb-brand-2) 100%
  );
  cursor: pointer;
  position: relative;
}

.tcb-btn::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 3px;
  top: 4px;
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.2) 0%,
    rgba(255, 255, 255, 0) 100%
  );
  pointer-events: none;
}

.tcb-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.tcb-register {
  font-size: 14px;
  color: var(--tcb-text-tertiary);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  flex-wrap: wrap;
}

.tcb-register .tcb-link {
  font-size: 14px;
}

.tcb-divider {
  height: 1px;
  background: var(--tcb-line);
}

.tcb-faq {
  color: var(--tcb-brand);
  text-decoration: none;
  font-size: 16px;
}

.tcb-faq:hover {
  text-decoration: underline;
}

.tcb-footer {
  background: #fff;
  border-top-left-radius: 40px;
  border-top-right-radius: 40px;
  box-shadow: var(--tcb-shadow-footer-desktop);
  padding: 48px 32px 24px;
  z-index: 100;
}

.tcb-footer__inner {
  max-width: 1376px;
  margin: 0 auto;
}

.tcb-footer__logo {
  width: 200px;
  height: 28px;
  display: block;
  margin-bottom: 16px;
}

.tcb-footer__divider {
  height: 1px;
  background: #eff0f6;
  margin: 12px 0;
}

.tcb-footer__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  color: #6f6c90;
}

.tcb-footer__left {
  flex: 1 1 auto;
  font-size: 14px;
  line-height: 1.8;
}

.tcb-footer__right {
  flex: 0 0 auto;
  font-size: 16px;
  line-height: 1.8;
}

.tcb-footer__kv {
  display: grid;
  grid-template-columns: 96px auto;
  gap: 0 16px;
}

@media (max-width: 768px) {
  .tcb-header__pill {
    margin: 0;
    max-width: 375px;
    padding: 0 16px;
    background: none;
    justify-content: center;
  }
  .tcb-main {
    padding: 32px 16px 64px;
  }
  .tcb-title {
    font-size: 24px;
  }
  .tcb-card {
    max-width: 375px;
  }
  .tcb-captcha-grid {
    grid-template-columns: 1fr;
  }
  .tcb-footer {
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    box-shadow: var(--tcb-shadow-footer-mobile);
    padding: 24px 0;
  }
  .tcb-footer__inner {
    padding: 0 16px;
  }
  .tcb-footer__row {
    flex-direction: column;
    gap: 12px;
    color: var(--tcb-text);
  }
  .tcb-footer__left,
  .tcb-footer__right {
    font-size: 16px;
    line-height: 1.6;
  }
  .tcb-footer__divider {
    background: var(--tcb-line);
  }

  /* 裝飾圖手機版：黄色圓形及右側曲線隱藏 */
  .tcb-decoration__blob-yellow,
  .tcb-decoration__curve-right {
    display: none;
  }
  .tcb-decoration__curve-left {
    left: -50px;
    top: 320px;
    width: 130px;
  }
  .tcb-decoration__wave-line {
    top: 520px;
  }
  .tcb-fast-menu {
    width: 44px;
    padding: 10px 12px;
  }
  .tcb-fast-menu__text {
    font-size: 14px;
  }
  .tcb-qm-wrapper.open .tcb-fast-menu {
    right: 64px;
  }
  .tcb-qm-panel.open {
    width: 64px;
  }
  .tcb-qm-item {
    padding: 0;
    font-size: 12px;
  }
  .tcb-qm-item img {
    width: 40px;
    height: 40px;
  }
}

@media (min-width: 769px) {
  .tcb-title {
    font-size: 32px;
  }
  .tcb-captcha-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.tcb-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.tcb-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.tcb-modal__panel {
  position: relative;
  max-width: 560px;
  margin: 10vh auto;
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  outline: none;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.tcb-modal__title {
  margin: 0 0 12px 0;
  font-size: 20px;
}

.tcb-modal__body p {
  margin: 0 0 10px 0;
  line-height: 1.6;
}
.tcb-modal__actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

/* 次要按鈕 class 若你 CSS 已經有就不用 */
.tcb-btn--secondary {
  opacity: 0.9;
}

@media (max-width: 600px) {
  .tcb-modal__panel {
    margin: 8vh 16px;
  }
  .tcb-modal__actions {
    flex-direction: column;
  }
}
