/* ============================================================
   Pedagojiksoru_ Studio — modern, minimal, light theme
   Tasarım sistemi: Inter, beyaz kartlar, yumuşak gölgeler,
   indigo vurgu (#2563eb → #1d4ed8), geniş beyaz alan.
   ============================================================ */
:root {
  --ps-bg: #f4f6fb;
  --ps-card: #ffffff;
  --ps-border: #e7eaf3;
  --ps-border-strong: #d7dcea;
  --ps-text: #0f172a;
  --ps-body: #334155;
  --ps-muted: #64748b;
  --ps-faint: #94a3b8;
  --ps-accent: #2563eb;
  --ps-accent-2: #1d4ed8;
  --ps-violet: #7c3aed;
  --ps-teal: #0d9488;
  --ps-amber: #b45309;
  --ps-red: #dc2626;
  --ps-tint: #eef4ff;
  --ps-shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --ps-shadow: 0 8px 24px rgba(15, 23, 42, .07);
  --ps-shadow-lg: 0 18px 44px rgba(15, 23, 42, .10);
  --ps-radius: 18px;
  --ps-radius-sm: 12px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(900px 420px at 85% -8%, rgba(124, 58, 237, .06), transparent 60%),
    radial-gradient(900px 480px at 8% -10%, rgba(37, 99, 235, .08), transparent 60%),
    var(--ps-bg);
  font: 14px/1.55 'Inter', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  color: var(--ps-text);
  -webkit-font-smoothing: antialiased;
}

/* ---------- üst bar ---------- */
.ps-topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ps-border);
}
.ps-topbar-inner {
  max-width: 1440px; margin: 0 auto; padding: 12px 28px;
  display: flex; align-items: center; gap: 12px;
}
.ps-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 14px; letter-spacing: -.01em; color: var(--ps-text);
}
.ps-brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 10px; color: #fff; font-size: 15px;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  box-shadow: 0 6px 14px rgba(37, 99, 235, .35);
}
.ps-brand small { display: block; font-size: 10px; font-weight: 600; color: var(--ps-muted); letter-spacing: .02em; }
.ps-topbar-pill {
  margin-left: auto; display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 999px; font-size: 11px; font-weight: 700;
  background: var(--ps-tint); color: var(--ps-accent-2); border: 1px solid #d8e4ff;
}
.ps-topbar-pill i { font-size: 10px; }

/* ---------- kabuk ---------- */
.ps-shell { max-width: 1440px; margin: 0 auto; padding: 26px 28px 48px; }

/* ---------- hero ---------- */
.ps-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #ffffff 0%, #f5f8ff 55%, #f1efff 100%);
  border: 1px solid var(--ps-border);
  border-radius: 24px;
  box-shadow: var(--ps-shadow);
  padding: 38px 40px;
  display: flex; justify-content: space-between; gap: 32px; align-items: center;
}
.ps-hero::before, .ps-hero::after {
  content: ''; position: absolute; border-radius: 50%; pointer-events: none;
}
.ps-hero::before { width: 340px; height: 340px; right: -90px; top: -140px; background: radial-gradient(circle, rgba(37, 99, 235, .10), transparent 65%); }
.ps-hero::after { width: 260px; height: 260px; right: 150px; bottom: -150px; background: radial-gradient(circle, rgba(124, 58, 237, .09), transparent 65%); }
.ps-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px; border-radius: 999px;
  background: #fff; border: 1px solid var(--ps-border-strong);
  color: var(--ps-accent-2); font-size: 10.5px; font-weight: 800; letter-spacing: .12em;
  box-shadow: var(--ps-shadow-sm);
}
.ps-hero h1 {
  margin: 14px 0 10px; font-size: 33px; line-height: 1.16; letter-spacing: -.02em;
  max-width: 720px; font-weight: 800;
  background: linear-gradient(90deg, #0f172a 20%, #1d4ed8 65%, #7c3aed 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ps-hero p { max-width: 680px; margin: 0; color: var(--ps-muted); font-size: 14px; }
.ps-hero-steps { position: relative; z-index: 1; display: grid; gap: 9px; white-space: nowrap; }
.ps-hero-steps span {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 14px; border-radius: 12px; font-size: 12px; font-weight: 700; color: var(--ps-body);
  background: rgba(255, 255, 255, .85); border: 1px solid var(--ps-border);
  box-shadow: var(--ps-shadow-sm);
}
.ps-hero-steps span b {
  display: grid; place-items: center; width: 21px; height: 21px; border-radius: 7px;
  background: var(--ps-tint); color: var(--ps-accent-2); font-size: 10.5px; font-weight: 800;
}

/* ---------- uyarı ---------- */
.ps-hero-steps a.ps-hero-library {
  display: flex; align-items: center; gap: 9px; margin-left: 0;
  padding: 10px 14px; border-radius: 12px; font-size: 12px; font-weight: 800;
  color: #1d4ed8; background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 1px solid #93c5fd; box-shadow: 0 6px 16px rgba(37, 99, 235, .18);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.ps-hero-steps a.ps-hero-library:hover {
  color: #1e3a8a; background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  box-shadow: 0 9px 20px rgba(37, 99, 235, .26); transform: translateY(-1px);
}
.ps-hero-steps a.ps-hero-library i { font-size: 13px; }

.ps-account-card {
  margin: 16px 0 0; padding: 13px 16px; border-radius: 14px;
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1px solid var(--ps-border); box-shadow: var(--ps-shadow-sm);
}
.ps-account-card.ready { border-color: #a7f3d0; background: linear-gradient(135deg, #f0fdf4, #ecfeff); }
.ps-account-card.attention { border-color: #fde68a; background: linear-gradient(135deg, #fffbeb, #fff7ed); }
.ps-account-icon { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; color: #fff; background: linear-gradient(135deg, #2563eb, #7c3aed); }
.ps-account-card.ready .ps-account-icon { background: linear-gradient(135deg, #059669, #0891b2); }
.ps-account-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; color: var(--ps-body); font-size: 12px; }
.ps-account-copy strong { color: var(--ps-text); font-size: 13px; }
.ps-account-copy span { color: var(--ps-muted); }
.ps-account-copy b { color: var(--ps-accent-2); }
.ps-account-actions { margin-left: auto; flex: 0 0 auto; }
.ps-account-btn, .ps-account-ok { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 9px; font-size: 11px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.ps-account-btn { color: #92400e; background: #fef3c7; border: 1px solid #fcd34d; }
.ps-account-btn:hover { color: #78350f; background: #fde68a; }
.ps-account-btn.primary { color: #fff; background: linear-gradient(135deg, #2563eb, #4f46e5); border-color: transparent; box-shadow: 0 5px 12px rgba(37, 99, 235, .22); }
.ps-account-btn.primary:hover { color: #fff; background: linear-gradient(135deg, #1d4ed8, #4338ca); }
.ps-account-ok { color: #047857; background: #d1fae5; border: 1px solid #a7f3d0; }

.ps-alert { margin: 18px 0 0; padding: 14px 18px; border-radius: var(--ps-radius-sm); font-size: 13px; display: flex; gap: 10px; align-items: flex-start; }
.ps-alert i { margin-top: 2px; }
.ps-alert code { background: rgba(180, 83, 9, .1); padding: 1px 6px; border-radius: 6px; font-size: 12px; }
.ps-alert-warning { background: #fffaeb; border: 1px solid #f5dfa8; color: #795000; }

/* ---------- çalışma alanı ---------- */
.ps-workspace { margin-top: 22px; display: grid; grid-template-columns: minmax(420px, .94fr) minmax(460px, 1.06fr); gap: 22px; align-items: start; }
.ps-builder, .ps-preview {
  background: var(--ps-card); border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius); box-shadow: var(--ps-shadow);
}
.ps-builder { padding: 28px; }
.ps-preview { padding: 24px; position: sticky; top: 76px; }

/* ---------- bölüm başlıkları ---------- */
.ps-panel-head, .ps-preview-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin: 0 0 18px; }
.ps-panel-head:not(:first-child) { border-top: 1px solid var(--ps-border); padding-top: 26px; margin-top: 28px; }
.ps-panel-head h2, .ps-preview-head h2 { font-size: 16px; margin: 0; display: inline; letter-spacing: -.01em; font-weight: 800; }
.ps-panel-head small { color: var(--ps-faint); font-size: 11.5px; font-weight: 500; }
.ps-section-no {
  display: inline-grid; place-items: center; width: 26px; height: 26px;
  background: linear-gradient(135deg, #2563eb, #4f46e5); color: #fff;
  font-weight: 800; font-size: 11px; border-radius: 8px; margin-right: 9px;
  box-shadow: 0 4px 10px rgba(37, 99, 235, .3);
}

/* ---------- form elemanları ---------- */
label { display: block; font-weight: 700; color: #3f4c63; margin-bottom: 14px; font-size: 11.5px; letter-spacing: .01em; }
input, select, textarea {
  display: block; width: 100%; margin-top: 6px;
  border: 1px solid var(--ps-border-strong); border-radius: 10px;
  padding: 10px 12px; background: #fbfcfe; color: var(--ps-text);
  font: inherit; font-weight: 400; outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input:hover, select:hover, textarea:hover { border-color: #c3cbe0; }
input:focus, select:focus, textarea:focus { border-color: var(--ps-accent); background: #fff; box-shadow: 0 0 0 3.5px rgba(37, 99, 235, .13); }
textarea { resize: vertical; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2364748b' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 30px; }
.ps-model-row { width: 100%; margin-top: 16px; }
.ps-model-field { position: relative; z-index: 12; width: 100%; }
.ps-model-selector { position: relative; margin-top: 6px; }
.ps-model-native { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.ps-model-button { width: 100%; min-height: 43px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 13px; border: 1px solid var(--ps-accent); border-radius: 10px; background: #fff; color: var(--ps-accent); font: inherit; font-weight: 500; cursor: pointer; text-align: left; box-shadow: 0 0 0 2px rgba(37,99,235,.06); }
.ps-model-button:hover, .ps-model-button[aria-expanded="true"] { background: #f7faff; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.ps-model-button-copy { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.ps-model-button-copy i { color: #16213d; font-size: 14px; }
.ps-model-button-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-model-chevron { font-size: 10px; transition: transform .18s ease; }
.ps-model-button[aria-expanded="true"] .ps-model-chevron { transform: rotate(180deg); }
.ps-model-menu { position: absolute; top: calc(100% + 6px); left: 0; right: 0; max-height: 410px; overflow-y: auto; padding: 0 0 7px; background: #fff; border: 1px solid #dfe4ee; border-radius: 12px; box-shadow: 0 14px 30px rgba(15,23,42,.16); z-index: 40; }
.ps-model-menu[hidden] { display: none; }
.ps-model-menu-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px 7px; color: var(--ps-text); background: #f8fafc; border-bottom: 1px solid #edf0f5; }
.ps-model-menu-head strong { font-size: 11px; }
.ps-model-menu-head span { color: var(--ps-muted); font-size: 9.5px; font-weight: 500; }
.ps-model-search { position: relative; padding: 8px 10px 5px; }
.ps-model-search i { position: absolute; left: 20px; top: 18px; color: var(--ps-faint); font-size: 11px; }
.ps-model-search input { margin: 0; padding: 8px 10px 8px 29px; border-radius: 8px; background: #fbfcfe; font-size: 11px; }
.ps-model-section { padding: 3px 0 4px; }
.ps-model-section-head { display: flex; align-items: center; justify-content: space-between; padding: 7px 12px; background: #f8fafc; color: var(--ps-muted); font-size: 10px; font-weight: 800; }
.ps-model-section-head em, .ps-model-badge { padding: 2px 6px; border-radius: 4px; background: #e9ecef; color: #475569; font-size: 9px; font-style: normal; }
.ps-model-section-head em.premium, .ps-model-badge.premium { background: #fff1f2; color: #be123c; }
.ps-model-list { display: flex; flex-direction: column; gap: 2px; padding: 4px 5px; }
.ps-model-option { width: 100%; display: flex; align-items: flex-start; gap: 8px; padding: 8px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--ps-text); text-align: left; cursor: pointer; font: inherit; }
.ps-model-option:hover, .ps-model-option.active { background: #e8f3ff; color: var(--ps-accent-2); }
.ps-model-option.is-locked { opacity: .58; }
.ps-model-option.is-locked:hover { background: #fff7ed; color: #9a3412; }
.ps-model-option-icon { display: grid; place-items: center; width: 20px; height: 20px; flex: 0 0 20px; color: #334155; font-size: 11px; }
.ps-model-option-copy { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.ps-model-option-name { font-size: 11.5px; font-weight: 700; line-height: 1.35; }
.ps-model-option-meta { color: #64748b; font-size: 10px; font-weight: 500; line-height: 1.35; white-space: pre-line; }
.ps-model-option-id { color: #94a3b8; font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-model-option-badges { margin-left: auto; display: flex; gap: 3px; flex: 0 0 auto; }
.ps-model-badge.new { background: #ecfdf5; color: #047857; }
.ps-model-premium-note { margin: 3px 9px 5px; padding: 7px 8px; border: 1px solid #fed7aa; border-radius: 7px; background: #fff7ed; color: #9a3412; font-size: 10px; }
.ps-model-empty { padding: 10px; color: var(--ps-muted); font-size: 10.5px; text-align: center; }
.ps-model-help { display: block; margin-top: 5px; color: var(--ps-faint); font-size: 9.5px; font-weight: 500; }
.ps-grid { display: grid; gap: 13px; }
.ps-grid.two { grid-template-columns: 1fr 1fr; }
.ps-grid.four { grid-template-columns: repeat(3, minmax(0, 1fr)); }
fieldset { border: 0; padding: 0; margin: 4px 0 18px; }
legend { font-size: 11.5px; font-weight: 700; color: #3f4c63; margin-bottom: 9px; letter-spacing: .01em; }

/* ---------- tür çipleri ---------- */
.ps-chip-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.ps-chip input { position: absolute; opacity: 0; }
.ps-chip span {
  display: block; padding: 8px 13px; border: 1px solid var(--ps-border-strong);
  border-radius: 999px; background: #fff; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--ps-body);
  transition: all .15s;
}
.ps-chip span:hover { border-color: var(--ps-accent); color: var(--ps-accent-2); transform: translateY(-1px); }
.ps-chip input:checked + span {
  border-color: var(--ps-accent); background: var(--ps-tint); color: var(--ps-accent-2);
  box-shadow: 0 3px 10px rgba(37, 99, 235, .16);
}

/* ---------- bilgi kutuları ve üret butonu ---------- */
.ps-tree-info { font-size: 11.5px; color: var(--ps-muted); margin: 2px 0 14px; line-height: 1.5; }
.ps-privacy {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--ps-radius-sm);
  background: #ecfdf5; border: 1px solid #b8ecd4; color: #116b45; font-size: 12px; margin: 4px 0 16px;
}
.ps-privacy i { margin-top: 2px; }
.ps-privacy span { font-weight: 800; }
.ps-generate {
  width: 100%; padding: 15px; border: 0; border-radius: 14px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff; font-size: 15px; font-weight: 800; letter-spacing: .01em; cursor: pointer;
  box-shadow: 0 10px 24px rgba(37, 99, 235, .35);
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.ps-generate:hover { transform: translateY(-1.5px); box-shadow: 0 14px 30px rgba(37, 99, 235, .42); filter: brightness(1.03); }
.ps-generate:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.ps-generate i { margin-right: 7px; }

/* ---------- müfredat içe aktarma ---------- */
details.ps-import { margin-top: 4px; margin-bottom: 16px; border: 1px dashed var(--ps-border-strong); border-radius: var(--ps-radius-sm); padding: 12px 14px; background: #fafbfe; }
details.ps-import summary { font-size: 12px; font-weight: 800; color: #33445f; cursor: pointer; display: flex; gap: 8px; align-items: center; }
details.ps-import summary i { color: var(--ps-accent); }
details.ps-import textarea { margin-top: 10px; font-family: 'Cascadia Code', Consolas, monospace; font-size: 11px; }
details.ps-import button {
  margin-top: 9px; border: 1px solid var(--ps-accent); color: var(--ps-accent-2); background: #fff;
  padding: 8px 14px; border-radius: 9px; font-weight: 800; font-size: 12px; cursor: pointer; transition: all .15s;
}
details.ps-import button:hover { background: var(--ps-tint); }

/* ---------- durum rozetleri ---------- */
.ps-status { padding: 5px 11px; border-radius: 99px; font-size: 11px; font-weight: 800; letter-spacing: .01em; }
.ps-status.idle { background: #f1f4f9; color: var(--ps-muted); }
.ps-status.working { background: var(--ps-tint); color: var(--ps-accent-2); }
.ps-status.done { background: #e5f8f0; color: #0e7a56; }
.ps-status.error { background: #fdeeee; color: #c53c3c; }
.ps-status-card {
  padding: 16px 18px; border: 1px dashed var(--ps-border-strong); border-radius: 14px;
  background: #fafbfe; color: var(--ps-muted); font-size: 12.5px;
}
.ps-status-card strong { color: var(--ps-text); font-size: 13px; }
.ps-status-card p { margin: 5px 0 0; }

/* ---------- MEB uyum rozeti ---------- */
.ps-meb-badge { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .01em; white-space: nowrap; }
.ps-meb-badge i { font-size: 10px; }
.ps-meb-badge.verified { background: #e5f8ec; color: #116b45; border: 1px solid #b8ecd4; }
.ps-meb-badge.prealigned { background: #fff7e3; color: #8a5b00; border: 1px solid #f0d9a0; }
.ps-meb-badge.unverified { background: #f1f4f9; color: #5c6a84; border: 1px solid var(--ps-border-strong); }

/* ---------- stüdyo çubuğu ---------- */
.ps-studio-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.ps-studio-bar button {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 13px; border: 1px solid var(--ps-border-strong); border-radius: 10px;
  background: #fff; font: 700 12px 'Inter', inherit; color: #21314f; cursor: pointer;
  transition: all .15s;
}
.ps-studio-bar button:hover { border-color: var(--ps-accent); color: var(--ps-accent-2); background: var(--ps-tint); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37, 99, 235, .14); }

/* ---------- kalite paneli ---------- */
.ps-quality { margin-top: 13px; padding: 14px 16px; border-radius: 14px; background: #fafbfe; border: 1px solid var(--ps-border); }
.ps-quality h3 { font-size: 13px; margin: 0 0 7px; font-weight: 800; }
.ps-quality ul { padding-left: 18px; margin: 6px 0; color: var(--ps-body); font-size: 12px; }
.ps-quality li { margin: 3px 0; }
.ps-quality p { font-size: 12px; color: var(--ps-muted); margin: 4px 0 0; }

/* ---------- kağıt / soru kartları ---------- */
.ps-paper {
  margin-top: 15px; background: #fff; border: 1px solid var(--ps-border);
  border-radius: 16px; min-height: 420px; padding: 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 4px 16px rgba(15, 23, 42, .04);
}
.ps-paper-placeholder { text-align: center; color: #9aa7bd; margin-top: 110px; }
.ps-paper-placeholder span { display: block; font-size: 36px; color: #c3cee4; }
.ps-paper-placeholder strong { color: #58667f; }
.ps-paper-placeholder p { font-size: 12px; }
.ps-paper-header { border-bottom: 2px solid #eef1f8; padding-bottom: 12px; margin-bottom: 12px; }
.ps-paper-header h3 { font-size: 17px; margin: 0; letter-spacing: -.01em; outline: none; }
.ps-paper-header p { margin: 3px 0 0; color: var(--ps-muted); font-size: 12px; outline: none; }
.ps-paper-header h3:focus, .ps-paper-header p:focus { background: var(--ps-tint); border-radius: 6px; }

.ps-qcard { border: 1px solid var(--ps-border); border-radius: 14px; background: #fff; margin-bottom: 11px; overflow: hidden; transition: box-shadow .15s, border-color .15s; }
.ps-qcard:hover { border-color: var(--ps-border-strong); box-shadow: var(--ps-shadow-sm); }
.ps-qcard.dragging { opacity: .45; }
.ps-qcard.dragover { box-shadow: 0 0 0 2px var(--ps-accent); border-color: var(--ps-accent); }
.ps-qcard-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; padding: 9px 12px; background: #fafbfe; border-bottom: 1px solid var(--ps-border); cursor: grab; }
.ps-qcard-head:active { cursor: grabbing; }
.ps-qcard-head .drag-handle { color: #b3bfd4; font-size: 14px; cursor: grab; }
.ps-qno { font-weight: 800; color: var(--ps-accent-2); font-size: 13px; }
.ps-qtag { font-size: 10px; background: var(--ps-tint); color: #3d5583; padding: 2.5px 7px; border-radius: 7px; font-weight: 700; }
.ps-qtag.lock { background: #fff3d9; color: #8a5b00; }
.ps-qtag.model { background: #e6f7f3; color: #0e7466; }
.ps-qtools { margin-left: auto; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.ps-qtools button {
  border: 1px solid var(--ps-border-strong); background: #fff; border-radius: 8px;
  padding: 4px 9px; font-size: 11px; font-weight: 700; color: #3d5583; cursor: pointer; transition: all .13s;
}
.ps-qtools button:hover { border-color: var(--ps-accent); color: var(--ps-accent-2); background: var(--ps-tint); }
.ps-qtools button.danger:hover { border-color: var(--ps-red); color: var(--ps-red); background: #fef2f2; }
.ps-qtools button:disabled { opacity: .45; cursor: not-allowed; }
.ps-qtools select { width: auto; margin: 0; padding: 3px 22px 3px 7px; font-size: 11px; border-radius: 8px; font-weight: 700; color: #3d5583; }
.ps-qcard-body { padding: 12px 14px; font-size: 12.5px; color: var(--ps-body); }
.ps-qcard-body .stem { font-weight: 700; white-space: pre-wrap; color: var(--ps-text); }
.ps-qcard-body .extra { margin-top: 8px; padding: 8px 10px; border-radius: 9px; background: #f8faff; border: 1px dashed #d4def2; white-space: pre-wrap; font-size: 11px; color: #42557a; }
.ps-qcard-body .opts { margin: 7px 0 0; padding-left: 20px; }
.ps-qcard-body .opts li { margin: 2px 0; }
.ps-qcard-body .badges { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.ps-qcard-body .badges span { font-size: 10.5px; padding: 3px 8px; border-radius: 7px; background: #fffaeb; border: 1px solid #f0d9a0; color: #8a5b00; font-weight: 600; }

/* ---------- sonuç bağlantıları ---------- */
.ps-result-links { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 14px; }
.ps-result-links a {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 13px; border-radius: 10px; background: var(--ps-tint); border: 1px solid #d8e4ff;
  color: var(--ps-accent-2); text-decoration: none; font-size: 12px; font-weight: 800; transition: all .15s;
}
.ps-result-links a:hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(37, 99, 235, .18); }
.ps-result-links button {
  padding: 9px 13px; border: 0; border-radius: 10px; cursor: pointer;
  background: linear-gradient(135deg, #059669, #0d9488); color: #fff; font: 800 12px 'Inter', inherit;
  box-shadow: 0 5px 14px rgba(13, 148, 136, .3); transition: all .15s;
}
.ps-result-links button:hover { transform: translateY(-1px); }
.ps-result-links button:disabled { opacity: .55; transform: none; }

/* ---------- modallar ---------- */
.ps-modal-back { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); backdrop-filter: blur(3px); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; z-index: 90; overflow: auto; }
.ps-modal { background: #fff; border-radius: 20px; max-width: 880px; width: 100%; padding: 24px 26px; box-shadow: 0 30px 80px rgba(15, 23, 42, .35); animation: ps-pop .18s ease-out; }
@keyframes ps-pop { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.ps-modal h3 { margin: 0 0 14px; font-size: 17px; letter-spacing: -.01em; font-weight: 800; }
.ps-modal .close-x { float: right; border: 0; background: #f1f4f9; width: 28px; height: 28px; border-radius: 8px; font-size: 13px; cursor: pointer; color: #64748b; transition: all .13s; }
.ps-modal .close-x:hover { background: #fdeeee; color: var(--ps-red); }
.ps-modal label { font-size: 11px; }
.ps-modal .row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.ps-modal .actions { display: flex; gap: 9px; justify-content: flex-end; margin-top: 16px; }
.ps-modal .actions button { padding: 10px 17px; border-radius: 10px; border: 0; font-weight: 800; font-size: 12.5px; cursor: pointer; transition: all .15s; }
.ps-modal .actions .primary { background: linear-gradient(135deg, #2563eb, #1d4ed8); color: #fff; box-shadow: 0 6px 16px rgba(37, 99, 235, .3); }
.ps-modal .actions .primary:hover { transform: translateY(-1px); }
.ps-modal .actions .ghost { background: #f1f4f9; color: #33445f; }
.ps-modal .actions .ghost:hover { background: #e5eaf3; }

/* ---------- model karşılaştırma adayları ---------- */
.ps-cand { border: 1px solid var(--ps-border); border-radius: 13px; padding: 13px 15px; margin-top: 11px; font-size: 12.5px; background: #fff; transition: border-color .15s; }
.ps-cand.best { border-color: #34d399; background: #f2fdf7; box-shadow: 0 4px 16px rgba(16, 185, 129, .12); }
.ps-cand .chead { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-weight: 800; color: var(--ps-text); font-size: 12px; }
.ps-cand .stem { margin-top: 7px; white-space: pre-wrap; color: var(--ps-body); }
.ps-cand button { margin-top: 9px; border: 0; background: linear-gradient(135deg, #2563eb, #1d4ed8); color: #fff; padding: 7px 14px; border-radius: 9px; font-weight: 800; font-size: 11px; cursor: pointer; box-shadow: 0 4px 12px rgba(37, 99, 235, .28); transition: all .15s; }
.ps-cand button:hover { transform: translateY(-1px); }

/* ---------- küçük ekran kartı (önizleme) ---------- */
.ps-mini-question { border-bottom: 1px solid #eef1f8; padding: 13px 0; }
.ps-mini-meta { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 5px; }
.ps-mini-meta span { font-size: 10px; color: #40526e; background: var(--ps-tint); padding: 2px 6px; border-radius: 6px; font-weight: 700; }
.ps-mini-question strong { font-size: 12px; }
.ps-mini-options { margin: 7px 0 0; padding-left: 17px; font-size: 12px; }
.ps-mini-visual { margin: 7px 0 0; padding: 8px; border: 1px dashed #b9cdf0; border-radius: 8px; background: #f7faff; color: #45617d; font-size: 11px; }

/* ---------- duyarlılık ---------- */
@media (max-width: 1080px) {
  .ps-workspace { grid-template-columns: 1fr; }
  .ps-preview { position: static; }
  .ps-hero { flex-direction: column; align-items: flex-start; }
  .ps-hero-steps { white-space: normal; }
}
@media (max-width: 640px) {
  .ps-shell { padding: 14px 14px 32px; }
  .ps-topbar-inner { padding: 10px 14px; }
  .ps-hero { padding: 26px 22px; border-radius: 18px; }
  .ps-hero h1 { font-size: 25px; }
  .ps-account-card { align-items: flex-start; flex-wrap: wrap; }
  .ps-account-actions { width: 100%; margin-left: 46px; }
  .ps-grid.two, .ps-grid.four { grid-template-columns: 1fr; }
  .ps-builder { padding: 20px; }
  .ps-preview { padding: 18px; }
  .ps-paper { padding: 16px; }
  .ps-modal .row { grid-template-columns: 1fr; }
}
