/* Pilot karakteri: portre, karakter oluşturma penceresi (public/character-ui.js) ve profildeki kimlik kartı */

.chr-portrait { position: relative; aspect-ratio: 200 / 240; border-radius: var(--radius-md); overflow: hidden; flex-shrink: 0;
  background: #05080e; box-shadow: 0 0 0 1px color-mix(in oklab, var(--acc, var(--color-accent)) 55%, transparent),
  0 0 24px color-mix(in oklab, var(--acc, var(--color-accent)) 22%, transparent); }
.chr-portrait .chr-svg { display: block; width: 100%; height: 100%; }
.chr-portrait.unset .chr-svg { filter: saturate(0.35) brightness(0.8); }
.chr-faction { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: var(--acc, var(--color-accent)); }

/* ---- Karakter oluşturma penceresi ---- */
#character-panel { width: min(96vw, 760px); }
.chr-intro { margin: 6px 0 10px; font-size: 13px; line-height: 1.5; color: var(--color-fg); }
.chr-editor { display: grid; grid-template-columns: minmax(200px, 280px) 1fr; gap: 16px; margin-top: 6px; }
.chr-stage { display: flex; flex-direction: column; gap: 10px; }
.chr-stage .chr-portrait { width: 100%; }
.chr-nameplate { padding: 10px 12px; border-radius: var(--radius-md); background: var(--color-bg-subtle);
  box-shadow: inset 0 0 0 1px var(--color-border); border-left: 3px solid var(--acc, var(--color-accent)); }
.chr-name { font-size: 17px; font-weight: 700; color: var(--color-fg); }
.chr-slogan-preview { margin-top: 6px; font-size: 12.5px; font-style: italic; line-height: 1.45; color: var(--color-muted); overflow-wrap: anywhere; }
.chr-slogan-preview:empty { display: none; }

.chr-controls { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.chr-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.chr-fields { display: flex; flex-direction: column; gap: 8px; min-height: 230px; }
.chr-row { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 10px; }
.chr-label { font-size: 12px; color: var(--color-muted); }
.chr-stepper { display: flex; align-items: center; gap: 6px; }
.chr-editor .chr-step { width: 30px; height: 30px; margin: 0; padding: 0; flex-shrink: 0; border-radius: var(--radius-sm); font-size: 11px;
  background: var(--color-bg-subtle); color: var(--color-fg); box-shadow: inset 0 0 0 1px var(--color-border-strong); }
.chr-editor .chr-step:hover { background: color-mix(in oklab, var(--color-accent) 25%, var(--color-bg-subtle)); }
.chr-val { flex: 1; min-width: 0; text-align: center; font-size: 13px; font-weight: 600; color: var(--color-fg); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.chr-val small { margin-left: 4px; font-weight: 400; font-size: 10.5px; color: var(--color-subtle); }
.chr-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.chr-editor .chr-sw { width: 24px; height: 24px; margin: 0; padding: 0; border-radius: 50%; background: var(--sw); cursor: pointer;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 18%), 0 0 0 1px rgb(0 0 0 / 50%); transition: transform 0.12s; }
.chr-editor .chr-sw:hover { transform: scale(1.12); }
.chr-editor .chr-sw.active { box-shadow: 0 0 0 2px var(--color-bg-elevated), 0 0 0 4px var(--color-accent); }
.chr-race-desc { margin: 4px 0 0; padding: 8px 10px; border-radius: var(--radius-sm); font-size: 12px; line-height: 1.5;
  color: var(--color-muted); background: color-mix(in oklab, var(--acc) 10%, var(--color-bg-subtle)); }
.chr-race-desc b { color: var(--acc); }
.chr-slogan-label { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; font-size: 12px; color: var(--color-muted); }
.chr-slogan-label input { grid-column: 1 / -1; margin: 0; width: 100%; box-sizing: border-box; }
.chr-count { grid-row: 1; grid-column: 2; font-size: 11px; color: var(--color-subtle); font-variant-numeric: tabular-nums; }
.chr-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
#character-panel .fr-btn { width: auto; margin: 0; padding: 6px 11px; font-size: 12px; font-weight: 600; border-radius: var(--radius-sm); white-space: nowrap; }
#character-panel .fr-btn.accept { background: var(--color-hull); color: var(--color-accent-fg); }
#character-panel .fr-btn.ghost { background: transparent; color: var(--color-fg); box-shadow: inset 0 0 0 1px var(--color-border-strong); }

@media (max-width: 620px) {
  .chr-editor { grid-template-columns: 1fr; }
  .chr-stage { flex-direction: row; align-items: flex-start; }
  .chr-stage .chr-portrait { width: 140px; }
  .chr-nameplate { flex: 1; min-width: 0; }
  .chr-fields { min-height: 0; }
}

/* ---- Profildeki kimlik kartı ---- */
#profile-panel { width: min(94vw, 500px); }
.profile-hero { display: flex; gap: 14px; margin-top: 6px; padding: 12px; border-radius: var(--radius-md);
  background: linear-gradient(135deg, color-mix(in oklab, var(--acc) 14%, var(--color-bg-subtle)), var(--color-bg-subtle) 60%);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--acc) 30%, var(--color-border)); }
.profile-hero .chr-portrait { width: 140px; }
.profile-hero-info { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; flex: 1; }
.profile-hero-info .profile-sub { margin-top: 0; }
.profile-slogan { margin: 4px 0 0; padding: 6px 0 6px 10px; border-left: 2px solid var(--acc); font-size: 13px; font-style: italic;
  line-height: 1.45; color: var(--color-fg); overflow-wrap: anywhere; }
.profile-slogan.empty { color: var(--color-subtle); font-size: 12px; }
.profile-hero-info .fr-btn { margin-top: auto; }

@media (max-width: 440px) {
  .profile-hero { flex-direction: column; align-items: center; text-align: center; }
  .profile-hero-info { align-items: center; }
}

/* ---- karakter oluşturucu: [ırk kartları | holografik portre | seçenekler] ---- */
#character-panel { width: min(96vw, 1120px); }
#character-panel .chr-editor { grid-template-columns: 230px minmax(240px, 320px) 1fr; gap: 18px; }
.chr-side { display: flex; flex-direction: column; gap: 6px; }
#character-panel .chr-race { display: flex; align-items: center; gap: 10px; width: 100%; margin: 0; padding: 9px 10px; text-align: left;
  border-radius: 2px; background: linear-gradient(90deg, color-mix(in oklab, var(--acc) 8%, transparent), rgb(0 0 0 / 25%));
  box-shadow: inset 0 0 0 1px rgb(170 205 230 / 12%), inset 2px 0 0 color-mix(in oklab, var(--acc) 40%, transparent); color: var(--color-fg); }
#character-panel .chr-race:hover { background: linear-gradient(90deg, color-mix(in oklab, var(--acc) 18%, transparent), rgb(0 0 0 / 20%)); filter: none; }
#character-panel .chr-race.active { background: linear-gradient(90deg, color-mix(in oklab, var(--acc) 30%, transparent), rgb(0 0 0 / 15%));
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--acc) 70%, transparent), inset 3px 0 0 var(--acc), 0 0 18px color-mix(in oklab, var(--acc) 25%, transparent); }
.chr-race-emb { width: 34px; height: 34px; flex: none; display: grid; place-items: center; font-size: 18px; color: var(--acc);
  border-radius: 50%; background: radial-gradient(circle, color-mix(in oklab, var(--acc) 30%, transparent), transparent 70%);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--acc) 55%, transparent); text-shadow: 0 0 8px var(--acc); }
.chr-race-txt { display: flex; flex-direction: column; min-width: 0; }
.chr-race-txt b { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; }
.chr-race-txt small { font-size: 11px; color: var(--color-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chr-gender { display: flex; gap: 4px; margin-top: 4px; }
.chr-gender .chr-chip { flex: 1; }
.chr-side .chr-race-desc { margin-top: 4px; }

/* holografik portre çerçevesi */
.chr-holo { position: relative; padding: 10px; }
.chr-holo .chr-portrait { width: 100%; border-radius: 2px; }
.chr-holo::before { content: ''; position: absolute; inset: 0; background:
  linear-gradient(rgb(90 209 255 / 6%) 1px, transparent 1px) 0 0 / 100% 12px,
  linear-gradient(90deg, rgb(90 209 255 / 6%) 1px, transparent 1px) 0 0 / 12px 100%; pointer-events: none; }
.chr-scan { position: absolute; left: 10px; right: 10px; height: 40%; top: 10px; pointer-events: none; border-radius: 2px;
  background: linear-gradient(180deg, transparent, color-mix(in oklab, var(--acc, #5ad1ff) 14%, transparent) 85%, color-mix(in oklab, var(--acc, #5ad1ff) 40%, transparent) 100%);
  animation: chrScan 3.2s ease-in-out infinite; mix-blend-mode: screen; }
@keyframes chrScan { 0% { transform: translateY(-10%); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateY(150%); opacity: 0; } }
.chr-corner { position: absolute; width: 16px; height: 16px; border: 2px solid var(--acc, var(--color-accent)); filter: drop-shadow(0 0 4px var(--acc, #5ad1ff)); }
.chr-corner.tl { top: 0; left: 0; border-right: none; border-bottom: none; }
.chr-corner.tr { top: 0; right: 0; border-left: none; border-bottom: none; }
.chr-corner.bl { bottom: 0; left: 0; border-right: none; border-top: none; }
.chr-corner.br { bottom: 0; right: 0; border-left: none; border-top: none; }
#character-panel .chr-nameplate { border-radius: 2px; background: rgb(0 0 0 / 30%); }
#character-panel .chr-name { letter-spacing: 0.08em; }

/* seçenek çipleri ve sekmeler */
#character-panel .chr-tabs .fr-btn { border-radius: 2px; text-transform: uppercase; letter-spacing: 0.08em; font-size: 11px; }
#character-panel .chr-row { grid-template-columns: 92px 1fr; align-items: start; }
#character-panel .chr-label { padding-top: 7px; text-transform: uppercase; letter-spacing: 0.08em; font-size: 10.5px; color: var(--color-subtle); }
.chr-chips { flex: 1; display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
#character-panel .chr-chip { width: auto; margin: 0; padding: 5px 9px; font-size: 11.5px; border-radius: 2px; background: rgb(255 255 255 / 3%);
  color: var(--color-muted); box-shadow: inset 0 0 0 1px rgb(170 205 230 / 14%); }
#character-panel .chr-chip:hover { color: var(--color-fg); background: rgb(90 209 255 / 8%); filter: none; }
#character-panel .chr-chip.active { color: #eaf7ff; background: rgb(90 209 255 / 18%); box-shadow: inset 0 0 0 1px rgb(90 209 255 / 60%); }
#character-panel .chr-stepper { align-items: flex-start; }
#character-panel .chr-step { border-radius: 2px; }
#character-panel .chr-sw { border-radius: 3px; }
@media (max-width: 900px) {
  #character-panel .chr-editor { grid-template-columns: 1fr; }
  .chr-side { flex-direction: row; flex-wrap: wrap; } #character-panel .chr-race { width: calc(50% - 3px); }
}
#character-panel .chr-fields { min-height: 180px; }
