/* ============================================================================
   LUMIQ STUDIO — UI COMPONENTS (Polished)
   ============================================================================ */

/* ---- API Key Overlay ---- */
.apikey-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
}

.apikey-inner {
  background: var(--bg2);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 420px;
  width: 90%;
  border: 1px solid var(--border-hi);
  box-shadow: var(--shadow-lg);
}

/* ---- Upload Slots ---- */
.isl {
  aspect-ratio: 1;
  width: 100%;
  max-width: 120px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  overflow: hidden;
  color: rgba(255, 255, 255, 0.5);
  min-height: unset;
  min-width: unset;
  box-sizing: border-box;
}

.upload-slot-with-note {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.upload-grid .isl {
  max-width: unset;
}

.isl span {
  color: rgba(255, 255, 255, 0.45);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.isl small {
  color: rgba(255, 255, 255, 0.2);
  font-size: 9px;
}

.isl:hover {
  background: rgba(155, 21, 21, 0.06);
  border-color: rgba(155,21,21,0.3);
  border-style: dashed;
  box-shadow: 0 0 16px rgba(155,21,21,0.08);
}

.isl.has-image {
  background-size: cover;
  background-position: center;
  border-style: solid;
}

.isl img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: calc(var(--radius-md) - 1px);
}

.isl-plus {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(155,21,21,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: rgba(155,21,21,0.6);
  margin-bottom: 6px;
  transition: all 0.2s var(--ease);
}

.isl:hover .isl-plus {
  background: rgba(155,21,21,0.25);
  color: rgba(155,21,21,0.9);
}

.isl-lbl {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  text-align: center;
  letter-spacing: 0.5px;
}

.isl-tag {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(129, 0, 0, 0.85);
  color: white;
  font-size: 8px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  backdrop-filter: blur(4px);
}

.isl-star {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 14px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}

.isl:hover .isl-star {
  opacity: 1;
}

.upload-slot {
  aspect-ratio: unset;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  color: white;
  transition: all 0.25s var(--ease);
  overflow: hidden;
  position: relative;
  min-height: 60px;
  min-width: 60px;
}

.upload-slot:hover {
  border-color: rgba(155,21,21,0.3);
  background: rgba(155,21,21,0.06);
}

.upload-slot.large {
  aspect-ratio: 1;
  min-height: unset;
}

.upload-slot-with-note {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.upload-with-notes,
.upload-with-note {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.upload-with-settings {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.upload-with-hex {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ---- Input Groups ---- */
.ig {
  margin-bottom: 12px;
}

.ig:last-child {
  margin-bottom: 0;
}

.il {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-sec);
  margin-bottom: 8px;
  letter-spacing: 0.8px;
}

.il::before {
  content: '';
  width: 3px;
  height: 12px;
  background: var(--accent);
  border-radius: 2px;
  opacity: 0.4;
}

/* ---- Text Inputs, Textareas, Selects ---- */
.ti,
.ta,
.sel {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  padding: 10px 14px;
  transition: all 0.2s var(--ease);
}

.ti::placeholder,
.ta::placeholder {
  color: var(--text-ter);
}

.ti:focus,
.ta:focus,
.sel:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg4);
  box-shadow: 0 0 0 3px rgba(155,21,21,0.12);
}

.ta {
  resize: vertical;
  min-height: 56px;
  line-height: 1.5;
  font-family: var(--mono);
  font-size: 12px;
}

.sel {
  cursor: pointer;
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(248,246,242,0.4)' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.sel::-ms-expand {
  display: none;
}

.text-input {
  width: 100%;
  padding: 10px 14px;
  font-size: 13px;
  font-family: var(--sans);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  outline: none;
  transition: all 0.2s var(--ease);
  box-sizing: border-box;
}

.text-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(155,21,21,0.12);
}

.text-input::placeholder {
  color: var(--text-ter);
}

.hex-input {
  width: 100%;
  padding: 8px 12px;
  font-size: 12px;
  font-family: var(--mono);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  outline: none;
  transition: all 0.2s var(--ease);
  box-sizing: border-box;
}

.hex-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(155,21,21,0.12);
}

.hex-input::placeholder {
  color: var(--text-ter);
}

.instructions-input {
  width: 100%;
  padding: 10px 14px;
  font-size: 13px;
  font-family: var(--sans);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  outline: none;
  resize: vertical;
  min-height: 60px;
  box-sizing: border-box;
  transition: all 0.2s var(--ease);
  line-height: 1.5;
}

.instructions-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(155,21,21,0.12);
}

.instructions-input::placeholder {
  color: var(--text-ter);
}

.small-note {
  width: 100%;
  padding: 4px 8px;
  font-size: 10px;
  font-family: var(--sans);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-sec);
  outline: none;
  resize: none;
  min-height: 22px;
  max-height: 32px;
  box-sizing: border-box;
  line-height: 1.3;
  transition: border-color 0.2s var(--ease);
}

.small-note:focus {
  border-color: var(--accent);
}

.small-note::placeholder {
  color: var(--text-ter);
}

.note-text {
  font-size: 10px;
  color: var(--text-ter);
  margin: 2px 0 0;
  line-height: 1.4;
}

.info-box {
  padding: 12px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-sec);
  line-height: 1.6;
}

.info-text {
  font-size: 12px;
  color: var(--text-sec);
  line-height: 1.6;
}

.required {
  font-size: 10px;
  color: var(--red);
  font-weight: 400;
  margin-left: 4px;
}

.optional {
  font-size: 10px;
  color: var(--text-ter);
  font-weight: 400;
  margin-left: 4px;
}

.inp-div {
  height: 1px;
  background: var(--border);
  margin: 10px 0;
}

/* ---- Pills ---- */
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill {
  padding: 5px 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-sec);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
}

.pill:hover {
  border-color: var(--border-hi);
  color: var(--text);
  transform: translateY(-1px);
}

.pill.on {
  background: var(--accent);
  border-color: var(--accent-hi);
  color: white;
  box-shadow: var(--shadow-glow);
}

.pill-btn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-sec);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.pill-btn:hover {
  background: var(--bg4);
  color: var(--text);
  transform: translateY(-1px);
}

.pill-btn.active,
.pill-btn.on {
  background: var(--accent);
  border-color: var(--accent-hi);
  color: white;
  box-shadow: var(--shadow-glow);
}

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

.option-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.star-btn {
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-ter);
  transition: all 0.2s var(--ease);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.star-btn:hover {
  color: var(--amber);
  transform: scale(1.15);
}

.star-btn.active,
.star-btn.hero {
  color: var(--amber);
}

.isl .star-btn {
  position: absolute;
  bottom: 4px;
  right: 4px;
  z-index: 4;
  font-size: 14px;
  width: 20px;
  height: 20px;
  background: rgba(0,0,0,0.5);
  border-radius: 50%;
  backdrop-filter: blur(4px);
}

/* ---- Collapsible Sections ---- */
.coll-hdr {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 8px 0;
  user-select: none;
  transition: color 0.2s var(--ease);
}

.coll-hdr:hover {
  color: var(--text);
}

.coll-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 10px;
  transition: transform 0.2s var(--ease);
  color: var(--text-ter);
}

.coll-hdr.collapsed .coll-arrow {
  transform: rotate(-90deg);
}

.coll-body {
  overflow: hidden;
  max-height: 1000px;
  transition: max-height 0.3s var(--ease);
}

.coll-body.collapsed {
  max-height: 0;
}

.collapsible-section {
  margin-bottom: 8px;
}

.collapsible-header {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 6px 0;
  user-select: none;
  color: var(--text-sec);
  font-size: 12px;
  font-weight: 600;
  transition: color 0.2s var(--ease);
}

.collapsible-header:hover {
  color: var(--text);
}

.collapsible-content {
  overflow: hidden;
  transition: max-height 0.3s var(--ease);
}

/* ---- Generation Bar (flush to panel bottom, edge-to-edge) ---- */
.gen-bar {
  position: sticky;
  bottom: 0;
  margin: auto -20px 0 -20px;
  background: var(--bg3);
  border: 1px solid var(--border-hi);
  border-bottom: none;
  border-left: none;
  border-right: none;
  border-radius: 12px 12px 0 0;
  padding: 14px 20px;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
  z-index: 5;
  left: auto;
  right: auto;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: visible;
}

.gen-bar.is-generating::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 3px;
  width: var(--gen-progress, 0%);
  background: var(--accent-bright);
  transition: width .3s ease-out;
  border-radius: 12px 12px 0 0;
}

.gen-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gen-section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-ter);
  letter-spacing: 0.8px;
  min-width: 50px;
}

.gen-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  flex-shrink: 0;
}

.gen-options {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  flex: 0 0 auto;
}

/* Vertical hairline divider between groups in the gen-bar */
.gen-options > .eng-tog + .res-tog,
.gen-options > .res-tog + .rat-pills,
.gen-options > .rat-pills + .gen-qty {
  position: relative;
  padding-left: 10px;
}

.gen-options > .eng-tog + .res-tog::before,
.gen-options > .res-tog + .rat-pills::before,
.gen-options > .rat-pills + .gen-qty::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 20px;
  background: var(--border);
}

.eng-tog,
.res-tog {
  display: flex;
  gap: 2px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.eng-tog .tog-opt,
.res-tog .tog-opt {
  padding: 5px 10px;
  background: transparent;
  border: none;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-sec);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.15s var(--ease);
}

.tog-opt {
  padding: 6px 13px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-sec);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.eng-tog .tog-opt.on,
.res-tog .tog-opt.on {
  background: var(--accent);
  border: none;
  color: #fff;
  box-shadow: none;
}

.tog-opt.on {
  background: var(--accent);
  border-color: var(--accent-hi);
  color: white;
  box-shadow: var(--shadow-glow);
}

.eng-tog .tog-opt:hover:not(.on),
.res-tog .tog-opt:hover:not(.on) {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.tog-opt:hover:not(.on) {
  border-color: var(--border-hi);
  color: var(--text);
  background: var(--bg4);
}

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

.rat-pills .rat {
  padding: 5px 9px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: 500 10px/1 var(--mono);
  color: var(--text-sec);
  cursor: pointer;
  transition: all 0.15s var(--ease);
  transform: none;
  box-shadow: none;
}

.rat-pills .rat.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
  box-shadow: none;
  transform: none;
}

.rat-pills .rat:hover:not(.on) {
  border-color: var(--border-hi);
  color: var(--text);
  transform: none;
}

/* Qty stepper inside gen-bar */
.gen-qty {
  display: flex;
  align-items: center;
  gap: 6px;
}

.gen-qty-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-sec);
  cursor: pointer;
  font: 500 14px/1 var(--sans);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.15s var(--ease);
}

.gen-qty-btn:hover {
  border-color: var(--border-hi);
  color: var(--text);
}

.gen-qty-val {
  font: 700 13px/1 var(--mono);
  color: var(--text);
  min-width: 16px;
  text-align: center;
}

/* ---- Generate Button (prototype: full-width, cost inline) ---- */
.btn-generate {
  margin-left: 0;
  width: 100%;
  height: 46px;
  padding: 0 18px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font: 600 14px/1 var(--sans);
  text-transform: none;
  cursor: pointer;
  letter-spacing: 0;
  transition: all 0.2s var(--ease);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(155, 21, 21, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.btn-generate .btn-generate-lbl {
  font: 600 14px/1 var(--sans);
}

.btn-generate .btn-generate-cost {
  font: 500 11px/1 var(--mono);
  opacity: 0.85;
}

.btn-generate::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-generate:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(155,21,21,0.4);
}

.btn-generate:hover::before {
  opacity: 1;
}

.btn-generate:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(155,21,21,0.3);
}

.btn-generate:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Generating state animation */
.btn-generate.generating {
  background: linear-gradient(270deg, #9B1515, #5a0808, #9B1515);
  background-size: 200% 100%;
  animation: genGradient 2s ease infinite;
}

@keyframes genGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.qty-input {
  width: 60px;
  padding: 6px 8px;
  font-size: 12px;
  font-family: var(--mono);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  outline: none;
  text-align: center;
  transition: border-color 0.2s var(--ease);
}

.qty-input:focus {
  border-color: var(--accent);
}

select {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  padding: 10px 14px;
  cursor: pointer;
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(248,246,242,0.4)' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  outline: none;
  transition: all 0.2s var(--ease);
}

select:focus {
  border-color: var(--accent);
  background-color: var(--bg4);
  box-shadow: 0 0 0 3px rgba(155,21,21,0.12);
}

select::-ms-expand {
  display: none;
}

.credit-cost-hidden { display: none; }

/* ---- AI Assist Tips ---- */
.ai-tip{position:fixed;bottom:80px;right:24px;z-index:9500;padding:10px 16px;border-radius:8px;font-family:var(--mono);font-size:.75rem;max-width:400px;cursor:pointer;transition:opacity .3s;box-shadow:0 4px 20px rgba(0,0,0,.4);line-height:1.4}
.ai-tip-icon{margin-right:6px;font-size:.85rem}
.ai-tip-success{background:rgba(40,120,60,.95);color:#e0f5e0;border:1px solid rgba(60,180,80,.3)}
.ai-tip-warning{background:rgba(160,120,20,.95);color:#fff5d0;border:1px solid rgba(200,160,40,.3)}
.ai-tip-error{background:rgba(160,40,40,.95);color:#ffe0e0;border:1px solid rgba(200,60,60,.3)}
.ai-tip-info{background:rgba(30,30,35,.95);color:rgba(248,246,242,.85);border:1px solid rgba(200,80,80,.3)}
.ai-enhance-btn{background:none;border:1px solid rgba(200,80,80,.4);color:#C85050;font-size:.65rem;padding:2px 8px;border-radius:4px;cursor:pointer;font-family:var(--mono);margin-left:8px;transition:all .2s}
.ai-enhance-btn:hover{background:rgba(200,80,80,.15);border-color:#C85050}
.ai-enhance-btn:disabled{opacity:.5;cursor:wait}

/* ---- Profile Popup ---- */
.profile-popup {
  position: fixed;
  bottom: 108px;
  left: 8px;
  width: 248px;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s, transform 0.18s;
  transform: translateY(8px);
}
.profile-popup.pop-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.profile-popup-card {
  background: var(--bg2);
  border: 1px solid var(--border-hi);
  border-radius: 14px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.3);
}
.profile-popup-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg3);
}
.profile-popup-info { flex: 1; min-width: 0; }
.profile-popup-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-popup-plan { font-size: 10px; color: var(--text-ter); margin-top: 2px; letter-spacing: 0.1px; }
.profile-nav-list { padding: 6px 0; }
.profile-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  font-size: 13px;
  color: var(--text-sec);
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
  border-radius: 0;
}
.profile-nav-item svg { flex-shrink: 0; opacity: 0.6; transition: opacity 0.1s; }
.profile-nav-item:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.profile-nav-item:hover svg { opacity: 1; }
.profile-nav-divider {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-ter);
  padding: 8px 16px 4px;
  margin-top: 2px;
  border-top: 1px solid var(--border);
}
.profile-signout {
  color: #e05252;
  margin-top: 2px;
  border-top: 1px solid var(--border);
}
.profile-signout:hover { background: rgba(224,82,82,0.08) !important; color: #e05252; }
.profile-signout svg { opacity: 0.7; }

/* Mobile: full-width bottom sheet */
@media (max-width: 768px) {
  .profile-popup {
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    transform: translateY(16px);
  }
  .profile-popup.pop-visible { transform: translateY(0); }
  .profile-popup-card {
    border-radius: 16px 16px 0 0;
    border-bottom: none;
    max-height: 85vh;
    overflow-y: auto;
  }
}
