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

    body {
      font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "PingFang SC", "Noto Sans CJK SC", sans-serif;
      background: #f7f5f4;
      color: #1d1d1f;
      -webkit-font-smoothing: antialiased;
      min-height: 100vh;
    }

    :root {
      --red-700: #b91c1c;
      --red-600: #dc2626;
      --red-500: #ef4444;
      --red-100: #fee2e2;
      --red-50:  #fef2f2;
      --red-900: #450a0a;
      --panel-bg: #140404;
    }

    /* ===== Top Nav ===== */
    .top-nav {
      background: var(--panel-bg);
      padding: 0 32px;
      height: 60px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      position: sticky;
      top: 0;
      z-index: 50;
    }
    .nav-brand {
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .nav-brand img {
      width: 36px; height: 36px;
      object-fit: contain;
      filter: drop-shadow(0 1px 4px rgba(185,28,28,.2));
    }
    .nav-brand-text {
      color: #fff;
      font-size: 15px;
      font-weight: 600;
      letter-spacing: .3px;
    }
    .nav-brand-text span {
      color: rgba(255,255,255,.45);
      font-weight: 400;
      margin-left: 8px;
      padding-left: 8px;
      border-left: 1px solid rgba(255,255,255,.12);
    }
    .nav-user {
      display: flex;
      align-items: center;
      gap: 10px;
      color: rgba(255,255,255,.7);
      font-size: 13px;
    }
    .nav-avatar {
      width: 32px; height: 32px;
      border-radius: 50%;
      background: linear-gradient(135deg, var(--red-700), var(--red-500));
      display: flex; align-items: center; justify-content: center;
      color: #fff;
      font-size: 13px;
      font-weight: 600;
    }

    /* ===== Tab bar ===== */
    .tab-bar {
      background: #fff;
      border-bottom: 1px solid #e5e5e7;
      padding: 0 32px;
      display: flex;
      gap: 4px;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
    }
    .tab-bar::-webkit-scrollbar { display: none; }
    .tab-item {
      padding: 16px 20px;
      font-size: 14px;
      font-weight: 500;
      color: #86868b;
      cursor: pointer;
      white-space: nowrap;
      border-bottom: 2px solid transparent;
      transition: all .2s;
      background: none;
      border-top: none; border-left: none; border-right: none;
      font-family: inherit;
    }
    .tab-item:hover { color: #1d1d1f; }
    .tab-item.active {
      color: var(--red-700);
      border-bottom-color: var(--red-700);
    }

    /* ===== Container ===== */
    .page-container {
      max-width: 1080px;
      margin: 0 auto;
      padding: 32px 24px 64px;
    }
    .tab-panel { display: none; }
    .tab-panel.active { display: block; }

    /* ===== Section titles ===== */
    .section-title {
      font-size: 22px;
      font-weight: 700;
      color: #1d1d1f;
      margin-bottom: 4px;
    }
    .section-desc {
      font-size: 14px;
      color: #86868b;
      margin-bottom: 28px;
    }

    /* ===== Cards ===== */
    .card {
      background: #fff;
      border-radius: 14px;
      border: 1px solid #e5e5e7;
      padding: 28px;
      margin-bottom: 20px;
    }
    .card-title {
      font-size: 16px;
      font-weight: 600;
      color: #1d1d1f;
      margin-bottom: 16px;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .card-title .icon {
      width: 28px; height: 28px;
      border-radius: 8px;
      background: var(--red-50);
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0;
    }
    .card-title .icon svg { width: 15px; height: 15px; stroke: var(--red-700); fill: none; stroke-width: 1.8; }

    /* ===== Timeline ===== */
    .timeline { position: relative; padding-left: 28px; }
    .timeline::before {
      content: '';
      position: absolute;
      left: 7px; top: 4px; bottom: 4px;
      width: 2px;
      background: #e5e5e7;
      border-radius: 1px;
    }
    .timeline-item {
      position: relative;
      padding-bottom: 24px;
    }
    .timeline-item:last-child { padding-bottom: 0; }
    .timeline-dot {
      position: absolute;
      left: -24px; top: 4px;
      width: 12px; height: 12px;
      border-radius: 50%;
      background: #d2d2d7;
      border: 2px solid #fff;
    }
    .timeline-item.current .timeline-dot {
      background: var(--red-700);
      box-shadow: 0 0 0 4px rgba(185,28,28,.12);
    }
    .timeline-item.done .timeline-dot { background: #86868b; }
    .timeline-label {
      font-size: 14px;
      font-weight: 600;
      color: #1d1d1f;
      margin-bottom: 2px;
    }
    .timeline-date {
      font-size: 13px;
      color: #86868b;
    }
    .timeline-item.current .timeline-label { color: var(--red-700); }

    /* ===== Position tags ===== */
    .position-grid {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }
    .position-tag {
      padding: 8px 18px;
      border-radius: 8px;
      font-size: 13px;
      font-weight: 500;
      background: #f7f5f4;
      color: #1d1d1f;
      border: 1px solid #e5e5e7;
    }
    .position-tag.highlight {
      background: var(--red-50);
      color: var(--red-700);
      border-color: rgba(185,28,28,.15);
    }

    /* ===== Form ===== */
    .form-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 20px;
    }
    .form-field { display: flex; flex-direction: column; gap: 6px; }
    .form-field.full { grid-column: 1 / -1; }
    .form-label {
      font-size: 13px;
      font-weight: 500;
      color: #1d1d1f;
    }
    .form-label .required { color: var(--red-600); margin-left: 2px; }
    .form-input,
    .form-select,
    .form-textarea {
      height: 44px;
      padding: 0 14px;
      border: 1px solid #d2d2d7;
      border-radius: 10px;
      font-size: 14px;
      color: #1d1d1f;
      background: #fff;
      font-family: inherit;
      transition: border-color .2s, box-shadow .2s;
    }
    .form-input:focus,
    .form-select:focus,
    .form-textarea:focus {
      outline: none;
      border-color: var(--red-700);
      box-shadow: 0 0 0 3px rgba(185,28,28,.08);
    }
    .form-input::placeholder,
    .form-textarea::placeholder { color: #c7c7cc; }
    .form-select { appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2386868b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
    .form-textarea {
      height: 100px;
      padding: 12px 14px;
      resize: vertical;
      line-height: 1.6;
    }

    .upload-area {
      border: 2px dashed #d2d2d7;
      border-radius: 12px;
      padding: 32px;
      text-align: center;
      cursor: pointer;
      transition: border-color .2s, background .2s;
    }
    .upload-area:hover {
      border-color: var(--red-700);
      background: var(--red-50);
    }
    .upload-icon {
      width: 44px; height: 44px;
      margin: 0 auto 12px;
      border-radius: 10px;
      background: #f7f5f4;
      display: flex; align-items: center; justify-content: center;
    }
    .upload-icon svg { width: 22px; height: 22px; stroke: #86868b; fill: none; stroke-width: 1.5; }
    .upload-text { font-size: 14px; color: #86868b; }
    .upload-text em { color: var(--red-700); font-style: normal; font-weight: 500; }
    .upload-hint { font-size: 12px; color: #c7c7cc; margin-top: 6px; }

    /* ===== Buttons ===== */
    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      height: 44px;
      padding: 0 28px;
      border-radius: 10px;
      font-size: 14px;
      font-weight: 500;
      font-family: inherit;
      cursor: pointer;
      transition: all .2s;
      border: none;
    }
    .btn-primary {
      background: var(--red-700);
      color: #fff;
    }
    .btn-primary:hover { background: #991b1b; }
    .btn-outline {
      background: #fff;
      color: var(--red-700);
      border: 1px solid rgba(185,28,28,.25);
    }
    .btn-outline:hover { background: var(--red-50); }
    .btn-ghost {
      background: #f7f5f4;
      color: #86868b;
      border: 1px solid #e5e5e7;
    }
    .btn-ghost:hover { background: #eee; }
    .btn:disabled {
      opacity: .45;
      cursor: not-allowed;
    }
    .btn-row {
      display: flex;
      gap: 12px;
      margin-top: 28px;
    }

    /* ===== Candidate cards ===== */
    .filter-bar {
      display: flex;
      gap: 8px;
      margin-bottom: 24px;
      flex-wrap: wrap;
    }
    .filter-chip {
      padding: 7px 18px;
      border-radius: 20px;
      font-size: 13px;
      font-weight: 500;
      background: #fff;
      color: #86868b;
      border: 1px solid #e5e5e7;
      cursor: pointer;
      font-family: inherit;
      transition: all .2s;
    }
    .filter-chip:hover { border-color: #c7c7cc; }
    .filter-chip.active {
      background: var(--red-700);
      color: #fff;
      border-color: var(--red-700);
    }

    .candidate-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
      gap: 18px;
    }
    .candidate-card {
      background: #fff;
      border-radius: 14px;
      border: 1px solid #e5e5e7;
      overflow: hidden;
      transition: box-shadow .2s, transform .15s;
    }
    .candidate-card:hover {
      box-shadow: 0 4px 16px rgba(0,0,0,.06);
      transform: translateY(-2px);
    }
    .candidate-photo {
      height: 200px;
      background: linear-gradient(135deg, #f7f5f4, #eee);
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
    }
    .candidate-photo svg { width: 48px; height: 48px; stroke: #d2d2d7; fill: none; stroke-width: 1; }
    .candidate-number {
      position: absolute;
      top: 12px; left: 12px;
      background: var(--red-700);
      color: #fff;
      font-size: 12px;
      font-weight: 600;
      padding: 3px 10px;
      border-radius: 6px;
    }
    .candidate-position-tag {
      position: absolute;
      top: 12px; right: 12px;
      background: rgba(0,0,0,.5);
      color: #fff;
      font-size: 12px;
      padding: 3px 10px;
      border-radius: 6px;
    }
    .candidate-info {
      padding: 18px 20px 20px;
    }
    .candidate-name {
      font-size: 16px;
      font-weight: 600;
      color: #1d1d1f;
      margin-bottom: 4px;
    }
    .candidate-meta {
      font-size: 13px;
      color: #86868b;
      margin-bottom: 12px;
    }
    .candidate-statement {
      font-size: 13px;
      color: #6e6e73;
      line-height: 1.6;
      display: -webkit-box;
      -webkit-line-clamp: 3;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    /* ===== Voting ===== */
    .vote-group {
      margin-bottom: 36px;
    }
    .vote-group-title {
      font-size: 17px;
      font-weight: 600;
      color: #1d1d1f;
      margin-bottom: 6px;
    }
    .vote-group-hint {
      font-size: 13px;
      color: #86868b;
      margin-bottom: 18px;
    }
    .vote-card {
      display: flex;
      align-items: center;
      gap: 16px;
      background: #fff;
      border: 1px solid #e5e5e7;
      border-radius: 12px;
      padding: 16px 20px;
      margin-bottom: 10px;
      cursor: pointer;
      transition: all .2s;
    }
    .vote-card:hover { border-color: #c7c7cc; }
    .vote-card.selected {
      border-color: var(--red-700);
      background: var(--red-50);
    }
    .vote-avatar {
      width: 48px; height: 48px;
      border-radius: 10px;
      background: linear-gradient(135deg, #f7f5f4, #eee);
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0;
      font-size: 18px; font-weight: 600; color: #c7c7cc;
    }
    .vote-card.selected .vote-avatar {
      background: linear-gradient(135deg, rgba(185,28,28,.1), rgba(185,28,28,.05));
      color: var(--red-700);
    }
    .vote-info { flex: 1; min-width: 0; }
    .vote-name {
      font-size: 15px;
      font-weight: 600;
      color: #1d1d1f;
      margin-bottom: 2px;
    }
    .vote-desc {
      font-size: 13px;
      color: #86868b;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .vote-check {
      width: 22px; height: 22px;
      border-radius: 50%;
      border: 2px solid #d2d2d7;
      flex-shrink: 0;
      display: flex; align-items: center; justify-content: center;
      transition: all .15s;
    }
    .vote-card.selected .vote-check {
      background: var(--red-700);
      border-color: var(--red-700);
    }
    .vote-card.selected .vote-check::after {
      content: '';
      width: 5px; height: 9px;
      border: solid #fff;
      border-width: 0 2px 2px 0;
      transform: rotate(45deg) translate(-0.5px, -0.5px);
    }

    .vote-status-bar {
      background: #fff;
      border: 1px solid #e5e5e7;
      border-radius: 12px;
      padding: 20px 24px;
      margin-bottom: 24px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 12px;
    }
    .vote-status-left { display: flex; align-items: center; gap: 16px; }
    .status-dot {
      width: 8px; height: 8px;
      border-radius: 50%;
      background: #34d399;
    }
    .status-dot.ended { background: #86868b; }
    .status-text {
      font-size: 14px;
      font-weight: 500;
      color: #1d1d1f;
    }
    .status-countdown {
      font-size: 13px;
      color: #86868b;
    }
    .vote-progress-wrap {
      flex: 1;
      min-width: 200px;
      max-width: 300px;
    }
    .vote-progress-label {
      display: flex;
      justify-content: space-between;
      font-size: 12px;
      color: #86868b;
      margin-bottom: 6px;
    }
    .vote-progress-bg {
      height: 6px;
      background: #e5e5e7;
      border-radius: 3px;
      overflow: hidden;
    }
    .vote-progress-fill {
      height: 100%;
      background: var(--red-700);
      border-radius: 3px;
      transition: width .5s ease;
    }

    /* ===== Results ===== */
    .result-card {
      display: flex;
      align-items: center;
      gap: 18px;
      background: #fff;
      border: 1px solid #e5e5e7;
      border-radius: 12px;
      padding: 20px 24px;
      margin-bottom: 12px;
      position: relative;
    }
    .result-rank {
      width: 32px; height: 32px;
      border-radius: 8px;
      display: flex; align-items: center; justify-content: center;
      font-size: 14px;
      font-weight: 700;
      flex-shrink: 0;
      background: #f7f5f4;
      color: #86868b;
    }
    .result-rank.gold { background: #fef3c7; color: #d97706; }
    .result-rank.silver { background: #f1f5f9; color: #64748b; }
    .result-rank.bronze { background: #fed7aa; color: #c2410c; }
    .result-avatar {
      width: 44px; height: 44px;
      border-radius: 10px;
      background: linear-gradient(135deg, #f7f5f4, #eee);
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0;
      font-size: 16px; font-weight: 600; color: #c7c7cc;
    }
    .result-info { flex: 1; min-width: 0; }
    .result-name { font-size: 15px; font-weight: 600; color: #1d1d1f; }
    .result-position { font-size: 13px; color: #86868b; }
    .result-bar-wrap { width: 160px; flex-shrink: 0; }
    .result-bar-info {
      display: flex;
      justify-content: space-between;
      font-size: 12px;
      color: #86868b;
      margin-bottom: 4px;
    }
    .result-bar-bg {
      height: 8px;
      background: #f7f5f4;
      border-radius: 4px;
      overflow: hidden;
    }
    .result-bar-fill {
      height: 100%;
      border-radius: 4px;
      background: var(--red-700);
    }
    .result-elected {
      padding: 4px 12px;
      border-radius: 6px;
      background: #dcfce7;
      color: #166534;
      font-size: 12px;
      font-weight: 600;
      flex-shrink: 0;
    }

    /* ===== Toast ===== */
    .toast {
      position: fixed; top: 24px; left: 50%;
      transform: translateX(-50%) translateY(-12px);
      padding: 10px 24px;
      border-radius: 10px;
      font-size: 14px;
      font-family: inherit;
      z-index: 100;
      opacity: 0;
      transition: all .3s ease;
      pointer-events: none;
    }
    .toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
    .toast.success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
    .toast.error { background: var(--red-50); border: 1px solid #fecaca; color: var(--red-900); }
    .toast.info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

    .hidden { display: none !important; }

    /* ===== Responsive ===== */
    @media (max-width: 768px) {
      .top-nav { padding: 0 16px; }
      .nav-brand-text span { display: none; }
      .tab-bar { padding: 0 16px; }
      .page-container { padding: 20px 16px 48px; }
      .form-grid { grid-template-columns: 1fr; }
      .candidate-grid { grid-template-columns: 1fr; }
      .result-bar-wrap { width: 100px; }
      .vote-status-bar { flex-direction: column; align-items: flex-start; }
      .vote-progress-wrap { max-width: 100%; width: 100%; }
      .card { padding: 20px; }
    }

    .hero-line { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
    .phase-badge { display:inline-block; flex:none; padding:7px 12px; border-radius:20px; background:var(--red-50); color:var(--red-700); font-size:12px; font-weight:600; }
    .two-cards { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
    .rules { padding-left:22px; color:#6e6e73; font-size:14px; line-height:2; }
    .rules li::marker { color:var(--red-700); }
    .nav-login { color:white; background:var(--red-700); border-radius:8px; padding:8px 12px; text-decoration:none; }
    .nav-logout { color:#fff; background:transparent; border:1px solid rgba(255,255,255,.3); border-radius:8px; padding:5px 10px; cursor:pointer; }
    .gate { padding:18px 20px; border:1px solid #e5e5e7; border-radius:12px; background:#fff; margin-bottom:20px; color:#6e6e73; font-size:14px; line-height:1.6; }
    .gate strong { color:#1d1d1f; }
    .gate a { color:var(--red-700); }
    .visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
    .upload-area { display:flex; flex-direction:column; align-items:center; }
    .upload-icon { font-size:25px; color:#86868b; line-height:44px; }
    .photo-preview { width:120px; height:120px; object-fit:cover; border-radius:10px; margin-top:12px; border:1px solid #e5e5e7; }
    .word-count { float:right; color:#86868b; font-weight:400; }
    .empty-state { padding:36px 28px; background:#fff; border:1px dashed #d2d2d7; border-radius:14px; color:#86868b; text-align:center; line-height:1.7; }
    .candidate-photo img { width:100%; height:100%; object-fit:cover; }
    .candidate-photo .placeholder { font-size:48px; color:#d2d2d7; }
    .candidate-photo { overflow:hidden; }
    .vote-card { width:100%; text-align:left; font-family:inherit; }
    .vote-card:disabled { opacity:.58; cursor:not-allowed; }
    .vote-group { margin-bottom:28px; }
    .vote-group .empty-state { padding:18px; text-align:left; }
    .result-section { margin-bottom:28px; }
    .result-section h2 { font-size:17px; margin-bottom:12px; }
    .result-card .result-avatar img { width:100%; height:100%; object-fit:cover; border-radius:10px; }
    .result-note { background:var(--red-50); border-color:var(--red-100); font-size:13px; line-height:1.7; color:#6e6e73; }
    .admin-actions { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:16px; }
    .admin-hint { color:#86868b; font-size:13px; line-height:1.7; }
    .admin-item { padding:16px 0; border-top:1px solid #eee; font-size:14px; }
    .admin-item:first-child { border-top:0; }
    .admin-item p { color:#6e6e73; line-height:1.6; margin:6px 0; }
    .admin-item .btn { height:36px; padding:0 14px; margin:5px 6px 0 0; }
    .status-tag { display:inline-block; padding:3px 9px; border-radius:6px; background:#f7f5f4; color:#6e6e73; font-size:12px; margin-left:8px; }
    .status-tag.approved { background:#dcfce7; color:#166534; }
    .status-tag.rejected { background:#fee2e2; color:#991b1b; }
    .status-tag.pending { background:#fef3c7; color:#92400e; }
    .result-avatar { overflow:hidden; }
    .result-meter { display:block; width:100%; height:8px; appearance:none; border:0; border-radius:4px; overflow:hidden; background:#f7f5f4; }
    .result-meter::-webkit-progress-bar { background:#f7f5f4; border-radius:4px; }
    .result-meter::-webkit-progress-value { background:var(--red-700); border-radius:4px; }
    .result-meter::-moz-progress-bar { background:var(--red-700); border-radius:4px; }
    @media (max-width:768px) { .two-cards { grid-template-columns:1fr; gap:0; } .hero-line { flex-direction:column; gap:0; margin-bottom:20px; } .result-card { flex-wrap:wrap; padding:16px; } .result-bar-wrap { width:100%; margin-left:50px; } .nav-user { gap:6px; } }
    @media (max-width:450px) { .nav-brand-text { font-size:12px; } .nav-brand img { width:30px; height:30px; } .nav-user span { display:none; } .page-container { padding:20px 12px 48px; } .card { padding:18px; } .btn-row { flex-wrap:wrap; } }
  
