.homepage-content-entry {
  position: fixed;
  z-index: 100101;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  right: 226px;
  bottom: 88px;
  width: max-content;
  height: max-content;
  font: inherit;
}
.homepage-content-entry[hidden], .homepage-content-entry [hidden] { display: none; }
.homepage-content-launcher, .homepage-entry-retry {
  flex: none;
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  padding: 10px 15px;
  border: 1px solid rgba(196, 220, 255, .45);
  border-radius: 24px;
  color: #fff;
  background: rgba(15, 40, 72, .76);
  box-shadow: 0 3px 10px rgba(4, 19, 39, .2);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  white-space: normal;
  overflow-wrap: anywhere;
  transition: background .15s ease, border-color .15s ease;
}
.homepage-content-launcher:hover, .homepage-entry-retry:hover { background: rgba(30, 65, 105, .92); border-color: rgba(220, 235, 255, .8); }
.homepage-entry-retry { color: #d4e4f6; font-size: 12px; }
.homepage-content-launcher:focus-visible, .homepage-entry-retry:focus-visible { outline: 3px solid #fcd34d; outline-offset: 3px; }

.homepage-content-dialog {
  width: min(760px, calc(100% - 32px));
  max-width: 760px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 1px solid #cbd8e7;
  border-radius: 10px;
  background: #fff;
  color: #1f2937;
  font: inherit;
  letter-spacing: 0;
  box-shadow: 0 20px 60px rgba(4, 19, 39, .35);
  overflow: hidden;
  user-select: text;
}
.homepage-content-dialog[open] { display: flex; flex-direction: column; }
.homepage-content-dialog::backdrop { background: rgba(5, 18, 36, .68); }
.homepage-content-header {
  display: flex;
  flex-shrink: 0;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 24px;
  border-bottom: 1px solid #e1e8f0;
  background: #f7fafd;
}
.homepage-content-header h2 { min-width: 0; margin: 0; color: #173c65; font-size: 19px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.homepage-content-close { flex: none; width: 44px; height: 44px; border-radius: 6px; color: #60748d; background: transparent; font-size: 28px; line-height: 1; }
.homepage-content-close:hover { color: #173c65; background: #e8eff8; }
.homepage-content-body { min-height: 0; padding: 24px; overflow-y: auto; overscroll-behavior: contain; overflow-wrap: anywhere; }
.homepage-content-status { margin: 12px 0; color: #64748b; font-size: 14px; line-height: 1.8; }
.homepage-content-action, .homepage-content-back { min-height: 44px; padding: 10px 16px; border: 1px solid #cbd8e7; border-radius: 6px; color: #214d7c; background: #f7fafd; font: inherit; font-size: 14px; line-height: 1.5; }
.homepage-content-action:hover, .homepage-content-back:hover { border-color: #7ca3ce; background: #edf4fc; }
.homepage-content-action:disabled { opacity: .65; cursor: wait; }
.homepage-content-back { margin-bottom: 20px; }
.homepage-content-dialog button:focus-visible, .homepage-content-dialog a:focus-visible { outline: 2px solid #2563eb; outline-offset: 3px; }
.homepage-credits-section + .homepage-credits-section { margin-top: 28px; padding-top: 24px; border-top: 1px solid #e1e8f0; }
.homepage-section-title { margin: 0 0 16px; color: #214d7c; font-size: 16px; line-height: 1.5; font-weight: 600; }
.homepage-markdown { color: #374151; font-size: 15px; line-height: 1.85; overflow-wrap: anywhere; }
.homepage-markdown p { margin: 0 0 14px; }
.homepage-markdown h1, .homepage-markdown h2, .homepage-markdown h3, .homepage-markdown h4, .homepage-markdown h5, .homepage-markdown h6 { margin: 22px 0 12px; color: #173c65; font-size: 17px; line-height: 1.5; font-weight: 600; }
.homepage-markdown ul, .homepage-markdown ol { margin: 0 0 14px; padding-left: 24px; }
.homepage-markdown li { margin: 5px 0; }
.homepage-markdown a { color: #1d4ed8; text-decoration: underline; text-underline-offset: 3px; }
.homepage-markdown > :first-child { margin-top: 0; }
.homepage-markdown > :last-child { margin-bottom: 0; }
.homepage-update-list { display: grid; gap: 12px; }
.homepage-update-item { display: flex; flex-direction: column; align-items: stretch; width: 100%; min-width: 0; min-height: 44px; padding: 18px 20px; border: 1px solid #dbe5ef; border-radius: 8px; color: #1f2937; background: #fff; font: inherit; text-align: left; overflow-wrap: anywhere; }
.homepage-update-item:hover { border-color: #9cb8d5; background: #f7fafd; }
.homepage-update-title { color: #173c65; font-size: 16px; font-weight: 600; line-height: 1.6; }
.homepage-update-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-top: 8px; color: #718096; font-size: 12px; line-height: 1.7; }
.homepage-update-pinned { padding: 1px 7px; border-radius: 4px; color: #285988; background: #e8f1fb; font-weight: 600; }
.homepage-update-version { color: #476584; font-variant-numeric: tabular-nums; }
.homepage-update-summary { margin-top: 10px; color: #526174; font-size: 14px; line-height: 1.8; }
.homepage-load-more { display: block; margin: 20px auto 0; min-width: 140px; }
.homepage-detail-title { margin: 0; color: #173c65; font-size: 22px; line-height: 1.55; overflow-wrap: anywhere; }
.homepage-update-detail .homepage-markdown { margin-top: 24px; }

@media (max-width: 680px) {
  .homepage-content-entry { flex-direction: column; align-items: stretch; gap: 8px; }
  .homepage-content-launcher { padding: 10px 12px; font-size: 12px; }
}
@media (max-width: 600px) {
  .homepage-content-dialog { width: calc(100% - 20px); max-height: calc(100dvh - 20px); }
  .homepage-content-header { padding: 8px 8px 8px 16px; }
  .homepage-content-header h2 { font-size: 17px; }
  .homepage-content-body { padding: 18px 16px; }
  .homepage-markdown { font-size: 14px; }
  .homepage-update-item { padding: 14px; }
  .homepage-detail-title { font-size: 20px; }
}
/* Reserve a clear strip beside feedback on compact portrait covers. */
@media (max-width: 600px) and (max-height: 700px) and (orientation: portrait) {
  body:has(.homepage-content-entry:not([hidden])) .cover-screen { align-items: flex-start; padding-top: max(18px, env(safe-area-inset-top)); }
  body:has(.homepage-content-entry:not([hidden])) .cover-title-wrap { margin-bottom: 16px; }
  body:has(.homepage-content-entry:not([hidden])) .cover-title { margin-bottom: 10px; font-size: 36px; line-height: 1.15; }
  body:has(.homepage-content-entry:not([hidden])) .cover-subtitle { margin-bottom: 6px; font-size: 14px; line-height: 1.4; }
  body:has(.homepage-content-entry:not([hidden])) .cover-tagline { font-size: 11px; line-height: 1.5; }
  body:has(.homepage-content-entry:not([hidden])) .cover-buttons { gap: 8px; margin-bottom: 12px; }
  body:has(.homepage-content-entry:not([hidden])) .cover-buttons .cover-btn { height: 44px; min-height: 44px; padding: 8px 16px; }
  body:has(.homepage-content-entry:not([hidden])) .cover-buttons .cover-btn-competition { height: 64px; }
  body:has(.homepage-content-entry:not([hidden])) .account-cover-links { margin-top: 0; line-height: 1.5; }
  body:has(.homepage-content-entry:not([hidden])) .account-cover-hint { margin-top: 8px; font-size: 11px; line-height: 1.5; }
  body:has(.homepage-content-entry:not([hidden])) .cover-footer { margin-top: 8px; font-size: 11px; line-height: 1.5; }
}
/* Rotated small phones need a single action row to keep the footer clear. */
@media (max-width: 600px) and (max-height: 400px) and (orientation: landscape) {
  .homepage-content-entry { flex-direction: row; flex-wrap: nowrap; align-items: center; }
  .homepage-content-launcher { flex: 0 1 auto; }
  body:has(.homepage-content-entry:not([hidden])) .cover-screen { align-items: flex-start; padding-top: max(12px, env(safe-area-inset-top)); }
  body:has(.homepage-content-entry:not([hidden])) .cover-content { width: calc(100% - 32px); }
  body:has(.homepage-content-entry:not([hidden])) .cover-title-wrap { margin-bottom: 6px; }
  body:has(.homepage-content-entry:not([hidden])) .cover-title { margin-bottom: 5px; font-size: 28px; line-height: 1.1; }
  body:has(.homepage-content-entry:not([hidden])) .cover-subtitle { margin-bottom: 3px; font-size: 12px; line-height: 1.3; }
  body:has(.homepage-content-entry:not([hidden])) .cover-tagline { font-size: 11px; line-height: 1.4; }
  body:has(.homepage-content-entry:not([hidden])) .cover-buttons { flex-direction: row; align-items: stretch; width: 100%; gap: 8px; margin: 0 auto 6px; }
  body:has(.homepage-content-entry:not([hidden])) .cover-buttons .cover-btn { flex: 1 1 0; width: auto; min-width: 0; height: 52px; min-height: 44px; padding: 6px; font-size: 14px; line-height: 1.25; letter-spacing: 0; }
  body:has(.homepage-content-entry:not([hidden])) .cover-btn-competition span { margin-top: 3px; font-size: 10px; line-height: 1.25; }
  body:has(.homepage-content-entry:not([hidden])) .account-cover-links { margin-top: 0; font-size: 12px; line-height: 1.3; }
  body:has(.homepage-content-entry:not([hidden])) .account-cover-hint { margin-top: 4px; font-size: 11px; line-height: 1.5; }
  body:has(.homepage-content-entry:not([hidden])) .cover-footer { margin-top: 4px; font-size: 11px; line-height: 1.5; }
}
@media (prefers-reduced-motion: reduce) {
  .homepage-content-launcher, .homepage-entry-retry { transition: none; }
}
