/* portal.css — 登录、游戏目录、账号、历史和错误页；移除废弃首页规则。 */
.login-mark { width: 44px; height: 44px; border-radius: 14px; margin: 0 auto 6px; }
.login-title { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.3px; }
.login-sub { margin: 0 0 6px; color: var(--text-secondary); font-size: 14px; }
.login-go { width: 100%; }
.login-other { align-self: center; }
.login-hint { margin: 4px 0 0; color: var(--text-tertiary); font-size: 12.5px; }
.hero { margin: 6px 0 26px; }
.hero h1 { margin: 0 0 4px; font-size: 28px; font-weight: 700; letter-spacing: -.5px; }
.hero .sub { margin: 0; color: var(--text-secondary); font-size: 14.5px; }
.status-head { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 15px; }
.app-icon-tile {
  width: 30px; height: 30px; border-radius: 9px; background: var(--surface-muted);
  color: var(--text-secondary); display: inline-flex; align-items: center; justify-content: center;
}
.status-count { font-size: 20px; font-weight: 650; }
.status-sub { color: var(--text-secondary); font-size: 13px; }
.status-details { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.status-details .row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-secondary); }
.status-details .row b { color: var(--text); font-weight: 550; }
.status-empty { color: var(--text-secondary); font-size: 13.5px; }
.game-stats { color: var(--text-tertiary); font-size: 12.5px; }
.game-icon {
  width: 34px; height: 34px; border-radius: 10px; background: var(--brand-soft); color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center;
}
.game-icon .game-icon-img { width: 20px; height: 20px; }
.feed { padding: 6px 0; }
.feed-row + .feed-row { border-top: 1px solid var(--border); }
.feed-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); margin-top: 8px; flex: none; }
.feed-main { flex: 1; min-width: 0; }
.feed-text { color: var(--text); font-size: 14.5px; white-space: pre-wrap; word-break: break-word; }
.feed-meta { color: var(--text-tertiary); font-size: 12.5px; margin-top: 3px; }
.feed-row { display: flex; gap: 12px; padding: 14px 18px; align-items: flex-start; transition: background var(--motion-ui) ease; }
.feed-del { opacity: 0; transition: opacity var(--motion-ui) ease; }
.feed-row:hover .feed-del { opacity: 1; }
.account-head { display: flex; align-items: center; gap: 16px; margin: 6px 0 8px; }
.setting-value { color: var(--text-secondary); font-size: 14px; }
.setting-row { cursor: default; }
.setting-row.action { cursor: pointer; transition: background var(--motion-ui) ease; }
.setting-row.action:hover { background: var(--surface-muted); }
.setting-row .right { display: flex; align-items: center; gap: 8px; color: var(--text-tertiary); }
.seg { display: inline-flex; background: var(--surface-muted); border-radius: 10px; padding: 3px; gap: 2px; }
.seg-item {
  border: 0; background: transparent; color: var(--text-secondary); padding: 6px 12px; border-radius: 8px;
  font: inherit; font-size: 13.5px; cursor: pointer;
  transition: color var(--motion-ui) ease, transform var(--motion-fast) var(--ease-out);
}
.seg-item:hover { color: var(--text); }
.catalog-title { font-size: 17px; font-weight: 650; }
.catalog-actions { margin-top: auto; display: flex; gap: 10px; align-items: center; }
.catalog-card.clickable { cursor: pointer; }
.catalog-card.clickable:active { transform: translateY(0) scale(.99); transition-duration: var(--motion-press); }
.catalog-card .catalog-head { display: flex; align-items: center; gap: 8px; }
.catalog-card.clickable:hover .catalog-go { transform: translateX(3px); }
.settings .list-row { padding: 12px 2px; }
.settings .list-row + .list-row { border-top: var(--bw) dashed var(--line-soft); }
.settings .list-row.action { padding: 12px 8px; border-radius: 10px; cursor: pointer; transition: background var(--motion-ui) ease; }
.settings .list-row.action .right { transition: transform 200ms var(--ease-out), color var(--motion-ui) ease; }
.settings .list-row.action:hover .right { transform: translateX(2px); color: var(--text-secondary); }
.settings .list-row.action:hover { background: var(--surface-muted); }
.section-head .section-title { font-size: 15px; color: var(--text-secondary); font-weight: 600; }
.feed-dot.game { background: #f59e0b; }
.demo-banner {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding: 16px; margin: 0 0 24px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface);
}
.wrap { max-width: var(--content-width); margin: 0 auto; padding: 40px 24px 64px; }
.wrap.narrow { max-width: 920px; }
.catalog { min-width: 0; }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.catalog-head { display: flex; align-items: center; gap: 12px; min-width: 0; flex-wrap: wrap; }
.catalog-go {
  margin-top: auto; color: var(--link); font-size: 14px; font-weight: 600; text-decoration: none;
  transition: transform 200ms var(--ease-out); align-self: flex-start; min-height: 44px; display: inline-flex;
  align-items: center;
}
.login-view {
  position: fixed; inset: var(--shell-height) 0 0; z-index: 70; display: flex; align-items: safe center;
  justify-content: center; background: var(--page); padding: 24px; overflow-y: auto;
}
.login-home { display: inline-flex; min-height: 44px; align-items: center; color: var(--link); font-size: 14px; text-decoration: none; }
.login-recovery { border-top: 1px solid var(--border); padding-top: 8px; font-size: 13px; }
.login-recovery summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.login-help-link { color: var(--link) !important; display: inline-flex; align-items: center; min-height: 44px; }
.settings button.list-row { width: 100%; background: none; border: 0; text-align: left; font: inherit; }
.settings a.list-row { color: inherit; text-decoration: none; }
.settings .list-main { min-width: 0; }
.settings .list-title { overflow-wrap: anywhere; }
.settings .list-sub { overflow-wrap: anywhere; }
.error-page { padding-block: 100px; }
.error-page h1 { font-size: 32px; margin-block: 12px; }
.error-page p { color: var(--text-secondary); margin-bottom: 24px; }
.error-page .btn { margin: 0 8px 12px 0; }
.account-recovery summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-size: 14px; }
.account-recovery p { max-width: 65ch; }
.page-head { margin: 6px 0 32px; }
.page-head h1 { margin: 0; font-size: clamp(36px,5vw,56px); font-weight: 850; letter-spacing: -.035em; line-height: 1.1; }
.wrap.games-wrap { max-width: 60rem; }
.catalog-card {
  padding: 0; display: flex; flex-direction: column; gap: 12px; overflow: hidden; min-width: 0;
  box-shadow: var(--shadow-hard); border: var(--bw) solid var(--line);
  transition: transform 200ms var(--ease-out),box-shadow 200ms var(--ease-out);
}
.catalog-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hard-lg); }
.catalog-art {
  display: flex; align-items: center; justify-content: center; height: 160px; position: relative;
  overflow: hidden; text-decoration: none; border-bottom: var(--bw) solid var(--line);
}
.art-chess { background: repeating-conic-gradient(var(--tone-games-soft) 0 25%,var(--surface) 0 50%) 0 0/40px 40px; }
.catalog-art-piece {
  transition: transform 200ms var(--ease-spring); width: 88px; height: 88px; opacity: .9; position: relative;
  z-index: 1; filter: drop-shadow(3px 3px 0 var(--shadow-ink));
}
.catalog-card:hover .catalog-art-piece { transform: rotate(-6deg); }
.art-gomoku {
  background: var(--surface-muted); background-color: var(--board-wood);
  background-image: linear-gradient(rgba(24,23,31,.35) 1px,transparent 1px),linear-gradient(90deg,rgba(24,23,31,.35) 1px,transparent 1px);
  background-size: 24px 24px;
}
.catalog-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.account-head .avatar.lg {
  width: 64px; height: 64px; background: var(--tone-sun); color: var(--on-accent);
  border: var(--bw) solid var(--line); box-shadow: var(--shadow-hard);
}
.account-head h1 { margin: 0; font-size: 28px; font-weight: 850; }
.account-head .meta {
  display: flex; align-items: center; gap: 8px; color: var(--text-tertiary); font-size: 13px; margin-top: 4px;
  font-family: var(--font-mono);
}
.settings {
  display: flex; flex-direction: column; background: var(--surface); border: var(--bw) solid var(--line);
  box-shadow: var(--shadow-hard); border-radius: 18px; padding: 4px 18px;
}
.account-head ~ .section .section-title { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; }
.list-row.action:hover { background: var(--surface-muted); }
.list-row .right { transition: transform 180ms var(--ease-out); }
.list-row.action:hover .right { transform: translateX(3px); }
.settings #logout-row .list-title { color: var(--danger); }
.login-box {
  width: min(100%, 400px); display: flex; flex-direction: column; align-items: stretch; gap: 12px;
  text-align: left; animation: none; padding: 32px; background: var(--surface);
  border: var(--bw) solid var(--line); border-radius: 22px; box-shadow: var(--shadow-hard-lg);
}
.login-box h1 { font-size: 30px; font-weight: 800; }
.error-code { color: var(--text); font-size: 14px; position: relative; isolation: isolate; display: inline-block; font: 900 96px/1 var(--font-mono); }
.error-code::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: .24em; background: var(--tone-sun); z-index: -1; }
.seg-item.on { background: var(--ink); color: var(--paper); box-shadow: none; font-weight: 600; }
@keyframes live-ping { 0% { opacity: .45; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(2.6); } }
@media (max-width: 960px) {
  .wrap { padding: 26px 16px 56px; }
  .hero h1 { font-size: 23px; }
  .topbar { padding: 0 14px; }
  .nav { margin-left: 2px; overflow-x: auto; }
}
@media (max-width: 640px) {
  .wrap.games-wrap { max-width: 100%; }
  .wrap { padding: 24px 16px 36px; }
  .catalog-grid { grid-template-columns: 1fr; }
  .login-view { padding: 20px 24px calc(84px + env(safe-area-inset-bottom)); }
  .settings .list-row { gap: 12px; flex-wrap: wrap; }
}
