:root {
      --bg: #f5f5f7;
      --card: #ffffff;
      --line: rgba(60, 60, 67, 0.12);
      --text: #1d1d1f;
      --sub: #6e6e73;
      --primary: #007aff;
      --primary-hover: #0062cc;
      --primary-soft: rgba(0, 122, 255, 0.08);
      --primary-glow: rgba(0, 122, 255, 0.22);
      --danger: #ff3b30;
      --danger-hover: #d70015;
      --ok: #34c759;
      --warning: #ff9500;
      --info: #007aff;
      --sidebar-bg: #1c1c1e;
      --sidebar-hover: #2c2c2e;
      --radius-sm: 8px;
      --radius-md: 12px;
      --radius-lg: 18px;
      --radius-xl: 24px;
      --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
      --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05);
      --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.06);
    }
    * { box-sizing: border-box; -webkit-font-smoothing: antialiased; margin: 0; padding: 0; }
    body {
      min-height: 100vh;
      font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
      background:
        radial-gradient(circle at top left, rgba(0, 122, 255, 0.05), transparent 36%),
        radial-gradient(circle at bottom right, rgba(52, 199, 89, 0.04), transparent 30%),
        linear-gradient(180deg, #f5f5f7 0%, #ececed 100%);
      color: var(--text);
      line-height: 1.5;
    }
    .wrap { max-width: 1320px; margin: 24px auto; padding: 0 20px 36px; }
    .card {
      background: rgba(255, 255, 255, 0.96);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border: 1px solid rgba(0, 0, 0, 0.06);
      border-radius: var(--radius-lg);
      padding: 24px;
      margin-bottom: 24px;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
      transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.2s ease, border-color 0.2s ease;
    }
    .card:hover {
      transform: translateY(-1px);
      box-shadow: 0 8px 28px rgba(0, 0, 0, 0.06);
      border-color: rgba(0, 122, 255, 0.15);
    }
    h1 { margin: 0 0 16px; font-size: 28px; font-weight: 700; letter-spacing: -0.02em; color: var(--text); }
    h2 { margin: 0 0 12px; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
    .sub { color: var(--sub); font-size: 13px; margin-bottom: 16px; line-height: 1.6; }
    .row {
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
      align-items: flex-start;
    }
    input,
    select,
    textarea {
      width: 100%;
      min-height: 44px;
      padding: 10px 14px;
      border: 1px solid rgba(0, 0, 0, 0.12);
      border-radius: 10px;
      outline: none;
      background: #ffffff;
      color: #1d1d1f;
      font-size: 13px;
      transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
    }
    input:hover,
    select:hover,
    textarea:hover {
      border-color: rgba(0, 122, 255, 0.4);
    }
    input:focus,
    select:focus,
    textarea:focus {
      border-color: var(--primary);
      background: #ffffff;
      box-shadow: 0 0 0 3px var(--primary-glow);
    }
    input::placeholder,
    textarea::placeholder {
      color: #86868b;
    }
    textarea {
      min-height: 110px;
      resize: vertical;
      line-height: 1.6;
    }
    .form-group {
      display: flex;
      flex-direction: column;
      gap: 8px;
      width: 100%;
    }
    .form-label {
      font-size: 13px;
      font-weight: 600;
      color: var(--text);
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .alert {
      padding: 12px 16px;
      border-radius: var(--radius-md);
      font-size: 13px;
      line-height: 1.55;
      display: flex;
      gap: 12px;
      align-items: flex-start;
      border: 1px solid transparent;
    }
    .alert-info {
      background: rgba(0, 122, 255, 0.08);
      border-color: rgba(0, 122, 255, 0.18);
      color: #004085;
    }
    .alert-info b { color: #0056b3; }
    .alert-purple {
      background: rgba(88, 86, 214, 0.08);
      border-color: rgba(88, 86, 214, 0.18);
      color: #3634a3;
    }
    .alert-purple b { color: #5856d6; }
    select {
      cursor: pointer;
      appearance: none;
      background-image:
        linear-gradient(45deg, transparent 50%, #6e6e73 50%),
        linear-gradient(135deg, #6e6e73 50%, transparent 50%);
      background-position:
        calc(100% - 18px) calc(50% - 3px),
        calc(100% - 12px) calc(50% - 3px);
      background-size: 6px 6px, 6px 6px;
      background-repeat: no-repeat;
      padding-right: 38px;
    }
    button {
      border: none;
      min-height: 40px;
      padding: 0 16px;
      border-radius: 10px;
      background: var(--primary);
      color: #fff;
      font-size: 13px;
      font-weight: 600;
      letter-spacing: -0.01em;
      cursor: pointer;
      transition: transform 0.12s ease, opacity 0.12s ease, background-color 0.12s ease;
      box-shadow: 0 2px 8px rgba(0, 122, 255, 0.2);
    }
    button:hover {
      background: var(--primary-hover);
      box-shadow: 0 4px 12px rgba(0, 122, 255, 0.28);
    }
    button:active {
      transform: scale(0.98);
      opacity: 0.9;
    }
    button:disabled {
      opacity: 0.5;
      cursor: not-allowed;
      transform: none;
      box-shadow: none;
    }
    button.ghost {
      background: #ffffff;
      color: var(--text);
      border: 1px solid rgba(0, 0, 0, 0.12);
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    }
    button.ghost:hover {
      background: rgba(0, 0, 0, 0.03);
      border-color: rgba(0, 0, 0, 0.18);
      color: var(--primary);
    }
    button.danger {
      background: var(--danger);
      color: #fff;
      box-shadow: 0 2px 8px rgba(255, 59, 48, 0.25);
    }
    button.danger:hover {
      background: var(--danger-hover);
      box-shadow: 0 4px 12px rgba(255, 59, 48, 0.35);
    }
    .chip-wrap { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
    .chip {
      background: #eff6ff;
      border: 1px solid #bfdbfe;
      color: #1e3a8a;
      border-radius: 999px;
      padding: 6px 10px;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 13px;
    }
    .chip a { color: var(--danger); text-decoration: none; font-weight: 700; cursor: pointer; }
    .grid {
      display: grid;
      grid-template-columns: repeat(auto-fit,minmax(320px,1fr));
      gap: 12px;
    }
    .photo-item {
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 10px;
      display: grid;
      grid-template-columns: 110px 1fr;
      gap: 10px;
    }
    .photo-item img {
      width: 110px;
      height: 110px;
      object-fit: cover;
      border-radius: 8px;
      border: 1px solid #dbeafe;
      background: #f1f5f9;
    }
    .muted { color: var(--sub); font-size: 12px; line-height: 1.6; }
    .status {
      position: fixed;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%) scale(0.96);
      z-index: 9999;
      min-width: 280px;
      max-width: min(86vw, 420px);
      padding: 18px 22px;
      border-radius: 18px;
      font-size: 15px;
      font-weight: 700;
      line-height: 1.6;
      text-align: center;
      display: none;
      box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
      backdrop-filter: blur(14px);
      transition: opacity 0.2s ease, transform 0.2s ease;
      opacity: 0;
    }
    .status.show {
      display: block;
      opacity: 1;
      transform: translate(-50%, -50%) scale(1);
    }
    .status.ok {
      background: rgba(236, 253, 245, 0.96);
      color: #065f46;
      border: 1px solid #86efac;
    }
    .status.err {
      background: rgba(254, 242, 242, 0.97);
      color: #991b1b;
      border: 1px solid #fca5a5;
    }
    .hidden { display: none !important; }
    .topbar { display:flex; justify-content:space-between; gap:10px; align-items:center; }
    #adminApp {
      min-width: 0;
    }
    .admin-shell {
      display: grid;
      grid-template-columns: 280px minmax(0, 1fr);
      gap: 32px;
      align-items: start;
    }
    .admin-sidebar {
      position: sticky;
      top: 24px;
      align-self: start;
      display: grid;
      gap: 24px;
    }
    .admin-main {
      min-width: 0;
      display: grid;
      gap: 16px;
    }
    .sidebar-card {
      box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
    }
    .admin-brand-card {
      padding: 32px 24px;
      background: var(--sidebar-bg);
      color: #fff;
      border: none;
      box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
    }
    .admin-brand-logo {
      width: 56px;
      height: 56px;
      border-radius: 16px;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 20px;
      font-size: 28px;
      background: linear-gradient(135deg, #007aff 0%, #0056b3 100%);
      box-shadow: 0 8px 20px rgba(0, 122, 255, 0.35);
      border: 1px solid rgba(255, 255, 255, 0.15);
    }
    .admin-brand-title {
      font-size: 20px;
      font-weight: 800;
      color: #fff;
      margin-bottom: 8px;
      letter-spacing: -0.02em;
    }
    .admin-brand-sub {
      font-size: 13px;
      line-height: 1.75;
      color: #94a3b8;
      margin-bottom: 20px;
    }
    .admin-user-badge {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 12px 16px;
      border-radius: 16px;
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.1);
      color: #cbd5e1;
      font-size: 13px;
      margin-bottom: 20px;
    }
    .admin-user-badge::before {
      content: "";
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--ok);
      box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
    }
    .dashboard-hero {
      position: relative;
      overflow: hidden;
      padding: 40px;
      border: 1px solid rgba(0, 0, 0, 0.08);
      border-radius: var(--radius-xl);
      background:
        radial-gradient(circle at top right, rgba(0, 122, 255, 0.25), transparent 45%),
        linear-gradient(135deg, #1c1c1e 0%, #2c2c2e 100%);
      color: #fff;
      box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
    }
    .dashboard-hero::before,
    .dashboard-hero::after {
      content: "";
      position: absolute;
      border-radius: 999px;
      background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent);
    }
    .dashboard-hero::before {
      width: 280px;
      height: 280px;
      top: -100px;
      right: -60px;
    }
    .dashboard-hero::after {
      width: 240px;
      height: 240px;
      bottom: -100px;
      left: -60px;
    }
    .dashboard-grid {
      position: relative;
      z-index: 1;
      display: grid;
      grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
      gap: 18px;
      align-items: stretch;
    }
    .dashboard-badge {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 6px 12px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.06em;
      color: #ffffff;
      background: rgba(255, 255, 255, 0.16);
      border: 1px solid rgba(255, 255, 255, 0.2);
    }
    .dashboard-title {
      margin: 16px 0 10px;
      font-size: 34px;
      font-weight: 700;
      line-height: 1.15;
      color: #ffffff;
      letter-spacing: -0.02em;
    }
    .dashboard-sub {
      color: rgba(255, 255, 255, 0.78);
      font-size: 15px;
      line-height: 1.6;
      margin-bottom: 0;
    }
    .dashboard-stat-row {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 12px;
      margin-top: 22px;
    }
    .dashboard-stat {
      padding: 24px 18px;
      border-radius: var(--radius-md);
      background: #ffffff;
      border: 1px solid rgba(0, 0, 0, 0.06);
      transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.2s ease;
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    }
    .dashboard-stat:hover {
      border-color: rgba(0, 122, 255, 0.3);
      transform: translateY(-2px);
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    }
    .dashboard-stat span {
      display: block;
      font-size: 11px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: #86868b;
      margin-bottom: 10px;
    }
    .dashboard-stat strong {
      display: block;
      font-size: 34px;
      font-weight: 700;
      line-height: 1;
      color: #1d1d1f;
      letter-spacing: -0.02em;
    }
    .dashboard-side {
      display: grid;
      gap: 12px;
      align-content: space-between;
    }
    .dashboard-side-card {
      padding: 20px 20px 18px;
      border-radius: 20px;
      background: rgba(15, 23, 42, 0.24);
      border: 1px solid rgba(255, 255, 255, 0.12);
      backdrop-filter: blur(14px);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    .dashboard-side-title {
      font-size: 16px;
      font-weight: 700;
      margin-bottom: 8px;
      color: #f8fafc;
    }
    .dashboard-side-text {
      font-size: 13px;
      line-height: 1.8;
      color: rgba(226, 232, 240, 0.82);
    }
    .dashboard-logout {
      width: 100%;
      min-height: 48px;
    }
    .nav-card {
      padding: 16px;
      background: #ffffff;
      border: 1px solid rgba(0, 0, 0, 0.06);
      box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
    }
    .admin-nav-head {
      font-size: 11px;
      font-weight: 700;
      color: var(--sub);
      letter-spacing: 0.06em;
      text-transform: uppercase;
      margin: 4px 6px 10px;
    }

    .section-tabs {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }
    .section-tabs .tab-btn {
      width: 100%;
      padding: 10px 14px;
      border-radius: 10px;
      background: transparent;
      color: #3a3a3c;
      border: 1px solid transparent;
      font-size: 13px;
      font-weight: 500;
      text-align: left;
      transition: background-color 0.16s ease, color 0.16s ease;
      position: relative;
      overflow: hidden;
      box-shadow: none;
    }
    .section-tabs .tab-btn:hover {
      background: rgba(0, 0, 0, 0.04);
      color: var(--text);
      transform: none;
    }
    .section-tabs .tab-btn.active {
      background: var(--primary);
      color: #ffffff;
      font-weight: 600;
      border-color: transparent;
      box-shadow: 0 2px 8px rgba(0, 122, 255, 0.25);
    }
    .section-tabs .tab-btn.active::after {
      content: "";
      position: absolute;
      right: 14px;
      top: 50%;
      transform: translateY(-50%);
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: #fff;
      box-shadow: 0 0 10px rgba(255, 255, 255, 0.9);
    }

    .module-card {
      position: relative;
      overflow: hidden;
      padding: 32px;
      animation: fadeIn 0.4s ease-out;
      background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.96) 100%);
    }
    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(10px); }
      to { opacity: 1; transform: translateY(0); }
    }
    .module-card::before {
      content: "";
      position: absolute;
      top: 0;
      left: 24px;
      right: 24px;
      width: auto;
      height: 4px;
      background: linear-gradient(90deg, var(--primary) 0%, #38bdf8 100%);
      opacity: 0.95;
      border-radius: 999px;
    }
    .module-card h2 {
      font-size: 20px;
      margin-bottom: 10px;
    }
    .module-card .sub {
      font-size: 13px;
      line-height: 1.75;
    }
    .text-config-item,
    .storage-filter-card,
    .thumb-config-item,
    .upload-pick-card {
      border-radius: 14px;
      border-color: #dbeafe;
      background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
    }
    .table-wrap {
      margin-top: 16px;
      border: 1px solid var(--line);
      border-radius: 16px;
      overflow: hidden;
      background: #fff;
    }

    @media (max-width: 1024px) {
      .admin-shell {
        grid-template-columns: 1fr;
      }
      .admin-sidebar {
        position: static;
      }
      .section-tabs {
        flex-direction: row;
        flex-wrap: wrap;
      }
      .section-tabs .tab-btn {
        width: auto;
        min-width: 160px;
        text-align: center;
      }
      .dashboard-grid {
        grid-template-columns: 1fr;
      }
      .dashboard-stat-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    @media (max-width: 640px) {
      .dashboard-hero {
        padding: 22px 18px;
      }
      .dashboard-title {
        font-size: 28px;
      }
      .dashboard-stat-row {
        grid-template-columns: 1fr 1fr;
      }
      .nav-card {
        padding: 10px;
      }
      .section-tabs {
        flex-direction: column;
      }
      .section-tabs .tab-btn {
        width: 100%;
      }
    }

    .module-card[data-module="rules"] {
      display: none !important;
    }

    .toolbar {
      display: grid;
      grid-template-columns: 1.5fr 180px 120px;
      gap: 8px;
      margin-top: 8px;
    }
    .table-wrap {
      margin-top: 10px;
      border: 1px solid var(--line);
      border-radius: 12px;
      overflow: hidden;
      background: #fff;
    }
    .file-table {
      width: 100%;
      border-collapse: collapse;
      table-layout: fixed;
    }
    .file-table th,
    .file-table td {
      padding: 16px;
      font-size: 14px;
      text-align: left;
      vertical-align: middle;
      border-bottom: 1px solid #f1f5f9;
    }
    .file-table th {
      background: #f8fafc;
      color: #64748b;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      font-size: 12px;
    }
    .file-table tr:hover td { background: #f8fbff; }
    .file-table .name-cell {
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .file-thumb {
      width: 50px;
      height: 50px;
      object-fit: cover;
      border: 1px solid #dbeafe;
      border-radius: 8px;
      background: #f1f5f9;
      display: block;
    }
    .cell-actions { display: flex; gap: 6px; }
    .cell-actions button {
      width: auto;
      padding: 6px 10px;
      font-size: 12px;
      border-radius: 8px;
    }
    .pager {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin-top: 10px;
      flex-wrap: wrap;
    }
    .pager .btns {
      display: flex;
      gap: 8px;
      align-items: center;
    }
    .pager .btns button {
      width: auto;
      padding: 7px 12px;
      border-radius: 8px;
    }

    .auth-card .sub {
      margin-bottom: 12px;
    }
    .auth-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 10px;
    }
    .auth-field {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }
    .auth-field label {
      font-size: 12px;
      color: #475569;
      font-weight: 600;
    }
    .auth-field.full {
      grid-column: 1 / -1;
    }
    .auth-actions {
      margin-top: 12px;
      display: flex;
      justify-content: flex-end;
    }
    .auth-actions button {
      width: 220px;
      max-width: 100%;
    }

    .feedback-admin-textarea {
      min-height: 96px;
      padding: 10px 12px;
      border-radius: 12px;
      border: 1px solid #cbd5e1;
      background: #f8fafc;
      font-size: 13px;
      line-height: 1.6;
    }
    .feedback-meta {
      margin-top: 6px;
      font-size: 12px;
      color: #64748b;
      line-height: 1.6;
    }
    .feedback-publish-label {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 13px;
      font-weight: 600;
      color: #334155;
      margin-bottom: 10px;
    }
    .feedback-reply-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 4px 10px;
      border-radius: 999px;
      background: #eff6ff;
      color: #1d4ed8;
      border: 1px solid #bfdbfe;
      font-size: 12px;
      font-weight: 700;
      margin-top: 8px;
    }
    .feedback-toolbar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
      margin-top: 12px;
      margin-bottom: 8px;
    }
    .feedback-toolbar button {
      width: auto;
      min-width: 160px;
    }
    .feedback-admin-list {
      display: grid;
      gap: 14px;
      margin-top: 12px;
    }
    .feedback-admin-item {
      border: 1px solid var(--line);
      border-radius: 20px;
      background: #fff;
      padding: 24px;
      transition: all 0.2s;
    }
    .feedback-admin-item:hover {
      border-color: var(--primary);
      box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    }
    .feedback-admin-top {
      display: flex;
      justify-content: space-between;
      gap: 16px;
      align-items: center;
      margin-bottom: 20px;
    }
    .feedback-admin-time {
      font-size: 14px;
      font-weight: 700;
      color: #0f172a;
    }
    .feedback-admin-contact {
      font-size: 12px;
      color: #64748b;
      background: #f8fafc;
      border: 1px solid #e2e8f0;
      border-radius: 999px;
      padding: 6px 10px;
      max-width: 100%;
      word-break: break-all;
    }
    .feedback-admin-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 32px;
    }
    .feedback-admin-block {
      border: 1px solid #f1f5f9;
      border-radius: 20px;
      background: #f8fafc;
      padding: 28px;
    }
    .feedback-admin-block-title {
      font-size: 13px;
      font-weight: 700;
      color: #334155;
      margin-bottom: 8px;
    }
    .feedback-admin-content {
      white-space: pre-wrap;
      word-break: break-word;
      line-height: 1.8;
      font-size: 14px;
      color: #0f172a;
    }
    .feedback-admin-actions {
      margin-top: 12px;
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: center;
      flex-wrap: wrap;
    }
    .feedback-admin-actions .cell-actions button {
      min-width: 88px;
    }

    @media (max-width: 900px) {
      .feedback-admin-grid {
        grid-template-columns: 1fr;
      }
    }

    #loginCard {
      padding: 0;
      overflow: hidden;
      border: 1px solid rgba(255, 255, 255, 0.45);
      margin: 6vh auto;
      max-width: 1180px;
      background: rgba(255, 255, 255, 0.82);
      border-radius: 32px;
      box-shadow: 0 40px 90px rgba(15, 23, 42, 0.16);
      backdrop-filter: blur(18px);
    }
    .login-shell {
      display: grid;
      grid-template-columns: 1.15fr 1fr;
      min-height: 720px;
    }
    .login-showcase {
      position: relative;
      padding: 84px 76px;
      background:
        radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.55) 0%, transparent 36%),
        radial-gradient(circle at 80% 75%, rgba(34, 197, 94, 0.18) 0%, transparent 28%),
        linear-gradient(145deg, #0f172a 0%, #1d4ed8 55%, #312e81 100%);
      color: #fff;
      display: flex;
      flex-direction: column;
      justify-content: center;
    }
    .login-showcase::before,
    .login-showcase::after {
      content: "";
      position: absolute;
      border-radius: 999px;
      background: linear-gradient(135deg, rgba(255,255,255,0.16), transparent);
      backdrop-filter: blur(8px);
    }
    .login-showcase::before {
      width: 320px;
      height: 320px;
      top: -120px;
      right: -90px;
    }
    .login-showcase::after {
      width: 260px;
      height: 260px;
      bottom: -90px;
      left: -70px;
    }
    .login-showcase > * {
      position: relative;
      z-index: 1;
    }
    .login-showcase-inner {
      width: 100%;
      max-width: 520px;
      display: grid;
      gap: 32px;
    }
    .login-badge {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      width: fit-content;
      padding: 8px 16px;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.1);
      border: 1px solid rgba(255, 255, 255, 0.15);
      font-size: 13px;
      font-weight: 600;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      color: #e0e7ff;
    }
    .login-title {
      margin: 0;
      font-size: 56px;
      font-weight: 850;
      line-height: 1.05;
      letter-spacing: -0.04em;
      background: linear-gradient(to bottom right, #fff, #a5b4fc);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }
    .login-accent-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 20px;
    }
    .login-accent {
      padding: 24px;
      border-radius: 20px;
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.12);
      transition: all 0.3s ease;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
      backdrop-filter: blur(8px);
    }
    .login-accent:hover {
      background: rgba(255, 255, 255, 0.12);
      transform: translateY(-4px);
      border-color: rgba(255, 255, 255, 0.24);
    }
    .login-accent-kicker {
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.1em;
      color: #cbd5e1;
      margin-bottom: 12px;
      display: block;
    }
    .login-accent-value {
      font-size: 22px;
      font-weight: 700;
      color: #f8fafc;
    }
    .login-panel {
      padding: 78px 72px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
      border-left: 1px solid rgba(226, 232, 240, 0.9);
    }
    .login-panel-top {
      margin-bottom: 40px;
    }
    .login-brand-row {
      display: flex;
      align-items: center;
      gap: 14px;
      margin-bottom: 16px;
    }
    .login-brand-mark {
      width: 58px;
      height: 58px;
      border-radius: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 45%, #818cf8 100%);
      color: #1d4ed8;
      font-size: 26px;
      box-shadow: 0 18px 30px -20px rgba(59, 130, 246, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.7);
    }
    .login-eyebrow {
      font-size: 12px;
      font-weight: 700;
      color: #2563eb;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      margin-bottom: 6px;
    }
    .login-panel h2 {
      margin: 0;
      font-size: 32px;
      color: #0f172a;
    }
    .login-panel-sub {
      color: #64748b;
      font-size: 14px;
      line-height: 1.8;
    }
    .login-form {
      display: grid;
      gap: 24px;
    }
    .login-field {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }
    .login-field label {
      font-size: 14px;
      font-weight: 600;
      color: #475569;
    }
    .login-input-wrap {
      position: relative;
    }
    .login-input-icon {
      position: absolute;
      left: 14px;
      top: 50%;
      transform: translateY(-50%);
      font-size: 16px;
      opacity: 0.72;
      pointer-events: none;
    }
    .login-input-wrap input {
      padding: 16px 16px 16px 48px;
      border-radius: 16px;
      border: 1px solid #e2e8f0;
      background: #f8fafc;
      font-size: 15px;
      transition: all 0.2s;
    }
    .login-input-wrap input:focus {
      background: #fff;
      border-color: var(--primary);
      box-shadow: 0 0 0 4px var(--primary-glow);
    }
    .login-actions {
      margin-top: 32px;
    }
    .login-actions button {
      height: 60px;
      border-radius: 18px;
      font-size: 16px;
      font-weight: 700;
      width: 100%;
    }
    .login-help-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
      margin-top: 20px;
    }
    .login-help-card {
      padding: 16px 16px 15px;
      border-radius: 18px;
      background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
      border: 1px solid #dbeafe;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
    }
    .login-help-card strong {
      display: block;
      margin-bottom: 6px;
      font-size: 13px;
      color: #0f172a;
    }
    .login-help-card span {
      display: block;
      font-size: 12px;
      line-height: 1.7;
      color: #64748b;
    }
    .login-footnote {
      margin-top: 20px;
      padding-top: 18px;
      border-top: 1px solid #e2e8f0;
      font-size: 12px;
      line-height: 1.75;
      color: #64748b;
    }

    @media (max-width: 900px) {
      #loginCard {
        margin-top: 20px;
      }
      .login-shell {
        grid-template-columns: 1fr;
      }
      .login-showcase,
      .login-panel {
        padding: 28px 22px;
      }
      .login-title {
        font-size: 34px;
      }
      .login-accent-grid,
      .login-help-grid {
        grid-template-columns: 1fr;
      }
    }

    .text-config-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 20px;
    }
    .text-config-item {
      border: 1px solid #f1f5f9;
      border-radius: 16px;
      padding: 24px;
      background: #fff;
      transition: all 0.2s;
    }
    .text-config-item:focus-within {
      border-color: var(--primary);
      box-shadow: 0 0 0 4px var(--primary-glow);
    }
    .text-config-title {
      font-size: 14px;
      font-weight: 700;
      color: #0f172a;
      margin-bottom: 8px;
    }
    .text-config-desc {
      font-size: 12px;
      color: #64748b;
      margin-bottom: 8px;
      line-height: 1.5;
    }

    .upload-progress-wrap {
      margin-top: 10px;
      padding: 10px;
      border: 1px solid #dbeafe;
      border-radius: 10px;
      background: #f8fbff;
    }
    .upload-progress-text {
      font-size: 13px;
      color: #1e293b;
      font-weight: 600;
      margin-bottom: 6px;
    }
    .upload-progress-bar-bg {
      width: 100%;
      height: 10px;
      border-radius: 999px;
      background: #e2e8f0;
      overflow: hidden;
    }
    .upload-progress-bar-fill {
      height: 100%;
      width: 0%;
      background: linear-gradient(90deg, #2563eb, #38bdf8);
      transition: width 0.15s linear;
    }
    .upload-progress-detail {
      margin-top: 6px;
      font-size: 12px;
      color: #64748b;
    }

    .tree-wrap {
      display: grid;
      gap: 10px;
      margin-top: 10px;
    }
    .tree-gallery,
    .tree-role,
    .tree-category {
      border: 1px solid #dbeafe;
      border-radius: 12px;
      background: #f8fbff;
      padding: 10px;
    }
    .tree-gallery-title,
    .tree-role-title,
    .tree-category-title {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      margin-bottom: 8px;
      font-weight: 700;
      color: #1e3a8a;
    }
    .tree-role-title { color: #166534; }
    .tree-category-title { color: #7c3aed; }
    .tree-file-list { display: grid; gap: 6px; }
    .tree-file-item {
      display: grid;
      grid-template-columns: 52px 1fr auto;
      gap: 8px;
      align-items: center;
      padding: 8px;
      background: #fff;
      border: 1px solid #e2e8f0;
      border-radius: 10px;
    }
    .tree-file-name {
      font-size: 13px;
      font-weight: 600;
      color: #0f172a;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .tree-file-path {
      font-size: 12px;
      color: #64748b;
      word-break: break-all;
    }
    .mini-stat {
      font-size: 12px;
      color: #64748b;
      font-weight: 500;
    }

    .upload-panel {
      margin-top: 8px;
      border: 2px dashed #93c5fd;
      background: linear-gradient(180deg, #eff6ff 0%, #f8fbff 100%);
      border-radius: 14px;
      padding: 12px;
    }
    .upload-pick-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 10px;
    }
    .upload-pick-card {
      position: relative;
      border: 1px solid #bfdbfe;
      background: #ffffff;
      border-radius: 12px;
      padding: 10px;
    }
    .upload-pick-title {
      font-size: 14px;
      font-weight: 700;
      color: #1e3a8a;
      margin-bottom: 6px;
    }
    .upload-pick-desc {
      font-size: 12px;
      color: #475569;
      margin-bottom: 8px;
      line-height: 1.5;
    }
    .upload-file-input {
      border: 1px solid #93c5fd;
      background: #f8fbff;
      cursor: pointer;
      font-weight: 600;
      color: #1d4ed8;
    }

    .upload-advanced {
      display: none !important;
    }

    .storage-filter-card {
      border: 1px solid #dbeafe;
      border-radius: 12px;
      background: #f8fbff;
      padding: 10px;
      margin-top: 8px;
    }

    .thumb-config-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      gap: 10px;
      margin-top: 8px;
    }
    .thumb-config-item {
      border: 1px solid #dbeafe;
      border-radius: 12px;
      background: #f8fbff;
      padding: 10px;
    }
    .thumb-summary-box {
      margin-top: 8px;
      padding: 10px 12px;
      border: 1px solid #dbeafe;
      border-radius: 12px;
      background: linear-gradient(180deg, #eff6ff 0%, #f8fbff 100%);
      font-size: 13px;
      color: #1e293b;
      line-height: 1.8;
    }
    .thumb-path {
      font-size: 12px;
      color: #64748b;
      word-break: break-all;
      line-height: 1.5;
    }
    .thumb-size-badge {
      display: inline-block;
      padding: 2px 8px;
      border-radius: 999px;
      background: #ecfeff;
      color: #155e75;
      border: 1px solid #a5f3fc;
      font-size: 12px;
      font-weight: 600;
    }
    .thumb-progress-wrap {
      margin-top: 8px;
      padding: 10px;
      border: 1px solid #dbeafe;
      border-radius: 12px;
      background: linear-gradient(180deg, #eff6ff 0%, #f8fbff 100%);
    }
    .thumb-progress-title {
      font-size: 13px;
      color: #1e293b;
      font-weight: 700;
      margin-bottom: 6px;
    }
    .thumb-progress-detail {
      margin-top: 6px;
      font-size: 12px;
      color: #64748b;
      line-height: 1.7;
      word-break: break-all;
    }

/* Administration workspace: controls float above quiet content surfaces. */
:root { --primary:#006CDB; --primary-hover:#0058BA; --text:#223047; --sub:#627086; --line:rgba(73,93,121,.13); --sidebar-bg:#F5F8FC; }
body { background:radial-gradient(ellipse at 0 0,#E6EEF9,transparent 60%),#F2F4F7; font-size:14px; }
.wrap { max-width:none; margin:0; padding:18px; }
.admin-shell { grid-template-columns:208px minmax(0,1fr); gap:20px; min-height:calc(100vh - 36px); }
.admin-sidebar { position:sticky; top:18px; height:calc(100vh - 36px); display:flex; flex-direction:column; gap:24px; padding:20px 12px 12px; border-radius:24px; border:1px solid rgba(255,255,255,.96); background:rgba(249,251,255,.7); backdrop-filter:blur(22px) saturate(135%); box-shadow:0 8px 30px rgba(40,60,90,.05),inset 0 1px 0 #FFF; }
.workspace-brand { display:flex; align-items:center; gap:10px; padding:0 8px; font-size:14px; font-weight:700; }
.workspace-brand-icon { display:grid; place-items:center; width:34px; height:34px; border-radius:11px; background:#E0EDFF; color:#006CDB; font-size:27px; }
.workspace-brand small { display:block; font-size:11px; color:var(--sub); font-weight:400; margin-top:3px; }
.section-tabs { display:flex; flex-direction:column; gap:5px; }
.section-tabs .tab-btn { width:100%; min-width:0; display:flex; gap:12px; align-items:center; min-height:42px; padding:8px 12px; border:1px solid transparent; border-radius:12px; background:transparent; color:#53637A; box-shadow:none; font-size:13px; text-align:left; }
.section-tabs .tab-btn:hover { background:rgba(255,255,255,.6); color:var(--text); transform:none; }
.section-tabs .tab-btn.active { color:#005FCA; border-color:rgba(255,255,255,.95); background:rgba(255,255,255,.84); box-shadow:0 2px 7px rgba(42,70,110,.06); }
.section-tabs .tab-btn.active::after { display:none; }
.nav-symbol { width:18px; text-align:center; font-size:19px; font-weight:400; }
.tab-btn.has-draft::before { content:''; width:5px; height:5px; border-radius:50%; background:#007AFF; position:absolute; right:10px; }
.workspace-account { margin-top:auto; padding:12px 8px 0; border-top:1px solid var(--line); display:flex; align-items:center; justify-content:space-between; gap:6px; font-size:11px; color:var(--sub); }
.workspace-account button { min-height:30px; padding:0 8px; font-size:11px; }
.admin-main { gap:16px; align-content:start; }
.workspace-header { position:sticky; top:18px; z-index:40; min-height:76px; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 22px; border:1px solid #FFF; border-radius:20px; background:rgba(250,252,255,.76); backdrop-filter:blur(22px) saturate(145%); box-shadow:0 5px 20px rgba(40,60,90,.05); }
.workspace-header h1 { margin:0; font-size:22px; line-height:1.25; }
.workspace-eyebrow { font-size:11px; color:var(--sub); margin-bottom:4px; }
.workspace-state { font-size:12px; color:var(--sub); white-space:nowrap; }
.card { background:#FFF; border:1px solid var(--line); border-radius:16px; padding:22px; margin-bottom:0; box-shadow:0 3px 12px rgba(40,60,90,.025); transition:none; }
.card:hover { transform:none; box-shadow:0 3px 12px rgba(40,60,90,.025); border-color:var(--line); }
.module-card::before { display:none; }
input,select,textarea,button { font-family:inherit; }
h2 { font-size:17px; margin-bottom:8px; }
.topbar h2 { margin:0; }
.sub { font-size:12px; margin:10px 0 18px; }
button { min-height:36px; border-radius:10px; padding:0 13px; box-shadow:none; font-weight:600; }
button:hover { box-shadow:none; }
button.ghost { background:#F8FAFD; color:#4B5F79; border-color:#DEE5EF; box-shadow:none; }
button.ghost.active { color:#005FCA; background:#EAF3FF; border-color:#C8DEF9; }
button.danger { background:#FFF3F2; color:#B62A24; border:1px solid #F3CCC9; box-shadow:none; }
button.danger:hover { background:#FFE8E5; box-shadow:none; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline:3px solid rgba(0,108,219,.5); outline-offset:3px; }
input,select,textarea { font-size:14px; min-height:40px; border-radius:9px; border-color:#DBE2EB; }
input[type=checkbox] { width:17px; min-height:17px; height:17px; accent-color:var(--primary); cursor:pointer; }
.form-label { font-size:13px; }
.module-card.is-dirty { border-top-color:#A9CDF9; }
.module-card.is-dirty > .topbar h2::after { content:'未保存'; display:inline-block; margin-left:10px; font-size:10px; font-weight:500; padding:2px 6px; border-radius:6px; color:#0065C9; background:#EEF6FF; vertical-align:middle; }
.module-card > .topbar:first-child { margin-top:0 !important; padding-top:0 !important; border-top:0 !important; }
.workspace-error { padding:12px 16px; border-radius:12px; color:#A62B24; background:#FFF0EE; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.photo-tabs { display:flex; gap:6px; flex-wrap:wrap; padding:0 2px; }
.photo-tabs button { background:transparent; border:0; font-size:12px; }
.photo-tabs button.active { background:#FFF; box-shadow:0 2px 6px rgba(35,55,85,.06); }
.photo-workspace { display:grid; grid-template-columns:168px minmax(0,1fr); gap:20px; }
.gallery-sidebar { padding-right:14px; border-right:1px solid var(--line); min-width:0; }
.gallery-sidebar h3 { margin:4px 6px 16px; font-size:12px; font-weight:600; color:var(--sub); }
#galleryNav { display:grid; gap:4px; max-height:65vh; overflow:auto; margin-bottom:16px; }
.gallery-nav-item { min-width:0; width:100%; text-align:left; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; background:transparent; color:var(--sub); font-size:12px; font-weight:500; }
.gallery-nav-item:hover { background:#F1F5FB; }
.gallery-nav-item.active { color:#0065C9; background:#EAF3FF; }
.gallery-sidebar > button { width:100%; font-size:11px; padding:0 6px; }
.photo-content { min-width:0; }
.photo-content .topbar { flex-wrap:wrap; }
.photo-content .topbar .row { gap:5px; }
.photo-content .topbar button { font-size:11px; min-height:32px; }
.toolbar { grid-template-columns:minmax(0,1fr) 165px 120px; gap:8px; margin:16px 0; }
.selection-toolbar { position:sticky; top:108px; z-index:20; padding:10px; border:1px solid rgba(255,255,255,.95); border-radius:12px; background:rgba(243,248,255,.86); backdrop-filter:blur(18px); align-items:center; gap:7px; }
.selection-toolbar button { font-size:11px; min-height:30px; padding:0 8px; }
.selection-count { margin-right:auto; font-size:12px; font-weight:600; color:#40546F; }
.table-wrap { max-width:100%; overflow:auto; border-radius:12px; }
.file-table { min-width:680px; }
.file-table th,.file-table td { padding:10px; font-size:12px; }
.file-table th { font-size:11px; }
.file-thumb { width:54px; height:64px; object-fit:contain; background:#F4F6F9; border:0; }
.image-preview-trigger { display:block; padding:0 !important; min-height:0; border:0 !important; box-shadow:none; }
.image-grid-view { border:0; overflow:visible; }
.image-grid-view table { display:block; min-width:0; }
.image-grid-view thead { display:none; }
.image-grid-view tbody { display:grid; grid-template-columns:repeat(auto-fill,minmax(155px,1fr)); gap:12px; }
.image-grid-view tr { display:grid; grid-template-columns:1fr 1fr; position:relative; border:1px solid #E4EAF2; border-radius:12px; overflow:hidden; background:#FFF; align-content:start; }
.image-grid-view tr:has(.image-check:checked) { border-color:#3891EE; box-shadow:0 0 0 1px #3891EE; }
.image-grid-view td { border:0; min-width:0; background:transparent !important; }
.image-grid-view td:nth-child(1) { position:absolute; top:7px; right:7px; z-index:2; padding:3px; border-radius:6px; background:rgba(255,255,255,.9) !important; display:flex; }
.image-grid-view td:nth-child(2) { grid-column:1/-1; height:196px; padding:0; background:#F4F6F9 !important; }
.image-grid-view .image-preview-trigger,.image-grid-view .file-thumb { width:100%; height:100%; background:transparent; }
.image-grid-view .file-thumb { object-fit:contain; border-radius:0; }
.image-grid-view td:nth-child(3) { grid-column:1/-1; font-weight:600; padding:9px 9px 3px; }
.image-grid-view td:nth-child(4),.image-grid-view td:nth-child(5) { font-size:10px; padding:2px 9px; color:var(--sub); }
.image-grid-view td:nth-child(5) { text-align:right; }
.image-grid-view td:nth-child(6) { grid-column:1/-1; padding:6px 9px 9px; }
.image-grid-view td:nth-child(6) button { font-size:10px; min-height:26px; padding:0 8px; }
.image-grid-view td[colspan] { grid-column:1/-1; padding:44px 16px; text-align:center; }
.image-grid-view tr:has(td[colspan]) { display:block; grid-column:1/-1; }
.image-grid-view td[colspan]:first-child { position:static; display:block; width:100%; padding:44px 16px; }
.status { top:auto; left:auto; right:24px; bottom:24px; transform:none; padding:12px 16px; text-align:left; font-size:13px; font-weight:500; min-width:0; box-shadow:0 8px 28px rgba(40,60,90,.14); }
.status.show { transform:none; }
.feedback-toolbar { display:grid; grid-template-columns:minmax(0,1fr) 150px; gap:12px; margin:16px 0; }
.feedback-admin-item { padding:18px; border:1px solid #E2E8F1; box-shadow:none; border-radius:12px; }
.feedback-admin-item:hover { transform:none; box-shadow:none; }
.feedback-admin-grid { gap:14px; }
.feedback-admin-block { padding:14px; }
.feedback-admin-textarea { min-height:104px; }
.alert { padding:10px 13px; font-size:12px; border-radius:10px; }
.alert-info { background:#F3F7FC; border-color:#E1E9F4; color:#4B607B; }
.pending-cleanup { font-size:12px; color:#975B00; margin-top:12px; }
.upload-results { max-height:240px; overflow:auto; padding:0; margin:14px 0; list-style:none; font-size:12px; color:var(--sub); }
.upload-results li { padding:7px 0; border-bottom:1px solid var(--line); word-break:break-all; }
.upload-drop-hint { margin-bottom:12px; color:var(--sub); font-size:13px; }
.upload-panel.drop-active { outline:2px solid var(--primary); outline-offset:4px; background:var(--primary-soft); }
.image-preview-dialog.removal-dialog { width:min(460px,92vw); }
.removal-dialog p { margin:14px 0; overflow-wrap:anywhere; }
.removal-source-option { display:flex; align-items:flex-start; gap:10px; margin:18px 0; font-size:13px; }
.removal-source-option input { width:18px; min-height:18px; flex:0 0 18px; margin-top:2px; }
.removal-dialog>.row { justify-content:flex-end; }
.upload-progress-wrap { position:sticky; top:104px; z-index:30; margin:16px 0 20px; padding:16px; border-color:#BCD5F5; background:#F4F9FF; box-shadow:0 5px 16px rgba(40,75,120,.07); }
.upload-progress-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:12px; }
.upload-progress-heading>div { display:flex; align-items:center; flex-wrap:wrap; gap:8px; min-width:0; }
.upload-phase { padding:3px 8px; border-radius:6px; background:#E0ECFF; color:#1957A4; font-size:12px; font-weight:600; }
#uploadProgressPercent { flex-shrink:0; color:#1957A4; font-variant-numeric:tabular-nums; }
#uploadProgressDetail,#uploadProgressFileDetail { overflow-wrap:anywhere; line-height:1.6; }
#uploadProgressDetail { margin-top:9px; color:var(--text); }
.upload-progress-wrap.is-running .upload-phase::before { content:''; display:inline-block; width:6px; height:6px; margin-right:6px; border-radius:50%; background:currentColor; }
@media(max-width:768px) { .upload-progress-wrap { top:86px; padding:12px; } }
.content-preview { margin-top:20px; border-top:1px solid var(--line); padding-top:16px; font-size:13px; }
.content-preview summary { cursor:pointer; color:#0065C9; }
.site-config-layout { display:grid; grid-template-columns:minmax(0,1fr) 280px; gap:24px; align-items:start; }
.site-config-fields { min-width:0; }
.site-config-layout .content-preview { margin-top:0; padding:16px; border:1px solid var(--line); border-radius:14px; background:#F8FAFD; position:sticky; top:108px; }
.site-config-layout .phone-preview { margin-top:16px; padding:14px; border-width:4px; border-radius:24px; }
.site-config-layout .preview-photo { min-height:150px; }
.phone-preview { max-width:340px; margin:18px auto 0; padding:20px; border:6px solid #DAE2ED; border-radius:30px; background:#F0F4FA; display:grid; gap:14px; }
.phone-preview h3 { font-size:18px; }
#previewAnnouncement { font-size:12px; white-space:pre-wrap; padding:10px; border-radius:10px; background:#FFF; }
.preview-photo { min-height:180px; display:grid; place-items:center; border-radius:14px; background:#FFF; font-size:12px; color:#8894A5; }
#previewAuthor { padding:14px; background:#FFF; border-radius:12px; text-align:center; white-space:pre-wrap; overflow-wrap:anywhere; }
.image-preview-dialog { width:min(900px,92vw); max-height:90vh; margin:auto; padding:18px; border:1px solid #FFF; border-radius:20px; background:rgba(250,252,255,.94); box-shadow:0 24px 70px rgba(20,35,55,.25); }
.image-preview-dialog::backdrop { background:rgba(18,30,47,.42); backdrop-filter:blur(5px); }
.image-preview-dialog .topbar { margin-bottom:14px; }
#adminImageName { overflow-wrap:anywhere; }
#adminImagePreview { display:block; width:100%; max-height:72vh; object-fit:contain; }
@media(max-width:1100px) { .photo-workspace { grid-template-columns:138px minmax(0,1fr); gap:14px; } .toolbar { grid-template-columns:minmax(0,1fr) 135px 110px; } .card { padding:18px; } }
@media(max-width:1250px) { .site-config-layout { grid-template-columns:minmax(0,1fr); } .site-config-layout .content-preview { position:static; } .site-config-layout .phone-preview { max-width:300px; } }
@media(max-width:1024px) { .admin-shell { grid-template-columns:176px minmax(0,1fr); gap:14px; } .section-tabs { flex-direction:column; } .photo-workspace { grid-template-columns:1fr; } .gallery-sidebar { padding:0 0 12px; border:0; border-bottom:1px solid var(--line); } .gallery-sidebar h3,.gallery-sidebar>button { display:none; } #galleryNav { display:flex; margin:0; overflow:auto; max-height:none; } .gallery-nav-item { width:auto; flex:0 0 auto; max-width:180px; } }
@media(max-width:768px) { .wrap { padding:10px; } .admin-shell { grid-template-columns:1fr; gap:12px; } .admin-sidebar { height:auto; position:static; padding:12px; gap:12px; } .workspace-brand { padding:0; } .section-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px; } .section-tabs .tab-btn { justify-content:center; padding:7px 2px; min-height:38px; font-size:12px; gap:6px; } .nav-symbol { font-size:16px; } .workspace-account { padding-top:8px; } .workspace-header { top:10px; padding:12px 16px; min-height:64px; } .workspace-header h1 { font-size:20px; } .card { padding:16px; } .module-card .grid { grid-template-columns:minmax(0,1fr) !important; gap:14px !important; } .topbar { flex-wrap:wrap; } .toolbar { grid-template-columns:minmax(0,1fr) 120px; } .toolbar>input { grid-column:1/-1; } .photo-tabs { gap:3px; } .photo-tabs button { padding:0 9px; } .selection-toolbar { top:86px; } .feedback-admin-grid { grid-template-columns:1fr; } .status { right:12px; bottom:12px; max-width:calc(100vw - 24px); } }
@media(max-width:420px) { .image-grid-view tbody { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; } .image-grid-view td:nth-child(2) { height:160px; } .feedback-toolbar { grid-template-columns:minmax(0,1fr); } .selection-toolbar button { min-height:32px; } .workspace-eyebrow { font-size:10px; } .workspace-state { font-size:11px; } }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { transition:none !important; animation:none !important; } }
@media(prefers-reduced-transparency:reduce) { .admin-sidebar,.workspace-header,.selection-toolbar { background:#F5F8FC; backdrop-filter:none; } }

.gacha-audio-row { display:grid; grid-template-columns:minmax(160px,1fr) minmax(220px,360px) auto; align-items:center; gap:18px; padding:16px 0; border-bottom:1px solid var(--line); }
.gacha-audio-row strong,.gacha-audio-row small { display:block; overflow-wrap:anywhere; }
.gacha-audio-row small { margin-top:6px; color:var(--muted); }
.gacha-audio-row audio { width:100%; }
@media(max-width:800px){.gacha-audio-row{grid-template-columns:1fr;gap:10px;}}

.gacha-preset-preview{display:block;width:100%;max-width:280px;height:32px;margin-top:8px;}.gacha-preset-preview[hidden]{display:none;}

.gacha-audio-choice{display:flex;flex-direction:column;align-items:stretch;gap:8px;min-width:0;}.gacha-audio-choice select{width:100%;margin:0;}.gacha-audio-choice .gacha-preset-preview{max-width:none;margin-top:0;}
.update-notes-card .form-label{display:flex;flex-direction:column;align-items:stretch;gap:8px;min-width:0;}
.update-notes-card input,.update-notes-card textarea{width:100%;margin:0;box-sizing:border-box;}
.library-admin-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:18px;}
.library-admin-toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:12px 0;}
.library-admin-toolbar input,.library-admin-toolbar select{flex:1;min-width:140px;max-width:100%;margin:0;}
.library-admin-tags{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0;max-height:220px;overflow:auto;}
.library-admin-tags label{display:flex;align-items:center;gap:6px;padding:6px 10px;background:#EFF4FB;border-radius:10px;font-size:13px;}
.library-admin-tags input{width:auto;margin:0;}
.library-admin-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(165px,1fr));gap:12px;margin:16px 0;}
.library-admin-photo{min-width:0;border:1px solid #DFE7F0;border-radius:14px;padding:10px;background:#FFF;}
.library-admin-select{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--sub);}.library-admin-select input{width:auto;margin:0;}
.library-admin-photo img{display:block;width:100%;height:190px;object-fit:contain;margin:8px 0;}
.library-admin-photo strong,.library-admin-photo small,.library-admin-photo p{display:block;overflow-wrap:anywhere;font-size:12px;line-height:1.7;}
.library-admin-photo small{color:var(--sub);font-size:10px;}.library-admin-photo p{color:#38638E;margin-top:5px;}
.library-admin-review{display:grid;grid-template-columns:150px minmax(0,1fr);gap:16px;border-top:1px solid var(--line);padding:16px 0;}
.library-admin-review>img{width:100%;height:200px;object-fit:contain;}.library-admin-review input,.library-admin-review select{margin:7px 0;max-width:100%;}
.library-admin-review small{overflow-wrap:anywhere;color:var(--sub);}.library-review-tags{height:130px;}
.library-admin-rule{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--line);font-size:13px;overflow-wrap:anywhere;}
.library-admin-settings{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:14px;}.library-admin-settings label{display:flex;flex-direction:column;gap:6px;font-size:13px;min-width:0;}.library-admin-settings input{width:100%;margin:0;}
@media(max-width:600px){.library-admin-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}.library-admin-photo{padding:7px;}.library-admin-photo img{height:150px;}.library-admin-review{grid-template-columns:1fr;}.library-admin-review>img{height:180px;}.library-admin-rule{align-items:flex-start;}}

.library-upload-toggle{display:flex;gap:8px;align-items:center;font-size:13px;}.library-upload-toggle input{width:auto;margin:0;}#libUploadSafety{margin:12px 0;}#libUploadUsers strong{font-size:11px;overflow-wrap:anywhere;}#libUploadUsers p{font-size:12px;margin:5px 0;color:var(--sub);}
