/* login.php — the login form drawn as a Pokémon-style card (includes/login-card.php).
   Self-contained (no Bootstrap). Card colours follow the card's energy type:
   .lc-t-<type> sets --bg1/--bg2 (inner gradient), --frame (inner rim), --ink, --box. */

:root { --page: #3b486b; --page2: #2c3654; }
@media (prefers-color-scheme: dark) { :root { --page: #161b2a; --page2: #0d111c; } }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
.lc-body {
  min-height: 100vh;
  background: radial-gradient(ellipse at top, var(--page), var(--page2));
  font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif;
  color: #1d1d1d;
}
.lc-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.lc-wrap { display: flex; justify-content: center; padding: 24px 16px 32px; }

/* ── the card ──────────────────────────────────────────────────────────── */
.lc-card {
  --bg1: #d7d5ce; --bg2: #e6d9c5; --frame: #c9b48a; --ink: #1d1d1d; --box: rgba(255,255,255,.55);
  width: 100%; max-width: 400px;
  background: #fab800;                       /* the yellow border, as today */
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.45), inset 0 0 0 1px rgba(0,0,0,.15);
}
.lc-inner {
  background: linear-gradient(170deg, var(--bg1), var(--bg2));
  border: 3px solid var(--frame);
  border-radius: 8px;
  padding: 8px 10px 10px;
  color: var(--ink);
}
.lc-t-fire      { --bg1: #fbd2a6; --bg2: #ea8d5c; --frame: #c4502a; }
.lc-t-water     { --bg1: #cde8f8; --bg2: #84bde6; --frame: #2f78b8; }
.lc-t-grass     { --bg1: #dcf0c8; --bg2: #9fd383; --frame: #4b8f3a; }
.lc-t-lightning { --bg1: #fff6c2; --bg2: #f4d65a; --frame: #c9a312; }
.lc-t-psychic   { --bg1: #ecd9f3; --bg2: #c497d8; --frame: #7f4a9e; }
.lc-t-fighting  { --bg1: #f1d6b7; --bg2: #d69a68; --frame: #94532a; }
.lc-t-darkness  { --bg1: #7d898e; --bg2: #3c464b; --frame: #20282b; --ink: #f2f2f2; --box: rgba(0,0,0,.28); }
.lc-t-metal     { --bg1: #eef1f3; --bg2: #b5bfc7; --frame: #6f7c86; }
.lc-t-dragon    { --bg1: #f3e8b5; --bg2: #cbb35e; --frame: #8b7118; }
.lc-t-colorless { --bg1: #f8f6f0; --bg2: #dcd7ca; --frame: #a59f8c; }
.lc-t-fairy     { --bg1: #fbe0ee; --bg2: #eea6cb; --frame: #c4588f; }

.lc-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; min-height: 30px; }
.lc-title { display: flex; flex-direction: column; min-width: 0; }
.lc-stage { font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; opacity: .8; }
.lc-name { font-weight: 800; font-size: 1.15rem; line-height: 1.15; overflow-wrap: anywhere; }
.lc-hp { display: flex; align-items: center; gap: 3px; font-weight: 800; font-size: 1.15rem; color: #c8102e; white-space: nowrap; }
.lc-t-darkness .lc-hp { color: #ff8a8a; }
.lc-hp small { font-size: .62rem; font-weight: 800; align-self: flex-end; margin-bottom: 3px; }
.lc-hp .lc-e { width: 22px; height: 22px; margin-left: 3px; }

/* art window: the card scan, cropped to its art box (fits modern cards; older ones still read fine) */
.lc-art {
  position: relative; margin: 6px 0 0; aspect-ratio: 1.6 / 1; overflow: hidden;
  border: 3px solid #d8c27a; border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.2), 0 1px 3px rgba(0,0,0,.3);
  background: #fff url("../img/rc-tools.svg") center / 40% no-repeat;
}
.lc-art .lc-scan { display: block; width: 120.5%; margin-left: -10.2%; margin-top: -18.5%; height: auto; }
.lc-art-static { display: flex; align-items: center; justify-content: center; background: #fff; }
.lc-art-static .lc-logo { width: 10em; max-width: 60%; height: auto; margin: 12px; }
.lc-strip {
  margin: 3px 6px 0; padding: 1px 8px; font-size: .62rem; font-style: italic; text-align: center;
  background: linear-gradient(90deg, #b9a15a, #ecdca0, #b9a15a); color: #2a2412; border-radius: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── attacks = the login rows ───────────────────────────────────────────── */
.lc-form { margin: 8px 0 0; }
.lc-attack {
  display: grid; grid-template-columns: 70px 1fr; grid-template-rows: auto auto;
  column-gap: 8px; align-items: center; padding: 6px 2px;
  border-bottom: 1px solid rgba(0,0,0,.18);
}
.lc-t-darkness .lc-attack { border-bottom-color: rgba(255,255,255,.2); }
.lc-cost { grid-row: 1 / span 2; display: flex; flex-wrap: wrap; gap: 2px; max-width: 72px; align-items: center; font-size: .8rem; line-height: 1.1; }
.lc-cost-free { min-width: 20px; }
.lc-atk-name { font-weight: 800; font-size: .95rem; text-transform: lowercase; }
.lc-input {
  width: 100%; font: inherit; font-size: 1rem; color: #111; background: #fff;
  border: 1px solid rgba(0,0,0,.35); border-radius: 6px; padding: 7px 9px; margin-top: 2px;
}
.lc-input:focus { outline: 3px solid #fab800; outline-offset: 1px; border-color: #7a5a00; }
.lc-e { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }

/* weakness / resistance / retreat (= the submit button) */
.lc-wrr { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 6px; margin-top: 8px; align-items: start; }
.lc-wrr-cell { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.lc-wrr-h { font-size: .62rem; font-weight: 700; text-transform: lowercase; opacity: .85; }
.lc-wrr-v { display: flex; gap: 4px; align-items: center; justify-content: center; min-height: 40px; font-weight: 800; font-size: .85rem; }
.lc-wr-item { display: inline-flex; align-items: center; gap: 2px; }
.lc-retreat {
  width: 100%; min-height: 40px; font: inherit; font-size: 1.05rem; letter-spacing: .08em; font-weight: 800;
  color: #fff; background: #0d6efd; border: 1px solid #0a58ca; border-radius: 6px; cursor: pointer;
  padding: 6px 8px;
}
.lc-retreat:hover { background: #0b5ed7; }
.lc-retreat:focus-visible { outline: 3px solid #fab800; outline-offset: 2px; }

/* flavour text box = the legal disclaimer, as today */
.lc-flavor {
  margin-top: 10px; padding: 7px 8px; text-align: left;
  background: #fab800; color: #1d1d1d; border: 1px solid rgba(0,0,0,.12); border-radius: .65rem;
  font-size: .6rem; line-height: 1.25;
}
.lc-copy { font-size: .6rem; text-align: center; margin: 8px 0 0; opacity: .85; }

.lc-alert { margin: 8px 0 0; padding: 6px 10px; border-radius: 6px; font-size: .85rem; border: 1px solid; }
.lc-alert-bad  { background: #f8d7da; color: #58151c; border-color: #f1aeb5; }
.lc-alert-warn { background: #fff3cd; color: #664d03; border-color: #ffe69c; }
.lc-alert-ok   { background: #d1e7dd; color: #0a3622; border-color: #a3cfbb; }

@media (max-width: 380px) {
  .lc-card { padding: 9px; border-radius: 14px; }
  .lc-wrap { padding: 12px 10px 20px; }
  .lc-name, .lc-hp { font-size: 1.02rem; }
}
@media (prefers-color-scheme: dark) {
  .lc-card { box-shadow: 0 10px 30px rgba(0,0,0,.8), inset 0 0 0 1px rgba(0,0,0,.3); }
  .lc-input { background: #fdfdfd; }
}
@media (prefers-reduced-motion: no-preference) {
  .lc-card { transition: transform .2s ease; }
}
