@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap');

:root {
  font-size: 17px;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #20242e;
  background: #f6f7f9;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto;
  font-weight: 400;
}

* { box-sizing: border-box; }
body { min-width: 320px; min-height: 100vh; margin: 0; }
button, a { font: inherit; }
button { cursor: pointer; }

.session-loading-message { display: none; }
html.session-loading body { display: grid; place-items: center; }
html.session-loading .app-shell { display: none; }
html.session-loading .session-loading-message { display: block; margin: 0; color: #737987; font-size: 14px; }
.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 2;
  display: flex;
  width: 300px;
  flex-direction: column;
  padding: 30px 18px 18px;
  border-right: 1px solid #e9ebef;
  background: #fff;
}
.brand { display: inline-flex; width: fit-content; align-items: center; gap: 10px; color: #20242e; font: 800 21px 'Manrope', sans-serif; letter-spacing: -1px; text-decoration: none; white-space: nowrap; }
.brand-mark { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 11px; background: #5446dc; color: #fff; }
.brand-mark svg { width: 21px; height: 21px; }
.sidebar-nav { margin-top: 53px; }
.nav-item { display: flex; width: 100%; height: 44px; align-items: center; gap: 12px; margin-top: 13px; padding: 0 12px; border: 0; border-radius: 9px; background: #f0efff; color: #5042d2; text-align: left; font-size: 14px; font-weight: 600; }
.nav-item svg { width: 18px; height: 18px; }
.nav-count { margin-left: auto; color: #8077df; font-size: 12px; }
.sidebar-bottom { margin-top: auto; }
.sidebar-login { width: 100%; max-width: 100%; min-width: 0; height: 42px; overflow: hidden; border: 1px solid #e5e6eb; border-radius: 9px; background: #fff; color: #333844; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; transition: border-color .15s, background .15s; }
.sidebar-login:hover { border-color: #c9c5f7; background: #faf9ff; }
.auth-dialog { width: min(420px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 16px; color: #20242e; box-shadow: 0 24px 80px rgba(24, 28, 40, .22); }
.account-dialog { max-height: calc(100vh - 32px); overflow-y: auto; }
.auth-dialog::backdrop { background: rgba(24, 28, 40, .45); backdrop-filter: blur(3px); }
.auth-panel { position: relative; padding: 34px; }
.auth-close { position: absolute; top: 15px; right: 15px; width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: #777e8b; font-size: 23px; line-height: 1; }
.auth-close:hover { background: #f2f3f7; }
.auth-panel h2 { margin: 0 0 7px; font-size: 26px; }
.auth-copy { margin: 0 0 22px; color: #858b98; font-size: 15px; }
.auth-form { display: grid; gap: 8px; }
.auth-form label { margin-top: 5px; color: #444a57; font-size: 14px; font-weight: 600; }
.auth-form input { width: 100%; height: 42px; padding: 0 12px; border: 1px solid #dfe2e9; border-radius: 8px; background: #fff; color: #20242e; font: inherit; font-size: 15px; }
.auth-form input:focus { border-color: #756ae0; outline: 3px solid rgba(117, 106, 224, .14); }
.auth-message { min-height: 17px; margin: 3px 0 0; color: #b43c49; font-size: 14px; }
.auth-submit { height: 42px; border: 0; border-radius: 8px; background: #5446dc; color: #fff; font-size: 15px; font-weight: 600; }
.auth-submit:hover { background: #4638ca; }
.auth-submit:disabled { cursor: wait; opacity: .65; }
.auth-switch { margin: 20px 0 0; color: #858b98; font-size: 14px; text-align: center; }
.auth-switch button { padding: 0; border: 0; background: transparent; color: #5446dc; font-size: inherit; font-weight: 600; }
.account-current-email { overflow-wrap: anywhere; color: #444a57; }
.account-section + .account-section { margin-top: 20px; padding-top: 18px; border-top: 1px solid #eceef2; }
.account-section h3 { margin: 0 0 8px; color: #282c36; font-size: 16px; }
.account-logout { width: 100%; height: 42px; border: 1px solid #e5e6eb; border-radius: 8px; background: #fff; color: #333844; font-size: 14px; font-weight: 600; }
.account-logout:hover { border-color: #c9c5f7; background: #faf9ff; }

.page-column { min-height: 100vh; margin-left: 300px; }
.main-content { width: min(100%, 1080px); margin: 0 auto; padding: 58px 52px 40px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 29px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 6px; font: 700 32px 'Manrope', sans-serif; letter-spacing: -1px; }
.app-total { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 3px; padding: 7px 11px; border: 1px solid #e8e9ee; border-radius: 20px; background: #fff; color: #737987; font-size: 13px; }
.total-dot { width: 6px; height: 6px; border-radius: 50%; background: #756ae0; }
.app-list { display: grid; gap: 14px; }
.app-card { position: relative; display: flex; min-height: 132px; align-items: center; gap: 20px; padding: 23px 24px; border: 1px solid #e9ebef; border-radius: 12px; background: #fff; box-shadow: 0 2px 5px rgba(32, 36, 46, .025); transition: border-color .18s, box-shadow .18s, transform .18s; }
.app-card:hover, .app-card:focus-within { z-index: 4; }
.app-card:hover { transform: translateY(-1px); border-color: #d8d5f5; box-shadow: 0 7px 20px rgba(41, 38, 83, .055); }
.app-details { min-width: 0; flex: 1; }
.screenshot-preview { position: relative; z-index: 1; display: block; width: 200px; height: 124px; flex: 0 0 200px; }
.screenshot-preview:focus-visible { outline: 3px solid rgba(117, 106, 224, .7); outline-offset: 4px; border-radius: 9px; }
.app-screenshot { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 9px; }
.app-screenshot--contain { object-fit: contain; }
.screenshot-tooltip { position: absolute; z-index: 5; top: calc(100% + 10px); right: 0; display: none; width: min(560px, calc(100vw - 320px)); padding: 10px; border-radius: 12px; background: #fff; box-shadow: 0 14px 42px rgba(24, 28, 40, .22); pointer-events: none; }
.screenshot-tooltip-image { display: block; width: 100%; max-height: min(75vh, 680px); object-fit: contain; }
.screenshot-preview:hover .screenshot-tooltip,
.screenshot-preview:focus-visible .screenshot-tooltip { display: block; }
.app-title-line { display: flex; align-items: center; gap: 10px; }
h2 { margin-bottom: 0; color: #282c36; font: 700 17px 'Manrope', sans-serif; letter-spacing: -.2px; }
.status { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 20px; background: #eff8f3; color: #408262; font-size: 11px; font-weight: 600; }
.status span { width: 5px; height: 5px; border-radius: 50%; background: #50a979; }
.app-description { margin: 7px 0 12px; color: #7f8592; font-size: 14px; line-height: 1.5; }
.app-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.free-executions { margin-right: 4px; color: #737987; font-size: 13px; }
.app-button { display: inline-flex; min-height: 34px; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; border: 1px solid #e5e6eb; border-radius: 8px; background: #fff; color: #333844; font-size: 14px; font-weight: 600; text-decoration: none; }
.platform-icon { display: block; width: 12px; height: 16px; flex: 0 0 auto; object-fit: contain; }
.app-button:disabled { cursor: not-allowed; opacity: .65; }
.payment-message { min-height: 1.4em; margin: 14px 0 0; color: #408262; font-size: 14px; }
.payment-message:empty { display: none; }
.payment-message[data-error="true"] { color: #b43c49; }
.app-card[data-purchased="true"] .buy-button,
.app-card[data-purchased="true"] .free-executions { display: none; }
.page-footnote { margin: 22px 0 0; color: #a0a5af; font-size: 12px; text-align: center; }

@media (max-width: 800px) {
  .sidebar { width: 280px; }
  .page-column { margin-left: 280px; }
  .main-content { padding: 42px 30px 32px; }
  .screenshot-preview { width: 150px; height: 94px; flex-basis: 150px; }
}
@media (max-width: 700px) {
  .app-card { flex-direction: column; align-items: stretch; }
  .screenshot-preview { width: 100%; height: 150px; flex-basis: auto; }
  .screenshot-tooltip { width: min(560px, calc(100vw - 40px)); }
}
@media (max-width: 620px) {
  .sidebar { position: static; display: grid; width: auto; height: 62px; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 0 18px; border-right: 0; border-bottom: 1px solid #e9ebef; }
  .brand { font-size: 20px; }
  .brand { min-width: 0; width: auto; overflow: hidden; }
  .brand > span:last-child { overflow: hidden; text-overflow: ellipsis; }
  .brand-mark { width: 30px; height: 30px; border-radius: 9px; }
  .brand-mark svg { width: 19px; height: 19px; }
  .sidebar-nav { margin: 0; }
  .sidebar-bottom { display: block; margin: 0; }
  .sidebar-login { width: auto; max-width: min(40vw, 210px); height: 36px; padding: 0 10px; font-size: 13px; }
  .nav-item { width: auto; height: 36px; gap: 8px; margin: 0; padding: 0 10px; font-size: 13px; }
  .nav-item svg { width: 16px; height: 16px; }
  .nav-count { display: none; }
  .page-column { min-height: calc(100vh - 62px); margin-left: 0; }
  .main-content { padding: 38px 18px 28px; }
  .page-heading { margin-bottom: 22px; }
  h1 { font-size: 29px; }
  .app-card { min-height: 120px; gap: 14px; padding: 18px 15px; }
  .app-description { font-size: 13px; }
  .status { font-size: 10px; }
}
@media (max-width: 390px) {
  .app-card { gap: 11px; padding-right: 12px; padding-left: 12px; }
  .app-title-line { gap: 6px; }
  h2 { font-size: 15px; }
  .status { padding: 3px 5px; }
}
