:root {
    --bg: #f6f7f9;
    --surface: #ffffff;
    --surface-2: #eef1f5;
    --text: #15181e;
    --muted: #626b7a;
    --border: #e1e5eb;
    --brand: #8C1426;
    --brand-strong: #70101e;
    --brand-soft: #f6e6e9;
    --danger: #dc2626;
    --danger-soft: #fef2f2;
    --success: #15803d;
    --success-soft: #ecfdf3;
    --warning: #b45309;
    --warning-soft: #fffbeb;
    --info: #0369a1;
    --info-soft: #eff8ff;
    --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 12px 32px rgba(16, 24, 40, 0.06);
    --radius: 16px;
    --radius-sm: 10px;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0d1117;
        --surface: #151b23;
        --surface-2: #1c2430;
        --text: #e8edf4;
        --muted: #9aa6b5;
        --border: #28323f;
        --brand: #c76a78;
        --brand-strong: #d98b97;
        --brand-soft: #2a161b;
        --danger: #f87171;
        --danger-soft: #2a1518;
        --success: #4ade80;
        --success-soft: #10251a;
        --warning: #fbbf24;
        --warning-soft: #2a2110;
        --info: #7dd3fc;
        --info-soft: #102331;
        --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 18px 40px rgba(0, 0, 0, 0.25);
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(900px 520px at 50% -180px, var(--brand-soft), transparent 72%);
}

::selection {
    background: var(--brand);
    color: #fff;
}

a {
    color: var(--brand);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1,
h2,
h3 {
    line-height: 1.15;
    letter-spacing: -0.03em;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.1rem);
    margin: 0 0 0.6rem;
}

h2 {
    font-size: clamp(1.25rem, 2.4vw, 1.5rem);
    margin: 0 0 1rem;
}

h3 {
    font-size: 1.05rem;
    margin: 0 0 0.4rem;
}

p {
    margin: 0 0 1rem;
}

code,
pre {
    font-family: var(--mono);
}

code {
    font-size: 0.9em;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.1em 0.35em;
}

pre {
    margin: 0 0 1.2rem;
    padding: 1rem;
    overflow-x: auto;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.84rem;
    line-height: 1.6;
}

pre code {
    background: transparent;
    border: 0;
    padding: 0;
    font-size: inherit;
}

:focus-visible {
    outline: 3px solid var(--brand);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    top: -60px;
    left: 16px;
    z-index: 100;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow);
}

.skip-link:focus {
    top: 12px;
}

.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.container {
    width: min(1040px, calc(100% - 32px));
    margin-inline: auto;
}

.main {
    flex: 1;
    padding: 2.2rem 0 4.5rem;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 64px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--text);
    font-size: 1.22rem;
    font-weight: 800;
    letter-spacing: -0.05em;
}

.brand:hover {
    text-decoration: none;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: var(--brand);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0;
}

.brand-dot {
    color: var(--brand);
}

.nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.92rem;
    font-weight: 550;
}

.nav a {
    padding: 0.45rem 0.7rem;
    border-radius: 8px;
    color: var(--muted);
}

.nav a:hover {
    color: var(--text);
    background: var(--surface-2);
    text-decoration: none;
}

/* Hero */
.hero {
    max-width: 780px;
    margin: 0 auto 1.6rem;
    text-align: center;
}

.eyebrow {
    margin: 0 0 0.55rem;
    color: var(--brand);
    font-size: 0.74rem;
    font-weight: 750;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.hero h1 {
    font-size: clamp(2.5rem, 7vw, 4.2rem);
    line-height: 1.02;
    letter-spacing: -0.055em;
    margin-bottom: 1rem;
}

.highlight {
    background: linear-gradient(transparent 64%, var(--brand-soft) 64%);
    padding: 0 0.08em;
}

.lead {
    max-width: 640px;
    margin: 0 auto;
    color: var(--muted);
    font-size: clamp(1rem, 1.7vw, 1.13rem);
    line-height: 1.6;
}

.lead-small {
    margin: 0;
    max-width: 720px;
    font-size: 0.98rem;
}

/* Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.shorten-card {
    max-width: 860px;
    margin: 0 auto;
    padding: 1.1rem;
}

.shorten-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.url-row {
    display: flex;
    gap: 0.6rem;
}

.url-row input {
    flex: 1;
    min-width: 0;
    height: 56px;
    padding: 0 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--text);
    font: inherit;
    font-size: 1.02rem;
}

.url-row input::placeholder,
input::placeholder {
    color: var(--muted);
    opacity: 0.8;
}

.url-row input:focus,
.field input:focus,
.alias-wrap input:focus {
    border-color: var(--brand);
    outline: none;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent);
    background: var(--surface);
}

.alias-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    padding: 0 0.1rem;
}

.alias-label {
    font-size: 0.82rem;
    font-weight: 650;
    color: var(--muted);
}

.alias-wrap {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 220px;
    max-width: 420px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface-2);
    overflow: hidden;
}

.alias-prefix {
    padding: 0 0.1rem 0 0.75rem;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.78rem;
    white-space: nowrap;
}

.alias-wrap input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0 0.75rem 0 0.15rem;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-family: var(--mono);
    font-size: 0.85rem;
}

.field-help {
    display: block;
    margin: 0;
    color: var(--muted);
    font-size: 0.76rem;
}

.advanced {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    padding: 0.7rem 0.85rem;
}

.advanced summary {
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 650;
    color: var(--muted);
    user-select: none;
}

.advanced summary:hover {
    color: var(--text);
}

.advanced[open] summary {
    margin-bottom: 0.85rem;
}

.advanced-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
}

.field input {
    height: 42px;
    padding: 0 0.7rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 0.92rem;
    font-weight: 400;
}

.check {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin-top: 0.85rem;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.4;
    cursor: pointer;
}

.check input {
    width: 17px;
    height: 17px;
    margin-top: 0.08rem;
    accent-color: var(--brand);
    flex: 0 0 auto;
}

.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    flex-wrap: wrap;
    padding: 0.1rem;
    color: var(--muted);
    font-size: 0.76rem;
}

.form-foot p {
    margin: 0;
}

.stats-strip {
    white-space: nowrap;
}

.stats-strip strong {
    color: var(--text);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    height: 56px;
    padding: 0 1.35rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn:hover {
    text-decoration: none;
}

.btn:active {
    transform: translateY(1px);
}

.btn:disabled,
.btn.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--brand);
    color: #fff;
}

.btn-primary:hover {
    background: var(--brand-strong);
    color: #fff;
}

.btn-secondary {
    height: 42px;
    padding: 0 0.85rem;
    border-color: var(--border);
    background: var(--surface-2);
    color: var(--text);
    font-size: 0.84rem;
}

.btn-secondary:hover {
    border-color: var(--brand);
    color: var(--brand);
}

.btn-danger {
    height: 42px;
    padding: 0 0.85rem;
    border-color: color-mix(in srgb, var(--danger) 35%, var(--border));
    background: var(--danger-soft);
    color: var(--danger);
    font-size: 0.84rem;
}

.btn-danger:hover {
    border-color: var(--danger);
    background: color-mix(in srgb, var(--danger) 14%, var(--surface));
}

.btn-ghost {
    height: 36px;
    padding: 0 0.65rem;
    border-color: transparent;
    background: transparent;
    color: var(--muted);
    font-size: 0.8rem;
}

.btn-ghost:hover {
    background: var(--surface-2);
    color: var(--danger);
}

.btn-small {
    height: 36px;
    font-size: 0.8rem;
}

.btn-wide {
    width: 100%;
    margin-top: 0.65rem;
}

/* Alerts */
.alert {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.55rem;
    max-width: 860px;
    margin: 0 auto 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.alert strong {
    font-weight: 700;
}

.alert-error {
    border-color: color-mix(in srgb, var(--danger) 30%, var(--border));
    background: var(--danger-soft);
    color: var(--danger);
}

.alert-success {
    border-color: color-mix(in srgb, var(--success) 30%, var(--border));
    background: var(--success-soft);
    color: var(--success);
}

.alert-warning {
    border-color: color-mix(in srgb, var(--warning) 35%, var(--border));
    background: var(--warning-soft);
    color: var(--warning);
}

.alert-info {
    border-color: color-mix(in srgb, var(--info) 30%, var(--border));
    background: var(--info-soft);
    color: var(--info);
}

/* Sections */
.section {
    margin-top: 2.8rem;
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.section-head h2 {
    margin: 0;
    font-size: 1.15rem;
}

.text-link {
    font-size: 0.86rem;
    font-weight: 650;
}

.recent-list {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.recent-item {
    display: grid;
    grid-template-columns: minmax(90px, auto) minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.5rem 1rem;
    padding: 0.85rem 1rem;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

.recent-item:last-child {
    border-bottom: 0;
}

.recent-item:hover {
    background: var(--surface-2);
    text-decoration: none;
}

.recent-code {
    font-family: var(--mono);
    font-size: 0.82rem;
    font-weight: 650;
    color: var(--brand);
}

.recent-url {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--muted);
    font-size: 0.88rem;
}

.recent-meta {
    color: var(--muted);
    font-size: 0.76rem;
    white-space: nowrap;
}

.features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 2.8rem;
}

.feature {
    padding: 1.1rem 1.15rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.feature-icon {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-bottom: 0.7rem;
    border-radius: 9px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 0.9rem;
    font-weight: 750;
}

.feature p {
    margin: 0;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.5;
}

/* Page head */
.page-head {
    max-width: 1040px;
    margin: 0 0 1.2rem;
}

.back {
    display: inline-block;
    margin-bottom: 0.8rem;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 600;
}

.page-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-head-row h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-family: var(--mono);
    letter-spacing: -0.04em;
}

.page-head-row .eyebrow {
    margin-bottom: 0.3rem;
}

/* Status */
.status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 700;
    white-space: nowrap;
}

.status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status-on {
    background: var(--success-soft);
    color: var(--success);
}

.status-off {
    background: var(--danger-soft);
    color: var(--danger);
}

.status-warn {
    background: var(--warning-soft);
    color: var(--warning);
}

/* Detail */
.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(250px, 0.8fr);
    gap: 1rem;
    align-items: start;
}

.detail-main,
.detail-aside {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.link-card,
.owner-card,
.qr-card,
.detail-aside .card,
.stats-grid + .card,
.card {
    padding: 1.15rem;
}

.link-card h2,
.card h2 {
    margin-bottom: 0.9rem;
}

.short-box {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.7rem 0.65rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
}

.short-box code {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: transparent;
    border: 0;
    padding: 0;
    font-size: 0.88rem;
    font-weight: 650;
}

.short-box-stack {
    flex-wrap: wrap;
}

.short-box-stack code {
    flex-basis: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

.meta-list {
    display: grid;
    gap: 0.7rem;
    margin: 1rem 0 0;
}

.meta-list > div {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 0.75rem;
    align-items: baseline;
}

.meta-list dt {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.meta-list dd {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 0.9rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
}

.stat-card {
    padding: 0.9rem 1rem;
    box-shadow: none;
}

.stat-label {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--muted);
    font-size: 0.73rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 1.7rem;
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.stat-value-small {
    font-size: 0.9rem;
    line-height: 1.3;
    letter-spacing: 0;
}

.card-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.chart {
    display: flex;
    align-items: flex-end;
    gap: 0.45rem;
    height: 150px;
    padding-top: 0.5rem;
}

.chart-col {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    flex: 1;
    height: 100%;
    min-width: 0;
}

.chart-value {
    margin-bottom: 0.25rem;
    color: var(--muted);
    font-size: 0.68rem;
    font-variant-numeric: tabular-nums;
}

.chart-bar {
    width: 100%;
    height: var(--h, 2%);
    min-height: 2px;
    border-radius: 5px 5px 2px 2px;
    background: linear-gradient(180deg, var(--brand), color-mix(in srgb, var(--brand) 55%, var(--surface)));
    transition: height 0.25s ease;
}

.chart-day {
    margin-top: 0.35rem;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 650;
}

.ref-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ref-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.86rem;
}

.ref-list li:last-child {
    border-bottom: 0;
}

.ref-list span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--muted);
}

.ref-list strong {
    font-variant-numeric: tabular-nums;
}

.muted {
    color: var(--muted);
    font-size: 0.86rem;
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.form-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.danger-zone {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.owner-card .advanced-grid {
    margin: 0;
}

.qr-card {
    text-align: center;
}

.qr {
    display: grid;
    place-items: center;
    width: 208px;
    height: 208px;
    margin: 0 auto 0.4rem;
    padding: 8px;
    border-radius: 12px;
    background: #fff;
}

.qr img,
.qr canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

.detail-aside .card h2 {
    font-size: 1rem;
}

.detail-aside .card p:last-child {
    margin-bottom: 0;
}

/* My links */
.my-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 1.2rem 0 0.6rem;
    color: var(--muted);
    font-size: 0.82rem;
}

.my-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.my-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.75rem 1.2rem;
    padding: 0.85rem 1rem;
    box-shadow: none;
}

.my-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.my-code {
    font-family: var(--mono);
    font-size: 0.9rem;
    font-weight: 700;
}

.my-url {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--muted);
    font-size: 0.8rem;
}

.my-stats {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    color: var(--muted);
    font-size: 0.75rem;
    text-align: right;
    white-space: nowrap;
}

.my-stats strong {
    color: var(--text);
    font-size: 0.84rem;
}

.my-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.my-actions form {
    margin: 0;
}

.empty {
    text-align: center;
    padding: 3.5rem 1.5rem;
}

.empty-icon {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 0.8rem;
    border-radius: 14px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 1.2rem;
}

.empty h2 {
    margin-bottom: 0.35rem;
}

.empty p {
    color: var(--muted);
    margin-bottom: 1.2rem;
}

/* Error */
.error-page {
    max-width: 620px;
    margin: 4rem auto;
    text-align: center;
}

.error-status {
    display: inline-block;
    margin-bottom: 0.6rem;
    font-family: var(--mono);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--brand);
    letter-spacing: 0.12em;
}

.error-page h1 {
    font-size: clamp(2rem, 5vw, 2.8rem);
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin: 1.3rem 0;
}

/* Prose */
.prose {
    max-width: 780px;
    margin: 0 auto;
    padding: clamp(1.2rem, 4vw, 2.2rem);
}

.prose h1 {
    font-size: clamp(2rem, 4vw, 2.6rem);
}

.prose h2 {
    margin-top: 2rem;
    font-size: 1.18rem;
}

.prose h3 {
    margin-top: 1.4rem;
}

.prose p,
.prose li {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.65;
}

.prose strong {
    color: var(--text);
}

.prose ul {
    padding-left: 1.15rem;
    margin: 0 0 1.2rem;
}

.prose li {
    margin-bottom: 0.35rem;
}

.prose a {
    font-weight: 600;
}

.notice-inline {
    padding: 0.7rem 0.9rem;
    border-left: 3px solid var(--warning);
    border-radius: 0 8px 8px 0;
    background: var(--warning-soft);
    color: var(--warning) !important;
    font-size: 0.85rem !important;
}

.api-docs pre {
    margin-top: 0.4rem;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 1.4rem 0;
    color: var(--muted);
    font-size: 0.78rem;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem 1.5rem;
    flex-wrap: wrap;
}

.footer-inner p {
    margin: 0;
}

.footer-inner nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 0.9rem;
}

.footer-inner a {
    color: var(--muted);
}

.footer-inner a:hover {
    color: var(--text);
}

/* Responsive */
@media (max-width: 820px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .detail-aside {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-aside .qr-card {
        grid-row: span 2;
    }

    .features {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .container {
        width: min(100% - 24px, 1040px);
    }

    .main {
        padding-top: 1.5rem;
    }

    .header-inner {
        min-height: 58px;
    }

    .nav {
        gap: 0;
        font-size: 0.84rem;
    }

    .nav a {
        padding: 0.4rem 0.5rem;
    }

    .hero h1 {
        font-size: clamp(2.3rem, 12vw, 3.2rem);
    }

    .url-row {
        flex-direction: column;
    }

    .url-row .btn {
        width: 100%;
    }

    .alias-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.35rem;
    }

    .alias-wrap {
        width: 100%;
        max-width: none;
    }

    .advanced-grid,
    .detail-aside {
        grid-template-columns: 1fr;
    }

    .detail-aside .qr-card {
        grid-row: auto;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .recent-item {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .recent-meta {
        grid-column: 1 / -1;
        padding-left: 0.1rem;
    }

    .meta-list > div {
        grid-template-columns: 1fr;
        gap: 0.1rem;
    }

    .my-item {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .my-stats {
        text-align: left;
        flex-direction: row;
        gap: 0.6rem;
    }

    .my-actions {
        justify-content: flex-start;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 420px) {
    .brand {
        font-size: 1.1rem;
    }

    .nav a:first-child {
        display: none;
    }

    .short-box {
        align-items: stretch;
        flex-direction: column;
    }

    .short-box .btn {
        width: 100%;
    }

    .chart {
        gap: 0.25rem;
    }

    .chart-value {
        font-size: 0.6rem;
    }
}

@media (prefers-color-scheme: dark) {
    .btn-primary,
    .btn-primary:hover {
        color: #08111f;
    }

    .brand-mark {
        color: #08111f;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* -------------------------------------------------------------------------
 * Authentifizierung, Konto und Administration
 * ---------------------------------------------------------------------- */

.nav {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-cta {
    background: var(--brand);
    color: #fff !important;
    padding: 0.45rem 0.8rem !important;
}

.nav-cta:hover {
    background: var(--brand-strong);
}

.nav-logout {
    color: var(--muted);
}

.nav-logout:hover {
    color: var(--danger);
}

.auth-wrap {
    max-width: 500px;
    margin: 1.5rem auto;
}

.auth-card {
    padding: clamp(1.2rem, 4vw, 1.8rem);
}

.auth-card h1 {
    font-size: clamp(1.8rem, 4vw, 2.3rem);
}

.auth-card .lead {
    margin-bottom: 1.3rem;
}

.auth-card .alert {
    max-width: none;
    margin: 0 0 1rem;
}

.oauth-grid {
    display: grid;
    gap: 0.55rem;
}

.oauth-btn {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-height: 48px;
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 650;
}

.oauth-btn:hover {
    border-color: var(--brand);
    text-decoration: none;
}

.oauth-icon {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: var(--surface-2);
    color: var(--brand);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0;
}

.oauth-github {
    background: #24292f;
    border-color: #24292f;
    color: #fff;
}

.oauth-github:hover {
    border-color: #57606a;
    color: #fff;
}

.oauth-github .oauth-icon {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.oauth-apple {
    background: #000;
    border-color: #000;
    color: #fff;
}

.oauth-apple:hover {
    border-color: #444;
    color: #fff;
}

.oauth-apple .oauth-icon {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.oauth-note {
    margin: 0.5rem 0 0;
    color: var(--muted);
    font-size: 0.75rem;
    line-height: 1.45;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.2rem 0;
    color: var(--muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem 1rem;
    flex-wrap: wrap;
    margin-top: 1.1rem;
    color: var(--muted);
    font-size: 0.82rem;
}

.auth-links a {
    font-weight: 650;
}

.account-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.account-head-main {
    flex: 1;
    min-width: 200px;
}

.account-head-main h1 {
    margin: 0 0 0.15rem;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.account-head-main p {
    margin: 0;
}

.account-head-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.avatar {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 62px;
    height: 62px;
    border-radius: 18px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.avatar-small {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 0.78rem;
}

.verify-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem 1rem;
    max-width: none;
}

.verify-banner > div:first-child {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.verify-actions {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    align-items: center;
}

.account-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    align-items: start;
}

.account-grid .card {
    min-width: 0;
}

.account-grid .danger-zone {
    grid-column: 1 / -1;
    margin-top: 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.5rem;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.badge-admin {
    background: var(--brand-soft);
    color: var(--brand);
}

.badge-success {
    background: var(--success-soft);
    color: var(--success);
}

.badge-banned {
    background: var(--danger-soft);
    color: var(--danger);
}

.badge-warning {
    background: var(--warning-soft);
    color: var(--warning);
}

.provider-list {
    display: flex;
    flex-direction: column;
}

.provider-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
}

.provider-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.provider-row:first-child {
    padding-top: 0;
}

.provider-main {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    flex: 1;
    min-width: 0;
}

.provider-main strong {
    font-size: 0.88rem;
}

.provider-main .muted {
    font-size: 0.75rem;
}

.provider-row .oauth-icon {
    background: var(--brand-soft);
    color: var(--brand);
}

.inline-form {
    display: inline-flex;
    margin: 0;
}

.is-muted {
    opacity: 0.55;
}

.admin-toolbar {
    padding: 0.8rem;
    margin-bottom: 0.9rem;
}

.admin-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.admin-search input {
    flex: 1;
    min-width: 200px;
    height: 42px;
    padding: 0 0.75rem;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface-2);
    color: var(--text);
    font: inherit;
    font-size: 0.9rem;
}

.admin-search input:focus {
    border-color: var(--brand);
    outline: none;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent);
    background: var(--surface);
}

.table-wrap {
    overflow-x: auto;
    padding: 0;
}

.admin-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.admin-table th {
    padding: 0.7rem 0.75rem;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.admin-table td {
    padding: 0.7rem 0.75rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.admin-table tbody tr:last-child td {
    border-bottom: 0;
}

.admin-table tbody tr:hover {
    background: var(--surface-2);
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 200px;
}

.admin-user > div {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    min-width: 0;
}

.admin-user strong {
    font-size: 0.85rem;
}

.admin-user .muted {
    font-size: 0.72rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 230px;
}

.admin-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.15rem;
    min-width: 190px;
}

.admin-actions-col {
    text-align: right !important;
}

.oc-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.danger-text {
    color: var(--danger);
}

.small {
    font-size: 0.7rem;
}

.admin-note {
    margin-top: 0.8rem;
}

@media (max-width: 820px) {
    .account-grid {
        grid-template-columns: 1fr;
    }

    .account-grid .danger-zone {
        grid-column: auto;
    }
}

@media (max-width: 680px) {
    .nav {
        gap: 0;
        font-size: 0.8rem;
    }

    .nav a {
        padding: 0.4rem 0.45rem;
    }

    .account-head {
        align-items: flex-start;
    }

    .account-head-actions {
        width: 100%;
    }

    .verify-banner {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-search {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-search input {
        min-width: 0;
    }
}

@media (prefers-color-scheme: dark) {
    .nav-cta {
        color: #08111f !important;
    }
}

@media (max-width: 420px) {
    .nav {
        font-size: 0.72rem;
    }

    .nav a {
        padding: 0.35rem 0.3rem;
    }

    .nav-cta {
        padding: 0.35rem 0.5rem !important;
    }
}

@media (max-width: 560px) {
    .header-inner {
        flex-wrap: wrap;
        padding: 0.45rem 0 0.55rem;
    }

    .nav {
        width: 100%;
        justify-content: flex-start;
    }
}

.oauth-btn {
    font-family: inherit;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.oauth-btn.is-disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.oauth-btn.is-disabled:hover {
    border-color: var(--border);
}

.oauth-tag {
    margin-left: auto;
    padding: 0.08rem 0.45rem;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 0.64rem;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.oauth-github .oauth-tag,
.oauth-apple .oauth-tag {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.brand-logo {
    display: block;
    width: 34px;
    height: 34px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 0 0 1px var(--border);
}

.api-key-list {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.5rem;
}

.api-key-reveal {
    font-family: var(--mono);
    font-size: 0.8rem;
    word-break: break-all;
    background: transparent;
    border: 0;
    padding: 0;
}
