.general-archive {
    --archive-accent: var(--accent-color, #0874e8);
    --archive-accent-bg: var(--btn-accent-bg, var(--archive-accent));
    --archive-accent-text: var(--btn-accent-text, #fff);
    --archive-text: var(--content-font-color, var(--text-primary, #20242a));
    --archive-bg: var(--container-bg-color, var(--bg-color, #f3f5f7));
    --archive-panel: var(--card-bg-color, var(--archive-bg));
    --archive-muted: color-mix(in srgb, var(--archive-text) 64%, var(--archive-panel));
    --archive-soft: color-mix(in srgb, var(--archive-text) 7%, var(--archive-panel));
    --archive-line: var(--card-border-color, var(--container-border-color, var(--border-light, rgba(37, 48, 62, .17))));
    --archive-form-bg: var(--form-bg-color, var(--archive-bg));
    --archive-form-line: var(--form-border-color, var(--archive-line));
    --archive-form-text: var(--form-text-color, var(--archive-text));
    --archive-button-bg: var(--btn-secondary-bg, var(--archive-panel));
    --archive-button-text: var(--btn-secondary-text, var(--archive-text));
    --archive-danger: var(--error-color, #d54b4b);
    --archive-success: var(--success-color, #3b9468);
    width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 clamp(12px, 2.5vw, 34px) 44px; color: var(--archive-text);
}
.general-archive *, .general-archive *::before, .general-archive *::after { box-sizing: border-box; }
.general-archive button, .general-archive input, .general-archive select, .general-archive textarea { color: inherit; font: inherit; }
.general-archive button { border: 0; }
.general-archive__header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 0 0 25px; }
.general-archive h1 { margin: 0; color: var(--archive-text); font-size: 1.5rem; font-weight: 800; letter-spacing: -.035em; line-height: 1.1; }
.general-archive__summary { margin: 10px 0 0; color: var(--archive-muted); font-size: .92em; }
.general-archive__summary strong { color: var(--archive-accent); }
.archive-btn { display: inline-flex; min-height: 39px; align-items: center; justify-content: center; padding: 8px 14px; border: 1px solid var(--archive-line) !important; border-radius: 5px; background: var(--archive-button-bg); color: var(--archive-button-text); font-size: .86em; font-weight: 700; line-height: 1; text-decoration: none; cursor: pointer; transition: border-color .18s, background .18s, color .18s; }
.archive-btn:hover, .archive-btn:focus-visible { border-color: var(--archive-accent) !important; color: var(--archive-accent); }
.archive-btn--primary { border-color: var(--archive-accent-bg) !important; background: var(--archive-accent-bg); color: var(--archive-accent-text); }
.archive-btn--primary:hover, .archive-btn--primary:focus-visible { background: transparent; color: var(--archive-accent); }
.archive-btn--danger:hover, .archive-btn--danger:focus-visible { border-color: var(--archive-danger) !important; color: var(--archive-danger); }
.archive-btn:disabled { opacity: .5; cursor: wait; }
.archive-add-btn { width: 39px; min-width: 39px; padding: 0; }
.archive-header-actions { display: flex; align-items: center; gap: 7px; }
.archive-reorder-btn, .archive-search-btn { width: 39px; min-width: 39px; padding: 0; }
.archive-reorder-btn svg, .archive-search-btn svg, .archive-add-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.archive-add-btn svg { stroke-width: 2.2; }
.archive-search-btn.is-active { border-color: var(--archive-accent-bg) !important; background: var(--archive-accent-bg); color: var(--archive-accent-text); }
.archive-reorder-btn[hidden] { display: none !important; }
.archive-reorder-btn:disabled, .archive-reorder-toolbar .archive-btn:disabled { cursor: not-allowed; }
.archive-reorder-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 23px 0 17px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--archive-accent) 48%, var(--archive-line)); border-radius: 5px; background: color-mix(in srgb, var(--archive-accent) 7%, var(--archive-panel)); }
.archive-reorder-toolbar[hidden] { display: none !important; }
.archive-reorder-toolbar p { margin: 0; color: var(--archive-muted); font-size: .86em; }
.archive-reorder-toolbar > div { display: flex; flex: 0 0 auto; gap: 7px; }
.general-archive.is-reordering .archive-library-controls, .general-archive.is-reordering .archive-search-state, .general-archive.is-reordering .archive-search-btn, .general-archive.is-reordering .archive-add-btn { display: none; }
.general-archive.is-reordering .archive-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 14px 11px; }
.general-archive.is-reordering .archive-grid__item, .general-archive.is-reordering .archive-card { cursor: grab; }
.general-archive.is-reordering .archive-grid__item.is-dragging, .general-archive.is-reordering .archive-grid__item.is-dragging .archive-card { cursor: grabbing; }
.general-archive.is-reordering .archive-drag-handle { opacity: 1; }
.general-archive.is-reordering .archive-card:hover { transform: none; }
.general-archive.is-reordering .archive-card__overlay { opacity: 1; transform: none; }
.general-archive.is-reordering .archive-card__cover > .archive-status { display: none; }
.archive-library-controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 23px 0 17px; }
.archive-category-filter { display: flex; min-width: 0; flex-wrap: wrap; gap: 8px; }
.archive-filter-chip { min-height: 31px; padding: 6px 14px; border: 1px solid var(--archive-line) !important; border-radius: 20px; background: transparent; color: var(--archive-muted); font-size: .85em; cursor: pointer; }
.archive-filter-chip:hover, .archive-filter-chip:focus-visible, .archive-filter-chip.is-active { border-color: var(--archive-accent-bg) !important; background: var(--archive-accent-bg); color: var(--archive-accent-text); }
.archive-sort { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 9px; color: var(--archive-muted); font-size: .82em; font-weight: 700; white-space: nowrap; }
.archive-sort select, .archive-field input[type="text"], .archive-field input[type="url"], .archive-field input[type="date"], .archive-field input[type="file"], .archive-field select, .archive-field textarea { width: 100%; min-height: 42px; border: 1px solid var(--archive-form-line); border-radius: 4px; background: var(--archive-form-bg); color: var(--archive-form-text); outline: 0; }
.archive-sort select { min-width: 150px; padding: 8px 32px 8px 11px; }
.archive-sort select:focus, .archive-field input:focus, .archive-field select:focus, .archive-field textarea:focus, .archive-tag-editor:focus-within { border-color: var(--archive-accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--archive-accent) 18%, transparent); }
.archive-search-state { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -4px 0 17px; padding: 9px 12px; border: 1px solid color-mix(in srgb, var(--archive-accent) 34%, var(--archive-line)); border-radius: 5px; background: color-mix(in srgb, var(--archive-accent) 6%, var(--archive-panel)); }
.archive-search-state[hidden] { display: none !important; }
.archive-search-state p { min-width: 0; margin: 0; overflow-wrap: anywhere; color: var(--archive-muted); font-size: .84em; }
.archive-search-state strong { color: var(--archive-text); }
.archive-search-state span { color: var(--archive-accent); font-weight: 800; }
.archive-search-state .archive-text-btn { flex: 0 0 auto; margin: 0; }
.archive-library { min-height: 240px; }
.general-archive.is-page-loading .archive-library, .general-archive.is-page-loading .archive-pagination { pointer-events: none; }
.archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: clamp(14px, 2vw, 24px) clamp(11px, 1.7vw, 19px); margin: 0; padding: 0; list-style: none; }
.archive-grid-empty { grid-column: 1 / -1; padding: 70px 12px; color: var(--archive-muted); text-align: center; }
.archive-grid__item { position: relative; min-width: 0; }
.archive-grid__item[draggable="true"] { cursor: grab; }
.archive-grid__item.is-dragging { z-index: 3; opacity: .38; cursor: grabbing; }
.archive-drag-handle { position: absolute; z-index: 3; top: 7px; left: 7px; display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid rgba(255,255,255,.38); border-radius: 4px; background: rgba(12,18,24,.72); color: #fff; font-size: 1.1em; opacity: 0; pointer-events: none; }
.archive-grid__item[draggable="true"]:hover .archive-drag-handle, .archive-grid__item[draggable="true"]:focus-within .archive-drag-handle { opacity: 1; }
.archive-card { display: block; width: 100%; padding: 0; border-radius: 3px; background: transparent; color: var(--archive-text); text-align: left; text-decoration: none; cursor: pointer; transition: transform .2s; }
.archive-card:hover, .archive-card:focus-visible { outline: 0; transform: translateY(-4px); }
.archive-card__cover { position: relative; display: grid; width: 100%; aspect-ratio: 2 / 3; place-items: center; overflow: hidden; border: 1px solid var(--archive-line); border-radius: 3px; background: linear-gradient(145deg, color-mix(in srgb, var(--archive-accent) 12%, var(--archive-panel)), var(--archive-bg)); box-shadow: none; isolation: isolate; }
.archive-card:hover .archive-card__cover { border-color: var(--archive-line); box-shadow: none; }
.archive-card:focus-visible .archive-card__cover { border-color: color-mix(in srgb, var(--archive-accent) 72%, var(--archive-line)); box-shadow: none; }
.archive-card__cover > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.archive-cover-empty { display: grid; width: 100%; height: 100%; place-items: center; color: var(--archive-muted); font-size: .72em; font-weight: 700; letter-spacing: .08em; }
.archive-cover-empty[hidden] { display: none !important; }
.archive-status { display: inline-flex; min-height: 25px; align-items: center; padding: 4px 8px; border: 1px solid rgba(255,255,255,.4); border-radius: 3px; background: rgba(24,29,35,.82); color: #fff; font-size: 11px; font-weight: 800; line-height: 1; white-space: nowrap; }
.archive-status--playing { background: var(--archive-accent-bg); color: var(--archive-accent-text); } .archive-status--completed { background: var(--archive-success); } .archive-status--dropped { background: var(--archive-danger); } .archive-status--unplayed { background: rgba(52,59,67,.86); }
.archive-card__cover > .archive-status { position: absolute; z-index: 3; top: 8px; right: 8px; opacity: 0; transform: translateY(-5px); transition: opacity .18s, transform .18s; }
.archive-card:hover .archive-card__cover > .archive-status, .archive-card:focus-visible .archive-card__cover > .archive-status { opacity: 1; transform: translateY(0); }
.archive-access-badge { position: absolute; z-index: 3; right: 8px; bottom: 8px; display: grid; width: 27px; height: 27px; place-items: center; border: 1px solid rgba(255,255,255,.4); border-radius: 50%; background: rgba(24,29,35,.82); color: #fff; font-size: 11px; }
.archive-access-badge--member { background: color-mix(in srgb, var(--archive-accent) 82%, #15191e); }
.archive-card__overlay { position: absolute; z-index: 2; inset: 0; display: flex; align-items: flex-end; padding: 48px 11px 12px; background: linear-gradient(to top, rgba(5,10,16,.68), rgba(5,10,16,.24) 52%, transparent); color: #fff; opacity: 0; transform: translateY(5px); transition: opacity .18s, transform .18s; }
.archive-card__overlay-title { display: -webkit-box; width: 100%; margin: 0 0 2px; overflow: hidden; color: #fff; font-size: 13px; font-weight: 800; line-height: 1.3; text-align: left; text-shadow: 0 1px 5px rgba(0,0,0,.75); overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.archive-card:hover .archive-card__overlay, .archive-card:focus-visible .archive-card__overlay { opacity: 1; transform: translateY(0); }
.archive-pagination { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 30px; }
.archive-pagination[hidden] { display: none !important; }
.archive-pagination__button { display: inline-flex; min-width: 34px; min-height: 34px; align-items: center; justify-content: center; padding: 6px 10px; border: 1px solid var(--archive-line) !important; border-radius: 4px; background: var(--archive-panel); color: var(--archive-muted); font-size: .82em; cursor: pointer; }
.archive-pagination__button:hover, .archive-pagination__button:focus-visible, .archive-pagination__button.is-current { border-color: var(--archive-accent-bg) !important; background: var(--archive-accent-bg); color: var(--archive-accent-text); outline: 0; }
.archive-pagination__button:disabled { opacity: .4; cursor: default; }
.archive-pagination__button:disabled:hover { border-color: var(--archive-line) !important; background: var(--archive-panel); color: var(--archive-muted); }
.archive-pagination__ellipsis { display: inline-grid; min-width: 22px; min-height: 34px; place-items: center; color: var(--archive-muted); }

body.archive-modal-open { overflow: hidden; }
.general-archive.is-editor-page > .general-archive__header,
.general-archive.is-editor-page > .archive-library-controls,
.general-archive.is-editor-page > .archive-reorder-toolbar,
.general-archive.is-editor-page > .archive-library,
.general-archive.is-editor-page > .archive-pagination { display: none !important; }
.archive-form-page[hidden] { display: none !important; }
.archive-form-page { display: block; width: 100%; }
.archive-modal[hidden] { display: none !important; }
.archive-modal { position: fixed; z-index: 10020; inset: 0; display: grid; padding: clamp(12px, 4vw, 48px); place-items: center; }
.archive-modal__backdrop { position: absolute; inset: 0; width: 100%; height: 100%; background: rgba(7,12,18,.78); cursor: default; backdrop-filter: none; }
.archive-modal__dialog { position: relative; z-index: 1; width: min(920px, 100%); max-height: calc(100vh - clamp(24px, 8vw, 96px)); max-height: calc(100dvh - clamp(24px, 8vw, 96px)); overflow: auto; overscroll-behavior: contain; border: 1px solid var(--archive-line); border-radius: 8px; background: var(--archive-panel); box-shadow: 0 28px 90px rgba(0,0,0,.38); opacity: 1; transform: none; transition: none; -webkit-overflow-scrolling: touch; }
.archive-modal.is-open .archive-modal__dialog { opacity: 1; transform: none; }
.archive-modal__close { position: absolute; z-index: 4; top: 10px; right: 10px; display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--archive-line) !important; border-radius: 50%; background: var(--archive-panel); color: var(--archive-muted); font-size: 1.65em; line-height: 1; cursor: pointer; }
.archive-modal__close:hover, .archive-modal__close:focus-visible { border-color: var(--archive-accent) !important; color: var(--archive-accent); }
.archive-search-dialog { width: min(420px, 100%); max-height: min(620px, calc(100vh - clamp(24px, 8vw, 96px))); max-height: min(620px, calc(100dvh - clamp(24px, 8vw, 96px))); }
.archive-search-dialog > .archive-modal__close { width: 30px; height: 30px; font-size: 1.25em; }
.archive-search-dialog h2 { margin: 0; padding: 17px 58px 15px 18px; border-bottom: 1px solid var(--archive-line); color: var(--archive-text); font-size: 1.05em; }
.archive-search-dialog form { padding: 18px; }
.archive-search-dialog form > label { display: block; margin-bottom: 8px; color: var(--archive-muted); font-size: .78em; font-weight: 700; }
.archive-search-field { display: grid; grid-template-columns: minmax(0, 1fr) 42px; overflow: hidden; border: 1px solid var(--archive-form-line); border-radius: 5px; background: var(--archive-form-bg); }
.archive-search-field:focus-within { border-color: var(--archive-accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--archive-accent) 18%, transparent); }
.archive-search-field input { width: 100%; min-width: 0; height: 42px; padding: 0 11px; border: 0; outline: 0; background: transparent; color: var(--archive-form-text); }
.archive-search-field button { display: grid; width: 42px; height: 42px; padding: 0; place-items: center; background: transparent; color: var(--archive-muted); cursor: pointer; }
.archive-search-field button:hover, .archive-search-field button:focus-visible { background: var(--archive-accent-bg); color: var(--archive-accent-text); outline: 0; }
.archive-search-field svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.archive-search-tags { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--archive-line); }
.archive-search-tags h3 { margin: 0 0 10px; color: var(--archive-text); font-size: .84em; }
.archive-search-tag-list { display: flex; flex-wrap: wrap; gap: 7px; }
.archive-search-tag { display: inline-flex; min-height: 29px; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid var(--archive-line) !important; border-radius: 999px; background: var(--archive-soft); color: var(--archive-muted); font-size: .76em; cursor: pointer; }
.archive-search-tag:hover, .archive-search-tag:focus-visible, .archive-search-tag.is-active { border-color: var(--archive-accent-bg) !important; background: var(--archive-accent-bg); color: var(--archive-accent-text); outline: 0; }
.archive-search-tag small { display: inline-grid; min-width: 18px; height: 18px; padding: 0 4px; place-items: center; border-radius: 999px; background: color-mix(in srgb, currentColor 12%, transparent); font-size: .84em; font-weight: 800; }
.archive-search-tag-empty { margin: 0; color: var(--archive-muted); font-size: .76em; }
.archive-detail__fixed-close { display: none; }
.archive-detail { display: grid; grid-template-columns: minmax(230px, 37%) minmax(0, 1fr); aspect-ratio: 920 / 510; align-items: stretch; overflow: hidden; }
.archive-detail__media { min-width: 0; }
.archive-detail__cover { position: relative; display: grid; width: 100%; height: 100%; min-height: 0; place-items: center; overflow: hidden; background: linear-gradient(145deg, color-mix(in srgb, var(--archive-accent) 15%, var(--archive-panel)), var(--archive-bg)); }
.archive-detail__cover > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.archive-detail__identity { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; }
.archive-detail__identity--mobile { display: none; width: 100%; }
.archive-detail__content { position: relative; display: flex; min-width: 0; min-height: 0; height: 100%; flex-direction: column; align-items: flex-start; padding: 24px clamp(24px, 5vw, 54px) 34px; overflow-x: hidden; overflow-y: auto; }
.archive-detail__actions { position: absolute; z-index: 3; top: 12px; right: clamp(24px, 5vw, 54px); display: flex; gap: 6px; margin: 0; }
.archive-detail__actions .archive-btn { min-height: 31px; padding: 5px 10px; font-size: .76em; }
.archive-detail__meta-row { display: flex; width: 100%; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 13px; }
.archive-thread-count { display: inline-flex; min-width: max-content; align-items: center; gap: 3px; margin-left: auto; color: var(--archive-muted); font-size: 11px; font-weight: 700; line-height: 1; }
.archive-thread-count[hidden] { display: none !important; }
.archive-thread-count svg { display: block; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.archive-detail h2 { width: 100%; margin: 0; overflow-wrap: anywhere; color: var(--archive-text); font-size: clamp(1.65em, 3.6vw, 3em); letter-spacing: -.04em; line-height: 1.16; }
.archive-detail h1 { width: 100%; margin: 0; overflow-wrap: anywhere; color: var(--archive-text); font-size: clamp(1.65em, 3.6vw, 3em); letter-spacing: -.04em; line-height: 1.16; }
.archive-detail__tags { display: flex; width: 100%; flex-wrap: wrap; gap: 5px; margin: 16px 0 17px; }
.archive-tag { display: inline-flex; min-height: 0; align-items: center; padding: 4px 7px; border: 1px solid var(--archive-line); border-radius: 999px; background: var(--archive-soft); color: var(--archive-muted); font-size: 10px; line-height: 1.2; white-space: nowrap; }
.archive-tag--category { border-color: color-mix(in srgb, var(--archive-accent) 34%, var(--archive-line)); background: color-mix(in srgb, var(--archive-accent) 10%, var(--archive-panel)); color: var(--archive-accent); font-weight: 700; }
.archive-detail__reference-date { display: flex; align-items: center; gap: 7px; margin: 0; color: var(--archive-muted); font-size: .76em; line-height: 1.4; }
.archive-detail__reference-date[hidden] { display: none !important; }
.archive-detail__reference-date span { font-weight: 700; }
.archive-detail__reference-date time { font-variant-numeric: tabular-nums; }
.archive-detail__summary { width: 100%; margin: 0; color: var(--archive-text); font-size: .98em; line-height: 1.85; overflow-wrap: anywhere; white-space: normal; }
.archive-detail__summary > .ra0-content { width: 100%; color: inherit; font: inherit; line-height: inherit; }
.archive-detail__summary strong { font-weight: 800; }
.archive-detail__summary em { font-style: italic; }
.archive-detail__summary s { color: var(--archive-muted); }
.archive-detail__summary code { padding: 2px 5px; border: 1px solid var(--archive-line); border-radius: 3px; background: var(--archive-soft); color: var(--archive-accent); font-family: var(--code-font-family, monospace); font-size: .9em; }
.archive-detail__summary .archive-markdown-divider { display: block; width: 100%; height: 1px; margin: 14px 0; border: 0; background: repeating-linear-gradient(to right, color-mix(in srgb, var(--archive-muted) 70%, transparent) 0 8px, transparent 8px 12px); }
.archive-detail__summary .archive-markdown-check { display: inline-block; min-width: 1.2em; color: var(--archive-muted); font-weight: 700; }
.archive-detail__summary .archive-markdown-check.is-checked { color: var(--archive-accent); }
.archive-detail__summary .ra0_embed { margin: 14px 0; }
.archive-fold { width: 100%; margin: 14px 0; }
.archive-detail__summary > .archive-fold:first-child { margin-top: 0; }
.archive-fold > summary { display: flex; min-height: 50px; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 2px; color: var(--archive-text); font-size: clamp(1.3em, 2vw, 1.65em); font-weight: 800; letter-spacing: -.025em; line-height: 1.3; list-style: none; cursor: pointer; }
.archive-fold > summary::-webkit-details-marker { display: none; }
.archive-fold > summary:hover, .archive-fold > summary:focus-visible { color: var(--archive-accent); outline: 0; }
.archive-fold__title { min-width: 0; overflow-wrap: anywhere; }
.archive-fold__indicator { position: relative; display: grid; width: 24px; height: 24px; flex: 0 0 24px; place-items: center; border: 1px solid var(--archive-line); border-radius: 50%; color: var(--archive-muted); }
.archive-fold__indicator::before, .archive-fold__indicator::after { content: ""; position: absolute; top: 50%; left: 50%; width: 9px; height: 1px; border-radius: 999px; background: currentColor; transform: translate(-50%, -50%); }
.archive-fold__indicator::after { transform: translate(-50%, -50%) rotate(90deg); }
.archive-fold[open] .archive-fold__indicator::after { display: none; }
.archive-fold__body { padding: 5px 4px 17px 0; }
.archive-inline-image { display: block; width: fit-content; max-width: 100%; margin: 14px auto; }
.archive-inline-image--left { margin-right: auto; margin-left: 0; }
.archive-inline-image--right { margin-right: 0; margin-left: auto; }
.archive-inline-image__button { display: block; width: fit-content; max-width: 100%; margin: 0; padding: 0; overflow: hidden; border: 1px solid var(--archive-line) !important; border-radius: 5px; background: var(--archive-soft); cursor: zoom-in; }
.archive-inline-image__button:hover { border-color: var(--archive-line) !important; }
.archive-inline-image__button:focus-visible { border-color: var(--archive-accent) !important; outline: 0; }
.archive-inline-image__button img { display: block; width: auto; max-width: 100%; max-height: 72vh; margin: 0 auto; object-fit: contain; transition: opacity .15s; }
.archive-inline-image__button--sized, .archive-inline-image__button--sized img { width: 100%; }
.archive-inline-image__button:hover img, .archive-inline-image__button:focus-visible img { opacity: .88; }
.archive-inline-image__caption { display: block; margin-top: 7px; color: var(--archive-muted); font-size: 12px; line-height: 1.5; text-align: center; overflow-wrap: anywhere; }
.archive-detail__gallery { display: grid; width: 100%; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin: 0 0 20px; }
.archive-detail__gallery:empty { display: none; }
.archive-detail__gallery-item { position: relative; width: 100%; aspect-ratio: 4 / 3; padding: 0; overflow: hidden; border: 1px solid var(--archive-line) !important; border-radius: 5px; background: var(--archive-soft); cursor: zoom-in; }
.archive-detail__gallery-item:hover { border-color: var(--archive-line) !important; }
.archive-detail__gallery-item:focus-visible { border-color: var(--archive-accent) !important; outline: 0; }
.archive-detail__gallery-item img { display: block; width: 100%; height: 100%; object-fit: cover; transition: opacity .15s; }
.archive-detail__gallery-item:hover img, .archive-detail__gallery-item:focus-visible img { opacity: .88; }
.archive-detail__gallery--count-1 { display: block; }
.archive-detail__gallery--count-1 .archive-detail__gallery-item { display: block; width: 100%; aspect-ratio: auto; max-height: 440px; }
.archive-detail__gallery--count-1 .archive-detail__gallery-item img { width: 100%; height: auto; max-height: 440px; object-position: center top; }
.archive-detail__gallery--count-2, .archive-detail__gallery--count-3, .archive-detail__gallery--count-4, .archive-detail__gallery--many { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.archive-detail__gallery--count-2 .archive-detail__gallery-item { height: 170px; aspect-ratio: auto; }
.archive-detail__gallery--count-3 .archive-detail__gallery-item:first-child { height: 190px; grid-column: 1 / -1; aspect-ratio: auto; }
.archive-detail__gallery--count-3 .archive-detail__gallery-item:not(:first-child) { height: 120px; aspect-ratio: auto; }
.archive-detail__gallery--count-4 .archive-detail__gallery-item, .archive-detail__gallery--many .archive-detail__gallery-item { height: 140px; aspect-ratio: auto; }

.archive-view-page { max-width: 1100px; }
.archive-view-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.archive-view-toolbar > div { display: flex; align-items: center; gap: 7px; }
.archive-view-toolbar .archive-btn { min-height: 34px; padding: 5px 12px; font-size: .8em; }
.archive-detail--page { width: 100%; min-height: 0; grid-template-columns: minmax(230px, 30%) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); aspect-ratio: 920 / 670; align-items: stretch; overflow: hidden; border: 1px solid var(--archive-line); border-radius: 8px; background: var(--archive-panel); }
.archive-detail--page .archive-detail__media { display: flex; min-width: 0; min-height: 0; height: 100%; flex-direction: column; overflow: hidden; }
.archive-detail--page .archive-detail__cover { width: 100%; height: auto; min-height: 0; flex: 0 0 auto; aspect-ratio: 2 / 3; margin: 0; }
.archive-detail--page .archive-detail__identity--desktop { flex: 0 0 auto; padding: 18px 20px 22px; }
.archive-detail--page .archive-detail__identity h1 { font-size: clamp(1.4em, 2.2vw, 2em); line-height: 1.22; }
.archive-detail--page .archive-detail__identity .archive-detail__meta-row { margin-bottom: 11px; }
.archive-detail--page .archive-detail__identity .archive-detail__tags { margin: 13px 0 0; }
.archive-detail--page .archive-detail__content { min-height: 0; height: 100%; padding-top: 20px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--archive-line) transparent; }
.archive-detail--page .archive-detail__content::-webkit-scrollbar { width: 7px; }
.archive-detail--page .archive-detail__content::-webkit-scrollbar-thumb { border-radius: 999px; background: var(--archive-line); }
@media (min-width: 761px) {
    .archive-detail--page .archive-detail__content { padding-right: clamp(20px, 3vw, 34px); padding-left: clamp(20px, 3vw, 34px); }
}
@media (min-width: 761px) and (max-width: 900px) {
    .archive-detail--page { aspect-ratio: 920 / 740; }
}

.archive-image-viewer[hidden] { display: none !important; }
.archive-image-viewer { --archive-viewer-drag-y: 0px; --archive-viewer-drag-scale: 1; --archive-viewer-backdrop-opacity: 1; --archive-viewer-image-scale: 1; --archive-viewer-image-x: 0px; --archive-viewer-image-y: 0px; position: fixed; z-index: 10040; inset: 0; display: grid; place-items: center; touch-action: pan-y; }
.archive-image-viewer__backdrop { position: absolute; inset: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, .88); cursor: pointer; }
.archive-image-viewer__dialog { position: relative; z-index: 1; display: grid; max-width: 90vw; max-height: 88vh; place-items: center; opacity: 0; transform: scale(.98); transition: opacity .18s, transform .18s; }
.archive-image-viewer.is-open .archive-image-viewer__dialog { opacity: 1; transform: scale(1); }
.archive-image-viewer.is-dragging .archive-image-viewer__dialog, .archive-image-viewer.is-dragging .archive-image-viewer__backdrop { transition: none; }
.archive-image-viewer.is-dismissing { pointer-events: none; }
.archive-image-viewer.is-fading-out { opacity: 0; transition: opacity .22s ease-out; }
.archive-image-viewer.is-fading-out > * { pointer-events: none; }
.archive-image-viewer__dialog > img { display: block; max-width: 90vw; max-height: 88vh; border-radius: 8px; box-shadow: 0 8px 40px rgba(0,0,0,.5); object-fit: contain; user-select: none; -webkit-user-drag: none; }
.archive-image-viewer__nav[hidden], .archive-image-viewer__count[hidden] { display: none !important; }
.archive-image-viewer__close, .archive-image-viewer__nav { position: absolute; z-index: 3; display: flex; align-items: center; justify-content: center; padding: 0; border: 0 !important; border-radius: 50%; background: rgba(255,255,255,.15); color: #fff !important; cursor: pointer; transition: background .15s; }
.archive-image-viewer__close:hover, .archive-image-viewer__close:focus-visible, .archive-image-viewer__nav:hover, .archive-image-viewer__nav:focus-visible { background: rgba(255,255,255,.3); outline: 0; }
.archive-image-viewer__close { top: 16px; right: 20px; width: 40px; height: 40px; font-size: 1.4em; }
.archive-image-viewer__nav { top: 50%; width: 44px; height: 44px; font-size: 1.2em; transform: translateY(-50%); }
.archive-image-viewer__nav--prev { left: 16px; }
.archive-image-viewer__nav--next { right: 16px; }
.archive-image-viewer__count { position: absolute; z-index: 3; bottom: 20px; left: 50%; padding: 3px 12px; border-radius: 20px; background: rgba(0,0,0,.4); color: rgba(255,255,255,.7); font-size: .9em; line-height: 1; pointer-events: none; transform: translateX(-50%); }

.archive-editor { position: relative; width: 100%; padding: clamp(25px, 4vw, 46px); border: 1px solid var(--archive-line); border-radius: 8px; background: color-mix(in srgb, var(--archive-panel) 92%, var(--archive-muted) 8%); }
.archive-editor [data-editor-title] { margin: 0 0 28px; color: var(--archive-text); font-size: clamp(1.5em, 3vw, 2.2em); letter-spacing: -.035em; }
.archive-editor__grid { display: grid; grid-template-columns: minmax(190px, 28%) minmax(0, 1fr); gap: clamp(22px, 4vw, 42px); }
.archive-cover-editor, .archive-editor__fields { display: flex; min-width: 0; flex-direction: column; gap: 16px; }
.archive-field-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.archive-field-row .archive-field { min-width: 0; }
.archive-cover-preview { position: relative; display: grid; width: 100%; aspect-ratio: 2 / 3; place-items: center; overflow: hidden; border: 1px solid var(--archive-line); border-radius: 6px; background: linear-gradient(145deg, color-mix(in srgb, var(--archive-accent) 12%, var(--archive-panel)), var(--archive-bg)); touch-action: none; }
.archive-cover-preview > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; user-select: none; }
.archive-cover-preview.is-crop-active { cursor: grab; } .archive-cover-preview.is-crop-active:active { cursor: grabbing; }
.archive-cover-preview.is-crop-active > img { inset: auto; max-width: none; object-fit: fill; }
.archive-crop-controls { padding: 12px; border: 1px solid var(--archive-line); border-radius: 5px; background: var(--archive-soft); }
.archive-crop-controls[hidden] { display: none !important; }
.archive-crop-controls p { margin: 0 0 11px; color: var(--archive-muted); font-size: 12px; line-height: 1.55; }
.archive-crop-controls label { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 8px; color: var(--archive-muted); font-size: 12px; font-weight: 700; }
.archive-crop-controls input[type="range"] { width: 100%; accent-color: var(--archive-accent); }
.archive-text-btn { margin-top: 8px; padding: 2px 0; background: transparent; color: var(--archive-accent); font-size: 12px; font-weight: 700; cursor: pointer; }
.archive-field { display: grid; min-width: 0; gap: 7px; color: var(--archive-text); font-size: 13px; font-weight: 700; }
.archive-field > span small { margin-left: 5px; color: var(--archive-muted); font-size: 11px; font-weight: 500; }
.archive-field input[type="text"], .archive-field input[type="url"], .archive-field input[type="date"], .archive-field select, .archive-field textarea { padding: 9px 11px; font-size: 14px; }
.archive-field input[type="file"] { padding: 7px; font-size: 13px; }
.archive-field textarea { min-height: 190px; resize: vertical; line-height: 1.65; }
.archive-summary-field > label, .archive-summary-label { color: var(--archive-text); font-weight: 700; }
.archive-summary-label small { margin-left: 5px; color: var(--archive-muted); font-size: 11px; font-weight: 500; }
.archive-ra0-editor .ra0-image-frame { display: block; width: 100%; }
.archive-ra0-editor .ra0-image-caption { display: block; margin: 2px 6px 8px; color: var(--archive-muted); font-size: 12px; line-height: 1.5; }
.archive-ra0-editor { min-width: 0; }
.general-archive .archive-ra0-editor .toolbar-btn { border: 1px solid var(--archive-form-line); }
.archive-ra0-editor .ra0-editor-viewer { min-height: 260px !important; max-height: 65vh; font-weight: 400; }
.archive-ra0-editor .ra0-editor-viewer details.archive-fold { position: relative; display: block; margin: 24px 0 8px; padding: 22px 12px 10px; border: 1px dashed color-mix(in srgb, var(--archive-accent) 42%, var(--archive-line)); border-radius: 6px; background: color-mix(in srgb, var(--archive-accent) 4%, var(--archive-panel)); }
.archive-ra0-editor .ra0-editor-viewer details.archive-fold::before { content: ":::fold · 처음 펼침"; position: absolute; top: 5px; left: 10px; color: var(--archive-muted); font-size: 10px; font-weight: 700; letter-spacing: .025em; line-height: 1; pointer-events: none; }
.archive-ra0-editor .ra0-editor-viewer details.archive-fold--initial-closed::before { content: ":::fold · 처음 접힘"; }
.archive-ra0-editor .ra0-editor-viewer details.archive-fold::after { content: "::: · 접이식 영역 끝"; display: block; margin-top: 8px; padding-top: 7px; border-top: 1px dashed color-mix(in srgb, var(--archive-text) 10%, var(--archive-line)); color: var(--archive-muted); font-size: 10px; font-weight: 700; line-height: 1; pointer-events: none; }
.archive-ra0-editor .ra0-editor-viewer details.archive-fold > summary { min-height: 40px; padding-top: 5px; }
.archive-ra0-editor .ra0-editor-viewer details.archive-fold > .archive-fold__body { display: block; padding-bottom: 2px; }
.archive-ra0-editor .ra0-editor-viewer p.archive-fold-exit { position: relative; min-height: 36px; margin: 6px 0 14px; padding: 8px 10px; border: 1px dashed transparent; border-radius: 5px; }
.archive-ra0-editor .ra0-editor-viewer p.archive-fold-exit:has(> br:only-child) { border-color: color-mix(in srgb, var(--archive-text) 9%, var(--archive-line)); background: color-mix(in srgb, var(--archive-text) 2%, transparent); }
.archive-ra0-editor .ra0-editor-viewer p.archive-fold-exit:has(> br:only-child)::before { content: "접이식 밖에서 일반 내용 계속 작성"; position: absolute; inset: 8px 10px; color: var(--archive-muted); font-size: 11px; font-weight: 500; line-height: 18px; pointer-events: none; }
.archive-gallery-preview[hidden] { display: none !important; }
.archive-gallery-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.archive-gallery-preview__item { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--archive-line); border-radius: 5px; background: var(--archive-soft); cursor: grab; }
.archive-gallery-preview__item:active { cursor: grabbing; }
.archive-gallery-preview__item.is-dragging { opacity: .42; }
.archive-gallery-preview__item.is-drop-before { outline: 3px solid var(--archive-accent); outline-offset: -3px; }
.archive-gallery-preview__item.is-drop-after { outline: 3px dashed var(--archive-accent); outline-offset: -3px; }
.archive-gallery-preview__item.is-inline { border-color: var(--archive-accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--archive-accent) 20%, transparent); }
.archive-gallery-preview__item img { display: block; width: 100%; height: 100%; object-fit: cover; }
.archive-gallery-preview__insert { position: absolute; right: 5px; bottom: 5px; left: 5px; min-height: 27px; padding: 5px 7px; border: 1px solid rgba(255,255,255,.38) !important; border-radius: 4px; background: rgba(10,15,21,.78); color: #fff !important; font-size: 10px; font-weight: 700; line-height: 1; cursor: pointer; }
.archive-gallery-preview__insert:hover, .archive-gallery-preview__insert:focus-visible, .archive-gallery-preview__item.is-inline .archive-gallery-preview__insert { border-color: var(--archive-accent-bg) !important; background: var(--archive-accent-bg); color: var(--archive-accent-text) !important; outline: 0; }
.archive-gallery-preview__remove { position: absolute; top: 4px; right: 4px; display: grid; width: 24px; height: 24px; place-items: center; border: 1px solid rgba(255,255,255,.45) !important; border-radius: 50%; background: rgba(10,15,21,.75); color: #fff !important; font-size: 16px; line-height: 1; cursor: pointer; }
.archive-gallery-preview__remove:hover, .archive-gallery-preview__remove:focus-visible { background: var(--archive-danger); outline: 0; }
.archive-check { display: flex; align-items: center; gap: 7px; color: var(--archive-muted); font-size: 13px; cursor: pointer; }
.archive-check input { accent-color: var(--archive-accent); }
.archive-access-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 12px; }
.archive-secret-password[hidden] { display: none; }
.archive-tag-editor { display: flex; min-height: 50px; flex-wrap: wrap; align-items: center; gap: 6px; padding: 7px 9px; border: 1px solid var(--archive-form-line); border-radius: 4px; background: var(--archive-form-bg); }
.archive-tag-editor__chips { display: contents; }
.archive-tag-editor__chip { display: inline-flex; min-height: 29px; align-items: center; gap: 3px; padding: 4px 5px 4px 9px; border: 1px solid color-mix(in srgb, var(--archive-accent) 40%, var(--archive-line)); border-radius: 999px; background: color-mix(in srgb, var(--archive-accent) 9%, var(--archive-panel)); color: var(--archive-accent); font-size: 12px; font-weight: 600; }
.archive-tag-editor__chip button { display: grid; width: 20px; height: 20px; place-items: center; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.archive-tag-editor__chip button:hover, .archive-tag-editor__chip button:focus-visible { background: var(--archive-accent-bg); color: var(--archive-accent-text); }
.archive-tag-editor > input { width: 120px; min-width: 80px; flex: 1; padding: 6px 2px; border: 0; outline: 0; background: transparent; color: var(--archive-form-text); font-size: 14px; }
.archive-tag-suggestions[hidden] { display: none !important; }
.archive-tag-suggestions { margin-top: 10px; }
.archive-tag-suggestions > strong { display: block; margin-bottom: 7px; color: var(--archive-muted); font-size: 11px; font-weight: 700; }
.archive-tag-suggestions__list { display: flex; flex-wrap: wrap; gap: 6px; }
.archive-tag-suggestions__item { display: inline-flex; min-height: 28px; align-items: center; padding: 4px 9px; border: 1px solid var(--archive-line) !important; border-radius: 999px; background: var(--archive-soft); color: var(--archive-muted); font-size: 12px; cursor: pointer; }
.archive-tag-suggestions__item:hover, .archive-tag-suggestions__item:focus-visible { border-color: var(--archive-accent) !important; color: var(--archive-accent); outline: 0; }
.archive-tag-suggestions__item.is-selected { border-color: color-mix(in srgb, var(--archive-accent) 45%, var(--archive-line)) !important; color: var(--archive-accent); cursor: default; opacity: .55; }
.archive-editor__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--archive-line); }
.archive-editor__actions .archive-btn { font-size: 13px; }

.archive-view-toolbar .archive-btn--icon { display: inline-grid; width: 34px; min-width: 34px; padding: 0; place-items: center; line-height: 1; }
.archive-plus-icon { display: block; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.archive-timeline { width: 100%; margin-top: 22px; }
.archive-detail__summary:empty + .archive-timeline { margin-top: 0; }
.archive-timeline__list { display: flex; flex-direction: column; gap: 24px; }
.archive-thread { scroll-margin-top: 22px; }
.archive-thread__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.archive-thread.is-collapsed .archive-thread__header { margin-bottom: 0; }
.archive-thread__identity { min-width: 0; flex: 1; }
.archive-thread__header h3 { margin: 0; color: var(--archive-text); font-size: clamp(1.18em, 2.1vw, 1.42em); line-height: 1.3; }
.archive-thread__toggle { display: flex; width: 100%; min-width: 0; align-items: flex-start; gap: 9px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; line-height: inherit; text-align: left; cursor: pointer; }
.archive-thread__toggle-content { display: flex; min-width: 0; flex-direction: column; gap: 5px; overflow-wrap: anywhere; }
.archive-thread__toggle-icon { width: 8px; height: 8px; flex: 0 0 auto; margin-top: 5px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translate(-1px, -1px); transition: transform .16s ease; }
.archive-thread__toggle[aria-expanded="false"] .archive-thread__toggle-icon { transform: rotate(-45deg) translate(-1px, 1px); }
.archive-thread__toggle:hover, .archive-thread__toggle:focus-visible { color: var(--archive-accent); outline: 0; }
.archive-thread__header time { color: var(--archive-muted); font-size: 11px; font-weight: 700; letter-spacing: .035em; }
.archive-thread__body[hidden] { display: none !important; }
.archive-thread__actions { display: flex; flex: 0 0 auto; align-items: center; gap: 2px; }
.archive-thread__add { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 50%; color: var(--archive-muted); line-height: 1; text-decoration: none; }
.archive-thread__add:hover, .archive-thread__add:focus-visible { background: var(--archive-soft); color: var(--archive-accent); outline: 0; }
.archive-thread__order { display: grid; width: 29px; height: 29px; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--archive-muted); cursor: pointer; }
.archive-thread__order svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.archive-thread__order.is-newest-first svg { transform: rotate(180deg); }
.archive-thread__order[hidden] { display: none; }
.archive-thread__order:hover, .archive-thread__order:focus-visible { background: var(--archive-soft); color: var(--archive-accent); outline: 0; }
.archive-thread__order:disabled { opacity: .35; cursor: default; }
.archive-thread__order:disabled:hover { background: transparent; color: var(--archive-muted); }
.archive-thread__actions .archive-timeline-entry__menu { margin: 0; }
.archive-thread__gallery { margin-bottom: 18px; }
.archive-thread__content { width: 100%; }
.archive-thread__entries { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.archive-thread__entries:empty { display: none; }
.archive-timeline-entry { position: relative; scroll-margin-top: 22px; padding: 14px; border: 1px solid color-mix(in srgb, var(--archive-text) 8%, var(--archive-line)); border-radius: 10px; background: transparent; }
.archive-timeline-entry__header { display: flex; min-height: 25px; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.archive-timeline-entry__header time { color: var(--archive-muted); font-size: 12px; font-weight: 700; letter-spacing: .035em; }
.archive-timeline-entry__menu { position: relative; margin: -7px 0 0; }
.archive-timeline-entry__menu > summary { display: grid; width: 32px; height: 32px; place-items: center; overflow: hidden; border-radius: 50%; color: var(--archive-muted); cursor: pointer; list-style: none; }
.archive-timeline-entry__menu > summary::-webkit-details-marker { display: none; }
.archive-timeline-entry__menu > summary svg { display: block; width: 13px; height: 13px; fill: currentColor; }
.archive-timeline-entry__menu > summary:hover, .archive-timeline-entry__menu > summary:focus-visible, .archive-timeline-entry__menu[open] > summary { background: var(--archive-soft); color: var(--archive-text); outline: 0; }
.archive-timeline-entry__menu > div { position: absolute; z-index: 4; top: 34px; right: 0; display: grid; min-width: 92px; padding: 5px; border: 1px solid var(--archive-line); border-radius: 6px; background: var(--archive-panel); box-shadow: 0 10px 24px rgba(0,0,0,.16); }
.archive-timeline-entry__menu a, .archive-timeline-entry__menu button { width: 100%; padding: 8px 10px; border: 0 !important; border-radius: 4px; background: transparent; color: var(--archive-text); font: inherit; font-size: 12px; text-align: left; text-decoration: none; cursor: pointer; }
.archive-timeline-entry__menu a:hover, .archive-timeline-entry__menu a:focus-visible, .archive-timeline-entry__menu button:hover, .archive-timeline-entry__menu button:focus-visible { background: var(--archive-soft); outline: 0; }
.archive-timeline-entry__menu button { color: var(--archive-danger); }
.archive-timeline-entry__gallery { margin-bottom: 18px; }
.archive-timeline-entry__content { width: 100%; }
.archive-timeline-entry__content > :first-child { margin-top: 0; }
.archive-timeline-entry__content > :last-child { margin-bottom: 0; }
.archive-timeline-entry__spoiler { display: grid; min-height: 150px; place-items: center; align-content: center; gap: 7px; padding: 24px 18px; border: 1px dashed var(--archive-line); border-radius: 6px; background: var(--archive-soft); text-align: center; }
.archive-timeline-entry__spoiler strong { color: var(--archive-text); font-size: 14px; }
.archive-timeline-entry__spoiler p { margin: 0 0 5px; color: var(--archive-muted); font-size: 12px; }
.archive-timeline-entry__spoiler .archive-spoiler-confirm { min-width: 58px; min-height: 31px; padding: 6px 11px; font-size: 12px; }
.archive-timeline-entry__revealed { outline: 0; }
.archive-spoiler-option label { width: max-content; max-width: 100%; }
.archive-timeline__empty { margin: 0; padding: 30px 20px; border: 1px dashed var(--archive-line); border-radius: 8px; color: var(--archive-muted); text-align: center; }
.archive-timeline__empty[hidden] { display: none !important; }
.archive-timeline-editor { max-width: 900px; margin: 0 auto; }
.archive-timeline-editor__parent { margin: 0 0 7px; color: var(--archive-muted); font-size: 12px; }
.archive-timeline-editor__parent strong { color: var(--archive-text); font-weight: 700; }
.archive-timeline-editor__fields { gap: 22px; }
.archive-thread-state-options { display: flex; flex-wrap: wrap; gap: 8px; }
.archive-thread-state-options label { display: inline-flex; min-height: 36px; align-items: center; gap: 7px; padding: 7px 12px; border: 1px solid var(--archive-line); border-radius: 5px; background: var(--archive-panel); color: var(--archive-text); font-size: 13px; cursor: pointer; }
.archive-thread-state-options label:has(input:checked) { border-color: var(--archive-accent); background: color-mix(in srgb, var(--archive-accent) 8%, var(--archive-panel)); color: var(--archive-accent); }
.archive-thread-state-options input { margin: 0; accent-color: var(--archive-accent); }

@media (max-width: 760px) {
    .archive-image-viewer { overflow: hidden; touch-action: none; overscroll-behavior: contain; }
    .archive-image-viewer__backdrop { cursor: default; opacity: var(--archive-viewer-backdrop-opacity); transition: opacity .22s ease-out; }
    .archive-image-viewer__dialog, .archive-image-viewer.is-open .archive-image-viewer__dialog { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; opacity: 1; transform: none; transition: none; }
    .archive-image-viewer__dialog > img { width: 100%; height: 100%; max-width: none; max-height: none; box-shadow: none; opacity: 1; object-fit: contain; transform: translate3d(var(--archive-viewer-image-x), calc(var(--archive-viewer-image-y) + var(--archive-viewer-drag-y)), 0) scale(var(--archive-viewer-image-scale)) scale(var(--archive-viewer-drag-scale)); transform-origin: center; transition: transform .18s ease-out, opacity .18s ease-out; will-change: transform, opacity; }
    .archive-image-viewer.is-dragging .archive-image-viewer__dialog > img, .archive-image-viewer.is-image-gesturing .archive-image-viewer__dialog > img { transition: none; }
    .archive-image-viewer.is-dismissing .archive-image-viewer__backdrop, .archive-image-viewer.is-dismissing .archive-image-viewer__dialog > img { opacity: 0; }
    .archive-image-viewer.is-image-zoomed .archive-image-viewer__nav { opacity: 0; pointer-events: none; }
    .archive-detail__gallery--count-1 .archive-detail__gallery-item, .archive-detail__gallery--count-1 .archive-detail__gallery-item img { max-height: 340px; }
    .archive-detail__gallery--count-2 .archive-detail__gallery-item { height: 130px; }
    .archive-detail__gallery--count-3 .archive-detail__gallery-item:first-child { height: 150px; }
    .archive-detail__gallery--count-3 .archive-detail__gallery-item:not(:first-child) { height: 100px; }
    .archive-detail__gallery--count-4 .archive-detail__gallery-item, .archive-detail__gallery--many .archive-detail__gallery-item { height: 110px; }
    .general-archive__header { align-items: flex-end; flex-direction: row; }
    .archive-library-controls { align-items: stretch; flex-direction: column; gap: 12px; }
    .archive-sort { width: min(100%, 220px); grid-template-columns: 45px minmax(0, 1fr); }
    .archive-category-filter { flex-wrap: nowrap; padding-bottom: 3px; overflow-x: auto; -ms-overflow-style: none; scrollbar-width: none; }
    .archive-category-filter::-webkit-scrollbar { display: none; width: 0; height: 0; }
    .archive-reorder-toolbar { align-items: stretch; flex-direction: column; }
    .archive-reorder-toolbar > div { justify-content: flex-end; }
    .archive-filter-chip { flex: 0 0 auto; }
    .archive-grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
    .archive-detail { display: block; aspect-ratio: auto; overflow: auto; }
    .archive-detail > .archive-modal__close { display: none; }
    .archive-detail__fixed-close { position: sticky; z-index: 5; top: 0; display: block; width: 100%; height: 0; }
    .archive-detail__fixed-close .archive-modal__close { top: 10px; right: 10px; }
    .archive-detail__cover { width: min(66vw, 280px); height: auto; aspect-ratio: 2 / 3; margin: 24px auto 0; border-radius: 5px; }
    .archive-detail__content { min-height: 280px; height: auto; padding-top: 25px; overflow: visible; }
    .archive-detail--page { min-height: 0; padding-top: 24px; }
    .archive-detail--page .archive-detail__media { display: contents; }
    .archive-detail--page .archive-detail__cover { width: min(66vw, 280px); height: auto; min-height: 0; aspect-ratio: 2 / 3; margin: 0 auto; }
    .archive-detail--page .archive-detail__identity--desktop { display: none; }
    .archive-detail--page .archive-detail__identity--mobile { display: flex; }
    .archive-detail--page .archive-detail__identity h1 { font-size: clamp(1.65em, 3.6vw, 3em); line-height: 1.16; }
    .archive-detail--page .archive-detail__identity .archive-detail__meta-row { margin-bottom: 13px; }
    .archive-detail--page .archive-detail__identity .archive-detail__tags { margin: 16px 0 17px; }
    .archive-detail--page .archive-detail__identity--no-tags + .archive-detail__gallery { margin-top: 17px; }
    .archive-detail--page .archive-detail__identity--no-tags + .archive-detail__summary { margin-top: 22px; }
    .archive-detail--page .archive-detail__content { min-height: 0; height: auto; overflow: visible; }
    .archive-editor__grid { grid-template-columns: 1fr; }
    .archive-field-row { grid-template-columns: 1fr; }
    .archive-access-fields { grid-template-columns: 1fr; }
    .archive-cover-editor { display: grid; grid-template-columns: minmax(110px, 160px) minmax(0, 1fr); align-items: start; }
    .archive-cover-preview { grid-row: span 3; }
    .archive-timeline { margin-top: 22px; }
}
@media (max-width: 440px) {
    .general-archive { padding-right: 10px; padding-left: 10px; }
    .archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; }
    .archive-pagination { gap: 3px; margin-top: 22px; }
    .archive-pagination__button { min-width: 31px; min-height: 31px; padding: 5px 7px; }
    .archive-modal { padding: 12px 8px 20px; }
    .archive-modal__dialog { max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); }
    .archive-detail__content, .archive-editor { padding-right: 18px; padding-left: 18px; }
    .archive-cover-editor { grid-template-columns: 1fr; }
    .archive-cover-preview { grid-row: auto; width: min(58vw, 210px); margin: 0 auto; }
}
@media (hover: none) { .archive-card:hover { transform: none; } .archive-card__overlay, .archive-card__cover > .archive-status, .archive-drag-handle { display: none; } }
@media (prefers-reduced-motion: reduce) { .general-archive *, .general-archive *::before, .general-archive *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }
