:root{
  --bg:#0f2744; --accent:#ed8936; --purple:#805ad5; --text:#f7fafc; --muted:#a0aec0;
  --term1:#ed8936; --term2:#3182ce; --term3:#38a169; --term4:#00b5d8; --term5:#b83280;
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,system-ui,sans-serif;
  background:var(--bg);color:var(--text);
  min-height:100vh;min-height:100dvh;
  -webkit-tap-highlight-color:transparent;touch-action:manipulation;
}
.wrap{max-width:480px;margin:0 auto;padding:1rem 1rem 5.5rem;min-height:100vh;display:flex;flex-direction:column}
.lang-bar{display:flex;justify-content:space-between;gap:.5rem;margin-bottom:1.25rem}
.lang-btn{background:#1a365d;border:none;color:#fff;font-weight:700;font-size:.8rem;padding:.45rem 1rem;border-radius:8px;cursor:pointer}
.lang-btn.active{background:#2c5282;outline:2px solid #63b3ed}
.title-pill{display:block;text-align:center;margin:0 auto 1.25rem;padding:.85rem 1.5rem;border-radius:14px;font-weight:800;font-size:1.15rem;color:#fff;max-width:280px;text-decoration:none}
.grid{display:grid;grid-template-columns:1fr 1fr;gap:.85rem;align-content:start}
.btn{display:flex;align-items:center;justify-content:center;text-align:center;min-height:3.2rem;padding:.7rem 1rem;border-radius:12px;border:none;color:#fff;font-weight:800;font-size:1rem;text-decoration:none;cursor:pointer;box-shadow:0 2px 0 rgba(0,0,0,.25)}
.btn:active{transform:translateY(1px);opacity:.95}
.nav-bottom{position:fixed;bottom:0;left:0;right:0;display:flex;justify-content:space-between;padding:.75rem 1rem calc(.75rem + env(safe-area-inset-bottom));background:rgba(15,39,68,.95);max-width:480px;margin:0 auto}
.nav-bottom a{background:var(--accent);color:#fff;border-radius:10px;padding:.65rem 1.4rem;font-weight:800;font-size:.95rem;text-decoration:none}
.flash-card{flex:1;display:flex;align-items:center;justify-content:center;background:var(--purple);border-radius:20px;padding:1.5rem 1.25rem;margin:1rem 0 .5rem;min-height:220px;box-shadow:0 8px 24px rgba(0,0,0,.3);text-align:center;cursor:pointer;user-select:none;-webkit-user-select:none}
.flash-card .term{font-size:1.35rem;font-weight:800;line-height:1.4}
.flash-card .def{font-size:1.1rem;line-height:1.5;display:none}
.flash-card.show-def .term{display:none}
.flash-card.show-def .def{display:block}
.hint{text-align:center;color:var(--muted);font-size:.85rem}
.main-link{position:fixed;top:.75rem;left:.75rem;background:#276749;color:#fff;padding:.4rem .85rem;border-radius:8px;font-weight:700;font-size:.8rem;text-decoration:none;z-index:5}
.counter{text-align:center;color:var(--muted);font-size:.85rem;margin-bottom:.35rem}
.sub{text-align:center;color:var(--muted);font-size:.9rem;margin-bottom:1rem}
