:root {
  --ink: #17202a;
  --muted: #687384;
  --line: #dce3ea;
  --soft: #f6f8fb;
  --field: #f9fbfd;
  --accent: #0f8a9d;
  --accent-dark: #0a6d7d;
  --accent-2: #e33b72;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #fff; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); text-decoration: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.site-header { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; gap: 16px; align-items: center; min-height: 62px; padding: 12px clamp(16px, 4vw, 40px); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(10px); }
.brand { min-width: 0; color: var(--ink); font-weight: 900; line-height: 1.35; }
.header-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.icon-button { display: inline-flex; gap: 7px; align-items: center; justify-content: center; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-size: 13px; font-weight: 800; }
.icon-button svg { width: 18px; height: 18px; fill: currentColor; flex: 0 0 auto; }
.admin-head nav { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.admin-head nav a { display: inline-flex; align-items: center; min-height: 34px; color: var(--ink); font-size: 14px; }
.admin-unlock-form { display: flex; gap: 6px; align-items: center; margin: 0; }
.admin-unlock-form .input { margin: 0; width: 132px; }
.admin-unlock-form input { height: 34px; min-height: 34px; padding: 0 9px; font-size: 13px; line-height: 34px; }
.admin-unlock-form button { height: 34px; min-height: 34px; margin: 0; padding: 0 10px; font-size: 13px; line-height: 1; white-space: nowrap; }
.inline-admin-form { display: flex; gap: 8px; align-items: center; margin: 0; }
.inline-admin-form .input { width: 110px; margin: 0; }
.inline-admin-form select { min-height: 34px; padding: 6px 28px 6px 10px; font-size: 13px; }
.inline-admin-form button { min-height: 34px; }
.creator-name-form { display: flex; gap: 8px; align-items: center; margin: 0; }
.creator-name-form .input { width: 180px; margin: 0; }
.creator-name-form input { min-height: 34px; padding: 6px 10px; font-size: 13px; }
.creator-name-form button { min-height: 34px; }
.page { max-width: 1120px; margin: 0 auto; padding: 24px clamp(14px, 4vw, 32px) 116px; }
.hero { padding: 30px 0 24px; }
.hero h1 { margin: 0 0 18px; font-size: clamp(28px, 4vw, 44px); letter-spacing: 0; }
.compact h1 { margin-bottom: 8px; }
.search-form { display: flex; gap: 10px; align-items: stretch; max-width: 780px; }
.search-form .input { flex: 1; margin: 0; }
form .input { margin-bottom: 18px; }
input, textarea, select { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; font: inherit; background: #fff; color: var(--ink); transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
input:focus, textarea:focus, select:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(15, 138, 157, .14); background: var(--field); }
textarea { min-height: 168px; resize: vertical; line-height: 1.7; }
input[type="file"] { min-height: 56px; padding: 10px; background: var(--field); }
input[type="file"]::file-selector-button { min-height: 34px; margin-right: 12px; padding: 0 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); font-weight: 700; cursor: pointer; }
label { display: block; margin: 0 0 8px; font-weight: 800; line-height: 1.4; }
button, .primary, .small-button, .like-button, .add-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border: 0; border-radius: 6px; color: #fff; background: var(--accent); font-weight: 800; cursor: pointer; transition: background .15s ease, transform .15s ease, box-shadow .15s ease; }
button:hover, .primary:hover, .add-button:hover { background: var(--accent-dark); }
button:active, .primary:active, .add-button:active { transform: translateY(1px); }
.add-button { margin-top: 14px; background: var(--accent-2); }
.secondary, .small-button { background: #eef3f6; color: var(--ink); }
.small-button { min-height: 34px; font-size: 13px; }
.band, .form-panel, .detail { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.form-panel { max-width: 880px; }
.form-panel h1, .form-panel h2 { margin-top: 0; margin-bottom: 26px; letter-spacing: 0; }
.form-panel form > button, .form-panel form > .primary { margin-top: 10px; min-width: 128px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.post-card { display: grid; grid-template-columns: 112px 1fr; gap: 12px; min-height: 142px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.thumb { width: 112px; height: 100%; min-height: 142px; object-fit: cover; background: var(--soft); }
.thumb-empty { display: grid; place-items: center; color: var(--muted); font-weight: 800; }
.card-body { padding: 12px 12px 12px 0; }
.card-body h3 { margin: 0 0 8px; font-size: 17px; line-height: 1.35; }
.card-body p { margin: 0 0 10px; color: #344150; line-height: 1.6; }
.meta { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chips span, .theme-grid a { display: inline-flex; padding: 6px 10px; border-radius: 999px; background: #eef7f8; color: #0c6371; font-size: 13px; }
.theme-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-picker { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 18px; }
.tag-picker button { min-height: 32px; padding: 0 10px; border-radius: 999px; background: #eef7f8; color: #0c6371; font-size: 13px; }
.embed-frame { position: relative; width: 100%; max-width: 720px; aspect-ratio: 16 / 9; background: #10151c; border-radius: 8px; overflow: hidden; }
.embed-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.source-url { overflow-wrap: anywhere; color: var(--muted); font-size: 13px; }
.body-text { max-width: 820px; line-height: 1.9; }
.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 16px 0; }
.image-grid.small { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
.image-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.reply { margin: 12px 0; padding: 14px; border-left: 4px solid var(--accent); background: var(--soft); border-radius: 6px; }
.is-hidden { opacity: .55; }
.admin-head { display: flex; justify-content: space-between; gap: 14px; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.admin-list { display: grid; gap: 10px; }
.admin-list article { padding: 14px; border: 1px solid var(--line); border-radius: 8px; }
.log-table { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.log-table table { width: 100%; border-collapse: collapse; min-width: 760px; }
.log-table th, .log-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; font-size: 13px; }
.log-table th { background: var(--soft); white-space: nowrap; }
.access-page { min-height: 100vh; display: grid; place-items: center; background: #f3f7fa; padding: 20px; }
.access-box { width: min(460px, 100%); padding: clamp(28px, 5vw, 36px); border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 18px 44px rgba(26,42,56,.12); }
.access-box h1 { margin: 0 0 24px; font-size: clamp(26px, 5vw, 32px); line-height: 1.35; letter-spacing: 0; }
.access-form { display: grid; gap: 16px; }
.access-form .input { margin: 0; }
.access-form .primary { width: 100%; margin-top: 2px; }
.access-note { margin: 22px 0 0; color: var(--muted); line-height: 1.85; font-size: 15px; }
.access-box > .access-note { margin: 0 0 22px; }
.issued-password { display: grid; gap: 14px; }
.issued-password code, .log-table code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-weight: 700; }
.copy-button { min-height: 30px; margin-left: 8px; padding: 0 10px; background: #eef3f6; color: var(--ink); font-size: 12px; }
.password-current { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 18px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--soft); }
.password-current span { color: var(--muted); font-size: 13px; font-weight: 800; }
.password-current code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-weight: 800; }
.account-head { padding: 12px 0 8px; }
.account-head h1 { margin: 0 0 8px; letter-spacing: 0; }
.account-head p { margin: 0; color: var(--muted); line-height: 1.7; }
.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 18px; }
.account-panel { padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.account-panel h2 { margin: 0 0 16px; font-size: 20px; letter-spacing: 0; }
.account-list { display: grid; gap: 14px; margin: 0 0 18px; }
.account-list div { display: grid; gap: 4px; }
.account-list dt { color: var(--muted); font-size: 13px; font-weight: 800; }
.account-list dd { margin: 0; font-weight: 800; line-height: 1.6; }
.password-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.password-row code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.account-logout { width: 100%; }
.account-admin-form { margin: 0; }
.account-admin-form .primary { width: 100%; }
.fixed-search { position: fixed; right: clamp(118px, 12vw, 148px); bottom: 18px; left: clamp(16px, 4vw, 40px); z-index: 35; display: grid; grid-template-columns: minmax(0, 1fr) 86px; gap: 8px; max-width: 760px; margin: 0 auto; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.97); box-shadow: 0 12px 34px rgba(26,42,56,.16); backdrop-filter: blur(10px); }
.fixed-search .input { margin: 0; }
.fixed-search input { height: 48px; min-height: 48px; border-radius: 8px; font-size: 16px; }
.fixed-search button { gap: 5px; width: 86px; height: 48px; min-height: 48px; padding: 0 10px; border-radius: 8px; white-space: nowrap; }
.fixed-search button svg { width: 22px; height: 22px; fill: currentColor; }
.fixed-search button span { font-size: 14px; }
.post-fab { position: fixed; right: 18px; bottom: 20px; z-index: 40; display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border: 4px solid #fff; border-radius: 999px; background: var(--accent-2); color: #fff; box-shadow: 0 14px 30px rgba(26,42,56,.24); }
.post-fab svg { width: 34px; height: 34px; fill: currentColor; }
.message { margin: 0 0 16px; padding: 12px; border-radius: 6px; background: #fff2f5; color: #8f1740; }
.success { background: #ecf8f4; color: #12664f; }
.muted { color: var(--muted); }
@media (max-width: 700px) {
  .site-header { justify-content: space-between; min-height: 58px; padding: 10px 12px; }
  .brand { display: block; max-width: calc(100% - 112px); font-size: 14px; line-height: 1.35; text-align: left; }
  .header-actions { flex: 0 0 auto; gap: 6px; }
  .icon-button { width: 44px; min-height: 44px; padding: 0; border-radius: 999px; }
  .icon-button span { display: none; }
  .icon-button svg { width: 21px; height: 21px; }
  .page { padding: 18px 12px 118px; }
  .search-form { flex-direction: column; }
  .form-panel form > button, .form-panel form > .primary { width: 100%; }
  .log-table { border-radius: 6px; }
  .log-table table { min-width: 680px; }
  .inline-admin-form { gap: 6px; }
  .inline-admin-form .input { width: 104px; }
  .creator-name-form { align-items: stretch; flex-direction: column; }
  .creator-name-form .input { width: 100%; }
  .account-grid { grid-template-columns: 1fr; }
  .account-panel { padding: 16px; }
  .fixed-search { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); left: 12px; grid-template-columns: minmax(0, 1fr) 74px; padding: 7px; border-radius: 12px; }
  .fixed-search input { height: 46px; min-height: 46px; padding-right: 12px; }
  .fixed-search button { width: 74px; height: 46px; min-height: 46px; padding: 0 8px; }
  .fixed-search button svg { width: 19px; height: 19px; }
  .fixed-search button span { font-size: 13px; }
  .post-fab { right: 16px; bottom: calc(86px + env(safe-area-inset-bottom)); width: 58px; height: 58px; border-width: 4px; }
  .post-fab svg { width: 31px; height: 31px; }
  .post-card { grid-template-columns: 92px 1fr; }
  .thumb { width: 92px; min-height: 132px; }
}
