
:root{
  --bg: #ffffff;
  --fg: #111827;
  --muted: #6b7280;
  --accent: #3b82f6; /* blue accent */
  --card: #f9fafb;
  --border: #e5e7eb;
}

*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, Apple Color Emoji, Segoe UI Emoji, Noto Color Emoji, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
}

.container{max-width:1000px;margin:0 auto;padding:24px;}
.header{
  display:flex;align-items:center;gap:20px;flex-wrap:wrap;justify-content:center;padding-top:20px;
}
.app-icon{
  width:96px;height:96px;border-radius:22%;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
}
.title{font-size: clamp(28px, 4vw, 40px); font-weight: 700; margin: 0;}
.subtitle{margin: 0; color: var(--muted); font-size: 16px;}
.badges{display:flex; gap:12px; align-items:center; flex-wrap:wrap;}

.hero{
  background: linear-gradient(180deg, rgba(59,130,246,.08), rgba(0,0,0,0));
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.hero-inner{padding: 12px 0 24px;}

.lang-switch{
  margin-left:auto;
}
.lang-button{
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 999px;
  padding: 8px 12px;
  display:flex; align-items:center; gap:8px;
  cursor:pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,.04);
}
.lang-menu{
  position: absolute;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-top: 8px;
  min-width: 180px;
  box-shadow: 0 12px 30px rgba(0,0,0,.08);
  display:none;
}
.lang-menu a{
  display:block; padding:10px 12px; text-decoration:none; color: var(--fg);
}
.lang-menu a:hover{ background: var(--card); }
.lang-wrap{ position: relative; }

main{display:grid; gap:0px; grid-template-columns: 1fr; }
.card{
  background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 20px;
}

footer{
  border-top: 1px solid var(--border);
  margin-top: 32px;
  padding: 16px 0;
  color: var(--muted);
  font-size: 14px;
}
footer a{ color: var(--muted); }
footer a:hover{ color: var(--fg); }
.prose{max-width: 72ch;}
.prose img{max-width:100%; border-radius: 12px;}

/* App Store badge sizing (keeps Apple proportions, smaller by default) */
.app-store-link { display: inline-block; line-height: 0; }
.app-store-badge {
  height: 44px;    /* desktop/tablet default */
  width: auto;
  max-width: 100%;
  vertical-align: middle;
}
@media (max-width: 640px) {
  .app-store-badge { height: 40px; }
}
@media (max-width: 400px) {
  .app-store-badge { height: 36px; }
}

/* Make the language button larger and more tappable */
.lang-button{
  padding: 10px 14px;           /* was 8px 12px */
  gap: 10px;                    /* a bit more space between icon and text */
  font-size: 15px;              /* larger label */
  font-weight: 600;
}
.lang-button .globe{            /* make the globe bigger */
  font-size: 18px;
  line-height: 1;
}
.lang-button:hover{ transform: translateY(-1px); }
.lang-button:focus-visible{
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Make the dropdown a touch friendlier */
.lang-menu a{ padding: 12px 14px; font-size: 15px; }


/* Header layout defaults (desktop/tablet) */
.header{
  display:flex;
  align-items:center;
  gap:20px;
  flex-wrap:nowrap;            /* prevent odd wrapping on medium screens */
  justify-content:flex-start;
}
.header-main{                  /* middle block (title + badge) */
  flex:1 1 auto;
  min-width: 260px;
}
.lang-wrap{
  margin-left:auto;            /* push globe to the right on wide screens */
  position: relative;          /* anchor dropdown */
}

/* Make the App Store badge a bit smaller but crisp */
.app-store-link { display: inline-block; line-height: 0; }
.app-store-badge { height: 44px; width: auto; max-width: 100%; vertical-align: middle; }

/* Tappable, larger language button */
.lang-button{
  padding: 10px 14px;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
}
.lang-button .globe{ font-size: 18px; line-height: 1; }

/* Phone layout: stack + center everything consistently */
@media (max-width: 640px){
  .header{
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .app-icon{ width:72px; height:72px; }    /* smaller icon on phones */
  .header-main{ width: 100%; }
  .title, .subtitle{ text-align: center; margin: 0; }
  .badges{ justify-content: center; }

  .lang-wrap{
    order: -1;                  /* put the language button at the top */
    margin-left: 0;
    width: 100%;
    display: flex;
    justify-content: center;    /* center the globe button */
  }

  .app-store-badge{ height: 36px; } /* slightly smaller on phones */
  .lang-menu{ left: 50%; transform: translateX(-50%); } /* center dropdown under button */
}

.sshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  align-items: start;
}
.sshot {
  background: transparent;
  text-align: center;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}
.sshot a { display: inline-block; border-radius: 20px; overflow: hidden; box-shadow: 0 6px 18px rgba(0,0,0,0.12); }
.sshot img { display: block; width: 100%; height: auto; max-width: 320px; }
.sshot figcaption { margin-top: 6px; font-size: 0.9rem; color: #333; }
@media (prefers-color-scheme: dark) {
  .sshot figcaption { color: #ddd; }
}
