:root {
  color-scheme: light;
  font-family: Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: #fff; color: #000; }
button, input { font: inherit; }

.feed-page { min-height: 100vh; }
.feed-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  padding: 20px 28px;
  background: #fff;
  will-change: transform;
}
.feed-header-row { display: flex; align-items: center; justify-content: space-between; }
.site-logo { color: #000; font-size: 20px; font-weight: 700; text-decoration: none; }
.feed-archive-link { color: #777; font-size: 14px; text-decoration: none; }
.feed-archive-link:hover, .feed-archive-link:focus-visible { color: #000; }
.feed-notice { margin: 16px 0 0; padding-bottom: 12px; color: #3d3d3d; font-size: 13px; line-height: 1.2; }
.feed-column { display: flex; width: 100%; margin: 0 auto; padding: 164px 0 96px; flex-direction: column; align-items: center; gap: 50px; }
.feed-item { position: relative; display: flex; width: 100%; height: var(--frame-height); margin: 0; align-items: center; justify-content: center; flex: 0 0 auto; }
.feed-item img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; }
.feed-copyright { position: absolute; right: calc(50% - var(--frame-half-width) + 7px); bottom: 7px; color: #fff; font-size: 11px; line-height: 1.1; letter-spacing: .04em; text-shadow: 0 1px 4px rgb(0 0 0 / 55%); }
.feed-status { margin: 0; color: #666; font-size: 13px; }

.admin-page { min-height: 100vh; background: #f7f7f5; color: #111; }
.admin-header { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e5e5e2; padding: 20px 28px; font-size: 13px; }
.admin-archive-link { margin-right: 18px; color: #777; text-decoration: none; }
.admin-archive-link:hover, .admin-archive-link:focus-visible { color: #111; }
.admin-content { width: min(980px, calc(100% - 40px)); margin: 0 auto; padding: 74px 0; }
.admin-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; border-bottom: 1px solid #d8d8d4; padding-bottom: 22px; }
.admin-eyebrow { margin: 0 0 9px; color: #888; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.admin-toolbar h1 { margin: 0; font-size: 28px; font-weight: 400; }
.upload-button, .admin-item-actions button, .login-card button { cursor: pointer; border: 1px solid #111; background: #111; color: #fff; padding: 11px 16px; font-size: 13px; }
.upload-button input { display: none; }
.admin-message, .admin-empty { color: #777; font-size: 13px; }
.admin-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; padding-top: 26px; }
.admin-item { background: #fff; }
.admin-item.dragging { opacity: .42; }
.admin-item.touch-dragging { opacity: .58; outline: 1px solid #111; }
.admin-item img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.admin-item-actions { display: flex; align-items: center; justify-content: space-between; padding: 10px; }
.admin-item-actions button { border-color: #ddd; background: transparent; color: #111; padding: 7px 10px; font-size: 12px; }
.admin-item-actions .drag-handle { width: 30px; height: 30px; border: 0; padding: 0; color: #555; font-size: 19px; cursor: grab; }
.copyright-toggle { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-size: 17px; }
.copyright-toggle input { accent-color: #111; }
.visibility-toggle { display: inline-flex; overflow: hidden; border: 1px solid #ddd; }
.admin-item-actions .visibility-button { display: grid; width: 30px; height: 30px; place-items: center; border: 0; border-right: 1px solid #ddd; padding: 0; color: #555; }
.admin-item-actions .visibility-button:last-child { border-right: 0; }
.admin-item-actions .visibility-button:hover { background: #f4f4f2; }
.admin-item-actions .visibility-button.is-active { background: #111; color: #fff; }
.visibility-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.login-wrap { display: grid; min-height: 100vh; place-items: center; padding: 24px; background: #f7f7f5; }
.login-card { width: min(360px, 100%); padding: 28px; background: #fff; border: 1px solid #e0e0dc; }
.login-card h1 { margin: 0; font-size: 25px; font-weight: 400; }
.login-card p { margin: 10px 0 20px; color: #666; font-size: 13px; line-height: 1.4; }
.login-card input { width: 100%; margin-bottom: 10px; padding: 11px; border: 1px solid #bbb; background: #fff; }
.login-error { min-height: 18px; margin: 10px 0 0; color: #9f2020; font-size: 12px; }

@media (max-width: 640px) {
  .feed-header,
  .admin-header { padding: 18px 16px; }
  .site-logo { font-size: 17px; }
  .feed-archive-link { font-size: 13px; }
  .feed-notice { margin-top: 13px; padding-bottom: 10px; font-size: 12px; }
  .feed-column { padding: 142px 0 72px; }
  .feed-item { height: var(--frame-height-mobile); }
  .feed-copyright { right: calc(50% - var(--frame-half-width-mobile) + 7px); }
  .admin-content { width: calc(100% - 32px); padding-top: 44px; }
  .admin-toolbar { align-items: flex-start; flex-direction: column; }
  .admin-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .admin-item-actions { justify-content: flex-start; flex-wrap: wrap; gap: 6px; padding: 8px; }
}
