.apply-main {
  flex: 1;
  padding: 112px 0 80px;
}

.apply {
  display: grid;
  gap: 28px;
  max-width: 920px;
}

.apply-head {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.apply-head img {
  width: 64px;
  height: 64px;
  filter: drop-shadow(0 14px 34px color-mix(in srgb, var(--accent) 34%, transparent));
}

.apply-head h1 {
  font: 700 clamp(34px, 5vw, 48px)/1.05 var(--display);
  letter-spacing: -0.03em;
}

.apply-head p {
  max-width: 46ch;
  color: var(--muted);
}

.forms {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.forms .skel {
  height: 190px;
  border-radius: 22px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

.form-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  text-align: left;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s var(--ease), background 0.2s;
}

.form-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--tone);
  opacity: 0.85;
}

.form-card:hover {
  border-color: color-mix(in srgb, var(--tone) 45%, transparent);
  background: color-mix(in srgb, var(--tone) 4%, var(--surface));
  transform: translateY(-2px);
}

.form-card.off {
  opacity: 0.6;
}

.form-card b {
  font: 600 20px/1.2 var(--display);
}

.form-card p {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.5;
}

.form-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--tone) 14%, transparent);
  color: var(--tone);
}

.form-icon svg {
  width: 22px;
  height: 22px;
}

.form-go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  color: var(--tone);
  font-size: 14px;
  font-weight: 600;
}

.form-go svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s var(--ease);
}

.form-card:hover .form-go svg {
  transform: translateX(3px);
}

.panel {
  width: min(680px, 100%);
  justify-self: center;
  gap: 20px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-self: start;
}

.back-link svg {
  width: 15px;
  height: 15px;
  transform: rotate(180deg);
}

.panel-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.panel-head .form-icon {
  flex: none;
}

.panel-head h2 {
  font: 700 26px/1.15 var(--display);
}

.panel-head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
}

.who-box {
  display: grid;
  gap: 10px;
}

.who-box:empty {
  display: none;
}

.who-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 14.5px;
}

.who-row img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  image-rendering: pixelated;
}

.who-row > svg {
  width: 20px;
  height: 20px;
  color: #5865F2;
}

.who-row span {
  flex: 1;
  color: var(--text);
}

.login-box {
  display: grid;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
}

.login-box h3 {
  font: 600 18px/1.25 var(--display);
}

.login-box p {
  margin-top: -6px;
  color: var(--muted);
  font-size: 14.5px;
}

.login-box form {
  display: grid;
  gap: 12px;
}

.btn.discord {
  background: #5865F2;
  color: #fff;
}

.btn.discord:hover {
  background: #6d78f5;
}

.note {
  color: var(--muted);
  font-size: 14px;
}

#applyForm {
  display: grid;
  gap: 20px;
}

.q {
  display: grid;
  gap: 8px;
}

.q-label {
  font-weight: 600;
  font-size: 15px;
}

.q-label em {
  color: var(--dim);
  font-style: normal;
  font-weight: 500;
  font-size: 13px;
}

.q small {
  margin-top: -4px;
  color: var(--muted);
  font-size: 13.5px;
}

.q textarea.input {
  height: auto;
  min-height: 110px;
  padding: 12px 14px;
  resize: vertical;
  font: inherit;
  line-height: 1.5;
}

.input:focus {
  border-color: color-mix(in srgb, var(--tone, var(--accent)) 60%, transparent);
  background: rgba(255, 255, 255, 0.05);
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pills label {
  cursor: pointer;
}

.pills input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pills span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  font-size: 14px;
  font-weight: 500;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.pills label:hover span {
  border-color: rgba(255, 255, 255, 0.26);
}

.pills input:checked + span {
  border-color: var(--tone, var(--accent));
  background: color-mix(in srgb, var(--tone, var(--accent)) 14%, transparent);
  color: var(--text);
}

.pills input:focus-visible + span {
  outline: 2px solid var(--tone, var(--accent));
  outline-offset: 2px;
}

.drop {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 120px;
  padding: 16px;
  border: 1px dashed var(--line-2);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
}

.drop:hover {
  border-color: var(--tone, var(--accent));
  background: rgba(255, 255, 255, 0.04);
}

.drop.busy {
  opacity: 0.6;
  pointer-events: none;
}

.drop img {
  max-width: 100%;
  max-height: 260px;
  border-radius: 10px;
}

.drop span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.drop svg {
  width: 20px;
  height: 20px;
}

.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent);
  background: color-mix(in srgb, var(--gold) 8%, transparent);
}

.notice svg {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--gold);
}

.mine {
  width: min(680px, 100%);
  justify-self: center;
  display: grid;
  gap: 12px;
}

.mine h2 {
  font: 600 20px/1.2 var(--display);
}

.mine ul {
  display: grid;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.mine li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
}

.mine li + li {
  border-top: 1px solid var(--line);
}

.mine b {
  display: block;
  font-weight: 600;
}

.mine small {
  color: var(--muted);
  font-size: 13px;
}

.mine p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.mine .badge {
  flex: none;
}

.badge.st-pending {
  --glow: var(--gold);
}

.badge.st-accepted {
  --glow: var(--ok);
}

.badge.st-rejected {
  --glow: var(--bad);
}

.load-error {
  grid-column: 1 / -1;
  padding: 60px 24px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 720px) {
  .forms {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 22px;
  }

  .panel-head h2 {
    font-size: 22px;
  }
}

.seg {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.seg button {
  height: 32px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}

.seg button:hover {
  color: var(--text);
}

.seg button.on {
  background: rgba(255, 255, 255, 0.11);
  color: var(--text);
}

.field {
  position: relative;
}

.field img {
  position: absolute;
  left: 10px;
  top: 10px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  image-rendering: pixelated;
}

.field .input {
  height: 48px;
  padding-left: 50px;
}

.err {
  color: var(--bad);
  font-size: 13.5px;
}

.err:empty {
  display: none;
}

.link {
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 600;
}

.link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link[disabled] {
  color: var(--dim);
  pointer-events: none;
}

.code-sent {
  color: var(--muted);
  font-size: 14.5px;
}

.dev-code {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px dashed color-mix(in srgb, var(--gold) 50%, transparent);
  color: var(--gold);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
}

.code-input {
  height: 56px;
  text-align: center;
  font: 600 26px/1 var(--display);
  letter-spacing: 0.4em;
}

.code-input::placeholder {
  font: 500 15px/1 var(--body);
  letter-spacing: 0.02em;
}

.code-links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
