html {
  min-height: 100%;
  font-size: 16px;
  letter-spacing: 0;
}

body {
  min-height: 100vh;
  margin: 0;
  background: #eef1ed;
  color: #111111;
  font-family: "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
}

a {
  color: #0b47bd;
}

.site-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 48px;
  align-items: center;
  min-height: 56px;
  padding: 0 16px;
  background: #fbf0e2;
  color: #222222;
}

.site-title {
  min-width: 0;
  overflow: hidden;
  color: #333333;
  font-size: 1.18rem;
  font-weight: 400;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-title:hover {
  color: #333333;
}

.icon-button,
.top-dropdown-button {
  border: 0;
  background: transparent;
  color: #222222;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.icon-button:hover,
.top-dropdown-button:hover {
  background: rgba(0, 0, 0, 0.06);
}

.icon-button:focus,
.top-dropdown-button:focus,
.password-toggle:focus,
.primary-action:focus,
.related-links a:focus {
  box-shadow: 0 0 0 0.2rem rgba(92, 190, 139, 0.35);
  outline: none;
}

.menu-button:focus {
  box-shadow: none;
}

.menu-button {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  justify-self: start;
}

.menu-button span {
  display: block;
  width: 19px;
  height: 2px;
  background: currentColor;
}

.search-button {
  justify-self: end;
}

.search-button svg,
.top-dropdown-button svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.top-dropdown {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  height: 56px;
}

.top-dropdown-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 48px;
  padding: 0 10px 0 14px;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 800;
}

.top-dropdown-button::after {
  position: absolute;
  right: 14px;
  bottom: 0;
  left: 14px;
  height: 8px;
  background: #59bd88;
  content: "";
}

.top-dropdown-menu {
  position: absolute;
  top: 54px;
  right: 0;
  display: none;
  min-width: 300px;
  padding: 18px 0;
  background: #514852;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
}

.top-dropdown.is-open .top-dropdown-menu,
.top-dropdown:hover .top-dropdown-menu {
  display: grid;
}

.top-dropdown-menu a {
  overflow: hidden;
  padding: 12px 28px;
  color: #ffffff !important;
  font-size: 1.08rem;
  font-weight: 900;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff !important;
}

.top-dropdown-menu a:visited,
.top-dropdown-menu a:focus,
.site-drawer a:visited,
.site-drawer a:focus {
  color: #ffffff !important;
}

.site-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  background: rgba(0, 0, 0, 0.58);
}

.site-drawer-backdrop.is-open {
  display: block;
}

.site-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 90;
  width: min(300px, 86vw);
  padding: 16px 0 32px;
  background: #514852;
  box-shadow: 8px 0 20px rgba(0, 0, 0, 0.22);
  transform: translateX(-105%);
  transition: transform 0.18s ease;
}

.site-drawer.is-open {
  transform: translateX(0);
}

.drawer-close {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-left: 12px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #ffffff;
}

.drawer-close svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

.drawer-close:hover {
  background: rgba(255, 255, 255, 0.08);
}

.drawer-nav {
  display: grid;
  padding-top: 28px;
}

.drawer-nav a {
  display: block;
  color: #ffffff !important;
  font-weight: 800;
  line-height: 1.35;
  text-decoration: none;
}

.drawer-home {
  position: relative;
  padding: 0 24px 18px 44px;
  font-size: 1.05rem;
}

.drawer-home::before {
  position: absolute;
  top: 7px;
  left: 28px;
  width: 8px;
  height: 8px;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  content: "";
  transform: rotate(45deg);
}

.drawer-home.is-active span {
  display: inline-block;
  border-bottom: 6px solid #59bd88;
  line-height: 1.25;
}

.drawer-child {
  padding: 14px 22px 14px 58px;
  font-size: 0.98rem;
  word-break: keep-all;
  overflow-wrap: normal;
}

.drawer-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff !important;
}

.site-search-panel {
  display: none;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px clamp(18px, 7vw, 80px);
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.site-search-panel.is-open {
  display: grid;
}

.site-search-panel input {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(0, 0, 0, 0.22);
  border-radius: 3px;
}

.site-search-panel button,
.related-links a {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 4px;
  background: #59bd88;
  color: #162319;
  font-weight: 500;
  text-decoration: none;
}

.site-search-panel button {
  min-width: 72px;
}

.site-hero-image {
  overflow: visible;
  background: #fbf0e2;
}

.site-hero-image img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center top;
}

.site-main {
  background: #eef1ed;
}

.site-content {
  width: min(100% - 48px, 1120px);
  margin: 0 auto;
}

.section-title-band {
  background: #59bd88;
}

.section-title-band h1,
.guide-title-band h2 {
  margin: 0;
  padding: 34px 0;
  color: #111111;
  font-size: 2rem;
  font-weight: 800;
}

.activity-copy,
.login-area {
  padding: 54px 0 64px;
}

.login-status {
  margin-bottom: 28px;
  color: #365443;
  font-weight: 700;
}

.rule-line {
  margin: 0 0 30px;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.55;
}

.rule-block {
  margin-top: 26px;
}

.rule-block h2 {
  margin: 0 0 6px;
  color: #d71421;
  font-size: 1.28rem;
  font-weight: 900;
}

.rule-block p,
.binding-steps,
.invoice-note {
  max-width: 1040px;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.55;
}

.rule-block span {
  color: #b00015;
}

.guide-section {
  padding: 44px 0 64px;
}

.binding-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 28px;
  list-style-type: square;
}

.binding-steps span {
  color: #e01822;
  font-weight: 900;
}

.invoice-note {
  margin-top: 24px;
}

.guide-phone-flow {
  width: min(100%, 760px);
  margin: 48px auto 0;
}

.guide-phone-flow img {
  display: block;
  width: 100%;
  height: auto;
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 46px;
}

.related-links a {
  display: inline-flex;
  align-items: center;
  max-width: 280px;
}

.guide-related-links {
  justify-content: center;
  gap: 54px;
  margin-top: 42px;
}

.guide-related-links a {
  max-width: none;
}

.login-area {
  display: flex;
  justify-content: center;
}

.login-panel {
  width: min(100%, 480px);
  padding: 28px;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}

.panel-heading {
  display: grid;
  gap: 4px;
  margin-bottom: 24px;
}

.panel-heading span {
  font-size: 1.45rem;
  font-weight: 900;
}

.panel-heading small,
.demo-hint {
  color: #606a62;
}

.form-field {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.form-field label {
  color: #26342b;
  font-weight: 800;
}

.form-control {
  min-height: 48px;
  border-color: rgba(23, 32, 26, 0.22);
  border-radius: 4px;
}

.password-field {
  position: relative;
}

.password-field .form-control {
  padding-right: 54px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #334139;
  transform: translateY(-50%);
}

.password-toggle:hover {
  background: rgba(23, 32, 26, 0.06);
}

.eye-icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.eye-icon.is-hidden {
  display: none;
}

.text-danger {
  color: #b42318 !important;
  font-size: 0.94rem;
}

.validation-summary ul {
  margin-bottom: 18px;
  padding-left: 20px;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 4px;
  background: #59bd88;
  color: #162319;
  font-weight: 900;
}

.primary-action:hover,
.related-links a:hover,
.site-search-panel button:hover {
  background: #49ad78;
  color: #162319;
}

.demo-hint {
  margin-top: 16px;
  padding: 12px;
  border-radius: 4px;
  background: #f0f4ef;
  font-weight: 700;
}

.site-footer {
  padding: 32px 0 48px;
  background: #59bd88;
  color: #1b3326;
}

.footer-lines {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.28;
}

@media (max-width: 900px) {
  .site-topbar {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    padding: 0 12px;
  }

  .menu-button {
    display: inline-flex;
  }

  .top-dropdown {
    display: none;
  }

  .site-title {
    font-size: 0.98rem;
  }

  .site-content {
    width: min(100% - 32px, 1120px);
  }

  .section-title-band h1,
  .guide-title-band h2 {
    padding: 32px 0;
    font-size: 1.7rem;
  }

  .activity-copy,
  .login-area {
    padding: 38px 0 48px;
  }

  .rule-line,
  .rule-block p,
  .binding-steps,
  .invoice-note {
    font-size: 1.08rem;
  }

  .related-links {
    gap: 14px;
  }

  .guide-section {
    padding: 36px 0 52px;
  }

  .guide-phone-flow {
    margin-top: 36px;
  }

  .guide-related-links {
    justify-content: flex-start;
  }
}

@media (max-width: 430px) {
  .site-topbar {
    grid-template-columns: 44px minmax(0, 1fr) 40px;
    padding: 0 8px;
  }

  .site-title {
    font-size: 0.9rem;
  }

  .search-button {
    width: 36px;
  }

  .guide-related-links a {
    width: 100%;
    justify-content: center;
  }
}
