:root {
  --paper: #f4f0e8;
  --paper-deep: #e8e1d4;
  --ink: #171714;
  --muted: #706d65;
  --line: #cfc7b9;
  --accent: #c43c28;
  --accent-dark: #922817;
  --white: #fffdf8;
  --serif: "Pretendard", "Malgun Gothic", Georgia, serif;
  --sans: "Pretendard", "Malgun Gothic", Arial, sans-serif;
  --shadow: 0 20px 60px rgba(49, 40, 27, 0.15);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  line-height: 1.65;
  background-image: radial-gradient(rgba(23, 23, 20, 0.045) 0.7px, transparent 0.7px);
  background-size: 7px 7px;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }
.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--ink); background: rgba(244, 240, 232, 0.96); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(12px); }
.ticker { color: var(--paper); background: var(--ink); font-size: 11px; letter-spacing: 0.05em; }
.ticker-inner { min-height: 30px; display: flex; align-items: center; gap: 24px; }
.ticker-label { color: #ffb7a9; font-weight: 700; letter-spacing: 0.13em; }
.ticker-copy { margin-left: auto; color: #bcb8ae; }
.masthead { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.brand { display: flex; align-items: center; gap: 12px; border: 0; background: none; padding: 0; cursor: pointer; text-align: left; }
.brand-mark, .empty-mark { width: 42px; height: 42px; display: grid; place-items: center; color: var(--paper); background: var(--accent); font: 900 25px/1 var(--serif); }
.brand strong { display: block; font: 900 23px/1.1 var(--serif); letter-spacing: -0.04em; }
.brand small { display: block; margin-top: 5px; font-size: 8px; letter-spacing: 0.18em; color: var(--muted); }
.desktop-nav { display: flex; align-self: stretch; }
.nav-link { position: relative; padding: 0 22px; border: 0; background: none; cursor: pointer; font-size: 14px; font-weight: 600; }
.nav-link::after { content: ""; position: absolute; height: 3px; background: var(--accent); left: 50%; right: 50%; bottom: 0; transition: .2s ease; }
.nav-link:hover::after, .nav-link.active::after { left: 18px; right: 18px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-button { width: 42px; height: 42px; border: 1px solid var(--line); background: transparent; display: grid; place-items: center; padding: 0; cursor: pointer; font-size: 24px; line-height: 1; }
.icon-button svg { display: block; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.button { min-height: 42px; border: 1px solid var(--ink); padding: 0 19px; font-weight: 700; font-size: 13px; cursor: pointer; transition: transform .15s, background .15s; }
.button:hover { transform: translateY(-2px); }
.button-dark { color: var(--paper); background: var(--ink); }
.button-accent { color: white; background: var(--accent); border-color: var(--accent); }
.button-accent:hover { background: var(--accent-dark); }
.button-ghost { background: transparent; }
.text-button, .text-link { border: 0; background: none; padding: 0; cursor: pointer; font-weight: 700; font-size: 12px; }
.text-link { color: var(--accent); }
.search-panel { position: absolute; top: 100%; left: 0; right: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--ink); background: var(--paper); box-shadow: 0 14px 30px rgba(23,23,20,.1); }
.search-wrap { width: min(620px, calc(100% - 30px)); display: flex; align-items: center; gap: 14px; padding-block: 10px; }
.search-wrap input { flex: 1; min-width: 0; height: 38px; border: 1px solid var(--line); background: var(--white); padding: 8px 12px; font: 600 14px var(--sans); outline: none; }
main { min-height: 70vh; padding-block: 64px 100px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; border-bottom: 3px solid var(--ink); padding-bottom: 18px; margin-bottom: 28px; }
.eyebrow { margin: 0 0 6px; color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .2em; }
h1, h2, h3, p { overflow-wrap: anywhere; }
.section-heading h1 { margin: 0; font: 900 clamp(34px, 5vw, 58px)/1.15 "Nanum Myeongjo", "Batang", "Times New Roman", serif; letter-spacing: -.055em; }
.result-count { margin: 0 0 6px; color: var(--muted); font-size: 12px; }
.home-controls { display: grid; justify-items: end; gap: 8px; }
.sort-control { width: 150px; margin: 0; gap: 4px; color: var(--muted); font-size: 10px; text-align: left; }
.sort-control select { height: 34px; padding: 5px 8px; background: var(--white); font-size: 12px; font-weight: 700; }
.lead-story { min-height: 410px; display: grid; grid-template-columns: 1.55fr 1fr; margin-bottom: 60px; border-bottom: 1px solid var(--ink); }
.lead-image { min-height: 410px; background: #d9d1c2 center/cover no-repeat; position: relative; overflow: hidden; cursor: pointer; }
.lead-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(0,0,0,.05), transparent); }
.image-placeholder { height: 100%; display: grid; place-items: center; color: rgba(23,23,20,.22); font: 900 120px var(--serif); background: linear-gradient(135deg, #d7d0c3, #eee8dc); }
.lead-copy { padding: 20px 0 40px 42px; display: flex; flex-direction: column; justify-content: center; }
.category { display: inline-flex; width: fit-content; margin-bottom: 20px; color: var(--accent); font-size: 13px; font-weight: 800; letter-spacing: .12em; }
.lead-copy h2 { margin: 0 0 18px; font: 900 clamp(29px, 4vw, 46px)/1.28 var(--serif); letter-spacing: -.045em; cursor: pointer; }
.lead-copy > p { margin: 0 0 30px; color: #4e4c46; font-size: 15px; }
.meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; }
.meta .dot::before { content: "•"; }
.meta .metric { color: #4f4b43; font-weight: 600; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 285px; gap: 70px; }
.rule-heading { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.rule-heading h2 { margin: 0; font: 800 19px var(--serif); white-space: nowrap; }
.rule-heading span { height: 1px; flex: 1; background: var(--ink); }
.rule-heading.compact h2 { font-size: 16px; }
.article-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 38px 28px; }
.article-card { padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.card-image { width: 100%; aspect-ratio: 16/9; margin-bottom: 18px; border: 0; padding: 0; background: #ddd5c7 center/cover no-repeat; cursor: pointer; overflow: hidden; }
.card-image .image-placeholder { font-size: 64px; }
.article-card h3 { margin: 0 0 10px; font: 800 23px/1.42 var(--serif); letter-spacing: -.035em; cursor: pointer; }
.article-card h3:hover, .lead-copy h2:hover { color: var(--accent); }
.article-card > p { color: #5e5b54; margin: 0 0 18px; font-size: 13px; }
.sidebar { border-left: 1px solid var(--line); padding-left: 30px; }
.sidebar-card { padding: 28px 0; border-bottom: 1px solid var(--line); }
.sidebar-card:first-child { padding-top: 0; }
.about-card h2 { margin: 0 0 18px; font: 800 25px/1.45 var(--serif); }
.about-card > p:last-child, .status-card > p { color: var(--muted); font-size: 12px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.tag { border: 1px solid var(--line); background: rgba(255,255,255,.25); padding: 5px 9px; cursor: pointer; font-size: 11px; }
.tag:hover { border-color: var(--accent); color: var(--accent); }
.latest-list, .notification-list { display: grid; gap: 10px; }
.latest-item, .notification-item { display: grid; gap: 3px; padding-bottom: 10px; border-bottom: 1px solid var(--line); text-align: left; }
.latest-item:last-child, .notification-item:last-child { border-bottom: 0; padding-bottom: 0; }
.latest-item button { border: 0; padding: 0; color: var(--ink); background: none; text-align: left; cursor: pointer; font: 750 13px/1.45 var(--serif); }
.latest-item button:hover { color: var(--accent); }
.latest-item small, .notification-item small { color: var(--muted); font-size: 10px; }
.notification-card { border: 1px solid #d9b7ac; padding: 18px; background: linear-gradient(180deg, rgba(255,253,248,.78), rgba(196,60,40,.055)); box-shadow: 0 10px 28px rgba(49,40,27,.07); }
.notification-card .rule-heading h2::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; background: var(--accent); border-radius: 50%; vertical-align: 1px; }
.notification-item { padding: 9px 0 10px; }
.notification-item strong { color: var(--ink); font-size: 12px; font-weight: 800; }
.notification-item small { color: #8c4b3d; }
.notification-card .text-link { margin-top: 12px; }
.status-row { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #b97d31; box-shadow: 0 0 0 4px rgba(185,125,49,.12); }
.status-dot.cloud { background: #2d8a58; box-shadow: 0 0 0 4px rgba(45,138,88,.12); }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 34px 0 12px; font-size: 13px; }
.page-link { min-width: 30px; height: 30px; border: 0; color: #2b6ecb; background: transparent; cursor: pointer; font-weight: 500; }
.page-link.active { color: var(--ink); font-weight: 800; text-decoration: underline; text-underline-offset: 6px; }
.page-link.next { width: auto; padding: 0 12px; }
.load-more-wrap { display: flex; justify-content: center; margin: 16px 0 44px; }
.load-more-button { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid var(--ink); color: var(--paper); background: var(--ink); border-radius: 50%; font: 700 26px/1 var(--sans); cursor: pointer; }
.load-more-button:hover { background: var(--accent); border-color: var(--accent); }
.admin-page { width: min(920px, 100%); margin: 0 auto; }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.admin-card { padding: 24px; border: 1px solid var(--line); background: rgba(255,255,255,.3); }
.admin-card h3 { margin: 0 0 10px; font: 800 22px/1.35 var(--serif); }
.admin-card p:not(.eyebrow) { color: var(--muted); font-size: 13px; }
.storage-meter { height: 10px; margin: 18px 0; overflow: hidden; border: 1px solid var(--line); background: var(--paper-deep); }
.storage-meter span { display: block; width: 0%; height: 100%; background: var(--accent); transition: width .25s ease; }
.empty-state { padding: 80px 20px; text-align: center; border: 1px solid var(--line); }
.empty-mark { margin: 0 auto 20px; }
.empty-state h2 { margin: 0 0 8px; font: 800 24px var(--serif); }
.empty-state p { color: var(--muted); margin: 0 0 24px; }
.article-view { width: min(820px, 100%); margin: 0 auto; }
.back-button { margin-bottom: 45px; }
.article-header { text-align: center; }
.article-header h1 { margin: 0 0 15px; font: 900 clamp(35px, 6vw, 61px)/1.28 var(--serif); letter-spacing: -.055em; }
.article-subtitle { max-width: 680px; margin: 0 auto 18px; color: #4f4b43; font: 500 17px/1.75 var(--serif); word-break: keep-all; }
.article-header .meta { justify-content: center; }
.article-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: 100%; margin: 30px 0 34px; }
.article-gallery.single { grid-template-columns: 1fr; }
.article-gallery img { display: block; width: 100%; height: 310px; object-fit: cover; background: #ddd5c7; }
.article-gallery.single img { height: auto; max-height: 620px; aspect-ratio: 16/9; }
.article-gallery img:last-child:nth-child(odd):not(:first-child) { grid-column: 1 / -1; height: 390px; }
.article-body { margin-top: 28px; font: 400 17px/2 var(--serif); overflow-wrap: anywhere; }
.article-gallery + .article-body { margin-top: 0; }
.article-body.font-pretendard { font-family: "Pretendard", "Malgun Gothic", sans-serif; }
.article-body.font-serif { font-family: "Nanum Myeongjo", "Batang", Georgia, serif; }
.article-body.font-system { font-family: system-ui, -apple-system, "Malgun Gothic", sans-serif; }
.article-body h1, .article-body h2, .article-body h3 { margin: 2em 0 .7em; line-height: 1.4; }
.article-body h1 { font-size: 36px; }
.article-body h2 { font-size: 29px; }
.article-body h3 { font-size: 22px; }
.article-body p { margin: 0 0 1.5em; }
.article-body .blank-line { min-height: 1.5em; margin: 0; }
.article-body ul, .article-body ol { padding-left: 1.5em; margin: 0 0 1.5em; }
.article-body blockquote { margin: 1.8em 0; padding: 10px 0 10px 20px; color: #59564f; border-left: 3px solid var(--accent); }
.article-body pre { overflow-x: auto; padding: 18px; color: #f6f1e8; background: var(--ink); font: 13px/1.7 Consolas, monospace; }
.article-body code { padding: 2px 5px; background: var(--paper-deep); font: .88em Consolas, monospace; }
.article-body pre code { padding: 0; background: transparent; }
.article-body a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.article-body del { color: var(--muted); }
.article-body .timestamp { display: inline-flex; align-items: center; padding: 1px 6px; color: #764b15; background: #eee1c9; border-radius: 3px; font: 600 .82em/1.7 var(--sans); white-space: nowrap; }
.article-inline-image { max-width: 100%; margin: 2.2em 0; box-sizing: border-box; }
.article-inline-image img { display: block; width: 100%; height: auto; max-height: 680px; object-fit: contain; background: var(--paper-deep); }
.article-inline-image figcaption { margin-top: 7px; color: var(--muted); text-align: center; font: 11px var(--sans); }
.article-inline-image.linked-image img { min-height: 80px; }
.link-embed { display: grid; grid-template-columns: 126px minmax(0, 1fr); gap: 16px; max-width: 100%; margin: 1.7em 0; color: inherit; text-decoration: none; border: 1px solid var(--line); background: rgba(255,255,255,.32); overflow: hidden; box-sizing: border-box; }
.link-embed:hover { border-color: var(--accent); }
.link-embed-thumb { min-height: 110px; background: var(--paper-deep) center/cover no-repeat; }
.link-embed-body { padding: 13px 14px 13px 0; min-width: 0; }
.link-embed-site { margin: 0 0 4px; color: var(--accent); font: 800 10px var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.link-embed-title { margin: 0 0 5px; font: 800 16px/1.45 var(--serif); }
.link-embed-desc { margin: 0; color: var(--muted); font: 12px/1.6 var(--sans); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.article-body .link-embed-title { margin: 0 0 5px; font: 800 16px/1.45 var(--serif); }
.article-body .link-embed-desc { margin: 0; font: 12px/1.6 var(--sans); }
.tenor-embed { display: block; width: 100%; max-width: 100%; min-height: 320px; margin: 1.8em 0; border: 0; background: var(--paper-deep); box-sizing: border-box; }
.article-links { margin-top: 42px; padding: 22px; border: 1px solid var(--line); background: rgba(255,255,255,.28); }
.article-links h2 { margin: 0 0 12px; font: 800 17px var(--serif); }
.article-links a { display: block; padding: 8px 0; color: var(--ink); font-size: 13px; border-top: 1px solid var(--line); text-decoration: none; }
.article-links a:hover { color: var(--accent); }
.private-badge { display: inline-flex; padding: 3px 7px; color: var(--paper); background: var(--ink); font-size: 9px; font-weight: 800; letter-spacing: .08em; vertical-align: middle; }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 50px; padding-top: 25px; border-top: 1px solid var(--ink); }
.article-admin { display: flex; justify-content: flex-end; gap: 10px; margin-top: 35px; }
.engagement-bar { display: flex; align-items: center; gap: 14px; margin-top: 45px; padding: 24px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.like-button { min-width: 112px; color: var(--accent); background: transparent; border: 1px solid var(--accent); }
.like-button.liked { color: white; background: var(--accent); }
.engagement-copy { color: var(--muted); font-size: 12px; }
.comments-section { margin-top: 58px; }
.comments-heading { display: flex; align-items: baseline; gap: 10px; padding-bottom: 14px; border-bottom: 2px solid var(--ink); }
.comments-heading h2 { margin: 0; font: 800 24px var(--serif); }
.comments-heading span { color: var(--accent); font-weight: 800; }
.comment-form { margin-top: 24px; padding: 12px 14px; background: rgba(255,255,255,.32); border: 1px solid var(--line); transition: padding .2s ease; }
.comment-form.collapsed { cursor: text; }
.comment-form.collapsed .form-row, .comment-form.collapsed .comment-form-footer { display: none; }
.comment-form.collapsed textarea { min-height: 42px; height: 42px; resize: none; overflow: hidden; }
.comment-form:not(.collapsed) { padding: 22px; }
.comment-form .form-row { grid-template-columns: 1fr 1fr; }
.comment-form textarea { min-height: 105px; }
.comment-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.comment-form-footer p { margin: 0; color: var(--muted); font-size: 11px; }
.comment-actions { display: flex; justify-content: flex-end; gap: 8px; }
.comments-list { margin-top: 10px; }
.comment { padding: 25px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.comment:hover .comment-content { color: var(--accent); }
.comment.reply { margin-left: 28px; padding-left: 18px; border-left: 2px solid var(--line); }
.comment-header { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.comment-header strong { font-size: 13px; }
.comment-header time { color: var(--muted); font-size: 10px; }
.comment-header button { margin-left: auto; }
.comment-content { margin: 0; white-space: pre-wrap; font-size: 14px; }
.reply-form { margin: 12px 0 0 28px; padding: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.28); }
.reply-form textarea { min-height: 82px; }
.reply-form-actions { display: flex; justify-content: flex-end; gap: 8px; }
.comments-empty { padding: 35px 0; color: var(--muted); text-align: center; font-size: 13px; }
.modal { width: min(680px, calc(100% - 28px)); max-height: 92vh; padding: 0; color: var(--ink); background: var(--white); border: 1px solid var(--ink); box-shadow: var(--shadow); }
.small-modal { width: min(430px, calc(100% - 28px)); }
.modal::backdrop { background: rgba(23,23,20,.72); backdrop-filter: blur(4px); }
.modal form { padding: 34px; overflow-y: auto; max-height: 92vh; }
.modal-header { display: flex; justify-content: space-between; align-items: start; margin-bottom: 28px; padding-bottom: 20px; border-bottom: 2px solid var(--ink); }
.modal-header h2 { margin: 0; font: 900 30px var(--serif); }
.close-button { border: 0; font-size: 30px; }
label { display: grid; gap: 7px; margin-bottom: 17px; font-size: 12px; font-weight: 700; }
input, select, textarea { width: 100%; color: var(--ink); background: #f8f4ed; border: 1px solid var(--line); border-radius: 0; padding: 11px 12px; outline: none; }
input[type="file"] { padding: 9px; cursor: pointer; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(196,60,40,.12); }
textarea { resize: vertical; line-height: 1.65; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.optional { color: var(--muted); font-weight: 400; }
.field-help { color: var(--muted); font-size: 10px; font-weight: 400; }
.editor-page { width: 100%; }
.editor-page-header { display: grid; grid-template-columns: 130px 1fr 130px; align-items: end; gap: 25px; padding-bottom: 22px; margin-bottom: 35px; border-bottom: 3px solid var(--ink); }
.editor-page-header > div { text-align: center; }
.editor-page-header h1 { margin: 0; font: 900 clamp(34px, 5vw, 52px)/1.15 var(--serif); letter-spacing: -.05em; }
.editor-page-header > .button { justify-self: end; }
.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 55px; align-items: start; }
#articleContent { min-height: 470px; font-family: var(--serif); font-size: 15px; }
.editor-settings { position: sticky; top: 145px; padding: 24px; border: 1px solid var(--line); background: rgba(255,255,255,.3); }
.editor-settings .form-row { grid-template-columns: 1fr; gap: 0; }
.editor-side-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-top: 8px; }
.markdown-help { margin: -5px 0 22px; padding: 12px 14px; color: var(--muted); background: var(--paper-deep); font-size: 11px; }
.markdown-help summary { cursor: pointer; font-weight: 700; }
.markdown-help code { display: block; margin-top: 10px; white-space: normal; }
.inline-media-flow { margin: -8px 0 22px; }
.inline-media-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.inline-media-card { min-width: 0; border: 1px solid var(--line); background: var(--white); overflow: hidden; box-shadow: 0 8px 18px rgba(49,40,27,.06); }
.inline-media-card img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--paper-deep); }
.inline-media-card a { display: block; padding: 9px 10px; color: var(--ink); text-decoration: none; font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inline-media-card small { display: block; padding: 0 10px 9px; color: var(--muted); font-size: 10px; }
.upload-dropzone { padding: 13px; border: 1px dashed var(--line); background: rgba(255,255,255,.22); }
.upload-dropzone.dragover { border-color: var(--accent); background: rgba(196,60,40,.08); }
.upload-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: -6px 0 18px; }
.upload-item { position: relative; aspect-ratio: 4/3; overflow: hidden; border: 1px solid var(--line); background: var(--paper-deep); }
.upload-item img { width: 100%; height: 100%; object-fit: cover; }
.upload-item small { position: absolute; left: 5px; top: 5px; padding: 2px 5px; color: white; background: rgba(23,23,20,.72); font-size: 10px; }
.upload-item .remove-upload { position: absolute; top: 5px; right: 5px; width: 25px; height: 25px; padding: 0; color: white; background: rgba(23,23,20,.8); border: 0; cursor: pointer; }
.upload-item .insert-upload { position: absolute; left: 5px; right: 5px; bottom: 5px; min-height: 29px; padding: 4px 7px; color: white; background: rgba(23,23,20,.85); border: 0; font-size: 10px; font-weight: 700; cursor: pointer; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 25px; padding-top: 20px; border-top: 1px solid var(--line); }
.modal-copy { margin: -10px 0 25px; color: var(--muted); font-size: 13px; }
.form-error { min-height: 22px; margin: 0 0 8px; color: var(--accent); font-size: 12px; }
.full-button { width: 100%; }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 50; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; color: white; background: var(--ink); padding: 12px 18px; font-size: 12px; transition: .25s ease; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.drop-notice { position: fixed; top: 12px; left: 50%; z-index: 80; width: min(360px, calc(100% - 24px)); min-height: 76px; display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; color: #111; background: rgba(255,255,255,.96); border: 1px solid rgba(0,0,0,.08); border-radius: 14px; box-shadow: 0 12px 34px rgba(0,0,0,.24); transform: translate(-50%, -125%); opacity: 0; transition: transform .3s ease, opacity .3s ease; pointer-events: auto; cursor: default; }
.drop-notice.show { transform: translate(-50%, 0); opacity: 1; }
.drop-notice-thumb { width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center; overflow: hidden; color: #111; background: #f3f3f3; font: 900 24px/1 var(--serif); }
.drop-notice-thumb img { width: 100%; height: 100%; object-fit: cover; }
.drop-notice-body { min-width: 0; }
.drop-notice-title { margin: 0 0 3px; font: 800 13px/1.35 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drop-notice-copy { margin: 0; color: #2f2f2f; font: 12px/1.35 var(--sans); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.drop-notice-time { align-self: start; padding-top: 4px; color: #b5b5b5; font: 10px var(--sans); white-space: nowrap; }
.site-footer { color: var(--paper); background: var(--ink); }
.footer-inner { min-height: 150px; display: flex; align-items: center; gap: 22px; }
.footer-inner strong { font: 800 20px var(--serif); }
.footer-inner p { color: #99958c; font-size: 12px; }
.footer-inner .text-link { margin-left: auto; color: #ff9c89; }

@media (max-width: 850px) {
  .desktop-nav { display: none; }
  .lead-story { grid-template-columns: 1fr; }
  .lead-image { min-height: 320px; }
  .lead-copy { padding: 30px 0 40px; }
  .content-grid { grid-template-columns: 1fr; gap: 50px; }
  .sidebar { border-left: 0; padding-left: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; border-top: 1px solid var(--ink); }
  .sidebar-card { padding-top: 28px !important; }
  .editor-layout { grid-template-columns: 1fr; }
  .editor-settings { position: static; }
}

@media (max-width: 600px) {
  .shell { width: min(100% - 26px, 1180px); }
  .ticker-copy { display: none; }
  .masthead { min-height: 72px; }
  .brand small { display: none; }
  .brand-mark { width: 36px; height: 36px; }
  .brand strong { font-size: 20px; }
  #writeButton { padding-inline: 12px; }
  main { padding-block: 40px 70px; }
  .section-heading h1 { font-size: 36px; }
  .section-heading { align-items: start; gap: 18px; }
  .sort-control { width: 116px; }
  .lead-story { min-height: 0; margin-bottom: 45px; }
  .lead-image { min-height: 230px; }
  .lead-copy h2 { font-size: 29px; }
  .article-grid { grid-template-columns: 1fr; }
  .admin-grid { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: 1fr; gap: 0; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .modal form { padding: 23px; }
  .article-header h1 { font-size: 36px; }
  .article-body { font-size: 16px; }
  .comment-form .form-row { grid-template-columns: 1fr; }
  .comment-form-footer { align-items: stretch; flex-direction: column; }
  .inline-media-grid { grid-template-columns: 1fr; }
  .comment.reply { margin-left: 10px; padding-left: 12px; }
  .link-embed { grid-template-columns: 1fr; }
  .link-embed-thumb { min-height: 170px; }
  .link-embed-body { padding: 14px; }
  .article-gallery { grid-template-columns: 1fr; }
  .article-gallery img, .article-gallery img:last-child:nth-child(odd):not(:first-child) { grid-column: auto; height: auto; aspect-ratio: 4/3; }
  .editor-page-header { grid-template-columns: 1fr auto; align-items: center; }
  .editor-page-header > div { grid-column: 1 / -1; grid-row: 1; text-align: left; }
  .editor-page-header > .text-link { grid-column: 1; grid-row: 2; }
  .editor-page-header > .button { grid-column: 2; grid-row: 2; }
  #articleContent { min-height: 360px; }
  .footer-inner { align-items: flex-start; flex-direction: column; justify-content: center; gap: 6px; }
  .footer-inner p { margin: 0; }
  .footer-inner .text-link { margin: 12px 0 0; }
}
