/* ============================================================
   Studio panels: notifications, membership, settings, versions,
   layers, help, export, asset details, assistant & tour
   ============================================================ */

/* topbar badges */
.top-badge {
  position: absolute;
  top: 3px; right: 3px;
  min-width: 11px;
  height: 11px;
  padding: 0 3px;
  border-radius: 6px;
  background: #6ea8ff;
  color: #0b0b0c;
  font-size: 7.5px;
  line-height: 11px;
  text-align: center;
  font-weight: 700;
  box-shadow: 0 0 0 2px #121213;
}
.icon-btn { position: relative; }

/* notifications */
.noti-list { display: flex; flex-direction: column; gap: 2px; }
.noti-row {
  display: flex;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 7px;
}
.noti-row:hover { background: rgba(255,255,255,0.035); }
.noti-row.is-unread { background: rgba(110,168,255,0.055); }
.noti-ic {
  width: 26px; height: 26px;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  background: #212124;
  color: #9db9e8;
  flex: none;
}
.noti-main { min-width: 0; }
.noti-title { font-size: 11.5px; color: #e2e2e6; }
.noti-desc { font-size: 10.5px; color: #8b8b93; line-height: 1.55; margin-top: 3px; }
.noti-time { font-size: 9px; color: #5f5f67; margin-top: 4px; }

/* membership */
.member-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(233,201,141,0.1), rgba(20,20,21,0.4));
  box-shadow: inset 0 0 0 1px rgba(233,201,141,0.18);
}
.member-heart {
  width: 34px; height: 34px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  color: #e9c98d;
  background: rgba(233,201,141,0.12);
}
.member-label { font-size: 9.5px; color: #8b8b93; }
.member-num { font-size: 24px; color: #f2e6cd; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.member-plan { margin-left: auto; font-size: 9px; padding: 3px 6px; border-radius: 4px; color: #e9c98d; background: rgba(233,201,141,0.1); }
.member-tip { font-size: 10.5px; color: #74747c; line-height: 1.7; margin: 12px 0; }
.member-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 2px;
  border-top: 1px solid rgba(255,255,255,0.055);
}
.member-row-t { font-size: 11.5px; color: #dcdce0; }
.member-row-s { font-size: 9.5px; color: #6f6f77; margin-top: 2px; }
.member-row .btn { margin-left: auto; }
.member-note { font-size: 9.5px; color: #5f5f67; line-height: 1.6; margin-top: 12px; }

/* profile */
.profile-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.profile-name { font-size: 13px; color: #e8e8ec; }
.profile-sub { font-size: 10.5px; color: #707078; margin-top: 3px; }
.profile-note { font-size: 10px; color: #66666e; line-height: 1.6; margin-top: 4px; }

/* settings */
.setting-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  border-top: 1px solid rgba(255,255,255,0.055);
}
.setting-t { font-size: 11.5px; color: #dcdce0; }
.setting-s { font-size: 9.5px; color: #6f6f77; margin-top: 3px; line-height: 1.5; }
.setting-row > .btn { margin-left: auto; }
.switch { position: relative; width: 32px; height: 18px; flex: none; margin-left: auto; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i {
  position: absolute; inset: 0;
  border-radius: 9px;
  background: #2c2c30;
  transition: background 0.15s;
}
.switch i::after {
  content: "";
  position: absolute; top: 2px; left: 2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #8b8b93;
  transition: transform 0.15s, background 0.15s;
}
.switch input:checked + i { background: rgba(110,168,255,0.4); }
.switch input:checked + i::after { transform: translateX(14px); background: #fff; }

/* versions */
.version-list { display: flex; flex-direction: column; gap: 2px; }
.version-row {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 8px;
  border-radius: 7px;
}
.version-row:hover { background: rgba(255,255,255,0.035); }
.version-dot { width: 6px; height: 6px; border-radius: 50%; background: #6ea8ff; flex: none; }
.version-main { flex: 1; min-width: 0; }
.version-title { font-size: 11.5px; color: #dedee2; }
.version-sub { font-size: 9.5px; color: #6f6f77; margin-top: 3px; }
.version-row .icon-btn { width: 24px; height: 24px; }

/* layers */
.layer-list { display: flex; flex-direction: column; gap: 1px; }
.layer-row {
  display: flex; align-items: center; gap: 7px;
  height: 32px;
  padding: 0 7px;
  border-radius: 6px;
  cursor: pointer;
}
.layer-row:hover { background: rgba(255,255,255,0.045); }
.layer-row.is-hidden { opacity: 0.42; }
.layer-ic { width: 18px; display: flex; justify-content: center; color: #8b8b93; }
.layer-name { flex: 1; min-width: 0; font-size: 11px; color: #cfcfd4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.layer-btn {
  width: 22px; height: 22px;
  border-radius: 4px;
  color: #6f6f77;
  display: flex; align-items: center; justify-content: center;
  opacity: 0.22;
}
.layer-row:hover .layer-btn { opacity: 1; }
.layer-btn:hover { background: #2a2a2d; color: #fff; }

/* help */
.help-tabs { display: flex; gap: 4px; margin-bottom: 12px; }
.help-body { min-height: 240px; max-height: 54vh; overflow-y: auto; }
.help-h { font-size: 12px; color: #e2e2e6; margin: 14px 0 8px; }
.help-h:first-child { margin-top: 0; }
.help-guide p, .help-guide li { font-size: 11.5px; color: #9a9aa2; line-height: 1.8; }
.help-guide ol { padding-left: 18px; margin: 0 0 14px; }
.help-keys { display: grid; grid-template-columns: 1fr auto; gap: 10px 20px; font-size: 11.5px; color: #a8a8b0; }
.help-keys .hk { font-family: var(--mono); font-size: 10px; color: #d4d4da; text-align: right; }
.help-map { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.help-map button {
  display: flex; align-items: center; gap: 8px;
  height: 38px;
  padding: 0 10px;
  border-radius: 7px;
  background: #1b1b1d;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
  font-size: 11px;
  color: #c8c8ce;
  text-align: left;
}
.help-map button:hover { background: #232326; color: #fff; }
.help-map button .ic:last-child { margin-left: auto; color: #5f5f67; }
.about-brand { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.about-p { font-size: 11.5px; line-height: 1.8; color: #8f8f97; }
.about-p code { font-family: var(--mono); font-size: 10px; color: #c8d8f0; }
.help-note { margin-top: 14px; font-size: 10px; line-height: 1.7; color: #66666e; }

/* export */
.export-list { display: flex; flex-direction: column; gap: 4px; }
.export-list button {
  display: flex; align-items: center; gap: 10px;
  padding: 10px;
  border-radius: 8px;
  text-align: left;
  color: #b8b8c0;
}
.export-list button:hover { background: #232326; color: #fff; }
.export-list button > span { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.export-list b { font-size: 11.5px; font-weight: 500; color: #e2e2e6; }
.export-list i { font-size: 9.5px; font-style: normal; color: #6f6f77; }
.export-list .ic:last-child { color: #5f5f67; }

/* asset / character / template detail */
.asset-detail { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.ad-preview {
  border-radius: 8px;
  overflow: hidden;
  background: #0d0d0e;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}
.ad-preview img { width: 100%; height: 100%; max-height: 300px; object-fit: cover; display: block; }
.ad-name { font-size: 14px; color: #ececf0; margin-bottom: 10px; }
.ad-row { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: 10.5px; color: #707078; border-bottom: 1px solid rgba(255,255,255,0.045); }
.ad-row b { color: #b8b8c0; font-weight: 400; }
.ad-actions { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.ad-actions .btn { justify-content: center; }
.char-detail { display: grid; grid-template-columns: 160px 1fr; gap: 16px; }
.cd-cover { border-radius: 8px; overflow: hidden; aspect-ratio: 3/4; background: #0d0d0e; }
.cd-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cd-name { font-size: 14px; color: #ececf0; }
.cd-sub { font-size: 9.5px; color: #66666e; margin-top: 4px; }
.cd-prompt { font-size: 10.5px; line-height: 1.7; color: #8f8f97; margin-top: 12px; max-height: 100px; overflow-y: auto; }
.tpl-preview { height: 200px; border-radius: 8px; background-size: cover; background-position: center; margin-bottom: 12px; }
.tpl-desc { font-size: 11.5px; line-height: 1.8; color: #9a9aa2; }
.tpl-structure { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tpl-chip {
  display: inline-flex; align-items: center; gap: 4px;
  height: 24px; padding: 0 8px;
  border-radius: 5px;
  background: #212124;
  font-size: 9.5px;
  color: #b8b8c0;
}
.tpl-arrow { color: #5f5f67; font-size: 10px; }

/* assistant */
.assistant-host { position: fixed; inset: 0; pointer-events: none; z-index: 92; }
.assistant-fab {
  position: fixed;
  right: 16px; bottom: 16px;
  height: 36px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 10px;
  background: #1b1b1d;
  color: #e6e6ea;
  box-shadow: 0 12px 30px rgba(0,0,0,0.45), inset 0 0 0 1px rgba(255,255,255,0.1);
  pointer-events: auto;
  font-size: 11.5px;
}
.assistant-fab:hover { background: #242427; }
.assistant-fab .ic { color: #9dc2ff; }
.assistant-fab em {
  font-style: normal;
  font-size: 8px;
  padding: 2px 4px;
  border-radius: 3px;
  color: #8fb5e8;
  background: rgba(110,168,255,0.12);
}
.assistant-panel {
  position: fixed;
  top: 66px; right: 14px; bottom: 14px;
  width: 364px;
  display: flex;
  flex-direction: column;
  border-radius: 13px;
  background: #171719;
  box-shadow: 0 28px 80px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(255,255,255,0.08);
  pointer-events: auto;
  overflow: hidden;
  animation: drawer-in 0.18s var(--ease);
}
.ap-head { height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.ap-head .icon-btn { width: 24px; height: 24px; color: #74747c; }
.ap-head .icon-btn:hover { color: #ececf0; background: #26262a; }

.ap-cmds {
  max-height: 372px;
  overflow-y: auto;
  padding: 10px 12px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: #141416;
  animation: fade-in 0.14s var(--ease);
}
.ap-cmds-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 10px;
  color: #6f6f77;
}
.ap-cmds-head span:first-child { font-size: 11px; color: #c9c9d0; }
.ap-cmds-tip { font-size: 9px; color: #5d5d65; white-space: nowrap; }
.ap-cmd-group { margin-bottom: 10px; }
.ap-cmd-group:last-child { margin-bottom: 0; }
.ap-cmd-title { font-size: 9.5px; color: #66666e; margin-bottom: 5px; letter-spacing: 0.04em; }
.ap-cmd-row { display: flex; flex-wrap: wrap; gap: 4px; }
.ap-cmd-row button {
  height: 24px;
  padding: 0 8px;
  border-radius: 5px;
  font-size: 10px;
  color: #b6b6be;
  background: #1f1f22;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.055);
  transition: background 0.12s, color 0.12s;
}
.ap-cmd-row button:hover { background: #2a2a2f; color: #fff; }
.ap-mark { width: 26px; height: 26px; border-radius: 7px; display: flex; align-items: center; justify-content: center; color: #9dc2ff; background: rgba(110,168,255,0.12); }
.ap-title { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.ap-title b { font-size: 12px; color: #ececf0; font-weight: 600; }
.ap-title span { font-size: 9px; color: #6f6f77; }
.ap-body { flex: 1; overflow-y: auto; padding: 12px 12px 6px; display: flex; flex-direction: column; gap: 10px; }
.ap-msg { display: flex; gap: 7px; align-items: flex-start; }
.ap-msg.user { flex-direction: row-reverse; }
.ap-avatar { width: 20px; height: 20px; border-radius: 6px; background: rgba(110,168,255,0.14); color: #9dc2ff; display: flex; align-items: center; justify-content: center; flex: none; margin-top: 2px; }
.ap-bubble {
  max-width: 285px;
  padding: 9px 10px;
  border-radius: 9px;
  background: #212124;
  font-size: 11.5px;
  line-height: 1.65;
  color: #d2d2d8;
  word-break: break-word;
}
.ap-msg.user .ap-bubble { background: #2b3a52; color: #e8eef8; }
.ap-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.ap-actions button {
  height: 22px; padding: 0 7px;
  border-radius: 4px;
  font-size: 9.5px;
  color: #bcd4f5;
  background: rgba(110,168,255,0.12);
  box-shadow: inset 0 0 0 1px rgba(110,168,255,0.18);
}
.ap-actions button:hover { background: rgba(110,168,255,0.22); }
.ap-quick { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px 12px 4px; }
.ap-quick button {
  height: 23px; padding: 0 8px;
  border-radius: 5px;
  font-size: 9.5px;
  color: #9a9aa2;
  background: #1d1d20;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.055);
}
.ap-quick button:hover { color: #fff; background: #26262a; }
.ap-input { display: flex; align-items: flex-end; gap: 6px; padding: 8px 12px; border-top: 1px solid rgba(255,255,255,0.055); }
.ap-input textarea {
  flex: 1;
  min-height: 30px;
  max-height: 90px;
  padding: 6px 8px;
  border-radius: 7px;
  background: #0f0f10;
  border: 1px solid rgba(255,255,255,0.1);
  outline: none;
  resize: none;
  font-size: 11.5px;
  line-height: 1.5;
  color: #eee;
}
.ap-input textarea:focus { border-color: rgba(110,168,255,0.6); }
.ap-input .send-btn { width: 28px; height: 28px; flex: none; }
.ap-foot { padding: 0 12px 9px; font-size: 8.5px; color: #55555d; }

/* tour */
.tour-layer { position: fixed; inset: 0; z-index: 1500; pointer-events: auto; }
.tour-spot {
  position: fixed;
  border-radius: 10px;
  box-shadow: 0 0 0 9999px rgba(5,5,6,0.72), 0 0 0 1px rgba(255,255,255,0.28);
  pointer-events: none;
  transition: all 0.18s var(--ease);
}
.tour-card {
  position: fixed;
  width: 300px;
  padding: 14px;
  border-radius: 11px;
  background: #1b1b1d;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(255,255,255,0.09);
  pointer-events: auto;
}
.tour-step { font-size: 9px; color: #6f6f77; letter-spacing: 0.08em; }
.tour-title { font-size: 14px; color: #f0f0f3; margin-top: 5px; font-weight: 600; }
.tour-desc { font-size: 11.5px; line-height: 1.7; color: #9a9aa2; margin-top: 7px; }
.tour-foot { display: flex; align-items: center; gap: 5px; margin-top: 14px; }
.tour-foot .btn { height: 28px; font-size: 11px; }

@media (max-width: 720px) {
  .asset-detail, .char-detail { grid-template-columns: 1fr; }
  .assistant-panel { width: calc(100vw - 28px); }
}


/* ---------- crop tool ---------- */
.crop-stage {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #0b0b0c;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
  cursor: crosshair;
  touch-action: none;
}
.crop-stage > img { display: block; width: 100%; height: auto; pointer-events: none; }
.crop-box {
  position: absolute;
  border: 1.5px solid #f0f0f3;
  box-shadow: 0 0 0 9999px rgba(5,5,6,0.55);
  pointer-events: none;
}
.crop-box::before, .crop-box::after {
  content: "";
  position: absolute;
  background: rgba(255,255,255,0.28);
}
.crop-box::before { left: 33.33%; right: 33.33%; top: 0; bottom: 0; border-left: 1px solid rgba(255,255,255,0.2); border-right: 1px solid rgba(255,255,255,0.2); }
.crop-box::after { top: 33.33%; bottom: 33.33%; left: 0; right: 0; border-top: 1px solid rgba(255,255,255,0.2); border-bottom: 1px solid rgba(255,255,255,0.2); }
.crop-box span {
  position: absolute;
  right: 4px; bottom: 4px;
  padding: 2px 5px;
  border-radius: 3px;
  background: rgba(0,0,0,0.6);
  color: #e8e8ec;
  font-size: 8.5px;
}
.crop-bar { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.crop-bar .filter-chip { height: 25px; font-size: 10.5px; }
.crop-tip { font-size: 9.5px; color: #66666e; }
.model-needed { display: flex; gap: 12px; padding: 4px 0 10px; }
.mn-ic { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; color: #9dc2ff; background: rgba(110,168,255,0.12); flex: none; }
.mn-t { font-size: 12.5px; color: #e6e6ea; line-height: 1.5; }
.mn-s { font-size: 10.5px; color: #7f7f88; line-height: 1.7; margin-top: 5px; }
