@font-face {
  font-family: Roboto;
  src: url("../assets/fonts/roboto-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Roboto;
  src: url("../assets/fonts/roboto-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --green: #01875f;
  --green-press: #016b4c;
  --ink: #202124;
  --muted: #5f6368;
  --line: #dadce0;
  --blue: #0b57d0;
  --bg: #fff;
  --pad: 24px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Roboto, Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

img { display: block; max-width: 100%; }

button, input { font: inherit; color: inherit; }

a { color: var(--green); text-decoration: none; }

button { background: none; border: 0; padding: 0; cursor: pointer; }

svg { display: block; }

.gp-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid #e8eaed;
}

.gp-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "logo tools"
    "tabs tabs";
  align-items: center;
  padding-top: 8px;
}

.gp-logo {
  grid-area: logo;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.2px;
}

.gp-logo svg { width: 32px; height: 32px; }

.gp-tools {
  grid-area: tools;
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
}

.gp-tabs {
  grid-area: tabs;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 -4px;
}

.gp-tabs::-webkit-scrollbar { display: none; }

.gp-tabs a {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 10px 10px;
  white-space: nowrap;
}

.gp-tabs a.is-active {
  color: var(--green);
  box-shadow: inset 0 -3px 0 var(--green);
}

.icon-btn, .avatar-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.icon-btn svg, .avatar-btn svg { width: 24px; height: 24px; fill: currentColor; }

.avatar-btn {
  background: #e8eaed;
  color: #5f6368;
  margin-left: 4px;
}

.icon-btn:hover, .avatar-btn:hover, .text-btn:hover { background: #f1f3f4; }

.account-menu {
  position: absolute;
  top: 46px;
  right: 0;
  width: min(280px, 80vw);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 2px 6px 2px rgba(60, 64, 67, 0.15);
  padding: 8px 0;
  z-index: 30;
}

.account-menu p {
  margin: 0;
  padding: 12px 16px;
  color: var(--ink);
}

.page,
.gp-bar,
.foot-cols,
.foot-bottom {
  width: min(1136px, calc(100% - 48px));
  margin-left: auto;
  margin-right: auto;
}

.page { padding-bottom: 24px; }

.layout { display: flex; flex-direction: column; }

.mast {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  column-gap: 16px;
  padding-top: 24px;
}

.mast-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  grid-column: 1;
  grid-row: 1;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
}

h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0;
}

.mast-copy { grid-column: 2; grid-row: 1; min-width: 0; }

.dev { display: inline-block; margin-top: 2px; font-size: 14px; font-weight: 500; }

.iap { margin: 2px 0 0; color: var(--muted); font-size: 12px; }

.stat-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: stretch;
  margin-top: 20px;
}

.stat-age, .stat-dl {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 2px;
  min-height: 48px;
}

.stat-dl { border-left: 1px solid #e8eaed; }

.stat-age img { width: 24px; height: 24px; }

.stat-age div { display: flex; align-items: center; gap: 2px; color: var(--muted); font-size: 12px; }

.stat-dl b { font-size: 14px; font-weight: 500; }

.stat-dl span { color: var(--muted); font-size: 12px; }

.info-btn {
  width: 18px;
  height: 18px;
  color: var(--muted);
  display: grid;
  place-items: center;
}

.info-btn svg { width: 16px; height: 16px; fill: currentColor; }

.actions {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  margin-top: 16px;
}

.install {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}

.install:hover { background: var(--green-press); }

.action-links {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.text-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 8px;
  border-radius: 8px;
  color: var(--green);
  font-weight: 500;
}

.text-btn svg { width: 20px; height: 20px; fill: currentColor; }

.text-btn.is-disabled, .text-btn:disabled {
  color: #9aa0a6;
  cursor: default;
  background: transparent;
}

.share-status {
  min-height: 0;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.share-status:empty { display: none; }

.shots { margin-top: 28px; }

.rail-wrap { position: relative; }

.rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  margin-right: -24px;
  padding-right: 24px;
}

.rail::-webkit-scrollbar { display: none; }

.shot {
  flex: 0 0 auto;
  scroll-snap-align: start;
  border-radius: 8px;
  overflow: hidden;
  padding: 0;
}

.shot img {
  height: 204px;
  width: auto;
  max-width: none;
  border-radius: 8px;
}

.rail-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 2px 6px 2px rgba(60, 64, 67, 0.15);
  display: grid;
  place-items: center;
  color: var(--muted);
}

.rail-arrow svg { width: 28px; height: 28px; fill: currentColor; }

.rail-arrow.prev { left: -6px; }
.rail-arrow.next { right: -6px; }
.rail-arrow[hidden] { display: none; }

.side { display: contents; }

.everyone-card { display: none; }

.support-block { margin-top: 8px; }

.support-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 48px;
  font-size: 16px;
  font-weight: 500;
  text-align: left;
}

.support-toggle svg { width: 24px; height: 24px; fill: var(--muted); }

.support-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

.support-line {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 12px 0;
}

.support-line svg { width: 22px; height: 22px; fill: var(--muted); flex: 0 0 auto; margin-top: 2px; }

.support-label { color: var(--ink); }

.support-block h2 { margin: 18px 0 8px; font-size: 16px; font-weight: 500; }

.dev-name { margin: 0; font-weight: 500; }

address { font-style: normal; color: var(--muted); margin-top: 4px; }

.block { margin-top: 28px; }

.block-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.block-title h2, .news h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
}

.block-title button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.block-title button:hover { background: #f1f3f4; }

.block-title svg { width: 24px; height: 24px; fill: currentColor; }

.about-preview p, .lede, .news p, .dialog-body p { margin: 12px 0 0; color: var(--muted); }

.about-preview p:first-child { margin-top: 12px; color: var(--muted); }

.fade-line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.updated-label { margin: 20px 0 0; font-weight: 500; }

.updated-date { margin: 2px 0 0; color: var(--muted); }

.chip {
  display: inline-flex;
  margin-top: 16px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
}

.safety-card {
  list-style: none;
  margin: 16px 0 0;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.safety-card li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 12px 0;
}

.safety-card svg { width: 20px; height: 20px; fill: var(--muted); flex: 0 0 auto; margin-top: 2px; }

.safety-card strong, .safety-card span { display: inline; }

.safety-card span, .safety-card .linkish + span { color: var(--muted); }

.safety-card strong { display: block; font-weight: 400; }

.safety-more { padding-left: 36px; }

.linkish {
  color: var(--blue);
  font-weight: 500;
  padding: 0;
}

.safety-more .linkish { color: var(--green); }

.news p { margin-top: 12px; }

.flag {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 28px 0 8px;
  padding-top: 16px;
  border-top: 1px solid #e8eaed;
  font-weight: 500;
}

.flag svg { width: 20px; height: 20px; fill: var(--ink); }

.gp-footer {
  border-top: 1px solid #e8eaed;
  padding: 28px 0 40px;
  color: var(--muted);
}

.foot-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
}

.foot-cols p { margin: 0 0 14px; }

.foot-cols p:first-child { color: var(--ink); font-weight: 500; }

.foot-bottom {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.foot-bottom nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }

.foot-bottom a, .foot-bottom span { color: var(--muted); }

.locale { display: inline-flex; align-items: center; gap: 8px; margin: 0; }

dialog {
  border: 0;
  border-radius: 8px;
  padding: 0;
  width: min(760px, calc(100% - 32px));
  max-height: min(86vh, 760px);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(60, 64, 67, 0.3), 0 4px 8px 3px rgba(60, 64, 67, 0.15);
}

dialog::backdrop { background: rgba(32, 33, 36, 0.32); }

#viewer {
  width: min(480px, calc(100% - 24px));
  max-height: 92vh;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

#viewer::backdrop { background: rgba(32, 33, 36, 0.72); }

.dialog-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 8px;
  position: sticky;
  top: 0;
  background: #fff;
}

.dialog-head img { width: 48px; height: 48px; border-radius: 12px; }

.dialog-head strong, .dialog-head span { display: block; }

.dialog-head span { color: var(--muted); font-size: 13px; }

.dialog-close {
  margin-left: auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.dialog-close svg { width: 22px; height: 22px; fill: var(--muted); }

.dialog-body { padding: 0 20px 24px; overflow: auto; }

.dialog-body h3 { margin: 20px 0 0; font-size: 16px; font-weight: 500; }

.meta-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px 24px;
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid #e8eaed;
}

.meta-grid dt { color: var(--muted); font-size: 12px; }

.meta-grid dd { margin: 2px 0 0; }

.plain { list-style: none; margin: 8px 0 0; padding: 0; }

.plain li { padding: 10px 0; border-top: 1px solid #f1f3f4; }

.plain strong, .plain span { display: block; }

.plain span { color: var(--muted); }

.fine { font-size: 12px; }

#viewer img {
  width: auto;
  max-width: 100%;
  max-height: 78vh;
  margin: 48px auto 0;
  border-radius: 12px;
}

.viewer-close { position: absolute; top: 0; right: 0; background: #fff; }

.viewer-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
}

.viewer-arrow svg { width: 28px; height: 28px; fill: var(--muted); }

.viewer-arrow.prev { left: -6px; }
.viewer-arrow.next { right: -6px; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

@media (max-width: 959px) {
  .support-block { order: 2; }
}

@media (min-width: 960px) {
  .gp-bar {
    height: 64px;
    padding: 0;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "logo tabs tools";
  }

  .gp-logo svg { width: 40px; height: 40px; }

  .gp-tabs { margin-left: 28px; overflow: visible; }

  .gp-tabs a { padding: 20px 16px 18px; }

  .page { padding-top: 8px; }

  .layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    column-gap: 32px;
    align-items: start;
  }

  .mast {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) 240px;
    column-gap: 24px;
    padding-top: 32px;
  }

  .mast-icon {
    width: 240px;
    height: 240px;
    border-radius: 48px;
    grid-column: 2;
    grid-row: 1 / span 4;
    justify-self: end;
  }

  .mast-copy, .stat-row, .actions { grid-column: 1; }

  h1 { font-size: 64px; line-height: 1.05; letter-spacing: -0.5px; }

  .dev { font-size: 16px; }

  .stat-age { display: none; }

  .stat-row { margin-top: 24px; justify-content: flex-start; }

  .stat-dl {
    flex: 0 0 auto;
    align-items: flex-start;
    text-align: left;
    border-left: 1px solid #e8eaed;
    padding: 4px 0 4px 16px;
    min-width: 96px;
  }

  .actions {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
  }

  .install { width: 200px; flex: 0 0 auto; }

  .action-links { margin-top: 0; justify-content: flex-start; }

  .share-status { text-align: left; }

  .shots { grid-column: 1; grid-row: 2; margin-top: 32px; }

  .side {
    display: block;
    grid-column: 2;
    grid-row: 2;
    align-self: center;
  }

  .everyone-card {
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
  }

  .everyone-card img { width: 40px; height: 48px; object-fit: contain; }

  .everyone-card strong { display: block; font-size: 18px; font-weight: 500; }

  .rail { gap: 16px; margin-right: 0; padding-right: 0; }

  .shot img { height: 296px; border-radius: 8px; }

  .rail-arrow { width: 56px; height: 56px; }
  .rail-arrow.next { right: -20px; }
  .rail-arrow.prev { left: -20px; }

  .about, .safety, .news, .flag { grid-column: 1 / -1; }

  .block-title h2, .news h2 { font-size: 22px; }

  .safety-card { max-width: 760px; }

  .support-block { margin-top: 20px; }

  .meta-grid { grid-template-columns: 1fr 1fr; }

}

@media (min-width: 1280px) {
  .page,
  .gp-bar,
  .foot-cols,
  .foot-bottom {
    width: min(1136px, calc(100% - 144px));
  }
}

@media (max-width: 359px) {
  h1 { font-size: 22px; }
  .gp-logo span { font-size: 18px; }
  .gp-tabs a { padding-left: 6px; padding-right: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
