:root{color-scheme:dark;--bg:#0b1020;--panel:#141b2d;--border:#2a3650;--muted:#a1aec7;--text:#eff4ff;--primary:#8d77ff;--primary2:#6953df;--green:#6ae3af;--red:#ff9aa5}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:radial-gradient(ellipse at 90% 0%,#1b2445 0%,transparent 45%),var(--bg);font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;color:var(--text);line-height:1.55}a{color:#b9acff;text-decoration:none}a:hover{text-decoration:underline}.wrap{max-width:1080px;margin:0 auto;padding:0 20px}.top{border-bottom:1px solid var(--border);background:rgba(11,16,32,.92);position:sticky;top:0;z-index:5;backdrop-filter:blur(12px)}.nav{display:flex;justify-content:space-between;align-items:center;gap:16px;min-height:70px}.brand{font-size:1.32rem;font-weight:850;white-space:nowrap;color:#fff}.brand span{letter-spacing:-.03em}.nav nav{display:flex;align-items:center;gap:20px;flex-wrap:wrap}.nav nav a,.link{font-size:.92rem;color:#d2d9ef}.inline{display:inline}.link{border:0;background:transparent;cursor:pointer;padding:0;font:inherit}.heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin:44px 0 26px}.heading h1{font-size:clamp(2rem,4vw,3rem);letter-spacing:-.05em;margin:5px 0}.heading p{color:var(--muted);max-width:690px;margin:0}.eyebrow{color:#a79aff;font-weight:750;font-size:.73rem;letter-spacing:.11em}.card{background:var(--panel);border:1px solid var(--border);border-radius:19px;padding:24px;margin:18px 0;box-shadow:0 10px 35px rgba(0,0,0,.1)}h1,h2{line-height:1.18}h2{font-size:1.28rem;margin:8px 0 14px}.card p{color:var(--muted)}.auth{max-width:470px;margin:60px auto;padding:34px}.auth h1{font-size:2rem;margin:8px 0}.stack{display:flex;flex-direction:column;gap:16px}.stack label,.toolbar label,.addchar label{display:flex;flex-direction:column;gap:7px;font-size:.87rem;font-weight:650}input:not([type=checkbox]),select{background:#0c1324;color:#fff;border:1px solid #3a4763;border-radius:10px;font-size:1rem;padding:13px 12px;width:100%;min-height:46px}input:focus,select:focus{outline:2px solid var(--primary);outline-offset:2px}.btn{display:inline-flex;justify-content:center;align-items:center;background:var(--primary);border:1px solid var(--primary);border-radius:10px;color:white;font-weight:750;font-size:.94rem;padding:12px 18px;cursor:pointer;min-height:46px;text-align:center}.btn:hover{background:var(--primary2);text-decoration:none}.outline{background:transparent;color:#d3ccff}.outline:hover{background:#292443}.subtle{color:#c7bcff;background:none;border:0;cursor:pointer;padding:10px;font:inherit}.alert{padding:14px 18px;border-radius:12px;margin:18px 0;background:#163629;border:1px solid #357c5d}.alert.error{background:#41242c;border-color:#9b4d60}.split{display:flex;justify-content:space-between;align-items:center;gap:16px}.chip{padding:6px 12px;font-size:.78rem;font-weight:800;border-radius:30px;white-space:nowrap}.good{background:#173f31;color:#83edbc}.muted{background:#30394c;color:#c6cad5}.hint{color:var(--muted);font-size:.84rem}.events{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.events .card{margin:0}.event{display:flex;flex-direction:column}.event h2{margin-bottom:8px}.registered{border-left:3px solid var(--green);padding-left:12px;color:#c8ffdf!important}.footerrow{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:auto;padding-top:12px}.footerrow .btn{font-size:.83rem}.checks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.check{display:flex;align-items:center;gap:12px;background:#0e1525;border:1px solid #33405a;padding:14px;border-radius:12px;cursor:pointer}.check:has(input:checked){border-color:var(--primary);background:#211c3d}.check input{accent-color:var(--primary);width:19px;height:19px}.attendees{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.attendee{background:#10182a;border:1px solid var(--border);border-radius:12px;padding:12px;display:flex;flex-direction:column;gap:3px}.attendee span{font-size:.88rem;color:var(--muted)}.addchar{display:flex;align-items:flex-end;gap:12px}.grow{flex:1}.charlist{display:flex;flex-direction:column}.charrow{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--border);padding:8px 0}.charrow:last-child{border:0}.pills{display:flex;gap:8px;flex-wrap:wrap}.pill{border:1px solid #45506a;border-radius:25px;padding:8px 12px;font-size:.82rem}.pill.active{background:#473c92;color:white}.toolbar{display:flex;gap:12px;align-items:end;margin-top:14px}.toolbar label{min-width:230px}.tablewrap{overflow-x:auto}table{border-collapse:collapse;width:100%;text-align:left}th,td{padding:13px 10px;border-bottom:1px solid var(--border)}th{color:#afb9d4;font-size:.8rem}.invite{display:block;max-width:max-content;font-size:1.1rem;background:#0b1325;padding:13px 18px;border-radius:10px;letter-spacing:.04em}.callout{background:#2b253d;padding:16px;border-radius:12px}.cancel{margin-top:8px}.foot{color:#7e8ba7;text-align:center;font-size:.78rem;padding-top:40px;padding-bottom:32px}@media(max-width:700px){.wrap{padding-left:14px;padding-right:14px}.nav{align-items:flex-start;padding-top:14px;padding-bottom:14px;flex-direction:column;gap:8px}.nav nav{width:100%;gap:15px;justify-content:space-between}.heading{margin:26px 0 16px;align-items:stretch;flex-direction:column}.heading h1{font-size:2.05rem}.events{grid-template-columns:1fr}.card{padding:18px;border-radius:15px}.split{align-items:flex-start}.event .split{align-items:flex-start}.footerrow{align-items:stretch;flex-direction:column}.footerrow .btn{width:100%}.attendees{grid-template-columns:1fr}.checks{grid-template-columns:1fr}.auth{margin:28px auto;padding:22px}.addchar{flex-direction:column;align-items:stretch}.grow{width:100%}.toolbar{flex-direction:column;align-items:stretch}.toolbar label{min-width:0}}

/* Language switch: accessible on narrow screens as well as desktop */
.language-switch{display:flex;gap:4px;align-items:center;padding:4px;border:1px solid var(--border);border-radius:10px;background:#0c1324;flex-shrink:0}
.language-switch .lang-choice{display:inline-flex;align-items:center;justify-content:center;padding:6px 10px;border-radius:7px;color:var(--muted);font-size:.83rem;font-weight:800;min-width:38px;min-height:36px}
.language-switch .lang-choice.selected{background:var(--primary2);color:#fff}
.language-switch .lang-choice:focus-visible{outline:2px solid white;outline-offset:2px}
@media(max-width:700px){.nav nav{gap:10px}.language-switch{margin-left:auto}}

/* Version 1.2: mobile-friendly level fields and one character per line */
.level-field{width:120px;flex-shrink:0}.char-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.level-update{display:flex;align-items:end;gap:6px}.level-update label{font-size:.76rem;color:var(--muted);display:flex;flex-direction:column;gap:2px}.level-update input{width:98px;min-height:40px;padding:8px}.charrow{gap:12px}.character-lines{display:flex;flex-direction:column;gap:5px}.attendee .character-lines{font-size:.9rem;color:var(--muted)}.sort-form{display:flex;align-items:end;gap:8px;margin:12px 0}.sort-form label{display:flex;flex-direction:column;gap:6px;max-width:260px;font-size:.84rem;color:var(--muted)}
@media(max-width:700px){.charrow{align-items:flex-start;flex-direction:column}.char-actions{width:100%;justify-content:space-between}.level-field{width:100%}.sort-form{align-items:stretch;flex-direction:column}.sort-form label{max-width:none}}

/* v1.3: one upcoming PvP, with a short, thumb-friendly registration flow */
.compact-heading{margin-bottom:14px}.compact-heading h1{margin-bottom:0}
.next-pvp{margin-top:0}.pvp-meta{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap}
.pvp-meta h2{font-size:clamp(1.4rem,3vw,2rem);margin:6px 0 4px}
.window-hint{margin:8px 0 18px}.selection-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.selection-heading h3{font-size:1.05rem;margin:4px 0 10px}.selection-heading .select-all{min-height:44px;font-size:.92rem}
.character-checks{grid-template-columns:1fr;gap:10px}.character-checks .check{min-height:58px;padding:14px 16px;font-size:1rem}
.character-checks .check input{width:24px;height:24px;flex-shrink:0}.character-checks .check span{overflow-wrap:anywhere}
.main-register{width:100%;min-height:56px;font-size:1.1rem}
.registered-box{background:#123a2b;border:1px solid #328b65;color:#d4ffe7;padding:14px 16px;border-radius:12px;margin:12px 0 18px}
.registered-characters{display:flex;flex-direction:column;gap:3px;margin-top:8px;color:#d4ffe7;font-size:.95rem}
.cancel-registration{text-align:center}.cancel-registration .subtle{min-height:44px}
.attendance-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:15px}
.attendance-heading h2{margin:0}.attendance-count{color:var(--muted);font-size:.85rem}
.attendee{min-width:0}.attendee strong,.character-lines{overflow-wrap:anywhere}
.closed-message{margin-bottom:0}
@media(max-width:700px){
  .nav nav{justify-content:flex-start;gap:5px 8px}
  .nav nav>a,.nav .link{display:inline-flex;align-items:center;min-height:44px;padding:8px 6px}
  .nav nav .inline{display:inline-flex;align-items:center}
  .nav nav .inline .link{white-space:nowrap}
  .compact-heading{gap:12px}.compact-heading h1{font-size:1.8rem}
  .manage-link{width:100%;min-height:48px}
  .pvp-meta{align-items:flex-start;gap:10px}
  .pvp-meta .chip{white-space:normal}
  .selection-heading h3{font-size:1rem}
  .card{margin:12px 0;padding:18px 16px}
  .attendance-card{margin-top:14px}
  .attendee{padding:14px}
  .attendees{gap:9px}
  .next-pvp .btn,.next-pvp button{touch-action:manipulation}
}

/* v1.4 admin-only membership controls; one-column on phones */
.member-list{display:flex;flex-direction:column}.member-row{display:flex;gap:16px;align-items:center;justify-content:space-between;padding:18px 0;border-bottom:1px solid var(--border)}.member-row:last-child{border-bottom:0}.member-info{min-width:0;overflow-wrap:anywhere}.member-info strong{margin-right:10px}.member-info .chip{display:inline-block}.member-meta{font-size:.86rem;color:var(--muted);margin-top:4px}.member-remove{flex-shrink:0}.delete-card{max-width:740px}.delete-card .stack{max-width:500px}.delete-card>.btn{margin-top:20px}.destructive-warning{color:#ffd1d6!important;border-left:4px solid var(--red);padding:12px 15px;background:#3c202c;border-radius:6px}.danger{background:#a02f48;border-color:#a02f48}.danger:hover{background:#8e253c}
@media(max-width:700px){.member-row{flex-direction:column;align-items:stretch;gap:10px}.member-remove{width:100%;min-height:48px}.delete-card .danger{min-height:54px}.member-info .chip{vertical-align:middle}}

/* v1.5: compact password forms and admin actions on phone */
.password-card{max-width:670px}.password-card .stack{max-width:490px}
.password-card .hint{font-size:.87rem}.password-card .stack label{display:flex;flex-direction:column;gap:7px;font-size:.9rem;font-weight:650}
.password-must-change{padding:13px 15px;border:1px solid #a98151;border-radius:10px;background:#3d2c24;color:#ffe4bd!important}
.member-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap;justify-content:flex-end}
.back-members{margin-top:20px}
@media(max-width:700px){.member-actions{width:100%;justify-content:stretch;flex-direction:column}.member-actions .btn{width:100%;min-height:50px}.password-card .stack .btn{width:100%;min-height:54px}}


/* v1.6: single-tap signup for every favorite, optimized for touch */
.quick-register{margin:10px 0 12px}.quick-register-form{margin:0}
.register-all-btn{width:100%;min-height:64px;font-size:1.2rem;background:#287c5b;border-color:#287c5b;gap:9px;touch-action:manipulation}
.register-all-btn:hover,.register-all-btn:focus-visible{background:#1d6d4f}
.favorite-counter{font-size:.92rem;opacity:.86;font-weight:650}
.quick-register-hint{margin:9px 2px 15px;line-height:1.45}
.manual-register{border:1px solid var(--border);border-radius:13px;background:#11192b;padding:0 15px}
.manual-register>summary{cursor:pointer;font-weight:700;padding:16px 3px;min-height:54px;display:list-item;touch-action:manipulation}
.manual-register[open]>summary{border-bottom:1px solid var(--border);margin-bottom:14px}
.manual-register .signup-form{padding:4px 0 18px}
.manual-register .selection-heading h3{font-size:1rem}
@media(max-width:700px){.register-all-btn{min-height:66px;font-size:1.17rem}.manual-register{padding:0 12px}.manual-register .signup-form{gap:13px}}
