:root {
  --bg-0: #0a0b1a;
  --bg-1: #10112a;
  --bg-2: #161835;
  --card: rgba(16, 17, 42, 0.85);
  --field: #0e1024;
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);
  --text: #ffffff;
  --muted: #8b8fb0;
  --placeholder: #4a4d6e;
  --orange-1: #ff5a1f;
  --orange-2: #ff9a3d;
  --orange-soft: rgba(255, 140, 50, 0.15);
  --err: #ff5a5a;
  --ok: #4ade80;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', 'Segoe UI', Tahoma, sans-serif; }

html, body { height: 100%; }

* { scrollbar-width: thin; scrollbar-color: rgba(255, 140, 50, 0.5) transparent; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 140, 50, 0.35);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
  min-height: 24px;
  min-width: 24px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 140, 50, 0.6);
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:active {
  background: var(--orange-1);
  background-clip: padding-box;
}
::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-button { display: none; }

body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(255, 90, 31, 0.08), transparent 60%),
    radial-gradient(900px 500px at 50% 110%, rgba(255, 154, 61, 0.05), transparent 60%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 50%, var(--bg-0) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: var(--text);
}

.container {
  width: 100%;
  max-width: 380px;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(255, 140, 50, 0.12), transparent 60%),
    linear-gradient(180deg, rgba(22, 24, 53, 0.92), rgba(14, 16, 36, 0.88));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 30px 26px 22px;
  position: relative;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 140, 50, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
}
.container::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 22px;
  padding: 1px;
  background: conic-gradient(from var(--angle, 0deg),
    transparent 0deg,
    rgba(255, 90, 31, 0.55) 40deg,
    transparent 80deg,
    transparent 320deg,
    rgba(255, 140, 50, 0.45) 360deg);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  animation: container-border-spin 10s linear infinite;
}
.container::after {
  content: "";
  position: absolute;
  top: -1px; left: 50%;
  width: 70%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--orange-1), transparent);
  transform: translateX(-50%);
  filter: blur(0.5px);
  pointer-events: none;
}
@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}
@keyframes container-border-spin {
  to { --angle: 360deg; }
}

.title-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 6px;
}
.title-logo img {
  animation: logo-spin 10s linear infinite;
  filter: drop-shadow(0 6px 14px rgba(255, 90, 31, 0.35));
}
@keyframes logo-spin {
  0%   { transform: rotate(-3deg) scale(1); }
  50%  { transform: rotate(3deg) scale(1.03); }
  100% { transform: rotate(-3deg) scale(1); }
}
.title {
  text-align: center;
  font-size: 46px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--orange-1) 0%, var(--orange-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -1.5px;
  line-height: 1;
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.title .brand {
  position: relative;
  display: inline-block;
}
.title .grad-cap {
  position: absolute;
  width: 0.5em;
  height: auto;
  top: -0.38em;
  left: 0.08em;
  transform: rotate(-14deg);
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(255, 90, 31, 0.4));
}
.title .remake {
  display: inline-flex;
  gap: 2px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 1.5px;
  padding: 3px 11px;
  border: 1px solid rgba(255, 154, 61, 0.35);
  border-radius: 999px;
  position: relative;
  top: -6px;
  background-color: rgba(255, 90, 31, 0.08);
  font-family: 'Impact', 'Arial Black', sans-serif;
  text-transform: uppercase;
}
.title .remake span {
  display: inline-block;
  color: var(--orange-2);
  -webkit-text-fill-color: var(--orange-2);
  animation: remake-glitch 7s infinite;
  text-shadow:
    1px 0 0 #000,
    -1px 0 0 #000,
    0 1px 0 #000,
    0 -1px 0 #000;
  will-change: transform, text-shadow, opacity;
}
.title .remake > span:nth-child(1) { animation-delay: 0s; }
.title .remake > span:nth-child(2) { animation-delay: -0.9s; }
.title .remake > span:nth-child(3) { animation-delay: -1.8s; }
.title .remake > span:nth-child(4) { animation-delay: -2.7s; }
.title .remake > span:nth-child(5) { animation-delay: -3.6s; }
.title .remake > span:nth-child(6) { animation-delay: -4.5s; }

.title .remake .remake-year {
  display: inline-flex;
  gap: 1px;
  margin-left: 6px;
  padding-left: 6px;
  border-left: 1px solid rgba(255, 154, 61, 0.4);
  animation: none;
  font-size: 13px;
  font-family: monospace, 'Impact', sans-serif;
  letter-spacing: 1px;
  transform: none;
  text-shadow: none;
  color: var(--orange-2);
  -webkit-text-fill-color: var(--orange-2);
}
.title .remake .remake-year span { animation: remake-glitch 7s infinite; will-change: transform, text-shadow; }
.title .remake .remake-year span:nth-child(1) { animation-delay: -5.4s; }
.title .remake .remake-year span:nth-child(2) { animation-delay: -5.8s; }
.title .remake .remake-year span:nth-child(3) { animation-delay: -6.2s; }
.title .remake .remake-year span:nth-child(4) { animation-delay: -6.6s; }

@keyframes remake-glitch {
  0%, 100% {
    transform: translate(0, 0);
    opacity: 1;
    color: var(--orange-2);
    -webkit-text-fill-color: var(--orange-2);
    text-shadow:
      1px 0 0 #000,
      -1px 0 0 #000;
  }
  22%, 23% {
    transform: translate(-1.5px, 0);
    opacity: 0.95;
    color: var(--orange-2);
    -webkit-text-fill-color: var(--orange-2);
    text-shadow:
      1.5px 0 0 #00e7ff,
      -1.5px 0 0 #ff2f6d,
      0 0 2px rgba(255, 90, 31, 0.6);
  }
  24%, 25% {
    transform: translate(1.5px, -0.5px);
    opacity: 0.9;
    text-shadow:
      -2px 0 0 #00e7ff,
      2px 0 0 #ff2f6d,
      0 0 3px rgba(255, 140, 50, 0.7);
  }
  26% {
    transform: translate(0, 0.5px);
    opacity: 1;
    text-shadow:
      1px 0 0 #000,
      -1px 0 0 #000;
  }
  55%, 56% {
    transform: translate(2px, 0);
    opacity: 0.85;
    color: #fff;
    -webkit-text-fill-color: #fff;
    text-shadow:
      -2px 0 0 #ff2f6d,
      2px 0 0 #00e7ff,
      0 0 5px rgba(255, 90, 31, 0.9);
  }
  57% {
    transform: translate(-2px, 0.5px);
    opacity: 0.5;
    text-shadow:
      -3px 0 0 #ff2f6d,
      3px 0 0 #00e7ff;
  }
  58% {
    transform: translate(0, 0);
    opacity: 1;
    color: var(--orange-2);
    -webkit-text-fill-color: var(--orange-2);
    text-shadow:
      1px 0 0 #000,
      -1px 0 0 #000;
  }
  82%, 83% {
    transform: translate(-1px, 0);
    opacity: 0.7;
    text-shadow:
      1.5px 0 0 #00e7ff,
      -1.5px 0 0 #ff2f6d;
  }
  84% {
    transform: translate(0, 0);
    opacity: 1;
  }
}
.terms-link {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  margin-top: 14px;
}
.terms-link a {
  color: var(--muted);
  text-decoration: underline;
}
.terms-link a:hover { color: var(--orange-2); }
.terms-link .year {
  color: var(--orange-2);
  font-weight: 700;
  font-family: monospace;
  letter-spacing: 0.5px;
}

.hidden { display: none !important; }

/* Welcome modal */
.welcome-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9800;
  background: rgba(5, 6, 15, 0.82);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s, visibility 0.22s;
}
.welcome-backdrop.show { opacity: 1; visibility: visible; }
.welcome-modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 92vh;
  overflow-y: auto;
  overflow-x: hidden;
  background:
    radial-gradient(600px 240px at 50% -40px, rgba(255, 90, 31, 0.18), transparent 60%),
    linear-gradient(180deg, #121432 0%, #0d0f22 100%);
  border: 1px solid rgba(255, 140, 50, 0.15);
  border-radius: 22px;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 90, 31, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.26s cubic-bezier(.2,.9,.3,1);
  -webkit-overflow-scrolling: touch;
}
.welcome-modal::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--orange-1), var(--orange-2), transparent);
  border-radius: 2px;
  opacity: 0.6;
}
.welcome-backdrop.show .welcome-modal { transform: translateY(0) scale(1); }
.welcome-head {
  text-align: center;
  padding: 32px 24px 22px;
}
.welcome-logo {
  display: inline-flex;
  width: 72px;
  height: 72px;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  filter: drop-shadow(0 8px 16px rgba(255, 90, 31, 0.4));
}
.welcome-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.welcome-title {
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--orange-1), var(--orange-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.welcome-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 9px;
  border: 1px solid rgba(255, 154, 61, 0.35);
  border-radius: 999px;
  color: var(--orange-2);
  -webkit-text-fill-color: var(--orange-2);
  background-color: rgba(255, 90, 31, 0.08);
  letter-spacing: 1px;
  position: relative;
  top: -2px;
}
.welcome-sub {
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.2px;
}
.welcome-origlink {
  color: var(--orange-2);
  text-decoration: none;
  font-weight: 600;
}
.welcome-origlink:hover { text-decoration: underline; }
.welcome-body {
  padding: 18px 22px 8px;
}
.welcome-intro {
  font-size: 12.5px;
  color: #c4c6dc;
  line-height: 1.55;
  margin-bottom: 14px;
  padding: 11px 13px;
  background: rgba(255, 140, 50, 0.05);
  border-left: 2px solid var(--orange-1);
  border-radius: 8px;
}
.welcome-intro b { color: var(--orange-2); font-weight: 700; }
.welcome-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}
.welcome-feat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  transition: all 0.2s;
}
.welcome-feat:hover {
  background: rgba(255, 90, 31, 0.05);
  border-color: rgba(255, 140, 50, 0.2);
}
.welcome-feat-ico {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--orange-1), var(--orange-2));
  border-radius: 10px;
  flex-shrink: 0;
  color: #fff;
  box-shadow: 0 4px 10px rgba(255, 90, 31, 0.25);
}
.welcome-feat-ico svg { width: 16px; height: 16px; }
.welcome-feat b {
  display: block;
  font-size: 12.5px;
  color: var(--text);
  font-weight: 700;
}
.welcome-feat small {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.5;
}
.welcome-feat small b { color: var(--orange-2); font-weight: 700; }
.welcome-feat small a { color: var(--orange-2); text-decoration: underline; }

.welcome-credits {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px dashed rgba(255, 140, 50, 0.25);
  border-radius: 10px;
}
.welcome-credits-label {
  font-size: 10.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.welcome-credits-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--orange-2);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  font-family: monospace;
}
.welcome-credits-link:hover { color: var(--orange-1); text-decoration: underline; }
.welcome-foot {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
  padding: 0 4px;
}
.welcome-foot b { color: var(--orange-2); font-weight: 700; }
.welcome-actions {
  padding: 14px 22px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.welcome-ok {
  width: 100%;
  padding: 13px;
  font-size: 13.5px;
  background: linear-gradient(90deg, var(--orange-1), var(--orange-2));
  border: none;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.3px;
  box-shadow: 0 8px 20px rgba(255, 90, 31, 0.3);
  transition: all 0.2s;
}
.welcome-ok:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(255, 90, 31, 0.4);
}
.welcome-terms {
  font-size: 11px;
  color: var(--muted);
  text-decoration: underline;
}
.welcome-terms:hover { color: var(--orange-2); }

@media (max-width: 480px) {
  .welcome-backdrop { padding: 12px; align-items: flex-end; }
  .welcome-modal {
    max-width: 100%;
    max-height: 95vh;
    border-radius: 16px 16px 0 0;
  }
  .welcome-head { padding: 22px 20px 14px; }
  .welcome-logo { width: 50px; height: 50px; margin-bottom: 10px; }
  .welcome-title { font-size: 22px; }
  .welcome-badge { font-size: 10px; padding: 1px 8px; }
  .welcome-body { padding: 14px 18px 6px; }
  .welcome-intro { font-size: 12px; padding: 10px 12px; }
  .welcome-feat { padding: 9px 11px; gap: 10px; }
  .welcome-feat-ico { width: 26px; height: 26px; font-size: 13px; }
  .welcome-feat b { font-size: 12px; }
  .welcome-feat small { font-size: 10.5px; }
  .welcome-foot { font-size: 10.5px; }
  .welcome-actions { padding: 12px 18px 16px; }
  .welcome-ok { padding: 11px; font-size: 13px; }
}

/* Termos de Uso modal */
.termos-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9700;
  background: rgba(5, 6, 15, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s, visibility 0.22s;
}
.termos-backdrop.show { opacity: 1; visibility: visible; }
.termos-modal {
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #0f1020;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.65);
  transform: translateY(14px) scale(0.98);
  transition: transform 0.24s cubic-bezier(.2,.9,.3,1);
}
.termos-backdrop.show .termos-modal { transform: translateY(0) scale(1); }
.termos-head {
  position: relative;
  text-align: center;
  padding: 26px 24px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.termos-title {
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--orange-1), var(--orange-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}
.termos-sub {
  font-size: 12.5px;
  color: var(--muted);
}
.termos-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 16px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.termos-close:hover { color: var(--text); background: rgba(255, 255, 255, 0.1); }
.termos-body {
  overflow-y: auto;
  padding: 22px 22px 24px;
}
.termos-intro {
  text-align: center;
  font-size: 13.5px;
  color: #d2d4e8;
  line-height: 1.5;
  margin-bottom: 8px;
}
.termos-warn {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--orange-2);
}
.termos-sec {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.termos-sec-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.termos-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--orange-1), var(--orange-2));
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(255, 90, 31, 0.3);
}
.termos-sec-head h3 {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
}
.termos-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.termos-list li {
  position: relative;
  padding: 4px 0 4px 16px;
  font-size: 12.5px;
  color: #c4c6dc;
  line-height: 1.55;
}
.termos-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 10px;
  width: 6px;
  height: 6px;
  background: linear-gradient(135deg, var(--orange-1), var(--orange-2));
  border-radius: 50%;
}
.termos-list b { color: var(--orange-2); font-weight: 700; }
.termos-list a { color: var(--orange-2); text-decoration: underline; }

@media (max-width: 480px) {
  .termos-modal { max-width: 100%; border-radius: 16px; }
  .termos-head { padding: 22px 20px 16px; }
  .termos-title { font-size: 22px; }
  .termos-body { padding: 18px 18px 22px; }
}

.saved-fab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 17, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: var(--muted);
  cursor: pointer;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: all 0.2s;
  z-index: 50;
}
.saved-fab:hover {
  color: var(--orange-2);
  border-color: rgba(255, 140, 50, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(255, 90, 31, 0.2);
}
.saved-fab .saved-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--orange-1);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0a0b1a;
  line-height: 1;
}
@media (max-width: 480px) {
  .saved-fab { bottom: 14px; right: 14px; width: 42px; height: 42px; }
}

.saved-dropdown.acc-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 6, 15, 0.75);
  backdrop-filter: blur(8px);
  z-index: 9500;
  opacity: 0;
  transition: opacity 0.2s;
}
.saved-dropdown.acc-backdrop.show { opacity: 1; }

.acc-modal {
  width: 100%;
  max-width: 400px;
  background: #0f1020;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 22px 20px 18px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.22s cubic-bezier(.2,.9,.3,1);
}
.saved-dropdown.acc-backdrop.show .acc-modal { transform: translateY(0) scale(1); }

.acc-head {
  position: relative;
  text-align: center;
  margin-bottom: 18px;
}
.acc-title {
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--orange-1), var(--orange-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.3px;
}
.acc-close {
  position: absolute;
  right: -2px;
  top: -4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.acc-close:hover { color: var(--text); background: rgba(255, 255, 255, 0.1); }

.acc-list {
  list-style: none;
  padding: 2px 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 55vh;
  overflow-y: auto;
  overflow-x: hidden;
}
.acc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.15s;
}
.acc-item:hover {
  background: rgba(255, 90, 31, 0.08);
  border-color: rgba(255, 140, 50, 0.35);
  transform: translateX(2px);
}
.acc-info { flex: 1; min-width: 0; }
.acc-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.acc-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
  font-family: monospace;
}
.acc-del {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}
.acc-del:hover {
  background: rgba(255, 90, 90, 0.15);
  border-color: rgba(255, 90, 90, 0.3);
  color: var(--err);
}

.acc-hint {
  margin-top: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  padding: 0 10px;
}

@media (max-width: 480px) {
  .acc-modal { max-width: 100%; padding: 20px 16px 16px; }
  .acc-title { font-size: 20px; }
  .acc-name { font-size: 12.5px; }
  .acc-sub { font-size: 10.5px; }
}

.remember-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.remember-wrap input {
  accent-color: var(--orange-1);
  width: 15px;
  height: 15px;
  cursor: pointer;
}
.remember-wrap:hover { color: var(--text); }

.pay-modal {
  max-width: 420px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}
.pay-body {
  padding: 18px 20px 20px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}
.pay-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  background: var(--field);
  border: 1px solid rgba(255, 140, 50, 0.18);
  border-radius: 12px;
  margin-bottom: 12px;
}
.pay-amount { font-size: 13.5px; color: var(--muted); }
.pay-amount strong {
  font-size: 30px;
  background: linear-gradient(135deg, var(--orange-1), var(--orange-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  letter-spacing: -1px;
  margin-left: 3px;
}
.pay-period { font-size: 12px; color: var(--muted); }
.pay-period strong { color: var(--orange-2); font-weight: 700; }
.pay-why {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: rgba(255, 140, 50, 0.04);
  border-left: 2px solid var(--orange-1);
  border-radius: 8px;
}
.pay-steps-guide {
  display: flex;
  gap: 5px;
  justify-content: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.pay-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px 4px 5px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}
.pay-chip b {
  display: inline-flex;
  width: 15px;
  height: 15px;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--orange-1), var(--orange-2));
  color: #fff;
  border-radius: 50%;
  font-size: 9.5px;
  font-weight: 800;
}
.pay-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange-1);
  box-shadow: 0 0 0 0 rgba(255, 90, 31, 0.6);
  animation: pay-pulse 1.6s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pay-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 90, 31, 0.6); transform: scale(1); }
  70%  { box-shadow: 0 0 0 10px rgba(255, 90, 31, 0); transform: scale(1.1); }
  100% { box-shadow: 0 0 0 0 rgba(255, 90, 31, 0); transform: scale(1); }
}
.pay-verify {
  width: 100%;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.pay-label {
  display: block;
  font-size: 12px;
  color: #c4c6dc;
  margin-bottom: 6px;
  font-weight: 500;
}
#payerName, #payCopy {
  width: 100%;
  padding: 11px 12px;
  background: var(--field);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border 0.2s;
}
#payerName:focus, #payCopy:focus { border-color: var(--orange-1); }
.pay-generate { width: 100%; margin-top: 12px; }
.pay-qr-wrap {
  display: flex;
  justify-content: center;
  padding: 10px;
  background: #fff;
  border-radius: 10px;
  margin-bottom: 12px;
}
.pay-qr-wrap img { width: 160px; height: 160px; display: block; }
.pay-copy-row { display: flex; gap: 6px; }
.pay-copy-row #payCopy { font-family: monospace; font-size: 11.5px; }
.pay-copy-btn { padding: 11px 14px; white-space: nowrap; }
.pay-status {
  margin-top: 14px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 12.5px;
  color: #c4c6dc;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
}
.pay-step-ok { text-align: center; padding: 10px 0; }
.pay-check {
  width: 60px;
  height: 60px;
  margin: 0 auto 14px;
  background: linear-gradient(135deg, #10b981, #34d399);
  color: #fff;
  font-size: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}
.pay-step-ok h3 {
  font-size: 18px;
  margin-bottom: 6px;
  background: linear-gradient(90deg, var(--orange-1), var(--orange-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.pay-step-ok p { font-size: 13px; color: var(--muted); margin-bottom: 16px; }

.divider {
  width: 56px;
  height: 2px;
  background: linear-gradient(90deg, var(--orange-1), var(--orange-2));
  margin: 10px auto 14px;
  border-radius: 2px;
}

.subtitle {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 22px;
  letter-spacing: 0.2px;
}

.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 13px;
  color: #d2d4e8;
  margin-bottom: 8px;
  font-weight: 500;
}

.input-wrap { position: relative; }

.field input {
  width: 100%;
  padding: 13px 14px;
  background: linear-gradient(180deg, rgba(14, 16, 36, 0.9), rgba(10, 11, 26, 0.85));
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 11px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border 0.2s, box-shadow 0.2s, background 0.2s;
  box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.3);
}
.field input:hover {
  border-color: rgba(255, 140, 50, 0.2);
}
.field input:focus {
  border-color: var(--orange-1);
  box-shadow:
    0 0 0 3px rgba(255, 90, 31, 0.15),
    inset 0 1px 0 rgba(0, 0, 0, 0.3);
  background: linear-gradient(180deg, rgba(20, 22, 48, 0.9), rgba(14, 16, 36, 0.85));
}
.field input::placeholder { color: var(--placeholder); }

.toggle-pass {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--orange-2);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background 0.2s;
}
.toggle-pass:hover { background: var(--orange-soft); }

.captcha {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 14px;
  padding: 10px 12px;
  background: var(--field);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  transition: border 0.2s;
}
.captcha:hover { border-color: var(--border-strong); }

.captcha-box {
  width: 20px;
  height: 20px;
  border: 2px solid #5a5d7a;
  border-radius: 5px;
  flex-shrink: 0;
  position: relative;
  transition: all 0.2s;
}
.captcha.verifying .captcha-box {
  border-color: var(--orange-1);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.captcha.verified .captcha-box {
  background: linear-gradient(135deg, var(--orange-1), var(--orange-2));
  border-color: var(--orange-1);
}
.captcha.verified .captcha-box::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.captcha.error .captcha-box {
  border-color: var(--err);
  animation: captcha-shake 0.4s;
}
@keyframes captcha-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
@keyframes spin { to { transform: rotate(360deg); } }
.captcha-label { font-size: 13px; color: #d2d4e8; }

.btn {
  width: 100%;
  padding: 12px;
  margin-top: 8px;
  background: linear-gradient(180deg, rgba(22, 24, 53, 0.9), rgba(14, 16, 36, 0.85));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(.2,.9,.3,1);
  letter-spacing: 0.3px;
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 140, 50, 0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s;
}
.btn:hover:not(:disabled) {
  background: linear-gradient(180deg, rgba(255, 90, 31, 0.12), rgba(255, 140, 50, 0.06));
  border-color: var(--orange-1);
  transform: translateY(-1px);
  box-shadow:
    0 8px 22px rgba(255, 90, 31, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  color: var(--orange-2);
}
.btn:hover:not(:disabled)::before {
  transform: translateX(100%);
}
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.status {
  margin-top: 14px;
  text-align: center;
  font-size: 12px;
  min-height: 16px;
}
.status.err { color: var(--err); }
.status.ok { color: var(--ok); }

.credit {
  margin-top: 20px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.3px;
}
.credit a {
  color: var(--orange-2);
  text-decoration: none;
  font-weight: 600;
}
.credit a:hover { text-decoration: underline; }

.toast-container {
  position: fixed;
  top: 18px;
  right: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 10000;
  max-width: calc(100vw - 36px);
  width: 360px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(16, 17, 42, 0.95);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--orange-1);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  color: var(--text);
  backdrop-filter: blur(12px);
  opacity: 0;
  transform: translateX(120%);
  transition: transform 0.28s cubic-bezier(.2,.9,.3,1), opacity 0.2s;
  pointer-events: auto;
}
.toast.show { opacity: 1; transform: translateX(0); }
.toast.hide { opacity: 0; transform: translateX(120%); }
.toast-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 90, 31, 0.15);
  color: var(--orange-2);
}
.toast-success { border-left-color: #4ade80; }
.toast-success .toast-icon { background: rgba(74, 222, 128, 0.15); color: #4ade80; }
.toast-error { border-left-color: #ff5a5a; }
.toast-error .toast-icon { background: rgba(255, 90, 90, 0.15); color: #ff5a5a; }
.toast-warn { border-left-color: #fbbf24; }
.toast-warn .toast-icon { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.toast-info { border-left-color: #60a5fa; }
.toast-info .toast-icon { background: rgba(96, 165, 250, 0.15); color: #60a5fa; }
.toast-body { flex: 1; min-width: 0; }
.toast-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.toast-msg { font-size: 12.5px; color: var(--muted); line-height: 1.4; word-break: break-word; }
.toast-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  border-radius: 4px;
}
.toast-close:hover { color: var(--text); }

.toast-progress { border-left-color: #a855f7; }
.toast-progress .toast-title { font-weight: 600; font-size: 13.5px; color: var(--text); margin-bottom: 6px; }
.toast-progress .toast-msg { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.toast-bar {
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.toast-bar-fill {
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899);
  border-radius: 999px;
  animation: toast-bar-slide 1.4s ease-in-out infinite;
}
@keyframes toast-bar-slide {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(300%); }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 6, 15, 0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}
.modal-backdrop.show { opacity: 1; visibility: visible; }
.modal {
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.6);
  transform: translateY(20px) scale(0.98);
  transition: transform 0.25s cubic-bezier(.2,.9,.3,1);
}
.modal-backdrop.show .modal { transform: translateY(0) scale(1); }
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
}
.modal-title {
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(90deg, var(--orange-1), var(--orange-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 6px;
}
.modal-close:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.modal-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.time-range { display: flex; align-items: center; gap: 10px; }
.time-range label { font-size: 12px; color: var(--muted); }
.time-inputs { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.time-inputs input {
  width: 60px;
  padding: 7px 8px;
  background: var(--field);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
  text-align: center;
  outline: none;
}
.time-inputs input:focus { border-color: var(--orange-1); }
.modal-btn {
  padding: 9px 14px;
  background: var(--field);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.modal-btn:hover:not(:disabled) { background: var(--orange-soft); border-color: var(--orange-1); }
.modal-btn.ghost { background: transparent; }
.modal-btn.primary {
  background: linear-gradient(90deg, var(--orange-1), var(--orange-2));
  border-color: var(--orange-1);
  color: #fff;
  font-weight: 600;
}
.modal-btn.primary:hover:not(:disabled) { filter: brightness(1.1); }
.modal-btn.draft {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.45);
  color: #a5b4fc;
}
.modal-btn.draft:hover:not(:disabled) {
  background: rgba(99, 102, 241, 0.22);
  border-color: #818cf8;
}
.modal-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 22px;
}
.task-list { list-style: none; padding: 0; margin: 0; }
.task-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.task-item:last-child { border-bottom: none; }
.task-item label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}
.task-check {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--orange-1);
  flex-shrink: 0;
  cursor: pointer;
}
.task-info { flex: 1; min-width: 0; }
.task-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 4px;
  word-break: break-word;
}
.task-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 140, 50, 0.12);
  color: var(--orange-2);
  border: 1px solid rgba(255, 140, 50, 0.25);
  text-transform: capitalize;
}
.tag.muted {
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  border-color: var(--border);
}
.task-empty { text-align: center; padding: 30px 0; color: var(--muted); font-size: 13px; }
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid var(--border);
}

@media (max-width: 1024px) {
  .modal { max-width: 520px; }
}

@media (max-width: 768px) {
  body { padding: 16px; }
  .container { max-width: 100%; padding: 22px 18px 14px; border-radius: 16px; }
  .title { font-size: 40px; gap: 8px; }
  .title .remake { font-size: 16px; padding: 2px 9px; top: -4px; }
  .divider { width: 48px; margin: 8px auto 10px; }
  .subtitle { font-size: 12.5px; margin-bottom: 18px; }
  .field { margin-bottom: 12px; }
  .field label { font-size: 12px; }
  .field input { padding: 11px 12px; font-size: 13.5px; }
  .btn { padding: 10px; font-size: 13.5px; }
  .captcha { padding: 9px 11px; margin: 14px 0 12px; }
  .captcha-label { font-size: 12.5px; }
  .toast-container { width: 320px; right: 12px; top: 12px; max-width: calc(100vw - 24px); }
  .modal { max-width: 95vw; max-height: 92vh; }
  .modal-head { padding: 14px 18px 12px; }
  .modal-title { font-size: 16px; }
  .modal-body { padding: 8px 16px; }
  .modal-controls { padding: 12px 18px; gap: 10px; }
  .modal-foot { padding: 12px 18px; }
  .task-title { font-size: 13px; }
  .pay-body { padding: 16px 18px 18px; }
  .pay-price { padding: 14px; }
  .pay-amount strong { font-size: 28px; }
  .pay-why { font-size: 11.5px; padding: 9px 11px; }
  .terms-grid { grid-template-columns: 1fr; gap: 16px; }
  .toc { position: static; padding: 14px 12px; }
  .toc h3 { font-size: 10.5px; }
  .toc a { font-size: 12.5px; padding: 5px 9px; }
  .terms-hero h1 { font-size: 30px; }
  .terms-content { padding: 22px 20px; }
  .terms-content h2 { font-size: 15px; }
  .terms-content p, .terms-content li { font-size: 13px; }
}

@media (max-width: 480px) {
  body { padding: 12px; min-height: 100dvh; }
  .container { padding: 22px 16px 14px; border-radius: 14px; margin-top: 8px; }
  .title { font-size: 34px; flex-direction: column; gap: 4px; align-items: center; }
  .title .remake { font-size: 13px; padding: 2px 10px; top: 0; letter-spacing: 0.5px; }
  .divider { width: 40px; margin: 6px auto 8px; }
  .subtitle { font-size: 12px; margin-bottom: 14px; }
  .field { margin-bottom: 10px; }
  .field label { font-size: 11.5px; margin-bottom: 5px; }
  .field input { padding: 11px 12px; font-size: 14px; }
  .input-wrap .toggle-pass svg { width: 16px; height: 16px; }
  .btn { padding: 10px; font-size: 13px; margin-top: 7px; }
  .captcha { padding: 9px 10px; margin: 12px 0 10px; gap: 10px; }
  .captcha-label { font-size: 12px; }
  .terms-link { font-size: 10.5px; margin-top: 12px; }

  .toast-container { right: 6px; top: 6px; width: calc(100vw - 12px); max-width: none; gap: 7px; }
  .toast { padding: 10px 12px; gap: 10px; border-radius: 10px; }
  .toast-icon { width: 24px; height: 24px; border-radius: 7px; }
  .toast-title { font-size: 12.5px; }
  .toast-msg { font-size: 11.5px; }
  .toast-progress .toast-title { font-size: 12.5px; margin-bottom: 4px; }
  .toast-progress .toast-msg { font-size: 11px; margin-bottom: 8px; }

  .modal-backdrop { padding: 10px; align-items: flex-end; }
  .modal {
    max-width: 100%;
    max-height: 92vh;
    border-radius: 16px 16px 0 0;
    animation: slide-up 0.25s ease;
  }
  .modal-head { padding: 14px 16px 10px; }
  .modal-title { font-size: 15.5px; }
  .modal-close { font-size: 24px; padding: 2px 8px; }
  .modal-controls { padding: 10px 16px; flex-direction: column; align-items: stretch; gap: 8px; }
  .modal-body { padding: 8px 14px; }
  .modal-foot { padding: 12px 16px; flex-direction: column-reverse; gap: 8px; }
  .modal-foot .modal-btn { width: 100%; padding: 11px; font-size: 13.5px; }
  .task-item label { gap: 10px; }
  .task-title { font-size: 12.5px; }
  .tag { font-size: 10px; padding: 2px 7px; }

  .pay-modal {
    max-width: 100%;
    max-height: 95vh;
    border-radius: 16px 16px 0 0;
    margin-top: auto;
  }
  .pay-body { padding: 14px 14px 18px; }
  .pay-price { padding: 12px 14px; margin-bottom: 10px; gap: 6px; }
  .pay-amount { font-size: 12.5px; }
  .pay-amount strong { font-size: 24px; letter-spacing: -0.8px; }
  .pay-period { font-size: 11px; }
  .pay-why { font-size: 10.5px; padding: 8px 10px; margin-bottom: 12px; line-height: 1.45; }
  .pay-chip { font-size: 9.5px; padding: 3px 7px 3px 4px; gap: 4px; }
  .pay-chip b { width: 13px; height: 13px; font-size: 9px; }
  #payerName, #payCopy { padding: 10px 11px; font-size: 13px; }
  .pay-copy-row { flex-direction: column; gap: 6px; }
  .pay-copy-btn { width: 100%; padding: 9px; font-size: 12.5px; }
  .pay-qr-wrap { padding: 8px; margin-bottom: 10px; }
  .pay-qr-wrap img { width: 150px; height: 150px; }
  .pay-status { padding: 9px 11px; font-size: 11.5px; margin-top: 10px; }
  .pay-pulse { width: 7px; height: 7px; }
  .pay-verify { padding: 11px; font-size: 13px; margin-top: 10px; }
  .pay-check { width: 50px; height: 50px; font-size: 26px; margin-bottom: 10px; }
  .pay-step-ok h3 { font-size: 15.5px; }
  .pay-step-ok p { font-size: 12px; }

  .terms-hero { margin-bottom: 20px; }
  .terms-hero h1 { font-size: 26px; }
  .terms-hero .meta { font-size: 10.5px; padding: 4px 10px; }
  .terms-content { padding: 20px 16px; border-radius: 14px; }
  .terms-content section { margin-bottom: 20px; }
  .terms-content h2 { font-size: 14.5px; }
  .terms-content p, .terms-content li { font-size: 12.5px; line-height: 1.55; }
  .back-wrap { margin-top: 20px; }
  .back-btn { padding: 10px 16px; font-size: 12.5px; }
}

@media (max-width: 360px) {
  .title { font-size: 28px; }
  .title .remake { font-size: 11.5px; padding: 1px 8px; }
  .subtitle { font-size: 11.5px; }
  .field input { font-size: 13.5px; padding: 10px 11px; }
  .btn { padding: 9px; font-size: 12.5px; }
  .modal-foot .modal-btn { padding: 10px; font-size: 12.5px; }
}

@keyframes slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (max-height: 600px) and (orientation: landscape) {
  body { padding: 10px; }
  .container { padding: 16px 20px 12px; max-width: 460px; }
  .title { font-size: 32px; }
  .title .remake { font-size: 14px; top: -3px; }
  .subtitle { margin-bottom: 12px; }
  .field { margin-bottom: 10px; }
  .btn { padding: 9px; margin-top: 6px; font-size: 13px; }
  .captcha { margin: 10px 0 8px; padding: 8px 10px; }
}

@media (hover: none) and (pointer: coarse) {
  .btn { -webkit-tap-highlight-color: transparent; }
  .btn:hover:not(:disabled) { transform: none; box-shadow: none; }
  .modal-btn:hover:not(:disabled) { background: var(--field); }
  .modal-btn.primary:hover:not(:disabled) { filter: none; }
  input, button, select, textarea { font-size: 16px !important; }
  .field input, .pay-body input { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

.terms-link .sep { color: var(--muted); margin: 0 6px; opacity: 0.6; }

.sala-modal .modal-body { padding: 16px 22px 10px; }
.sala-hint {
  font-size: 12px;
  color: var(--muted);
  background: rgba(255, 140, 50, 0.06);
  border: 1px solid rgba(255, 140, 50, 0.18);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 14px;
  line-height: 1.45;
}
.sala-grid {
  display: grid;
  grid-template-columns: 1fr 90px 80px;
  gap: 10px;
  margin-bottom: 14px;
}
.sala-field { display: flex; flex-direction: column; gap: 4px; }
.sala-field label { font-size: 11px; color: var(--muted); font-weight: 500; }
.sala-field input {
  padding: 9px 11px;
  background: var(--field);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s;
}
.sala-field input:focus { border-color: var(--orange-1); }
.sala-field.sala-sm input { text-align: center; }

.sala-captcha {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 14px;
}
.sala-captcha-img {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 4px 6px;
}
.sala-captcha-img img {
  height: 44px;
  max-width: 160px;
  object-fit: contain;
  display: block;
}
.sala-captcha-img .modal-btn {
  padding: 4px 9px;
  font-size: 15px;
  line-height: 1;
}
.sala-captcha input {
  flex: 1;
  padding: 9px 11px;
  background: var(--field);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  letter-spacing: 1px;
  outline: none;
}
.sala-captcha input:focus { border-color: var(--orange-1); }

.sala-result { margin-top: 6px; }
.sala-empty {
  text-align: center;
  padding: 20px 0;
  color: var(--muted);
  font-size: 13px;
}
.sala-total {
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.sala-cards { display: flex; flex-direction: column; gap: 10px; }
.sala-card {
  background: var(--field);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}
.sala-card-hi {
  border-color: var(--orange-1);
  background: rgba(255, 140, 50, 0.08);
}
.sala-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.sala-ano {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--orange-1), var(--orange-2));
  color: #fff;
  font-weight: 700;
}
.sala-turma {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}
.sala-card-body { display: flex; flex-direction: column; gap: 3px; }
.sala-row { font-size: 12px; color: var(--muted); line-height: 1.4; }
.sala-row strong { color: var(--text); font-weight: 500; }

@media (max-width: 520px) {
  .sala-grid { grid-template-columns: 1fr 1fr; }
  .sala-field:first-child { grid-column: 1 / -1; }
  .sala-captcha { flex-direction: column; }
  .sala-captcha-img { justify-content: center; }
}

.sala-top {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.sala-ano-pick { display: flex; flex-direction: column; gap: 4px; }
.sala-ano-pick span { font-size: 11px; color: var(--muted); }
.sala-ano-pick select {
  padding: 9px 11px;
  background: var(--field);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13.5px;
  outline: none;
  cursor: pointer;
}
.sala-top .modal-btn { flex: 1; }

.sala-manual { margin-top: 10px; }
.sala-manual.hidden { display: none; }

.sala-batch-status { margin: 10px 0; }
.sala-batch-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--field);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
}
.sala-batch-step.done {
  background: rgba(74, 222, 128, 0.08);
  border-color: rgba(74, 222, 128, 0.3);
  color: var(--ok);
}
.sala-spin {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 140, 50, 0.25);
  border-top-color: var(--orange-1);
  border-radius: 50%;
  animation: sala-spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes sala-spin { to { transform: rotate(360deg); } }

.sala-batch-result { margin-top: 10px; }
.sala-batch-head {
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  background: linear-gradient(90deg, var(--orange-1), var(--orange-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
}
.sala-batch-group-title {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--muted);
  text-align: center;
  margin: 14px 0 8px;
  text-transform: uppercase;
}
.sala-batch-card {
  background: var(--field);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  text-align: center;
}
.sala-batch-card.ok { border-color: rgba(255, 140, 50, 0.35); }
.sala-batch-card.none { opacity: 0.75; }
.sala-batch-card.err { border-color: rgba(255, 90, 90, 0.35); background: rgba(255, 90, 90, 0.06); }
.sala-batch-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.sala-batch-ra { font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.sala-batch-turma {
  font-size: 13px;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.4;
}
.sala-batch-escola { font-size: 11.5px; color: var(--muted); }
.sala-batch-err {
  font-size: 11.5px;
  color: var(--err);
  margin-top: 4px;
}
.sala-batch-footer {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.sala-batch-footer-title {
  font-size: 13px;
  font-weight: 700;
  background: linear-gradient(90deg, var(--orange-1), var(--orange-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}
.sala-batch-footer p {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.5;
}
.sala-batch-footer strong { color: var(--orange-2); }

.sala-dob-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.sala-dob-box {
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 22px;
  max-width: 320px;
  width: 100%;
  box-shadow: 0 25px 70px rgba(0,0,0,0.6);
}
.sala-dob-title {
  font-size: 16px;
  font-weight: 700;
  background: linear-gradient(90deg, var(--orange-1), var(--orange-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}
.sala-dob-sub {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 14px;
}
.sala-dob-input {
  width: 100%;
  padding: 11px 12px;
  background: var(--field);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 15px;
  text-align: center;
  letter-spacing: 1px;
  outline: none;
  margin-bottom: 14px;
}
.sala-dob-input:focus { border-color: var(--orange-1); }
.sala-dob-btns { display: flex; gap: 8px; justify-content: flex-end; }

.tsk-modal {
  width: 100%;
  max-width: 500px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(255, 140, 50, 0.08), transparent 60%),
    linear-gradient(180deg, rgba(22, 24, 53, 0.96), rgba(14, 16, 36, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
  overflow: hidden;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.28s cubic-bezier(.2,.9,.3,1);
}
.modal-backdrop.show .tsk-modal { transform: translateY(0) scale(1); }

.tsk-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 14px;
}
.tsk-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}
.tsk-close {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.tsk-close:hover {
  color: var(--text);
  background: rgba(255, 90, 31, 0.1);
  border-color: var(--orange-1);
}
.tsk-divider {
  height: 1px;
  margin: 0 24px;
  background: linear-gradient(90deg, transparent, rgba(255, 140, 50, 0.3), transparent);
}
.tsk-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px 10px;
  gap: 12px;
}
.tsk-pill {
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.tsk-pill:hover {
  color: var(--orange-2);
  border-color: rgba(255, 140, 50, 0.3);
  background: rgba(255, 140, 50, 0.08);
}
.tsk-pill.active {
  color: var(--orange-2);
  border-color: var(--orange-1);
  background: rgba(255, 140, 50, 0.12);
}
.tsk-count {
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.3px;
}

.tsk-body {
  flex: 1;
  overflow-y: auto;
  padding: 4px 18px 10px;
}
.tsk-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.tsk-item { margin: 0; }
.tsk-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.18s;
}
.tsk-row:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 140, 50, 0.2);
}
.tsk-check {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.tsk-box {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  flex-shrink: 0;
  transition: all 0.18s;
}
.tsk-check:checked ~ .tsk-box {
  background: linear-gradient(135deg, var(--orange-1), var(--orange-2));
  border-color: var(--orange-1);
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 90, 31, 0.3);
}
.tsk-row:has(.tsk-check:checked) {
  background: rgba(255, 140, 50, 0.06);
  border-color: rgba(255, 140, 50, 0.25);
}
.tsk-text {
  flex: 1;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  word-break: break-word;
}

.tsk-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.2);
  flex-wrap: wrap;
}
.tsk-btn {
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s;
}
.tsk-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 140, 50, 0.3);
}
.tsk-btn.ghost { background: transparent; }
.tsk-btn.ghost:hover:not(:disabled) { color: var(--muted); }
.tsk-btn.primary {
  background: linear-gradient(135deg, var(--orange-1), var(--orange-2));
  border-color: var(--orange-1);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(255, 90, 31, 0.3);
}
.tsk-btn.primary:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.tsk-btn.draft {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
}
.tsk-btn.draft:hover:not(:disabled) {
  background: rgba(99, 102, 241, 0.2);
  border-color: #818cf8;
}
.tsk-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.tsk-btn.hidden { display: none; }

@media (max-width: 480px) {
  .tsk-modal { max-width: 100%; max-height: 92vh; border-radius: 20px 20px 0 0; margin-top: auto; }
  .tsk-head { padding: 16px 18px 12px; }
  .tsk-title { font-size: 16.5px; }
  .tsk-controls { padding: 12px 18px 8px; }
  .tsk-body { padding: 4px 14px 10px; }
  .tsk-row { padding: 13px 14px; gap: 12px; }
  .tsk-text { font-size: 13.5px; }
  .tsk-foot { padding: 12px 16px 16px; gap: 6px; }
  .tsk-btn { flex: 1; padding: 11px 10px; font-size: 12.5px; }
}
