/* Yzh player portal: shared frame, account dashboard and game directory. */
html:has(.portal-refresh) { background: #fff; }
body.portal-refresh {
  margin: 0;
  padding: 0;
  background: #fff;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.portal-refresh :is(button, input, select, textarea) { font-family: inherit; }
.portal-refresh .app-header {
  min-height: 78px;
  padding: 16px 0;
  display: flex;
  gap: 14px;
  align-items: center;
  background: #fff;
  border: 0;
  color: #201d24;
}
.portal-refresh .brand { color: #201d24; flex: 0 0 auto; }
.portal-refresh .brand b { font-size: 19px; font-weight: 750; letter-spacing: .04em; }
.portal-refresh .brand-mark { display: none; }
.portal-refresh .ui-arrow { display: inline-block; width: 16px; height: 16px; flex: 0 0 auto; vertical-align: -.15em; }
.portal-refresh .portal-nav { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.portal-refresh .portal-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 12px; border-radius: 999px; color: #625d69; text-decoration: none; font-size: 13px; white-space: nowrap; }
.portal-refresh .portal-nav a:hover { color: #79578f; background: #f5f0f8; }
.portal-refresh .header-player { flex: 0 0 auto; }
.portal-refresh .avatar { border-color: #e5e1e9; background: #f5f3f7; }
.portal-refresh .kicker:not([id]), .portal-refresh .eyebrow { display: none; }
.portal-refresh :is(a, button, input, select, textarea):focus-visible { outline: 2px solid #79578f; outline-offset: 4px; }
.portal-refresh :is(input, select, textarea) { font-size: 16px; }
.portal-refresh [hidden] { display: none !important; }

/* Account and directory share the public website palette. */
.portal-account, .portal-games {
  color-scheme: light;
  --bg: #fff;
  --bg-deep: #fff;
  --surface: #f5f3f7;
  --surface-soft: #f5f3f7;
  --card: #f5f3f7;
  --text: #201d24;
  --muted: #625d69;
  --dim: #716b78;
  --line: #e5e1e9;
  --line-purple: #d8c7e3;
  --purple: #79578f;
  --purple-soft: #eee6f3;
  --green: #79578f;
  --green-soft: #eee6f3;
  --blue: #4f7180;
  --yellow: #8a6920;
  --gold: #8a6920;
  color: var(--text);
}
.portal-account .app-header, .portal-account main, .portal-games .app-shell { width: min(1120px, calc(100% - 80px)); margin: 0 auto; }
.portal-games .app-shell { background: #fff; border: 0; border-radius: 0; overflow: visible; min-height: 100dvh; }
.portal-account main { padding: 40px 0 72px; }
.portal-account .login-view { min-height: 0; width: min(100%, 440px); margin-inline: auto; grid-template-columns: minmax(0, 1fr); gap: 0; align-items: stretch; }
.portal-account .login-copy { display: flex; flex-direction: column; justify-content: center; padding: 48px; border-radius: 12px; background: #09090b; text-align: left; color: #f7f5f0; }
.portal-account .welcome-mark { display: none; }
.portal-account h1 { font-size: clamp(32px, 3.8vw, 46px); line-height: 1.35; font-weight: 650; letter-spacing: -.04em; }
.portal-account .login-copy h1 span { color: #e0cee9; }
.portal-account .login-copy > p:last-child { color: #b9b5c0; font-size: 15px; margin-top: 24px; }
.portal-account .login-card { padding: 32px; border: 1px solid #e5e1e9; border-radius: 12px; background: #fff; box-shadow: none; gap: 14px; min-height: 100%; }
.portal-account .login-card::before, .portal-account .panel::before, .portal-account .login-card .step { display: none; }
.portal-account .login-card h2 { margin: 0; font-size: 23px; line-height: 1.4; }
.portal-account .login-lede { font-size: 13px; margin-bottom: 8px; }
.portal-account label { color: #625d69; font-size: 13px; }
.portal-account :is(input, select, textarea) { min-height: 48px; border-color: #ded8e5; background: #f8f7fa; color: #201d24; border-radius: 8px; }
.portal-account :is(input, select, textarea):focus { border-color: #79578f; box-shadow: 0 0 0 3px #eee6f3; }
.portal-account .primary-button, .portal-account .small-button { min-height: 44px; color: #19151d; background: #e0cee9; border-radius: 999px; box-shadow: none; }
.portal-account .ghost-button { min-height: 44px; color: #625d69; background: #f5f3f7; border-color: #e5e1e9; border-radius: 8px; font-size: 12px; }
.portal-account .small-button.secondary { color: #625d69; background: #eeeaf2; }
.portal-account .small-button.danger { color: #a73b46; background: #fae9ed; }
.portal-account .form-note { font-size: 11px; margin: 0; }
.portal-account .form-message { color: #79578f; min-height: 0; }
.portal-account .form-message:empty { display: none; }
.portal-account .form-message.error { color: #a73b46; }
.portal-account .dashboard-welcome { display: flex; gap: 24px; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.portal-account .dashboard-welcome p { margin: 10px 0 0; color: #625d69; font-size: 14px; }
.portal-pill { display: inline-flex; gap: 20px; align-items: center; min-height: 44px; padding: 12px 20px; background: #e0cee9; border-radius: 999px; color: #19151d; text-decoration: none; font-size: 14px; white-space: nowrap; }
.portal-account .identity-block { padding: 28px; border-radius: 12px; background: #09090b; color: #f7f5f0; }
.portal-account .identity-block p, .portal-account .identity-block .panel-top { color: #b9b5c0; }
.portal-account .identity-block .status { color: #e0cee9; background: #302636; }
.portal-account .binding-identity-text .status { width: fit-content; }
.portal-account .identity-block .command-box { background: #1a171e; border: 0; }
.portal-account .identity-block .command-box code { color: #e0cee9; }
.portal-account .identity-block .command-box small { color: #b9b5c0; }
.portal-account .grid-divider { display: none; }
.portal-account .dashboard-grid { margin-top: 20px; gap: 20px; align-items: stretch; }
.portal-account .panel { padding: 24px; border: 0; border-radius: 12px; background: #f5f3f7; box-shadow: none; }
.portal-account .wallet-panel { order: 0; }
.portal-account .history { order: 1; }
.portal-account .email-panel { order: 2; }
.portal-account .line-panel { order: 3; }
.portal-account .email-panel { grid-column: 1 / -1; }
.portal-account .panel-top { font-family: inherit; font-size: 13px; color: #625d69; letter-spacing: 0; margin-bottom: 16px; }
.portal-account .panel-top > span { display: none; }
.portal-account .panel-top b { font-weight: 500; }
.portal-account .panel h2 { font-size: 20px; line-height: 1.4; }
.portal-account .wallet-panel h2 { font-family: inherit; font-size: 28px; }
.portal-account .wallet-hint { display: none; }
.portal-account .email-row b { font-size: 13px; }
.portal-account .pill-actions { gap: 8px; }
.portal-account .pill-actions button { padding: 8px 12px; }
.portal-account .panel p { font-size: 13px; }
.portal-account .admin-grid h3, .portal-account .admin-expiry h3 { color: #625d69; font-size: 13px; }
.portal-account .admin-item { background: #fff; }
.portal-account .admin-item .sync-note.failed { color: #a73b46; }
.portal-account .portal-shortcuts { margin-top: 40px; }
.portal-account .portal-shortcuts h2 { margin: 0 0 20px; font-size: 23px; }
.shortcut-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.shortcut-grid a { display: flex; align-items: center; min-height: 72px; gap: 14px; padding: 18px; border: 1px solid #e5e1e9; border-radius: 12px; color: #201d24; text-decoration: none; font-size: 14px; }
.shortcut-grid a:hover { background: #f5f3f7; }
.shortcut-grid svg { width: 24px; height: 24px; flex: none; color: #79578f; }
.shortcut-grid a > span:last-child { margin-left: auto; color: #79578f; }

/* Small cards, real icons and a clear account entry. */
.portal-games .view { padding: 40px 0 72px; }
.portal-games h1 { font-size: clamp(30px, 4vw, 44px); line-height: 1.35; font-weight: 650; }
.portal-games .lede { font-size: 15px; margin: 12px 0 32px; }
.portal-games .game-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.portal-games .game-card { display: flex; gap: 18px; padding: 24px; align-items: center; min-height: 136px; border: 0; border-radius: 12px; background: #f5f3f7; }
.portal-games .game-card:hover, .portal-games .game-card:active { background: #eee9f2; }
.portal-games .game-card:first-child { background: #09090b; --text: #f7f5f0; --muted: #b9b5c0; }
.portal-games .game-icon { width: 48px; height: 48px; border-radius: 12px; background: #e9dfee; color: #79578f; flex: none; overflow: hidden; }
.portal-games .game-icon svg { width: 26px; height: 26px; }
.portal-games .game-copy { padding: 0; gap: 7px; }
.portal-games .game-copy b { font-size: 17px; font-weight: 650; }
.portal-games .game-copy small { font-size: 12px; line-height: 1.6; }

/* Existing game themes stay inside their play area. */
.portal-refresh:not(.portal-account):not(.portal-games) { background: #17151b; }
.portal-refresh:is(.portal-fishing, .portal-pets) { background: #10221d; }
.portal-refresh:not(.portal-account):not(.portal-games) :is(.app-shell, .shell) { width: min(100%, 620px); margin: 0 auto; border: 0; border-radius: 0; overflow: hidden; box-shadow: none; }
.portal-refresh:not(.portal-account):not(.portal-games) .app-shell { background: #17151b; }
.portal-refresh:is(.portal-fishing, .portal-pets) .shell { background: #10221d; padding-top: 0; }
.portal-refresh:is(.portal-fishing, .portal-pets) .app-header { margin-inline: -20px; padding-inline: 20px; }
.portal-refresh:not(.portal-account):not(.portal-games) .hero { padding-top: 24px; }
.portal-refresh:not(.portal-account):not(.portal-games) .hero h1 { font-size: 30px; line-height: 1.35; }
.portal-refresh:not(.portal-account):not(.portal-games) .hero > p:last-child { font-size: 12px; }
.portal-refresh:is(.portal-stock, .portal-rank, .portal-wordquiz, .portal-blackjack, .portal-lottery) .app-header { padding-inline: 20px; }
.portal-refresh .pond-glow { display: none; }
.portal-refresh :is(.pond-card, .pet-stage) { border-radius: 12px; box-shadow: none; }
.portal-refresh .pet-stage { height: 280px; }
.portal-refresh :is(.status-card, .link-card, .basket-card, .pet-card, .earn-card, .shop-card, .error-card) { border-radius: 12px; box-shadow: none; }
@media (max-width: 900px) {
  .portal-account .app-header, .portal-account main, .portal-games .app-shell { width: calc(100% - 48px); }
  .portal-account .login-view { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .portal-account .login-copy { padding: 28px; }
  .portal-account .login-card { padding: 24px; }
  .portal-games .game-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .portal-account .app-header, .portal-account main, .portal-games .app-shell { width: calc(100% - 40px); }
  .portal-refresh .app-header { min-height: 68px; gap: 10px; }
  .portal-refresh .portal-nav { gap: 0; }
  .portal-refresh .portal-nav a { padding-inline: 8px; font-size: 12px; }
  .portal-account main, .portal-games .view { padding: 16px 0 48px; }
  .portal-account .login-view { grid-template-columns: 1fr; gap: 20px; padding: 0; }
  .portal-account .login-copy { padding: 24px; }
  .portal-account .login-copy h1 { font-size: 30px; }
  .portal-account .login-copy > p:last-child { display: none; }
  .portal-account .login-card { padding: 24px; }
  .portal-account .login-card h2 { font-size: 21px; }
  .portal-account .dashboard-welcome { gap: 14px; margin-bottom: 20px; }
  .portal-account .dashboard-welcome h1 { font-size: 28px; }
  .portal-account .dashboard-welcome p { font-size: 12px; }
  .portal-account .dashboard-welcome .portal-pill { font-size: 12px; padding: 10px 14px; gap: 8px; }
  .portal-account .identity-block, .portal-account .panel { padding: 20px; }
  .portal-account .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
  .portal-account .dashboard-grid > :is(.email-panel, .line-panel) { grid-column: 1 / -1; }
  .portal-account :is(.wallet-panel, .history) { padding: 18px 16px; }
  .portal-account .wallet-panel h2 { font-size: 22px; overflow-wrap: anywhere; }
  .portal-account .wallet-panel .wallet-refresh { padding-inline: 10px; }
  .portal-account #line-content .status + h2 + p { display: none; }
  .portal-account .command-box { align-items: flex-start; }
  .portal-account .portal-shortcuts { margin-top: 28px; }
  .shortcut-grid { grid-template-columns: 1fr; gap: 8px; }
  .shortcut-grid a { min-height: 60px; padding: 14px 16px; }
  .portal-games h1 { font-size: 30px; }
  .portal-games .lede { font-size: 13px; margin-bottom: 24px; }
  .portal-games .game-list { grid-template-columns: 1fr; gap: 10px; }
  .portal-games .game-card { min-height: 84px; gap: 16px; padding: 16px 18px; }
  .portal-games .game-icon { width: 42px; height: 42px; border-radius: 10px; }
  .portal-games .game-copy b { font-size: 15px; }
  .portal-games .game-copy small { font-size: 11px; }
  .portal-refresh:not(.portal-account):not(.portal-games) :is(.app-shell, .shell) { width: 100%; }
  .portal-refresh:not(.portal-account):not(.portal-games) .app-header { padding-inline: 16px; }
  .portal-refresh:is(.portal-fishing, .portal-pets) .app-header { padding-inline: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html:has(.portal-refresh) { scroll-behavior: auto; }
  .portal-refresh * { transition: none; }
}

/* 玩家中心目前方案：名稱、期限與付款入口（2026-10-12）。 */
.portal-account .plan-panel { display: flex; flex-direction: column; }
.portal-account .plan-panel .panel-top { margin-bottom: 12px; }
.portal-account .plan-panel .plan-name { margin: 0; font-size: 26px; line-height: 1.35; font-weight: 700; letter-spacing: -.02em; color: #201D24; }
.portal-account .plan-panel .plan-period { display: grid; gap: 5px; margin: 14px 0 0; }
.portal-account .plan-panel .plan-period dt { color: #625D69; font-size: 12px; line-height: 1.5; }
.portal-account .plan-panel .plan-period dd { margin: 0; color: #201D24; font-size: 22px; line-height: 1.4; font-weight: 600; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.portal-account .plan-panel .shop-entry { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid rgb(98 93 105 / .16); }
.portal-account .plan-panel .shop-entry a { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 44px; padding: 10px 16px; border-radius: 8px; background: #E0CEE9; color: #201D24; text-decoration: none; font-size: 13px; font-weight: 600; }
.portal-account .plan-panel .shop-entry a:hover { background: color-mix(in srgb, #E0CEE9 80%, white); }
.portal-account .plan-panel .vip-link { margin-top: 12px; }
@media (max-width: 620px) {
  .portal-account .plan-panel .plan-name { font-size: 20px; }
  .portal-account .plan-panel .plan-period { margin-top: 12px; }
  .portal-account .plan-panel .plan-period dd { font-size: 18px; }
  .portal-account .plan-panel .shop-entry { margin-top: 16px; padding-top: 12px; }
  .portal-account .plan-panel .shop-entry a { gap: 6px; padding: 10px 8px; font-size: 12px; }
  .portal-account .plan-panel .shop-entry .ui-arrow { width: 14px; height: 14px; }
}
