/* =========================================================
   十夢ログ — X のポストをブログ風に（gallery.css の上に重ねる）
   ========================================================= */
.b-hero { padding-bottom: clamp(24px, 3vw, 36px); border-bottom: 1px solid var(--line-light); }
body.light .g-hero p { color: #555; }
.b-hero .xlink { display: inline-flex; gap: 8px; align-items: center; margin-top: 14px; font-size: 13px; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 1px; }

.b-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: clamp(28px, 5vw, 72px);
  max-width: calc(1080px + 2 * var(--gutter)); margin: 0 auto; padding: clamp(28px, 4vw, 48px) var(--gutter) 100px;
}

/* ---------- entries ---------- */
.b-status { font-size: 13px; color: #666; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-height: 28px; }
.b-status .chip { color: var(--ink); border-color: var(--line-light); }
.b-status .chip:hover { background: rgba(0,0,0,.06); }
.entries { list-style: none; margin: 0; padding: 0; }
.entry { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: clamp(14px, 3vw, 32px); padding: 34px 0; border-top: 1px solid var(--line-light); }
.entry:first-child { border-top: 0; padding-top: 6px; }
.e-date { text-align: center; font-family: var(--f-latin); line-height: 1; padding-top: 4px; }
.e-date .d { display: block; font-size: 46px; font-weight: 600; }
.e-date .m { display: block; font-size: 13px; letter-spacing: .14em; margin-top: 6px; text-transform: uppercase; }
.e-date .y { display: block; font-size: 12px; color: var(--grey); margin-top: 4px; font-style: italic; }
.e-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; font-size: 12px; color: #666; }
.dream-tag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 4px; border: 1px solid var(--ink); border-radius: 999px; text-decoration: none; color: var(--ink); font-size: 12px; line-height: 1.6; background: transparent; cursor: pointer; font-family: inherit; }
.dream-tag i { font-style: normal; font-family: var(--f-brush); font-size: 15px; width: 22px; height: 22px; display: grid; place-items: center; background: var(--ink); color: var(--paper); border-radius: 50%; }
.dream-tag:hover { background: var(--ink); color: var(--paper); }
.e-title { font-family: var(--f-mincho); font-weight: 800; font-size: clamp(19px, 2.2vw, 24px); line-height: 1.5; margin: 0 0 12px; letter-spacing: .04em; }
.e-title a { text-decoration: none; }
.e-title a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.e-body { font-size: 15.5px; line-height: 2; word-break: break-word; overflow-wrap: anywhere; }
.e-body p { margin: 0 0 1em; }
.e-body p:last-child { margin-bottom: 0; }
.e-body a { text-underline-offset: 3px; text-decoration-thickness: 1px; }
.e-body a.tag, .e-body a.at { text-decoration: none; font-weight: 500; }
.e-body a.tag:hover, .e-body a.at:hover { text-decoration: underline; }

.e-media { display: grid; gap: 4px; margin-top: 16px; grid-template-columns: repeat(2, 1fr); max-width: 640px; }
.e-media.n1 { grid-template-columns: 1fr; }
.e-media.n3 > :first-child { grid-row: span 2; }
.e-media button, .e-media a { position: relative; display: block; padding: 0; border: 0; background: #ddd; cursor: zoom-in; overflow: hidden; aspect-ratio: 16 / 10; }
.e-media.n1 button, .e-media.n1 a { aspect-ratio: auto; max-height: 560px; }
.e-media.n3 > :first-child { aspect-ratio: auto; }
.e-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s, filter .5s; }
.e-media.n1 img { height: auto; max-height: 560px; object-fit: contain; background: #ddd; }
.e-media button:hover img { transform: scale(1.02); }
.e-media .play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 44px; background: rgba(0,0,0,.25); text-shadow: 0 2px 12px rgba(0,0,0,.5); }

.e-foot { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; margin-top: 16px; font-size: 12.5px; }
.e-foot a { text-decoration: none; color: #555; display: inline-flex; gap: 6px; align-items: center; }
.e-foot a:hover { color: var(--ink); text-decoration: underline; }
.e-foot svg { width: 13px; height: 13px; }

.more { display: flex; justify-content: center; margin-top: 30px; }
.more .btn { color: var(--ink); min-width: 220px; justify-content: center; }
.empty { padding: 60px 0; text-align: center; color: #777; }
.empty .kan { font-family: var(--f-brush); font-size: 72px; line-height: 1; color: var(--ink); opacity: .85; }

/* ---------- sidebar ---------- */
.b-side { font-size: 14px; }
.b-side section { margin-bottom: 36px; }
.b-side h2 { font-family: var(--f-latin); font-style: italic; font-weight: 400; font-size: 15px; letter-spacing: .1em; color: var(--grey); margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line-light); }
.b-side h2 b { font-family: var(--f-mincho); font-style: normal; font-weight: 600; font-size: 12px; color: #555; margin-left: 8px; }
.search { display: flex; border: 1px solid var(--ink); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 9px 12px; font: inherit; font-size: 14px; color: var(--ink); outline: none; }
.search button { border: 0; background: var(--ink); color: var(--paper); padding: 0 14px; cursor: pointer; font: inherit; font-size: 13px; }
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list li { margin: 0; }
.side-list button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 6px 4px; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; border-radius: 2px; }
.side-list button:hover { background: rgba(0,0,0,.05); }
.side-list button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.side-list .k { font-family: var(--f-brush); font-size: 18px; width: 24px; text-align: center; }
.side-list .n { margin-left: auto; font-family: var(--f-latin); font-size: 14px; color: var(--grey); }
.side-list button[aria-pressed="true"] .n { color: var(--grey-2); }
.side-list .yr { font-family: var(--f-latin); font-size: 17px; font-weight: 600; padding: 10px 4px 2px; }
.side-list.months button { padding-left: 14px; }

/* ---------- single post ---------- */
.single .entry { border-top: 0; padding-top: 0; }
.single .e-title { font-size: clamp(22px, 3vw, 32px); }
.single .e-body { font-size: 17px; }
.single .e-media { max-width: none; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line-light); }
.pager a { display: block; text-decoration: none; border: 1px solid var(--line-light); padding: 14px 16px; font-size: 13px; line-height: 1.6; min-height: 70px; }
.pager a:hover { border-color: var(--ink); }
.pager a small { display: block; font-family: var(--f-latin); font-style: italic; color: var(--grey); font-size: 13px; margin-bottom: 2px; }
.pager .older { text-align: right; grid-column: 2; }
.back-list { display: inline-block; margin-top: 28px; font-size: 13px; }
.share { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.share .btn { color: var(--ink); }

/* ---------- media viewer ---------- */
.mv { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.mv::backdrop { background: rgba(0,0,0,.92); }
.mv[open] { display: grid; place-items: center; }
.mv img { max-width: 96vw; max-height: 92vh; object-fit: contain; }
.mv button { position: fixed; top: 10px; right: 14px; border: 0; background: none; color: #fff; font-size: 34px; cursor: pointer; opacity: .8; }

/* ---------- admin: posts ---------- */
.url-box { width: 100%; min-height: 120px; resize: vertical; font: inherit; font-size: 14px; padding: 10px 12px; border: 1px solid var(--line-light); background: #fff; color: var(--ink); }
.row-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line-light); align-items: start; }
.post-list li.hidden-post { opacity: .5; }
.post-list .dt { font-family: var(--f-latin); font-size: 14px; line-height: 1.4; }
.post-list .dt small { display: block; color: var(--grey); font-size: 11px; font-family: var(--f-sans); }
.post-list .tx { font-size: 13px; line-height: 1.7; color: #333; white-space: pre-line; max-height: 5.1em; overflow: hidden; }
.post-list .ed { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.post-list .ed input[type=text] { flex: 1 1 220px; min-width: 0; padding: 6px 8px; border: 1px solid var(--line-light); font: inherit; font-size: 13px; background: #fff; }
.post-list .ed select { padding: 6px; border: 1px solid var(--line-light); font: inherit; font-size: 13px; background: #fff; }
.post-list .ops { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.post-list .ops a { font-size: 12px; text-align: center; }
.list-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; font-size: 13px; }
.list-tools input { padding: 6px 10px; border: 1px solid var(--line-light); font: inherit; font-size: 13px; background: #fff; flex: 1 1 200px; }
.saved { font-size: 11px; color: #2a7; opacity: 0; transition: opacity .3s; }
.saved.on { opacity: 1; }

@media (max-width: 860px) {
  .b-layout { grid-template-columns: 1fr; }
  .b-side { border-top: 1px solid var(--line-light); padding-top: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
  .b-side section { margin-bottom: 18px; }
  .b-side .s-search { grid-column: 1 / -1; }
  .side-list.months { max-height: 200px; overflow: auto; }
  .side-list.dreams { max-height: 200px; overflow: auto; }
}
@media (max-width: 560px) {
  .entry { grid-template-columns: 1fr; gap: 6px; padding: 26px 0; }
  .e-date { text-align: left; display: flex; align-items: baseline; gap: 8px; }
  .e-date .d { font-size: 28px; }
  .e-date .m, .e-date .y { margin: 0; }
  .b-side { grid-template-columns: 1fr; }
  .pager { grid-template-columns: 1fr; }
  .pager .older { grid-column: 1; }
  .post-list li { grid-template-columns: 1fr; }
  .post-list .ops { flex-direction: row; }
}
.side-jump { display: none; margin-left: 18px; }
@media (max-width: 860px) { .side-jump { display: inline-flex; } }
@media (max-width: 560px) { .side-jump { margin-left: 0; } .b-hero .xlink { margin-right: 14px; } }
