/* Game workshop chrome and community cards follow the main site's light palette. */
.app-header {
  background: #fff;
  color: #16364b;
  border-bottom: 1px solid #dde5ec;
  box-shadow: 0 2px 8px #17344905;
  backdrop-filter: none;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
  gap: 20px;
  padding: 18px 28px;
  min-height: 84px;
}
.brand-link { color: #16364b; gap: 12px; min-width: 0; }
.brand-icon { width: 42px; height: 42px; flex-basis: 42px; padding: 9px; border-radius: 12px; background: #edf3f7; color: #365873; box-shadow: none; }
.brand-icon svg { width: 100%; height: 100%; }
.brand-text { min-width: 0; }
.header-brand-wrap { min-width: 0; }
.brand-title { font-size: 20px; font-weight: 750; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-subtitle { color: #587082; font-size: 12px; opacity: 1; margin-top: 2px; }
.header-nav-tabs { padding: 4px; gap: 3px; background: #f1f5f8; border: 1px solid #e8edf1; border-radius: 12px; }
.nav-tab-btn { color: #526778; padding: 10px 14px; font-size: 14px; font-weight: 600; border-radius: 9px; white-space: nowrap; }
.nav-tab-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.nav-label-short { display: none; }
.header-tool-link { display: flex; align-items: center; justify-content: center; color: #526778; border-left: 1px solid #dce6ee; margin-left: 5px; padding: 8px 12px; font-size: 13px; font-weight: 600; white-space: nowrap; text-decoration: none; }
.header-tool-link:hover { color: #16364b; background: #e5edf3; border-radius: 6px; }
.nav-tab-btn:hover { background: #e5edf3; color: #16364b; }
.nav-tab-btn.active { color: #244963; background: #fff; box-shadow: 0 1px 5px #1734490d; }
.header-actions { justify-content: flex-end; gap: 12px; min-width: 0; }
.header-search-wrap { min-width: 0; }
.header-search-input, .header-search-input:focus { width: 190px; max-width: 100%; background: #f7f9fb; border: 1px solid #dee7ee; color: #243e52; border-radius: 10px; padding: 10px 12px; box-shadow: none; font-size: 12px; }
.header-search-input::placeholder, .header-search-input:focus::placeholder { color: #526d82; }
.header-user-badge-btn { color: #24445c; background: #fff; border: 1px solid #dfe7ed; border-radius: 10px; padding: 5px 10px 5px 6px; }
.header-user-badge-btn:hover { background: #f5f8fb; border-color: #c8d7e3; }
.header-username-text { font-size: 13px; max-width: 110px; font-weight: 600; }
.header-avatar-circle { box-shadow: none; }
.header-auth-btn { background: #244963; color: #fff; border-color: #244963; border-radius: 10px; font-size: 13px; min-height: 44px; }
.header-auth-btn:hover { background: #193b54; color: #fff; }
.hamburger-bar { background: #244963; }

#view-community { --library-ink: #18394e; --library-muted: #526e82; }
.library-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 10px 0 28px; }
.library-eyebrow { font-size: 11px; font-weight: 650; letter-spacing: .14em; color: #556e80; }
.library-heading h2 { color: var(--library-ink); font-size: clamp(26px, 2.2vw, 36px); font-weight: 700; letter-spacing: -.035em; margin: 6px 0 8px; }
.library-heading p { color: var(--library-muted); font-size: 14px; margin: 0; }
.community-share-actions { display: flex; gap: 10px; flex-shrink: 0; }
#view-community .btn { border-radius: 9px; font-weight: 600; }
#view-community .btn-primary { background: #244963; border-color: #244963; color: #fff; }
#view-community .btn-primary:hover { background: #193b54; border-color: #193b54; }
.library-game-search { position: relative; max-width: 600px; margin-bottom: 20px; }
.library-game-search input { width: 100%; padding-right: 44px; border-color: #dfe7ee; border-radius: 9px; background: #fff; }
.library-game-search button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: transparent; border: 0; padding: 8px; color: #62798b; cursor: pointer; }
.library-game-filters { margin: 16px 0 24px; }
.library-game-filters summary { color: #526e82; font-size: 13px; font-weight: 600; cursor: pointer; padding: 8px 0; }
.library-game-filters[open] summary { margin-bottom: 12px; }
.library-game-filter-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.library-game-filter-grid input, .library-game-filter-grid select { min-width: 0 !important; margin-left: 0 !important; width: 100%; max-width: 100%; box-sizing: border-box; }
#view-community .community-quick-tab { font-size: 12px; font-weight: 600 !important; border-radius: 8px !important; box-shadow: none !important; padding: 8px 12px !important; }
#view-community .community-quick-tab.active { background: #244963 !important; border-color: #244963 !important; }


/* Compact game cards: one primary action, secondary actions in a small menu. */
.community-card, .community-card.is-owner-game { border: 1px solid #dce6ee; box-shadow: 0 3px 10px #17344904; border-radius: 14px; overflow: visible; min-width: 0; }
.community-card:hover, .community-card.is-owner-game:hover { transform: none; border-color: #b8ccdb; box-shadow: 0 6px 20px #1734490a; }
.community-card-top { padding: 18px 20px; border-radius: 14px 14px 0 0; background: #f3f7fa; align-items: center; gap: 10px; }
.community-card:nth-child(3n+2) .community-card-top { background: #f0f6f1; }
.community-card:nth-child(3n) .community-card-top { background: #faf5ed; }
.community-type-mark { width: 32px; height: 32px; border: 1px solid #dae6ee; border-radius: 8px; color: #607f96; background: #fff; display: grid; place-items: center; flex-shrink: 0; }
.community-type-mark svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.community-type-pill { background: transparent; border: 0; padding: 0; border-radius: 0; font-size: 13px; font-weight: 600; color: #48677e; min-width: 0; }
.community-grade-badge { font-size: 12px; color: #556e81; margin-left: auto; flex-shrink: 0; }
.community-card-body { padding: 20px 20px 12px; }
.community-card-title { color: #17394e; font-size: 20px; font-weight: 650; line-height: 1.4; margin: 0 0 10px; overflow-wrap: anywhere; }
.community-card-meta { display: block; color: #567085; font-size: 13px; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.community-card-topic { display: flex; align-items: baseline; gap: 7px; margin: 9px 0 0; color: #355a72; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.community-card-topic span { color: #526e82; font-size: 11px; font-weight: 600; flex-shrink: 0; }
.community-favorites { margin: 0 0 24px; scroll-margin-top: 24px; }
.favorite-tools-heading h3 { font-size: 14px; font-weight: 650; color: #18394e; margin: 0 0 10px; }
.favorite-tools-heading p { display: none; }
.favorite-tool-card { display: flex; align-items: center; gap: 18px; padding: 16px 20px; background: #f4f8f5; border: 1px solid #d8e5dc; border-radius: 14px; color: #254939; text-decoration: none; }
.favorite-tool-card:hover { background: #edf5ef; border-color: #b5cdbe; }
.favorite-tool-icon { display: grid; place-items: center; flex-shrink: 0; width: 50px; height: 50px; border-radius: 12px; background: #fff; color: #407958; border: 1px solid #d8e5dc; }
.favorite-tool-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.favorite-tool-copy { min-width: 0; display: flex; flex: 1; flex-direction: column; gap: 5px; }
.favorite-tool-kind { color: #496855; font-size: 10px; font-weight: 650; letter-spacing: .1em; }
.favorite-tool-copy strong { font-size: 18px; font-weight: 650; }
.favorite-tool-copy > span:last-child { color: #526d5f; font-size: 13px; line-height: 1.5; }
.favorite-tool-action { color: #305c43; font-size: 13px; font-weight: 650; white-space: nowrap; }

/* A consistent account menu for desktop, touch screens and keyboard use. */
.header-profile-dropdown { width: 296px; min-width: 0; max-width: calc(100vw - 28px); top: calc(100% + 12px); border: 1px solid #dce6ee; border-radius: 16px; padding: 8px; box-shadow: 0 12px 40px #1734491c; max-height: calc(100dvh - 110px); overflow-y: auto; }
.header-profile-dropdown .mobile-user-sheet-header { display: flex; align-items: center; gap: 10px; padding: 12px 8px 16px; margin: 0 4px 8px; border: 0; border-bottom: 1px solid #e7edf2; border-radius: 0; background: transparent; flex-shrink: 0; }
.header-profile-dropdown .mobile-avatar-circle { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #536f91; color: #fff; font-size: 12px; font-weight: 650; box-shadow: none; flex-shrink: 0; }
.header-profile-dropdown .mobile-user-details { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; text-align: left; }
.header-profile-dropdown .mobile-user-name { color: #18394e; font-size: 14px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-profile-dropdown .mobile-user-email { color: #526e82; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-profile-dropdown .mobile-sheet-close-btn { display: grid; place-items: center; flex-shrink: 0; width: 30px; height: 30px; min-height: 30px; border: 0; border-radius: 7px; padding: 0; margin: 0; background: transparent; color: #526e82; cursor: pointer; }
.mobile-sheet-close-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.header-profile-dropdown .mobile-sheet-close-btn:hover { background: #edf3f7; }
.header-profile-dropdown .dropdown-item { display: flex; align-items: center; justify-content: flex-start; width: 100%; gap: 12px; padding: 9px 10px; margin: 0; min-height: 46px; border: 0; border-radius: 9px; color: #34566f; font-size: 14px; font-weight: 500; text-align: left; line-height: 1.4; }
.header-profile-dropdown .dropdown-item:hover, .header-profile-dropdown .dropdown-item:focus-visible { background: #f1f5f8; color: #18394e; }
.header-profile-dropdown .dropdown-item-icon { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 28px; color: #607b8e; }
.dropdown-item-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.header-profile-dropdown .dropdown-item-info { min-width: 0; gap: 3px; line-height: 1.4; }
.header-profile-dropdown .dropdown-item-smartboard { background: #edf4f8; padding: 12px 10px; margin: 0; }
.header-profile-dropdown .dropdown-item-smartboard .dropdown-item-icon { color: #365f7b; }
.header-profile-dropdown .dropdown-item-title { font-size: 14px; font-weight: 650; color: #244963; }
.header-profile-dropdown .dropdown-item-subtitle { font-size: 12px; font-weight: 400; color: #526e82; }
.header-profile-dropdown .dropdown-divider { height: 1px; min-height: 1px; background: #e7edf2; border: 0; margin: 8px 4px; }
.header-profile-dropdown .dropdown-item-danger, .header-profile-dropdown .dropdown-item-danger .dropdown-item-icon { color: #b7443b; }
.header-profile-dropdown .dropdown-item-danger:hover { background: #fff1ef; color: #a6362f; }
.header-profile-dropdown :focus-visible { outline: 2px solid #6c9ab8; outline-offset: -2px; }
.community-card > .community-author-box { margin: auto 20px 0; padding: 12px 0; border: 0; background: transparent; border-radius: 0; gap: 8px; }
.community-card .author-mini-avatar { width: 26px; height: 26px; font-size: 10px; }
.community-card .author-display-name { font-size: 12px; font-weight: 500; color: #617789; }
.community-card-footer { background: transparent; padding: 14px 20px 18px; border-color: #edf1f5; flex-wrap: wrap; border-radius: 0 0 14px 14px; }
.community-card .card-stats-text { color: #567085; font-size: 12px; font-weight: 400; }
.community-card-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.community-card-actions > .btn { font-size: 12px; min-height: 36px; padding: 7px 12px; }
.community-card-actions .btn-detail-comm { background: #fff; border-color: #dfe7ee; color: #526b7e; }
.community-card-menu { position: relative; }
.community-card-menu summary { list-style: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; color: #60798b; border: 1px solid #dfe7ee; cursor: pointer; }
.community-card-menu summary::-webkit-details-marker { display: none; }
.community-card-menu summary svg { width: 18px; height: 18px; fill: currentColor; }
.community-card-menu[open] summary { background: #edf3f7; }
.community-card-menu-items { position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 20; background: #fff; border: 1px solid #dce6ee; border-radius: 10px; padding: 5px; min-width: 180px; box-shadow: 0 8px 30px #17344920; }
.community-card-menu-items button { display: block; width: 100%; padding: 11px 10px; text-align: left; border: 0; background: transparent; color: #34566f; font-size: 13px; cursor: pointer; border-radius: 6px; }
.community-card-menu-items button:hover { background: #f1f5f8; }
.community-card-menu-items .btn-unpublish-comm { color: #b7443b; }
.community-card-menu-items .btn-unpublish-comm:hover { background: #fff1ef; }
@media (max-width: 1150px) {
  .app-header { grid-template-columns: minmax(180px, 1fr) auto; gap: 14px; padding: 16px 20px; }
  .header-nav-tabs { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
}
@media (max-width: 768px) {
  .app-header { grid-template-columns: minmax(0, 1fr) auto; padding: 12px 14px; gap: 12px; min-height: 0; }
  .brand-icon { width: 32px; height: 32px; flex-basis: 32px; padding: 6px; border-radius: 8px; }
  .brand-link { gap: 8px; }
  .brand-title { font-size: 15px; }
  .brand-subtitle { font-size: 10px; }
  .header-search-wrap, .mobile-menu-toggle { display: none; }
  .header-actions { gap: 0; width: auto; }
  .header-user-badge-btn { padding: 5px 7px; gap: 5px; }
  .header-avatar-circle { width: 28px; height: 28px; }
  .header-username-text { font-size: 11px; max-width: 65px; }
  .header-nav-tabs, .header-nav-tabs.mobile-open { display: flex; flex-direction: row; width: 100%; padding: 3px; margin: 0; gap: 2px; max-height: none; overflow: visible; background: #f1f5f8; }
  .nav-tab-btn { flex: 1; justify-content: center; min-width: 0; min-height: 40px; font-size: 12px; padding: 8px 4px; gap: 5px; }
  .header-tool-link { flex: 1; margin-left: 0; padding: 8px 4px; font-size: 11px; min-height: 40px; }
  .nav-tab-btn svg { width: 14px; height: 14px; }
  .library-heading { flex-direction: column; align-items: flex-start; gap: 18px; margin-top: 4px; margin-bottom: 22px; }
  .library-heading h2 { font-size: 27px; }
  .library-heading p { font-size: 13px; line-height: 1.6; }
  .community-share-actions { width: 100%; }
  .community-share-actions .btn { flex: 1; font-size: 13px; padding: 10px 12px; }
  .library-game-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .community-card-top { padding: 14px 16px; }
  #view-community .community-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 16px !important; }
  .community-card { overflow: visible !important; }
  .community-card-body { padding: 16px 16px 8px !important; }
  .community-card-title { font-size: 20px !important; line-height: 1.4 !important; display: block !important; }
  .community-card-meta { font-size: 13px !important; }
  .community-card > .community-author-box { margin-inline: 16px; }
  .community-card-footer { padding: 12px 16px 16px; }
  .community-card-actions { padding: 0 !important; }
  .community-card-actions > .btn { font-size: 12px !important; min-height: 40px !important; flex: 0 0 auto !important; padding: 7px 12px !important; }
  .header-profile-dropdown { padding: 8px !important; border: 1px solid #dce6ee !important; border-radius: 16px !important; box-shadow: 0 12px 40px #1734491c !important; }
  .favorite-tool-card { gap: 12px; padding: 18px; flex-wrap: wrap; }
  .favorite-tool-action { margin-left: 62px; }
}
@media (max-width: 600px) {
  #view-community .community-grid { grid-template-columns: minmax(0, 1fr) !important; }
}
@media (max-width: 400px) {
  .header-username-text { display: none; }
  .nav-label-full { display: none; }
  .nav-label-short { display: inline; }
  .nav-tab-btn { font-size: 11px; gap: 3px; }
}
