/* Global Navigation Header & Modals */
.global-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(14, 17, 26, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  box-sizing: border-box;
  max-width: 100vw;
  color: #eef2ff;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.4px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.brand-logo:hover {
  transform: scale(1.02);
  opacity: 0.95;
}

.brand-logo-image {
  display: block;
  width: 132px;
  height: 44px;
  flex-shrink: 0;
  object-fit: contain;
}

/* Center Nav Links */
.nav-center {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link-btn {
  white-space: nowrap;
  background: transparent;
  border: 1px solid transparent;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.nav-link-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.nav-link-btn.active {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.3);
}

/* Right Actions */
.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-settings {
  display: flex;
  align-items: center;
  gap: 8px;
}

body .global-header .nav-menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 10px;
  border: 1px solid currentColor;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.nav-menu-lines,
.nav-menu-lines::before,
.nav-menu-lines::after {
  display: block;
  height: 2px;
  width: 18px;
  background: currentColor;
  border-radius: 2px;
  position: relative;
}
.nav-menu-lines::before,
.nav-menu-lines::after { content: ''; position: absolute; left: 0; }
.nav-menu-lines::before { top: -6px; }
.nav-menu-lines::after { top: 6px; }
.nav-center[hidden] { display: none !important; }
body .global-header .nav-login-btn { display: flex; white-space: nowrap; }
.nav-login-btn [data-auth-nav-label] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
.global-header :focus-visible,
.g-modal :focus-visible { outline: 2px solid #8b5cf6; outline-offset: 3px; }

.nav-lang-wrap {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 3px 6px;
  gap: 4px;
}

.nav-lang-globe {
  font-size: 13px;
  margin-left: 4px;
  opacity: 0.8;
}

.nav-lang-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.nav-lang-btn:hover {
  color: #fff;
}

.nav-lang-btn.active {
  background: #3b82f6;
  color: #fff;
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.4);
}

.nav-login-btn {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  border: none;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-login-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.45);
}

/* Modals (Notice, MyPage, Support, Login) */
.g-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 10, 15, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.g-modal-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
body.global-modal-open { overflow: hidden !important; }

.g-modal {
  background: #151926;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  width: 92%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.6);
  color: #e2e8f0;
  padding: 28px 24px;
  box-sizing: border-box;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.2s ease;
  position: relative;
}

.g-modal-overlay.open .g-modal {
  transform: translateY(0) scale(1);
}

.g-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.g-modal-close:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.g-modal-title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.g-modal-desc {
  margin: 0 0 20px;
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.5;
}

/* Notice styles */
.notice-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notice-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 14px 16px;
}

.notice-item .date {
  font-size: 12px;
  color: #60a5fa;
  font-weight: 600;
}

.notice-item h4 {
  margin: 4px 0 6px;
  font-size: 15px;
  color: #f1f5f9;
}

.notice-item p {
  margin: 0;
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.5;
}

/* Social Login styles */
.social-login-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.social-btn.chzzk {
  background: #00ffa3;
  color: #0c1813;
}

.social-btn.chzzk:hover {
  background: #00e08f;
}

.social-btn.twitch {
  background: #9146ff;
  color: #fff;
}

.social-btn.twitch:hover {
  background: #7c2bf7;
}

.social-btn.google {
  background: #ffffff;
  color: #1e293b;
}

.social-btn.google:hover {
  background: #f1f5f9;
}

.social-btn.guest {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.social-btn.guest:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* MyPage and Support styles */
.mypage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.mypage-stat-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
}

.mypage-stat-card .num {
  font-size: 24px;
  font-weight: 800;
  color: #93c5fd;
  margin-bottom: 4px;
}

.mypage-stat-card .label {
  font-size: 12px;
  color: #94a3b8;
}

.support-faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.support-faq-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 12px 16px;
}

.support-faq-item summary {
  font-weight: 600;
  color: #f1f5f9;
  cursor: pointer;
  font-size: 14px;
  outline: none;
}

.support-faq-item p {
  margin: 8px 0 0;
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.5;
}

.support-contact-box {
  margin-top: 18px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(139, 92, 246, 0.12));
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
}

.support-contact-box h4 {
  margin: 0 0 6px;
  font-size: 15px;
  color: #c4b5fd;
}

.support-contact-box p {
  margin: 0 0 12px;
  font-size: 13px;
  color: #cbd5e1;
}

.support-contact-box a {
  display: inline-block;
  background: #6366f1;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 8px;
}

@media (max-width: 768px) {
  .global-header {
    padding: 0 16px;
  }
  .nav-center {
    display: none;
  }
}

/* Studio Page Integration */
body.studio-page .workspace .lang-switcher {
  display: none !important;
}

body.studio-page .studio {
  min-height: calc(100vh - 64px);
}

body.studio-page .controls {
  max-height: calc(100vh - 64px);
}

/* =========================================
   Style Shop (스타일샵) Community Modal & Cards
   ========================================= */
.g-modal.g-modal-wide {
  max-width: 920px;
  width: 95%;
  padding: 24px 28px;
}

.styleshop-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.styleshop-publish-btn {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  color: #fff;
  border: none;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
  transition: transform 0.15s ease, filter 0.15s ease;
  white-space: nowrap;
}

.styleshop-publish-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.styleshop-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.styleshop-tabs {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px;
  border-radius: 10px;
}

.styleshop-tab {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.styleshop-tab.active {
  background: #7c3aed;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.4);
}

.styleshop-search-box {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 240px;
  flex: 1;
  max-width: 340px;
}

.styleshop-search-box .search-icon {
  position: absolute;
  left: 12px;
  font-size: 13px;
  opacity: 0.6;
  pointer-events: none;
}

.styleshop-search-box input {
  width: 100%;
  padding: 8px 30px 8px 34px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #fff;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
}

.styleshop-search-box input:focus {
  border-color: #a78bfa;
}

.styleshop-search-box .clear-search-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  padding: 0;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 16px;
  cursor: pointer;
}
.clear-search-btn[hidden] { display: none !important; }

.styleshop-tags-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.styleshop-tag-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.styleshop-tag-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.styleshop-tag-pill.active {
  background: #3b82f6;
  border-color: #60a5fa;
  color: #fff;
  font-weight: 700;
}

.styleshop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 16px;
}

.styleshop-card {
  background: #1a1e2e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.styleshop-card:hover {
  transform: translateY(-3px);
  border-color: rgba(167, 139, 250, 0.4);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

.styleshop-card-preview {
  padding: 20px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  min-height: 110px;
}

.preview-chat-bubble {
  width: 90%;
  max-width: 320px;
  padding: 12px 14px;
  border-radius: 14px;
  box-sizing: border-box;
}

.preview-bubble-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 11px;
}

.preview-badge {
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 11px;
}

.preview-author {
  font-size: 12px;
  font-weight: 700;
}

.preview-frame-tag {
  margin-left: auto;
  font-size: 9.5px;
  padding: 1px 5px;
  border-radius: 4px;
  opacity: 0.85;
}

.preview-bubble-body {
  font-size: 12.5px;
  line-height: 1.4;
  word-break: keep-all;
}

.styleshop-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.styleshop-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.styleshop-card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.styleshop-card-author {
  font-size: 12px;
  color: #94a3b8;
  white-space: nowrap;
}

.styleshop-card-desc {
  margin: 0 0 10px;
  font-size: 12.5px;
  color: #94a3b8;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.styleshop-card-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.shop-tag-mini {
  font-size: 10.5px;
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.1);
  padding: 2px 7px;
  border-radius: 4px;
}

.styleshop-card-actions {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.styleshop-code-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 5px 10px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 11px;
}

.styleshop-code-badge .code-prefix {
  color: #94a3b8;
}

.styleshop-code-badge .code-val {
  color: #38bdf8;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.styleshop-btn-group {
  display: flex;
  gap: 6px;
  align-items: center;
}

.styleshop-like-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.styleshop-like-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: #f87171;
}

.styleshop-like-btn.voted {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #fca5a5;
  font-weight: 700;
}

.styleshop-copy-code-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.styleshop-copy-code-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.styleshop-apply-btn {
  flex: 1.2;
  background: #7c3aed;
  border: none;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.35);
  transition: all 0.15s ease;
}

.styleshop-apply-btn:hover {
  background: #6d28d9;
  transform: translateY(-1px);
}

/* Sub-modal for publishing */
.styleshop-submodal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 12, 20, 0.85);
  backdrop-filter: blur(8px);
  z-index: 10;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.styleshop-submodal {
  background: #181c2b;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  padding: 24px 20px;
  box-sizing: border-box;
  position: relative;
  box-shadow: 0 16px 40px rgba(0,0,0,0.6);
}

.styleshop-submodal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #94a3b8;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
}

.styleshop-submodal-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.styleshop-submodal-desc {
  font-size: 12.5px;
  color: #94a3b8;
  line-height: 1.45;
  margin-bottom: 18px;
}

.publish-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pub-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
}

.pub-label input,
.pub-label textarea {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 8px 12px;
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  outline: none;
}

.pub-label input:focus,
.pub-label textarea:focus {
  border-color: #a78bfa;
}

.pub-btn-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.pub-cancel-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.pub-submit-btn {
  flex: 2;
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  border: none;
  color: #fff;
  padding: 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35);
}

.styleshop-publish-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 38px;
  margin-bottom: 8px;
}

.styleshop-publish-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(236,72,153,.22), rgba(139,92,246,.26));
  border: 1px solid rgba(196,181,253,.28);
  font-size: 19px;
}

.styleshop-publish-heading small {
  display: block;
  margin-bottom: 2px;
  color: #a78bfa;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}

.styleshop-publish-heading .styleshop-submodal-title { margin: 0; }

.publish-safety-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: -7px 0 16px;
  padding: 9px 11px;
  border: 1px solid rgba(96,165,250,.2);
  border-radius: 9px;
  background: rgba(59,130,246,.08);
  color: #bfdbfe;
  font-size: 11px;
  line-height: 1.45;
}

.pub-label > span::after { color: #f9a8d4; }

.pub-label input,
.pub-label textarea {
  min-height: 40px;
  box-sizing: border-box;
}

.pub-label textarea { min-height: 76px; resize: vertical; }

.pub-submit-btn:disabled { cursor: wait; opacity: .72; }

.publish-success {
  padding: 12px 2px 2px;
  text-align: center;
}

.publish-success[hidden] { display: none; }

.publish-success-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: rgba(52,211,153,.15);
  border: 1px solid rgba(52,211,153,.4);
  color: #6ee7b7;
  font-size: 26px;
  font-weight: 900;
}

.publish-success > strong { display: block; color: #f8fafc; font-size: 18px; }
.publish-success > p { margin: 7px auto 16px; max-width: 350px; color: #aeb6c7; font-size: 12px; line-height: 1.55; }

.publish-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-bottom: 12px;
  padding: 7px;
  border-radius: 11px;
  background: #10121c;
  border: 1px solid rgba(167,139,250,.3);
}

.publish-code-row code {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0 10px;
  color: #c4b5fd;
  font: 700 13px/1.4 'DM Mono', Consolas, monospace;
  overflow-wrap: anywhere;
}

.publish-code-row button {
  border: 0;
  border-radius: 8px;
  padding: 9px 12px;
  background: #7c3aed;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.publish-success > .pub-submit-btn { width: 100%; min-height: 41px; }

/* Toast alert */
.styleshop-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 9999;
}

.styleshop-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 600px) {
  .styleshop-grid {
    grid-template-columns: 1fr;
  }
}

/* Style Shop Sort Dropdown */
.styleshop-sort-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 10px;
  border-radius: 9px;
}
.styleshop-sort-label {
  font-size: 11.5px;
  color: #94a3b8;
  font-weight: 600;
  white-space: nowrap;
}
.styleshop-sort-select {
  background: #191b28;
  border: 1px solid #3c3f58;
  border-radius: 6px;
  color: #f1f5f9;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  cursor: pointer;
  outline: none;
}
.styleshop-sort-select:focus {
  border-color: #8b5cf6;
}

/* Dedicated styleshop.html full page layout */
.styleshop-page {
  background: #090a10;
  color: #f8fafc;
  min-height: 100vh;
  margin: 0;
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.styleshop-page .styleshop-header-row {
  display: none;
}
.styleshop-page-hero {
  padding: 42px 20px 24px;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.2) 0%, rgba(236, 72, 153, 0.08) 45%, transparent 75%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.styleshop-page-hero h1 {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 10px;
  background: linear-gradient(135deg, #ffffff 40%, #c4b5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}
.styleshop-page-hero p {
  font-size: 15px;
  color: #94a3b8;
  margin: 0 auto 22px;
  max-width: 620px;
  line-height: 1.6;
}
.styleshop-page-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.styleshop-page-container {
  max-width: 1460px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}
.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  color: #fff;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
  transition: all 0.15s ease;
}
.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}
.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.07);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-hero-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  transform: translateY(-2px);
}

/* 2-Column Styleshop Layout with Sticky Live Preview Sidebar */
.styleshop-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 26px;
  align-items: start;
}

.styleshop-main-col {
  min-width: 0;
}

.styleshop-live-sidebar {
  position: sticky;
  top: 76px;
  background: rgba(18, 20, 32, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 18px;
  padding: 18px 16px 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 32px rgba(139, 92, 246, 0.16);
  box-sizing: border-box;
}

.live-sidebar-header {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.live-pulse-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 700;
  color: #f87171;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
}

.live-pulsing-dot {
  width: 7px;
  height: 7px;
  background: #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 8px #ef4444;
  animation: liveDotPulse 1.4s infinite ease-in-out;
}

@keyframes liveDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.live-preview-title {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-preview-sub {
  font-size: 12px;
  color: #c4b5fd;
  font-weight: 600;
}

.styleshop-live-stage {
  height: 290px;
  min-height: 290px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: radial-gradient(circle at 50% 10%, rgba(255, 255, 255, 0.04), transparent 70%), #0c0e17 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 12px 10px 8px;
}

.styleshop-live-input-row {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.styleshop-live-input-row input {
  flex: 1;
  padding: 8px 12px;
  background: #11131e;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  outline: none;
}

.styleshop-live-input-row input:focus {
  border-color: #8b5cf6;
}

.styleshop-live-input-row button {
  padding: 8px 14px;
  background: #2b1f42;
  border: 1px solid #8b5cf6;
  border-radius: 8px;
  color: #ddd6fe;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.styleshop-live-input-row button:hover {
  background: #41286b;
  color: #fff;
}

.styleshop-live-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-live-apply {
  width: 100%;
  padding: 11px;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  color: #fff;
  border: none;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
  transition: all 0.15s;
}

.btn-live-apply:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(139, 92, 246, 0.5);
}

.btn-live-copy {
  width: 100%;
  padding: 9px;
  background: rgba(255, 255, 255, 0.06);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s;
}

.btn-live-copy:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.live-sidebar-tip {
  margin-top: 10px;
  font-size: 11px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.4;
}

/* Card active glowing indicator */
.styleshop-card.selected-live {
  border-color: #8b5cf6 !important;
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.4), 0 8px 24px rgba(0, 0, 0, 0.5) !important;
  transform: translateY(-2px);
}

@media (max-width: 1120px) {
  .styleshop-layout {
    grid-template-columns: 1fr;
  }
  .styleshop-live-sidebar {
    position: static;
    margin-bottom: 24px;
    order: -1;
  }
}

/* ========================================================
   Theme Toggle & Light Theme Overrides for Global Header
   ======================================================== */
.nav-theme-toggle {
  display: flex;
  align-items: center;
  margin-right: 6px;
}

.btn-theme-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.12);
  padding: 4px 8px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
}

.theme-toggle-track {
  width: 28px;
  height: 16px;
  background: #cbd5e1;
  border-radius: 999px;
  position: relative;
  transition: background 0.2s;
  display: inline-block;
}

.theme-toggle-thumb {
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.btn-theme-toggle.dark-active .theme-toggle-track {
  background: #8b5cf6;
}

.btn-theme-toggle.dark-active .theme-toggle-thumb {
  transform: translateX(12px);
}

/* Light Theme (theme-white-pure) adjustments for Global Nav */
body.theme-white-pure .global-header {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid #e2e8f0;
  color: #0f172a;
}

body.theme-white-pure .nav-link-btn {
  color: #475569;
}

body.theme-white-pure .nav-link-btn:hover {
  color: #0f172a;
  background: #f1f5f9;
}

body.theme-white-pure .nav-link-btn.active {
  color: #6366f1;
  background: #e0e7ff;
  border-color: #c7d2fe;
}

body.theme-white-pure .btn-theme-toggle {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

body.theme-white-pure .nav-lang-wrap {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

body.theme-white-pure .nav-lang-btn {
  color: #64748b;
}

body.theme-white-pure .nav-lang-btn.active {
  background: #ffffff;
  color: #6366f1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

body.theme-white-pure .nav-login-btn {
  background: #6366f1;
  color: #ffffff;
}

/* The viewport scrollbar belongs to html, so it must follow the body theme too. */
:root:has(body.theme-white-pure) {
  color-scheme: light;
  scrollbar-color: #bdc7d8 #f8f7fc;
  --page-scrollbar-thumb: #bdc7d8;
  --page-scrollbar-track: #f8f7fc;
}

body.theme-white-pure {
  color-scheme: light;
}

:root:has(body.theme-dark-obsidian) {
  color-scheme: dark;
  scrollbar-color: #53627a #111827;
  --page-scrollbar-thumb: #53627a;
  --page-scrollbar-track: #111827;
}

:root:has(body.theme-white-pure)::-webkit-scrollbar,
:root:has(body.theme-dark-obsidian)::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

:root:has(body.theme-white-pure)::-webkit-scrollbar-track,
:root:has(body.theme-dark-obsidian)::-webkit-scrollbar-track {
  background: var(--page-scrollbar-track);
}

:root:has(body.theme-white-pure)::-webkit-scrollbar-thumb,
:root:has(body.theme-dark-obsidian)::-webkit-scrollbar-thumb {
  background: var(--page-scrollbar-thumb);
  border: 2px solid var(--page-scrollbar-track);
  border-radius: 999px;
}

/* Shared dark-mode foundation: page chrome, dialogs and scrollbars. */
body.theme-dark-obsidian {
  color-scheme: dark;
  --dark-page: #0b0f18;
  --dark-surface: #111827;
  --dark-surface-raised: #172033;
  --dark-border: #28344a;
  --dark-text: #e8edf7;
  --dark-muted: #9aa7bd;
}

body.theme-dark-obsidian,
body.theme-dark-obsidian * {
  scrollbar-width: thin;
  scrollbar-color: #53627a #111827;
}

body.theme-dark-obsidian::-webkit-scrollbar,
body.theme-dark-obsidian *::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

body.theme-dark-obsidian::-webkit-scrollbar-track,
body.theme-dark-obsidian *::-webkit-scrollbar-track {
  background: #111827;
}

body.theme-dark-obsidian::-webkit-scrollbar-thumb,
body.theme-dark-obsidian *::-webkit-scrollbar-thumb {
  background: #53627a;
  border: 2px solid #111827;
  border-radius: 999px;
}

body.theme-dark-obsidian::-webkit-scrollbar-thumb:hover,
body.theme-dark-obsidian *::-webkit-scrollbar-thumb:hover {
  background: #718099;
}

body.theme-dark-obsidian .btn-theme-toggle {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.14);
  color: #e8edf7;
}

body.theme-dark-obsidian .g-modal {
  background: #111827;
  border-color: #2c3950;
  color: #e8edf7;
}

body.theme-dark-obsidian .g-modal-title { color: #f8fafc; }
body.theme-dark-obsidian .g-modal-desc { color: #9aa7bd; }

body.theme-white-pure .nav-login-btn:hover {
  background: #4f46e5;
}

/* Login card: purple accent, independent of page-specific button styles. */
#modal-login {
  --login-surface:#fff;
  --login-text:#202c43;
  --login-muted:#68768c;
  --login-line:#e4e8f1;
  --login-tint:#f2ecff;
  --login-banner-end:#f8f5ff;
  --login-shadow:rgba(104,83,153,.14);
}
body.theme-dark-obsidian #modal-login {
  --login-surface:#161c2b;
  --login-text:#eef2ff;
  --login-muted:#b1bbce;
  --login-line:#354159;
  --login-tint:#29213f;
  --login-banner-end:#231d35;
  --login-shadow:rgba(0,0,0,.32);
}
body #modal-login .g-modal-login-card {
  width:calc(100% - 32px);max-width:400px;padding:0;
  background:var(--login-surface);color:var(--login-text);
  border:1px solid var(--login-line);border-radius:24px;
  box-shadow:0 18px 60px var(--login-shadow);
}
#modal-login .login-card-banner {
  padding:26px 32px;background:linear-gradient(125deg,var(--login-tint),var(--login-banner-end));
  border-bottom:1px solid var(--login-line);color:var(--login-text);font-size:16px;font-weight:700;
}
#modal-login .login-card-content {padding:28px 32px 24px}
#modal-login .g-modal-title {
  display:block;color:var(--login-text)!important;font-size:21px;font-weight:700;
  line-height:1.4;letter-spacing:-.7px;margin:0 0 10px;
}
#modal-login .g-modal-desc {
  color:var(--login-muted)!important;font-size:13px;line-height:1.8;margin:0 0 24px;
  word-break:keep-all;overflow-wrap:anywhere;
}
#modal-login .social-btn {
  display:flex;align-items:center;justify-content:center;gap:12px;
  min-height:48px;padding:12px;
  font-family:inherit;font-size:14px;font-weight:600;line-height:1.5;
  border-radius:12px;background:var(--login-surface)!important;color:var(--login-text)!important;
  border:1px solid #c5b3e6!important;
}
#modal-login .social-btn.google {box-shadow:0 4px 10px var(--login-shadow)}
#modal-login .social-btn:hover:not(:disabled) {background:var(--login-tint)!important;border-color:#8254df!important}
#modal-login .social-btn:disabled {cursor:wait;opacity:.6}
#modal-login .social-btn[hidden] {display:none}
#modal-login .login-google-icon {width:20px;height:20px;flex:none}
#modal-login .login-card-status {font-size:12px;line-height:1.5;margin:12px 0;min-height:18px;text-align:center}
#modal-login .social-btn.login-card-browse {
  width:auto;margin:0 auto;min-height:38px;padding:10px 16px;gap:6px;font-size:12px;font-weight:400;
  background:transparent!important;border:0!important;color:var(--login-muted)!important;border-radius:8px;
}
#modal-login .social-btn.login-card-browse:hover {background:var(--login-tint)!important;color:var(--login-text)!important}
#modal-login .g-modal-close {
  top:14px;right:14px;width:34px;height:34px;padding:0;border:0!important;border-radius:50%;
  background:var(--login-surface)!important;color:var(--login-muted)!important;font-size:22px;font-weight:400;
  display:flex;align-items:center;justify-content:center;line-height:1;
}
#modal-login .g-modal-close:hover {background:var(--login-tint)!important;color:var(--login-text)!important}
@media(max-width:420px) {
  #modal-login .login-card-content {padding:26px 24px 22px}
  #modal-login .login-card-banner {padding:24px}
  #modal-login .g-modal-title {font-size:20px}
}

/* General pages fit phones; the desktop studio keeps its existing minimum width. */
body.landing-body,
body.service-page { min-width: 0; }

@media (max-width: 1400px) {
  body .global-header.compact-nav {
    height: 64px;
    min-height: 64px;
    padding: 0 16px;
    gap: 12px;
    flex-wrap: nowrap;
  }
  .global-header.compact-nav .nav-left { min-width: 0; flex-shrink: 0; }
  .global-header.compact-nav .nav-right { gap: 8px; min-width: 0; }
  body .global-header.compact-nav .nav-menu-toggle { display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .global-header.compact-nav .nav-login-btn { padding: 8px 12px; flex-shrink: 1; min-width: 0; }
  .global-header.compact-nav .nav-login-btn > span:first-child { flex-shrink: 0; }
  .global-header.compact-nav .nav-login-btn [data-auth-nav-label] { max-width: 90px; min-width: 0; }
  body .global-header.compact-nav .nav-center {
    position: absolute;
    top: 100%;
    left: 12px;
    right: 12px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: 6px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    color: #303950;
    box-shadow: 0 12px 28px rgba(32, 40, 61, .12);
    max-height: calc(100dvh - 80px);
    overflow: auto;
  }
  body.theme-dark-obsidian .global-header.compact-nav .nav-center { background: #111827; color: #e8edf7; border-color: #28344a; }
  .global-header.compact-nav .nav-link-btn { min-width: 0; padding: 10px 8px; white-space: normal; }
  .global-header.compact-nav .nav-settings { grid-column: 1 / -1; justify-content: space-between; flex-wrap: wrap; margin-top: 8px; padding-top: 10px; border-top: 1px solid #e2e8f0; }
  body.theme-dark-obsidian .global-header.compact-nav .nav-settings { border-color: #28344a; }
}
@media (max-width: 360px) {
  body .global-header.compact-nav { padding: 0 12px; gap: 8px; }
  .global-header.compact-nav .brand-logo-image { width: 116px; height: auto; }
  .global-header.compact-nav .nav-login-btn [data-auth-nav-label] { max-width: 70px; }
}

