/* =========================================================================
       RTL (Right-to-Left) Styles for Arabic, Hebrew, Urdu, Persian
       ========================================================================= */
    [dir="rtl"] {
      direction: rtl;
      text-align: right;
    }
    [dir="rtl"] .search-icon {
      left: auto;
      right: 12px;
    }
    [dir="rtl"] .search-input {
      padding-left: 1rem;
      padding-right: 2.25rem;
    }
    [dir="rtl"] .quick-toggle input {
      margin-right: 0;
      margin-left: 0.5rem;
    }
    [dir="rtl"] .banner {
      border-left: 1px solid var(--border);
      border-right: 4px solid var(--primary);
    }
    [dir="rtl"] .unlock-icon {
      margin-right: 0;
      margin-left: 1rem;
    }
    [dir="rtl"] .spec-dims {
      margin-left: 0 !important;
      margin-right: 22px !important;
    }

    :root {
      --primary: #4f46e5;
      --primary-hover: #4338ca;
      --primary-light: #eef2ff;
      --surface: #ffffff;
      --bg: #f8fafc;
      --border: #e2e8f0;
      --text: #0f172a;
      --text-muted: #64748b;
      --radius-sm: 8px;
      --radius-md: 14px;
      --radius-lg: 18px;
      --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
      --shadow-card: 0 4px 18px rgba(15, 23, 42, 0.05);
      --shadow-hover: 0 10px 25px rgba(79, 70, 229, 0.1);
    }

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

    body {
      font-family: system-ui, sans-serif;
      background-color: var(--bg);
      color: var(--text);
      min-height: 100vh;
      display: flex;
      flex-direction: column;
    }

    /* Header */
    header {
      background: var(--surface);
      border-bottom: 1px solid var(--border);
      position: sticky;
      top: 0;
      z-index: 50;
      padding: 0.85rem 1.75rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      text-decoration: none;
      color: inherit;
    }

    .brand-icon {
      width: 34px;
      height: 34px;
      background: transparent !important;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      border: none !important;
      box-shadow: none !important;
      user-select: none;
      overflow: hidden;
      flex-shrink: 0;
    }

    .brand-icon img,
    .brand-icon .brand-logo-img {
      width: 100%;
      height: 100%;
      display: block;
      object-fit: contain;
      border-radius: 8px;
    }

    .brand-title {
      font-weight: 800;
      font-size: 1.15rem;
      letter-spacing: -0.02em;
    }

    .brand-badge {
      font-size: 0.75rem;
      background: #fff7ed;
      color: #ea580c;
      font-weight: 700;
      padding: 2px 8px;
      border-radius: 6px;
      border: 1px solid #fed7aa;
      text-decoration: none;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      margin-left: 0.25rem;
      transition: all 0.15s ease;
      white-space: nowrap;
    }
    .brand-badge:hover {
      background: #ffedd5;
      border-color: #fdba74;
    }

    .brand-subtitle {
      font-size: 0.72rem;
      color: var(--text-muted);
    }

    .nav-links {
      display: flex;
      align-items: center;
      gap: 1.15rem;
    }

    .nav-link-btn {
      font-size: 0.88rem;
      font-weight: 600;
      color: var(--text-muted);
      text-decoration: none;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 0.35rem;
      transition: color 0.15s;
      white-space: nowrap;
    }
    .nav-link-btn:hover { color: #ea580c; }

    .nav-dropdown {
      position: relative;
      display: inline-block;
    }
    .nav-dropdown-menu {
      position: absolute;
      top: 100%;
      left: 50%;
      transform: translateX(-50%);
      background: #ffffff;
      min-width: 190px;
      border-radius: 12px;
      box-shadow: 0 10px 25px rgba(0,0,0,0.12);
      border: 1px solid #e2e8f0;
      padding: 0.4rem;
      display: none;
      flex-direction: column;
      z-index: 1000;
    }
    .nav-dropdown:hover .nav-dropdown-menu {
      display: flex;
    }
    .nav-dropdown-menu a {
      padding: 0.55rem 0.85rem;
      font-size: 0.82rem;
      font-weight: 600;
      color: #334155;
      text-decoration: none;
      border-radius: 8px;
      display: flex;
      align-items: center;
      gap: 0.5rem;
      white-space: nowrap;
      transition: background 0.15s, color 0.15s;
    }
    .nav-dropdown-menu a:hover {
      background: #fff7ed;
      color: #ea580c;
    }

    .btn-nav-primary {
      background: #ea580c;
      color: #ffffff !important;
      padding: 0.45rem 1rem;
      border-radius: 8px;
      font-size: 0.88rem;
      font-weight: 700;
      text-decoration: none;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      box-shadow: 0 2px 8px rgba(234, 88, 12, 0.25);
      transition: all 0.15s ease;
      white-space: nowrap;
    }
    .btn-nav-primary:hover {
      background: #c2410c;
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(234, 88, 12, 0.35);
    }

    .header-actions {
      display: flex;
      align-items: center;
      gap: 0.75rem;
    }

    .select-pill {
      padding: 0.45rem 0.8rem;
      border: 1px solid var(--border);
      border-radius: 9999px;
      background: var(--surface);
      font-size: 0.825rem;
      font-weight: 600;
      color: var(--text);
      outline: none;
      cursor: pointer;
      box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    }

    .country-selector {
      border-color: #cbd5e1;
      font-weight: 700;
      background: #ffffff;
    }

    .btn-admin {
      background: #f1f5f9;
      color: #334155;
      padding: 0.45rem 0.85rem;
      border-radius: 9999px;
      font-size: 0.8rem;
      font-weight: 700;
      text-decoration: none;
      border: 1px solid var(--border);
      transition: all 0.15s;
    }
    .btn-admin:hover {
      background: #e2e8f0;
      color: var(--primary);
    }

    /* Layout */
    .container {
      max-width: 1320px;
      margin: 0 auto;
      padding: 1.5rem;
      display: flex;
      flex-direction: column;
      gap: 2.25rem;
      flex: 1;
      width: 100%;
    }

    /* Main Studio Grid (Left Sidebar + Right Workspace) */
    .studio-grid {
      display: grid;
      grid-template-columns: 370px 1fr;
      gap: 1.5rem;
    }

    @media (max-width: 960px) {
      .studio-grid { grid-template-columns: 1fr; }
    }

    /* Sidebar / Specs Selector */
    .panel {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 1.25rem;
      box-shadow: var(--shadow-sm);
      display: flex;
      flex-direction: column;
      gap: 1rem;
      height: fit-content;
    }

    .panel-title {
      font-size: 0.95rem;
      font-weight: 700;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .search-box { position: relative; }

    .search-input {
      width: 100%;
      padding: 0.6rem 0.75rem 0.6rem 2.25rem;
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      font-size: 0.85rem;
      outline: none;
      background: var(--bg);
    }
    .search-input:focus { border-color: var(--primary); background: #ffffff; }

    .search-icon {
      position: absolute;
      left: 0.75rem;
      top: 50%;
      transform: translateY(-50%);
      color: var(--text-muted);
      pointer-events: none;
    }

    .spec-list {
      display: flex;
      flex-direction: column;
      gap: 0.55rem;
      max-height: 520px;
      overflow-y: auto;
      padding-right: 0.25rem;
    }

    .spec-item {
      padding: 0.75rem 0.95rem;
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      cursor: pointer;
      transition: all 0.15s ease;
      background: var(--surface);
      display: flex;
      flex-direction: column;
      gap: 3px;
    }

    .spec-item:hover {
      border-color: var(--primary);
      background: var(--primary-light);
    }

    .spec-item.active {
      border-color: var(--primary);
      background: #f5f7ff;
      box-shadow: 0 0 0 1.5px var(--primary);
    }

    .spec-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 8px;
    }

    .spec-name {
      font-weight: 700;
      font-size: 0.91rem;
      display: flex;
      flex-direction: column;
    }

    .spec-badge {
      font-size: 0.7rem;
      padding: 2px 7px;
      border-radius: 4px;
      background: var(--border);
      color: var(--text-muted);
      font-weight: 700;
      white-space: nowrap;
    }

    .spec-dims {
      font-size: 0.78rem;
      color: var(--text-muted);
    }

    /* Workspace */
    .workspace {
      display: flex;
      flex-direction: column;
      gap: 1.25rem;
    }

    /* Spec Detail Banner */
    .banner {
      background: linear-gradient(135deg, #f8faff 0%, #eef2ff 100%);
      border: 1px solid #e0e7ff;
      border-radius: var(--radius-lg);
      padding: 1.15rem 1.35rem;
      display: grid;
      grid-template-columns: 1.4fr 1fr 1fr 1fr;
      gap: 0.85rem;
    }

    @media (max-width: 960px) {
      .banner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }
    @media (max-width: 520px) {
      .banner { grid-template-columns: 1fr; }
    }

    .banner-item {
      display: flex;
      flex-direction: column;
      gap: 0.25rem;
      min-width: 0;
      overflow: hidden;
    }

    .banner-label {
      font-size: 0.72rem;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      color: var(--text-muted);
      font-weight: 700;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .banner-val {
      font-size: 0.92rem;
      font-weight: 800;
      color: #0f172a;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      line-height: 1.35;
    }

    .banner-rule {
      grid-column: 1 / -1;
      font-size: 0.825rem;
      color: #4338ca;
      background: #ffffff;
      padding: 0.65rem 0.95rem;
      border-radius: var(--radius-sm);
      border-left: 3px solid var(--primary);
      box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    }

    /* Editor Layout */
    .editor-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1.25rem;
      position: relative;
    }

    @media (max-width: 768px) {
      .editor-grid { grid-template-columns: 1fr; }
    }

    .dropzone {
      border: 1px dashed var(--border);
      border-radius: var(--radius-lg);
      background: var(--surface);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-start;
      padding: 1.25rem !important;
      text-align: center;
      cursor: pointer;
      position: relative;
      transition: all 0.2s ease;
      min-height: 480px;
      box-sizing: border-box;
    }

    #dropPrompt {
      margin: auto 0;
      width: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
    }

    .dropzone.has-file,
    .dropzone:has(#sourcePreviewBox:not([style*="display: none"])) {
      justify-content: flex-start;
      border: 1px solid var(--border);
    }

    .dropzone:hover, .dropzone.dragover {
      border-color: var(--primary);
      background: #fafbff;
    }

    .dropzone input[type="file"] {
      position: absolute;
      inset: 0;
      opacity: 0;
      cursor: pointer;
      width: 100%;
      height: 100%;
    }

    .dropzone-icon {
      width: 48px;
      height: 48px;
      color: var(--primary);
      margin-bottom: 1rem;
    }

    .upload-action-btns {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.6rem;
      width: 100%;
      max-width: 250px;
      margin: 0.5rem auto 0;
    }

    .upload-action-btns .btn {
      width: 100%;
      height: 42px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.5rem;
      font-size: 0.85rem;
      font-weight: 700;
      border-radius: var(--radius-sm);
      box-sizing: border-box;
      text-align: center;
      padding: 0 1rem;
    }

    #sourcePreviewBox[style*="display: none"],
    .preview-container[style*="display: none"] {
      display: none !important;
    }

    .preview-container {
      position: relative;
      z-index: 10;
      width: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-start;
    }

    .preview-img-wrap {
      display: flex;
      align-items: flex-start;
      justify-content: center;
      width: 100%;
      min-height: 0;
      height: auto;
      padding: 0;
      background: transparent;
      position: relative;
    }

    .preview-img {
      height: 360px;
      max-height: 360px;
      width: auto;
      max-width: 100%;
      border-radius: var(--radius-sm);
      object-fit: cover;
      box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.08);
      margin: 0 auto;
      display: block;
      transition: height 0.2s ease;
    }

    .preview-action-btns {
      margin-top: 0.75rem;
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
      width: 100%;
      max-width: 220px;
      margin-left: auto;
      margin-right: auto;
    }

    .preview-action-btns .btn {
      width: 100%;
      height: 36px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      font-size: 0.82rem;
      font-weight: 600;
      border-radius: var(--radius-sm);
      box-sizing: border-box;
      padding: 0 0.85rem;
      transition: all 0.2s ease;
    }

    .result-box {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 1.25rem !important;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-start;
      min-height: 480px;
      box-shadow: var(--shadow-sm);
    }

    .result-canvas-wrap {
      display: flex;
      align-items: flex-start;
      justify-content: center;
      width: 100%;
      min-height: 0;
      height: auto;
      padding: 0;
      background: transparent;
      overflow: visible;
      position: relative;
    }

    #resultCanvas {
      box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.06);
      border-radius: var(--radius-sm);
      height: 360px;
      max-height: 360px;
      width: auto;
      max-width: 100%;
      background: repeating-conic-gradient(#e2e8f0 0% 25%, #ffffff 0% 50%) 50% / 12px 12px;
      transition: transform 0.2s ease, height 0.2s ease;
      margin: 0 auto;
      display: block;
    }

    /* =========================================================================
       AI Generating Overlay Mask (覆盖整个工作区：同时遮罩左侧原图与右侧生成结果)
       ========================================================================= */
    .ai-generating-mask {
      position: absolute;
      inset: 0;
      background: rgba(15, 23, 42, 0.85);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border-radius: var(--radius-lg);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      z-index: 100;
      color: #ffffff;
      padding: 2rem 1.5rem;
      text-align: center;
      box-sizing: border-box;
      animation: aiMaskFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }

    @keyframes aiMaskFadeIn {
      from { opacity: 0; transform: scale(0.98); }
      to { opacity: 1; transform: scale(1); }
    }

    .ai-generating-mask.fade-out {
      opacity: 0;
      transform: scale(1.02);
      transition: opacity 0.3s ease, transform 0.3s ease;
      pointer-events: none;
    }

    /* Laser scanning beam */
    .ai-scan-laser {
      position: absolute;
      left: 0;
      right: 0;
      height: 2px;
      background: linear-gradient(90deg, transparent, #818cf8, #c084fc, #38bdf8, transparent);
      box-shadow: 0 0 18px 4px rgba(168, 85, 247, 0.7), 0 0 6px rgba(99, 102, 241, 0.9);
      animation: aiLaserScan 2.4s ease-in-out infinite;
      pointer-events: none;
    }

    @keyframes aiLaserScan {
      0% { top: 2%; opacity: 0.2; }
      50% { top: 96%; opacity: 0.95; }
      100% { top: 2%; opacity: 0.2; }
    }

    .ai-mask-content {
      position: relative;
      z-index: 2;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      max-width: 280px;
      width: 100%;
    }

    .ai-spinner-box {
      position: relative;
      width: 58px;
      height: 58px;
      margin-bottom: 0.85rem;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .ai-spinner-ring {
      position: absolute;
      inset: 0;
      border-radius: 50%;
      border: 3px solid transparent;
      border-top-color: #818cf8;
      border-right-color: #c084fc;
      border-bottom-color: #38bdf8;
      animation: aiSpin 1.1s linear infinite;
      filter: drop-shadow(0 0 8px rgba(129, 140, 248, 0.6));
    }

    @keyframes aiSpin {
      to { transform: rotate(360deg); }
    }

    .ai-spinner-icon {
      color: #ffffff;
      animation: aiPulse 1.8s ease-in-out infinite;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    @keyframes aiPulse {
      0%, 100% { transform: scale(1); opacity: 0.85; }
      50% { transform: scale(1.15); opacity: 1; filter: drop-shadow(0 0 6px #c084fc); }
    }

    .ai-mask-title {
      font-size: 1.05rem;
      font-weight: 800;
      color: #ffffff;
      letter-spacing: -0.01em;
      margin: 0 0 0.35rem 0;
      text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    }

    .ai-mask-desc {
      font-size: 0.74rem;
      color: #94a3b8;
      line-height: 1.4;
      margin: 0 0 1rem 0;
      font-weight: 500;
    }

    .ai-progress-track {
      width: 100%;
      height: 4px;
      background: rgba(255, 255, 255, 0.12);
      border-radius: 99px;
      overflow: hidden;
      position: relative;
    }

    .ai-progress-bar {
      height: 100%;
      width: 0%;
      background: linear-gradient(90deg, #6366f1, #a855f7, #06b6d4);
      border-radius: 99px;
      box-shadow: 0 0 10px rgba(168, 85, 247, 0.7);
      transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    /* Controls Bar */
    .controls {
      display: flex;
      flex-wrap: wrap;
      gap: 1rem;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 1rem 1.25rem;
      align-items: center;
      justify-content: space-between;
      box-shadow: var(--shadow-sm);
    }

    .preview-render-info {
      font-size: 0.72rem;
      font-weight: 500;
      color: #94a3b8;
      text-align: center;
      width: 100%;
      margin-top: auto;
      padding-top: 0.75rem;
      letter-spacing: 0.02em;
    }

    .bg-options {
      display: flex;
      align-items: center;
      gap: 0.6rem;
      flex-wrap: wrap;
    }

    .bg-label {
      font-size: 0.85rem;
      font-weight: 700;
      color: var(--text-muted);
    }

    .color-dot {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      border: 2px solid #cbd5e1;
      cursor: pointer;
      transition: transform 0.15s ease, box-shadow 0.15s ease;
      position: relative;
    }

    .color-dot:hover { transform: scale(1.12); }
    .color-dot.active {
      border-color: var(--primary);
      box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--primary);
    }

    .color-dot-transparent {
      background: repeating-conic-gradient(#cbd5e1 0% 25%, #ffffff 0% 50%) 50% / 8px 8px !important;
      position: relative;
    }
    .color-dot-transparent::after {
      content: "PNG";
      font-size: 7px;
      font-weight: 800;
      color: #475569;
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      line-height: 1;
      pointer-events: none;
    }

    .color-dot-orig {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 13px;
      background: #f1f5f9;
      border: 1.5px dashed #94a3b8;
      user-select: none;
    }

    .color-picker-wrapper {
      position: relative;
      display: inline-flex;
      align-items: center;
      cursor: pointer;
    }
    .color-picker-wrapper input[type="color"] {
      position: absolute;
      opacity: 0;
      width: 1px;
      height: 1px;
      pointer-events: none;
    }
    .color-dot-custom {
      background: conic-gradient(from 0deg, #ff0000, #ff8800, #ffff00, #00ff00, #00ffff, #0066ff, #9900ff, #ff0000);
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .color-dot-custom::after {
      content: "+";
      font-size: 14px;
      font-weight: 800;
      color: #ffffff;
      text-shadow: 0 1px 2px rgba(0,0,0,0.6);
      line-height: 1;
    }

    .action-btns {
      display: flex;
      align-items: center;
      gap: 0.75rem;
    }

    .btn {
      padding: 0.65rem 1.2rem;
      border-radius: var(--radius-sm);
      font-weight: 700;
      font-size: 0.85rem;
      border: none;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 0.45rem;
      transition: all 0.15s ease;
    }

    .btn-primary { background: var(--primary); color: white; }
    .btn-primary:hover { background: var(--primary-hover); }

    .btn-outline {
      background: transparent;
      border: 1px solid var(--border);
      color: var(--text);
    }
    .btn-outline:hover { background: var(--bg); }

    .preview-top-bar,
    .preview-bottom-bar {
      width: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
      margin-top: 0.65rem;
      min-width: 0;
    }

    .preview-bottom-row {
      width: 100%;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 8px;
      min-width: 0;
    }

    .preview-render-info {
      font-size: 0.75rem;
      color: var(--text-muted);
      text-align: center;
      width: 100%;
      margin-top: 2px;
    }

    .preview-title-wrap {
      display: none !important;
    }

    .preview-title-wrap span:first-child {
      font-size: 0.84rem;
      font-weight: 700;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      flex-shrink: 0;
    }

    .preview-dim-badge {
      font-size: 0.7rem;
      color: #4338ca;
      background: #eef2ff;
      border: 1px solid #c7d2fe;
      padding: 1px 7px;
      border-radius: 9999px;
      font-weight: 600;
      font-family: monospace;
      white-space: nowrap;
      flex-shrink: 0;
    }

    .mode-switch {
      display: inline-flex;
      justify-content: center;
      align-items: center;
      background: var(--bg);
      padding: 2px;
      border-radius: var(--radius-sm);
      border: 1px solid var(--border);
      flex-shrink: 0;
      margin: 0 auto;
    }

    .mode-btn {
      padding: 0.3rem 0.65rem;
      font-size: 0.78rem;
      font-weight: 700;
      border-radius: 5px;
      border: none;
      background: transparent;
      cursor: pointer;
      color: var(--text-muted);
      white-space: nowrap;
      transition: all 0.15s ease;
    }
    .mode-btn.active {
      background: var(--surface);
      color: var(--text);
      box-shadow: var(--shadow-sm);
    }

    .cat-pill-btn {
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      min-width: 0;
      transition: all 0.15s ease;
    }

    /* Quick Watermark Checkbox in Bar */
    .quick-toggle {
      display: flex;
      align-items: center;
      gap: 0.4rem;
      font-size: 0.8rem;
      font-weight: 600;
      color: var(--text-muted);
      cursor: pointer;
      user-select: none;
    }

    /* =========================================================================
       SECTION 2: 9 TOOLS BOX (AI PHOTO TOOLBOX)
       ========================================================================= */
    .section-title-wrap {
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
      margin-bottom: 1rem;
    }

    .section-h2 {
      font-size: 1.25rem;
      font-weight: 800;
      letter-spacing: -0.02em;
      color: #0f172a;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .section-sub {
      font-size: 0.825rem;
      color: var(--text-muted);
      margin-top: 0.2rem;
    }

    .tools-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 1.1rem;
    }

    @media (max-width: 900px) {
      .tools-grid { grid-template-columns: repeat(2, 1fr); }
    }
    @media (max-width: 600px) {
      .tools-grid { grid-template-columns: 1fr; }
    }
    /* Tool Category Section Divider */
    .tool-category-header {
      grid-column: 1 / -1;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
      padding: 1.25rem 0 0.5rem 0;
      margin-top: 1.25rem;
      border-bottom: 1.5px solid var(--border, #e2e8f0);
    }
    .tool-category-header:first-child {
      margin-top: 0;
      padding-top: 0;
    }
    .tool-cat-left {
      display: inline-flex;
      align-items: center;
      gap: 0.55rem;
    }
    .tool-cat-icon {
      font-size: 1.2rem;
      line-height: 1;
    }
    .tool-cat-title {
      font-size: 1.05rem;
      font-weight: 800;
      color: var(--text, #0f172a);
      margin: 0;
      letter-spacing: -0.01em;
    }
    .tool-cat-count {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 0.72rem;
      font-weight: 700;
      padding: 0.12rem 0.5rem;
      border-radius: 999px;
      background: #f1f5f9;
      color: #64748b;
    }
    .tool-cat-right {
      display: flex;
      align-items: center;
    }
    .tool-cat-desc {
      font-size: 0.8rem;
      color: var(--text-muted, #64748b);
      margin: 0;
    }
    @media (max-width: 768px) {
      .tool-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        padding-top: 0.9rem;
      }
    }
    .nav-dropdown-group-title {
      font-size: 0.72rem;
      font-weight: 800;
      color: #94a3b8;
      padding: 8px 12px 4px 12px;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      border-bottom: 1px dashed #f1f5f9;
      margin-bottom: 2px;
    }
    .nav-dropdown-group-title:not(:first-child) {
      margin-top: 8px;
      border-top: 1px solid #f1f5f9;
    }

    .tool-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      padding: 1.25rem 1.15rem;
      box-shadow: var(--shadow-card);
      display: flex;
      align-items: flex-start;
      gap: 1rem;
      cursor: pointer;
      position: relative;
      transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .tool-card:hover {
      border-color: var(--primary);
      transform: translateY(-2px);
      box-shadow: var(--shadow-hover);
    }
    .tool-icon-box {
      width: 48px;
      height: 48px;
      border-radius: 12px;
      display: grid;
      place-items: center;
      flex-shrink: 0;
    }

    .icon-blue { background: #eff6ff; color: #2563eb; }
    .icon-cyan { background: #ecfeff; color: #0891b2; }
    .icon-rose { background: #fff1f2; color: #e11d48; }
    .icon-purple { background: #faf5ff; color: #9333ea; }
    .icon-red { background: #fef2f2; color: #dc2626; }
    .icon-amber { background: #fffbeb; color: #d97706; }
    .icon-indigo { background: #eef2ff; color: #4f46e5; }
    .icon-emerald { background: #ecfdf5; color: #059669; }

    .tool-badge-hot {
      position: absolute;
      top: 10px;
      right: 10px;
      font-size: 0.65rem;
      background: #ef4444;
      color: white;
      font-weight: 800;
      padding: 1px 6px;
      border-radius: 4px;
      text-transform: uppercase;
    }

    .tool-content h4 {
      font-size: 0.95rem;
      font-weight: 700;
      color: #0f172a;
      margin-bottom: 0.25rem;
    }

    .tool-content p {
      font-size: 0.78rem;
      color: var(--text-muted);
      line-height: 1.4;
    }

    /* =========================================================================
       CUSTOM COUNTRY PICKER (Real Flag Image + Abbreviation)
       ========================================================================= */
    .country-picker-wrap {
      position: relative;
      display: inline-block;
      user-select: none;
    }

    .country-picker-btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 0.38rem 0.75rem;
      border: 1px solid #cbd5e1;
      border-radius: 9999px;
      background: #ffffff;
      color: #0f172a;
      font-size: 0.825rem;
      font-weight: 700;
      cursor: pointer;
      box-shadow: 0 1px 2px rgba(0,0,0,0.04);
      transition: all 0.15s ease;
      line-height: 1;
    }

    .country-picker-btn:hover {
      border-color: #3b82f6;
      box-shadow: 0 2px 6px rgba(59,130,246,0.15);
      background: #f8fafc;
    }

    .country-picker-flag {
      width: 19px;
      height: 14px;
      object-fit: cover;
      border-radius: 2px;
      box-shadow: 0 0 1px rgba(0,0,0,0.35);
      display: block;
    }

    .country-picker-code {
      font-weight: 800;
      letter-spacing: 0.02em;
    }

    .country-picker-arrow {
      color: #64748b;
      transition: transform 0.2s ease;
    }

    .country-picker-wrap.open .country-picker-arrow {
      transform: rotate(180deg);
    }

    .country-picker-dropdown {
      position: absolute;
      top: calc(100% + 6px);
      right: 0;
      width: 270px;
      background: #ffffff;
      border: 1px solid #e2e8f0;
      border-radius: 12px;
      box-shadow: 0 16px 36px -4px rgba(15,23,42,0.18), 0 0 0 1px rgba(0,0,0,0.03);
      display: none;
      flex-direction: column;
      z-index: 100000;
      overflow: hidden;
      animation: modalFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .country-picker-wrap.open .country-picker-dropdown {
      display: flex;
    }

    .picker-search-wrap {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 8px 12px;
      border-bottom: 1px solid #f1f5f9;
      background: #f8fafc;
      color: #94a3b8;
    }

    .picker-search-wrap input {
      border: none;
      background: transparent;
      outline: none;
      font-size: 0.8rem;
      width: 100%;
      color: #0f172a;
    }

    .picker-list {
      max-height: 320px;
      overflow-y: auto;
      padding: 4px;
    }

    .picker-item {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 6px 10px;
      border-radius: 6px;
      text-decoration: none;
      color: #1e293b;
      font-size: 0.8rem;
      font-weight: 500;
      transition: background 0.12s;
    }

    .picker-item:hover {
      background: #f1f5f9;
      color: #2563eb;
    }

    .picker-item.active {
      background: #eff6ff;
      color: #1d4ed8;
      font-weight: 700;
    }

    .picker-item-flag {
      width: 19px;
      height: 14px;
      object-fit: cover;
      border-radius: 2px;
      box-shadow: 0 0 1px rgba(0,0,0,0.3);
      flex-shrink: 0;
    }

    .picker-item-code {
      font-weight: 800;
      font-size: 0.75rem;
      color: #475569;
      width: 24px;
      flex-shrink: 0;
    }

    .picker-item.active .picker-item-code {
      color: #2563eb;
    }

    .picker-item-name {
      flex: 1;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .picker-item-check {
      color: #2563eb;
      font-weight: 900;
      font-size: 0.85rem;
    }

    /* =========================================================================
       COMMERCIAL UNLOCK MODAL (Watch Ads OR Share to Social)
       ========================================================================= */
    .modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(15, 23, 42, 0.65);
      backdrop-filter: blur(5px);
      z-index: 100;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 1rem;
      animation: fadeIn 0.2s ease;
    }

    @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

    .modal-box {
      background: var(--surface);
      border-radius: var(--radius-lg);
      width: 100%;
      max-width: 520px;
      box-shadow: 0 20px 40px rgba(0,0,0,0.2);
      overflow: hidden;
      display: flex;
      flex-direction: column;
      animation: scaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }

    @keyframes scaleIn { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }

    .modal-header {
      padding: 1.25rem 1.5rem;
      border-bottom: 1px solid var(--border);
      display: flex;
      justify-content: space-between;
      align-items: center;
      background: #fafbff;
    }

    .modal-header h3 {
      font-size: 1.1rem;
      font-weight: 800;
      color: #0f172a;
      display: flex;
      align-items: center;
      gap: 0.4rem;
    }

    .modal-close {
      background: transparent;
      border: none;
      font-size: 1.4rem;
      color: var(--text-muted);
      cursor: pointer;
    }

    .modal-body {
      padding: 1.5rem;
      display: flex;
      flex-direction: column;
      gap: 1.25rem;
    }

    /* =========================================================================
       COMMERCIAL UNLOCK MODAL - 极简模式 (MINIMALIST MODE)
       ========================================================================= */
    #unlockModal .modal-box,
    .modal-box-minimal {
      max-width: 430px;
      border-radius: 20px;
      border: 1px solid rgba(226, 232, 240, 0.85);
      box-shadow: 0 24px 48px -12px rgba(15, 23, 42, 0.16), 0 0 0 1px rgba(15, 23, 42, 0.04);
      background: #ffffff;
      overflow: hidden;
      font-family: inherit;
    }

    .modal-header-minimal {
      padding: 1.25rem 1.4rem 0.6rem 1.4rem;
      background: #ffffff;
      border-bottom: none;
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
    }

    .unlock-header-info {
      flex: 1;
    }

    .unlock-title {
      font-size: 1.12rem;
      font-weight: 800;
      letter-spacing: -0.015em;
      color: #0f172a;
      display: flex;
      align-items: center;
      gap: 0.5rem;
      margin: 0;
      line-height: 1.3;
    }

    .unlock-title-icon {
      color: var(--primary);
      flex-shrink: 0;
    }

    .unlock-subtitle {
      font-size: 0.8rem;
      color: #64748b;
      margin: 0.35rem 0 0 0;
      line-height: 1.4;
      font-weight: 500;
    }

    .btn-close-minimal {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      border: none;
      background: #f1f5f9;
      color: #64748b;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.25rem;
      cursor: pointer;
      transition: all 0.15s ease;
      line-height: 1;
      flex-shrink: 0;
      margin-left: 0.75rem;
    }

    .btn-close-minimal:hover {
      background: #e2e8f0;
      color: #0f172a;
      transform: scale(1.05);
    }

    .modal-body-minimal {
      padding: 0.75rem 1.4rem 1.4rem 1.4rem;
      display: flex;
      flex-direction: column;
      gap: 0.85rem;
    }

    /* Minimalist Interactive Option Card */
    .minimal-unlock-item {
      display: flex;
      align-items: center;
      gap: 0.85rem;
      padding: 0.95rem 1.1rem;
      background: #f8fafc;
      border: 1.5px solid #e2e8f0;
      border-radius: 14px;
      cursor: pointer;
      transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
      user-select: none;
      position: relative;
    }

    .minimal-unlock-item:hover {
      background: #ffffff;
      border-color: #6366f1;
      box-shadow: 0 6px 18px -4px rgba(99, 102, 241, 0.14);
      transform: translateY(-1.5px);
    }

    .minimal-unlock-item:active {
      transform: translateY(0);
    }

    .minimal-unlock-icon {
      width: 40px;
      height: 40px;
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      transition: transform 0.2s ease;
    }

    .minimal-unlock-item:hover .minimal-unlock-icon {
      transform: scale(1.08);
    }

    .icon-ad {
      background: #eff6ff;
      color: #4f46e5;
    }

    .icon-share {
      background: #ecfdf5;
      color: #059669;
    }

    .minimal-unlock-meta {
      flex: 1;
      min-width: 0;
    }

    .minimal-unlock-heading {
      display: flex;
      align-items: center;
      gap: 0.45rem;
      margin-bottom: 0.15rem;
    }

    .unlock-opt-name {
      font-size: 0.92rem;
      font-weight: 750;
      color: #0f172a;
    }

    .unlock-pill-badge {
      display: inline-flex;
      align-items: center;
      padding: 0.1rem 0.45rem;
      border-radius: 20px;
      font-size: 0.68rem;
      font-weight: 700;
      background: #e0e7ff;
      color: #4338ca;
      letter-spacing: 0.02em;
    }

    .badge-fast {
      background: #dcfce7;
      color: #15803d;
    }

    .minimal-unlock-desc {
      font-size: 0.76rem;
      color: #64748b;
      line-height: 1.35;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .minimal-unlock-arrow {
      color: #94a3b8;
      display: flex;
      align-items: center;
      transition: transform 0.2s ease, color 0.2s ease;
      flex-shrink: 0;
    }

    .minimal-unlock-item:hover .minimal-unlock-arrow {
      color: var(--primary);
      transform: translateX(2px);
    }

    /* Minimalist Share Platform Grid (3 Columns Balanced) */
    .minimal-share-row {
      display: none;
      grid-template-columns: repeat(3, 1fr);
      gap: 0.45rem;
      padding: 0.35rem 0 0.15rem 0;
      animation: fadeIn 0.2s ease;
      width: 100%;
      box-sizing: border-box;
    }

    @media (max-width: 440px) {
      .minimal-share-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.35rem;
      }
    }

    .mini-share-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.32rem;
      padding: 0.55rem 0.25rem;
      border-radius: 9px;
      border: 1px solid #e2e8f0;
      background: #f8fafc;
      color: #334155;
      font-size: 0.76rem;
      font-weight: 650;
      cursor: pointer;
      transition: all 0.18s ease;
      font-family: inherit;
      white-space: nowrap;
      user-select: none;
      width: 100%;
      min-width: 0;
      box-sizing: border-box;
    }

    .mini-share-btn span {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .mini-share-btn:hover {
      background: #ffffff;
      border-color: #cbd5e1;
      transform: translateY(-1.5px);
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
    }

    .btn-copy-link:hover { border-color: #6366f1; color: #4f46e5; }
    .btn-whatsapp:hover { border-color: #25d366; color: #16a34a; }
    .btn-facebook:hover { border-color: #1877f2; color: #1877f2; }
    .btn-x:hover { border-color: #0f172a; color: #0f172a; }
    .btn-tg:hover { border-color: #0088cc; color: #0284c7; }
    .btn-line:hover { border-color: #06c755; color: #059669; }
    .btn-linkedin:hover { border-color: #0a66c2; color: #0a66c2; }
    .btn-reddit:hover { border-color: #ff4500; color: #ea580c; }
    .btn-vk:hover { border-color: #0077ff; color: #0077ff; }
    .btn-email:hover { border-color: #ea4335; color: #dc2626; }
    .btn-native:hover { border-color: #8b5cf6; color: #7c3aed; }
    .btn-wechat:hover { border-color: #07c160; color: #059669; }
    .btn-qq:hover { border-color: #12b7f5; color: #0284c7; }
    .btn-weibo:hover { border-color: #e6162d; color: #dc2626; }
    .btn-xhs:hover { border-color: #fe2c55; color: #e11d48; }
    .btn-kakao:hover { border-color: #fee500; color: #854d0e; }

    /* Minimalist Ad Screen */
    .ad-screen-minimal {
      display: none;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 2.2rem 1.5rem;
      background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
      border-radius: 16px;
      border: 1px dashed #cbd5e1;
      text-align: center;
      animation: fadeIn 0.2s ease;
    }

    .minimal-ad-timer-wrap {
      display: flex;
      align-items: baseline;
      justify-content: center;
      gap: 2px;
      margin-bottom: 0.85rem;
    }

    .ad-screen-minimal .ad-timer-circle {
      width: 58px;
      height: 58px;
      border-radius: 50%;
      border: 3px solid #6366f1;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.55rem;
      font-weight: 850;
      color: #4f46e5;
      background: rgba(99, 102, 241, 0.08);
      margin-bottom: 0;
      box-shadow: 0 0 16px rgba(99, 102, 241, 0.2);
    }

    .ad-timer-unit {
      font-size: 0.95rem;
      font-weight: 700;
      color: #6366f1;
    }

    .minimal-ad-progressbar {
      width: 100%;
      max-width: 260px;
      height: 6px;
      background: #e2e8f0;
      border-radius: 10px;
      overflow: hidden;
      margin-bottom: 1rem;
    }

    .minimal-ad-progress-fill {
      height: 100%;
      width: 0%;
      background: linear-gradient(90deg, #6366f1, #4f46e5);
      border-radius: 10px;
      transition: width 0.3s ease;
    }

    .minimal-ad-title {
      font-size: 1.05rem;
      font-weight: 800;
      color: #0f172a;
      margin: 0 0 0.3rem 0;
    }

    .minimal-ad-desc {
      font-size: 0.78rem;
      color: #64748b;
      max-width: 300px;
      line-height: 1.45;
      margin: 0 0 1.25rem 0;
    }

    .btn-cancel-ad {
      background: transparent;
      border: 1px solid #cbd5e1;
      color: #64748b;
      padding: 0.4rem 0.9rem;
      border-radius: 8px;
      font-size: 0.75rem;
      font-weight: 650;
      cursor: pointer;
      transition: all 0.15s ease;
    }

    .btn-cancel-ad:hover {
      background: #f1f5f9;
      color: #0f172a;
      border-color: #94a3b8;
    }

    /* Custom Dialog */
    .dialog-overlay {
      position: fixed;
      inset: 0;
      background: rgba(15, 23, 42, 0.6);
      backdrop-filter: blur(4px);
      z-index: 100;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 1rem;
    }

    .dialog-box {
      background: var(--surface);
      border-radius: var(--radius-lg);
      width: 100%;
      max-width: 460px;
      padding: 1.5rem;
      box-shadow: 0 20px 40px rgba(0,0,0,0.2);
      display: flex;
      flex-direction: column;
      gap: 1rem;
    }

    /* Toast */
    #toast {
      position: fixed;
      bottom: 1.5rem;
      right: 1.5rem;
      background: #1e293b;
      color: white;
      padding: 0.75rem 1.25rem;
      border-radius: var(--radius-md);
      font-size: 0.875rem;
      font-weight: 600;
      display: none;
      box-shadow: 0 10px 25px rgba(0,0,0,0.15);
      z-index: 100000;
    }

    /* Photo Crop Modal */
    .crop-modal-overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      width: 100vw;
      height: 100vh;
      background: rgba(15, 23, 42, 0.85);
      backdrop-filter: blur(8px);
      z-index: 99999;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 1rem;
      box-sizing: border-box;
    }

    .crop-modal-card {
      background: var(--surface);
      border-radius: var(--radius-lg);
      width: 100%;
      max-width: 580px;
      display: flex;
      flex-direction: column;
      box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
      border: 1px solid var(--border);
      overflow: hidden;
      animation: modalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .crop-viewport-wrap {
      position: relative;
      width: 100%;
      height: 380px;
      background: #090d16;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      cursor: grab;
      user-select: none;
      touch-action: none;
    }

    .crop-viewport-wrap:active {
      cursor: grabbing;
    }

    #cropCanvas {
      display: block;
      max-width: 100%;
      max-height: 100%;
    }

    .crop-guide-overlay {
      position: absolute;
      inset: 0;
      pointer-events: none;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .crop-guide-box {
      border: 2px solid rgba(255, 255, 255, 0.95);
      box-shadow: 0 0 0 9999px rgba(9, 13, 22, 0.68);
      position: relative;
      border-radius: 4px;
      transition: width 0.15s ease, height 0.15s ease;
    }

    .crop-oval-guide {
      position: absolute;
      top: 10%;
      left: 14%;
      width: 72%;
      height: 72%;
      border: 2px dashed rgba(99, 102, 241, 0.95);
      border-radius: 50% 50% 46% 46%;
      box-shadow: 0 0 12px rgba(99, 102, 241, 0.35);
    }

    .crop-eye-line {
      position: absolute;
      top: 42%;
      left: 6%;
      right: 6%;
      border-top: 1.5px dotted rgba(234, 88, 12, 0.9);
    }

    .crop-center-line {
      position: absolute;
      top: 4%;
      bottom: 4%;
      left: 50%;
      border-left: 1px dashed rgba(255, 255, 255, 0.35);
    }

    .crop-guide-badge {
      position: absolute;
      bottom: -28px;
      left: 50%;
      transform: translateX(-50%);
      background: rgba(0, 0, 0, 0.85);
      color: #cbd5e1;
      font-size: 0.72rem;
      padding: 2px 10px;
      border-radius: 4px;
      white-space: nowrap;
      font-weight: 700;
      border: 1px solid rgba(255, 255, 255, 0.2);
    }

    .crop-toolbar {
      padding: 0.75rem 1.25rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.75rem;
      background: var(--surface-subtle);
      border-top: 1px solid var(--border);
      flex-wrap: wrap;
    }

    /* =========================================================================
       SITE FOOTER & LEGAL MODALS (Privacy Policy, Terms of Service)
       ========================================================================= */
    .site-footer {
      width: 100%;
      background: #ffffff;
      border-top: 1px solid var(--border);
      padding: 1.85rem 1.5rem;
      margin-top: 2.5rem;
      color: var(--text-muted);
      font-size: 0.85rem;
    }

    .footer-container {
      max-width: 1320px;
      margin: 0 auto;
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 1.25rem;
    }

    .footer-left {
      display: flex;
      align-items: center;
      gap: 0.65rem;
      flex-wrap: wrap;
    }

    .footer-brand {
      font-weight: 800;
      color: #0f172a;
      letter-spacing: -0.01em;
    }

    .footer-tagline {
      color: #94a3b8;
      font-size: 0.8rem;
    }

    .footer-links {
      display: flex;
      align-items: center;
      gap: 0.85rem;
      flex-wrap: wrap;
    }

    .footer-link {
      color: #475569;
      text-decoration: none;
      font-weight: 600;
      transition: color 0.15s ease;
      cursor: pointer;
    }

    .footer-link:hover {
      color: var(--primary);
      text-decoration: underline;
    }

    .footer-sep {
      color: #cbd5e1;
      user-select: none;
    }

    .footer-copy {
      color: #94a3b8;
      font-size: 0.8rem;
    }

    @media (max-width: 768px) {
      .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.85rem;
      }
      .footer-left, .footer-links {
        justify-content: center;
      }
    }

    /* Legal Modals (Privacy & Terms) */
    .legal-modal-box {
      background: #ffffff;
      border-radius: 16px;
      width: 100%;
      max-width: 680px;
      max-height: 85vh;
      box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
      display: flex;
      flex-direction: column;
      overflow: hidden;
      animation: scaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .legal-modal-body {
      padding: 1.5rem 1.75rem;
      overflow-y: auto;
      line-height: 1.7;
      color: #334155;
      font-size: 0.88rem;
    }

    .legal-modal-body h4 {
      font-size: 0.98rem;
      font-weight: 800;
      color: #0f172a;
      margin: 1.25rem 0 0.45rem 0;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .legal-modal-body h4:first-child {
      margin-top: 0;
    }

    .legal-modal-body p {
      margin: 0 0 0.85rem 0;
      color: #475569;
    }

    .legal-modal-body ul {
      margin: 0 0 1rem 1.25rem;
      padding: 0;
      color: #475569;
    }

    .legal-modal-body li {
      margin-bottom: 0.35rem;
    }

    .legal-badge-pill {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      background: #eff6ff;
      color: #1d4ed8;
      border: 1px solid #bfdbfe;
      font-size: 0.72rem;
      font-weight: 700;
      padding: 2px 8px;
      border-radius: 9999px;
    }

    /* Cookie Consent Banner */
    .cookie-banner {
      position: fixed;
      bottom: 20px;
      left: 50%;
      transform: translateX(-50%);
      width: calc(100% - 32px);
      max-width: 860px;
      background: rgba(15, 23, 42, 0.95);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
      color: #ffffff;
      border: 1px solid rgba(255, 255, 255, 0.15);
      border-radius: 14px;
      padding: 0.85rem 1.25rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
      box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.45);
      z-index: 999999;
      animation: modalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .cookie-content {
      display: flex;
      align-items: center;
      gap: 10px;
      min-width: 0;
      flex: 1;
    }

    .cookie-icon {
      font-size: 1.5rem;
      flex-shrink: 0;
    }

    .cookie-text {
      font-size: 0.82rem;
      color: #cbd5e1;
      line-height: 1.45;
    }

    .cookie-actions {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-shrink: 0;
    }

    .btn-cookie-accept {
      background: #ea580c;
      color: #ffffff;
      border: none;
      padding: 0.45rem 1.1rem;
      border-radius: 8px;
      font-size: 0.82rem;
      font-weight: 700;
      cursor: pointer;
      white-space: nowrap;
      transition: all 0.15s;
    }

    .btn-cookie-accept:hover {
      background: #c2410c;
      transform: translateY(-1px);
    }

    .btn-cookie-close {
      background: transparent;
      border: none;
      color: #94a3b8;
      font-size: 1.3rem;
      cursor: pointer;
      padding: 0 4px;
      line-height: 1;
      transition: color 0.15s;
    }

    .btn-cookie-close:hover {
      color: #ffffff;
    }

    @media (max-width: 640px) {
      .cookie-banner {
        flex-direction: column;
        align-items: stretch;
        bottom: 12px;
        padding: 0.9rem 1rem;
      }
      .cookie-actions {
        justify-content: flex-end;
      }
    }

    /* =========================================================================
       SITE FOOTER & LEGAL MODALS (Privacy Policy, Terms of Service)
       ========================================================================= */
    .site-footer {
      width: 100%;
      background: #ffffff;
      border-top: 1px solid var(--border);
      padding: 1.85rem 1.5rem;
      margin-top: 3.5rem;
      color: var(--text-muted);
      font-size: 0.85rem;
    }

    .footer-container {
      max-width: 1320px;
      margin: 0 auto;
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 1.25rem;
    }

    .footer-left {
      display: flex;
      align-items: center;
      gap: 0.65rem;
      flex-wrap: wrap;
    }

    .footer-brand {
      font-weight: 800;
      color: #0f172a;
      letter-spacing: -0.01em;
    }

    .footer-tagline {
      color: #94a3b8;
      font-size: 0.8rem;
    }

    .footer-links {
      display: flex;
      align-items: center;
      gap: 0.85rem;
      flex-wrap: wrap;
    }

    .footer-link {
      color: #475569;
      text-decoration: none;
      font-weight: 600;
      transition: color 0.15s ease;
      cursor: pointer;
    }

    .footer-link:hover {
      color: var(--primary);
      text-decoration: underline;
    }

    .footer-sep {
      color: #cbd5e1;
      user-select: none;
    }

    .footer-copy {
      color: #94a3b8;
      font-size: 0.8rem;
    }

    @media (max-width: 768px) {
      .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.85rem;
      }
      .footer-left, .footer-links {
        justify-content: center;
      }
    }

    /* Legal Modals (Privacy & Terms) */
    .legal-modal-box {
      background: #ffffff;
      border-radius: 16px;
      width: 100%;
      max-width: 680px;
      max-height: 85vh;
      box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
      display: flex;
      flex-direction: column;
      overflow: hidden;
      animation: scaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .legal-modal-body {
      padding: 1.5rem 1.75rem;
      overflow-y: auto;
      line-height: 1.7;
      color: #334155;
      font-size: 0.88rem;
    }

    .legal-modal-body h4 {
      font-size: 0.98rem;
      font-weight: 800;
      color: #0f172a;
      margin: 1.25rem 0 0.45rem 0;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .legal-modal-body h4:first-child {
      margin-top: 0;
    }

    .legal-modal-body p {
      margin: 0 0 0.85rem 0;
      color: #475569;
    }

    .legal-modal-body ul {
      margin: 0 0 1rem 1.25rem;
      padding: 0;
      color: #475569;
    }

    .legal-modal-body li {
      margin-bottom: 0.35rem;
    }

    .legal-badge-pill {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      background: #eff6ff;
      color: #1d4ed8;
      border: 1px solid #bfdbfe;
      font-size: 0.72rem;
      font-weight: 700;
      padding: 2px 8px;
      border-radius: 9999px;
    }

    .picker-section-title {
      padding: 6px 12px;
      font-size: 0.72rem;
      font-weight: 800;
      color: #64748b;
      background: #f1f5f9;
      letter-spacing: 0.03em;
      border-top: 1px solid #e2e8f0;
      border-bottom: 1px solid #e2e8f0;
      position: sticky;
      top: 0;
      z-index: 2;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .picker-section-title:first-child {
      border-top: none;
    }

    /* =========================================================================
       DoNet Floating Country Switch Card (Bottom-Right)
       ========================================================================= */
    .donet-lang-card {
      position: fixed !important;
      bottom: 24px !important;
      right: 24px !important;
      width: 340px !important;
      max-width: calc(100vw - 32px) !important;
      box-sizing: border-box !important;
      z-index: 999999 !important;
      background: linear-gradient(145deg, rgba(15, 23, 42, 0.96) 0%, rgba(30, 41, 59, 0.98) 100%) !important;
      backdrop-filter: blur(16px) !important;
      -webkit-backdrop-filter: blur(16px) !important;
      border: 1px solid rgba(234, 88, 12, 0.35) !important;
      box-shadow: 0 12px 36px -4px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
      border-radius: 16px !important;
      color: #f8fafc !important;
      padding: 16px 18px !important;
      font-family: inherit !important;
      display: flex !important;
      flex-direction: column !important;
      gap: 10px !important;
      animation: donetCardSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
    }
    @keyframes donetCardSlideUp {
      from { transform: translateY(30px) scale(0.96); opacity: 0; }
      to { transform: translateY(0) scale(1); opacity: 1; }
    }
    .donet-lang-card-header {
      display: flex !important;
      align-items: center !important;
      justify-content: space-between !important;
      gap: 8px !important;
    }
    .donet-lang-card-title {
      display: flex !important;
      align-items: center !important;
      gap: 8px !important;
      font-size: 0.88rem !important;
      font-weight: 700 !important;
      color: #f8fafc !important;
      letter-spacing: -0.01em !important;
    }
    .donet-lang-card-flag {
      font-size: 1.35rem !important;
      line-height: 1 !important;
      flex-shrink: 0 !important;
    }
    .donet-lang-card-close {
      background: rgba(255, 255, 255, 0.06) !important;
      border: 1px solid rgba(255, 255, 255, 0.1) !important;
      color: #94a3b8 !important;
      font-size: 1.15rem !important;
      line-height: 1 !important;
      cursor: pointer !important;
      width: 24px !important;
      height: 24px !important;
      border-radius: 50% !important;
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
      transition: all 0.15s !important;
      padding: 0 !important;
    }
    .donet-lang-card-close:hover {
      color: #ffffff !important;
      background: rgba(255, 255, 255, 0.16) !important;
      transform: scale(1.08) !important;
    }
    .donet-lang-card-body {
      font-size: 0.8rem !important;
      line-height: 1.45 !important;
      color: #cbd5e1 !important;
    }
    .donet-lang-card-actions {
      display: flex !important;
      align-items: center !important;
      gap: 8px !important;
      margin-top: 4px !important;
    }
    .donet-lang-card-btn-switch {
      flex: 1 !important;
      text-align: center !important;
      background: linear-gradient(135deg, #ea580c 0%, #f97316 100%) !important;
      color: #ffffff !important;
      font-weight: 700 !important;
      padding: 8px 14px !important;
      border-radius: 10px !important;
      box-shadow: 0 4px 12px rgba(234, 88, 12, 0.35) !important;
      text-decoration: none !important;
      font-size: 0.8rem !important;
      border: none !important;
      cursor: pointer !important;
      transition: transform 0.15s ease, box-shadow 0.15s ease !important;
      display: inline-block !important;
    }
    .donet-lang-card-btn-switch:hover {
      transform: translateY(-1px) !important;
      box-shadow: 0 6px 16px rgba(234, 88, 12, 0.45) !important;
    }
    .donet-lang-card-btn-stay {
      background: rgba(255, 255, 255, 0.05) !important;
      color: #94a3b8 !important;
      border: 1px solid rgba(148, 163, 184, 0.3) !important;
      padding: 8px 12px !important;
      border-radius: 10px !important;
      font-size: 0.78rem !important;
      cursor: pointer !important;
      white-space: nowrap !important;
      transition: all 0.15s ease !important;
      font-family: inherit !important;
    }
    .donet-lang-card-btn-stay:hover {
      color: #f8fafc !important;
      border-color: #cbd5e1 !important;
      background: rgba(255, 255, 255, 0.1) !important;
    }
    @media (max-width: 640px) {
      .donet-lang-card {
        bottom: 16px !important;
        right: 16px !important;
        left: 16px !important;
        width: auto !important;
        max-width: none !important;
      }
    }

/* =========================================================================
   Unified SEO Hub & Homepage FAQ Accordion Styles
   ========================================================================= */
.seo-hub-section {
  width: 100%;
  max-width: 1080px;
  margin: 3.5rem auto 2.5rem auto;
  padding: 0 1.25rem;
  box-sizing: border-box;
}

.seo-homepage-faq {
  margin-top: 3.5rem;
  margin-bottom: 3.5rem;
}

.seo-block {
  margin-bottom: 2.5rem;
}

.seo-block-header {
  text-align: center;
  margin-bottom: 2.25rem;
}

.seo-block-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text, #0f172a);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.seo-block-sub {
  font-size: 0.95rem;
  color: var(--text-muted, #64748b);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.55;
}

.seo-faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: 860px;
  margin: 0 auto;
}

.seo-faq-item {
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: var(--radius-md, 14px);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
}

.seo-faq-item:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.seo-faq-item[open] {
  border-color: var(--primary, #4f46e5);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.08);
}

.seo-faq-q {
  padding: 1.15rem 1.35rem;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text, #0f172a);
  cursor: pointer;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  user-select: none;
  list-style: none !important;
  transition: color 0.15s ease;
}

/* Hide native disclosure markers across Chrome, Safari, Firefox & Edge */
.seo-faq-q::-webkit-details-marker,
.seo-faq-q::marker,
details.seo-faq-item summary::-webkit-details-marker,
details.seo-faq-item summary::marker,
details.seo-faq-card summary::-webkit-details-marker,
details.seo-faq-card summary::marker,
details summary::-webkit-details-marker,
details summary::marker {
  display: none !important;
  content: "" !important;
}

.seo-faq-q:hover {
  color: var(--primary, #4f46e5);
}

.seo-faq-icon {
  font-size: 1.25rem;
  line-height: 1;
  color: var(--primary, #4f46e5);
  font-weight: 700;
  margin-left: 1rem;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
}

.seo-faq-item[open] .seo-faq-icon {
  transform: rotate(45deg);
}

.seo-faq-a {
  padding: 0 1.35rem 1.25rem 1.35rem;
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.65;
  border-top: 1px dashed rgba(226, 232, 240, 0.8);
  padding-top: 0.85rem;
}

.seo-faq-a p {
  margin: 0;
}

@media (max-width: 640px) {
  .seo-hub-section,
  .seo-hub-section.seo-homepage-faq {
    margin: 2rem auto 1.5rem auto;
    padding: 0 0.75rem;
  }
  .seo-block-title {
    font-size: 1.25rem;
  }
  .seo-faq-q {
    padding: 0.95rem 1rem;
    font-size: 0.88rem;
  }
  .seo-faq-a {
    padding: 0 1rem 0.95rem 1rem;
    font-size: 0.82rem;
    padding-top: 0.7rem;
  }
}