.portal-page main.shell { padding-top: 0; }

.portal-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  margin-top: 12px;
  padding: 10px 60px;
  background: linear-gradient(90deg, #123b6d, #1e5fa8 40%, #2b7dd8);
  color: #fff;
  text-align: center;
}
.portal-banner:hover { color: #fff; text-decoration: underline; }
.portal-banner h1 {
  font-size: 32px;
  letter-spacing: 6px;
  text-shadow: 0 2px 4px #0005;
}
.banner-stars { color: #ffd700; font-size: 22px; letter-spacing: 8px; white-space: nowrap; }
.banner-label { padding: 2px 0; color: #666; font-size: 11px; }

.portal-focus {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr) minmax(0, 300px);
  gap: 10px;
  min-height: 766px;
  padding: 10px 0 20px;
}
.portal-focus > * { min-width: 0; }
.focus-bar {
  display: grid;
  place-items: center;
  min-height: 52px;
  padding: 2px 12px;
  background: linear-gradient(90deg, #ff7500, #ff9a40);
  color: #fff;
  font-size: 22px;
  letter-spacing: 2px;
  text-align: center;
  text-shadow: 0 1px 2px #8e3800;
}
.focus-gallery { position: relative; padding-bottom: 24px; }
.focus-picture { display: block; position: relative; height: 264px; overflow: hidden; }
.tile-color-1 { background: linear-gradient(135deg, #2196f3, #21cbf3); }
.tile-color-2 { background: linear-gradient(135deg, #ff9800, #ff5722); }
.tile-color-3 { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.tile-color-4 { background: linear-gradient(135deg, #0ba360, #3cba92); }
.tile-color-5 { background: linear-gradient(135deg, #f7971e, #ffd200); }
.tile-color-6 { background: linear-gradient(135deg, #e0c3fc, #8ec5fc); }
.tile-color-7 { background: linear-gradient(135deg, #f093fb, #f5576c); }
.tile-color-8 { background: linear-gradient(135deg, #667eea, #764ba2); }
.tile-label {
  display: grid;
  place-items: center;
  position: absolute;
  inset: 0;
  padding: 8px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2px;
  text-align: center;
  text-shadow: 0 1px 3px #0009;
}
.focus-caption {
  position: absolute;
  inset: auto 0 0;
  padding: 10px 12px;
  background: #0009;
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
}
.focus-controls {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  justify-content: center;
  gap: 4px;
}
.focus-controls button {
  display: grid;
  place-items: center;
  min-width: 16px;
  min-height: 24px;
  padding: 0 2px;
  background: none;
  border: 0;
}
.focus-controls button::before { content: ""; width: 8px; height: 8px; border-radius: 8px; background: #aaa; }
.focus-controls button[aria-pressed="true"]::before { width: 20px; background: #ff7500; }

.focus-box + .focus-box { margin-top: 16px; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  border-left: 4px solid #ff7500;
  padding: 0 0 10px 10px;
  line-height: 1;
}
.section-head h2, .portal-section-head h2 { font-size: 20px; }
.section-head a, .portal-section-head > a { color: #626262; font-size: 12px; }
.lead-story { margin-bottom: 14px; }
.lead-story h2 { margin: 0 0 6px; font-size: 20px; line-height: 1.4; }
.lead-story h2 a, .focus-links a, .hot-list a, .side-lead > a:last-child, .channel-content h3 a { color: #333; }
.lead-story p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: #666;
  font-size: 13px;
  line-height: 1.7;
}
.second-story { margin-top: 14px; }
.focus-links li, .hot-list li {
  min-width: 0;
  border-bottom: 1px dashed #eee;
  font-size: 15px;
  line-height: 32px;
}
.focus-links li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.focus-latest .focus-links li, .channel-content .focus-links li { line-height: 30px; }
.focus-links strong { margin-right: 3px; color: #a64000; }
.side-lead { padding: 8px; border: 1px solid #eee; border-radius: 2px; font-size: 14px; }
.side-picture, .channel-picture { display: block; position: relative; overflow: hidden; border-radius: 2px; }
.side-picture { height: 150px; margin-bottom: 8px; }
.hot-tabs { display: flex; margin-bottom: 8px; }
.hot-tabs a { padding: 4px 14px; border: 1px solid #e5e5e5; color: #626262; font-size: 13px; }
.hot-tabs a + a { border-left: 0; }
.hot-tabs [aria-current] { background: #ff7500; color: #321900; border-color: #ff7500; }
.hot-list li { display: flex; align-items: center; gap: 6px; }
.hot-list li a { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hot-list .empty { color: #626262; padding: 0; }
.rank {
  flex: 0 0 18px;
  height: 18px;
  border-radius: 2px;
  background: #ddd;
  color: #444;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
}
.hot-list li:nth-child(-n+3) .rank { background: #ff7500; color: #351900; }
.portal-section { min-width: 0; margin-bottom: 20px; }
.portal-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 2px solid #ff7500;
  padding-bottom: 8px;
  margin-bottom: 12px;
  line-height: 1.4;
}
.portal-section-head span { color: #626262; font-size: 12px; }
.photo-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.photo-grid a { display: block; position: relative; height: 150px; overflow: hidden; border-radius: 2px; }
.photo-grid img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-grid span {
  position: absolute;
  inset: auto 0 0;
  padding: 8px 10px;
  background: #0009;
  color: #fff;
  font-size: 13px;
  line-height: 1.4;
}
.channel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
.channel-content { display: grid; grid-template-columns: minmax(0, 180px) minmax(0, 1fr); gap: 10px; }
.channel-picture { height: 135px; }
.channel-content h3 { margin: 0 0 8px; font-size: 17px; line-height: 1.5; }
.channel-post { font-size: 13px; }

@media (max-width: 900px) {
  .portal-focus { min-height: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .focus-side { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 10px; }
  .focus-side .focus-box { margin: 0; }
  .channel-content { grid-template-columns: minmax(0, 36%) minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .portal-banner { min-height: 54px; justify-content: center; padding-inline: 10px; }
  .portal-banner h1 { font-size: clamp(19px, 5vw, 24px); letter-spacing: 2px; }
  .banner-stars { display: none; }
  .portal-focus, .focus-side, .channel-grid { grid-template-columns: minmax(0, 1fr); }
  .focus-side { grid-column: auto; }
  .focus-picture { height: clamp(180px, 57vw, 264px); }
  .focus-bar { font-size: 19px; min-height: 44px; }
  .focus-gallery { padding-bottom: 37px; }
  .focus-controls button { min-width: 40px; min-height: 35px; }
  .focus-links li, .hot-list li a { white-space: normal; line-height: 1.5; padding-block: 5px; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-grid a { height: clamp(100px, 36vw, 150px); }
  .channel-picture { height: 104px; }
}

.intro-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.intro-card { display: flex; gap: 10px; align-items: center; min-width: 0; padding: 10px; border: 1px solid #eee; border-radius: 2px; color: #333; }
.intro-card .thread-avatar { width: 48px; height: 48px; background: #ffe4d5; color: #763c23; }
.intro-card small { display: block; }

@media (max-width: 850px) {
  .intro-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 360px) {
  .intro-grid { grid-template-columns: minmax(0, 1fr); }
}
