.home-page { padding-bottom: 64px; }
.create-section { max-width: 800px; margin-inline: auto; padding-block: 28px 48px; scroll-margin-top: 24px; }
.create-heading { display: flex; justify-content: center; align-items: center; gap: 22px; margin-bottom: 30px; }
.create-emblem { display: grid; place-items: center; flex: 0 0 auto; width: 62px; height: 68px; border: 1px solid #d4e5e4; border-radius: 23px 23px 23px 8px; background: #eaf2f0; color: var(--accent); box-shadow: inset 0 1px 0 #fff; }
.create-emblem .site-icon { width: 42px; height: 42px; stroke-width: 1.4; }
.create-heading h1 { margin: 0; font-size: clamp(28px, 3.4vw, 39px); line-height: 1.55; font-weight: 650; letter-spacing: .015em; }
.site-account { border: 0; padding: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.site-account[hidden], .login-hint[hidden] { display: none; }
.login-hint { margin: 10px 0 0; text-align: center; color: var(--muted); font-size: 13px; }
.login-hint button { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }
.question-form button:disabled { cursor: not-allowed; }
.session-notice { color: #a33932; }
.site-login { width: min(400px, calc(100vw - 32px)); box-sizing: border-box; padding: 32px; border: 1px solid var(--line); border-radius: 20px; color: var(--ink); background: #fff; box-shadow: 0 20px 70px #12354130; }
.site-login::backdrop { background: #152b3b66; }
.site-login h2 { margin: 0 0 10px; font-size: 26px; }
.site-login > p { margin: 0 0 22px; color: var(--muted); font-size: 14px; }
.site-login form { display: grid; gap: 10px; }
.site-login label { font-size: 14px; }
.site-login input { box-sizing: border-box; width: 100%; min-width: 0; padding: 12px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.site-login input:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.site-login .login-close { position: absolute; top: 12px; right: 14px; border: 0; background: none; color: var(--muted); font-size: 27px; cursor: pointer; }
.site-login #login-error { margin: 0 0 8px; color: #a33932; font-size: 13px; }
.discovery-section { padding-top: 30px; border-top: 1px solid var(--line); scroll-margin-top: 24px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.section-heading h2 { margin: 0; font-size: 23px; font-weight: 650; letter-spacing: .015em; }
.game-search { display: flex; align-items: center; gap: 9px; width: 230px; min-height: 42px; border: 1px solid #dfe6eb; border-radius: 11px; padding: 9px 13px; background: #fff; color: var(--muted); }
.game-search:focus-within { outline: 2px solid #7ba7ac; outline-offset: 2px; }
.game-search .site-icon { width: 17px; height: 17px; }
.game-search input { width: 100%; min-width: 0; padding: 0; border: 0; background: transparent; color: var(--ink); font-size: 12px; outline: none; }
.game-search input::placeholder { color: var(--muted); }
.source-switch { display: flex; gap: 28px; margin-bottom: 20px; }
.source-switch button { position: relative; display: flex; align-items: center; gap: 8px; min-height: 40px; border: 0; padding: 5px 1px 12px; color: var(--muted); background: none; font-size: 14px; }
.source-switch button[aria-pressed="true"] { color: var(--ink); font-weight: 650; }
.source-switch button[aria-pressed="true"]::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px; border-radius: 2px; background: var(--accent); }
.source-switch button > span { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px; background: #eaf0f3; font-size: 11px; font-weight: 500; }
.source-switch button[aria-pressed="true"] > span { color: var(--accent); background: #e3efed; }
.source-switch button > span:empty { display: none; }
.type-filters { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 25px; }
.type-filters button { display: flex; align-items: center; gap: 6px; min-height: 35px; padding: 7px 12px; border: 1px solid transparent; border-radius: 8px; color: var(--muted); background: transparent; font-size: 12px; }
.type-filters button .site-icon { width: 15px; height: 15px; }
.type-filters button[aria-pressed="true"] { background: #e8f1f0; border-color: #d7e7e4; color: var(--accent); font-weight: 600; }
.type-filters button:hover { background: #edf2f4; }
.discovery-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 20px; }
.discovery-card { min-width: 0; border: 1px solid #e0e7ec; border-radius: 18px; background: #fff; transition: border-color .18s, box-shadow .18s; }
.discovery-card:hover, .discovery-card:focus-within { border-color: #b3cbd0; box-shadow: 0 7px 22px #213e4c0a; }
.discovery-link { display: flex; flex-direction: column; height: 100%; padding: 8px 8px 0; border-radius: 18px; }
.discovery-cover { position: relative; overflow: hidden; aspect-ratio: 3 / 2; border-radius: 11px; background: #f0f4f6; }
.discovery-cover > img { display: block; width: 100%; height: 100%; object-fit: contain; }
.cover-cover > img { object-fit: cover; }
.cover-play { position: absolute; bottom: 10px; right: 10px; display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid #ffffff70; border-radius: 50%; color: var(--ink); background: #fffffff2; box-shadow: 0 2px 8px #132f4410; }
.cover-play .site-icon { width: 14px; height: 14px; margin-left: 2px; }
.created-art { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; height: 100%; color: var(--muted); background: #edf3f4; }
.created-art > .site-icon { width: 42px; height: 42px; stroke-width: 1.2; }
.created-art > span { font-size: 11px; }
.discovery-copy { display: flex; flex: 1; flex-direction: column; padding: 16px 10px 14px; }
.game-kind { display: flex; align-items: center; gap: 5px; margin-bottom: 8px; font-size: 11px; color: var(--accent); }
.game-kind .site-icon { width: 13px; height: 13px; }
.discovery-copy h3 { margin: 0 0 8px; font-size: 16px; font-weight: 650; line-height: 1.65; }
.discovery-copy p { margin-bottom: 18px; color: var(--muted); font-size: 12px; line-height: 1.9; }
.game-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 11px; margin-top: auto; padding-top: 11px; border-top: 1px solid #edf1f3; font-size: 11px; color: var(--muted); }
.game-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.game-meta .site-icon { width: 12px; height: 12px; }
.game-meta .game-enter { margin-left: auto; color: var(--accent); }
.game-enter .site-icon { width: 16px; height: 16px; }
.catalog-status:not(.sr-only):not(:empty) { display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 20px; min-height: 120px; padding: 22px; border: 1px solid var(--line); border-radius: 14px; color: var(--muted); background: #fff; font-size: 13px; }
.catalog-empty { grid-column: 1 / -1; padding: 40px 20px; border: 1px dashed #d1dfe5; border-radius: 16px; text-align: center; }
.catalog-empty h3 { margin-bottom: 10px; font-size: 18px; font-weight: 600; }
.catalog-empty p { font-size: 12px; color: var(--muted); }
.catalog-empty > div { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 23px; }
@media (max-width: 1100px) {
  .discovery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .discovery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
}
@media (max-width: 640px) {
  .home-page { padding-bottom: 32px; }
  .create-section { padding-block: 20px 34px; }
  .create-heading { gap: 14px; margin-bottom: 24px; }
  .create-emblem { width: 44px; height: 49px; border-radius: 16px 16px 16px 5px; }
  .create-emblem .site-icon { width: 30px; height: 30px; }
  .create-heading h1 { font-size: clamp(22px, 6.2vw, 30px); line-height: 1.65; letter-spacing: 0; }
  .discovery-section { padding-top: 24px; }
  .section-heading { gap: 12px; margin-bottom: 16px; }
  .section-heading h2 { font-size: 21px; white-space: nowrap; }
  .game-search { width: 148px; min-height: 40px; }
  .source-switch { gap: 24px; margin-bottom: 16px; }
  .source-switch button { font-size: 13px; }
  .type-filters { gap: 5px; margin-bottom: 20px; }
  .type-filters button { padding: 7px 9px; font-size: 11px; }
  .type-filters button .site-icon { width: 13px; height: 13px; }
  .discovery-grid { grid-template-columns: 1fr; gap: 14px; }
  .discovery-link { display: grid; grid-template-columns: 116px minmax(0, 1fr); align-items: stretch; gap: 4px; padding: 8px; }
  .discovery-cover { aspect-ratio: auto; min-height: 145px; height: 100%; }
  .cover-play { width: 26px; height: 26px; right: 8px; bottom: 8px; }
  .discovery-copy { padding: 6px 6px 4px 10px; }
  .discovery-copy h3 { font-size: 15px; }
  .discovery-copy p { font-size: 12px; margin-bottom: 12px; }
  .game-kind { font-size: 11px; margin-bottom: 5px; }
  .game-meta { font-size: 10px; gap: 8px; padding-top: 8px; }
  .game-meta .game-enter { display: none; }
  .catalog-empty { padding: 28px 16px; }
  .catalog-empty h3 { font-size: 16px; }
}
@media (max-width: 360px) {
  .discovery-link { grid-template-columns: 98px minmax(0, 1fr); }
  .discovery-copy h3 { font-size: 14px; }
}
