:root {
    --brand-start: #dc5896;
    --brand-end: #f35f71;
    --brand-strong: #a52762;
    --brand-deep: #7d1e4b;
    --brand-soft: #fff0f6;
    --brand-soft-2: #fff7fa;
    --brand-gradient: linear-gradient(110deg, var(--brand-start), var(--brand-end));
    --text: #444;
    --text-strong: #252525;
    --text-muted: #6b6b6b;
    --text-soft: #858585;
    --surface: #fff;
    --surface-soft: #faf9fa;
    --page: #f7f7f8;
    --border: #e8e5e7;
    --border-strong: #d8d3d6;
    --success: #267a4c;
    --success-soft: #edf8f2;
    --danger: #b4233f;
    --danger-soft: #fff0f2;
    --warning: #98651a;
    --warning-soft: #fff8e8;
    --shadow-sm: 0 1px 2px rgba(50, 32, 41, .04);
    --shadow-md: 0 12px 34px rgba(77, 42, 58, .09);
    --shadow-lg: 0 24px 70px rgba(77, 42, 58, .16);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 18px;
    --container: 1240px;
    --header-height: 72px;
    --focus: 0 0 0 3px rgba(220, 88, 150, .24);
}

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

html {
    min-width: 320px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--page);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.nav-open,
body.filter-open {
    overflow: hidden;
}

button,
input,
select,
textarea {
    color: inherit;
    font: inherit;
}

button,
select {
    cursor: pointer;
}

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

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--brand-strong);
    outline-offset: 2px;
    box-shadow: var(--focus);
}

img,
svg {
    display: block;
}

img {
    max-width: 100%;
}

svg {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

a {
    color: inherit;
    text-decoration: none;
}

h1,
h2,
h3,
p,
dl,
dd,
fieldset,
pre {
    margin-top: 0;
}

h1,
h2,
h3 {
    color: var(--text-strong);
    line-height: 1.28;
}

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

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

.skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1000;
    padding: 10px 14px;
    color: #fff;
    background: var(--brand-deep);
    border-radius: var(--radius-sm);
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid rgba(232, 229, 231, .9);
    backdrop-filter: blur(12px);
}

.site-header::before {
    position: absolute;
    inset: 0 0 auto;
    height: 2px;
    content: "";
    background: var(--brand-gradient);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 100%;
    min-width: 0;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 16px;
}

.brand__logo {
    width: 174px;
    height: auto;
}

.brand__divider {
    width: 1px;
    height: 24px;
    background: var(--border-strong);
}

.brand__product {
    color: var(--text-strong);
    font-size: 16px;
    font-weight: 650;
    white-space: nowrap;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.site-nav__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    color: #555;
    border-radius: 9px;
    font-weight: 550;
    transition: color .18s ease, background-color .18s ease;
}

.site-nav__link:hover,
.site-nav__link.is-active {
    color: var(--brand-strong);
    background: var(--brand-soft-2);
}

.site-nav__link.is-active::after {
    position: absolute;
    right: 14px;
    bottom: 5px;
    left: 14px;
    height: 2px;
    content: "";
    background: var(--brand-gradient);
    border-radius: 2px;
}

.site-nav__cta {
    margin-left: 12px;
}

.admin-session {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-session__user {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 12px;
    gap: 8px;
    color: var(--text-strong);
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-weight: 650;
}

.admin-session__user svg {
    width: 18px;
    height: 18px;
    color: var(--brand-strong);
}

.admin-session form {
    margin: 0;
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    padding: 0;
    color: var(--text-strong);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.nav-toggle svg {
    width: 24px;
    height: 24px;
}

.site-main {
    min-height: calc(100dvh - var(--header-height) - 96px);
}

.page-alert-wrap {
    padding-top: 20px;
}

.page-alert {
    padding: 13px 16px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-weight: 600;
}

.page-alert--success {
    color: var(--success);
    background: var(--success-soft);
    border-color: rgba(38, 122, 76, .2);
}

.page-alert--error {
    color: var(--danger);
    background: var(--danger-soft);
    border-color: rgba(180, 35, 63, .2);
}

.site-footer {
    padding: 28px 0;
    color: var(--text-muted);
    background: #fff;
    border-top: 1px solid var(--border);
}

.site-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.site-footer p {
    margin: 0;
    font-size: 13px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-weight: 650;
    line-height: 1;
    white-space: nowrap;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background-color .16s ease;
}

.button svg {
    width: 18px;
    height: 18px;
}

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

.button:active {
    transform: translateY(0);
}

.button:disabled,
.button[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: .48;
    transform: none;
}

.button--primary {
    color: #44152f;
    background: var(--brand-gradient);
    border-color: rgba(165, 39, 98, .2);
    box-shadow: 0 7px 18px rgba(220, 88, 150, .2);
}

.button--primary:hover {
    box-shadow: 0 10px 24px rgba(220, 88, 150, .28);
}

.button--secondary {
    color: var(--text-strong);
    background: #fff;
    border-color: var(--border-strong);
}

.button--secondary:hover,
.button--ghost:hover {
    color: var(--brand-strong);
    background: var(--brand-soft-2);
    border-color: rgba(220, 88, 150, .42);
}

.button--ghost {
    color: var(--text-muted);
    background: transparent;
    border-color: transparent;
}

.button--small {
    min-height: 40px;
    padding-inline: 15px;
    font-size: 14px;
}

.button--large {
    min-height: 50px;
    padding-inline: 24px;
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    padding: 0;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 9px;
}

.icon-button:hover {
    color: var(--brand-strong);
    background: var(--brand-soft);
}

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

.icon-button--approve:hover {
    color: var(--success);
    background: var(--success-soft);
}

.icon-button svg {
    width: 20px;
    height: 20px;
}

.eyebrow {
    margin-bottom: 8px;
    color: var(--brand-strong);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.library-hero {
    position: relative;
    overflow: hidden;
    padding: 52px 0 48px;
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.library-hero::after {
    position: absolute;
    top: -220px;
    right: -130px;
    width: 500px;
    height: 500px;
    content: "";
    background: radial-gradient(circle, rgba(243, 95, 113, .14), rgba(220, 88, 150, .03) 52%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.library-hero__inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 56px;
}

.library-hero__copy {
    max-width: 680px;
}

.library-hero h1 {
    max-width: 640px;
    margin-bottom: 16px;
    font-size: clamp(30px, 4vw, 46px);
    letter-spacing: -.035em;
}

.library-hero__copy > p:last-child {
    max-width: 640px;
    margin-bottom: 0;
    color: var(--text-muted);
    font-size: 16px;
}

.library-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(90px, 1fr));
    min-width: 360px;
    margin: 0;
    padding: 18px 20px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.library-stats div {
    padding: 0 18px;
    text-align: center;
}

.library-stats div + div {
    border-left: 1px solid var(--border);
}

.library-stats dt {
    margin-bottom: 2px;
    color: var(--text-strong);
    font-size: 24px;
    font-weight: 750;
    line-height: 1.25;
}

.library-stats dd {
    color: var(--text-muted);
    font-size: 12px;
    white-space: nowrap;
}

.library-section {
    padding: 32px 0 64px;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(280px, 720px) auto auto;
    justify-content: center;
    gap: 12px;
    margin-bottom: 28px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 52px;
    background: #fff;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: border-color .18s ease, box-shadow .18s ease;
}

.search-box:focus-within {
    border-color: var(--brand-start);
    box-shadow: var(--focus);
}

.search-box > svg {
    flex: 0 0 auto;
    width: 21px;
    height: 21px;
    margin-left: 17px;
    color: var(--text-soft);
}

.search-box input {
    width: 100%;
    min-width: 0;
    height: 50px;
    padding: 0 14px;
    background: transparent;
    border: 0;
    outline: 0;
}

.search-box input:focus {
    box-shadow: none;
}

.search-box__clear {
    width: 42px;
    height: 42px;
    margin-right: 4px;
}

.search-panel__submit {
    min-width: 96px;
    min-height: 52px;
}

.filter-mobile-trigger {
    display: none;
    min-height: 52px;
}

.filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    color: #fff;
    background: var(--brand-strong);
    border-radius: 999px;
    font-size: 11px;
}

.library-layout {
    display: grid;
    grid-template-columns: 238px minmax(0, 1fr);
    align-items: start;
    gap: 28px;
}

.filter-backdrop {
    display: none;
}

.filter-panel {
    position: sticky;
    top: calc(var(--header-height) + 20px);
    padding: 22px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.filter-panel__mobile-head {
    display: none;
}

.filter-group {
    min-width: 0;
    padding: 0 0 20px;
    margin: 0 0 20px;
    border: 0;
    border-bottom: 1px solid var(--border);
}

.filter-group:last-of-type {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: 0;
}

.filter-group legend {
    width: 100%;
    padding: 0;
    margin-bottom: 10px;
    color: var(--text-strong);
    font-size: 14px;
    font-weight: 700;
}

.filter-group legend span {
    float: right;
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 500;
}

.filter-options {
    display: grid;
    gap: 2px;
}

.filter-options--scroll {
    max-height: 264px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.filter-choice {
    display: flex;
    align-items: center;
    min-height: 38px;
    padding: 5px 8px;
    gap: 9px;
    border-radius: 8px;
    cursor: pointer;
}

.filter-choice:hover {
    background: var(--brand-soft-2);
}

.filter-choice input {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    margin: 0;
    accent-color: var(--brand-strong);
}

.filter-choice span {
    min-width: 0;
    flex: 1;
}

.filter-choice small {
    color: var(--text-soft);
    font-size: 11px;
}

.filter-mini-search {
    display: flex;
    align-items: center;
    min-height: 38px;
    margin-bottom: 8px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.filter-mini-search svg {
    width: 16px;
    height: 16px;
    margin-left: 10px;
    color: var(--text-soft);
}

.filter-mini-search input {
    width: 100%;
    height: 36px;
    padding: 0 9px;
    background: transparent;
    border: 0;
    outline: 0;
    font-size: 13px;
}

.filter-panel__actions {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 8px;
    padding-top: 20px;
}

.library-results {
    min-width: 0;
}

.results-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    min-height: 50px;
    margin-bottom: 18px;
    gap: 20px;
}

.results-count {
    margin-bottom: 8px;
    color: var(--text-muted);
}

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

.active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 3px 8px 3px 10px;
    gap: 5px;
    color: var(--brand-deep);
    background: var(--brand-soft);
    border: 1px solid rgba(220, 88, 150, .22);
    border-radius: 999px;
    font-size: 12px;
}

.filter-chip svg {
    width: 15px;
    height: 15px;
}

.active-filters__clear {
    min-height: 30px;
    padding: 4px 7px;
    color: var(--text-muted);
    font-size: 12px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.sort-control {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 13px;
    white-space: nowrap;
}

.sort-control select {
    min-height: 42px;
    padding: 0 34px 0 12px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 9px;
}

.prompt-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.prompt-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 300px;
    padding: 22px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.prompt-card::before {
    position: absolute;
    top: -1px;
    right: 22px;
    left: 22px;
    height: 2px;
    content: "";
    background: var(--brand-gradient);
    border-radius: 0 0 3px 3px;
    opacity: 0;
    transition: opacity .2s ease;
}

.prompt-card:hover {
    transform: translateY(-3px);
    border-color: rgba(220, 88, 150, .32);
    box-shadow: var(--shadow-md);
}

.prompt-card:hover::before {
    opacity: 1;
}

.prompt-card__badges,
.prompt-card__tools,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.prompt-card__badges {
    min-height: 25px;
    margin-bottom: 14px;
}

.badge,
.tool-chip,
.tag-chip {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1.25;
}

.badge--category {
    color: var(--brand-deep);
    background: var(--brand-soft);
    border: 1px solid rgba(220, 88, 150, .16);
}

.badge--scene {
    color: #53505a;
    background: #f4f2f4;
    border: 1px solid #ebe7ea;
}

.tool-chip {
    color: #4f4850;
    background: #fff;
    border: 1px solid var(--border-strong);
}

a.tool-chip:hover,
a.tag-chip:hover {
    color: var(--brand-strong);
    border-color: rgba(220, 88, 150, .45);
}

.tag-chip {
    color: var(--text-muted);
    background: var(--surface-soft);
    border: 1px solid var(--border);
}

.prompt-card h2 {
    margin-bottom: 10px;
    font-size: 19px;
}

.prompt-card h2 a {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.prompt-card h2 a::after {
    position: absolute;
    inset: 0;
    content: "";
}

.prompt-card h2 a:focus-visible::after {
    outline: 2px solid var(--brand-strong);
    outline-offset: 3px;
    border-radius: var(--radius-lg);
}

.prompt-card__description {
    display: -webkit-box;
    min-height: 67px;
    margin-bottom: 16px;
    overflow: hidden;
    color: var(--text-muted);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.prompt-card__tools {
    position: relative;
    z-index: 1;
    margin-bottom: 10px;
}

.prompt-card .tag-list {
    position: relative;
    z-index: 1;
    margin-bottom: 20px;
}

.prompt-card__footer {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 16px;
    gap: 12px;
    border-top: 1px solid var(--border);
}

.prompt-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    color: var(--text-soft);
    font-size: 12px;
}

.text-link {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    gap: 3px;
    color: var(--brand-strong);
    font-size: 13px;
    font-weight: 650;
    white-space: nowrap;
}

.text-link svg {
    width: 16px;
    height: 16px;
    transition: transform .18s ease;
}

.text-link:hover svg {
    transform: translateX(2px);
}

.empty-state {
    padding: 72px 24px;
    text-align: center;
    background: #fff;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
}

.empty-state > svg {
    width: 62px;
    height: 62px;
    margin: 0 auto 20px;
    color: rgba(165, 39, 98, .55);
    stroke-width: 1.4;
}

.empty-state h2 {
    margin-bottom: 8px;
    font-size: 20px;
}

.empty-state p {
    max-width: 540px;
    margin: 0 auto 24px;
    color: var(--text-muted);
}

.empty-state__actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.empty-state--compact {
    padding-block: 48px;
    border: 0;
}

.pagination-wrap {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}

.pagination,
.pagination-wrap ul {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0;
    margin: 0;
    gap: 6px;
    list-style: none;
}

.pagination a,
.pagination span,
.pagination-wrap li > * {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    padding: 0 10px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.pagination .active span,
.pagination-wrap li.active > * {
    color: #44152f;
    background: var(--brand-gradient);
    border-color: transparent;
    font-weight: 700;
}

.breadcrumb {
    display: flex;
    align-items: center;
    min-height: 44px;
    margin: 24px 0 30px;
    gap: 6px;
    color: var(--text-muted);
    font-size: 13px;
}

.breadcrumb a:hover {
    color: var(--brand-strong);
}

.breadcrumb svg {
    width: 15px;
    height: 15px;
    color: var(--text-soft);
}

.breadcrumb span {
    overflow: hidden;
    color: var(--text-strong);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detail-page {
    padding-bottom: 72px;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: start;
    gap: 28px;
}

.detail-main {
    min-width: 0;
}

.detail-header {
    margin-bottom: 26px;
    padding: 30px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.detail-header h1 {
    margin-bottom: 14px;
    font-size: clamp(28px, 4vw, 40px);
    letter-spacing: -.025em;
}

.detail-header__description {
    margin-bottom: 22px;
    color: var(--text-muted);
    font-size: 16px;
}

.detail-header__taxonomy {
    display: grid;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.prompt-content-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.prompt-content-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border);
}

.prompt-content-card__header h2 {
    margin: 0;
    font-size: 20px;
}

.prompt-content-card__header .eyebrow {
    margin-bottom: 3px;
}

.copy-button.is-copied {
    color: #143e27;
    background: #8ee1b1;
    border-color: #69c993;
    box-shadow: 0 8px 20px rgba(38, 122, 76, .16);
}

.prompt-content,
.preview-content {
    margin: 0;
    overflow: auto;
    color: #343034;
    background: #fcfbfc;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", "Microsoft YaHei", monospace;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    tab-size: 4;
}

.prompt-content {
    min-height: 360px;
    max-height: 72vh;
    padding: 28px;
    font-size: 15px;
    line-height: 1.85;
}

.detail-aside {
    position: sticky;
    top: calc(var(--header-height) + 22px);
    display: grid;
    gap: 16px;
}

.info-card,
.detail-tip {
    padding: 22px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.info-card h2 {
    margin-bottom: 16px;
    font-size: 16px;
}

.info-list {
    margin: 0;
}

.info-list > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 11px 0;
    gap: 12px;
    border-top: 1px solid var(--border);
}

.info-list dt {
    color: var(--text-muted);
    font-size: 12px;
}

.info-list dd {
    margin: 0;
    color: var(--text-strong);
    text-align: right;
    font-size: 13px;
}

.detail-tip {
    display: flex;
    gap: 12px;
    background: var(--brand-soft-2);
    border-color: rgba(220, 88, 150, .2);
}

.detail-tip > svg {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    color: var(--brand-strong);
}

.detail-tip strong {
    color: var(--text-strong);
    font-size: 13px;
}

.detail-tip p {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 12px;
}

.related-section {
    margin-top: 28px;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 18px;
}

.section-heading h2 {
    margin: 0;
    font-size: 22px;
}

.related-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.related-card {
    display: grid;
    justify-items: start;
    padding: 18px;
    gap: 9px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.related-card:hover {
    border-color: rgba(220, 88, 150, .4);
    box-shadow: var(--shadow-sm);
}

.related-card > span:last-child {
    color: var(--text-soft);
    font-size: 12px;
}

.mobile-copy-bar {
    display: none;
}

.page-header {
    padding: 44px 0 28px;
}

.page-header h1 {
    margin-bottom: 10px;
    font-size: clamp(28px, 4vw, 38px);
    letter-spacing: -.025em;
}

.page-header p:last-child {
    margin-bottom: 0;
    color: var(--text-muted);
}

.page-header--form,
.page-header--actions {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
}

.page-header__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.publish-note {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 13px;
    gap: 8px;
    color: var(--success);
    background: var(--success-soft);
    border: 1px solid rgba(38, 122, 76, .16);
    border-radius: 10px;
    font-size: 13px;
}

.publish-note svg {
    width: 18px;
    height: 18px;
}

.publish-note--pending {
    color: var(--warning);
    background: var(--warning-soft);
    border-color: rgba(152, 101, 26, .2);
}

.auth-page {
    display: grid;
    min-height: calc(100dvh - var(--header-height) - 96px);
    place-items: center;
    padding-block: 52px;
}

.auth-card {
    width: min(100%, 480px);
    padding: 36px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.auth-card__mark {
    display: grid;
    width: 52px;
    height: 52px;
    margin-bottom: 20px;
    color: var(--brand-deep);
    background: var(--brand-soft);
    border: 1px solid rgba(220, 88, 150, .22);
    border-radius: 14px;
    place-items: center;
}

.auth-card__mark svg {
    width: 28px;
    height: 28px;
}

.auth-card h1 {
    margin-bottom: 10px;
    font-size: 30px;
}

.auth-card__description {
    margin-bottom: 24px;
    color: var(--text-muted);
}

.auth-card .form-error-summary {
    margin: 0 0 20px;
}

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

.auth-card__submit {
    width: 100%;
    margin-top: 4px;
}

.password-field {
    position: relative;
}

.password-field input {
    width: 100%;
    padding-right: 68px !important;
}

.password-field button {
    position: absolute;
    top: 1px;
    right: 1px;
    bottom: 1px;
    min-width: 58px;
    padding: 0 10px;
    color: var(--brand-deep);
    background: transparent;
    border: 0;
    border-left: 1px solid var(--border);
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    font-weight: 650;
}

.password-field button:hover {
    background: var(--brand-soft);
}

.auth-card__back {
    justify-content: center;
    width: 100%;
    margin-top: 20px;
}

.form-page {
    padding-bottom: 72px;
}

.form-page--narrow {
    width: min(calc(100% - 48px), 820px);
}

.editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: start;
    gap: 24px;
}

.editor-layout > * {
    min-width: 0;
}

.form-card,
.preview-card {
    min-width: 0;
    max-width: 100%;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.form-section {
    padding: 30px;
    border-bottom: 1px solid var(--border);
}

.form-section--first {
    border-top: 0;
}

.form-section__heading {
    display: flex;
    align-items: flex-start;
    margin-bottom: 24px;
    gap: 13px;
}

.form-section__heading > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    color: var(--brand-deep);
    background: var(--brand-soft);
    border: 1px solid rgba(220, 88, 150, .16);
    border-radius: 50%;
    font-size: 11px;
    font-weight: 750;
}

.form-section__heading h2 {
    margin: 0 0 3px;
    font-size: 18px;
}

.form-section__heading p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.field {
    min-width: 0;
}

.field--full {
    grid-column: 1 / -1;
}

.field + .field,
.fieldset + .fieldset,
.fieldset + .field {
    margin-top: 22px;
}

.form-grid .field + .field {
    margin-top: 0;
}

.field label,
.fieldset legend {
    display: block;
    padding: 0;
    margin-bottom: 8px;
    color: var(--text-strong);
    font-size: 14px;
    font-weight: 650;
}

.field label > span[aria-hidden],
.fieldset legend > span[aria-hidden] {
    color: var(--danger);
}

.field input[type="text"],
.field input[type="password"],
.field input[type="search"],
.field input[type="number"],
.field select,
.field textarea,
.manage-search select {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    color: var(--text-strong);
    background: #fff;
    border: 1px solid var(--border-strong);
    border-radius: 9px;
    outline: 0;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.field textarea {
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.manage-search select:focus {
    border-color: var(--brand-start);
    box-shadow: var(--focus);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"],
.field select[aria-invalid="true"] {
    border-color: var(--danger);
}

.input-dropdown {
    position: relative;
    min-width: 0;
}

.input-dropdown input[type="text"] {
    width: 100%;
    padding-right: 48px;
}

.input-dropdown > svg {
    position: absolute;
    top: 50%;
    right: 17px;
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    pointer-events: none;
    transform: translateY(-50%);
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.field-help,
.field-error {
    margin: 7px 0 0;
    font-size: 12px;
}

.field-help {
    color: var(--text-soft);
}

.field-error {
    color: var(--danger);
}

.fieldset {
    padding: 0;
    margin-inline: 0;
    border: 0;
}

.choice-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.choice-card {
    position: relative;
    display: flex !important;
    align-items: center;
    min-height: 44px;
    padding: 8px 11px;
    margin: 0 !important;
    gap: 8px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 9px;
    cursor: pointer;
    font-weight: 500 !important;
}

.choice-card span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.choice-card:hover {
    border-color: rgba(220, 88, 150, .4);
}

.choice-card:has(input:checked) {
    color: var(--brand-deep);
    background: var(--brand-soft);
    border-color: rgba(220, 88, 150, .5);
}

.choice-card input {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    margin: 0;
    accent-color: var(--brand-strong);
}

.multi-select {
    position: relative;
    min-width: 0;
}

.multi-select__control {
    display: none;
}

.multi-select.is-enhanced {
    z-index: 1;
}

.multi-select.is-enhanced.is-open {
    z-index: 60;
}

.multi-select.is-enhanced .multi-select__control {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    min-height: 50px;
    padding: 4px 5px 4px 10px;
    gap: 6px;
    background: #fff;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.multi-select.is-enhanced .multi-select__control:focus-within,
.multi-select.is-enhanced.is-open .multi-select__control {
    border-color: var(--brand-start);
    box-shadow: var(--focus);
}

.multi-select__tokens {
    display: contents;
}

.multi-select__token {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 38px;
    padding: 4px 7px 4px 11px;
    gap: 5px;
    color: var(--brand-deep);
    background: var(--brand-soft);
    border: 1px solid rgba(220, 88, 150, .25);
    border-radius: 999px;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.multi-select__token span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.multi-select__token svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 1.8;
}

.multi-select__token:hover,
.multi-select__token:focus-visible {
    color: #fff;
    background: var(--brand-deep);
    outline: none;
}

.field .multi-select__control input[type="search"] {
    width: auto;
    min-width: 210px;
    min-height: 42px;
    flex: 1 1 210px;
    padding: 6px 4px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.field .multi-select__control input[type="search"]::-webkit-search-cancel-button {
    cursor: pointer;
}

.multi-select__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    padding: 0;
    color: var(--text-soft);
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}

.multi-select__toggle:hover,
.multi-select__toggle:focus-visible {
    color: var(--brand-deep);
    background: var(--brand-soft);
    outline: none;
}

.multi-select__toggle svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    transition: transform .18s ease;
}

.multi-select.is-open .multi-select__toggle svg {
    transform: rotate(180deg);
}

.multi-select.is-enhanced .multi-select__panel {
    position: absolute;
    right: 0;
    left: 0;
    max-height: min(360px, 52vh);
    padding: 10px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    box-shadow: 0 18px 42px rgba(51, 27, 39, .15);
}

.multi-select__panel[hidden] {
    display: none !important;
}

.multi-select.is-enhanced .multi-select__options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.multi-select__option[hidden] {
    display: none !important;
}

.multi-select__option:focus-within {
    border-color: var(--brand-start);
    box-shadow: var(--focus);
}

.multi-select__empty {
    margin: 0;
    padding: 28px 16px;
    color: var(--text-soft);
    text-align: center;
}

.multi-select__summary {
    margin-top: 7px;
}

.multi-select__summary strong {
    color: var(--brand-deep);
}

.multi-select.is-enhanced .multi-select__nojs-help {
    display: none;
}

.multi-select > .field-error {
    margin-top: 7px;
}

.tag-input__control {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    min-height: 48px;
    padding: 5px;
    gap: 6px;
    background: #fff;
    border: 1px solid var(--border-strong);
    border-radius: 9px;
}

.tag-input__control:focus-within {
    border-color: var(--brand-start);
    box-shadow: var(--focus);
}

.tag-input__control input[type="text"] {
    width: auto;
    min-width: 190px;
    min-height: 36px;
    flex: 1;
    padding: 4px 8px;
    border: 0;
    box-shadow: none;
}

.tag-token {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 2px 4px 2px 10px;
    gap: 3px;
    color: var(--brand-deep);
    background: var(--brand-soft);
    border: 1px solid rgba(220, 88, 150, .22);
    border-radius: 999px;
    font-size: 12px;
}

.tag-token button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    color: inherit;
    background: transparent;
    border: 0;
    border-radius: 50%;
}

.tag-token button:hover {
    background: rgba(220, 88, 150, .14);
}

.tag-token svg {
    width: 15px;
    height: 15px;
}

.tag-options {
    display: flex;
    flex-wrap: wrap;
    max-height: 190px;
    margin-top: 12px;
    padding-right: 4px;
    overflow-y: auto;
    gap: 7px;
}

.tag-option {
    display: inline-flex !important;
    align-items: center;
    min-height: 36px;
    padding: 5px 10px;
    margin: 0 !important;
    gap: 6px;
    color: var(--text-muted) !important;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
    font-size: 12px !important;
    font-weight: 500 !important;
}

.tag-option:has(input:checked) {
    color: var(--brand-deep) !important;
    background: var(--brand-soft);
    border-color: rgba(220, 88, 150, .5);
}

.tag-option input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: var(--brand-strong);
}

.prompt-editor {
    min-height: 360px !important;
    font-family: "SFMono-Regular", Consolas, "Microsoft YaHei", monospace;
    line-height: 1.75;
    tab-size: 4;
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 22px 30px;
    gap: 10px;
}

.preview-card {
    position: sticky;
    top: calc(var(--header-height) + 22px);
    overflow: hidden;
}

.preview-card__header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.preview-card__header h2 {
    margin: 0;
    font-size: 17px;
    overflow-wrap: anywhere;
}

.preview-content {
    min-height: 360px;
    max-height: 66vh;
    padding: 20px;
    font-size: 13px;
    line-height: 1.75;
}

.form-error-summary {
    margin: 24px 30px 0;
    padding: 14px 16px;
    color: var(--danger);
    background: var(--danger-soft);
    border: 1px solid rgba(180, 35, 63, .2);
    border-radius: 10px;
}

.form-error-summary p {
    margin: 3px 0 0;
    font-size: 13px;
}

.manage-page {
    padding-bottom: 72px;
}

.manage-tabs {
    display: flex;
    align-items: center;
    margin-bottom: 18px;
    padding: 5px;
    overflow-x: auto;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 11px;
    scrollbar-width: none;
}

.manage-tabs::-webkit-scrollbar {
    display: none;
}

.manage-tabs a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 8px;
    white-space: nowrap;
}

.manage-tabs a:hover,
.manage-tabs a.is-active {
    color: var(--brand-deep);
    background: var(--brand-soft);
}

.manage-tabs a.is-active {
    font-weight: 700;
}

.manage-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.manage-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px;
    gap: 20px;
    border-bottom: 1px solid var(--border);
}

.manage-toolbar h2 {
    margin: 0 0 3px;
    font-size: 18px;
}

.manage-toolbar p {
    margin: 0;
    color: var(--text-muted);
    font-size: 12px;
}

.manage-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-box--small {
    width: 260px;
    min-height: 42px;
}

.search-box--small input {
    height: 40px;
    font-size: 13px;
}

.search-box--small > svg {
    width: 18px;
    height: 18px;
    margin-left: 12px;
}

.manage-search select {
    width: auto;
    min-height: 42px;
    padding: 7px 34px 7px 11px;
    font-size: 13px;
}

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

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th,
.data-table td {
    padding: 15px 16px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
}

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

.data-table tbody tr:hover {
    background: #fffafb;
}

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

.table-title {
    display: inline-block;
    max-width: 300px;
    color: var(--text-strong);
    font-weight: 650;
}

.table-title:hover {
    color: var(--brand-strong);
}

.table-tags {
    display: flex;
    flex-wrap: wrap;
    margin-top: 5px;
    gap: 4px;
}

.table-tags span {
    color: var(--text-soft);
    font-size: 11px;
}

.table-tags span + span::before {
    margin-right: 4px;
    content: "#";
}

.table-stack {
    display: grid;
    min-width: 130px;
    gap: 3px;
}

.table-stack small {
    color: var(--text-soft);
}

.data-table code {
    padding: 3px 6px;
    color: #5c4b54;
    background: #f5f2f4;
    border-radius: 5px;
}

.table-actions-heading {
    text-align: right !important;
}

.table-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1px;
}

.table-actions form {
    display: contents;
}

.table-actions .icon-button {
    width: 38px;
    height: 38px;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-size: 12px;
}

.status > span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

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

.status--success > span {
    background: var(--success);
}

.status--draft,
.status--pending {
    color: var(--warning);
}

.status--draft > span,
.status--pending > span {
    background: var(--warning);
}

.status--muted {
    color: var(--text-muted);
}

.status--muted > span {
    background: var(--text-soft);
}

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

.toast {
    display: flex;
    align-items: flex-start;
    padding: 13px 15px;
    gap: 10px;
    color: #fff;
    background: #3d3539;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 11px;
    box-shadow: var(--shadow-lg);
    animation: toast-in .2s ease-out;
}

.toast--error {
    background: #7b2335;
}

.toast svg {
    width: 19px;
    height: 19px;
    flex: 0 0 auto;
}

.toast p {
    margin: 0;
    font-size: 13px;
}

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

@media (max-width: 1120px) {
    .library-hero__inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 28px;
    }

    .library-stats {
        width: min(100%, 520px);
    }

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

    .editor-layout {
        grid-template-columns: minmax(0, 1fr) 300px;
    }
}

@media (max-width: 959px) {
    .container {
        width: min(calc(100% - 36px), var(--container));
    }

    .site-nav__cta {
        display: none;
    }

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

    .filter-mobile-trigger {
        display: inline-flex;
    }

    .library-layout {
        display: block;
    }

    .filter-backdrop {
        position: fixed;
        z-index: 199;
        inset: 0;
        display: block;
        visibility: hidden;
        background: rgba(35, 28, 32, .48);
        opacity: 0;
        transition: opacity .2s ease, visibility .2s ease;
    }

    .filter-panel {
        position: fixed;
        z-index: 200;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(420px, 92vw);
        padding: 0 22px 96px;
        overflow-y: auto;
        border: 0;
        border-radius: 18px 0 0 18px;
        box-shadow: var(--shadow-lg);
        transform: translateX(104%);
        transition: transform .24s ease-out;
    }

    .filter-open .filter-backdrop {
        visibility: visible;
        opacity: 1;
    }

    .filter-open .filter-panel {
        transform: translateX(0);
    }

    .filter-panel__mobile-head {
        position: sticky;
        z-index: 2;
        top: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin: 0 -22px 20px;
        padding: 18px 18px 14px 22px;
        background: rgba(255, 255, 255, .97);
        border-bottom: 1px solid var(--border);
    }

    .filter-panel__mobile-head p {
        margin: 0;
        color: var(--text-muted);
        font-size: 12px;
    }

    .filter-panel__mobile-head .filter-panel__title {
        color: var(--text-strong);
        font-size: 18px;
        font-weight: 700;
    }

    .filter-panel__actions {
        position: fixed;
        right: 0;
        bottom: 0;
        width: min(420px, 92vw);
        padding: 12px 18px max(12px, env(safe-area-inset-bottom));
        background: #fff;
        border-top: 1px solid var(--border);
    }

    .filter-options--scroll {
        max-height: none;
    }

    .detail-grid {
        grid-template-columns: minmax(0, 1fr) 240px;
    }

    .editor-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .preview-card {
        position: static;
    }

    .preview-content {
        max-height: 420px;
    }
}

@media (max-width: 767px) {
    :root {
        --header-height: 64px;
    }

    body {
        font-size: 15px;
    }

    .container,
    .form-page--narrow {
        width: min(calc(100% - 28px), var(--container));
    }

    .brand {
        gap: 10px;
    }

    .brand__logo {
        width: 142px;
    }

    .brand__divider,
    .brand__product {
        display: none;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .site-nav {
        position: fixed;
        z-index: 150;
        top: var(--header-height);
        right: 14px;
        left: 14px;
        display: grid;
        padding: 10px;
        visibility: hidden;
        background: #fff;
        border: 1px solid var(--border);
        border-radius: 14px;
        box-shadow: var(--shadow-lg);
        opacity: 0;
        transform: translateY(-8px);
        transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
    }

    .nav-open .site-nav {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
    }

    .site-nav__link {
        width: 100%;
        min-height: 48px;
    }

    .site-nav__link.is-active::after {
        top: 12px;
        right: auto;
        bottom: 12px;
        left: 4px;
        width: 3px;
        height: auto;
    }

    .admin-session {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .admin-session__user,
    .admin-session form,
    .admin-session .button {
        width: 100%;
    }

    .admin-session__user {
        justify-content: center;
        min-height: 48px;
    }

    .auth-page {
        padding-block: 28px;
    }

    .auth-card {
        padding: 26px 22px;
    }

    .site-footer__inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .library-hero {
        padding: 36px 0 32px;
    }

    .library-hero h1 {
        font-size: 30px;
    }

    .library-stats {
        min-width: 0;
        padding: 14px 8px;
    }

    .library-stats div {
        padding-inline: 8px;
    }

    .library-stats dt {
        font-size: 20px;
    }

    .library-stats dd {
        font-size: 10px;
    }

    .library-section {
        padding-top: 20px;
    }

    .search-panel {
        grid-template-columns: 1fr auto;
        gap: 8px;
    }

    .search-box {
        grid-column: 1 / -1;
        min-height: 50px;
    }

    .search-panel__submit,
    .filter-mobile-trigger {
        width: 100%;
        min-height: 46px;
    }

    .results-toolbar {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }

    .sort-control {
        justify-content: space-between;
    }

    .sort-control select {
        flex: 1;
    }

    .prompt-card {
        min-height: 0;
        padding: 19px;
    }

    .prompt-card__description {
        min-height: 0;
    }

    .prompt-card__footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .text-link {
        min-height: 40px;
    }

    .breadcrumb {
        margin: 14px 0 20px;
    }

    .detail-grid {
        display: block;
    }

    .detail-header {
        padding: 22px 19px;
    }

    .detail-header h1 {
        font-size: 28px;
    }

    .prompt-content-card__header {
        padding: 17px 18px;
    }

    .prompt-content-card__header .copy-button {
        display: none;
    }

    .prompt-content {
        min-height: 300px;
        max-height: none;
        padding: 21px 18px;
        font-size: 16px;
    }

    .detail-aside {
        position: static;
        margin-top: 18px;
    }

    .related-list {
        grid-template-columns: 1fr;
    }

    .mobile-copy-bar {
        position: fixed;
        z-index: 90;
        right: 0;
        bottom: 0;
        left: 0;
        display: block;
        padding: 10px 14px max(10px, env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, .97);
        border-top: 1px solid var(--border);
        backdrop-filter: blur(10px);
    }

    .mobile-copy-bar .button {
        width: 100%;
        min-height: 50px;
    }

    .detail-page {
        padding-bottom: 100px;
    }

    .page-header,
    .page-header--form,
    .page-header--actions {
        align-items: flex-start;
        flex-direction: column;
        padding: 30px 0 22px;
        gap: 16px;
    }

    .page-header__actions {
        width: 100%;
    }

    .page-header__actions .button {
        flex: 1;
    }

    .publish-note {
        width: 100%;
    }

    .form-section {
        padding: 22px 18px;
    }

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

    .form-grid .field + .field {
        margin-top: 0;
    }

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

    .multi-select.is-enhanced .multi-select__panel {
        position: static;
        max-height: 50vh;
        margin-top: 8px;
    }

    .multi-select.is-enhanced .multi-select__options {
        grid-template-columns: 1fr;
    }

    .field .multi-select__control input[type="search"] {
        min-width: 140px;
        min-height: 44px;
        flex-basis: 140px;
    }

    .multi-select__token {
        min-height: 40px;
    }

    .field input[type="text"],
    .field input[type="search"],
    .field input[type="number"],
    .field select,
    .field textarea {
        font-size: 16px;
    }

    .form-actions {
        padding: 17px 18px;
    }

    .form-actions .button {
        flex: 1;
    }

    .form-error-summary {
        margin: 18px 18px 0;
    }

    .manage-tabs {
        justify-content: flex-start;
    }

    .manage-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

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

    .search-box--small,
    .manage-search select {
        width: 100%;
    }

    .data-table,
    .data-table tbody,
    .data-table tr,
    .data-table td {
        display: block;
        width: 100%;
    }

    .data-table thead {
        display: none;
    }

    .data-table tbody {
        padding: 10px;
    }

    .data-table tbody tr {
        margin-bottom: 10px;
        padding: 10px 12px;
        background: #fff;
        border: 1px solid var(--border);
        border-radius: 11px;
    }

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

    .data-table td {
        display: grid;
        grid-template-columns: 92px minmax(0, 1fr);
        align-items: start;
        padding: 8px 0;
        gap: 10px;
        border: 0;
    }

    .data-table td::before {
        color: var(--text-soft);
        content: attr(data-label);
        font-size: 12px;
    }

    .data-table td:first-child {
        display: block;
        padding-bottom: 13px;
        border-bottom: 1px solid var(--border);
    }

    .data-table td:first-child::before {
        display: none;
    }

    .table-title {
        max-width: none;
        font-size: 15px;
    }

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

    .toast-region {
        right: 16px;
        bottom: 18px;
        left: 16px;
        width: auto;
    }

    .mobile-copy-bar + .toast-region {
        bottom: 82px;
    }
}

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

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}

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