:root {
  color-scheme: dark;
  --bg: #0b0b10;
  --panel: #17171f;
  --line: #2a2a37;
  --text: #f5f4fc;
  --muted: #b0aebe;
  --accent: #d1c1ff;
  --lime: #d6fb9a;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; background: var(--bg); color: var(--text); }
button, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
.shell {
  width: min(100%, 610px);
  margin: auto;
  padding: calc(20px + env(safe-area-inset-top, 0px)) 14px calc(18px + env(safe-area-inset-bottom, 0px));
}
.brand { display: flex; gap: 12px; align-items: center; padding: 0 2px 20px; }
.avatar { display: grid; place-items: center; font-weight: 800; }
.mark { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 12px; object-fit: cover; }
.brand h1 { font-size: 25px; letter-spacing: -.045em; }
.eyebrow { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .15em; }
.icon-button {
  flex: 0 0 38px; width: 38px; height: 38px; display: grid; place-items: center;
  margin-left: auto; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); font-size: 23px;
}
.roles { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 0 0 18px; }
.roles button, .segmented button {
  border: 1px solid transparent; border-radius: 100px; background: transparent; color: var(--muted);
}
.roles button { padding: 8px 13px; font-size: 15px; font-weight: 650; }
.roles button[data-role="manage"] { padding-inline: 8px; }
.roles button[aria-pressed=true] { background: #24202f; border-color: #372d48; color: var(--accent); }
.avatar {
  position: relative;
  margin-left: auto; width: 34px; height: 34px; padding: 0; border: 0; overflow: hidden;
  border-radius: 50%; background: var(--lime); color: #223017;
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; border-radius: inherit; }
.profile { display: grid; gap: 14px; }
#profile-back { justify-self: start; }
.profile-identity { display: grid; justify-items: center; gap: 8px; padding: 2px 0 8px; }
.profile-avatar { width: 96px; height: 96px; margin: 0; font-size: 38px; }
.profile-identity h2 { font-size: 22px; letter-spacing: -.03em; text-align: center; overflow-wrap: anywhere; }
#profile-handle { color: var(--muted); font-size: 13px; }
#profile-handle:empty { display: none; }
.level-button {
  border: 0; border-radius: 100px; padding: 8px 15px; font-size: 13px; font-weight: 750;
  color: #fff; background: linear-gradient(120deg, #5c349b, #812367);
}
.profile-stats {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px 10px;
  margin: 0; padding: 13px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
}
.profile-stats div { display: flex; flex-direction: column-reverse; gap: 2px; }
.profile-stats dt { color: var(--muted); font-size: 12px; }
.profile-stats dd { margin: 0; font-weight: 750; font-size: 17px; overflow-wrap: anywhere; }
.profile-links { display: grid; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.profile-link { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px; padding: 10px; background: none; border: 0; text-align: left; }
.profile-link + .profile-link { border-top: 1px solid var(--line); }
.profile-icon { display: grid; place-items: center; height: 28px; border-radius: 8px; color: #fff; background: #3759a5; }
.profile-icon.support { background: #30704f; }
.profile-dialog-close { float: right; }
.profile-option { display: flex; align-items: center; gap: 7px; margin: 14px 0 8px; }
.level-ring { width: 150px; margin: 18px auto; position: relative; }
.level-ring svg { display: block; width: 100%; fill: none; stroke-width: 7px; }
.level-track { stroke: #3b2d54; }
.level-progress { stroke: #b384ff; stroke-linecap: round; }
.level-ring div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 4px; }
.level-ring strong { font-size: 26px; color: var(--accent); }
.level-ring small { color: var(--muted); }
.level-note { text-align: center; }
.section-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 7px; margin-bottom: 10px; }
.section-line h2 { font-size: 14px; font-weight: 700; color: var(--muted); }
.segmented { display: flex; gap: 3px; }
.segmented button { padding: 5px 7px; font-size: 11px; font-weight: 650; }
.segmented button[aria-pressed=true] { color: var(--text); background: #252531; }
.notice, .empty {
  grid-column: 1 / -1; padding: 14px 11px; border-radius: 13px; background: var(--panel);
  color: var(--muted); font-size: 13px; text-align: center; line-height: 1.45;
}
.notice { margin-bottom: 14px; }
.surface {
  border: 1px solid var(--line); border-radius: 13px; background: var(--panel); padding: 11px 12px; font-weight: 650;
}
.browse { display: flex; justify-content: space-between; width: 100%; margin-top: 8px; font-size: 13px; }
.browse span:last-child { color: var(--accent); }
.catalog { margin-top: 26px; }
.tag { color: var(--lime); font-size: 11px; font-weight: 650; }
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.filters select {
  min-width: 0; width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); font-size: 12px; font-weight: 600;
}
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.card {
  --tint: #462869;
  --glow: #a36fef;
  position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  border: 1px solid #ffffff20; border-radius: 16px; background: #1c1926;
}
.card[data-tone="1"] { --tint: #622e35; --glow: #f48377; }
.card[data-tone="2"] { --tint: #184947; --glow: #69dcb8; }
.card[data-tone="3"] { --tint: #5b3f18; --glow: #f7ba54; }
.artwork {
  display: grid; place-items: center; min-height: 98px; font-size: 47px;
  background: radial-gradient(ellipse at 50% 14%, var(--glow), transparent 77%),
    repeating-linear-gradient(127deg, #ffffff14 0 1px, transparent 1px 15px), var(--tint);
}
.card-state, .card-info {
  position: absolute; top: 8px; background: #14131edc; border: 1px solid #ffffff25; border-radius: 100px;
}
.card-state { left: 7px; max-width: calc(100% - 42px); padding: 4px 6px; color: var(--lime); font-size: 9px; }
.card-info { right: 7px; width: 27px; height: 27px; padding: 0; font-size: 15px; }
.card-main { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 9px; }
.card h3 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.card-meta { display: flex; flex-wrap: wrap; gap: 5px 8px; color: var(--muted); font-size: 11px; }
.card-meta time { font-variant-numeric: tabular-nums; }
.card-ticket { color: var(--accent); font-size: 11px; }
.card-action, .primary {
  width: 100%; border: 0; border-radius: 10px; background: var(--accent); color: #1b1426;
  font-weight: 800; padding: 8px 5px;
}
.card-action { font-size: 11px; min-height: 34px; margin-top: auto; }
.primary { font-size: 14px; min-height: 41px; }
.creator-banner {
  padding: 17px; margin-bottom: 14px; border-radius: 17px; border: 1px solid var(--line);
  background: linear-gradient(135deg, #312443, #191923 72%);
}
.creator-banner h2 { margin: 5px 0; font-size: 22px; }
.creator-banner p:not(.eyebrow) { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
footer { margin-top: 24px; text-align: center; color: var(--muted); font-size: 12px; }
dialog {
  width: min(92%, 435px); max-height: 85dvh; padding: 18px; color: var(--text);
  border: 1px solid var(--line); border-radius: 18px; background: #1c1926; overflow: auto;
}
dialog::backdrop { background: #050408c9; }
dialog form { float: right; }
dialog h2 { font-size: 20px; margin: 6px 42px 12px 0; overflow-wrap: anywhere; }
dialog p:not(.eyebrow), dialog li { color: var(--muted); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
dialog #detail-description { white-space: pre-wrap; }
dialog #detail-meta { margin: 12px 0; }
dialog .ticket-number { margin: 0 0 12px; }
.ticket-number code { color: var(--accent); font-size: 16px; font-weight: 700; letter-spacing: .12em; user-select: text; }
dialog :is(#detail-check-ticket, #detail-proof) { width: 100%; margin-bottom: 8px; font-size: 13px; }
.proof-page { line-height: 1.6; overflow-wrap: anywhere; }
.proof-page a { color: var(--accent); }
.proof-page p { margin-top: 12px; }
dialog #detail-message { margin-bottom: 8px; color: var(--lime); }
#detail-channels { display: grid; gap: 6px; margin-bottom: 8px; }
#detail-channels button { overflow-wrap: anywhere; }
#detail-join, #detail-open { width: 100%; margin-bottom: 8px; }
#detail-referral { margin: 10px 0; }
#detail-referral label { font-size: 12px; }
#detail-referral-link { width: 100%; margin: 4px 0 8px; }
dialog :is(#detail-listing, #detail-finish) { width: 100%; margin-top: 7px; font-size: 13px; }
#manage-finish { margin-bottom: 7px; }
.compact { padding: 6px 9px; font-size: 12px; }
#manage-close { float: right; }
.manage-items { display: grid; gap: 7px; }
.manage-row { width: 100%; display: grid; gap: 5px; text-align: left; overflow-wrap: anywhere; }
.manage-row small, .pager span { color: var(--muted); font-size: 12px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 9px 0; }
.manage-subtitle { font-size: 14px; margin: 13px 0 5px; }
.admin-names { margin: 0; padding-left: 18px; }
.admin-names:empty { display: none; }
.manage-editor { display: grid; gap: 9px; margin-top: 14px; }
.manage-editor fieldset { display: grid; gap: 9px; border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.manage-editor legend { font-size: 13px; padding: 0 5px; }
.manage-editor label { display: grid; gap: 4px; font-size: 12px; }
.manage-editor .check-line { display: flex; align-items: center; }
.manage-editor :is(input:not([type=checkbox]), textarea, select) {
  width: 100%; min-width: 0; color: var(--text); font: inherit; padding: 8px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--panel);
}
.manage-editor textarea { resize: vertical; }
.danger { color: #ffb7bf; border-color: #6b3941; }
.remove-confirm { padding: 10px; border: 1px solid #6b3941; border-radius: 12px; margin-top: 8px; }
#manage-detail-notice { min-height: 1em; margin: 7px 0; }
#create-in-bot { margin-top: 8px; }
#create-form { float: none; }
#create-channel-list { display: grid; gap: 6px; }
#create-channel-list button { text-align: left; overflow-wrap: anywhere; }
#create-channel-list button[aria-pressed="true"] { border-color: var(--lime); color: var(--lime); }
.create-channel-actions { display: flex; flex-wrap: wrap; gap: 6px; }
#create-form[hidden], #create-media-field[hidden] { display: none; }
#create-review-text { white-space: pre-wrap; }
#create-notice { margin-top: 10px; }
#manage-broadcast { margin-bottom: 10px; }
#broadcast-dialog textarea { width: 100%; resize: vertical; }
#broadcast-photo { max-width: 100%; }
#broadcast-picture:not([hidden]) { display: block; max-width: 100%; max-height: 260px; margin: 10px auto; border-radius: 10px; object-fit: contain; }
#broadcast-sample { white-space: pre-wrap; margin: 10px 0; }
@media (min-width: 480px) {
  .shell { padding-right: 22px; padding-left: 22px; }
  .artwork { min-height: 126px; }
  .card h3 { font-size: 16px; }
  .card-action { font-size: 13px; }
}
