@import url("/fonts/noto-sans-sc/wght.css");

@font-face {
    font-family: "JetBrains Mono";
    src: url("/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2-variations");
    font-style: normal;
    font-weight: 100 800;
    font-display: swap;
}

:root {
    color-scheme: light;
    --bg: #f4f6f7;
    --surface: #ffffff;
    --surface-subtle: #f8faf9;
    --surface-strong: #eef2f1;
    --text: #14201c;
    --text-muted: #63706b;
    --text-faint: #89938f;
    --border: #dce3e0;
    --border-strong: #c8d2ce;
    --accent: #087f6d;
    --accent-hover: #066a5b;
    --accent-soft: #e3f3ef;
    --danger: #c63f3f;
    --danger-hover: #a92f2f;
    --danger-soft: #fbeaea;
    --warning: #9a6400;
    --warning-soft: #fff4d7;
    --success: #147353;
    --brand-logo: #087f6d;
    --shadow-sm: 0 1px 2px rgba(18, 32, 27, 0.06), 0 4px 14px rgba(18, 32, 27, 0.04);
    --shadow-lg: 0 16px 45px rgba(18, 32, 27, 0.12);
    --focus: 0 0 0 3px rgba(8, 127, 109, 0.18);
    --sidebar-width: 232px;
    --sidebar-collapsed: 72px;
    font-family: "JetBrains Mono", "Noto Sans SC Variable", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #111614;
    --surface: #18201d;
    --surface-subtle: #1c2522;
    --surface-strong: #26312d;
    --text: #edf3f0;
    --text-muted: #a5b1ac;
    --text-faint: #7d8984;
    --border: #2e3a35;
    --border-strong: #42504a;
    --accent: #4fc7b1;
    --accent-hover: #72d5c3;
    --accent-soft: #183b34;
    --danger: #f07979;
    --danger-hover: #ff9696;
    --danger-soft: #472526;
    --warning: #efbd58;
    --warning-soft: #463a20;
    --success: #69d0aa;
    --brand-logo: #58cdb7;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2), 0 5px 18px rgba(0, 0, 0, 0.13);
    --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.3);
    --focus: 0 0 0 3px rgba(79, 199, 177, 0.22);
}

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

html {
    min-width: 320px;
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.55;
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
    letter-spacing: 0;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

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

a:hover {
    text-decoration: underline;
}

button {
    border: 0;
}

button:not(:disabled),
[role="button"] {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.62;
}

input:not([type="checkbox"]):not([type="radio"]) {
    -webkit-appearance: none;
    appearance: none;
}

input {
    width: 100%;
    min-width: 0;
    height: 44px;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    outline: none;
    background: var(--surface);
    color: var(--text);
    padding: 0 13px;
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text);
    caret-color: var(--text);
    -webkit-box-shadow: 0 0 0 1000px var(--surface) inset;
    transition: background-color 9999s ease-out 0s;
}

input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--surface) inset, var(--focus);
}

input::placeholder {
    color: var(--text-faint);
}

input:hover {
    border-color: var(--text-faint);
}

input:focus {
    border-color: var(--accent);
    box-shadow: var(--focus);
}

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

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

[hidden] {
    display: none !important;
}

.brand {
    display: inline-flex;
    align-items: center;
    color: var(--text);
    line-height: 1;
}

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

.brand-mark {
    display: inline-block;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    background: var(--brand-logo);
    -webkit-mask: url("/images/logo.svg") center / contain no-repeat;
    mask: url("/images/logo.svg") center / contain no-repeat;
    transition: background-color 160ms ease, transform 160ms ease;
}

.brand:hover .brand-mark {
    transform: translateY(-1px);
}

.icon-button {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    font-size: 20px;
    line-height: 1;
    transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.icon-button:hover {
    border-color: var(--border);
    background: var(--surface-strong);
    color: var(--text);
}

.theme-icon-dark {
    display: none;
}

:root[data-theme="dark"] .theme-icon-light {
    display: none;
}

:root[data-theme="dark"] .theme-icon-dark {
    display: inline;
}

.primary-button,
.secondary-button,
.danger-button,
.text-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 6px;
    padding: 0 17px;
    font-size: 14px;
    font-weight: 680;
    line-height: 1.2;
    white-space: nowrap;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 100ms ease;
}

.primary-button {
    background: var(--accent);
    color: #ffffff;
}

:root[data-theme="dark"] .primary-button {
    color: #10201b;
}

.primary-button:hover {
    background: var(--accent-hover);
    text-decoration: none;
}

.secondary-button {
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
}

.secondary-button:hover {
    border-color: var(--text-faint);
    background: var(--surface-strong);
}

.danger-button {
    border: 1px solid transparent;
    background: var(--danger-soft);
    color: var(--danger);
}

.danger-button:hover {
    background: var(--danger);
    color: #ffffff;
}

.text-button {
    min-height: 34px;
    padding: 0 10px;
    background: transparent;
    color: var(--accent);
}

.text-button:hover {
    background: var(--accent-soft);
}

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

.text-button.is-danger:hover {
    background: var(--danger-soft);
}

.primary-button:active:not(:disabled),
.secondary-button:active:not(:disabled),
.danger-button:active:not(:disabled) {
    transform: translateY(1px);
}

.compact {
    min-height: 40px;
}

.eyebrow,
.dashboard-kicker {
    margin: 0;
    color: var(--accent);
    font-size: 11px;
    font-weight: 760;
    letter-spacing: 0;
    text-transform: uppercase;
}

.field-group {
    display: grid;
    gap: 7px;
}

.field-group label,
.shorten-form > label {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 650;
}

.check-control {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    width: max-content;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    user-select: none;
}

.check-control input {
    width: 16px;
    height: 16px;
    margin: 0;
    padding: 0;
    accent-color: var(--accent);
    box-shadow: none;
}

.alert {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 11px 13px;
    font-size: 13px;
}

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

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

/* Home */
.home-shell {
    display: grid;
    grid-template-rows: auto 1fr auto;
    width: min(1120px, 100%);
    min-height: 100vh;
    margin: 0 auto;
    padding: 0 28px;
}

.site-header,
.login-header,
.error-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

.home-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: min(760px, 100%);
    margin: 0 auto;
    padding: 32px 0 192px;
}

.home-intro {
    margin-bottom: 34px;
}

.home-intro h1 {
    margin: 7px 0 10px;
    font-size: clamp(48px, 8vw, 76px);
    line-height: 1;
    letter-spacing: 0;
}

.home-subtitle {
    max-width: 560px;
    margin: 0;
    color: var(--text-muted);
    font-size: 18px;
}

.shorten-form {
    display: grid;
    gap: 9px;
}

.input-command {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.input-command input {
    height: 52px;
    padding: 0 16px;
    font-size: 16px;
}

.input-command .primary-button {
    min-width: 112px;
    min-height: 52px;
}

.form-message {
    min-height: 22px;
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
}

.form-message.is-error {
    color: var(--danger);
}

.button-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 700ms linear infinite;
}

.primary-button.is-loading .button-label {
    display: none;
}

.primary-button.is-loading .button-spinner {
    display: block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.short-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 23px;
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 6px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    padding: 18px 18px 18px 20px;
}

.result-label {
    margin: 0 0 3px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 650;
}

#short-link {
    display: block;
    max-width: min(430px, 58vw);
    overflow: hidden;
    font-size: 17px;
    font-weight: 680;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 72px;
    border-top: 1px solid var(--border);
    color: var(--text-faint);
    font-size: 12px;
}

/* Login */
.login-page {
    display: grid;
    grid-template-rows: auto 1fr;
    min-height: 100vh;
    padding: 0 28px;
}

.login-header,
.error-header {
    width: min(1120px, 100%);
    margin: 0 auto;
}

.login-main {
    display: grid;
    place-items: center;
    padding: 48px 0 116px;
}

.login-panel {
    width: min(390px, 100%);
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    padding: 32px;
}

.login-heading {
    margin-bottom: 25px;
}

.login-heading h1 {
    margin: 6px 0 5px;
    font-size: 28px;
    line-height: 1.25;
}

.login-heading > p:last-child {
    margin: 0;
    color: var(--text-muted);
}

.login-form {
    display: grid;
    gap: 18px;
    margin-top: 18px;
}

.login-submit {
    width: 100%;
    margin-top: 3px;
}

/* Error */
.error-page {
    min-height: 100vh;
    padding: 0 28px;
}

.error-main {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: min(660px, 100%);
    margin: 0 auto;
    padding: 18vh 0 80px;
}

.error-code {
    margin: 0 0 3px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
}

.error-main h1 {
    margin: 0;
    font-size: clamp(34px, 7vw, 56px);
    line-height: 1.16;
}

.error-description {
    max-width: 570px;
    margin: 16px 0 27px;
    color: var(--text-muted);
    font-size: 16px;
}

.error-actions {
    display: flex;
    gap: 9px;
}

.error-path {
    max-width: 100%;
    margin: 32px 0 0;
    overflow-wrap: anywhere;
    color: var(--text-faint);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 12px;
}

/* Dashboard */
.dashboard-page {
    overflow: hidden;
}

.dashboard-shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    height: 100vh;
    transition: grid-template-columns 180ms ease;
}

.dashboard-shell.is-collapsed {
    grid-template-columns: var(--sidebar-collapsed) minmax(0, 1fr);
}

.sidebar {
    position: relative;
    z-index: 20;
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-right: 1px solid var(--border);
    background: var(--surface);
    overflow: hidden;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    flex: 0 0 72px;
    border-bottom: 1px solid var(--border);
    padding: 0 14px 0 18px;
}

.sidebar-brand {
    min-width: 0;
}

.sidebar-label {
    overflow: hidden;
    opacity: 1;
    white-space: nowrap;
    transition: opacity 100ms ease;
}

.sidebar-collapse {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    font-size: 24px;
}

.sidebar-nav {
    display: grid;
    gap: 4px;
    padding: 17px 11px;
}

.nav-item {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 43px;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    padding: 0 11px;
    font-size: 14px;
    font-weight: 620;
    text-align: left;
    white-space: nowrap;
    transition: color 140ms ease, background-color 140ms ease;
}

.nav-item:hover {
    background: var(--surface-strong);
    color: var(--text);
}

.nav-item.is-active {
    background: var(--accent-soft);
    color: var(--accent);
}

.nav-icon {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    margin-right: 9px;
    font-size: 18px;
    font-weight: 500;
}

.sidebar-footer {
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding: 11px;
}

.sidebar-footer form {
    margin: 0;
}

.logout-button:hover {
    background: var(--danger-soft);
    color: var(--danger);
}

.dashboard-shell.is-collapsed .sidebar-header {
    justify-content: center;
    padding: 0;
}

.dashboard-shell.is-collapsed .sidebar-brand {
    display: none;
}

.dashboard-shell.is-collapsed .sidebar-collapse {
    transform: rotate(180deg);
}

.dashboard-shell.is-collapsed .sidebar-label {
    width: 0;
    opacity: 0;
}

.dashboard-shell.is-collapsed .nav-item {
    justify-content: center;
    padding: 0;
}

.dashboard-shell.is-collapsed .nav-icon {
    margin: 0;
}

.sidebar-scrim {
    display: none;
}

.dashboard-main {
    min-width: 0;
    height: 100vh;
    overflow: auto;
}

.dashboard-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    padding: 10px 28px;
    backdrop-filter: blur(12px);
}

.header-leading,
.header-actions {
    display: flex;
    align-items: center;
}

.header-leading {
    gap: 13px;
}

.header-actions {
    gap: 3px;
}

.dashboard-header h1 {
    margin: 2px 0 0;
    font-size: 21px;
    line-height: 1.2;
}

.mobile-menu-button {
    display: none;
}

.dashboard-content {
    width: min(1380px, 100%);
    margin: 0 auto;
    padding: 27px 28px 48px;
}

.dashboard-view {
    animation: view-in 160ms ease-out;
}

@keyframes view-in {
    from { opacity: 0; transform: translateY(3px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 52px;
    margin-bottom: 15px;
}

.search-field {
    position: relative;
    width: min(480px, 100%);
}

.search-field > span {
    position: absolute;
    top: 50%;
    left: 13px;
    z-index: 1;
    color: var(--text-faint);
    font-size: 18px;
    pointer-events: none;
    transform: translateY(-50%);
}

.search-field input {
    padding-left: 39px;
}

.toolbar-meta {
    flex: 0 0 auto;
    color: var(--text-muted);
    font-size: 13px;
}

.toolbar-meta span {
    color: var(--text);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.data-surface {
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    text-align: left;
}

.links-table {
    min-width: 980px;
}

.links-table .col-short-code {
    width: 12%;
}

.links-table .col-creator-ip {
    width: 160px;
}

.links-table .col-created-at {
    width: 190px;
}

.links-table .col-status {
    width: 100px;
}

.links-table .col-actions,
.blacklist-table .col-actions {
    width: 90px;
}

.blacklist-table {
    min-width: 620px;
}

.blacklist-table .col-ban-time {
    width: 220px;
}

.data-table th {
    height: 43px;
    background: var(--surface-subtle);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 680;
    white-space: nowrap;
}

.data-table th,
.data-table td {
    border-bottom: 1px solid var(--border);
    padding: 10px 14px;
    vertical-align: middle;
}

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

.data-table tbody tr:hover td {
    background: var(--surface-subtle);
}

.data-table td {
    height: 59px;
    font-size: 13px;
}

.data-table th:first-child,
.data-table td:first-child {
    padding-left: 18px;
}

.data-table th:last-child,
.data-table td:last-child {
    padding-right: 18px;
}

.cell-actions {
    text-align: center;
}

.short-code {
    font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
    font-size: 13px;
    font-weight: 700;
}

.target-cell {
    max-width: 430px;
}

.target-link {
    display: block;
    overflow: hidden;
    color: var(--text-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.target-link:hover {
    color: var(--accent);
}

.mono-cell,
.date-cell {
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.mono-cell {
    font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: 68px;
    min-height: 25px;
    justify-content: center;
    border-radius: 999px;
    padding: 0 9px;
    background: var(--accent-soft);
    color: var(--success);
    font-size: 12px;
    font-weight: 670;
    white-space: nowrap;
}

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

.status-badge.is-disabled {
    background: var(--danger-soft);
    color: var(--danger);
}

.table-state {
    height: 180px !important;
    color: var(--text-muted);
    text-align: center;
}

.inline-form {
    display: flex;
    align-items: end;
    gap: 10px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 28px;
}

.inline-grow {
    width: min(420px, 100%);
}

.compact-toolbar {
    align-items: end;
}

.compact-toolbar h2,
.settings-heading h2 {
    margin: 0 0 3px;
    font-size: 18px;
}

.compact-toolbar p,
.settings-heading p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
}

.settings-layout {
    display: grid;
    grid-template-columns: minmax(190px, 0.7fr) minmax(320px, 1.3fr);
    gap: clamp(40px, 8vw, 110px);
    max-width: 880px;
    padding-top: 6px;
}

.settings-form {
    display: grid;
    gap: 18px;
}

.form-divider {
    height: 1px;
    margin: 3px 0;
    background: var(--border);
}

.settings-submit {
    width: max-content;
    margin-top: 4px;
}

.toast-region {
    position: fixed;
    z-index: 100;
    right: 22px;
    bottom: 22px;
    display: grid;
    gap: 9px;
    width: min(360px, calc(100vw - 32px));
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid var(--border-strong);
    border-radius: 7px;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    color: var(--text);
    padding: 12px 14px;
    font-size: 13px;
    pointer-events: auto;
    animation: toast-in 180ms ease-out;
}

.toast::before {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    margin-top: 6px;
    border-radius: 50%;
    background: var(--success);
    content: "";
}

.toast.is-error::before {
    background: var(--danger);
}

.toast.is-leaving {
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 160ms ease, transform 160ms ease;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 820px) {
    .dashboard-page {
        overflow: auto;
    }

    .dashboard-shell,
    .dashboard-shell.is-collapsed {
        display: block;
        height: auto;
        min-height: 100vh;
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(280px, calc(100vw - 48px));
        box-shadow: var(--shadow-lg);
        transform: translateX(-102%);
        transition: transform 180ms ease;
    }

    .dashboard-shell.is-mobile-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-header,
    .dashboard-shell.is-collapsed .sidebar-header {
        justify-content: space-between;
        padding: 0 14px 0 18px;
    }

    .dashboard-shell.is-collapsed .sidebar-brand {
        display: inline-flex;
    }

    .dashboard-shell.is-collapsed .sidebar-label {
        width: auto;
        opacity: 1;
    }

    .dashboard-shell.is-collapsed .sidebar-collapse {
        transform: none;
    }

    .dashboard-shell.is-collapsed .nav-item {
        justify-content: flex-start;
        padding: 0 11px;
    }

    .dashboard-shell.is-collapsed .nav-icon {
        margin-right: 9px;
    }

    .sidebar-collapse {
        display: none;
    }

    .sidebar-scrim {
        position: fixed;
        inset: 0;
        z-index: 15;
        display: block;
        background: rgba(0, 0, 0, 0.42);
        opacity: 0;
        pointer-events: none;
        transition: opacity 180ms ease;
    }

    .dashboard-shell.is-mobile-open .sidebar-scrim {
        opacity: 1;
        pointer-events: auto;
    }

    .dashboard-main {
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }

    .mobile-menu-button {
        display: inline-grid;
    }

    .dashboard-header {
        padding: 10px 18px;
    }

    .dashboard-content {
        padding: 22px 18px 42px;
    }

    .settings-layout {
        grid-template-columns: 1fr;
        gap: 27px;
    }
}

@media (max-width: 620px) {
    .home-shell,
    .login-page,
    .error-page {
        padding-right: 18px;
        padding-left: 18px;
    }

    .site-header,
    .login-header,
    .error-header {
        height: 66px;
    }

    .home-main {
        justify-content: flex-start;
        padding: 15vh 0 72px;
    }

    .home-intro {
        margin-bottom: 27px;
    }

    .home-intro h1 {
        font-size: 50px;
    }

    .home-subtitle {
        font-size: 16px;
    }

    .input-command {
        grid-template-columns: 1fr;
    }

    .short-result {
        align-items: stretch;
        flex-direction: column;
        gap: 15px;
    }

    #short-link {
        max-width: 100%;
    }

    .result-actions > * {
        flex: 1;
    }

    .site-footer span:nth-child(n+2) {
        display: none;
    }

    .login-main {
        place-items: start center;
        padding: 11vh 0 64px;
    }

    .login-panel {
        border: 0;
        background: transparent;
        box-shadow: none;
        padding: 0;
    }

    .error-main {
        padding-top: 16vh;
    }

    .section-toolbar,
    .compact-toolbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .search-field {
        width: 100%;
    }

    .inline-form {
        align-items: stretch;
        flex-direction: column;
    }

    .inline-grow,
    .inline-form .primary-button,
    .settings-submit {
        width: 100%;
    }

    .dashboard-header h1 {
        font-size: 18px;
    }

    .dashboard-kicker {
        display: none;
    }

    .dashboard-content {
        padding-right: 14px;
        padding-left: 14px;
    }

    .toast-region {
        right: 16px;
        bottom: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
