*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --text:         #1a1008;
  --muted:        #8a7060;
  --accent:       #e05800;
  --accent2:      #c04000;
  --yt:           #cc2200;
  --tw:           #0080c0;
  --tt:           #7c3aed;
  --font-head:    'Syne', sans-serif;
  --font-body:    'Noto Sans JP', sans-serif;
  --radius:       12px;
  --panel-bg:     rgba(255, 252, 248, .90);
  --panel-border: rgba(180, 100, 20, .13);
  --header-h:     56px;
  --gap:          12px;
  --cal-w:        190px;
  --list-w:       200px;
  --grid-cols:    6;
  --card-title-size: 11px;
  --card-meta-size:  10px;
}

html, body {
  height: 100%; color: var(--text);
  font-family: var(--font-body); font-weight: 300;
  -webkit-font-smoothing: antialiased; overflow: hidden;
}

body {
  background-color: #e8c89a;
  background-image:
    radial-gradient(ellipse 70% 60% at 10% 15%, rgba(220, 90,  20, .50) 0%, transparent 60%),
    radial-gradient(ellipse 55% 65% at 88%  8%, rgba(255, 160, 30, .40) 0%, transparent 55%),
    radial-gradient(ellipse 65% 50% at 50% 95%, rgba(200, 70,  10, .35) 0%, transparent 60%),
    radial-gradient(ellipse 45% 55% at 82% 72%, rgba(240, 120, 20, .30) 0%, transparent 55%),
    radial-gradient(ellipse 40% 45% at  8% 78%, rgba(180, 60,  10, .25) 0%, transparent 50%);
}

/* ── Header ── */
header {
  position: fixed; top: 0; left: 0; right: 0; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; gap: 12px;
  background: rgba(255, 250, 244, .78); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(180, 100, 20, .12); z-index: 200;
}
.logo {
  display: flex; flex-direction: row; align-items: center;
  gap: 10px; line-height: 1;
  min-width: 0; flex: 1 1 auto; overflow: hidden;
}
.logo-text { display: flex; flex-direction: column; gap: 1px; flex-shrink: 0; }
.logo-ruby {
  display: flex; gap: 6px;
  font-family: var(--font-head); font-size: 9px; font-weight: 700;
  letter-spacing: .12em; color: var(--muted);
  text-transform: uppercase;
}
.logo-main {
  font-family: var(--font-head); font-size: 20px; font-weight: 800;
  letter-spacing: -.01em; color: var(--text);
}
.logo-desc {
  font-size: 12px; color: var(--text); line-height: 1.6;
  max-width: 420px; margin-top: 3px; opacity: .75;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.header-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* ティッカー */
.spotlight-panel {
  padding: 0; overflow: hidden; cursor: pointer;
  transition: opacity .3s;
}
.spotlight-inner { display: flex; flex-direction: column; }
.spotlight-inner:hover .spotlight-title { color: var(--accent); }
.spotlight-label {
  font-family: var(--font-head); font-size: 9px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); padding: 8px 12px 4px;
}
.spotlight-thumb {
  width: 100%; aspect-ratio: 16/9;
  background-size: cover; background-position: center;
  flex-shrink: 0;
}
.spotlight-body { padding: 8px 12px 10px; }
.spotlight-badges { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; }
.spotlight-title {
  font-family: var(--font-head); font-size: 12px; font-weight: 700;
  color: var(--text); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-bottom: 6px;
  transition: color .15s;
}
.spotlight-tags { display: flex; flex-wrap: wrap; gap: 3px; }
.spotlight-tag {
  font-size: 9px; color: var(--muted);
  background: rgba(255,255,255,.05); padding: 1px 5px; border-radius: 3px;
}

.timeline-toggle {
  display: flex; align-items: center; gap: 4px; flex-shrink: 0;
  background: rgba(180,100,20,.08); border-radius: 8px; padding: 3px;
}
.tl-btn {
  font-family: var(--font-head); font-size: 12px; font-weight: 700;
  padding: 5px 16px; border-radius: 6px; border: none; white-space: nowrap;
  background: none; color: var(--muted); cursor: pointer; transition: all .15s;
}
.tl-btn:hover  { color: var(--text); }
.tl-btn.active { background: #fff; color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.1); }

#postBtn {
  background: var(--accent); color: #fff; border: none; border-radius: 6px;
  padding: 8px 18px; font-family: var(--font-head); font-size: 12px; font-weight: 700;
  cursor: pointer; transition: opacity .15s; white-space: nowrap; flex-shrink: 0;
}
#postBtn:hover { opacity: .85; }
#authBtn {
  background: none; border: 1px solid rgba(180, 100, 20, .25); border-radius: 6px;
  padding: 7px 14px; font-family: var(--font-head); font-size: 12px;
  color: var(--muted); cursor: pointer; transition: all .15s; white-space: nowrap; flex-shrink: 0;
}
#authBtn:hover     { border-color: var(--accent);  color: var(--accent);  }
#authBtn.signed-in { border-color: var(--accent2); color: var(--accent2); }

.modlist-section { margin-bottom: 18px; }
.modlist-section:last-child { margin-bottom: 0; }
.modlist-section-label {
  font-family: var(--font-head); font-size: 12px; font-weight: 700;
  color: var(--muted); margin-bottom: 8px;
}
.modlist-empty { font-size: 12px; color: var(--muted); }
.modlist-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid rgba(180,100,20,.08);
}
.modlist-row-label { font-size: 13px; color: var(--text); }
.modlist-undo-btn {
  flex-shrink: 0; background: none; border: 1px solid var(--border); border-radius: 14px;
  padding: 4px 12px; font-size: 11px; color: var(--muted); cursor: pointer; transition: all .15s;
}
.modlist-undo-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── ステージ ── */
.stage {
  position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0;
  display: flex; gap: var(--gap); padding: var(--gap);
}

.panel {
  border-radius: var(--radius); border: 1px solid var(--panel-border);
  background: var(--panel-bg); backdrop-filter: blur(16px);
}

/* ══════════════════════════════════════
   左：カレンダー＋タグフィルター
══════════════════════════════════════ */
.left-col {
  flex: 0 0 var(--cal-w);
  overflow-y: auto;
}
.left-col::-webkit-scrollbar { display: none; }
.left-col-inner {
  display: flex; flex-direction: column; gap: var(--gap);
}
.mobile-cal-toggle { display: none; } /* スマホ表示のみ有効（下部メディアクエリ参照） */

.calendar-panel { flex-shrink: 0; }

/* マイカレンダーを見ている時は、ミニカレンダー・注目枠の代わりに
   フォロー中一覧などのサイドバーを出す（注目枠は独自タイマーでinline
   styleを書き換え続けるため、!importantで確実に上書きする） */
.left-col.mycal-mode .calendar-panel,
.left-col.mycal-mode .spotlight-panel { display: none !important; }
.mycal-sidebar { display: none; flex-shrink: 0; }
.left-col.mycal-mode .mycal-sidebar { display: block; }

.grid-cols-panel {
  flex-shrink: 0; padding: 8px 12px;
  display: flex; align-items: center; gap: 6px;
}
.grid-cols-label {
  font-family: var(--font-head); font-size: 9px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--muted);
  flex: 1;
}
.grid-cols-btn {
  font-family: var(--font-head); font-size: 11px; font-weight: 700;
  width: 28px; height: 28px; border-radius: 6px;
  border: 1px solid rgba(180,100,20,.2); background: #fff;
  color: var(--muted); cursor: pointer; transition: all .12s;
}
.grid-cols-btn:hover  { border-color: var(--accent); color: var(--accent); }
.grid-cols-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.tag-filter-panel {
  flex: 1; padding: 12px;
  display: flex; flex-direction: column; gap: 8px;
  overflow-y: auto; min-height: 0;
}
.tag-filter-panel::-webkit-scrollbar { width: 3px; }
.tag-filter-panel::-webkit-scrollbar-thumb { background: rgba(180,100,20,.2); border-radius: 2px; }

/* カレンダー */
.calendar { padding: 12px; flex-shrink: 0; }
.cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-month  { font-family: var(--font-head); font-size: 13px; font-weight: 700; }
.cal-nav {
  background: none; border: none; color: var(--muted);
  cursor: pointer; font-size: 15px; padding: 1px 5px; line-height: 1; transition: color .15s;
}
.cal-nav:hover { color: var(--accent); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal-dow  { font-size: 9px; color: var(--muted); padding: 3px 0; }
.cal-day  {
  font-size: 12px; font-family: var(--font-head);
  padding: 5px 1px; border-radius: 4px; cursor: pointer;
  color: #666; line-height: 1.2; transition: background .1s, color .1s;
}
.cal-day:hover       { background: rgba(180,100,20,.10); color: var(--text); }
.cal-day.other-month { opacity: .2; cursor: default; }
.cal-day.today       { color: var(--accent); font-weight: 700; }
.cal-day.selected    { background: var(--accent); color: #fff !important; }
.cal-day.has-post::after {
  content: ''; display: block; width: 3px; height: 3px;
  border-radius: 50%; background: var(--accent); margin: 1px auto 0; opacity: .7;
}

.tag-search-wrap {
  position: relative; flex-shrink: 0;
}
.tag-search {
  width: 100%;
  background: #fff;
  border: 1px solid rgba(180,100,20,.18);
  border-radius: 6px;
  padding: 6px 28px 6px 9px;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text);
  outline: none;
  transition: border-color .15s;
}
.tag-search:focus { border-color: rgba(180,100,20,.45); }
.tag-search::placeholder { color: rgba(180,100,20,.3); }
.tag-search-clear {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--muted);
  font-size: 11px; cursor: pointer; padding: 2px 4px; line-height: 1;
  transition: color .12s;
}
.tag-search-clear:hover { color: var(--accent); }

.tag-filter-title {
  font-family: var(--font-head); font-size: 10px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--muted);
}
.tag-filter-list { display: flex; flex-wrap: wrap; gap: 5px; }
.tag-btn {
  font-size: 10px; font-family: var(--font-head); font-weight: 700;
  padding: 3px 8px; border-radius: 999px;
  border: 1px solid rgba(180,100,20,.2); background: #fff;
  color: var(--muted); cursor: pointer; white-space: nowrap;
  transition: all .12s;
}
.tag-btn:hover  { border-color: var(--accent); color: var(--accent); }
.tag-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.tag-filter-clear {
  font-size: 10px; font-family: var(--font-head); font-weight: 700;
  padding: 4px 10px; border-radius: 6px;
  border: 1px solid rgba(180,100,20,.2); background: none;
  color: var(--muted); cursor: pointer; align-self: flex-start;
  transition: all .12s;
}
.tag-filter-clear:hover { border-color: var(--accent2); color: var(--accent2); }

#updateBtn {
  background: none; border: 1px solid var(--border); border-radius: 6px;
  padding: 7px 14px; font-family: var(--font-head); font-size: 12px; font-weight: 700;
  color: var(--muted); cursor: pointer; transition: all .15s; white-space: nowrap; flex-shrink: 0;
}
#updateBtn:hover { border-color: var(--accent); color: var(--accent); }
#updateBtn.has-update {
  background: var(--accent); border-color: var(--accent); color: #fff;
  animation: updatePulse 1.6s ease-in-out infinite;
}
@keyframes updatePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .7; }
}

.reminder-banner {
  position: fixed; top: var(--header-h); left: 0; right: 0; z-index: 150;
  background: #7c4dff; color: #fff;
  animation: reminderSlideIn .2s ease;
}
.reminder-banner.hidden { display: none; }
.reminder-banner-inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 24px;
}
.reminder-banner-label {
  font-family: var(--font-head); font-weight: 700; font-size: 12.5px; flex-shrink: 0;
}
.reminder-banner-title {
  flex: 1; min-width: 0; text-align: left; background: none; border: none;
  color: #fff; font-size: 13px; cursor: pointer; text-decoration: underline;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.reminder-banner-close {
  flex-shrink: 0; background: rgba(255,255,255,.15); border: none; border-radius: 50%;
  width: 24px; height: 24px; color: #fff; cursor: pointer; font-size: 12px;
}
.reminder-banner-close:hover { background: rgba(255,255,255,.3); }
@keyframes reminderSlideIn {
  from { transform: translateY(-100%); }
  to   { transform: translateY(0); }
}

/* ══════════════════════════════════════
   中央：タイムライン
══════════════════════════════════════ */
.timeline-wrap {
  flex: 1; overflow-y: auto; overflow-x: hidden; position: relative;
}
.timeline-wrap::-webkit-scrollbar       { width: 4px; }
.timeline-wrap::-webkit-scrollbar-thumb { background: rgba(180,100,20,.2); border-radius: 3px; }
.timeline { display: flex; flex-direction: column; }

.day-banner-row {
  font-family: var(--font-head); font-size: 11px; font-weight: 700;
  color: rgba(160,80,20,.7); letter-spacing: .06em;
  background: #f5e8d8;
  padding: 6px 12px;
  border-top: 2px solid rgba(200,80,10,.2);
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
}
.day-banner-row.today { color: var(--accent); background: #ffe0c2; border-top-color: rgba(200,80,10,.4); }

.col-btns { display: flex; gap: 3px; }
.col-btn {
  font-family: var(--font-head); font-size: 10px; font-weight: 700;
  width: 22px; height: 22px; border-radius: 4px;
  border: 1px solid rgba(180,100,20,.2); background: rgba(255,255,255,.6);
  color: var(--muted); cursor: pointer; transition: all .12s;
}
.col-btn:hover  { border-color: var(--accent); color: var(--accent); }
.col-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.slot-row {
  display: flex; align-items: flex-start;
  border-top: 1px solid rgba(180,100,20,.10); min-height: 80px;
}
.slot-row.now-slot { background: rgba(255,180,100,.08); border-top: 2px solid var(--accent); }
.slot-label {
  width: 64px; padding: 8px 10px 0; flex-shrink: 0;
  font-family: var(--font-head); font-size: 11px; font-weight: 700;
  color: #9a6040; letter-spacing: .02em;
}
.slot-row.now-slot .slot-label { color: var(--accent); }

.slot-cards {
  flex: 1; display: grid; grid-template-columns: repeat(var(--grid-cols), 1fr);
  gap: 5px; padding: 6px 8px; min-height: 80px;
}

.recommend-source-header {
  font-family: var(--font-head); font-size: 22px; font-weight: 800;
  letter-spacing: -.02em; padding: 14px 12px 4px;
  border-bottom: 2px solid currentColor; margin-bottom: 4px;
}
.recommend-source-twitch  { color: var(--tt); border-color: var(--tt); }
.recommend-source-youtube { color: var(--yt); border-color: var(--yt); }

.recommend-header {
  font-family: var(--font-head); font-size: 11px; font-weight: 700;
  color: rgba(160,80,20,.7); letter-spacing: .06em;
  background: #f5e8d8;
  padding: 6px 12px;
  border-top: 2px solid rgba(200,80,10,.2);
  position: sticky; top: 0; z-index: 10;
}

.recommend-section {
  padding: 12px 10px 16px;
  border-top: 1px solid rgba(180,100,20,.08);
  border-left: 3px solid transparent;
  transition: border-color .2s;
}
.recommend-section:hover { border-left-color: rgba(180,100,20,.25); }

.recommend-section-label {
  font-family: var(--font-head); font-size: 18px; font-weight: 800;
  color: var(--text); letter-spacing: -.01em;
  margin-bottom: 10px; padding-left: 2px;
}

/* 横並び・1位大きく・3位小さく */
.recommend-grid {
  display: grid;
  grid-template-columns: 1.6fr 1.1fr 0.8fr;
  gap: 5px;
  align-items: start;
  max-width: 85%;
}
.recommend-grid .card { aspect-ratio: 16/9; width: 100%; }

.recommend-empty {
  color: var(--muted); font-size: 12px; text-align: center;
  padding: 40px; font-family: var(--font-head);
}

/* マイカレンダー 月グリッド */
.mycal-month-view { padding: 16px 20px 32px; }
.mycal-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; position: relative;
}
.mycal-nav-mid { display: flex; align-items: center; gap: 10px; }
.mycal-nav-btn {
  background: var(--panel-bg); border: 1px solid var(--border); border-radius: 50%;
  color: var(--text); cursor: pointer; font-size: 20px; line-height: 1;
  width: 40px; height: 40px; min-width: 40px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.mycal-nav-btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(180,100,20,.08); }
.mycal-nav-btn:active { transform: scale(.92); }
.mycal-jump-btn {
  display: flex; align-items: center; gap: 5px;
  background: var(--panel-bg); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); cursor: pointer; font-size: 12px; font-family: var(--font-head);
  padding: 6px 12px; transition: all .15s;
}
.mycal-jump-btn:hover { border-color: var(--accent); color: var(--accent); }
.mycal-jump-btn-caret { font-size: 9px; color: var(--muted); }

.mycal-jump-popover {
  position: absolute; z-index: 500;
  background: #fffcf8; border: 1px solid rgba(180,100,20,.2); border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,.16); padding: 12px; width: 240px;
  animation: fadeIn .12s ease;
}
.mycal-jump-year-row {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px;
}
.mycal-jump-year-btn {
  background: none; border: 1px solid var(--border); border-radius: 50%;
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text); font-size: 14px; transition: all .15s;
}
.mycal-jump-year-btn:hover { border-color: var(--accent); color: var(--accent); }
.mycal-jump-year-label { font-family: var(--font-head); font-weight: 700; font-size: 14px; }
.mycal-jump-month-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-bottom: 4px;
}
.mycal-jump-month-btn {
  background: rgba(180,100,20,.05); border: 1px solid transparent; border-radius: 6px;
  padding: 7px 0; font-size: 11.5px; color: var(--text); cursor: pointer; transition: all .15s;
}
.mycal-jump-month-btn:hover { border-color: var(--accent); color: var(--accent); }
.mycal-jump-month-btn.selected { background: var(--accent); color: #fff; }
.mycal-jump-day-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-top: 10px;
  border-top: 1px solid rgba(180,100,20,.12); padding-top: 10px;
}
.mycal-jump-dow { font-size: 9px; color: var(--muted); text-align: center; padding-bottom: 3px; }
.mycal-jump-day-btn {
  background: none; border: none; border-radius: 4px; aspect-ratio: 1;
  font-size: 11px; color: var(--text); cursor: pointer; transition: all .1s;
}
.mycal-jump-day-btn:hover { background: rgba(180,100,20,.12); }
.mycal-jump-day-btn.today { color: var(--accent); font-weight: 700; }

.mycal-title { font-family: var(--font-head); font-size: 22px; letter-spacing: .04em; }

/* 月表示／週表示 切り替え */
.mycal-view-toggle {
  display: flex; justify-content: center; gap: 4px; margin-bottom: 18px;
  background: rgba(180,100,20,.06); border-radius: 8px; padding: 3px; width: fit-content;
  margin-left: auto; margin-right: auto;
}
.mycal-view-toggle-btn {
  font-family: var(--font-head); font-size: 12px; font-weight: 700;
  padding: 5px 16px; border-radius: 6px; border: none;
  background: none; color: var(--muted); cursor: pointer; transition: all .15s;
}
.mycal-view-toggle-btn:hover  { color: var(--text); }
.mycal-view-toggle-btn.active { background: #fff; color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.1); }

/* ── 週表示：Googleカレンダー風の時刻×曜日グリッド ── */
.mycal-week-view { display: flex; flex-direction: column; }
.mycal-week-grid-wrap {
  overflow: auto; max-height: 620px;
  border: 1px solid rgba(180,100,20,.2); border-radius: 8px;
}
.mycal-week-table {
  display: grid; grid-template-columns: 52px repeat(7, minmax(90px, 1fr));
  min-width: 720px;
}
.mycal-week-corner {
  position: sticky; top: 0; left: 0; z-index: 3;
  background: var(--panel-bg);
  border-right: 1px solid rgba(180,100,20,.14);
  border-bottom: 1.5px solid rgba(180,100,20,.2);
}
.mycal-week-day-header {
  position: sticky; top: 0; z-index: 2;
  background: var(--panel-bg);
  text-align: center; padding: 8px 4px;
  border-right: 1px solid rgba(180,100,20,.14);
  border-bottom: 1.5px solid rgba(180,100,20,.2);
}
.mycal-week-day-header:last-child { border-right: none; }
.mycal-week-day-dow { font-size: 10px; color: var(--muted); font-family: var(--font-head); font-weight: 700; }
.mycal-week-day-num { font-size: 15px; font-family: var(--font-head); font-weight: 800; margin-top: 2px; }
.mycal-week-day-header.today .mycal-week-day-num { color: var(--accent); }
.mycal-week-hour-label {
  position: sticky; left: 0; z-index: 1;
  background: var(--panel-bg);
  font-size: 9.5px; color: var(--muted); text-align: right;
  padding: 2px 6px 0 0; height: 48px; box-sizing: border-box;
  border-right: 1px solid rgba(180,100,20,.14);
  border-bottom: 1px solid rgba(180,100,20,.08);
}
.mycal-week-hour-cell {
  height: 48px; box-sizing: border-box; padding: 1px 2px;
  border-right: 1px solid rgba(180,100,20,.1);
  border-bottom: 1px solid rgba(180,100,20,.08);
  display: flex; flex-direction: column; gap: 1px; overflow: hidden;
}
.mycal-week-hour-cell:last-child { border-right: none; }
.mycal-week-hour-cell.today-col { background: rgba(200,120,30,.05); }
.mycal-week-event-chip {
  display: block; width: 100%; text-align: left; border: none; border-radius: 3px;
  background: var(--accent); color: #fff; font-size: 9.5px; padding: 1.5px 5px;
  line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer; flex-shrink: 0;
}
.mycal-week-event-chip:hover { opacity: .85; }
.mycal-week-event-chip.is-note { color: #fff; }

/* ── 他人のカレンダーを閲覧中のヘッダー ── */
.mycal-viewing-header {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 16px;
  background: var(--panel-bg); border: 1px solid var(--panel-border); border-radius: var(--radius);
}
.mycal-viewing-user { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.mycal-viewing-avatar {
  width: 26px; height: 26px; border-radius: 50%; object-fit: cover;
  background: var(--border); flex-shrink: 0;
}
.mycal-viewing-name {
  font-family: var(--font-head); font-size: 13px; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mycal-follow-btn {
  flex-shrink: 0; background: none; border: 1.5px solid var(--accent); border-radius: 20px;
  color: var(--accent); padding: 6px 14px; cursor: pointer; font-size: 12px; font-weight: 700;
  font-family: var(--font-head); transition: all .15s;
}
.mycal-follow-btn:hover { background: rgba(200,120,30,.1); }
.mycal-follow-btn.active { background: var(--accent); color: #fff; }

/* ── 左サイドバー：フォロー中一覧・NGリスト導線（マイカレンダー表示時） ── */
.mycal-sidebar {
  padding: 14px 12px; border-radius: var(--radius);
  background: var(--panel-bg); border: 1px solid var(--panel-border);
}
.mycal-sidebar-header {
  font-family: var(--font-head); font-size: 12px; font-weight: 700;
  color: var(--text); margin-bottom: 10px;
}
.mycal-sidebar-hint {
  font-size: 11.5px; color: var(--muted); line-height: 1.5; margin-bottom: 10px;
}
.mycal-sidebar-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.mycal-sidebar-row {
  display: flex; align-items: center; gap: 8px; padding: 5px 2px;
}
.mycal-sidebar-avatar-btn {
  width: 28px; height: 28px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  border: 1.5px solid var(--border); background: var(--surface, #fff); cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center; transition: border-color .15s;
}
.mycal-sidebar-avatar-btn:hover { border-color: var(--accent); }
.mycal-sidebar-avatar-btn img { width: 100%; height: 100%; object-fit: cover; }
.mycal-sidebar-avatar-fallback { font-size: 13px; }
.mycal-sidebar-name-btn {
  flex: 1; min-width: 0; text-align: left; background: none; border: none; padding: 0;
  font-size: 12.5px; color: var(--text); cursor: pointer;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.mycal-sidebar-name-btn:hover { color: var(--accent); text-decoration: underline; }
.mycal-sidebar-unfollow-btn {
  flex-shrink: 0; background: none; border: 1px solid var(--border); border-radius: 12px;
  padding: 3px 9px; font-size: 10px; color: var(--muted); cursor: pointer; transition: all .15s;
}
.mycal-sidebar-unfollow-btn:hover { border-color: #c0392b; color: #c0392b; }
.mycal-sidebar-myposts-link {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: rgba(180,100,20,.06); border: 1px solid rgba(180,100,20,.15); border-radius: 8px;
  padding: 9px 10px; margin-bottom: 14px;
  font-family: var(--font-head); font-size: 12px; font-weight: 700; color: var(--text);
  transition: all .15s;
}
.mycal-sidebar-myposts-link:hover { border-color: var(--accent); color: var(--accent); background: rgba(180,100,20,.1); }
.mycal-sidebar-notif-btn {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: rgba(180,100,20,.06); border: 1px solid rgba(180,100,20,.15); border-radius: 8px;
  padding: 9px 10px; margin-bottom: 14px;
  font-family: var(--font-head); font-size: 11.5px; font-weight: 700; color: var(--muted);
  transition: all .15s;
}
.mycal-sidebar-notif-btn:not(:disabled):hover { border-color: var(--accent); color: var(--accent); background: rgba(180,100,20,.1); }
.mycal-sidebar-notif-btn.on {
  background: rgba(29,158,117,.1); border-color: rgba(29,158,117,.3); color: #1d9e75; cursor: pointer;
}
.mycal-sidebar-notif-btn.on:hover { border-color: rgba(29,158,117,.5); }
.mycal-sidebar-notif-btn:disabled { cursor: default; }
.mycal-sidebar-modlist-link {
  display: block; width: 100%; text-align: left; background: none; border: none;
  border-top: 1px solid rgba(180,100,20,.1); padding: 10px 0 0; margin-top: 4px;
  font-size: 11px; color: var(--muted); cursor: pointer;
}
.mycal-sidebar-modlist-link:hover { color: #c0392b; text-decoration: underline; }

.mycal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  border: 1px solid rgba(180,100,20,.2); border-radius: 8px; overflow: hidden;
}
.mycal-dow {
  font-size: 10px; color: var(--muted); padding: 6px 0 8px; text-align: center;
  font-family: var(--font-head); font-weight: 700; letter-spacing: .06em;
  border-right: 1px solid rgba(180,100,20,.14);
  border-bottom: 1.5px solid rgba(180,100,20,.2);
}
.mycal-dow:nth-child(7n) { border-right: none; }
.mycal-cell {
  height: 90px; padding: 6px 4px 4px;
  cursor: default;
  border-right: 1px solid rgba(180,100,20,.14);
  border-bottom: 1px solid rgba(180,100,20,.14);
  background: rgba(255,255,255,.3);
  transition: background .1s;
  display: flex; flex-direction: column; align-items: stretch;
  overflow: hidden; position: relative;
}
.mycal-cell:nth-child(7n) { border-right: none; }
.mycal-cell.clickable { cursor: pointer; }
.mycal-cell.clickable:hover { background: rgba(180,100,20,.08); }
.mycal-cell.other-month { opacity: .3; }
.mycal-cell.today { box-shadow: inset 0 0 0 2px var(--accent); }
.mycal-cell.today .mycal-cell-num { color: var(--accent); font-weight: 800; }
.mycal-cell.has-event { background: rgba(200,120,30,.06); }
.mycal-cell-num { font-size: 13px; font-weight: 600; margin-bottom: 4px; text-align: left; padding-left: 4px; line-height: 1; }
.mycal-viewed-count { font-size: 9px; color: var(--muted); text-align: right; padding-right: 4px; margin-top: auto; }

/* ── サムネイルコラージュセル（ハイブリッド表示） ── */
.mycal-cell.has-thumbs { padding: 0; }
.mycal-thumb-grid {
  position: absolute; inset: 0;
  display: grid; gap: 1px;
  overflow: hidden;
}
.mycal-thumb-grid.n1 { grid-template-columns: 1fr; }
.mycal-thumb-grid.n2 { grid-template-columns: 1fr 1fr; }
.mycal-thumb-grid.n3,
.mycal-thumb-grid.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.mycal-thumb-grid.n3 img:first-child { grid-row: span 2; }
.mycal-thumb-grid img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: saturate(.9);
}
.mycal-thumb-more {
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.45); color: #fff;
  font-size: 12px; font-weight: 700; font-family: var(--font-head);
}
/* 予定メモのアイコンタイル（サムネイルの代わりにコラージュへ混ぜる） */
.mycal-thumb-note-tile {
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.mycal-cell-shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.28) 0%, transparent 32%, transparent 55%, rgba(0,0,0,.62) 100%);
}
.mycal-cell.has-thumbs .mycal-cell-num {
  position: absolute; top: 4px; left: 5px; margin: 0; padding: 0; z-index: 2;
  color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.7);
}
.mycal-cell.has-thumbs.today .mycal-cell-num { color: #ffd27a; }
.mycal-cell-count {
  position: absolute; top: 4px; right: 4px; z-index: 2;
  font-size: 8.5px; font-weight: 700; color: #fff;
  background: rgba(0,0,0,.5); border-radius: 8px; padding: 1.5px 6px;
}
.mycal-cell-title {
  position: absolute; left: 0; right: 0; bottom: 3px; z-index: 2;
  padding: 0 5px; color: #fff; font-size: 9px; line-height: 1.35;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0,0,0,.8); text-align: left;
}
.mycal-cell.has-thumbs.clickable:hover .mycal-thumb-grid img { filter: saturate(1.05) brightness(1.06); }

/* 予定メモ：日別モーダルの追加UI（一覧はカードグリッド側に自動で出るためここでは作らない） */
.mycal-notes-section { display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px; }
.mycal-notes-login-hint { font-size: 11.5px; color: var(--muted); }
.mycal-notes-add {
  display: flex; flex-direction: column; gap: 8px;
  padding: 10px; border-radius: var(--radius); background: rgba(180,100,20,.05);
  border: 1px dashed var(--border);
}
.mycal-notes-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.mycal-note-preset-btn {
  padding: 5px 10px; border-radius: 16px; border: 1.5px solid var(--border);
  background: var(--panel-bg); cursor: pointer; font-size: 11.5px; transition: all .15s;
}
.mycal-note-preset-btn:hover { background: rgba(180,100,20,.1); }
.mycal-note-preset-btn.active { color: #fff; font-weight: 700; }
.mycal-note-preset-btn.active:hover { opacity: .9; }
.mycal-notes-custom-row { display: flex; gap: 6px; }
.mycal-notes-custom-row input {
  flex: 1; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--panel-bg); font-size: 12.5px; color: var(--text);
}
.mycal-notes-custom-add-btn {
  padding: 7px 14px; border-radius: 8px; border: none; background: var(--accent);
  color: #fff; font-size: 12.5px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.mycal-notes-custom-add-btn:hover { opacity: .9; }
.mycal-dot { width: 6px; height: 6px; border-radius: 50%; }
.mycal-dot-viewed   { background: var(--muted); opacity: .5; }
.mycal-dot-bookmark { background: var(--accent); opacity: .8; }
.mycal-event-label {
  font-size: 9px; line-height: 1.3;
  background: var(--accent); color: #fff;
  border-radius: 3px; padding: 2px 5px; margin: 1px 2px;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  text-align: left; flex-shrink: 0;
}
/* マイカレンダー 日詳細 */
.mycal-day-row .card-open-btn { display: none; } /* 日表示は確認用途のため直接開くボタンは出さない */
.mycal-day-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.mycal-back-btn {
  background: none; border: 1px solid var(--border); border-radius: 6px;
  color: var(--text); padding: 4px 10px; cursor: pointer; font-size: 13px;
}
.mycal-back-btn:hover { border-color: var(--accent); color: var(--accent); }
.mycal-day-title { font-family: var(--font-head); font-size: 15px; font-weight: 700; }



/* 同接数ランキング：2列×5行 */
.ranking-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(2, auto);
  gap: 6px;
  padding: 8px 12px 16px;
}
.ranking-grid .card {
  width: 100%;
  aspect-ratio: 16/9;
}

/* ランクバッジ */
.card-rank {
  position: absolute; top: 6px; left: 6px; z-index: 10;
  font-family: var(--font-head); font-size: 11px; font-weight: 800;
  background: rgba(0,0,0,.65); color: #fff;
  padding: 2px 7px; border-radius: 4px; letter-spacing: .02em;
  pointer-events: none;
}
.card.rank-1 .card-rank { font-size: 13px; padding: 3px 9px; }

/* マイカレンダー追加ボタン */
.cal-add-btn {
  background: rgba(255,255,255,.15); border: none; border-radius: 4px;
  color: #fff; font-size: 12px; font-weight: 700;
  width: 22px; height: 22px; line-height: 1;
  cursor: pointer; transition: background .12s;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-left: 4px;
}
.cal-add-btn.in-calendar { background: var(--accent); }
.cal-add-btn:hover { background: var(--accent2); }

/* マイカレンダー共有ボタン */
.mycal-share-btn {
  font-family: var(--font-head); font-size: 10px; font-weight: 700;
  padding: 3px 10px; border-radius: 6px;
  border: 1px solid rgba(180,100,20,.3); background: none;
  color: var(--muted); cursor: pointer; transition: all .12s;
}
.mycal-share-btn:hover { border-color: var(--accent); color: var(--accent); }

.recommend-header { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.discover-filters { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.discover-filter-btn {
  padding: 4px 12px; border-radius: 20px; border: 1px solid rgba(255,255,255,.12);
  background: transparent; color: var(--muted); font-size: 12px; cursor: pointer;
  transition: background .15s, color .15s;
}
.discover-filter-btn:hover { background: rgba(255,255,255,.06); color: var(--fg); }
.discover-filter-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── カード ── */
.card {
  position: relative; border-radius: 8px; overflow: hidden;
  text-decoration: none; color: #fff;
  display: flex; flex-direction: column; justify-content: flex-end;
  aspect-ratio: 4/3;
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
  background: #1a1008;
  transition: transform .15s, box-shadow .15s;
  cursor: pointer;
}
.card:hover    { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,.28); }
.card.promoted { box-shadow: 0 0 0 2px var(--accent), 0 6px 24px rgba(224,88,0,.3); }
.card.is-live  { }
.card.is-live:hover { }
.card.is-upcoming { box-shadow: 0 0 0 2px rgba(80,120,220,.5), 0 4px 16px rgba(80,120,220,.15); }
.card.is-upcoming:hover { box-shadow: 0 0 0 2px rgba(80,120,220,.8), 0 6px 24px rgba(80,120,220,.25); }
.card.is-visited  { opacity: .45; filter: saturate(.3); }
.card.is-visited:hover { opacity: .75; filter: saturate(.6); }
.card.is-upcoming .card-top::after {
  background: linear-gradient(to bottom, rgba(0,0,0,.05) 0%, rgba(20,40,100,.2) 40%, rgba(20,40,100,.75) 100%);
}

.card-top { position: absolute; inset: 0; }
.card-thumb {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.card-thumb-fallback {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #2a1a0e, #1a0c04);
  display: flex; align-items: center; justify-content: center; font-size: 32px;
}
.card-top::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.05) 0%, rgba(0,0,0,.15) 40%, rgba(0,0,0,.75) 100%);
}
.card-meta {
  position: relative; z-index: 1;
  padding: 8px 8px 4px; display: flex; flex-direction: column; gap: 3px;
}
.card-meta-top { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.card-score { margin-left: auto; font-family: var(--font-head); font-size: 10px; font-weight: 700; color: #ffcc88; }
.pr-badge   { font-size: 8px; color: var(--accent); font-weight: 700; background: rgba(255,255,255,.15); padding: 1px 4px; border-radius: 2px; }
.upcoming-badge {
  font-size: 8px; font-weight: 700; padding: 1px 4px; border-radius: 2px;
  background: rgba(80,120,220,.25); color: #aac0ff;
}
.card-upcoming-time {
  margin-left: auto; font-family: var(--font-head); font-size: 10px; font-weight: 700; color: #aac0ff;
}
.card-author { font-size: 9px; color: rgba(255,255,255,.7); font-family: var(--font-head); }
.card-author-link { cursor: pointer; width: fit-content; }
.card-author-link:hover { color: var(--accent); text-decoration: underline; }
.card-tags   { display: flex; flex-wrap: wrap; gap: 3px; }
.card-tag    { font-size: 8px; padding: 1px 5px; border-radius: 999px; background: rgba(255,255,255,.15); color: rgba(255,255,255,.85); }
.card-title  {
  position: relative; z-index: 1;
  font-size: var(--card-title-size); font-weight: 700; line-height: 1.35; color: #fff;
  padding: 0 8px 8px;
  overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  text-shadow: 0 1px 4px rgba(0,0,0,.6);
}
.card-source-badge { font-size: var(--card-meta-size); }
.card-score        { font-size: var(--card-meta-size); }
.card-author       { font-size: var(--card-meta-size); }
.card-tag          { font-size: var(--card-meta-size); }

/* カード LIVEドット（非表示） */
.card-live-dot { display: none; }
@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(.75); }
}

/* ソースバッジ */
.badge {
  font-size: 10px; font-weight: 800; letter-spacing: .03em;
  padding: 2px 6px; border-radius: 3px; flex-shrink: 0;
}
.badge.youtube  { background: rgba(204, 34,   0, .15); color: var(--yt); }
.badge.twitch   { background: rgba(124, 58, 237, .15); color: var(--tt); }
.badge.twitter  { background: rgba(  0,128, 192, .15); color: var(--tw); }
.badge.niconico { background: rgba( 30,130, 255, .15); color: #1a80ff; }
.badge.netflix  { background: rgba(229,  9,  20, .15); color: #e50914; }
.badge.amazon   { background: rgba( 35,131, 230, .15); color: #2383e6; }
.badge.disney   { background: rgba( 17, 60, 166, .15); color: #113ca6; }
.badge.other    { background: rgba(138,112,  96, .15); color: var(--muted); }
.badge.movie    { background: rgba(220, 80,  40, .15); color: #dc5028; }
.badge.drama    { background: rgba(180, 40, 120, .15); color: #b42878; }
.badge.book     { background: rgba( 40,160,  80, .15); color: #28a050; }
.badge.game     { background: rgba( 60, 80, 220, .15); color: #3c50dc; }
.badge.event    { background: rgba(220,160,  20, .15); color: #dca014; }
.badge.venue    { background: rgba(160, 60, 200, .15); color: #a03cc8; }
.badge.seven_eleven { background: rgba(255, 130, 0, .15); color: #e07000; }
.badge.family_mart  { background: rgba(0, 150, 80, .15); color: #009650; }
.badge.lawson       { background: rgba(0, 100, 60, .15); color: #005a38; }
.badge.note-badge { background: rgba(125, 119, 221, .18); color: #7f77dd; }
.card.is-note { cursor: pointer; }
.card.is-note .card-thumb-fallback.note-tile { font-size: 26px; }

/* カード左上バッジ */
.card-source-badge {
  position: absolute; top: 6px; left: 6px; z-index: 2;
  background: rgba(0,0,0,.55) !important;
  color: #fff !important;
  font-size: 10px; font-weight: 800;
  padding: 2px 7px; border-radius: 4px;
  pointer-events: none;
}

/* ══════════════════════════════════════
   右カラム・スポットライト（廃止）
══════════════════════════════════════ */
.right-col { display: none; }
.spotlight-panel, .spotlight-header, .spotlight-card, .spotlight-empty { display: none; }

/* 投稿ビュー リスト */
.posts-list {
  display: flex; flex-direction: column;
}
.post-row {
  display: flex; height: 120px;
  text-decoration: none; color: var(--text);
  border-bottom: 1px solid rgba(180,100,20,.08);
  overflow: hidden; transition: opacity .15s;
}
.post-row:hover { opacity: .9; }

.post-row-left {
  flex: 0 0 160px; overflow: hidden;
}
.post-row-thumb {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.post-row-thumb-fallback {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #2a1a0e, #1a0c04);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
}

.post-row-body-wrap {
  flex: 1; position: relative; overflow: hidden; min-width: 0;
}
.post-row-body-bg {
  position: absolute; inset: -10px;
  background-size: cover; background-position: center;
  filter: blur(12px) brightness(.6) saturate(1.4);
}
.post-row-body-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(255,252,248,.15), rgba(255,252,248,.05));
}
.post-row-body {
  position: relative; z-index: 1;
  padding: 10px 16px; height: 100%;
  display: flex; flex-direction: column; gap: 5px; justify-content: center;
}

.post-row-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.post-row-badge { font-size: 10px; }
.post-row-score {
  font-family: var(--font-head); font-size: 11px; font-weight: 700;
  color: rgba(255,255,255,.7); margin-left: auto;
}
.post-row-title {
  font-family: var(--font-head); font-size: 17px; font-weight: 800;
  color: #fff; line-height: 1.25;
  text-shadow: 0 1px 6px rgba(0,0,0,.5);
  overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.post-row-date {
  font-family: var(--font-head); font-size: 12px; font-weight: 700;
  color: #ffcc88;
}
.post-row-tags {
  display: flex; flex-wrap: wrap; gap: 4px;
}
.post-row-tags .card-tag {
  font-size: 10px; padding: 2px 7px;
  background: rgba(255,255,255,.15); color: rgba(255,255,255,.85);
  border-radius: 999px;
}

/* 投稿グリッド（旧） */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-cols), 1fr);
  gap: 5px;
  padding: 8px;
}

/* ══════════════════════════════════════
   詳細モーダル
══════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.3); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; animation: fadeIn .15s ease;
}
.modal-overlay.hidden { display: none; }
#detailOverlay { z-index: 1100; } /* 日別モーダルなど他のモーダルの上に開けるように最前面にする */
#modalOverlay  { z-index: 1150; } /* 投稿・編集フォームは詳細/日別モーダルからも開けるので、さらに上に出す */
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal {
  background: #fffcf8; border: 1px solid rgba(180,100,20,.15);
  border-radius: 14px; width: 460px; max-width: 90vw;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  animation: slideUp .2s ease; overflow: hidden;
}
.detail-modal { width: 560px; max-width: 92vw; max-height: 88vh; display: flex; flex-direction: column; }
.mycal-day-modal { width: 760px; max-width: 94vw; max-height: 86vh; display: flex; flex-direction: column; }
.mycal-day-modal-body { flex: 1; overflow-y: auto; }

.detail-thumb-wrap {
  position: relative; flex-shrink: 0; aspect-ratio: 16/9; overflow: hidden; background: #1a0c04;
}
.detail-thumb-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-thumb-overlay  { position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,.7) 100%); }
.detail-close {
  position: absolute; top: 10px; right: 10px;
  background: rgba(0,0,0,.5); border: none; color: #fff;
  font-size: 14px; cursor: pointer; padding: 4px 8px; border-radius: 4px; line-height: 1; z-index: 1;
}
.detail-close:hover { background: rgba(0,0,0,.75); }
.detail-badges { position: absolute; bottom: 10px; left: 12px; display: flex; gap: 6px; align-items: center; z-index: 1; }

.detail-live-badge {
  font-family: var(--font-head); font-size: 10px; font-weight: 700;
  background: rgba(200,0,0,.75); color: #fff;
  padding: 2px 7px; border-radius: 3px; letter-spacing: .04em;
}

.detail-body {
  padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto;
}
.detail-body::-webkit-scrollbar { width: 4px; }
.detail-body::-webkit-scrollbar-thumb { background: rgba(180,100,20,.2); border-radius: 2px; }

.detail-title { font-family: var(--font-head); font-size: 16px; font-weight: 700; color: var(--text); line-height: 1.4; }
.detail-author { display: none; margin-top: 4px; }
.detail-author-link {
  background: none; border: none; padding: 0; cursor: pointer;
  font-size: 12px; color: var(--muted); font-family: var(--font-head);
}
.detail-author-link:hover { color: var(--accent); text-decoration: underline; }

.detail-moderation { display: flex; gap: 14px; margin-top: 10px; }
.detail-mod-link {
  background: none; border: none; padding: 0; cursor: pointer;
  font-size: 11px; color: var(--muted); font-family: var(--font-head);
}
.detail-mod-link:hover { color: #c0392b; text-decoration: underline; }

.detail-tags  { display: flex; flex-wrap: wrap; gap: 5px; }
.detail-tag   {
  font-size: 13px; padding: 3px 10px; border-radius: 999px;
  background: rgba(180,100,20,.12); color: var(--text); cursor: pointer; transition: background .12s;
}
.detail-tag:hover { background: rgba(180,100,20,.22); }

/* stats（メーター廃止・数字表示） */
.detail-meters {
  display: flex; flex-direction: column; gap: 8px;
  padding: 14px 16px;
  background: rgba(180,100,20,.05); border: 1px solid rgba(180,100,20,.1); border-radius: 8px;
}
.detail-stat-row {
  display: flex; align-items: center; gap: 8px;
}
.detail-stat-live-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: #ff3030;
  box-shadow: 0 0 5px rgba(255,48,48,.8);
  animation: live-pulse 1.4s ease-in-out infinite;
}
.detail-stat-icon {
  font-size: 13px; flex-shrink: 0; width: 18px; text-align: center;
}
.detail-stat-label {
  font-family: var(--font-head); font-size: 10px; font-weight: 700;
  letter-spacing: .05em; color: var(--muted); flex: 1;
}
.detail-stat-num {
  font-family: var(--font-head); font-size: 18px; font-weight: 800;
  color: var(--text); letter-spacing: -.01em;
}

.detail-actions { display: flex; gap: 8px; }

.detail-main-btn {
  flex: 1; display: block; text-align: center;
  background: var(--accent); color: #fff; padding: 11px; border-radius: 8px;
  font-family: var(--font-head); font-size: 13px; font-weight: 700;
  text-decoration: none; transition: opacity .15s;
}
.detail-main-btn:hover { opacity: .85; }

.detail-edit-btn {
  background: none; border: 1px solid var(--border); border-radius: 8px;
  padding: 11px 16px; font-family: var(--font-head); font-size: 12px; font-weight: 700;
  color: var(--muted); cursor: pointer; transition: all .15s; flex-shrink: 0;
}
.detail-edit-btn:hover { border-color: var(--accent); color: var(--accent); }

.detail-delete-btn {
  background: none; border: 1px solid rgba(200,0,0,.25); border-radius: 8px;
  padding: 11px 16px; font-family: var(--font-head); font-size: 12px; font-weight: 700;
  color: rgba(200,0,0,.6); cursor: pointer; transition: all .15s; flex-shrink: 0;
}
.detail-delete-btn:hover { background: rgba(200,0,0,.08); border-color: rgba(200,0,0,.5); color: #c00; }

/* 見るよ（参加表明）ボタン */
.detail-watch-btn {
  padding: 10px 16px; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 600;
  background: none; border: 2px solid var(--border); color: var(--muted);
  transition: all .15s; white-space: nowrap;
}
.detail-watch-btn:hover { border-color: #7c4dff; color: #7c4dff; }
.detail-watch-btn.active {
  background: #7c4dff; border-color: #7c4dff; color: #fff;
}
.detail-watch-btn.active:hover { opacity: .85; }
.detail-watch-btn:disabled {
  cursor: default; color: var(--muted); border-color: var(--border);
  opacity: .6; font-size: 12px;
}
.detail-watch-btn:disabled:hover { border-color: var(--border); color: var(--muted); }

/* リアクション統計行（★N人が興味あり ・ 📌N人が予定に入れています） */
.detail-reactions {
  display: none; align-items: center; flex-wrap: wrap; gap: 4px;
  margin-bottom: 10px; font-size: 12.5px; color: var(--muted);
}
.detail-reaction-item b { color: var(--text); font-weight: 700; }
.detail-reaction-sep { color: var(--border); }

/* 見るよ表明ユーザーのアバター一覧 */
.detail-watchers {
  display: none; align-items: center; flex-wrap: wrap; gap: 6px;
  margin-bottom: 14px;
}
.detail-watchers-label {
  font-size: 11px; color: var(--muted); font-family: var(--font-head);
  font-weight: 700; margin-right: 2px;
}
.detail-watcher-chip {
  width: 26px; height: 26px; border-radius: 50%; overflow: hidden; padding: 0;
  border: 1.5px solid var(--border); background: var(--panel-bg); cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: border-color .15s;
}
.detail-watcher-chip:hover { border-color: var(--accent); }
.detail-watcher-chip img { width: 100%; height: 100%; object-fit: cover; }
.detail-watcher-chip-fallback { font-size: 12px; }

/* いいねボタン */
.like-btn {
  background: none; border: 1px solid rgba(180,100,20,.2); border-radius: 6px;
  padding: 4px 10px; cursor: pointer; font-size: 11px;
  font-family: var(--font-head); font-weight: 700; color: var(--muted);
  flex-shrink: 0; transition: background .12s, transform .1s;
}
.like-btn:hover { background: rgba(224,80,128,.1); transform: scale(1.05); }
.like-btn.liked { background: rgba(224,80,128,.15); border-color: #e05080; color: #e05080; }

/* カードの即開くボタン */
.card-open-btn {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  background: rgba(0,0,0,.5); border: none; border-radius: 4px;
  color: #fff; font-size: 11px; padding: 3px 7px;
  cursor: pointer; opacity: 0; transition: opacity .15s;
  text-decoration: none; line-height: 1.4;
}
.card:hover .card-open-btn { opacity: 1; }
.discover-card:hover .card-open-btn { opacity: 1; }

.detail-related { display: flex; flex-direction: column; gap: 8px; }
.detail-related.hidden { display: none; }
.detail-related-label { font-family: var(--font-head); font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.detail-related-links { display: flex; flex-direction: column; gap: 6px; }
.detail-related-link {
  display: block; padding: 9px 12px;
  background: rgba(180,100,20,.06); border: 1px solid rgba(180,100,20,.12); border-radius: 6px;
  text-decoration: none; font-size: 12px; color: var(--accent2);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; transition: background .12s;
}
.detail-related-link:hover { background: rgba(180,100,20,.12); }

/* 投稿モーダル */
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid rgba(180,100,20,.1);
}
.modal-title { font-family: var(--font-head); font-size: 14px; font-weight: 700; flex: 1; }
.modal-close {
  background: none; border: none; color: var(--muted);
  font-size: 15px; cursor: pointer; padding: 2px 6px; border-radius: 4px; line-height: 1; transition: background .15s;
}
.modal-close:hover { background: rgba(180,100,20,.1); color: var(--text); }
.modal-body   { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.modal-footer { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-top: 1px solid rgba(180,100,20,.1); gap: 12px; }

/* 日別モーダル：編集モード */
.mycal-day-edit-btn {
  flex-shrink: 0; margin-right: 4px;
  background: none; border: 1.5px solid var(--border); border-radius: 16px;
  color: var(--text); font-size: 11.5px; font-weight: 700; padding: 5px 12px; cursor: pointer;
  transition: all .15s;
}
.mycal-day-edit-btn:hover { border-color: var(--accent); color: var(--accent); }
.mycal-day-edit-btn.hidden { display: none; }
.mycal-day-edit-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.mycal-day-edit-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 12px; margin-bottom: 4px;
  background: rgba(200,40,20,.06); border: 1px solid rgba(200,40,20,.2); border-radius: var(--radius);
}
.mycal-day-featured-toolbar {
  background: rgba(220,160,20,.08); border-color: rgba(220,160,20,.25); justify-content: flex-start;
}
.mycal-day-edit-count { font-size: 12px; color: var(--muted); }
.mycal-day-edit-delete-btn {
  background: #c0392b; border: none; border-radius: 8px; color: #fff;
  font-size: 12px; font-weight: 700; padding: 7px 16px; cursor: pointer; transition: opacity .15s;
}
.mycal-day-edit-delete-btn:hover { opacity: .85; }
.mycal-day-edit-delete-btn:disabled { background: var(--border); color: var(--muted); cursor: not-allowed; }

.card.mycal-editable { cursor: pointer; position: relative; }
.card.mycal-editable::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  border: 2px solid transparent; pointer-events: none; transition: border-color .15s;
}
.card.mycal-editable.selected::after { border-color: #c0392b; }
.card.mycal-editable.selected { opacity: .92; }
.mycal-card-check {
  position: absolute; top: 6px; right: 6px; z-index: 3;
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(255,255,255,.85); border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: transparent; transition: all .15s;
}
.card.mycal-editable.selected .mycal-card-check {
  background: #c0392b; border-color: #c0392b; color: #fff;
}

/* 表示選択モード（月表示に出すカードを☆で選ぶ） */
.card.mycal-featurable { cursor: pointer; position: relative; }
.card.mycal-featurable::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  border: 2px solid transparent; pointer-events: none; transition: border-color .15s;
}
.card.mycal-featurable.featured::after { border-color: #dca014; }
.mycal-card-star {
  position: absolute; top: 6px; right: 6px; z-index: 3;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(255,255,255,.9); border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--muted); transition: all .15s;
}
.card.mycal-featurable.featured .mycal-card-star {
  background: #dca014; border-color: #dca014; color: #fff;
}

.field       { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.field label { font-size: 9px; color: var(--muted); letter-spacing: .07em; text-transform: uppercase; }
.field-row   { display: flex; gap: 10px; }
.genre-select { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0; }
.source-detect { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.source-detect-label { font-size: 10px; color: var(--muted); }
.source-detect-value { font-size: 10px; padding: 2px 8px; }
.genre-btn {
  padding: 5px 12px; border-radius: 20px; border: 1px solid rgba(255,255,255,.12);
  background: transparent; color: var(--muted); font-size: 12px; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.genre-btn:hover { background: rgba(255,255,255,.06); color: var(--fg); }
.genre-btn.selected { background: var(--accent); border-color: var(--accent); color: #fff; }
.genre-btn.locked-out { opacity: .35; cursor: not-allowed; }
.genre-btn:disabled:hover { background: none; color: inherit; }

input[type=text], input[type=url], input[type=number], input[type=datetime-local], select {
  background: #fff; border: 1px solid rgba(180,100,20,.18); border-radius: 6px;
  padding: 7px 10px; font-family: var(--font-body); font-size: 13px; color: var(--text);
  outline: none; transition: border-color .15s; width: 100%;
}
input:focus, select:focus { border-color: rgba(180,100,20,.45); }
input[type=datetime-local]::-webkit-calendar-picker-indicator { filter: opacity(.4); }
select option { background: #fff; }

.form-msg     { font-size: 12px; flex: 1; }
.form-msg.ok  { color: #2a8a2a; }
.form-msg.err { color: var(--accent); }

#submitBtn {
  background: var(--accent); color: #fff; border: none; border-radius: 6px;
  padding: 8px 22px; font-family: var(--font-head); font-size: 12px; font-weight: 700;
  cursor: pointer; transition: opacity .15s; flex-shrink: 0;
}
#submitBtn:hover    { opacity: .85; }
#submitBtn:disabled { opacity: .35; cursor: not-allowed; }

.hidden { display: none !important; }

/* ══════════════════════════════════════
   LIVE リスト表示
══════════════════════════════════════ */
.live-list {
  display: flex;
  flex-direction: column;
}

.live-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(180,100,20,.08);
  cursor: pointer;
  transition: background .15s;
}
.live-row:hover { background: rgba(180,100,20,.05); }

.live-row-rank {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 800;
  color: rgba(160,80,20,.3);
  width: 26px;
  text-align: right;
  flex-shrink: 0;
  line-height: 1;
}
.live-list .live-row:nth-child(1) .live-row-rank { color: var(--accent); font-size: 20px; }
.live-list .live-row:nth-child(2) .live-row-rank { color: rgba(160,80,20,.65); }
.live-list .live-row:nth-child(3) .live-row-rank { color: rgba(160,80,20,.45); }

.live-row-thumb-wrap {
  flex-shrink: 0;
  width: 96px;
  height: 54px;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(0,0,0,.15);
}
.live-row-thumb {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.live-row-thumb-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}

.live-row-info {
  flex: 1;
  min-width: 0;
}
.live-row-title {
  font-size: 13px;
  line-height: 1.45;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 5px;
}
.live-row-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}
.live-row-badge { font-size: 10px; }
.live-row-cat {
  font-size: 10px;
  color: var(--muted);
}

.live-row-right {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  min-width: 70px;
}
.live-row-viewers {
  display: flex;
  align-items: center;
  gap: 5px;
}
.live-row-score {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
}
.live-row-open {
  font-size: 10px;
  color: var(--muted);
  text-decoration: none;
  padding: 2px 7px;
  border: 1px solid rgba(180,100,20,.2);
  border-radius: 3px;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}
.live-row-open:hover {
  color: var(--text);
  border-color: var(--accent);
}

/* ══════════════════════════════════════
   日付パネル（カレンダー直下）
══════════════════════════════════════ */
.daypanel {
  padding: 0 0 8px;
}

.daypanel-header {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -.01em;
  padding: 10px 12px 8px;
  border-bottom: 1px solid rgba(180,100,20,.15);
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.daypanel-count {
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
  font-family: var(--font-body);
}

.daypanel-empty {
  font-size: 11px;
  color: var(--muted);
  padding: 14px 12px;
  text-align: center;
}

.daypanel-group {
  padding: 8px 0 4px;
  border-bottom: 1px solid rgba(180,100,20,.06);
}
.daypanel-group:last-child { border-bottom: none; }

.daypanel-group-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  color: rgba(160,80,20,.6);
  padding: 0 12px 4px;
}

.daypanel-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  cursor: pointer;
  transition: background .12s;
  border-radius: 4px;
  margin: 0 4px;
}
.daypanel-row:hover { background: rgba(180,100,20,.07); }

.daypanel-thumb {
  flex-shrink: 0;
  width: 52px;
  height: 30px;
  object-fit: cover;
  border-radius: 3px;
  display: block;
}
.daypanel-thumb-fallback {
  width: 52px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.12);
  border-radius: 3px;
  font-size: 14px;
  flex-shrink: 0;
}

.daypanel-title {
  font-size: 11px;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  flex: 1;
  min-width: 0;
}

/* ══════════════════════════════════════
   発見（トレンド）セクション
══════════════════════════════════════ */
.discover-section {
  border-bottom: 1px solid rgba(180,100,20,.08);
  padding-bottom: 12px;
}

.discover-section-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 14px 12px 8px;
  cursor: pointer;
  user-select: none;
}

.discover-section-toggle {
  margin-left: auto;
  font-size: 10px;
  color: var(--muted);
}

.discover-section-label {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.01em;
}

.discover-section-count {
  font-size: 10px;
  color: var(--muted);
}

.discover-scroll {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  padding: 0 12px 8px;
}

.discover-card {
  width: 100%;
  cursor: pointer;
  transition: opacity .15s;
}
.discover-card:hover { opacity: .82; }

.discover-card-top {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(0,0,0,.15);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.discover-card-thumb {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.discover-card-thumb-fallback {
  font-size: 26px;
}

.discover-card-thumb-text {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 10px; text-align: center; gap: 4px;
  background: linear-gradient(160deg, rgba(200,120,30,.10), rgba(200,120,30,.03));
}
.thumb-fallback-icon { font-size: 20px; opacity: .7; }
.thumb-fallback-title {
  font-size: 12px; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; color: var(--fg);
}
.thumb-fallback-date { font-size: 11px; color: var(--accent); font-weight: 700; }

.discover-card-badge {
  position: absolute;
  top: 5px; left: 5px;
  font-size: 9px;
}

.discover-card-body { padding: 0 2px; }

.discover-card-title {
  font-size: 11px;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 3px;
}

.discover-card-score {
  font-size: 10px;
  color: var(--muted);
}

.discover-card-book-meta {
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.discover-list {
  display: flex;
  flex-direction: column;
  padding: 0 4px;
}

.discover-more-btn {
  display: block;
  width: calc(100% - 24px);
  margin: 0 12px 4px;
  padding: 7px;
  background: none;
  border: 1px solid rgba(180,100,20,.2);
  border-radius: 4px;
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.discover-more-btn:hover {
  color: var(--text);
  border-color: var(--accent);
}

/* ══════════════════════════════════════
   スマホ対応（〜480px）
══════════════════════════════════════ */
@media (max-width: 480px) {
  :root {
    --header-h: 92px;
    --gap: 8px;
    --card-title-size: 10px;
    --card-meta-size: 9px;
  }

  /* ── ヘッダー：2段組み ── */
  header {
    height: var(--header-h);
    flex-wrap: wrap;
    align-content: center;
    padding: 6px 12px;
  }
  .logo-ruby, .logo-desc { display: none; }
  .logo { order: 1; }
  .logo-main { font-size: 15px; }
  .header-right { order: 2; gap: 6px; }
  #postBtn { padding: 6px 12px; font-size: 11px; }
  #authBtn { padding: 6px 10px; font-size: 11px; }

  .timeline-toggle {
    order: 3; flex: 0 0 100%; margin-top: 6px;
    justify-content: space-between;
  }
  .tl-btn {
    flex: 1; min-width: 0; padding: 6px 4px; font-size: 9.5px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }

  /* ── ステージ：上下並びに変更 ── */
  .stage { flex-direction: column; }

  /* ── 左カラム：折りたたみ式カレンダー ── */
  .left-col {
    flex: 0 0 auto; width: 100%; overflow: visible;
  }
  .mobile-cal-toggle {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: 10px 14px; margin-bottom: 6px;
    border-radius: var(--radius); border: 1px solid var(--panel-border);
    background: var(--panel-bg); backdrop-filter: blur(16px);
    font-family: var(--font-head); font-size: 12px; font-weight: 700;
    color: var(--text); cursor: pointer;
  }
  .mobile-cal-toggle-arrow { color: var(--muted); transition: transform .2s; }
  .left-col.open .mobile-cal-toggle-arrow { transform: rotate(180deg); }
  .left-col-inner {
    max-height: 0; overflow: hidden;
    transition: max-height .25s ease;
  }
  .left-col.open .left-col-inner {
    max-height: 70vh; overflow-y: auto;
  }

  /* ── タイムライン：カード列数を固定・列切替は非表示 ── */
  .col-btns { display: none; }
  .slot-cards { grid-template-columns: repeat(3, 1fr) !important; }
  .slot-label { width: 46px; font-size: 10px; padding: 8px 6px 0; }

  /* ── LIVEタブ：ランキング・カテゴリ別グリッド ── */
  .ranking-grid { grid-template-columns: repeat(2, 1fr); }
  .recommend-grid { grid-template-columns: 1fr 1fr; max-width: 100%; }
  .recommend-grid .card:nth-child(3) { display: none; } /* 3列目は幅不足のため間引き */
  .recommend-source-header { font-size: 17px; padding: 12px 8px 4px; }
  .recommend-section-label { font-size: 15px; }

  /* ── 発見（投稿）タブ：カードの最小幅を縮小 ── */
  .discover-scroll {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px; padding: 0 8px 8px;
  }
  .discover-section-header { padding: 12px 8px 6px; }
  .discover-filters { justify-content: flex-start; width: 100%; }
  .discover-filter-btn { padding: 4px 10px; font-size: 11px; }

  /* ── 投稿リスト行（post-row） ── */
  .post-row { height: 92px; }
  .post-row-left { flex: 0 0 96px; }
  .post-row-title { font-size: 14px; }

  /* ── マイカレンダー：月グリッド ── */
  .mycal-month-view { padding: 12px 10px 24px; }
  .mycal-cell { height: 58px; padding: 4px 3px 3px; }
  .mycal-cell.has-thumbs { padding: 0; }
  .mycal-cell-title { display: none; } /* 58pxセルではタイトルは可読性がないため非表示 */
  .mycal-cell-count { font-size: 8px; padding: 1px 5px; }
  .mycal-cell-num { font-size: 11px; margin-bottom: 2px; }
  .mycal-event-label { font-size: 8px; padding: 1px 4px; margin: 1px 1px; }
  .mycal-viewed-count { font-size: 8px; }
  .mycal-title { font-size: 15px; }
  .mycal-viewing-header { padding: 8px 10px; gap: 8px; margin-bottom: 12px; }
  .mycal-viewing-name { font-size: 12px; }
  .mycal-follow-btn { padding: 5px 10px; font-size: 11px; }

  /* ── 詳細モーダル：操作ボタンを折り返し ── */
  .detail-actions { flex-wrap: wrap; }
  .detail-main-btn { flex: 1 1 100%; }
  .detail-watch-btn, .detail-edit-btn, .detail-delete-btn { flex: 1 1 auto; }
  .detail-body { padding: 14px 16px; }
  .mycal-day-modal-body { padding: 12px 12px 16px; }
  .mycal-day-edit-btn { font-size: 10.5px; padding: 4px 9px; }
  .mycal-day-edit-toolbar { padding: 7px 10px; }
  .mycal-day-edit-count { font-size: 11px; }
  .mycal-day-edit-delete-btn { font-size: 11px; padding: 6px 12px; }
  .mycal-note-preset-btn { font-size: 10.5px; padding: 4px 8px; }
}
