@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink:    #111111;
  --muted:  #666666;
  --light:  #999999;
  --border: #e8e8e8;
  --bg:     #f7f7f7;
  --white:  #ffffff;
  --red:    #e53935;
  --indigo: #4f46e5;
  --green:  #16a34a;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0,0,0,.06);
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  min-height: 100vh;
  line-height: 1.5;
}

/* ── TOPBAR ── */
.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

.logo {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -.01em;
  text-decoration: none;
  color: var(--ink);
}

.logo b { color: var(--red); }
.nav-links { display: flex; align-items: center; gap: .5rem; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: .45rem 1.1rem;
  border-radius: 8px;
  font-size: .8rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  font-family: inherit;
  text-decoration: none;
  transition: opacity .15s, background .15s, transform .1s;
  white-space: nowrap;
  line-height: 1;
}

.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost  { background: none; color: var(--muted); }
.btn-ghost:hover { color: var(--ink); background: var(--bg); }
.btn-outline{ background: var(--white); color: var(--ink); border: 1px solid var(--border); }
.btn-outline:hover { border-color: #aaa; background: var(--bg); }
.btn-dark   { background: var(--ink); color: var(--white); }
.btn-dark:hover { opacity: .82; }
.btn-red    { background: var(--red); color: var(--white); }
.btn-red:hover { opacity: .85; }
.btn-green  { background: #dcfce7; color: var(--green); border: 1px solid #bbf7d0; }
.btn-green:hover { background: #bbf7d0; }
.btn-indigo { background: var(--indigo); color: var(--white); }
.btn-indigo:hover { opacity: .85; }
.btn-danger { background: #fff5f5; color: var(--red); border: 1px solid #fecdd3; }
.btn-danger:hover { background: #fee2e2; }
.btn-lg  { padding: .65rem 1.5rem; font-size: .88rem; border-radius: 10px; }
.btn-sm  { padding: .3rem .75rem; font-size: .72rem; }
.btn-full{ width: 100%; }

/* ── FORM ── */
.page-center {
  min-height: calc(100vh - 56px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow);
}

.form-title { font-size: 1.2rem; font-weight: 700; margin-bottom: .25rem; }
.form-sub   { font-size: .78rem; color: var(--muted); margin-bottom: 1.6rem; }

.field { margin-bottom: 1rem; }
.field label {
  display: block;
  font-size: .72rem;
  font-weight: 500;
  color: #555;
  margin-bottom: .3rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .6rem .8rem;
  font-size: .85rem;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
  background: var(--white);
  color: var(--ink);
}

.field input:focus,
.field select:focus,
.field textarea:focus { border-color: #888; }
.field textarea { resize: none; }
.field .hint { font-size: .68rem; color: var(--light); margin-top: .25rem; }

.prefix-wrap {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color .15s;
}

.prefix-wrap:focus-within { border-color: #888; }

.prefix-wrap .prefix {
  padding: .6rem .75rem;
  font-size: .75rem;
  color: var(--muted);
  background: var(--bg);
  border-right: 1px solid var(--border);
  white-space: nowrap;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.prefix-wrap input {
  border: none !important;
  border-radius: 0 !important;
  flex: 1;
  min-width: 0;
}

.alert {
  font-size: .75rem;
  border-radius: 8px;
  padding: .6rem .8rem;
  margin-bottom: 1rem;
  display: none;
}

.alert-err { background: #fff5f5; border: 1px solid #fecdd3; color: var(--red); }
.alert-ok  { background: #f0fdf4; border: 1px solid #bbf7d0; color: var(--green); }
.alert.show { display: block; }

.form-footer {
  text-align: center;
  font-size: .75rem;
  color: var(--muted);
  margin-top: 1.1rem;
}

.form-footer a {
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}

.form-footer a:hover { text-decoration: underline; }

/* ── GRID ── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.full-col { grid-column: 1 / -1; }
@media (max-width: 500px) { .two-col { grid-template-columns: 1fr; } }

/* ── CHIPS ── */
.chip {
  display: inline-block;
  font-size: .65rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 5px;
  background: var(--bg);
  color: var(--muted);
}

.chip-blue   { background: #e0f2fe; color: #0369a1; }
.chip-purple { background: #ede9fe; color: #6d28d9; }
.chip-yellow { background: #fef9c3; color: #92400e; }
.chip-red    { background: #fee2e2; color: #b91c1c; }
.chip-indigo { background: #eef2ff; color: #4338ca; }
.chip-green  { background: #dcfce7; color: #15803d; }

/* ── SECTION LABEL ── */
.section-label {
  font-size: .65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  margin: .8rem 0 .4rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── MODAL ── */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-bg.open { display: flex; }

.modal {
  background: var(--white);
  border-radius: 16px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.75rem;
  box-shadow: 0 20px 60px rgba(0,0,0,.15);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.modal-title { font-size: 1rem; font-weight: 600; }

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

/* ── PAGE LOADING ── */
.page-loading {
  min-height: calc(100vh - 56px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: .85rem;
}

/* ── SITE FOOTER ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.4rem 2rem;
  text-align: center;
  font-size: .72rem;
  color: #aaa;
  background: var(--white);
}

.site-footer a { color: #888; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ────────────────────────────────────
   LANDING PAGE
──────────────────────────────────── */
.hero {
  max-width: 700px;
  margin: 0 auto;
  padding: 5.5rem 2rem 4rem;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  background: #fff3e0;
  color: #e65100;
  font-size: .7rem;
  font-weight: 500;
  padding: .3rem .9rem;
  border-radius: 20px;
  letter-spacing: .04em;
  margin-bottom: 1.3rem;
}

.hero-h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.12;
  margin-bottom: 1.1rem;
}

.hero-h1 em { color: var(--red); font-style: normal; }

.hero-p {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.8;
  max-width: 500px;
  margin: 0 auto 2.2rem;
}

.hero-btns {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  flex-wrap: wrap;
}

.hero-note { font-size: .72rem; color: #bbb; margin-top: .9rem; }

.mock-browser {
  max-width: 700px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,.08);
}

.mock-bar {
  background: #f0f0f0;
  padding: .6rem 1rem;
  display: flex;
  align-items: center;
  gap: .4rem;
  border-bottom: 1px solid var(--border);
}

.mock-dot { width: 10px; height: 10px; border-radius: 50%; }
.mock-url {
  flex: 1;
  background: var(--white);
  border-radius: 5px;
  padding: .25rem .7rem;
  font-size: .7rem;
  color: var(--muted);
  font-family: monospace;
  margin: 0 .5rem;
}

.mock-screen {
  padding: 1.25rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: .6rem;
  background: var(--bg);
}

.mock-card {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.mock-thumb { aspect-ratio: 16/9; }
.mock-body  { padding: .5rem .6rem; }

.mock-line {
  height: 6px;
  border-radius: 3px;
  background: #e0e0e0;
  margin-bottom: .3rem;
}

.mock-line.short   { width: 60%; }
.mock-line.shorter { width: 40%; }

.preview-section {
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 3rem 2rem;
  text-align: center;
}

.preview-label {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.how-section { max-width: 900px; margin: 0 auto; padding: 4rem 2rem; }
.how-section h2 {
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 2.5rem;
  letter-spacing: -.01em;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.how-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
}

.how-num {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--white);
  font-size: .72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: .9rem;
}

.how-t { font-size: .92rem; font-weight: 600; margin-bottom: .4rem; }
.how-p { font-size: .78rem; color: var(--muted); line-height: 1.7; }

.jd-feature-section {
  background: linear-gradient(135deg, #eef2ff, #faf5ff);
  border-top: 1px solid #c7d2fe;
  border-bottom: 1px solid #c7d2fe;
  padding: 4rem 2rem;
  text-align: center;
}

.jd-feature-section h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1e1b4b;
  margin-bottom: .75rem;
}

.jd-feature-section p {
  font-size: .92rem;
  color: #6366f1;
  max-width: 500px;
  margin: 0 auto 1.8rem;
  line-height: 1.75;
}

.cta-band {
  background: var(--ink);
  padding: 4rem 2rem;
  text-align: center;
}

.cta-band h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: .75rem;
}

.cta-band p { font-size: .88rem; color: rgba(255,255,255,.45); margin-bottom: 1.8rem; }

/* ────────────────────────────────────
   DASHBOARD
──────────────────────────────────── */
.dash-body { max-width: 700px; margin: 0 auto; padding: 1.75rem 1.5rem 5rem; }

.profile-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.25rem;
}

.pc-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.pc-name { font-size: 1.05rem; font-weight: 700; }
.pc-url  { font-size: .75rem; color: var(--muted); margin-top: .2rem; font-family: monospace; }
.pc-url b { color: var(--ink); }
.pc-actions { display: flex; gap: .4rem; flex-shrink: 0; flex-wrap: wrap; }

.ambassador-badge {
  display: inline-block;
  margin-top: .5rem;
  font-size: .65rem;
  font-weight: 500;
  background: #fff8e1;
  color: #f57f17;
  border: 1px solid #ffe082;
  padding: 2px 8px;
  border-radius: 20px;
}

.username-setup {
  background: #fff8f0;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.username-setup p { font-size: .78rem; color: #9a3412; margin-bottom: .65rem; font-weight: 500; }

.username-row { display: flex; gap: .5rem; align-items: center; }
.username-row .prefix-wrap { flex: 1; }

/* JD Shuffle Card */
.jd-card {
  background: linear-gradient(135deg, #eef2ff 0%, #faf5ff 100%);
  border: 1px solid #c7d2fe;
  border-radius: 14px;
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.25rem;
}

.jd-card-head { display: flex; align-items: flex-start; gap: .75rem; margin-bottom: .9rem; }

.jd-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: var(--indigo);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.jd-title { font-size: .92rem; font-weight: 700; color: #1e1b4b; margin-bottom: .15rem; }
.jd-sub   { font-size: .75rem; color: #6366f1; line-height: 1.5; }

.jd-textarea {
  width: 100%;
  border: 1px solid #c7d2fe;
  border-radius: 9px;
  padding: .75rem .9rem;
  font-size: .8rem;
  font-family: inherit;
  resize: none;
  outline: none;
  background: var(--white);
  color: var(--ink);
  line-height: 1.7;
  transition: border-color .15s;
}

.jd-textarea:focus { border-color: var(--indigo); }
.jd-hint { font-size: .7rem; color: #818cf8; flex: 1; }
.jd-actions { display: flex; gap: .5rem; margin-top: .75rem; align-items: center; flex-wrap: wrap; }

.jd-result {
  background: var(--white);
  border: 1px solid #c7d2fe;
  border-radius: 10px;
  padding: 1.1rem 1.2rem;
  margin-top: 1rem;
  display: none;
}

.jd-result.show { display: block; }
.jd-result-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .75rem; flex-wrap: wrap; }

.jd-match-badge {
  font-size: .7rem;
  font-weight: 600;
  background: #dcfce7;
  color: #15803d;
  padding: .25rem .7rem;
  border-radius: 6px;
}

.jd-company { font-size: .88rem; font-weight: 600; color: var(--ink); }

.jd-reason {
  font-size: .75rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: .9rem;
  padding: .7rem .85rem;
  background: #f8f7ff;
  border-radius: 8px;
  border-left: 3px solid var(--indigo);
}

.jd-order-label {
  font-size: .65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  margin-bottom: .5rem;
}

.jd-order-list { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }

.jdo-item {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .5rem .7rem;
  background: var(--bg);
  border-radius: 7px;
  border: 1px solid var(--border);
}

.jdo-rank {
  width: 20px; height: 20px;
  border-radius: 5px;
  background: var(--indigo);
  color: var(--white);
  font-size: .62rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.jdo-thumb { width: 40px; aspect-ratio: 16/9; border-radius: 4px; flex-shrink: 0; }
.jdo-info  { flex: 1; min-width: 0; }
.jdo-title { font-size: .75rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jdo-why   { font-size: .65rem; color: var(--indigo); margin-top: .1rem; }

.jd-link-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: .75rem .9rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}

.jd-link-url {
  font-size: .72rem;
  font-family: monospace;
  color: #166534;
  flex: 1;
  word-break: break-all;
}

.jd-link-btns { display: flex; gap: .35rem; }

/* Share Banner */
.share-banner {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.share-title { font-size: .88rem; font-weight: 600; color: #14532d; margin-bottom: .2rem; }
.share-url   { font-size: .72rem; color: #166534; font-family: monospace; word-break: break-all; }
.share-btns  { display: flex; gap: .4rem; flex-shrink: 0; }

/* Add Video Button */
.add-video-btn {
  width: 100%;
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 1.1rem;
  background: none;
  font-size: .85rem;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  transition: border-color .15s, color .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  margin-bottom: 1rem;
}

.add-video-btn:hover { border-color: #999; color: var(--ink); }

/* Video row in dashboard */
.vri {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .75rem 1rem;
  margin-bottom: .4rem;
}

.vri-thumb { width: 72px; aspect-ratio: 16/9; border-radius: 6px; flex-shrink: 0; }
.vri-info  { flex: 1; min-width: 0; }
.vri-title { font-size: .83rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: .2rem; }
.vri-meta  { font-size: .7rem; color: var(--muted); }
.vri-actions { display: flex; gap: .3rem; flex-shrink: 0; }

/* Quality indicator */
.quality-bar-wrap { margin-top: .5rem; }
.quality-bar-label { font-size: .65rem; color: var(--muted); margin-bottom: .2rem; display: flex; justify-content: space-between; }
.quality-bar { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.quality-bar-fill { height: 100%; border-radius: 2px; background: var(--indigo); transition: width .3s; }

/* Empty state */
.empty { text-align: center; padding: 3rem 1rem; color: #ccc; }
.empty-icon { font-size: 2.5rem; margin-bottom: .75rem; }

/* Pro gate */
.pro-gate {
  background: #faf5ff;
  border: 1px dashed #c4b5fd;
  border-radius: 10px;
  padding: 1.25rem;
  text-align: center;
}

.pro-gate p { font-size: .82rem; color: #6d28d9; margin-bottom: .75rem; }

/* ────────────────────────────────────
   PORTFOLIO PAGE
──────────────────────────────────── */
.port-wrap { max-width: 660px; margin: 0 auto; padding: 1.5rem 1.25rem 5rem; }

.port-header {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.4rem 1.5rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.ph-name { font-size: 1.15rem; font-weight: 700; margin-bottom: .2rem; }
.ph-role { font-size: .78rem; color: var(--muted); }

/* Tailored banner */
.tailored-banner {
  background: linear-gradient(135deg, #eef2ff, #faf5ff);
  border: 1px solid #c7d2fe;
  border-radius: 12px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.25rem;
  display: none;
}

.tailored-banner.show { display: block; }
.tb-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .25rem; }
.tb-icon {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: var(--indigo);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  flex-shrink: 0;
}

.tb-title { font-size: .88rem; font-weight: 600; color: #1e1b4b; }
.tb-sub   { font-size: .75rem; color: #6366f1; margin-left: 34px; }

/* Share strip */
.share-strip {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: .9rem 1.1rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.ss-text { font-size: .78rem; color: #14532d; flex: 1; }
.ss-btns { display: flex; gap: .4rem; flex-shrink: 0; }

/* Category block */
.cat-block { margin-bottom: 1.75rem; }

.cat-head {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .65rem;
}

.cat-icon-lg    { font-size: .9rem; }
.cat-label-text {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
}

.cat-count-badge {
  font-size: .65rem;
  background: var(--bg);
  color: var(--muted);
  padding: 1px 7px;
  border-radius: 10px;
}

/* Video card */
.vcard {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: .4rem;
  overflow: hidden;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}

.vcard:hover { border-color: #ccc; box-shadow: 0 2px 10px rgba(0,0,0,.07); }
.vcard.is-open {
  border-color: var(--ink);
  border-radius: 12px 12px 0 0;
  margin-bottom: 0;
  box-shadow: none;
}

.vrow {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .8rem 1rem;
}

.vr-thumb {
  width: 82px;
  aspect-ratio: 16/9;
  border-radius: 7px;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vr-play {
  position: relative;
  z-index: 1;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 5px rgba(0,0,0,.15);
}

.vr-dur {
  position: absolute;
  bottom: 3px; right: 3px;
  font-size: .52rem;
  font-weight: 600;
  background: rgba(0,0,0,.75);
  color: var(--white);
  padding: 1px 4px;
  border-radius: 3px;
  z-index: 2;
}

.vr-rank-badge {
  position: absolute;
  top: 4px; left: 4px;
  z-index: 3;
  width: 20px; height: 20px;
  border-radius: 5px;
  background: var(--indigo);
  color: var(--white);
  font-size: .58rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vr-info    { flex: 1; min-width: 0; }
.vr-title   { font-size: .88rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: .3rem; }
.vr-chips   { display: flex; gap: .3rem; flex-wrap: wrap; }
.vr-chevron { font-size: .95rem; color: #ccc; flex-shrink: 0; transition: transform .22s, color .15s; }

.vcard.is-open .vr-chevron,
.vcard:hover .vr-chevron { color: var(--ink); }

.vcard.is-open .vr-chevron { transform: rotate(90deg); }

/* Detail panel */
.detail-panel {
  display: none;
  border: 1px solid var(--ink);
  border-top: 1px solid #e8e8e8;
  border-radius: 0 0 12px 12px;
  margin-bottom: .4rem;
  background: var(--white);
}

.detail-panel.is-open { display: block; }

.detail-inner { display: grid; grid-template-columns: 1fr 1fr; }

@media (max-width: 540px) { .detail-inner { grid-template-columns: 1fr; } }

.d-col { padding: 1.25rem 1.3rem; }
.d-col + .d-col { border-left: 1px solid var(--border); }

@media (max-width: 540px) {
  .d-col + .d-col { border-left: none; border-top: 1px solid var(--border); }
}

.d-label {
  font-size: .62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  margin-bottom: .8rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}

.dl-dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }

.d-big-thumb {
  aspect-ratio: 16/9;
  border-radius: 9px;
  overflow: hidden;
  margin-bottom: .9rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.d-big-thumb iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.d-big-play {
  position: relative;
  z-index: 1;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.95);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 14px rgba(0,0,0,.2);
  transition: transform .15s;
}

.d-big-thumb:hover .d-big-play { transform: scale(1.07); }

.d-desc  { font-size: .78rem; line-height: 1.85; color: #444; margin-bottom: .9rem; }
.d-tags  { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .9rem; }

.d-watch {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .78rem;
  font-weight: 500;
  background: var(--ink);
  color: var(--white);
  padding: .5rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity .15s;
}

.d-watch:hover { opacity: .8; }

/* AI box */
.ai-box {
  background: var(--bg);
  border-radius: 10px;
  padding: 1rem;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ai-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
}

.ai-dots { display: flex; gap: .3rem; }

.ai-dots span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--indigo);
  animation: bob 1.2s ease-in-out infinite;
}

.ai-dots span:nth-child(2) { animation-delay: .18s; }
.ai-dots span:nth-child(3) { animation-delay: .36s; }

@keyframes bob {
  0%, 100% { opacity: .2; transform: translateY(0); }
  50%       { opacity: 1;  transform: translateY(-4px); }
}

.ai-locked {
  text-align: center;
  padding: 1rem;
}

.ai-locked p   { font-size: .78rem; color: var(--muted); margin-bottom: .6rem; }
.ai-badge      { font-size: .62rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--indigo); margin-bottom: .5rem; }
.ai-text       { font-size: .78rem; line-height: 1.85; color: #333; }
.ai-kws        { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .75rem; padding-top: .65rem; border-top: 1px solid var(--border); }
.ai-kw         { font-size: .6rem; font-weight: 500; background: #eef2ff; color: #4338ca; padding: 2px 7px; border-radius: 4px; }

/* Port empty */
.port-empty { text-align: center; padding: 4rem 1rem; color: #ccc; font-size: .85rem; }

/* Flat ranked list label */
.ranked-label {
  font-size: .65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--indigo);
  margin-bottom: .65rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.ranked-label::after { content: ''; flex: 1; height: 1px; background: #c7d2fe; }

/* FolioApp branding footer on free portfolios */
.folio-brand-footer {
  border-top: 1px solid var(--border);
  padding: 1rem;
  text-align: center;
  font-size: .72rem;
  color: #aaa;
  background: var(--white);
}

.folio-brand-footer a { color: #888; text-decoration: none; }
.folio-brand-footer a:hover { text-decoration: underline; }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .topbar { padding: 0 1rem; }
  .hero   { padding: 5rem 1.25rem 3rem; }
  .dash-body { padding: 1.25rem 1rem 4rem; }
  .port-wrap { padding: 1.25rem 1rem 4rem; }
  .mock-screen { grid-template-columns: 1fr 1fr; }
  .mock-card:last-child { display: none; }
  .how-section { padding: 3rem 1.25rem; }
  .site-footer { padding: 1.2rem 1rem; }
  .profile-card { padding: 1.1rem 1.1rem; }
  .jd-card { padding: 1.1rem 1.1rem; }
}
