@font-face {
  font-family: "Google Sans";
  src: url("./assets/google-sans-regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Google Sans";
  src: url("./assets/google-sans-medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: Roboto;
  src: url("./assets/roboto-regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
:root {
  color-scheme: light;
  --green: #01875f;
  --ink: #202124;
  --muted: #5f6368;
  --gutter: 24px;
  font-family: "Google Sans", Arial, sans-serif;
  color: var(--ink);
  background: #fff;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid #1967d2; outline-offset: 2px; }
svg { width: 24px; height: 24px; fill: currentColor; flex-shrink: 0; }
.icons { position: absolute; width: 0; height: 0; overflow: hidden; }
.topbar { border-top: 1px solid #38383d; background: white; }
.topbar nav, .brand, .header-tools, .icon-button { display: flex; align-items: center; }
.topbar nav { height: 56px; justify-content: space-between; padding: 0 10px 0 16px; }
.brand { gap: 8px; flex-shrink: 0; }
.wordmark { transform: translateY(1px); }
.icon-button { width: 48px; height: 48px; justify-content: center; border-radius: 50%; color: var(--muted); }
.icon-button:hover { background: #f1f3f4; }
.profile-avatar { display: grid; place-items: center; flex: none; width: 32px; height: 32px; margin: 0 8px; border-radius: 50%; background: #e85d04; color: #fff; font-size: 20px; line-height: 1; font-weight: 700; }
main { max-width: 1048px; margin: 0 auto; padding: 48px var(--gutter) 36px; }
.identity { display: flex; gap: 24px; align-items: flex-start; margin-right: calc(8px - var(--gutter)); }
.app-icon { flex: none; margin-top: 7px; border-radius: 20%; box-shadow: 0 1px 3px #3c40435c, 0 1px 4px 1px #3c404326; }
h1 { margin: 0; font-size: 1.5rem; line-height: 2rem; font-weight: 500; }
.publisher { display: inline-block; margin-top: 2px; color: var(--green); font-size: 1rem; line-height: 1.5rem; letter-spacing: .00625em; font-weight: 500; }
.metrics, .gallery { display: flex; overflow-x: auto; scrollbar-width: none; }
.metrics::-webkit-scrollbar, .gallery::-webkit-scrollbar { display: none; }
.metrics { margin: 28px calc(-1 * var(--gutter)) 0 0; }
.metric { flex: none; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 24px; color: var(--muted); font: 400 .75rem/20px Roboto, Arial, sans-serif; letter-spacing: .025em; white-space: nowrap; }
.metric:first-child { padding: 0 16px 0 0; }
.metric + .metric::before { content: ""; width: 1px; height: 24px; background: #e6e8ed; position: absolute; top: 10px; left: 0; }
.metric-value { display: flex; align-items: center; justify-content: center; height: 24px; color: var(--ink); font: 500 .875rem/1.25rem "Google Sans", Arial, sans-serif; letter-spacing: .01786em; }
.metric-value svg, .info-icon { width: 12px; height: 12px; }
.info-icon { vertical-align: -1px; }
button.metric:hover .info-icon { color: var(--green); }
.app-actions { margin-top: 38px; }
.install, .primary { display: flex; justify-content: center; align-items: center; background: var(--green); color: white; font-weight: 500; font-size: .875rem; line-height: 1.25rem; letter-spacing: .01em; border-radius: 8px; }
.install { width: 100%; height: 36px; cursor: default; opacity: 1; }
.install:enabled { cursor: pointer; }
.install:enabled:hover { background: #056c4e; }
#install-help { color: var(--muted); font-size: .875rem; line-height: 1.4; }
.primary:hover { background: #056c4e; }
.secondary-actions { display: flex; align-items: stretch; gap: 8px; margin-top: 12px; }
.secondary-actions button { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 8px; border-radius: 6px; text-align: left; color: var(--green); font-size: .875rem; line-height: .875rem; letter-spacing: .01em; font-weight: 500; }
.secondary-actions button:first-child { flex: none; min-width: 136px; }
.secondary-actions button:hover { background: #f0f8f4; }
.availability { display: flex; gap: 12px; align-items: flex-start; margin: 26px 0 0; color: var(--muted); font-size: .875rem; line-height: 1.25rem; letter-spacing: .014em; }
.availability svg { width: 20px; height: 20px; }
.gallery { margin-top: 72px; padding: 4px 0; gap: 12px; scroll-snap-type: x mandatory; }
.gallery button { flex: none; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 2px #3c40434d, 0 1px 3px 1px #3c404326; scroll-snap-align: start; }
.gallery button:focus-visible { outline-offset: -3px; }
.gallery img { display: block; width: 115px; height: 204px; }
dialog { color: var(--ink); background: #fff; border: 0; border-radius: 18px; padding: 24px; width: min(400px, calc(100% - 32px)); max-height: calc(100% - 32px); box-shadow: 0 12px 48px #0003; }
dialog::backdrop { background: #2021248f; }
body:has(dialog[open]) { overflow: hidden; }
dialog .dismiss { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; }
h2 { margin: 0 24px 18px 0; font-size: 1.25rem; font-weight: 500; }
dialog p { font-size: .9375rem; line-height: 1.4; }
dialog p:last-child { margin-bottom: 0; }
dialog label { display: block; font-size: .875rem; color: var(--muted); margin: 16px 0 6px; }
dialog input { width: 100%; border: 1px solid #9aa0a6; border-radius: 6px; padding: 10px; }
.primary { min-height: 40px; padding: 0 18px; margin-top: 16px; }
.search-result { margin-top: 12px; padding: 8px 0; color: var(--green); text-align: left; font-weight: 500; }
.rating-badge { margin-bottom: 14px; }
#copy-status:empty { display: none; }
.viewer { width: fit-content; padding: 48px 12px 10px; background: #202124; color: white; }
.viewer .icon-button { color: white; }
.viewer .icon-button:hover, .viewer-tools button:hover { background: #3c4043; }
#full-image { display: block; margin: 0 auto; max-width: 100%; width: auto; height: auto; max-height: min(74vh, 760px); border-radius: 6px; }
.viewer-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: .875rem; }
.viewer-tools button { min-height: 40px; padding: 0 10px; border-radius: 6px; }
.viewer-tools button:disabled { color: #9aa0a6; cursor: default; }
.identity > div { min-width: 0; overflow-wrap: anywhere; }
.profile-avatar:disabled { cursor: default; }
.admin-panel { padding: 0; width: min(480px, calc(100% - 32px)); border-radius: 20px; }
.admin-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 16px 24px; border-bottom: 1px solid #e4e8e6; }
.admin-header h2 { margin: 0; font-size: 1.35rem; }
.admin-header .dismiss { position: static; flex: none; }
#admin-loading, #editor-message { margin: 0; padding: 18px 24px; }
#editor-message { color: #a4281b; }
#editor-message:empty { display: none; }
#app-editor { padding: 24px; }
#editor-fields { min-width: 0; margin: 0; padding: 0; border: 0; }
.admin-panel label, .field-heading { color: var(--ink); font-size: .875rem; font-weight: 500; }
.admin-panel input:not([type="file"]) { min-height: 44px; font-size: 1rem; border-radius: 8px; }
.icon-editor { display: flex; align-items: center; gap: 16px; padding-bottom: 10px; }
#icon-preview { object-fit: cover; flex: none; border-radius: 18%; box-shadow: 0 1px 4px #20212426; }
.icon-editor .field-heading, .icon-editor small { display: block; }
.icon-editor small, #save-scope { font-size: .78rem; line-height: 1.4; color: var(--muted); }
.icon-editor .file-button { display: inline-block; position: relative; margin: 6px 0; padding: 6px 12px; border-radius: 6px; background: #e7f5ee; color: #006e4d; cursor: pointer; overflow: hidden; }
.file-button input { position: absolute; inset: 0; padding: 0; opacity: 0; cursor: pointer; }
.file-button:focus-within { outline: 2px solid #1967d2; outline-offset: 2px; }
#save-scope { margin: 16px 0 0; }
.editor-actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 22px; }
.editor-actions button { min-height: 42px; padding: 0 15px; font-weight: 500; }
.editor-actions .primary { margin: 0; }
.admin-panel button:disabled { opacity: .6; cursor: default; }
#saved-notice:not(:empty) { position: fixed; bottom: 20px; left: 50%; width: max-content; max-width: calc(100% - 32px); transform: translateX(-50%); background: #25332c; color: #fff; border-radius: 8px; padding: 12px 20px; font-size: .875rem; z-index: 1; }
@media (max-width: 345px) {
  :root { --gutter: 16px; }
  .topbar nav { padding: 0 6px 0 10px; }
  .header-tools .icon-button { width: 40px; }
  .profile-avatar { margin-inline: 4px; }
  .identity { gap: 16px; }
  .secondary-actions button:first-child { min-width: 124px; }
}
@media (min-width: 600px) {
  .topbar nav { padding: 0 24px; height: 64px; }
  main { padding-top: 64px; }
  .identity { align-items: center; margin: 0; gap: 32px; }
  .app-icon { width: 112px; height: 112px; margin: 0; }
  h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.15; }
  .publisher { margin-top: 8px; }
  .app-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
  #install-help { order: 3; flex-basis: 100%; }
  .install { width: 180px; height: 40px; }
  .secondary-actions { margin: 0; }
  .secondary-actions button:first-child { min-width: 0; }
  .gallery { margin-top: 48px; gap: 16px; }
  .gallery img { width: 151px; height: 268px; }
}
