:root {
  color-scheme: dark;
  --bg: #313338;
  --panel: #2b2d31;
  --panel-soft: #232428;
  --border: #1e1f22;
  --text: #dbdee1;
  --muted: #b5bac1;
  --accent: #5865f2;
  --accent-soft: #c4c8ff;
  --pink: #eb459e;
  --red: #ffb2b2;
  font-family: "gg sans", "Noto Sans", Helvetica, Arial, sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; padding: 24px 20px; background: var(--bg); color: var(--text); line-height: 1.55; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { opacity: .65; cursor: wait; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #d7caff; outline-offset: 4px; }
h1, h2, p { margin-top: 0; }
h1, h2 { line-height: 1.25; letter-spacing: -.02em; color: #f2f3f5; }
h1 { font-size: clamp(1.8rem, 4vw, 2.2rem); margin-bottom: 12px; }
h2 { font-size: 1.15rem; }
.topbar { max-width: 900px; margin: auto; border: 1px solid var(--border); border-bottom: 0; border-radius: 10px 10px 0 0; background: linear-gradient(135deg, #5865f2, #eb459e); color: #fff; box-shadow: 0 4px 15px rgba(0,0,0,.3); }
.topbar-inner { min-height: 96px; padding: 23px 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: .035em; min-width: 0; }
.brand-icon { width: 42px; height: 42px; display: grid; place-content: center; grid-auto-flow: column; background: rgba(0,0,0,.18); border: 1px solid rgba(255,255,255,.35); border-radius: 8px; color: #fff; font-size: 19px; letter-spacing: -.08em; padding-right: 2px; flex: 0 0 auto; }
.brand-icon span { font-size: 15px; align-self: end; }
.brand small { display: block; font-size: 11px; font-weight: 500; letter-spacing: .07em; color: #fff; opacity: .9; }
.nav-note { color: #fff; font-size: 13px; }
.account { display: flex; align-items: center; gap: 10px; font-size: 13px; min-width: 0; }
.account, .nav-note { padding: 7px 11px; border: 1px solid rgba(255,255,255,.18); border-radius: 6px; background: rgba(0,0,0,.25); }
.account-name { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-dot, .status-dot { width: 7px; height: 7px; border-radius: 50%; background: #57f287; flex: 0 0 auto; }
.account form { padding-left: 10px; border-left: 1px solid rgba(255,255,255,.3); }
.text-button { border: 0; padding: 7px 4px; background: transparent; color: var(--muted); font-size: 13px; }
.text-button:hover { color: #fff; text-decoration: underline; }
.topbar .text-button { color: #fff; }
.topbar :focus-visible { outline-color: #fff; }
.text-button.danger { color: var(--red); }
.page { max-width: 900px; padding: 30px 28px 40px; margin: auto; min-height: calc(100vh - 212px); border: 1px solid var(--border); border-top: 0; border-bottom: 0; background: var(--panel); }
.footer { max-width: 900px; padding: 18px 28px; margin: auto; border: 1px solid var(--border); border-radius: 0 0 10px 10px; background: #232428; display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 12px; box-shadow: 0 7px 15px rgba(0,0,0,.18); }
.eyebrow { color: var(--accent-soft); letter-spacing: .12em; font-size: 11px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; border: 1px solid transparent; border-radius: 6px; min-height: 45px; padding: 11px 17px; font-size: 13px; font-weight: 650; white-space: nowrap; transition: background .15s, border-color .15s; }
.button.primary { background: var(--accent); color: #fff; }
.button.primary:hover { background: #4752c4; }
.button.secondary { background: #383a40; border-color: #4e5058; color: #f2f3f5; }
.button.secondary:hover { background: #404249; border-color: #727580; }
.full-width { width: 100%; }
.welcome { max-width: 720px; margin: 9px auto 0; text-align: center; }
.welcome .eyebrow { justify-content: center; }
.welcome h1 { font-size: clamp(2.1rem, 5.4vw, 3.3rem); margin-bottom: 16px; line-height: 1.12; }
.welcome h1 span { color: #e6c2f0; }
.intro { color: var(--muted); max-width: 530px; margin: 0 auto 26px; font-size: 14px; }
.welcome-card { max-width: 480px; margin: auto; background: linear-gradient(135deg, rgba(88,101,242,.12), rgba(30,31,34,.72)); border: 1px solid #6975ec; border-radius: 8px; padding: 25px 28px 22px; box-shadow: 0 4px 12px rgba(0,0,0,.22); }
.card-icon { border: 1px solid #747bed; color: #dddfff; background: #373b64; width: 38px; height: 38px; border-radius: 8px; display: grid; place-content: center; margin: 0 auto 15px; font-size: 24px; }
.welcome-card h2 { font-size: 20px; margin-bottom: 10px; }
.welcome-card p { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.welcome-card p strong, .login-card p strong, .sharing p strong { color: #f2f3f5; font-weight: 600; }
.welcome-card .fineprint { font-size: 11px; margin: 15px 0 0; }
.welcome-facts { display: flex; justify-content: center; gap: 24px; margin-top: 25px; color: var(--muted); font-size: 12px; flex-wrap: wrap; }
.welcome-facts i { color: #57f287; font-style: normal; margin-right: 5px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 24px; padding-bottom: 22px; border-bottom: 1px solid #42444b; }
.page-heading .eyebrow { margin-bottom: 10px; }
.page-heading p:last-child { color: var(--muted); font-size: 14px; margin-bottom: 0; max-width: 620px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 28px; }
.stats > div { padding: 18px 20px; border: 1px solid var(--border); border-radius: 6px; background: var(--panel-soft); }
.stats span { font-size: 12px; color: var(--muted); display: block; margin-bottom: 9px; }
.stats strong { font-size: 28px; line-height: 1; font-weight: 650; color: #f2f3f5; }
.stats strong small { font-weight: 400; font-size: 12px; color: var(--muted); margin-left: 9px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.section-heading h2 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.section-heading > span { color: var(--muted); font-size: 11px; }
.ticket-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ticket-card { min-width: 0; border: 1px solid #42444b; background: #232428; padding: 21px; border-radius: 8px; transition: background .15s, border-color .15s; }
.ticket-card:hover { background: #30313a; border-color: #8790fa; }
.ticket-card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 18px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 700; border-radius: 4px; padding: 4px 8px; border: 1px solid #5d5262; color: #ffcef0; background: #3e303a; }
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #f28bc5; }
.ownership { font-size: 11px; color: var(--accent-soft); }
.ownership.shared { color: #f3b5d8; }
.ticket-card h2 { font-size: 18px; margin-bottom: 10px; overflow-wrap: anywhere; }
.ticket-meta { display: flex; gap: 7px 14px; color: var(--muted); font-size: 12px; flex-wrap: wrap; }
.ticket-meta > span + span::before { content: '·'; margin-right: 12px; color: #949ba4; }
.ticket-card-bottom { padding-top: 18px; margin-top: 19px; border-top: 1px solid #42444b; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.ticket-card-bottom time { color: var(--muted); font-size: 11px; }
.read-link { color: var(--accent-soft); font-size: 12px; font-weight: 600; white-space: nowrap; }
.read-link b { font-size: 17px; padding-left: 8px; font-weight: 400; }
.empty-state { text-align: center; background: #232428; border: 1px solid #42444b; border-radius: 8px; padding: 38px 25px; }
.empty-icon { width: 49px; height: 49px; border: 1px solid #626ac4; border-radius: 8px; background: #33364e; display: grid; place-content: center; color: #d3d6ff; font-size: 29px; margin: 0 auto 20px; }
.empty-state h2 { font-size: 21px; margin-bottom: 10px; }
.empty-state p { color: var(--muted); font-size: 13px; margin-bottom: 23px; }
.error-state { max-width: 660px; margin: 24px auto; }
.error-state .eyebrow { justify-content: center; color: var(--muted); }
.error-state h1 { font-size: 29px; }
.back-link { display: inline-block; font-size: 12px; color: var(--muted); margin-bottom: 23px; }
.back-link:hover { color: var(--accent-soft); text-decoration: underline; }
.ticket-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 25px; }
.heading-badges { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.ticket-heading h1 { max-width: 800px; overflow-wrap: anywhere; font-size: clamp(1.7rem, 3.7vw, 2.2rem); }
.ticket-heading p { color: var(--muted); font-size: 13px; margin: 0; }
.ticket-heading p span { padding: 0 7px; }
.details-strip { border: 1px solid var(--border); border-radius: 6px; background: #232428; display: grid; grid-template-columns: 1fr 1fr 1fr; margin-bottom: 20px; }
.details-strip > div { padding: 16px 20px; min-width: 0; }
.details-strip > div + div { border-left: 1px solid #42444b; }
.details-strip span { display: block; font-size: 11px; color: var(--muted); margin-bottom: 7px; }
.details-strip strong { font-size: 12px; font-weight: 550; overflow-wrap: anywhere; }
.monospace { font-family: Consolas, monospace; letter-spacing: .01em; }
.close-reason { padding: 0 4px; color: var(--muted); font-size: 12px; margin-bottom: 24px; overflow-wrap: anywhere; }
.close-reason strong { color: #f2f3f5; margin-right: 9px; font-weight: 600; }
.transcript-section { margin-top: 26px; }
.transcript { border: 1px solid var(--border); border-radius: 8px; width: 100%; height: 730px; background: #313338; display: block; }
.fineprint { color: var(--muted); font-size: 11px; margin: 12px 0 0; }
.sharing { margin-top: 28px; padding: 23px 24px; border: 1px solid #42444b; border-radius: 8px; background: #232428; }
.sharing > p { color: var(--muted); font-size: 12px; max-width: 790px; }
.share-form { display: flex; gap: 18px; align-items: flex-start; margin-top: 22px; }
.field { flex: 1; min-width: 0; }
.field label { display: block; font-size: 12px; margin-bottom: 8px; color: #dbdee1; }
.field input { width: 100%; border: 1px solid #62656e; border-radius: 6px; background: #1e1f22; color: var(--text); padding: 11px 13px; min-height: 45px; font-size: 13px; }
.field input::placeholder { color: #a7acb3; }
.field small { display: block; color: var(--muted); font-size: 11px; margin-top: 8px; }
.share-form > button { margin-top: 26px; }
.share-list { list-style: none; padding: 0; margin: 26px 0 0; }
.share-list li { border-top: 1px solid #42444b; padding: 16px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.share-list li:last-child { padding-bottom: 0; }
.share-list li > div { display: flex; align-items: center; gap: 12px; font-size: 12px; }
.share-avatar { display: grid; place-content: center; height: 34px; width: 34px; border-radius: 50%; background: #5865f2; border: 1px solid #8790fa; color: #fff; font-weight: 700; flex: 0 0 auto; }
.share-list small { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; overflow-wrap: anywhere; }
.share-empty { padding-top: 17px; margin: 21px 0 0; border-top: 1px solid #42444b; }
.shared-note { color: var(--muted); font-size: 12px; text-align: center; margin-top: 25px; }
.notice { border: 1px solid #5b65ba; background: #32364e; color: #e0e2ff; padding: 12px 16px; border-radius: 6px; font-size: 12px; }
.login-page { display: grid; place-content: center; padding-top: 35px; padding-bottom: 45px; }
.login-card { width: 100%; max-width: 520px; padding: 30px; border: 1px solid #6975ec; border-radius: 8px; background: linear-gradient(135deg, rgba(88,101,242,.12), rgba(30,31,34,.72)); box-shadow: 0 4px 12px rgba(0,0,0,.22); }
.login-card h1 { font-size: 29px; margin-bottom: 13px; }
.login-intro { color: var(--muted); font-size: 13px; margin-bottom: 25px; }
.login-status { padding: 15px; border: 1px solid #646bb8; color: #e0e2ff; background: #33364e; border-radius: 6px; font-size: 12px; }
.login-status.has-error { background: #412c32; color: #ffced0; border-color: #a96470; }
.identity-card { display: flex; align-items: center; gap: 14px; border: 1px solid #4e5058; border-radius: 8px; background: #232428; padding: 17px; }
.discord-avatar { height: 43px; width: 43px; flex: 0 0 auto; display: grid; place-content: center; color: #fff; border: 1px solid #8790fa; background: #5865f2; border-radius: 50%; font-weight: 800; }
.identity-name { font-size: 16px; font-weight: 650; display: block; overflow-wrap: anywhere; }
.identity-id { color: var(--muted); display: block; font-size: 11px; margin-top: 4px; overflow-wrap: anywhere; }
.confirmation-copy { color: var(--muted); font-size: 12px; margin: 20px 0; }
#login-help p { color: var(--muted); font-size: 12px; margin: 20px 0; }
.login-card .back-link { margin: 23px 0 0; font-size: 11px; }
@media (max-width: 760px) {
  body { padding: 14px 12px; }
  .topbar-inner { padding: 18px 20px; min-height: 82px; gap: 14px; }
  .brand { font-size: 14px; gap: 9px; }
  .brand-icon { height: 36px; width: 36px; border-radius: 6px; font-size: 17px; }
  .brand small { font-size: 10px; }
  .account { gap: 6px; font-size: 11px; }
  .account-name { max-width: 120px; }
  .account-dot { display: none; }
  .account form { padding-left: 6px; }
  .text-button { font-size: 11px; }
  .page { padding: 26px 20px 32px; min-height: calc(100vh - 189px); }
  .footer { padding: 17px 20px; flex-direction: column; gap: 5px; font-size: 11px; }
  .page-heading { display: block; margin-bottom: 23px; padding-bottom: 20px; }
  .page-heading .button { margin-top: 18px; }
  .stats { gap: 9px; margin-bottom: 26px; }
  .stats > div { padding: 16px 13px; }
  .stats span { font-size: 11px; min-height: 30px; margin-bottom: 8px; line-height: 1.45; }
  .stats strong { font-size: 25px; }
  .stats strong small { font-size: 11px; margin-left: 5px; }
  .ticket-grid { grid-template-columns: 1fr; gap: 13px; }
  .ticket-card { padding: 20px; }
  .ticket-heading { align-items: flex-start; flex-direction: column; gap: 18px; }
  .ticket-heading h1 { margin-bottom: 11px; }
  .details-strip { grid-template-columns: 1fr 1fr; }
  .details-strip > div { padding: 15px; }
  .details-strip > div:last-child { border-left: 0; border-top: 1px solid #42444b; grid-column: 1 / -1; }
  .details-strip strong { font-size: 11px; }
  .transcript { height: 620px; }
  .sharing { padding: 22px 18px; }
  .sharing .section-heading { flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
  .share-form { flex-direction: column; gap: 13px; }
  .field { width: 100%; }
  .share-form > button { margin: 0; width: 100%; }
  .share-list li { align-items: flex-start; gap: 9px; }
  .share-list li > div { font-size: 11px; gap: 9px; min-width: 0; }
  .share-avatar { width: 28px; height: 28px; }
  .share-list small { font-size: 11px; }
  .share-list .text-button { font-size: 11px; white-space: nowrap; }
  .login-page { padding-top: 30px; padding-bottom: 35px; }
  .login-card { padding: 26px 22px; }
  .login-card h1 { font-size: 27px; }
  .welcome { margin-top: 6px; }
  .welcome-card { padding: 24px 21px 20px; }
  .welcome-facts { gap: 10px 18px; font-size: 11px; margin-top: 23px; }
  .intro { font-size: 13px; margin-bottom: 24px; }
  .empty-state { padding: 33px 20px; }
}
@media (max-width: 390px) {
  body { padding: 10px 8px; }
  .topbar-inner { padding: 16px 15px; gap: 10px; }
  .account-name { max-width: 75px; }
  .nav-note { font-size: 11px; }
  .page { padding: 24px 16px 30px; }
  .footer { padding: 16px; }
  .ticket-card-bottom { align-items: flex-start; flex-direction: column; gap: 10px; }
  .stats > div { padding: 14px 10px; }
  .stats strong small { display: block; margin: 5px 0 0; }
  .section-heading { flex-wrap: wrap; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .button, .ticket-card { transition: none; }
}
