:root {
      color-scheme: light;
      --page-bg: #f2f2f2;
      --surface: #ffffff;
      --surface-soft: #f8f8f8;
      --surface-green: #f1f8f4;
      --text: #3a3a3a;
      --muted: #777777;
      --border: #e5e5e5;
      --border-strong: #d4d4d4;
      --nav: #333333;
      --nav-hover: #414141;
      --corp-green: #35a56f;
      --corp-green-dark: #278457;
      --corp-green-soft: #e8f5ee;
      --danger: #c94b4b;
      --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
      --shadow-hover: 0 8px 22px rgba(0, 0, 0, 0.11);
    }

    * {
      box-sizing: border-box;
    }

    [hidden] {
      display: none !important;
    }

    html {
      -webkit-text-size-adjust: 100%;
      background: var(--page-bg);
      overflow-x: hidden;
      overflow-y: auto;
    }

    body {
      margin: 0;
      min-height: 100vh;
      font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
      background: var(--page-bg);
      color: var(--text);
      overflow-x: hidden;
      overflow-y: visible;
      -webkit-overflow-scrolling: touch;
    }

    button,
    input,
    textarea {
      font: inherit;
    }

    .brand-header {
      width: 100%;
      background: var(--nav);
      border-bottom: 2px solid var(--corp-green);
      box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
    }

    .brand-header-inner {
      width: min(1110px, calc(100% - clamp(24px, 4vw, 32px)));
      min-height: clamp(70px, 9vw, 78px);
      margin: 0 auto;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 24px;
    }

    .brand-link {
      display: inline-flex;
      align-items: center;
      text-decoration: none;
      min-width: 0;
    }

    .brand-logo {
      display: block;
      width: auto;
      height: clamp(42px, 7vw, 54px);
      max-width: min(360px, 72vw);
      object-fit: contain;
      filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.35));
    }


    .nav-strip {
      width: 100%;
      min-height: 48px;
      background: var(--nav);
      border-top: 1px solid rgba(255, 255, 255, 0.05);
      border-bottom: 1px solid rgba(0, 0, 0, 0.18);
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
    }

    .nav-strip-inner {
      width: min(1110px, calc(100% - clamp(24px, 4vw, 32px)));
      min-height: 48px;
      margin: 0 auto;
      display: flex;
      align-items: stretch;
      flex-wrap: wrap;
    }

    .nav-item {
      position: relative;
      display: flex;
      align-items: center;
      min-height: 48px;
      padding: 0 clamp(14px, 2.4vw, 20px);
      color: #ffffff;
      text-decoration: none;
      font-size: clamp(0.88rem, 2vw, 0.94rem);
      font-weight: 600;
      letter-spacing: 0.01em;
    }

    .nav-item:hover {
      background: var(--nav-hover);
    }

    .nav-item.active {
      background: var(--corp-green);
    }

    main {
      width: min(1110px, calc(100% - clamp(24px, 4vw, 32px)));
      margin: clamp(20px, 4vw, 34px) auto clamp(36px, 5vw, 48px);
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 3px;
      padding: clamp(20px, 4vw, 42px);
      box-shadow: var(--shadow);
    }

    .header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;
      margin-bottom: clamp(22px, 3vw, 28px);
      padding-bottom: clamp(16px, 2.5vw, 18px);
      border-bottom: 1px solid var(--border);
    }

    .header-copy {
      min-width: 0;
    }

    h1 {
      margin: 0;
      color: #333333;
      font-size: clamp(1.8rem, 4vw, 2.65rem);
      line-height: 1.15;
      font-weight: 500;
      letter-spacing: -0.025em;
    }

    .header-kicker {
      margin: 7px 0 0;
      padding-left: clamp(12px, 2vw, 20px);
      color: var(--muted);
      font-size: 0.96rem;
    }


    .votes {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
      gap: clamp(10px, 2vw, 18px);
    }

    .vote-button {
      position: relative;
      min-height: 108px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      gap: 10px;
      padding: clamp(13px, 2vw, 16px) clamp(15px, 2.4vw, 18px);
      border: 1px solid var(--border-strong);
      border-radius: 4px;
      background: var(--surface);
      color: var(--text);
      text-decoration: none;
      overflow: hidden;
      transition:
        transform 150ms ease,
        border-color 150ms ease,
        box-shadow 150ms ease,
        background 150ms ease;
      touch-action: manipulation;
      -webkit-tap-highlight-color: transparent;
    }

    .vote-button::before {
      content: "";
      position: absolute;
      inset: 0 auto 0 0;
      width: 3px;
      background: #d8d8d8;
      transition: background 150ms ease, width 150ms ease;
    }

    .vote-button:hover {
      transform: translateY(-2px);
      border-color: #c9c9c9;
      box-shadow: var(--shadow-hover);
    }

    .vote-button:hover::before,
    .vote-button.current::before {
      background: var(--corp-green);
    }

    .vote-button:active {
      transform: translateY(0);
    }

    .vote-button.current {
      border-color: rgba(53, 165, 111, 0.58);
      box-shadow: 0 0 0 2px rgba(53, 165, 111, 0.09);
    }

    .vote-button.done {
      border-color: #cfe5d8;
      background: var(--surface-green);
    }

    .vote-button.done::before {
      background: var(--corp-green);
    }

    .topline {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
    }

    .number {
      display: inline-grid;
      place-items: center;
      min-width: 31px;
      height: 28px;
      padding: 0 7px;
      border-radius: 3px;
      background: #eeeeee;
      color: #666666;
      font-size: 0.78rem;
      font-weight: 700;
    }

    .status {
      color: #8b8b8b;
      font-size: 0.75rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.035em;
    }

    .done .status,
    .current .status {
      color: var(--corp-green-dark);
    }

    .player {
      display: block;
      max-width: calc(100% - 34px);
      color: #333333;
      font-size: 1.2rem;
      font-weight: 600;
      letter-spacing: -0.015em;
      overflow-wrap: anywhere;
    }

    .site {
      display: block;
      margin-top: 3px;
      color: var(--muted);
      font-size: 0.86rem;
      word-break: break-word;
    }

    .arrow {
      position: absolute;
      right: 20px;
      bottom: 18px;
      color: var(--corp-green);
      font-size: 1.28rem;
      font-weight: 800;
    }

    .progress-reset {
      width: 100%;
      margin-top: 24px;
      padding: 14px 16px 15px;
      appearance: none;
      border: 1px solid var(--border-strong);
      border-radius: 4px;
      background: var(--surface-soft);
      color: var(--text);
      cursor: pointer;
      transition:
        background 150ms ease,
        border-color 150ms ease,
        transform 150ms ease;
      touch-action: manipulation;
      -webkit-tap-highlight-color: transparent;
    }

    .progress-reset:hover {
      background: #f3f3f3;
      border-color: #bfbfbf;
    }

    .progress-reset:active {
      transform: scale(0.995);
    }

    .progress-reset-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      margin-bottom: 10px;
    }

    .progress-reset-label {
      display: flex;
      align-items: center;
      gap: 8px;
      color: #666666;
      font-size: 0.88rem;
      font-weight: 600;
    }

    .reset-icon {
      color: var(--corp-green-dark);
      font-size: 1.05rem;
      line-height: 1;
    }

    .progress-text {
      color: #444444;
      font-size: 0.88rem;
      font-weight: 700;
    }

    .progress {
      height: 8px;
      overflow: hidden;
      border-radius: 2px;
      background: #dfdfdf;
    }

    .progress-bar {
      height: 100%;
      width: 0;
      border-radius: inherit;
      background: var(--corp-green);
      transition: width 220ms ease;
    }

    .vpn-launch {
      width: 100%;
      min-height: 66px;
      margin: 24px 0 0;
      padding: 15px 20px;
      appearance: none;
      border: 0;
      border-radius: 4px;
      background: var(--nav);
      color: #ffffff;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 12px;
      font-size: 1.04rem;
      font-weight: 700;
      cursor: pointer;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
      transition:
        transform 150ms ease,
        background 150ms ease,
        box-shadow 150ms ease;
      touch-action: manipulation;
      -webkit-tap-highlight-color: transparent;
    }

    .vpn-launch:hover {
      transform: translateY(-1px);
      background: var(--corp-green-dark);
      box-shadow: 0 5px 14px rgba(0, 0, 0, 0.17);
    }

    .vpn-launch:active {
      transform: translateY(0);
    }

    .vpn-icon {
      font-size: 1.35rem;
      line-height: 1;
    }

    .setup {
      display: none;
    }

    .setup.visible {
      display: block;
    }

    .setup-label {
      display: block;
      margin-bottom: 9px;
      color: #555555;
      font-size: 0.92rem;
      font-weight: 600;
    }

    .setup-input {
      width: 100%;
      min-height: 128px;
      resize: vertical;
      padding: 15px 16px;
      border: 1px solid var(--border-strong);
      border-radius: 4px;
      outline: none;
      background: #ffffff;
      color: var(--text);
      box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
      transition: border-color 150ms ease, box-shadow 150ms ease;
    }

    .setup-input::placeholder {
      color: #aaaaaa;
    }

    .setup-input:focus {
      border-color: var(--corp-green);
      box-shadow: 0 0 0 3px rgba(53, 165, 111, 0.11);
    }

    .setup-button {
      width: 100%;
      min-height: 56px;
      margin-top: 14px;
      appearance: none;
      border: 0;
      border-radius: 4px;
      background: var(--corp-green);
      color: #ffffff;
      font-weight: 700;
      cursor: pointer;
      box-shadow: 0 2px 5px rgba(53, 165, 111, 0.2);
      transition: background 150ms ease, transform 150ms ease;
      touch-action: manipulation;
      -webkit-tap-highlight-color: transparent;
    }

    .setup-button:hover {
      background: var(--corp-green-dark);
    }

    .setup-button:active {
      transform: scale(0.995);
    }

    .setup-checkbox {
      display: inline-flex;
      align-items: center;
      gap: 9px;
      margin-top: 14px;
      color: var(--muted);
      font-size: 0.88rem;
      cursor: pointer;
      user-select: none;
    }

    .setup-checkbox input {
      width: 17px;
      height: 17px;
      margin: 0;
      accent-color: var(--corp-green);
      cursor: pointer;
    }

    .setup-error {
      margin: 12px 0 0;
      font-size: 0.86rem;
      display: none;
      color: var(--danger);
      font-weight: 600;
    }

    .setup-error.visible {
      display: block;
    }

    .page-footer {
      width: min(1110px, calc(100% - clamp(24px, 4vw, 32px)));
      margin: -14px auto 0;
      padding-bottom: max(16px, env(safe-area-inset-bottom));
      color: #8a8a8a;
      font-size: 0.78rem;
      text-align: center;
    }

    .page-footer a {
      color: #666666;
      text-decoration: none;
    }

    .page-footer a:hover {
      color: var(--corp-green-dark);
    }

    .footer-help {
      appearance: none;
      border: 0;
      padding: 0;
      background: transparent;
      color: #666666;
      font: inherit;
      cursor: pointer;
    }

    .footer-help:hover {
      color: var(--corp-green-dark);
    }

    .help-dialog {
      width: min(520px, calc(100% - 28px));
      max-height: min(78vh, 680px);
      padding: 0;
      border: 1px solid var(--border-strong);
      border-radius: 5px;
      background: var(--surface);
      color: var(--text);
      box-shadow: 0 18px 55px rgba(0, 0, 0, 0.25);
    }

    .help-dialog::backdrop {
      background: rgba(0, 0, 0, 0.48);
    }

    .help-dialog-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding: 18px 20px;
      border-bottom: 1px solid var(--border);
      background: var(--nav);
      color: #ffffff;
    }

    .help-dialog-title {
      margin: 0;
      font-size: 1.18rem;
      font-weight: 600;
    }

    .help-close {
      display: grid;
      place-items: center;
      width: 34px;
      height: 34px;
      padding: 0;
      border: 0;
      border-radius: 4px;
      background: rgba(255, 255, 255, 0.08);
      color: #ffffff;
      font-size: 1.35rem;
      line-height: 1;
      cursor: pointer;
    }

    .help-close:hover {
      background: rgba(255, 255, 255, 0.14);
    }

    .help-dialog-body {
      padding: 20px;
      overflow: auto;
    }

    .help-dialog-body p {
      margin: 0 0 14px;
      line-height: 1.5;
    }

    .help-dialog-body p:last-child {
      margin-bottom: 0;
    }

    .help-dialog-body strong {
      color: #333333;
    }
