:root{
  --bg:#f9f9f9;
  --card:#ffffff;
  --text:#0f0f0f;
  --muted:#606060;
  --line:#e6e6e6;
  --shadow: 0 2px 10px rgba(0,0,0,.06);

  --ytRed:#ff0000;
  --ytRed2:#cc0000;
  --link:#065fd4;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Noto Sans JP", Arial;
  background: var(--bg);
  color: var(--text);
}

a{color:var(--link); text-decoration:none}
a:hover{text-decoration:underline}

.container{
  width:min(1100px, 92vw);
  margin: 0 auto;
}

.header{
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.headerInner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
  padding: 14px 0;
}

.brand{
  display:flex;
  align-items:center;
  gap: 12px;
  min-width: 0;
}

.brandText{min-width:0}

.logo{
  width: 36px; height: 26px;
  border-radius: 7px;
  background: var(--ytRed);
  position: relative;
  flex: 0 0 auto;
  box-shadow: 0 6px 16px rgba(255,0,0,.15);
}
.logo::after{
  content:"";
  position:absolute;
  left: 14px; top: 7px;
  width: 0; height: 0;
  border-left: 9px solid #fff;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

.title{
  margin:0;
  font-size: 18px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sub{
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.headerActions{
  display:flex;
  gap:10px;
  flex: 0 0 auto;
}

.btn{
  appearance:none;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  white-space: nowrap;
}
.btn:hover{background:#f2f2f2}

.btnPrimary{
  border-color: transparent;
  background: var(--ytRed);
  color:#fff;
}
.btnPrimary:hover{background: var(--ytRed2)}
.btnGhost{background:#fff}

.metaLine{
  margin: 14px 0 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.metaText{
  font-size: 12px;
  color: var(--muted);
}
.dot{margin: 0 8px; color: #b1b1b1}

.notice{
  border:1px solid var(--line);
  background:#fff;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 900px){
  .headerInner{flex-wrap: wrap}
  .headerActions{width: 100%}
  .headerActions .btn{flex: 1}
}

.card{
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 12px;
  margin-top: 12px;
}

.cardTitle{
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}

.filterRow{
  display:grid;
  grid-template-columns: 160px 220px 1fr;
  gap: 10px;
  align-items:end;
}
@media (max-width: 900px){
  .filterRow{grid-template-columns: 1fr; align-items:stretch;}
}

.field{display:flex; flex-direction:column; gap: 6px}
.label{font-size: 12px; color: var(--muted)}
.control{
  width: 100%;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 0 10px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
}
.control:focus{
  outline: none;
  border-color: rgba(255,0,0,.55);
  box-shadow: 0 0 0 3px rgba(255,0,0,.12);
}

.listCard{
  padding: 0;
  overflow:hidden;
}
.listHeader{
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.listTitle{
  margin:0;
  font-size: 14px;
}

.items{
  display:flex;
  flex-direction:column;
}

.item{
  display:grid;
  grid-template-columns: 56px 96px 1fr 160px;
  gap: 12px;
  align-items:center;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.item:hover{background:#fcfcfc}
@media (max-width: 900px){
  .item{grid-template-columns: 44px 88px 1fr; }
  .go{grid-column: 1 / -1; justify-self: end;}
}

.rank{
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 900;
  background: #f1f1f1;
  color: #111;
}

/* 金銀銅 */
.rank.rank1{
  background: linear-gradient(180deg, #ffe8a3, #f6c453);
  border: 1px solid rgba(160,110,0,.35);
}
.rank.rank2{
  background: linear-gradient(180deg, #f1f4f7, #cfd6de);
  border: 1px solid rgba(120,130,140,.35);
}
.rank.rank3{
  background: linear-gradient(180deg, #ffd2b4, #d79b6a);
  border: 1px solid rgba(120,70,20,.35);
}

.thumbWrap{
  width: 96px;
  height: 54px;
  border-radius: 10px;
  overflow:hidden;
  background: #eee;
  border: 1px solid #ededed;
}
.thumb{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}
.thumbPh{
  width:100%;
  height:100%;
  background: linear-gradient(90deg, #eee, #f7f7f7, #eee);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite linear;
}
@keyframes shimmer{
  0%{background-position: 0% 0%}
  100%{background-position: 200% 0%}
}

.main{min-width: 0;}
.titleLine{
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
  margin-bottom: 8px;
  word-break: break-word;
}

.meta2{
  display:flex;
  gap: 6px;
  flex-wrap: wrap;
}

.badge{
  font-size: 12px;
  color: var(--muted);
  background: #f2f2f2;
  border: 1px solid #eaeaea;
  border-radius: 999px;
  padding: 4px 8px;
}

.badgeStrong{
  color: #0f0f0f;
  background: rgba(255,0,0,.08);
  border-color: rgba(255,0,0,.18);
}

/* カテゴリ色（topic badgeだけに付与） */
.badgeTopic{font-weight:800; color:#111}
.badgeTopic.t-ent{background: rgba(255,0,0,.12); border-color: rgba(255,0,0,.25)}
.badgeTopic.t-zatsu{background: rgba(138,43,226,.12); border-color: rgba(138,43,226,.28)}
.badgeTopic.t-cook{background: rgba(255,140,0,.14); border-color: rgba(255,140,0,.30)}
.badgeTopic.t-love{background: rgba(255,0,128,.12); border-color: rgba(255,0,128,.26)}
.badgeTopic.t-fit{background: rgba(0,160,90,.12); border-color: rgba(0,160,90,.26)}
.badgeTopic.t-eng{background: rgba(0,90,200,.12); border-color: rgba(0,90,200,.26)}
.badgeTopic.t-life{background: rgba(0,160,180,.12); border-color: rgba(0,160,180,.26)}
.badgeTopic.t-other{background: rgba(120,120,120,.12); border-color: rgba(120,120,120,.22)}

.go{justify-self:end;}
.go a{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,0,0,.25);
  background: rgba(255,0,0,.08);
  color: #111;
  font-weight: 800;
}
.go a:hover{
  background: rgba(255,0,0,.12);
  text-decoration:none;
}

.footer{
  padding: 12px;
  background:#fff;
}
.footNote{
  font-size: 12px;
  color: var(--muted);
}
.muted{color: var(--muted)}
