:root {
  color-scheme: light;
  font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  color: #183c39;
  background: #edf2ef;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(90deg, #dce8e2 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(#dce8e2 1px, transparent 1px) 0 0 / 48px 48px,
    #edf2ef;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(320px, 560px) minmax(340px, 430px);
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  gap: 70px;
  padding: 48px;
}

.login-brand img { width: min(100%, 520px); }
.login-brand p { margin: 22px 0 0 18px; color: #58716e; font-size: 18px; }

.login-card {
  border: 1px solid #cbd9d4;
  border-radius: 8px;
  padding: 34px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(31, 67, 62, .12);
}

.login-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.login-mark { color: #b77a16; font-size: 22px; }
.login-heading h1 { margin: 0; font-size: 24px; letter-spacing: 0; }
.login-heading p { margin: 5px 0 0; color: #71817f; }

form { display: grid; gap: 16px; }
label { display: grid; gap: 7px; color: #385653; font-size: 14px; font-weight: 700; }
input {
  width: 100%;
  min-height: 43px;
  border: 1px solid #b9c9c5;
  border-radius: 5px;
  padding: 8px 11px;
  color: #173d39;
  background: #fff;
  font: inherit;
}
input:focus { outline: 3px solid rgba(39, 112, 104, .16); border-color: #277068; }

button {
  min-height: 44px;
  border: 1px solid #175b54;
  border-radius: 5px;
  padding: 8px 16px;
  color: #fff;
  background: #175b54;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
button:disabled { cursor: not-allowed; opacity: .55; }
.secondary-button { color: #175b54; background: #fff; }
.password-rule { margin: -5px 0 0; color: #71817f; font-size: 13px; }
.passkey-button { color: #175b54; border-color: #8eb7ae; background: #eef7f4; }
.login-divider { display: flex; align-items: center; gap: 10px; color: #81918e; font-size: 12px; }
.login-divider::before,
.login-divider::after { content: ""; height: 1px; flex: 1; background: #d6e0dc; }

.puzzle-panel { border: 1px solid #d6e0dc; border-radius: 6px; padding: 12px; background: #f7faf8; }
.puzzle-image { position: relative; width: 280px; max-width: 100%; height: 140px; overflow: hidden; border-radius: 4px; background-position: center; background-size: cover; }
.puzzle-piece { position: absolute; left: 0; width: 38px; height: 38px; border: 2px solid #174f4b; border-radius: 5px; background: rgba(23, 79, 75, .78); box-shadow: 0 2px 7px rgba(0, 0, 0, .24); }
.puzzle-control { margin-top: 10px; }
.puzzle-control input { min-height: 30px; padding: 0; accent-color: #277068; }
.text-button { justify-self: end; min-height: 30px; border: 0; padding: 2px 0; color: #277068; background: transparent; font-size: 13px; }
.login-message { min-height: 22px; color: #a12b2b; font-size: 14px; }

@media (max-width: 850px) {
  .login-shell { grid-template-columns: minmax(0, 430px); gap: 28px; padding: 28px 18px; }
  .login-brand { text-align: center; }
  .login-brand p { margin-left: 0; }
  .login-card { padding: 25px; }
}
