:root {
    --canvas: #f7f7f8;
    --surface: #ffffff;
    --surface-soft: #f1f0f3;
    --surface-warm: #f5f1f2;
    --text: #2e2c32;
    --text-strong: #222126;
    --muted: #747078;
    --faint: #97939b;
    --line: #e4e2e7;
    --line-strong: #d4d0d8;
    --accent: #7b6a9d;
    --accent-strong: #625281;
    --rose: #b97889;
    --sage: #6f8e82;
    --blue: #708ca7;
    --amber: #a98c51;
    --success: #5e8b73;
    --danger: #b76170;
    --shadow-sm: 0 1px 2px rgba(34, 31, 39, 0.04);
    --shadow-md: 0 12px 32px rgba(34, 31, 39, 0.06);
    --content: 1120px;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--canvas);
    font-family: "LXGW WenKai", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.7;
}

body.menu-open {
    overflow: hidden;
}

a {
    color: inherit;
}

button,
input,
textarea,
select {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

img {
    max-width: 100%;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(228, 226, 231, 0.9);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(18px);
}

.nav-shell {
    width: min(calc(100% - 40px), var(--content));
    min-height: 68px;
    display: flex;
    align-items: center;
    gap: 24px;
    margin: 0 auto;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    flex: 0 0 auto;
    color: var(--text-strong);
    text-decoration: none;
}

.brand-logo {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    object-fit: cover;
    box-shadow: var(--shadow-sm);
}

.brand-copy {
    display: grid;
    line-height: 1.2;
}

.brand-copy strong {
    font-size: 18px;
    font-weight: 700;
}

.brand-copy small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
}

.primary-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
}

.nav-link {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    padding: 7px 11px;
    border-bottom: 2px solid transparent;
    color: #68646c;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-strong);
    border-bottom-color: var(--accent);
}

.nav-donate {
    appearance: none;
    border-top: 0;
    border-right: 0;
    border-left: 0;
    background: transparent;
    font-family: inherit;
    cursor: pointer;
}

.nav-action {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-left: 8px;
    padding: 0 14px;
    border: 1px solid var(--line-strong);
    border-radius: 7px;
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
}

.nav-action:hover {
    border-color: #bbb3c6;
    background: #faf9fb;
}

.menu-toggle {
    width: 42px;
    height: 42px;
    display: none;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

.icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    stroke-width: 1.8;
}

.page-shell {
    min-height: calc(100vh - 68px);
}

.content-shell {
    width: min(calc(100% - 40px), var(--content));
    margin: 0 auto;
}

.hero {
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.hero-inner {
    width: min(calc(100% - 40px), 780px);
    margin: 0 auto;
    padding: 68px 0 64px;
    text-align: center;
}

.hero-mark {
    width: 76px;
    height: 76px;
    display: block;
    margin: 0 auto 22px;
    border: 1px solid var(--line);
    border-radius: 14px;
    object-fit: cover;
    box-shadow: var(--shadow-md);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 10px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
}

.hero h1 {
    margin: 0;
    color: var(--text-strong);
    font-size: 58px;
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: 0;
}

.hero-lead {
    max-width: 680px;
    margin: 18px auto 0;
    color: #625e66;
    font-size: 18px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 26px;
}

.button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 16px;
    border: 1px solid transparent;
    border-radius: 7px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.button-primary {
    background: var(--text-strong);
    color: var(--surface);
    box-shadow: var(--shadow-sm);
}

.button-primary:hover {
    background: #3b3740;
}

.button-secondary,
.button-outline,
.button-muted {
    border-color: var(--line-strong);
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}

.button-secondary:hover,
.button-outline:hover,
.button-muted:hover {
    border-color: #bbb5c0;
    background: #faf9fb;
}

.button-ink {
    background: var(--accent);
    color: var(--surface);
}

.button-ink:hover {
    background: var(--accent-strong);
}

.button:disabled {
    opacity: 0.48;
    cursor: not-allowed;
}

.section {
    padding: 68px 0;
}

.section-tight {
    padding: 44px 0;
}

.section-white {
    background: var(--surface);
}

.section-ink {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--surface-soft);
    color: var(--text);
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

.section-head h2,
.page-heading h1 {
    margin: 0;
    color: var(--text-strong);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0;
}

.section-head p,
.page-heading p {
    max-width: 680px;
    margin: 8px 0 0;
    color: var(--muted);
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--accent-strong);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.text-link:hover {
    color: var(--text-strong);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.resource-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-item {
    position: relative;
    min-height: 166px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.feature-item:hover {
    border-color: #cdc7d2;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.feature-icon,
.app-mark {
    display: grid;
    place-items: center;
    border-radius: 8px;
}

.feature-icon {
    width: 38px;
    height: 38px;
    margin-bottom: 15px;
}

.tone-coral {
    background: #f3e4e8;
    color: #945c6b;
}

.tone-green {
    background: #e3ece8;
    color: #57766a;
}

.tone-gold {
    background: #f2ead8;
    color: #806d42;
}

.tone-blue {
    background: #e3eaf0;
    color: #587086;
}

.feature-item h3 {
    margin: 0;
    color: var(--text-strong);
    font-size: 18px;
}

.feature-item p {
    min-height: 42px;
    display: -webkit-box;
    overflow: hidden;
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.feature-arrow {
    position: absolute;
    right: 17px;
    bottom: 15px;
    display: inline-flex;
    color: var(--accent);
    transition: transform 150ms ease;
}

.feature-item:hover .feature-arrow {
    transform: translateX(3px);
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.app-card {
    min-height: 190px;
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 18px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.app-card:hover {
    border-color: #cbc5cf;
    box-shadow: var(--shadow-md);
}

.app-card.compact {
    min-height: 176px;
}

.app-mark {
    width: 64px;
    height: 64px;
    overflow: hidden;
    background: transparent;
    box-shadow: 0 5px 14px rgba(43, 39, 48, 0.12);
}

.app-icon-image {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 14px;
    object-fit: cover;
}

.app-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 8px;
}

.tag {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 5px;
    background: var(--surface-soft);
    color: #656169;
    font-size: 12px;
    font-weight: 600;
}

.tag.release {
    background: #ece9f1;
    color: #685a7d;
}

.app-card h3 {
    margin: 0;
    color: var(--text-strong);
    font-size: 22px;
}

.app-card p {
    margin: 7px 0 15px;
    color: var(--muted);
    font-size: 14px;
}

.app-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.article-item {
    position: relative;
    min-height: 158px;
    padding: 17px 18px 17px 52px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.article-item:hover {
    border-color: #cbc5cf;
    box-shadow: var(--shadow-md);
}

.article-item .article-index {
    position: absolute;
    top: 18px;
    left: 17px;
    display: block;
    margin: 0;
    color: var(--accent);
    font-family: Georgia, serif;
    font-size: 17px;
}

.article-item h3 {
    margin: 6px 0 0;
    color: var(--text-strong);
    font-size: 18px;
}

.article-item p {
    display: -webkit-box;
    overflow: hidden;
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.article-item-original {
    border-top-color: #cfc6dc;
}

.article-category-nav {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

.article-category-nav a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border-radius: 6px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.article-category-nav a:hover {
    background: var(--surface);
    color: var(--text-strong);
    box-shadow: var(--shadow-sm);
}

.article-category-nav .icon {
    width: 16px;
    height: 16px;
}

.article-section {
    scroll-margin-top: 76px;
}

.article-section-head {
    align-items: center;
}

.article-count {
    color: var(--faint);
    font-size: 13px;
    white-space: nowrap;
}

.original-article-list {
    display: grid;
    gap: 14px;
}

.original-article-card {
    height: 280px;
    min-height: 240px;
    display: grid;
    grid-template-columns: minmax(260px, 38%) minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: inherit;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.original-article-card:hover {
    border-color: #cbc5cf;
    box-shadow: var(--shadow-md);
}

.original-article-cover {
    min-height: 0;
    display: block;
    overflow: hidden;
    background: #eef1ed;
}

.original-article-cover img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center 28%;
    transition: transform 220ms ease;
}

.original-article-card:hover .original-article-cover img {
    transform: scale(1.015);
}

.original-article-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 28px 32px;
}

.original-article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    color: var(--faint);
    font-size: 12px;
}

.original-article-body > strong {
    margin-top: 13px;
    color: var(--text-strong);
    font-size: 25px;
    line-height: 1.35;
}

.original-article-subtitle {
    margin-top: 5px;
    color: var(--accent-strong);
    font-size: 16px;
    font-weight: 600;
}

.original-article-description {
    max-width: 620px;
    margin-top: 12px;
    color: var(--muted);
    font-size: 14px;
}

.original-article-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 17px;
    color: var(--text-strong);
    font-size: 14px;
    font-weight: 600;
}

.original-article-link .icon {
    width: 16px;
    height: 16px;
}

.story-page {
    padding: 28px 20px 64px;
    background: #edf0ed;
}

.story-toolbar {
    width: min(100%, 677px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 auto 14px;
    color: #6f7471;
    font-size: 13px;
}

.story-toolbar a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #39433f;
    font-weight: 600;
    text-decoration: none;
}

.story-toolbar a:hover {
    color: var(--accent-strong);
}

.story-toolbar .icon {
    width: 16px;
    height: 16px;
}

.moji-article {
    border: 1px solid rgba(47, 91, 78, 0.12);
    border-radius: 10px;
    box-shadow: 0 18px 54px rgba(39, 55, 48, 0.08);
}

.resource-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.resource-link {
    min-height: 116px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}

.resource-link > .icon {
    color: var(--accent);
}

.resource-link h3 {
    margin: 8px 0 2px;
    color: var(--text-strong);
    font-size: 17px;
}

.resource-link p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.page-heading {
    background: var(--surface);
}

.page-heading > .content-shell {
    padding-top: 50px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--line);
}

.page-heading-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.page-heading-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 9px;
}

.tool-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 22px;
    align-items: start;
}

.tool-panel,
.side-panel,
.login-mode {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.tool-panel {
    padding: 26px;
}

.side-panel {
    padding: 22px;
    background: #f3f2f5;
}

.tool-panel h2,
.side-panel h2 {
    margin: 0 0 7px;
    color: var(--text-strong);
    font-size: 23px;
}

.tool-panel > p,
.side-panel > p {
    margin: 0 0 20px;
    color: var(--muted);
}

.side-panel .button {
    width: 100%;
}

.side-panel .button + .button {
    margin-top: 8px;
}

.form-row {
    display: flex;
    gap: 10px;
}

.form-row .button {
    white-space: nowrap;
}

.field {
    width: 100%;
    min-height: 46px;
    padding: 10px 13px;
    border: 1px solid var(--line-strong);
    border-radius: 7px;
    outline: none;
    background: var(--surface);
    color: var(--text);
    box-shadow: inset 0 1px 1px rgba(34, 31, 39, 0.02);
}

.field::placeholder {
    color: #a19da5;
}

.field:focus {
    border-color: #a89db7;
    box-shadow: 0 0 0 3px rgba(123, 106, 157, 0.12);
}

textarea.field {
    min-height: 138px;
    resize: vertical;
}

.field-label {
    display: block;
    margin: 0 0 7px;
    color: var(--text-strong);
    font-weight: 600;
}

.field-group + .field-group {
    margin-top: 18px;
}

.status-line {
    min-height: 27px;
    margin-top: 13px;
    color: var(--muted);
    font-size: 14px;
}

.status-line.error {
    color: var(--danger);
}

.status-line.success {
    color: var(--success);
}

.result-list {
    display: grid;
    gap: 8px;
    margin-top: 22px;
}

.result-row {
    min-height: 70px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 100px auto;
    gap: 14px;
    align-items: center;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
}

.result-name {
    min-width: 0;
    color: var(--text-strong);
    font-weight: 600;
    overflow-wrap: anywhere;
}

.result-size {
    color: var(--muted);
    font-size: 13px;
}

.empty-state {
    padding: 42px 20px;
    border: 1px dashed var(--line-strong);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.45);
    color: var(--muted);
    text-align: center;
}

.empty-state .icon {
    width: 32px;
    height: 32px;
    margin-bottom: 8px;
    color: var(--accent);
}

.account-state {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
}

.account-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface-soft);
}

.service-state {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 22px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    color: var(--muted);
    font-size: 14px;
}

.service-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    margin-top: 8px;
    border-radius: 50%;
    background: var(--amber);
    box-shadow: 0 0 0 4px rgba(169, 140, 81, 0.12);
}

.service-state.ready .service-dot,
.service-badge.ready .service-dot {
    background: var(--success);
    box-shadow: 0 0 0 4px rgba(94, 139, 115, 0.12);
}

.journey-list {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.journey-list li {
    display: flex;
    align-items: center;
    gap: 11px;
}

.journey-list li > span {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: var(--surface);
    color: var(--accent-strong);
    font-size: 13px;
    font-weight: 700;
}

.journey-list div {
    display: grid;
    line-height: 1.35;
}

.journey-list strong {
    color: var(--text-strong);
    font-size: 14px;
}

.journey-list small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.admin-page {
    min-height: 100vh;
    background: var(--canvas);
}

.admin-shell {
    width: min(calc(100% - 40px), 940px);
    margin: 0 auto;
    padding: 28px 0 64px;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 54px;
}

.private-label,
.service-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 13px;
}

.private-label .icon {
    width: 16px;
    height: 16px;
}

.admin-login-panel {
    width: min(100%, 430px);
    margin: 8vh auto 0;
    padding: 36px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-md);
}

.admin-panel-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    margin-bottom: 22px;
    border: 1px solid #ded8e6;
    border-radius: 8px;
    background: #f4f1f7;
    color: var(--accent-strong);
}

.admin-login-panel h1,
.admin-title-row h1 {
    margin: 4px 0 8px;
    color: var(--text-strong);
    font-size: 30px;
    line-height: 1.25;
}

.admin-login-panel > p,
.admin-title-row p {
    margin: 0;
    color: var(--muted);
}

.admin-login-form {
    margin-top: 26px;
}

.admin-login-form .button {
    width: 100%;
    margin-top: 18px;
}

.admin-console {
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.admin-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--line);
}

.service-badge {
    max-width: 320px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface-soft);
}

.admin-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 34px;
    padding-top: 30px;
}

.admin-account {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
}

.admin-account img {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface-soft);
}

.admin-account div {
    display: grid;
}

.admin-account small,
.admin-facts dt {
    color: var(--muted);
    font-size: 12px;
}

.admin-account strong {
    color: var(--text-strong);
    font-size: 17px;
}

.admin-facts {
    display: grid;
    gap: 0;
    margin: 0;
}

.admin-facts div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.admin-facts dd {
    margin: 0;
    color: var(--text-strong);
    text-align: right;
    overflow-wrap: anywhere;
}

.admin-error {
    margin: 18px 0 0;
    color: var(--danger);
    font-size: 13px;
}

.admin-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 26px;
}

.admin-actions form {
    margin: 0;
}

.admin-qr {
    text-align: center;
}

.qr-frame {
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.qr-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.admin-qr strong {
    display: block;
    margin-top: 14px;
    color: var(--text-strong);
}

.admin-qr p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.drop-zone {
    min-height: 210px;
    display: grid;
    place-items: center;
    padding: 28px;
    border: 1px dashed #c8c3cc;
    border-radius: 8px;
    background: #fbfbfc;
    cursor: pointer;
    text-align: center;
    transition: border-color 150ms ease, background-color 150ms ease;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: #9e92ad;
    background: #f4f1f6;
}

.drop-zone .icon {
    width: 38px;
    height: 38px;
    color: var(--accent);
}

.drop-zone strong {
    display: block;
    margin-top: 10px;
    color: var(--text-strong);
    font-size: 18px;
}

.drop-zone small {
    color: var(--muted);
}

.selected-files {
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.selected-files li {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
}

.resource-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.resource-table {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.resource-card {
    position: relative;
    display: grid;
    grid-template-rows: 156px minmax(72px, auto);
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.resource-preview {
    min-width: 0;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: #f1f0f3;
}

.resource-preview img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.resource-preview.has-image {
    padding: 8px;
    background: #ecebee;
}

.resource-preview.has-image img {
    box-sizing: border-box;
    border: 1px solid rgba(77, 69, 84, 0.12);
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(49, 43, 54, 0.08);
}

.resource-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 9px;
    color: var(--accent);
}

.resource-placeholder .icon {
    width: 34px;
    height: 34px;
}

.resource-placeholder span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.resource-card.is-folder .resource-placeholder {
    background: #f4f1f6;
}

.resource-card.is-folder {
    cursor: pointer;
    transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.resource-card.is-folder:hover {
    border-color: var(--line-strong);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.resource-card.is-folder:focus-within {
    border-color: var(--accent);
}

.resource-card-body {
    min-width: 0;
    padding: 14px 54px 14px 15px;
}

.resource-card-body .result-name {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.45;
}

.resource-card-body .resource-size {
    margin-top: 6px;
}

.resource-action {
    position: absolute;
    right: 12px;
    bottom: 13px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

.icon-button {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.icon-button:hover {
    border-color: var(--line-strong);
    background: #faf9fb;
}

.icon-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.notice {
    padding: 15px 17px;
    border: 1px solid #dfd9e5;
    border-left: 3px solid var(--accent);
    border-radius: 7px;
    background: #f4f1f6;
    color: #5f5767;
}

.legal-copy {
    max-width: 860px;
    counter-reset: legal;
}

.legal-copy section {
    position: relative;
    padding: 24px 0 24px 62px;
    border-bottom: 1px solid var(--line);
    counter-increment: legal;
}

.legal-copy section::before {
    content: "0" counter(legal);
    position: absolute;
    top: 22px;
    left: 0;
    color: var(--accent);
    font-family: Georgia, serif;
    font-size: 23px;
}

.legal-copy h2 {
    margin: 0 0 6px;
    color: var(--text-strong);
    font-size: 20px;
}

.legal-copy p {
    margin: 0;
    color: #5d5961;
}

.login-modes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.login-mode {
    padding: 24px;
}

.login-mode > .icon {
    width: 32px;
    height: 32px;
    color: var(--accent);
}

.login-mode h2 {
    margin: 18px 0 5px;
    color: var(--text-strong);
    font-size: 21px;
}

.login-mode p {
    min-height: 48px;
    color: var(--muted);
}

.qr-wrap {
    min-height: 228px;
    display: grid;
    place-items: center;
    margin-top: 16px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fbfbfc;
    color: var(--muted);
}

.qr-wrap img {
    width: 210px;
    height: 210px;
    object-fit: contain;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 20px;
    overflow-y: auto;
    background: rgba(35, 32, 40, 0.48);
    backdrop-filter: blur(5px);
}

.modal-panel {
    width: min(100%, 480px);
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 24px 70px rgba(30, 27, 34, 0.18);
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 13px;
}

.modal-head h2 {
    margin: 0;
    color: var(--text-strong);
    font-size: 21px;
}

.modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 17px;
}

.authorize-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: var(--canvas);
}

.authorize-panel {
    width: min(100%, 420px);
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    text-align: center;
    box-shadow: var(--shadow-md);
}

.authorize-logo {
    width: 54px;
    height: 54px;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.authorize-panel h1 {
    margin: 13px 0 7px;
    color: var(--text-strong);
    font-size: 27px;
}

.authorize-panel > p:not(.eyebrow) {
    margin: 0;
    color: var(--muted);
}

.authorize-qr {
    width: 238px;
    height: 238px;
    display: grid;
    place-items: center;
    margin: 22px auto 7px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
}

.authorize-qr img {
    width: 216px;
    height: 216px;
}

.authorize-panel .button {
    margin-top: 13px;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: var(--surface);
}

.footer-shell {
    width: min(calc(100% - 40px), var(--content));
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(190px, 0.5fr) minmax(190px, 0.55fr);
    gap: 48px;
    margin: 0 auto;
    padding: 38px 0;
}

.footer-brand p {
    max-width: 570px;
    color: var(--muted);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 18px;
}

.footer-links a {
    color: #6c6870;
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--text-strong);
}

.footer-profiles > strong {
    display: block;
    margin-bottom: 9px;
    color: var(--text-strong);
}

.profile-link-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 12px;
}

.profile-link-list a,
.support-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 0;
    background: transparent;
    color: #6c6870;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}

.profile-link-list .icon,
.support-link .icon {
    width: 16px;
    height: 16px;
}

.support-link {
    margin-top: 12px;
    padding: 0;
    color: var(--accent-strong);
}

.profile-band {
    display: grid;
    grid-template-columns: minmax(240px, 0.75fr) minmax(0, 1.25fr);
    gap: 48px;
    align-items: start;
}

.profile-band h2 {
    margin: 5px 0 8px;
    color: var(--text-strong);
    font-size: 30px;
    line-height: 1.3;
}

.profile-band > div > p:last-child {
    margin: 0;
    color: var(--muted);
}

.profile-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.profile-actions a,
.profile-actions button {
    min-width: 0;
    min-height: 68px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.profile-actions > * > .icon {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    color: var(--accent);
}

.profile-actions span {
    min-width: 0;
    display: grid;
    line-height: 1.35;
}

.profile-actions strong {
    color: var(--text-strong);
}

.profile-actions small {
    margin-top: 3px;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.donate-panel {
    width: min(calc(100% - 28px), 460px);
    max-height: calc(100vh - 40px);
    padding: 22px;
    overflow-y: auto;
}

.donate-panel .modal-head {
    align-items: flex-start;
    margin-bottom: 10px;
}

.donate-title {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
}

.donate-symbol {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #f4edf1;
    color: var(--rose);
}

.donate-symbol .icon {
    width: 19px;
    height: 19px;
}

.donate-panel .eyebrow {
    margin-bottom: 1px;
}

.donate-panel .modal-head h2 {
    font-size: 20px;
    line-height: 1.35;
}

.donate-panel .icon-button {
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
}

.donate-copy {
    margin: 0 0 15px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.donate-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.donate-grid figure {
    margin: 0;
    padding: 8px 8px 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #faf9fb;
    text-align: center;
}

.donate-grid img {
    width: min(100%, 164px);
    aspect-ratio: 0.7;
    display: block;
    margin: 0 auto;
    border-radius: 5px;
    object-fit: cover;
}

.donate-grid figcaption {
    display: grid;
    gap: 1px;
    margin-top: 7px;
    line-height: 1.35;
}

.donate-grid figcaption strong {
    color: var(--text);
    font-size: 13px;
}

.donate-grid figcaption span {
    color: var(--faint);
    font-size: 11px;
}

.donate-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 13px 0 0;
    color: var(--faint);
    font-size: 12px;
}

.donate-note .icon {
    width: 14px;
    height: 14px;
    color: var(--rose);
}

.footer-bottom {
    width: min(calc(100% - 40px), var(--content));
    margin: 0 auto;
    padding: 17px 0 22px;
    border-top: 1px solid var(--line);
    color: var(--faint);
    font-size: 13px;
}

@media (max-width: 1020px) {
    .menu-toggle {
        display: inline-grid;
        margin-left: auto;
    }

    .primary-nav {
        position: fixed;
        inset: 68px 0 auto;
        display: none;
        align-items: stretch;
        padding: 14px 20px 22px;
        border-bottom: 1px solid var(--line);
        background: rgba(255, 255, 255, 0.98);
        box-shadow: var(--shadow-md);
    }

    .primary-nav.open {
        display: grid;
    }

    .nav-link {
        min-height: 46px;
        border-bottom: 1px solid var(--line);
    }

    .nav-action {
        margin: 9px 0 0;
    }

    .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .resource-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .article-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tool-layout {
        grid-template-columns: 1fr;
    }

    .profile-band {
        grid-template-columns: 1fr;
        gap: 26px;
    }
}

@media (max-width: 720px) {
    .nav-shell,
    .content-shell,
    .hero-inner,
    .footer-shell,
    .footer-bottom {
        width: min(calc(100% - 28px), var(--content));
    }

    .nav-shell {
        min-height: 64px;
    }

    .primary-nav {
        inset: 64px 0 auto;
    }

    .brand-logo {
        width: 40px;
        height: 40px;
    }

    .brand-copy small {
        display: none;
    }

    .hero-inner {
        padding: 44px 0 42px;
    }

    .hero-mark {
        width: 66px;
        height: 66px;
        margin-bottom: 18px;
        border-radius: 12px;
    }

    .hero h1 {
        font-size: 42px;
    }

    .hero-lead {
        margin-top: 13px;
        font-size: 16px;
    }

    .hero-actions {
        margin-top: 21px;
    }

    .hero-actions .button {
        min-width: 140px;
        flex: 1 1 0;
    }

    .section {
        padding: 36px 0;
    }

    .section-tight {
        padding: 34px 0;
    }

    .page-heading > .content-shell {
        padding-top: 34px;
        padding-bottom: 24px;
    }

    .section-head,
    .page-heading-row,
    .resource-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-heading-actions {
        justify-content: flex-start;
    }

    .section-head h2,
    .page-heading h1 {
        font-size: 28px;
    }

    .app-grid,
    .login-modes,
    .footer-shell {
        grid-template-columns: 1fr;
    }

    .feature-grid,
    .resource-grid,
    .resource-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .article-grid {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .article-category-nav {
        width: 100%;
    }

    .article-category-nav a {
        flex: 1 1 0;
        justify-content: center;
    }

    .article-section-head {
        gap: 10px;
    }

    .original-article-card {
        height: auto;
        min-height: 0;
        grid-template-columns: 1fr;
    }

    .original-article-cover {
        aspect-ratio: 16 / 9;
    }

    .original-article-cover img {
        object-position: center 32%;
    }

    .original-article-body {
        padding: 18px 17px 20px;
    }

    .original-article-body > strong {
        margin-top: 11px;
        font-size: 21px;
    }

    .original-article-subtitle {
        font-size: 15px;
    }

    .original-article-description {
        margin-top: 9px;
        font-size: 13px;
    }

    .story-page {
        padding: 18px 0 0;
    }

    .story-toolbar {
        width: calc(100% - 28px);
        align-items: flex-start;
        margin-bottom: 12px;
    }

    .story-toolbar > span {
        max-width: none;
        font-size: 12px;
        text-align: right;
        white-space: nowrap;
    }

    .moji-article {
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .moji-article h1 {
        font-size: 29px !important;
    }

    .moji-article h2 {
        font-size: 25px !important;
    }

    .feature-item {
        min-height: 140px;
        padding: 14px;
    }

    .feature-icon {
        width: 34px;
        height: 34px;
        margin-bottom: 10px;
    }

    .feature-item h3 {
        font-size: 16px;
    }

    .feature-item p {
        min-height: 0;
        margin-top: 5px;
        font-size: 12px;
        line-height: 1.5;
    }

    .feature-arrow {
        right: 12px;
        bottom: 11px;
    }

    .resource-grid .feature-item {
        min-height: 102px;
    }

    .resource-grid .feature-item p,
    .resource-grid .feature-arrow {
        display: none;
    }

    .resource-link {
        min-height: 104px;
        padding: 13px;
    }

    .resource-link > .icon {
        width: 20px;
        height: 20px;
    }

    .resource-link h3 {
        margin-top: 7px;
        font-size: 16px;
    }

    .article-item {
        min-height: 0;
        padding: 13px 14px 13px 46px;
    }

    .article-item .article-index {
        top: 14px;
        left: 13px;
        font-size: 15px;
    }

    .article-item h3 {
        margin-top: 4px;
        font-size: 17px;
    }

    .article-item p {
        margin-top: 3px;
        -webkit-line-clamp: 1;
    }

    .resource-table {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .resource-card {
        grid-template-rows: 108px minmax(66px, auto);
    }

    .resource-card-body {
        padding: 10px 42px 10px 11px;
    }

    .resource-card-body .result-name {
        font-size: 13px;
        line-height: 1.35;
    }

    .resource-card-body .resource-size {
        margin-top: 4px;
        font-size: 11px;
    }

    .resource-action {
        right: 8px;
        bottom: 9px;
        width: 36px;
        height: 36px;
    }

    .app-card {
        grid-template-columns: 58px minmax(0, 1fr);
        gap: 15px;
        padding: 18px;
    }

    .app-mark {
        width: 56px;
        height: 56px;
    }

    .form-row {
        flex-direction: column;
    }

    .form-row .button {
        width: 100%;
    }

    .tool-panel,
    .side-panel,
    .login-mode {
        padding: 20px;
    }

    .admin-shell {
        width: min(calc(100% - 28px), 940px);
        padding-top: 18px;
    }

    .admin-header {
        margin-bottom: 28px;
    }

    .admin-console,
    .admin-login-panel {
        padding: 22px;
    }

    .admin-title-row,
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .admin-title-row {
        display: grid;
        gap: 18px;
    }

    .service-badge {
        max-width: none;
    }

    .admin-grid {
        gap: 26px;
    }

    .admin-qr {
        width: min(100%, 260px);
        margin: 0 auto;
    }

    .result-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .result-size {
        grid-row: 2;
        grid-column: 1;
    }

    .result-row .button {
        grid-row: 1 / span 2;
        grid-column: 2;
    }

    .legal-copy section {
        padding-left: 50px;
    }

    .footer-shell {
        gap: 26px;
    }

    .authorize-page {
        padding: 14px;
    }

    .authorize-panel {
        padding: 24px 18px;
    }
}

@media (max-width: 420px) {
    .hero-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .hero-actions .button {
        width: 100%;
        min-width: 0;
    }

    .hero-action-find {
        grid-column: 1 / -1;
    }

    .app-card {
        grid-template-columns: 50px minmax(0, 1fr);
        gap: 13px;
    }

    .app-mark {
        width: 48px;
        height: 48px;
    }

    .app-actions {
        gap: 10px;
    }

    .profile-actions {
        grid-template-columns: 1fr;
    }

    .donate-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .donate-panel {
        padding: 17px;
    }

    .donate-symbol {
        width: 36px;
        height: 36px;
    }

    .donate-panel .modal-head h2 {
        font-size: 18px;
    }

    .donate-copy {
        font-size: 13px;
    }

    .donate-grid figure {
        padding: 6px 6px 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
