/* Geekcon AI Studio — shared components: buttons, chips, fields, glass panels, page heads, modal, gate screens. */

/* ---------- buttons ---------- */
.btn {
  --bc: var(--line);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  border: 1px solid var(--bc);
  background: rgba(20, 18, 19, 0.7);
  color: var(--paper);
  font: 500 15.5px/1.15 var(--font-display);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out), border-color var(--dur-fast), background-color var(--dur-fast), box-shadow var(--dur), color var(--dur-fast);
}
.btn svg { width: 19px; height: 19px; flex: none; }
.btn:hover { --bc: rgba(255, 241, 210, 0.4); background: rgba(46, 42, 43, 0.8); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-primary {
  --bc: transparent;
  color: var(--ink-950);
  background: var(--grad-btn);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 12px 34px -12px rgba(253, 178, 25, 0.75);
  font-weight: 600;
}
.btn-primary:hover { background: var(--grad-btn); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 16px 44px -10px rgba(253, 178, 25, 0.95); }
.btn-data { --bc: rgba(63, 216, 242, 0.5); color: var(--cyan-200); background: rgba(63, 216, 242, 0.07); }
.btn-data:hover { --bc: var(--cyan-400); background: rgba(63, 216, 242, 0.13); box-shadow: 0 0 30px -8px rgba(63, 216, 242, 0.7); }
.btn-ghost { background: transparent; }
.btn-human { --bc: rgba(253, 178, 25, 0.55); color: var(--amber-300); background: rgba(253, 178, 25, 0.08); }
.btn-human:hover { --bc: var(--amber-500); background: rgba(253, 178, 25, 0.15); }
.btn-lg { min-height: 60px; padding: 0 30px; border-radius: 18px; font-size: 19px; }
.btn-lg svg { width: 22px; height: 22px; }
.btn-sm { min-height: 36px; padding: 0 14px; border-radius: 11px; font-size: 14px; }
.btn.is-busy { pointer-events: none; }
.btn.is-busy::after { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.8s linear infinite; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------- chips ---------- */
.chip {
  --dc: var(--amber-300);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  border: 1px solid color-mix(in srgb, var(--dc) 45%, transparent);
  background: color-mix(in srgb, var(--dc) 11%, rgba(17, 15, 16, 0.7));
  color: var(--paper);
  font: 500 13px/1 var(--font-display);
  white-space: nowrap;
}
.chip.dot::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--dc); box-shadow: 0 0 10px var(--dc); flex: none; }
.chip.est { --dc: var(--amber-500); color: var(--amber-100); }
.chip.live { --dc: var(--cyan-400); color: var(--cyan-200); letter-spacing: 0.12em; font-weight: 600; }
.chip.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan-400); box-shadow: 0 0 12px var(--cyan-400); animation: pulse 1.8s ease-in-out infinite; }
.chip.ok { --dc: var(--ok); }
.chip.warn { --dc: var(--warn); }
.chip.stop { --dc: var(--stop); }
.chip.data { --dc: var(--cyan-400); }

/* ---------- choice chips (dept / pair pickers) ---------- */
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice {
  --dc: var(--amber-300);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(20, 18, 19, 0.7);
  font: 500 15.5px/1 var(--font-display);
  cursor: pointer;
  transition: border-color var(--dur-fast), background-color var(--dur-fast), transform var(--dur-fast), box-shadow var(--dur);
}
.choice::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--dc); opacity: 0.5; transition: opacity var(--dur-fast), box-shadow var(--dur-fast); }
.choice.no-dot::before { display: none; }
.choice:hover { border-color: color-mix(in srgb, var(--dc) 60%, transparent); transform: translateY(-1px); }
.choice[aria-checked="true"] { border-color: var(--dc); background: color-mix(in srgb, var(--dc) 15%, rgba(20, 18, 19, 0.8)); box-shadow: 0 0 26px -8px var(--dc); }
.choice[aria-checked="true"]::before { opacity: 1; box-shadow: 0 0 12px var(--dc); }

/* ---------- fields ---------- */
.field { display: grid; gap: 8px; min-width: 0; }
.field > label, .field .label { font: 500 15px/1.35 var(--font-display); color: var(--paper); }
.field .hint { font-size: 13px; color: var(--mute); line-height: 1.45; }
.input, .textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 15px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: rgba(11, 10, 11, 0.72);
  color: var(--paper);
  font: 400 15.5px/1.6 var(--font-body);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast), background-color var(--dur-fast);
}
.textarea { min-height: 140px; resize: vertical; }
.textarea.mono, .input.mono { font-family: var(--font-mono); font-size: 13.5px; line-height: 1.55; }
.input::placeholder, .textarea::placeholder { color: rgba(167, 159, 154, 0.7); }
.input:hover, .textarea:hover { border-color: #57504F; }
.input:focus, .textarea:focus { outline: none; border-color: var(--amber-500); box-shadow: 0 0 0 4px rgba(253, 178, 25, 0.16); background: rgba(11, 10, 11, 0.9); }
.field-err { color: var(--stop); font-size: 13.5px; }

/* ---------- glass panel + section heads ---------- */
.glass {
  position: relative;
  border-radius: var(--r-lg);
  background: var(--grad-glass);
  box-shadow: var(--shadow-panel);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  backdrop-filter: blur(16px) saturate(1.1);
}
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 28px; margin-bottom: var(--sp-4); }
.page-head h1 { font: 500 var(--fs-h1) / 1.2 var(--font-display); letter-spacing: 0.005em; }
.page-head p { margin-top: 8px; color: var(--dim); max-width: 64ch; }
.kicker { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 10px; font: 600 12.5px/1 var(--font-mono); letter-spacing: 0.24em; text-transform: uppercase; color: var(--amber-300); }
.kicker::before { content: ""; width: 34px; height: 1px; background: currentColor; opacity: 0.7; }
.kicker.data { color: var(--cyan-300); }
.kicker.th { font-family: var(--font-display); font-weight: 500; font-size: 14px; letter-spacing: 0.04em; text-transform: none; }
.amber { color: transparent; background: var(--grad-amber); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 4px 22px rgba(253, 178, 25, 0.3)); }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; margin-bottom: 16px; }
.sec-head h2 { font: 500 var(--fs-h2) / 1.25 var(--font-display); }
.sec-head .sub { color: var(--mute); font-size: var(--fs-small); }
.link-more { color: var(--cyan-200); text-decoration: none; font: 500 14.5px/1 var(--font-display); white-space: nowrap; }
.link-more:hover { text-decoration: underline; text-underline-offset: 4px; }
.est-note { display: inline-flex; align-items: center; gap: 8px; color: var(--amber-100); font-size: 13px; }
.est-note::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--amber-500); }
.empty { padding: 28px; border: 1px dashed var(--line); border-radius: var(--r-md); color: var(--mute); text-align: center; }

/* ---------- modal ---------- */
.modal-back { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(5, 4, 5, 0.66); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade var(--dur) ease both; }
.modal {
  width: min(680px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 28px;
  border-radius: var(--r-lg);
  background: linear-gradient(170deg, rgba(46, 42, 43, 0.96), rgba(17, 15, 16, 0.98));
  box-shadow: 0 50px 120px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 241, 210, 0.14) inset;
  animation: rise var(--dur) var(--ease-out) both;
}
.modal.wide { width: min(980px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.modal-head h2 { font: 500 24px/1.3 var(--font-display); }
.modal-x { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: transparent; cursor: pointer; }
.modal-x:hover { border-color: var(--mute); }
.modal-x svg { width: 18px; height: 18px; }
.modal-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 22px; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- gate screens: login + first-visit profile ---------- */
.gate { position: relative; z-index: 2; min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: center; gap: var(--sp-6); padding: var(--pad) clamp(20px, 6vw, 120px); }
.gate-brand { position: relative; isolation: isolate; }
.gate-brand::before { content: ""; position: absolute; inset: -60px -80px; z-index: -1; background: radial-gradient(closest-side, rgba(11, 10, 11, 0.82), transparent); pointer-events: none; }
.gate-brand img { width: 132px; height: auto; margin-bottom: 34px; }
.gate-brand h1 { font: 500 var(--fs-hero) / 1.08 var(--font-display); letter-spacing: 0.005em; }
.gate-brand p { margin-top: 20px; font: 400 clamp(18px, 0.7vw + 12px, 26px) / 1.5 var(--font-display); color: var(--dim); }
.gate-brand .lines { margin-top: 34px; display: grid; gap: 12px; color: var(--mute); }
.gate-brand .lines li { display: flex; gap: 12px; align-items: center; }
.gate-brand .lines li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan-400); box-shadow: 0 0 10px var(--cyan-400); flex: none; }
.gate-card { padding: clamp(24px, 3vw, 40px); display: grid; gap: 20px; }
.gate-card h2 { font: 500 26px/1.3 var(--font-display); }
.gate-card .code { font: 500 26px/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; text-align: center; min-height: 64px; }
.gate-card .pairs .choice { min-width: 64px; justify-content: center; font-family: var(--font-mono); }
