  * { box-sizing: border-box; }
  body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--pts-font-sans);
    background:
      linear-gradient(180deg, rgba(30, 41, 59, 0.5) 0, rgba(15, 23, 42, 0) 260px),
      linear-gradient(135deg, rgba(20, 184, 166, 0.08), transparent 38%),
      var(--pts-page-bg);
    color: var(--pts-text);
  }
  button, input, select { font: inherit; }
  .topbar {
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    padding: 0 24px;
    border-bottom: 1px solid rgba(71, 85, 105, 0.7);
    background: rgba(30, 41, 59, 0.92);
  }
  .brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: var(--pts-text-strong);
    font-size: 15px;
    font-weight: 900;
  }
  .brand-mark { width: 24px; height: 24px; flex: 0 0 auto; }
  .brand-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .version {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 10px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    color: var(--pts-text-muted);
    background: rgba(15, 23, 42, 0.45);
    font-size: 12px;
    font-weight: 800;
  }
  .page-shell {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 42px;
  }
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: end;
    margin-bottom: 20px;
  }
  .hero-title {
    margin: 0;
    color: var(--pts-text-strong);
    font-size: clamp(32px, 4.8vw, 54px);
    line-height: 0.98;
    font-weight: 900;
    letter-spacing: 0;
  }
  .hero-subtitle {
    margin: 14px 0 0;
    color: #cbd5e1;
    font-size: 15px;
    font-weight: 700;
  }
  .hero-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    border: 0;
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--pts-text-strong);
    background: var(--pts-surface-raised);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    cursor: pointer;
    transition: background var(--pts-transition-fast), transform var(--pts-transition-fast), opacity var(--pts-transition-fast);
  }
  .btn:hover { background: var(--pts-surface-hover); }
  .btn:active { transform: translateY(1px); }
  .btn:focus-visible {
    outline: none;
    box-shadow: var(--pts-focus-ring);
  }
  .btn-primary { background: var(--pts-brand); color: var(--pts-text-inverse); }
  .btn-primary:hover { background: var(--pts-brand-hover); }
  .btn-secondary { background: rgba(51, 65, 85, 0.78); color: #dbe4f0; }
  .btn-danger { background: var(--pts-danger-dark); color: #fecaca; }
  .btn-danger:hover { background: #991b1b; }
  .btn-ghost {
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.24);
    color: var(--pts-text-muted);
  }
  .btn-full { width: 100%; }
  .stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 20px;
  }
  .stat {
    min-width: 0;
    min-height: 78px;
    padding: 14px;
    border: 1px solid rgba(71, 85, 105, 0.68);
    border-radius: 8px;
    background: rgba(30, 41, 59, 0.78);
  }
  .stat strong {
    display: block;
    color: var(--pts-text-strong);
    font-size: 26px;
    line-height: 1;
    font-weight: 900;
  }
  .stat span {
    display: block;
    margin-top: 8px;
    color: var(--pts-text-dim);
    font-size: 12px;
    font-weight: 800;
  }
  .workspace {
    display: grid;
    grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.55fr);
    gap: 18px;
    align-items: start;
  }
  .column {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
  }
  .panel {
    border: 1px solid rgba(71, 85, 105, 0.7);
    border-radius: 8px;
    background: rgba(30, 41, 59, 0.86);
    padding: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
  }
  .panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
  }
  .panel-title {
    margin: 0;
    color: var(--pts-text-strong);
    font-size: 15px;
    line-height: 1.2;
    font-weight: 900;
  }
  .panel-count {
    color: var(--pts-text-dim);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
  }
  .item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
    color: var(--pts-text-muted);
    font-size: 12px;
    line-height: 1.45;
    font-weight: 700;
  }
  .list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .empty {
    display: grid;
    place-items: center;
    min-height: 136px;
    border: 1px dashed rgba(148, 163, 184, 0.32);
    border-radius: 8px;
    padding: 24px 16px;
    color: var(--pts-text-dim);
    text-align: center;
    background: rgba(15, 23, 42, 0.24);
    font-size: 13px;
    font-weight: 800;
  }
  .empty.compact {
    min-height: 54px;
    padding: 14px 12px;
  }
  .tour-card {
    border: 1px solid rgba(71, 85, 105, 0.78);
    border-radius: var(--pts-radius-lg);
    background: rgba(23, 32, 51, 0.94);
    padding: 15px;
    transition: border-color var(--pts-transition-fast), background var(--pts-transition-fast), transform var(--pts-transition-fast);
  }
  .data-item {
    min-width: 0;
    border: 1px solid rgba(71, 85, 105, 0.72);
    border-radius: 8px;
    background: rgba(23, 32, 51, 0.92);
    padding: 14px;
    transition: border-color var(--pts-transition-fast), background var(--pts-transition-fast), transform var(--pts-transition-fast);
  }
  .tour-card:hover {
    border-color: rgba(148, 163, 184, 0.48);
    background: rgba(30, 41, 59, 0.96);
  }
  .data-item:hover {
    border-color: rgba(148, 163, 184, 0.48);
    background: rgba(30, 41, 59, 0.96);
  }
  .tour-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
  }
  .data-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
  }
  .tour-name {
    color: var(--pts-text-strong);
    font-size: 16px;
    font-weight: 900;
    line-height: 1.35;
    word-break: break-word;
  }
  .data-name {
    min-width: 0;
    color: var(--pts-text-strong);
    font-size: 15px;
    font-weight: 900;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }
  .tour-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 7px;
    color: var(--pts-text-muted);
    font-size: 12px;
    line-height: 1.45;
  }
  .tour-id {
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #aebcd0;
    font-family: var(--pts-font-sans);
  }
  .tour-actions {
    display: grid;
    grid-template-columns: minmax(132px, auto) repeat(2, minmax(118px, auto)) 1fr auto auto;
    gap: 8px;
    align-items: center;
  }
  .data-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }
  .tour-actions .btn {
    min-width: 0;
    white-space: nowrap;
  }
  .data-actions .btn {
    white-space: nowrap;
  }
  .compact-profile .data-actions {
    margin-top: 0;
  }
  .data-actions .btn-danger {
    margin-left: auto;
  }
  .league-add-control {
    display: grid;
    gap: 8px;
    border: 1px solid rgba(71, 85, 105, 0.62);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.26);
    padding: 12px;
  }
  .league-add-control .label {
    margin-bottom: -2px;
  }
  .league-add-control .select {
    margin-bottom: 0;
  }
  .tour-action-spacer {
    min-width: 8px;
  }
  .phase {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--pts-phase-setup-bg);
    color: var(--pts-phase-setup-fg);
    font-size: 11px;
    font-weight: 900;
    line-height: 1.3;
    white-space: nowrap;
  }
  .phase.swiss { background: var(--pts-phase-swiss-bg); color: var(--pts-phase-swiss-fg); }
  .phase.swiss-ended { background: var(--pts-phase-swiss-ended-bg); color: var(--pts-phase-swiss-ended-fg); }
  .phase.top8 { background: var(--pts-phase-top8-bg); color: var(--pts-phase-top8-fg); }
  .phase.groups { background: rgba(20, 184, 166, 0.16); color: #99f6e4; }
  .phase.double-elimination { background: rgba(244, 114, 182, 0.16); color: #fbcfe8; }
  .phase.done { background: var(--pts-phase-done-bg); color: var(--pts-phase-done-fg); }
  .data-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .data-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .search-input {
    margin-bottom: 0;
  }
  .manager-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(112px, 136px);
    gap: 8px;
    margin: 0 0 12px;
  }
  .page-size-select {
    margin-bottom: 0;
  }
  .profile-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
  }
  .profile-pager .btn {
    min-width: 76px;
  }
  .profile-pager .btn:disabled {
    cursor: default;
    opacity: 0.48;
    transform: none;
  }
  .pager-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    height: 34px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 6px;
    color: var(--pts-text-muted);
    background: rgba(15, 23, 42, 0.34);
    font-size: 12px;
    font-weight: 900;
  }
  .data-summary {
    border: 1px solid rgba(71, 85, 105, 0.72);
    border-radius: 8px;
    background: rgba(23, 32, 51, 0.78);
    padding: 14px;
  }
  .summary-number {
    color: var(--pts-text-strong);
    font-size: 24px;
    line-height: 1;
    font-weight: 900;
  }
  .summary-title {
    margin-top: 8px;
    color: var(--pts-text-muted);
    font-size: 12px;
    font-weight: 800;
  }
  .summary-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
  }
  .summary-note {
    margin-top: 10px;
    color: var(--pts-text-muted);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.55;
  }
  .tag {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 8px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    color: var(--pts-text-muted);
    background: rgba(15, 23, 42, 0.34);
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
  }
  .input,
  .select {
    width: 100%;
    height: 42px;
    border: 1px solid var(--pts-border-strong);
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.88);
    color: var(--pts-text-strong);
    padding: 0 11px;
    font-size: 14px;
    margin-bottom: 12px;
  }
  .input:focus,
  .select:focus {
    outline: none;
    border-color: var(--pts-warning-bright);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
  }
  .select:invalid {
    color: var(--pts-text-dim);
  }
  .textarea {
    width: 100%;
    min-height: 90px;
    resize: vertical;
    border: 1px solid var(--pts-border-strong);
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.88);
    color: var(--pts-text-strong);
    padding: 10px 11px;
    font: inherit;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
  }
  .textarea:focus {
    outline: none;
    border-color: var(--pts-warning-bright);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
  }
  .label {
    display: block;
    margin-bottom: 6px;
    color: var(--pts-text-muted);
    font-size: 12px;
    font-weight: 800;
  }
  .check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    margin: -2px 0 12px;
    color: var(--pts-text-muted);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
  }
  .check-row input {
    width: 16px;
    height: 16px;
    accent-color: var(--pts-brand);
  }
  .inline-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .check-card {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid rgba(71, 85, 105, 0.64);
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.3);
    color: var(--pts-text-muted);
    cursor: pointer;
  }
  .check-card strong {
    display: block;
    color: var(--pts-text-strong);
    font-size: 13px;
    font-weight: 900;
  }
  .check-card small {
    display: block;
    margin-top: 2px;
    color: var(--pts-text-dim);
    font-size: 11px;
    font-weight: 700;
  }
  .check-card input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--pts-brand);
  }
  .create-stage-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
  }
  .create-stage-grid:has(#finalsStageSection.hidden) {
    grid-template-columns: 1fr;
  }
  .create-rule-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .create-rule-readonly {
    display: flex;
    grid-column: 1 / -1;
    align-items: center;
    justify-content: space-between;
    min-height: 38px;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid rgba(71, 85, 105, 0.72);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.52);
    color: var(--pts-text-muted);
    font-size: 12px;
    white-space: nowrap;
  }
  .create-rule-readonly span,
  .create-rule-readonly strong {
    white-space: nowrap;
  }
  .create-rule-readonly strong {
    color: var(--pts-text-strong);
    font-size: 13px;
  }
  .hidden {
    display: none !important;
  }
  .tournament-create {
    width: min(720px, 100%);
  }
  .points-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .form-section {
    margin-top: 8px;
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid rgba(71, 85, 105, 0.64);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.3);
  }
  .section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
  }
  .section-title {
    color: var(--pts-text-strong);
    font-size: 13px;
    font-weight: 900;
  }
  .points-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 8px;
    align-items: end;
    margin-bottom: 8px;
  }
  .field-note {
    margin: 4px 0 0;
    color: var(--pts-text-dim);
    font-size: 12px;
    line-height: 1.55;
    font-weight: 700;
  }
  .btn-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }
  .modal-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    padding-top: 12px;
    border-top: 1px solid rgba(71, 85, 105, 0.56);
  }
  .modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.8);
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
  }
  .modal.open {
    opacity: 1;
    pointer-events: auto;
  }
  .modal-stack {
    z-index: 70;
    background: rgba(15, 23, 42, 0.56);
  }
  .modal-box {
    width: min(480px, 100%);
    max-height: min(720px, calc(100vh - 40px));
    overflow: auto;
    border: 1px solid rgba(71, 85, 105, 0.78);
    border-radius: 8px;
    background: var(--pts-surface);
    padding: 16px;
    box-shadow: var(--pts-shadow-lg);
    transform: translateY(8px) scale(0.98);
    transition: transform 0.18s ease;
  }
  .modal-box,
  .manager-list,
  .qr-url {
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.46) rgba(15, 23, 42, 0.28);
  }
  .modal-box::-webkit-scrollbar,
  .manager-list::-webkit-scrollbar,
  .qr-url::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
  .modal-box::-webkit-scrollbar-track,
  .manager-list::-webkit-scrollbar-track,
  .qr-url::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.28);
    border-radius: 999px;
  }
  .modal-box::-webkit-scrollbar-thumb,
  .manager-list::-webkit-scrollbar-thumb,
  .qr-url::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.38);
    border-radius: 999px;
  }
  .modal-box::-webkit-scrollbar-thumb:hover,
  .manager-list::-webkit-scrollbar-thumb:hover,
  .qr-url::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.58);
  }
  .modal.open .modal-box {
    transform: translateY(0) scale(1);
  }
  .modal-box.wide { width: min(640px, 100%); }
  .modal-box.manager { width: min(820px, 100%); }
  .modal-box h2 {
    margin: 0 0 14px;
    color: var(--pts-text-strong);
    font-size: 17px;
    line-height: 1.3;
  }
  .modal-text {
    margin: 0 0 14px;
    color: var(--pts-text-muted);
    font-size: 13px;
    line-height: 1.7;
  }
  .modal-text strong { color: var(--pts-text-strong); }
  .manager-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
  }
  .manager-head h2 {
    margin-bottom: 4px;
  }
  .manager-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .manager-list {
    display: grid;
    gap: 6px;
  }
  .manager-list .data-item {
    padding: 10px 12px;
  }
  .manager-list .data-top {
    margin-bottom: 8px;
  }
  .manager-list .item-meta {
    gap: 6px;
    margin-top: 5px;
    font-size: 11px;
  }
  .manager-list .data-actions {
    gap: 6px;
  }
  .manager-list .data-actions .btn {
    min-height: 30px;
    padding: 6px 9px;
    font-size: 12px;
  }
  .manager-list .tag {
    min-height: 20px;
    padding: 1px 7px;
    font-size: 10.5px;
  }
  .detail-block {
    border: 1px solid rgba(71, 85, 105, 0.64);
    border-radius: 8px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.32);
    margin-bottom: 10px;
  }
  .detail-row {
    display: grid;
    grid-template-columns: minmax(96px, 0.34fr) minmax(0, 1fr);
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid rgba(71, 85, 105, 0.5);
    font-size: 13px;
  }
  .detail-row:last-child { border-bottom: 0; }
  .detail-key { color: var(--pts-text-dim); font-weight: 800; }
  .detail-value { color: var(--pts-text-strong); font-weight: 800; overflow-wrap: anywhere; }
  .profile-history-value {
    display: grid;
    gap: 4px;
    min-width: 0;
  }
  .profile-history-main {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
  }
  .profile-history-name {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .profile-history-rank {
    flex: 0 0 auto;
    border: 1px solid rgba(125, 211, 252, 0.34);
    border-radius: 999px;
    padding: 2px 7px;
    background: rgba(14, 165, 233, 0.13);
    color: #bae6fd;
    font-size: 12px;
    line-height: 1.1;
  }
  .profile-history-meta {
    color: var(--pts-text-dim);
    font-size: 12px;
    font-weight: 800;
    text-align: right;
    overflow-wrap: anywhere;
  }
  .detail-section-title {
    margin-bottom: 10px;
    color: var(--pts-text-strong);
    font-size: 13px;
    font-weight: 900;
  }
  .mini-list {
    display: grid;
    gap: 8px;
  }
  .mini-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 9px 10px;
    border: 1px solid rgba(71, 85, 105, 0.58);
    border-radius: 8px;
    background: rgba(23, 32, 51, 0.72);
  }
  .league-binding-row {
    grid-template-columns: minmax(0, 1fr) minmax(180px, auto);
    align-items: end;
  }
  .league-binding-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: end;
  }
  .mini-title {
    color: var(--pts-text-strong);
    font-size: 13px;
    font-weight: 900;
    overflow-wrap: anywhere;
  }
  .mini-meta {
    margin-top: 4px;
    color: var(--pts-text-dim);
    font-size: 11px;
    font-weight: 800;
  }
  .qr-frame {
    width: 220px;
    height: 220px;
    display: grid;
    place-items: center;
    margin: 6px auto 14px;
    padding: 12px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.24);
  }
  .qr-frame svg {
    width: 100%;
    height: 100%;
    display: block;
  }
  .qr-url {
    max-height: 72px;
    overflow: auto;
    margin-bottom: 14px;
    padding: 9px 10px;
    border: 1px solid rgba(71, 85, 105, 0.72);
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.72);
    color: var(--pts-text-muted);
    font-size: 11px;
    line-height: 1.45;
    word-break: break-all;
  }
  .danger-text { color: #fecaca; }
  .toast {
    position: fixed;
    z-index: 120;
    right: 16px;
    bottom: 16px;
    display: none;
    padding: 10px 12px;
    border-radius: 8px;
    background: #14532d;
    color: #dcfce7;
    font-size: 13px;
    font-weight: 800;
    box-shadow: var(--pts-shadow-md);
  }
  .toast.show { display: block; }
  @media (max-width: 980px) {
    .hero,
    .workspace {
      grid-template-columns: 1fr;
    }
    .hero-actions {
      justify-content: flex-start;
    }
    .stat-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }
  @media (max-width: 620px) {
    .topbar { padding: 0 16px; }
    .page-shell {
      width: min(100% - 24px, 1220px);
      padding-top: 26px;
    }
    .hero-title { font-size: 30px; }
    .stat-grid,
    .inline-grid,
    .create-stage-grid,
    .create-rule-grid,
    .manager-toolbar,
    .points-grid,
    .points-row {
      grid-template-columns: 1fr;
    }
    .section-head,
    .modal-actions,
    .mini-row {
      grid-template-columns: 1fr;
      display: grid;
    }
    .league-binding-actions {
      grid-template-columns: 1fr;
    }
    .data-top {
      grid-template-columns: 1fr;
      display: block;
    }
    .data-actions {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .data-actions .btn-danger {
      margin-left: 0;
    }
    .tour-top {
      flex-direction: column;
    }
    .tour-actions {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 6px;
    }
    .tour-actions .btn-primary {
      grid-column: 1 / -1;
    }
    .tour-actions .btn {
      min-height: 34px;
      padding-inline: 10px;
      font-size: 12px;
    }
    .tour-actions .btn-secondary,
    .tour-actions .btn-danger {
      width: 100%;
    }
    .tour-action-spacer {
      display: none;
    }
    .detail-row {
      grid-template-columns: 1fr;
    }
    .profile-history-main {
      justify-content: flex-start;
    }
    .profile-history-meta {
      text-align: left;
    }
  }
