/* mbako — design tokens (matcha) */
:root {
  --bg: #f5f2ec;
  --surface: #ffffff;
  --surface-2: #eee9e0;
  --line: #d8e8d0;
  --line-soft: #e6ddd0;
  --primary: #2d5c1e;
  --primary-soft: #c8dfc0;
  --primary-tint: #deecd8;
  --text: #2a2a1e;
  --text-soft: #6a7a5a;
  --text-muted: #8aab82;
  --danger: #b03030;
  --warn: #b06b00;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 2px 8px rgba(45, 92, 30, 0.08);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  /* Kill the vertical rubber-band overscroll. Without this, pulling down
     at the top (the pull-to-refresh gesture) lets the whole document —
     including the sticky top menu — bounce down. Suppressing it keeps the
     top menu fixed during the pull; only the custom PTR spinner moves.
     Vertical only — horizontal is left default so the native left-edge
     back-swipe still works in regular browsers. */
  overscroll-behavior-y: none;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI", "Noto Sans JP", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* iOS Safari auto-zooms into any input/textarea/select whose effective
   font-size is < 16px on focus. The body baseline is 15px, so every form
   field inherits a sub-16 size and triggers the zoom. Force 16px on touch
   devices only — desktop sizing is left untouched. !important is needed
   because per-form rules below override `font: inherit`. */
@media (pointer: coarse) {
  input, textarea, select { font-size: 16px !important; }
}

/* layout */
.app {
  display: grid;
  grid-template-columns: 220px minmax(0, 600px) 280px;
  gap: 0;
  max-width: 1180px;
  margin: 0 auto;
  min-height: 100vh;
}
/* While a swipe-back gesture drags .main (JS sets translateX on it), a
   left-edge shadow makes the post panel read as sliding away over the
   surface beneath — the top menu (.sidebar) stays fixed above it. .main
   is already opaque (var(--surface)), so no background override needed. */
.main.is-swiping-back {
  box-shadow: -10px 0 28px rgba(0, 0, 0, 0.2);
}
/* Pages that don't render the right rail (e.g. /admin, /settings) drop the
   3rd column and let the main panel widen. Sidebar width is unchanged. */
.app-no-rail {
  grid-template-columns: 220px minmax(0, 1fr);
  max-width: 1100px;
}
.sidebar {
  background: var(--surface-2);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 0;
  height: 100vh;
  /* Default stacking puts the later-in-DOM main content above the sticky
     sidebar; bump z-index so post avatars don't bleed through during scroll
     (mobile) or when content scrolls under the desktop sidebar. */
  z-index: 100;
}
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--primary);
  margin: 8px 0 24px;
  text-decoration: none;
  text-align: center;
}
.brand-mark-img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--primary-tint);
  display: block;
}
.brand-name { font-size: 16px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
/* nav-group is a grouping wrapper used to keep "main" and "secondary" nav
   visually separable on the mobile 2-row layout. On wider widths it's
   transparent (display: contents) so links flow as direct .nav children. */
.nav-group { display: contents; }
.nav-link {
  display: block;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}
.nav-link:hover { background: rgba(45, 92, 30, 0.08); text-decoration: none; }
.nav-link.as-button {
  background: none; border: 0; font: inherit; text-align: left; width: 100%; cursor: pointer; color: inherit;
}
.logout-form { margin: 0; }
.sidebar-foot { margin-top: auto; color: var(--text-muted); font-size: 12px; text-align: left; }
.sidebar-foot p { margin: 0; }
.sidebar-foot p + p { margin-top: 2px; }

.main {
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: var(--surface);
  min-height: 100vh;
}
.rail { padding: 24px 16px; }
.rail-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}
.rail-card h3 { margin: 0 0 8px; font-size: 14px; color: var(--primary); }
.rail-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text-soft);
  font-size: 13px;
}
.rail-card li { padding-left: 1em; text-indent: -1em; }
.rail-card li::before { content: "・"; }
/* Many system fonts don't ship a bold variant for symbol glyphs like ↳
   or ♥, so <b> has no visible effect on them. Stack a half-pixel
   self-shadow so the bolded segments read as heavier across browsers. */
.rail-card li b, .usage li b { text-shadow: 0 0 0.5px currentColor; }

.page-head { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.page-head h1 { margin: 0; font-size: 18px; }
.page-head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.refresh-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background-color .12s ease, opacity .12s ease;
}
.refresh-btn:hover { background: var(--line); }
.refresh-btn:disabled { opacity: 0.6; cursor: default; }
.load-more {
  display: block;
  width: calc(100% - 36px);
  margin: 12px 18px 24px;
  padding: 10px 16px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 14px;
  cursor: pointer;
  transition: background-color .12s ease, opacity .12s ease;
}
.load-more:hover { background: var(--line); }
.load-more:disabled { opacity: 0.6; cursor: default; }

/* Composer schedule controls (admin only). */
.composer-schedule-toggle { user-select: none; }
.composer-schedule-row { padding: 4px 0 0; }
.composer-schedule-row input[type="datetime-local"] {
  font: inherit;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
}

/* Tab count pill (e.g. 予約 (3)). */
.tab-count {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--ink);
  font-size: 11px;
  border-radius: 999px;
  padding: 0 6px;
  min-width: 16px;
  text-align: center;
  margin-left: 2px;
}

/* Scheduled-post row in the 予約 tab. */
/* Scheduled-post row inherits .post grid (avatar | main column) so it
   visually matches normal posts; just disable card click navigation since
   there's no permalink for an unpublished post. */
.post-scheduled { cursor: default; }
.post-scheduled:hover { background: transparent; }
.post-scheduled-time { color: var(--primary); font-weight: 600; font-size: 13px; }
.schedule-edit-form { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.schedule-edit-form .btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  color: var(--danger, #b03030);
}
.schedule-edit-form .btn-ghost:hover { background: rgba(176, 48, 48, 0.08); }
.schedule-edit-form textarea {
  font: inherit;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  resize: vertical;
  background: var(--bg);
  color: var(--ink);
}
.schedule-edit-form input[type="datetime-local"] {
  font: inherit;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  margin-left: 8px;
}
.schedule-edit-row { display: flex; gap: 8px; }

.scheduled-images .scheduled-image { position: relative; min-width: 0; }
/* Mirror the asymmetric count-3 layout: parent rule targets img:first-child,
   but our wrapper now sits between, so apply the row-span to the wrapper. */
.scheduled-images.count-3 > .scheduled-image:first-child { grid-row: span 2; }
.scheduled-image-actions {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  gap: 6px;
  z-index: 2;
}
.scheduled-image-actions .btn-ghost {
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
.scheduled-image-actions .btn-ghost:hover { background: rgba(0, 0, 0, 0.8); }
.scheduled-image-replace.is-busy { opacity: 0.6; pointer-events: none; }
.scheduled-image-replace input[type="file"] { display: none; }

/* composer */
.composer {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.composer textarea {
  width: 100%;
  border: 0;
  resize: vertical;
  font: inherit;
  background: transparent;
  outline: none;
  min-height: 60px;
}
.composer-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.composer-count { color: var(--text-muted); font-size: 12px; margin-left: auto; }
.composer-thumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.composer-thumbs img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.file-pick {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  color: var(--primary);
  background: #fff;
  border: 1px solid var(--primary);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  line-height: 1.4;
  transition: background 0.1s ease;
}
.file-pick:hover { background: var(--primary-tint); }
.file-pick:active { background: var(--primary-soft); }

.btn {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  font: inherit;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: #244c18; text-decoration: none; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
/* Anchor-styled buttons live alongside <button> in settings forms. */
a.btn { display: inline-block; text-decoration: none; }
a.btn:hover { text-decoration: none; }
.settings-btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }

/* feed / posts */
.feed { display: flex; flex-direction: column; }
.empty { padding: 32px; color: var(--text-muted); text-align: center; }
.post {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.post { cursor: pointer; }
.post:hover { background: rgba(222, 236, 216, 0.18); }
/* Reset cursor on interactive descendants so the click target is clear. */
.post a, .post button, .post textarea, .post input, .post label,
.post .post-images img { cursor: auto; }
.post a, .post button, .post .post-images img { cursor: pointer; }
.post-avatar {
  /* Shrink the click target to the actual avatar circle (40px) and align
     it to the top of the grid cell so the rest of the row click-routes
     to the permalink. */
  display: inline-block;
  width: 40px;
  height: 40px;
  align-self: start;
  border-radius: 50%;
  transition: filter 0.12s ease, transform 0.12s ease;
}
.post-avatar:hover { filter: brightness(0.92); }

.avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--primary-soft);
  display: inline-grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
}
.avatar-wrap {
  position: relative;
  display: inline-block;
  line-height: 0;
  /* Avatar-wrap is sometimes a flex item (e.g. user list, post header).
     Without this, align-items:stretch on the parent would vertically stretch
     the wrap, and .avatar-badge's percentage-based height would deform. */
  align-self: flex-start;
}
.avatar-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 45%;
  height: 45%;
  min-width: 14px;
  min-height: 14px;
  max-width: 28px;
  max-height: 28px;
  pointer-events: none;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}
/* Embedded post avatars are tiny (18px); shrink the badge accordingly. */
.post-avatar-mini .avatar-badge {
  min-width: 10px; min-height: 10px;
  width: 60%; height: 60%;
  top: -3px; right: -3px;
}
.post-main { min-width: 0; }
.post-head { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; font-size: 14px; }
.post-name { color: var(--text); font-weight: 700; }
.post-handle, .post-time, .post-dot { color: var(--text-muted); }
.post-body { white-space: pre-wrap; word-break: break-word; margin: 4px 0 8px; }
.post-body a.mention { color: var(--primary); font-weight: 500; }
.post-body a.mention:hover { text-decoration: underline; }
/* YouTube click-to-play facade */
.post-embeds { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.yt-facade {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}
.yt-facade-btn {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.yt-facade-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* hqdefault is 4:3 with letterbox bars; cover crops them to fill 16:9 */
}
.yt-facade-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 48px;
  border-radius: 12px;
  background: rgba(18, 18, 18, 0.78);
  pointer-events: none;
  transition: background 0.15s ease;
}
.yt-facade-play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 52%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 11px 0 11px 19px;
  border-color: transparent transparent transparent #fff;
}
.yt-facade-btn:hover .yt-facade-play,
.yt-facade-btn:focus-visible .yt-facade-play { background: var(--primary, #c00); }
.yt-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  /* Promote the iframe to its own stable compositing layer. A cross-origin
     iframe under a CSS-transformed ancestor (the pull-to-refresh / swipe-back
     translate on .main) otherwise ghosts on mobile WebKit/Blink — the
     vacated region isn't repainted and the page header smears into a
     duplicate. Forcing a backing layer keeps the transform compositing
     clean. */
  transform: translateZ(0);
  backface-visibility: hidden;
}
/* During the horizontal swipe-back gesture, .main is moved with a CSS
   transform. A cross-origin iframe under a transformed ancestor ghosts on
   iOS WebKit (the page header smears into a duplicate), so hide the player
   for the duration — the .yt-facade keeps its 16:9 box, so no layout jump,
   and audio keeps playing in the hidden iframe. (Pull-to-refresh no longer
   uses transform — it moves .main via margin-top — so it doesn't need this.) */
.main.is-swiping-back .yt-frame { display: none; }

.post-images {
  display: grid;
  gap: 4px;
  margin-top: 6px;
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 480px;
}
.post-images img { width: 100%; height: auto; background: var(--primary-tint); cursor: zoom-in; }
.post-images.count-2 { grid-template-columns: 1fr 1fr; }
.post-images.count-3 { grid-template-columns: 1fr 1fr; }
.post-images.count-3 img:first-child { grid-row: span 2; }
.post-images.count-4 { grid-template-columns: 1fr 1fr; }

.post-actions { display: flex; gap: 22px; margin-top: 8px; color: var(--text-muted); }
.act {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  padding: 4px 8px;
  border-radius: 999px;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.act:hover { background: var(--primary-tint); color: var(--primary); }
.act-icon { font-size: 16px; line-height: 1; }
.act-count { font-size: 13px; min-width: 1ch; }
.act.is-on { color: var(--primary); font-weight: 700; }
.act-love.is-on { color: #c4488d; }
.act-love.is-on:hover { background: #fbe6f1; }
.act-love .love-on { display: none; }
.act-love.is-on .love-off { display: none; }
.act-love.is-on .love-on { display: inline; }

/* Click feedback animations on the action icons. The class is added by
   JS after each successful toggle (and reseated via reflow so rapid
   taps re-trigger). The animation runs once and stays settled. */
.act-icon { display: inline-block; transform-origin: center; }
.act-reburst .act-pulse { animation: reburst-spin 0.5s ease; }
.act-love .act-pulse { animation: love-pop 0.45s cubic-bezier(.34,1.56,.64,1); }
.act-blur .act-pulse { animation: blur-flip 0.5s cubic-bezier(.34,1.56,.64,1); }
@keyframes reburst-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes love-pop {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.45); }
  60%  { transform: scale(0.9); }
  100% { transform: scale(1); }
}
@keyframes blur-flip {
  0%   { transform: rotate(0deg)   scale(1); }
  50%  { transform: rotate(180deg) scale(1.4); }
  100% { transform: rotate(360deg) scale(1); }
}
.act-del:hover { color: var(--danger); background: #fdecec; }
.act-blur:hover { color: var(--warn); background: #fff5e0; }
.act-blur.is-on { color: var(--warn); }

/* Sensitive image blur. Click anywhere on the container to clear. */
.post-images.is-sensitive { position: relative; cursor: pointer; }
.post-images.is-sensitive img {
  filter: blur(28px) brightness(0.6);
  transition: filter 0.25s ease;
  pointer-events: none;
}
.post-images.is-sensitive .sensitive-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  pointer-events: none;
  white-space: nowrap;
}
/* "クリック" on desktop, "タップ" on touch devices. The locked variant
   keeps its own HTML content (it has a signup link), so this rule only
   targets the empty unlocked overlay. */
.post-images.is-sensitive .sensitive-overlay:not(.sensitive-overlay-locked)::after {
  content: "センシティブな内容です。クリックで表示";
}
@media (hover: none) and (pointer: coarse) {
  .post-images.is-sensitive .sensitive-overlay:not(.sensitive-overlay-locked)::after {
    content: "センシティブな内容です。タップで表示";
  }
}
.post-images.is-sensitive.is-revealed { cursor: zoom-in; }
.post-images.is-sensitive.is-revealed img { filter: none; pointer-events: auto; }
.post-images.is-sensitive.is-revealed .sensitive-overlay { display: none; }
/* Locked variant for logged-out viewers: they can't reveal, so the overlay
   sits on top permanently and exposes a clickable signup link. The pill
   itself becomes interactive (pointer-events: auto on the link) while the
   surrounding image area stays click-swallowed by JS. */
.post-images.is-sensitive.is-locked { cursor: default; }
.post-images.is-sensitive.is-locked .sensitive-overlay-locked {
  white-space: normal;
  text-align: center;
  line-height: 1.5;
  max-width: 80%;
  padding: 10px 18px;
}
.post-images.is-sensitive.is-locked .sensitive-overlay-locked a {
  color: #fff;
  text-decoration: underline;
  pointer-events: auto;
  font-weight: 600;
}

/* Composer sensitive checkbox sits below the file picker row. */
.composer-sensitive {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-soft);
  cursor: pointer;
  padding: 2px 0;
}
.composer-sensitive input { accent-color: var(--primary); }

/* reply header (above post body) */
.reply-head { font-size: 12px; color: var(--text-muted); margin: 0 0 4px; }
.reply-head a { color: inherit; }

/* reburst attribution (RT-style header above the whole post grid) */
.reburst-head {
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 6px;
  padding-left: 4px;
}
.reburst-head a { color: inherit; }
.reburst-head a:hover { text-decoration: underline; }

/* reply composer (was retalk-composer) */
.reply-composer {
  margin-top: 8px;
  padding: 10px;
  background: var(--surface-2);
  border-radius: var(--radius);
}
.reply-composer textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font: inherit;
  padding: 6px 8px;
  resize: vertical;
}
.reply-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.reply-count { color: var(--text-muted); font-size: 12px; margin-right: auto; }
.btn-ghost {
  background: transparent; color: var(--text-soft); border: 1px solid var(--line);
}
.btn-ghost:hover { background: #fff; }
.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover { background: #8a2424; }
.settings-danger { border: 1px solid #f3c2c2; background: #fff7f7; }
.settings-danger h2 { color: var(--danger); }
.settings-danger details { margin-top: 8px; }
.settings-danger summary { cursor: pointer; color: var(--danger); }
.settings-danger code {
  background: #fff;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--line);
  font-size: 12px;
}
.sr-only { position: absolute; left: -9999px; }

/* profile */
.profile-head { padding: 18px; border-bottom: 1px solid var(--line); }
.profile-avatar .avatar { width: 80px; height: 80px; font-size: 28px; }
.profile-name { margin: 8px 0 0; font-size: 22px; }
.profile-handle { color: var(--text-muted); margin: 0; }
.profile-bio { margin-top: 8px; white-space: pre-wrap; }
.profile-stats { margin-top: 8px; display: flex; gap: 16px; align-items: center; color: var(--text-soft); font-size: 14px; flex-wrap: wrap; }
.profile-stats b { color: var(--text); }
.profile-stats a { color: inherit; text-decoration: none; }
.profile-stats a:hover b { text-decoration: underline; }
.profile-stats .btn-follow { margin-top: 0; padding: 4px 14px; font-size: 13px; }

.user-list { list-style: none; margin: 0; padding: 0; }
.user-list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px; border-bottom: 1px solid var(--line);
}
.user-list-item .btn-follow { margin-top: 0; flex-shrink: 0; }
.user-list-main { display: flex; gap: 12px; flex: 1; min-width: 0; color: inherit; text-decoration: none; align-items: flex-start; }
.user-list-main:hover { background: transparent; }
.user-list-main:hover .user-list-meta b { text-decoration: underline; }
.user-list-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.user-list-handle { color: var(--text-muted); font-size: 14px; }
.user-list-bio { color: var(--text-soft); font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.user-list .empty { padding: 18px; color: var(--text-soft); }
.btn-follow {
  margin-top: 10px;
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
}
.btn-follow:hover { background: #244c18; }
.btn-follow .follow-text-on { display: none; }
.btn-follow .follow-text-off { display: inline; }
.btn-follow.is-on {
  background: #fff;
  color: var(--primary);
}
.btn-follow.is-on .follow-text-on { display: inline; }
.btn-follow.is-on .follow-text-off { display: none; }
.btn-follow.is-on:hover {
  background: #fdecec;
  border-color: var(--danger);
  color: var(--danger);
}
.btn-follow.is-on:hover .follow-text-on { display: none; }
.btn-follow.is-on:hover .follow-text-off::before { content: "フォロー解除"; }
.btn-follow.is-on:hover .follow-text-off { display: inline; visibility: hidden; position: relative; }
.btn-bell {
  margin-left: 6px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-soft);
  border-radius: 999px;
  width: 32px;
  height: 32px;
  padding: 0;
  cursor: pointer;
  font-size: 14px;
  vertical-align: middle;
  transition: background-color .12s ease, color .12s ease;
}
.btn-bell:hover { background: var(--line); }
.btn-bell.is-on { background: var(--primary-tint); color: var(--primary); border-color: var(--primary); }
.btn-bell:disabled { opacity: 0.6; cursor: default; }

/* Notifications gear link in the page-head row. */
.notif-settings-link {
  font-size: 22px;
  text-decoration: none;
  color: var(--text-soft);
  padding: 4px 8px;
  line-height: 1;
}
.notif-settings-link:hover { color: var(--primary); }

/* Notification preferences — toggle-switch list. Each row is a label with
   the description on the left and a toggle on the right. The native
   checkbox stays in the DOM (visually hidden) so form values + keyboard
   accessibility still work. */
.notif-prefs-form { display: flex; flex-direction: column; gap: 0; padding: 0 18px 18px; }
.notif-pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
}
.notif-pref-row:last-of-type { border-bottom: 0; }
/* The row right before the section separator already gets a line from the
   hr; drop its own border-bottom so the two don't double up. */
.notif-pref-row:has(+ .notif-pref-sep) { border-bottom: 0; }
.notif-pref-label { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif-pref-hint { color: var(--text-soft); font-size: 12px; }
.notif-pref-sep { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }

.notif-toggle { position: relative; flex-shrink: 0; width: 44px; height: 24px; }
.notif-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.notif-toggle-track {
  display: block;
  width: 100%;
  height: 100%;
  background: #d1d4d0;
  border-radius: 999px;
  transition: background-color .15s ease;
}
.notif-toggle-thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.18);
  transition: transform .15s ease;
}
.notif-toggle input:checked ~ .notif-toggle-track { background: var(--primary); }
.notif-toggle input:checked ~ .notif-toggle-track .notif-toggle-thumb { transform: translateX(20px); }
.notif-toggle input:focus-visible ~ .notif-toggle-track {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.notif-toggle input:disabled ~ .notif-toggle-track { opacity: 0.4; }
/* When master is OFF, sub-toggles are visually disabled but stay clickable
   in case the user re-enables them while master is still off. */
.notif-prefs-form.is-master-off .notif-pref-row:not(:first-of-type) .notif-pref-label {
  opacity: 0.5;
}

.notif-prefs-saved {
  color: var(--text-soft);
  font-size: 12px;
  margin: 8px 0 0;
  min-height: 18px;
}

.btn-follow.is-on:hover .follow-text-off::before {
  visibility: visible; position: absolute; left: 0; top: 0; width: 100%;
}
.profile-link a { word-break: break-all; }
.badge {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  background: var(--primary); color: #fff; font-size: 11px; vertical-align: middle;
}
.badge-warn { background: var(--warn); }
.badge-mod { background: #c8dfc0; color: #244c18; }
.badge-supporter { background: #b6d4f0; color: #1a3c66; }
.profile-edit { margin-top: 12px; }
.profile-edit form { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--surface-2); border-radius: var(--radius); }
.profile-edit label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-soft); }
.profile-edit input, .profile-edit textarea {
  border: 1px solid var(--line); padding: 6px 10px; border-radius: var(--radius-sm); font: inherit; background: #fff;
}

.profile-tabs {
  display: flex; border-bottom: 1px solid var(--line);
}
.tab {
  flex: 1; text-align: center; padding: 12px; color: var(--text-muted); font-weight: 600;
}
.tab.is-on { color: var(--primary); border-bottom: 2px solid var(--primary); }
.tab-panel { display: none; }
.tab-panel.is-on { display: flex; flex-direction: column; }

/* auth */
.auth-form {
  max-width: 360px; margin: 24px auto; padding: 24px; background: var(--surface-2); border-radius: var(--radius);
  display: flex; flex-direction: column; gap: 12px;
}
.auth-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-soft); }
.auth-form input {
  padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font: inherit; background: #fff;
}
.auth-form button { margin-top: 4px; }
.auth-alt { text-align: center; color: var(--text-muted); margin: 12px 0; }
.auth-note { text-align: center; color: var(--text-muted); font-size: 12px; }
.signin-prompt { padding: 18px; color: var(--text-muted); }
.error { color: var(--danger); padding: 8px 18px; }

/* unverified email banner */
.verify-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: #fff8e1;
  color: #6b4d00;
  border-bottom: 1px solid #f0d68a;
  font-size: 13px;
  flex-wrap: wrap;
}
.verify-banner .btn { margin-left: auto; padding: 4px 12px; font-size: 12px; }
.verify-banner-frozen { background: #fbeaea; color: #6b1a1a; border-bottom-color: #e0a0a0; }
.verify-banner-warn { background: #fff5e0; color: #6b4a00; border-bottom-color: #e8c97a; }
.verify-banner-info { background: #e8f3ec; color: #225a35; border-bottom-color: #9ec8b0; }

/* settings */
.settings-section {
  padding: 18px;
  border-bottom: 1px solid var(--line);
}
.settings-section h2 { margin: 0 0 10px; font-size: 16px; color: var(--primary); }
.settings-form {
  display: flex; flex-direction: column; gap: 10px;
  max-width: 360px;
}
.settings-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-soft); }
.settings-form input {
  padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font: inherit; background: #fff;
}
.settings-note { color: var(--text-soft); font-size: 13px; margin: 0 0 12px; }
.passkey-list {
  list-style: none; padding: 0; margin: 0 0 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.passkey-list li {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff;
}
.passkey-meta { font-size: 13px; color: var(--text-soft); flex: 1; min-width: 0; }
.passkey-meta code { background: var(--surface-2); padding: 1px 4px; border-radius: 4px; font-size: 11px; }
.passkey-list li button { margin-left: auto; }

/* auth: passkey separator + button */
.auth-or {
  display: flex; align-items: center; gap: 8px;
  margin: 16px auto 8px; max-width: 360px;
  color: var(--text-muted); font-size: 12px;
}
.auth-or::before, .auth-or::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
.btn-passkey {
  display: block; margin: 0 auto; max-width: 360px; width: 100%;
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  font: inherit;
}
.btn-passkey:hover:not(:disabled) { background: var(--primary-tint); }
.btn-passkey:disabled { opacity: 0.5; cursor: not-allowed; }

/* lightbox */
.no-scroll { overflow: hidden; }
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 9999;
  /* The track owns its own touch-action; the backdrop swallows the rest
     so iOS doesn't try to rubber-band the page underneath. */
  touch-action: none;
  animation: lightbox-fade 0.15s ease-out;
  overflow: hidden;
}
@keyframes lightbox-fade { from { opacity: 0; } to { opacity: 1; } }
.lightbox-track {
  display: flex;
  width: 100vw;
  height: 100vh;
  height: 100dvh; /* fall through above when supported */
  transition: transform 0.22s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
  /* Pointer-mode cursor affordances: grab on hover (desktop), grabbing
     while a drag is active. Coarse pointers (touch) get neither —
     irrelevant there. */
  cursor: grab;
  /* The track itself owns the swipe; prevent the browser from trying to
     pan/zoom in any direction so our pointer handlers stay in charge. */
  touch-action: none;
}
.lightbox-track.is-dragging {
  transition: none;
  cursor: grabbing;
}
@media (pointer: coarse) {
  .lightbox-track, .lightbox-track.is-dragging { cursor: default; }
}
.lightbox-slide {
  flex: 0 0 100vw;
  min-width: 100vw;
  display: grid;
  place-items: center;
  padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0)
          env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
  box-sizing: border-box;
}
.lightbox-img {
  max-width: 100vw;
  max-height: 100vh;
  max-height: 100dvh;
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: default;
  user-select: none;
  -webkit-user-drag: none;
  /* Suppress iOS's long-press save-image callout so it doesn't intercept
     swipe gestures or interrupt the slide animation. */
  -webkit-touch-callout: none;
}
.lightbox-close {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(4px);
  z-index: 2;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.28); }
/* Multi-image controls — desktop-friendly arrows + small counter pill. */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(4px);
  z-index: 2;
  padding: 0 0 4px 0; /* nudge chevron centering */
}
.lightbox-nav:hover:not(:disabled) { background: rgba(255, 255, 255, 0.28); }
.lightbox-nav:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}
.lightbox-prev { left: max(12px, env(safe-area-inset-left)); }
.lightbox-next { right: max(12px, env(safe-area-inset-right)); }
.lightbox-counter {
  position: absolute;
  bottom: max(16px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 999px;
  pointer-events: none;
  z-index: 2;
}
/* On touch-only viewports the nav arrows mostly waste screen real estate
   (the user can swipe). Keep them for desktop / pointer devices only. */
@media (pointer: coarse) {
  .lightbox-nav { display: none; }
}

/* terms */
.terms { padding: 18px; line-height: 1.7; }
.terms h2 { font-size: 15px; margin: 24px 0 8px; font-weight: 700; }
.terms h2:first-child { margin-top: 0; }
.terms p { margin: 0 0 8px; }
.terms ul { margin: 0 0 8px; padding-left: 1.2em; }
.terms li { margin: 0 0 4px; }

/* usage page (mirror of the desktop rail card) */
.usage { padding: 18px; color: var(--text-soft); }
.usage ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.usage li { padding-left: 1em; text-indent: -1em; }
.usage li::before { content: "・"; }

/* Nav items that only appear once the sidebar foot / right rail collapse.
   Desktop hides them; narrow layouts surface them inline with the menu. */
.nav-narrow-only { display: none; }
.nav-link-static { color: var(--text-muted); cursor: default; }
.nav-link-static:hover { background: transparent; }
@media (max-width: 980px) {
  .nav-narrow-only { display: block; }
}

/* admin */
.admin-events-link {
  font-size: 12px;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--primary-tint);
  color: var(--primary);
  text-decoration: none;
}
.admin-events-link:hover { background: var(--primary-soft); text-decoration: none; }
.admin-events { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.admin-events th, .admin-events td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.admin-events th { font-size: 12px; color: var(--text-soft); font-weight: 500; }
.admin-events code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.admin-events-ua { max-width: 360px; overflow-wrap: anywhere; word-break: break-all; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.admin-table button { font: inherit; padding: 4px 10px; border: 1px solid var(--line); background: #fff; border-radius: 6px; cursor: pointer; }
.admin-table button:hover { background: var(--primary-tint); border-color: var(--primary); color: var(--primary); }
.admin-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-table .admin-danger { color: var(--danger); border-color: #f3c2c2; }
.admin-table .admin-danger:hover { background: #fdecec; border-color: var(--danger); color: var(--danger); }
.admin-state {
  display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px;
  background: #eef0ea; color: var(--text-soft);
}
.admin-state-admin { background: var(--primary); color: #fff; }
.admin-state-mod { background: #c8dfc0; color: #244c18; }
.admin-state-ban { background: #b03030; color: #fff; }
.admin-state-frozen { background: #f0c850; color: #5a3f00; }
.admin-state-supporter { background: #b6d4f0; color: #1a3c66; }
.admin-row-frozen { background: rgba(255, 248, 225, 0.5); }
.admin-muted { color: var(--text-muted); }

/* responsive */
@media (max-width: 980px) {
  /* Right rail (使い方) is hidden; left sidebar shrinks just enough that
     menu labels (プロフィール / アカウント作成 など) still fit on one line. */
  .app { grid-template-columns: 160px minmax(0, 1fr); }
  .rail { display: none; }
  .sidebar { padding: 20px 12px; }
  .brand-mark-img { width: 72px; height: 72px; }
  .brand-name { font-size: 14px; }
  /* 利用規約 already shows in nav-group-secondary (via nav-narrow-only) at
     this width, so the duplicate in sidebar-foot is hidden. */
  .sidebar-foot p:first-child { display: none; }
}
@media (max-width: 600px) {
  .app { grid-template-columns: 1fr; }
  /* Mobile sidebar: 2-column × 2-row grid.
        col 1 row 1: brand (icon stacked above brand-name)
        col 2 row 1: nav (single flex-wrap area, all links flow together)
        row 2 (full width): tagline (sidebar-foot, right-aligned)
     Main and secondary nav share the same flex container so they wrap
     organically: e.g. when 設定 and 使い方 fit on the same line, no break
     is forced between them. Each .nav-link uses white-space: nowrap so
     wrapping never splits a menu word in half. */
  .sidebar {
    position: sticky; top: 0; height: auto;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 14px;
    row-gap: 6px;
    align-items: center;
    /* Slim the top/bottom padding to make room for the wider nav row-gap
       below, so total sidebar height stays close to before. */
    padding: 6px 12px;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    grid-column: 1;
    grid-row: 1;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin: 0;
  }
  .brand-mark-img {
    /* flex-shrink:0 stops the row from squishing the logo into an oval
       when the nav next to it gets crowded. */
    width: 56px; height: 56px;
    min-width: 56px;
    flex-shrink: 0;
    border-radius: 50%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
  }
  .brand-name { font-size: 12px; line-height: 1.2; }
  .nav {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    /* Wider vertical gap so wrapped rows breathe; horizontal kept tight. */
    gap: 8px 6px;
    align-items: center;
  }
  /* nav-group is transparent so its child links become direct flex items. */
  .nav-group { display: contents; }
  /* Larger label text but tighter vertical padding so the row height
     stays the same as before. nowrap keeps menu words intact when wrapping. */
  .nav-link { padding: 2px 6px; font-size: 14px; white-space: nowrap; }
  .sidebar-foot {
    display: block;
    grid-column: 1 / span 2;
    grid-row: 2;
    text-align: right;
    color: var(--text-muted);
    font-size: 10px;
    margin: 0;
    padding-top: 2px;
    border-top: 1px solid var(--line);
  }
  .main { border: 0; }
  /* Vertical swipes on the top menu / "絵師が運営する〜" footer must not
     pan the main content underneath. touch-action blocks the browser's
     native vertical scroll when a touch starts on the sidebar (and any
     of its descendants — touch-action isn't inherited, so the rule
     also targets *). pan-x is preferred over none so a tap that drifts
     a hair sideways still registers cleanly. The JS pull-to-refresh
     handler separately bails out when the touch starts in .sidebar
     for the same reason — see the PTR block in app.js. */
  .sidebar,
  .sidebar * {
    touch-action: pan-x;
  }
}

/* Pull-to-refresh indicator. JS positions it vertically (translateY) so
   it sits centred in the gap that opens as .main is pulled down, and JS
   ramps its opacity with the pull distance. */
.ptr-indicator {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translate(-50%, 0);
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
}
.ptr-spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--line);
  border-top-color: var(--primary);
  border-radius: 50%;
}
.ptr-indicator.is-active .ptr-spinner { border-color: var(--line); border-top-color: var(--primary); }
.ptr-indicator.is-loading .ptr-spinner { animation: ptr-spin .8s linear infinite; }
@keyframes ptr-spin { to { transform: rotate(360deg); } }

/* nav unread badge */
.nav-badge {
  display: inline-block;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 4px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  vertical-align: middle;
}

/* toast */
.toast-host {
  position: fixed;
  left: 50%; bottom: 24px;
  transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px;
  z-index: 1100;
  pointer-events: none;
}
.toast {
  background: rgba(40, 40, 30, 0.92);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  opacity: 0; transform: translateY(8px);
  transition: opacity .2s, transform .2s;
  pointer-events: auto;
  max-width: min(560px, 92vw);
  text-align: center;
}
.toast.is-shown { opacity: 1; transform: translateY(0); }
.toast-ok { background: rgba(45, 92, 30, 0.92); }

/* home tabs */
.home-tabs { display: flex; border-bottom: 1px solid var(--line); }
.home-tabs .tab {
  flex: 1; text-align: center; padding: 10px 0;
  color: var(--text-soft); text-decoration: none;
}
.home-tabs .tab.is-on { color: var(--primary); font-weight: 700; box-shadow: inset 0 -2px 0 var(--primary); }

/* suggestions card */
.suggestion-card {
  margin: 12px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--surface);
}
.suggestion-card h2 { margin: 0 0 8px; font-size: 14px; color: var(--primary); }

/* notifications */
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.notif-item:hover { background: rgba(222, 236, 216, 0.18); }
.notif-item.is-unread { background: rgba(222, 236, 216, 0.35); }
.notif-item.is-unread:hover { background: rgba(222, 236, 216, 0.5); }
/* Pointer cursor across the whole row so every clickable area reads as such. */
.notif-item, .notif-item .notif-text, .notif-item .notif-post,
.notif-item .notif-time, .notif-item .notif-text > span { cursor: pointer; }

.notif-avatar {
  display: inline-block;
  width: 40px; height: 40px;
  align-self: start;
  border-radius: 50%;
  transition: filter 0.12s ease;
}
.notif-avatar:hover { filter: brightness(0.92); }
.notif-body { min-width: 0; }
.notif-text { margin: 0; display: flex; flex-wrap: wrap; gap: 4px; align-items: baseline; }
.notif-name { color: inherit; text-decoration: none; }
.notif-name:hover b { text-decoration: underline; }
.notif-time { color: var(--text-muted); font-size: 12px; margin-left: 4px; }
.notif-post {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 14px;
  border-left: 2px solid var(--line);
  padding-left: 8px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* composer thumbnails with alt */
.composer-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.composer-thumb {
  position: relative;
  display: flex; flex-direction: column; gap: 4px;
  width: 96px;
}
.composer-thumb img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; }
.composer-thumb-remove {
  position: absolute; top: 2px; right: 2px;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 0;
  background: rgba(0,0,0,.6); color: #fff;
  font-size: 14px; line-height: 22px; cursor: pointer; padding: 0;
}
.composer-alt {
  font-size: 11px;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  width: 100%;
  background: #fff;
  font: inherit;
  font-size: 11px;
}

/* thread page sections */
.thread-parent .post { background: rgba(245, 242, 236, 0.5); }
.thread-focus .post { border-left: 2px solid var(--primary); }
.thread-replies .post { padding-left: 32px; }

/* push-test result block — readable structured output for the
   "通知をテスト" diagnostic. Default browser <ul> indentation was
   too generous on narrow screens, so we tighten padding-left and
   keep paragraph margins compact. .muted / .is-ok / .is-err mirror
   the JS state classes the click handler sets. */
.push-test-result p { margin: 0 0 8px; }
.push-test-result p:last-child { margin-bottom: 0; }
.push-test-result ul { margin: 0 0 8px; padding-left: 18px; }
.push-test-result ul:last-child { margin-bottom: 0; }
.push-test-result li { margin: 0 0 4px; line-height: 1.55; }
.push-test-result li:last-child { margin-bottom: 0; }
.push-test-result.muted { color: var(--text-muted); }
.push-test-result.is-err { color: var(--danger); }
