@font-face { font-family: Rubik; src: url(/minesweeper/assets/Rubik-ExtraBold.ttf); font-weight: 800; font-display: swap; }
@font-face { font-family: Rubik; src: url(/minesweeper/assets/Rubik-Bold.ttf); font-weight: 700; font-display: swap; }
@font-face { font-family: Rubik; src: url(/minesweeper/assets/Rubik-Medium.ttf); font-weight: 500; font-display: swap; }
:root { --cobalt: #3d68e8; --deep: #1c349e; --gold: #ffd666; --ink: #1d2433; --soft: #6b7080; --cream: #f7f4ed; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Rubik, system-ui, -apple-system, "Segoe UI", sans-serif; font-weight: 500; color: var(--ink); background: var(--cream); }
a { color: var(--cobalt); }
header.top { background: linear-gradient(160deg, #4670f0, var(--deep)); color: #fff; text-align: center; padding: 22px 16px 26px; }
header.top a.brand { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
header.top a.brand img { width: 34px; height: 34px; border-radius: 9px; }
h1 { font-size: clamp(26px, 5vw, 40px); margin: 14px 0 4px; letter-spacing: -.02em; font-weight: 800; }
.sub { margin: 0; font-size: clamp(16px, 2.6vw, 19px); opacity: .92; }
.sub b { color: var(--gold); }
main { max-width: 820px; margin: 0 auto; padding: 16px 8px 8px; }
.bar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; margin-bottom: 12px; }
.pill { background: #fff; border-radius: 999px; padding: 8px 14px; box-shadow: 0 2px 8px rgba(29, 36, 51, .08); font-weight: 700; font-variant-numeric: tabular-nums; display: inline-flex; gap: 6px; align-items: center; }
.seg { background: #fff; border-radius: 999px; padding: 4px; display: inline-flex; box-shadow: 0 2px 8px rgba(29, 36, 51, .08); }
.seg button, .btn { font: inherit; font-weight: 700; border: 0; background: transparent; color: var(--soft); padding: 8px 14px; border-radius: 999px; cursor: pointer; }
.seg button.on { background: var(--cobalt); color: #fff; }
.btn { background: var(--cobalt); color: #fff; }
.wrap { position: relative; display: flex; justify-content: center; }
#board { display: grid; gap: 0; background: #dfd7c6; padding: calc(var(--s) * .22); border-radius: calc(var(--s) * .42); touch-action: manipulation; user-select: none; -webkit-user-select: none; direction: ltr; }
.c { width: calc(var(--s) * .94); height: calc(var(--s) * .94); display: grid; place-items: center; font-weight: 800; font-size: calc(var(--s) * .6); line-height: 1; cursor: pointer;
  background: #4570ec; border-radius: calc(var(--s) * .22); margin: calc(var(--s) * .03);
  box-shadow: inset 0 calc(var(--s) * -.09) 0 #2b4fc0, inset 0 calc(var(--s) * .1) 0 -2px rgba(102, 144, 246, .7); }
.c svg { width: 72%; height: 72%; }
.c.f { cursor: default; }
.c.o { background: #fcfaf5; border-radius: 0; margin: 0; width: var(--s); height: var(--s); box-shadow: none; cursor: default; animation: pop .18s ease-out both; }
.c.o.b { background: #f3eee3; }
.c.boom { background: #ff5436 !important; }
.c.mine { background: #f3eee3; }
.c.wrong { background: #ffd2c9; }
.n1 { color: #2e62f0; } .n2 { color: #17955f; } .n3 { color: #e5484d; } .n4 { color: #6b4fd8; }
.n5 { color: #c2410c; } .n6 { color: #0e8c9a; } .n7 { color: #1d2433; } .n8 { color: #7c8293; }
@keyframes pop { from { transform: scale(.6); opacity: .2; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .c.o { animation: none; } }
#result { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(247, 244, 237, .55); backdrop-filter: blur(2px); }
#result[hidden] { display: none; }
.card { background: #fff; border-radius: 22px; padding: 22px 22px 18px; max-width: 340px; text-align: center; box-shadow: 0 18px 44px rgba(16, 27, 74, .22); }
.card h2 { margin: 0 0 6px; font-size: 26px; font-weight: 800; }
.card p { margin: 6px 0; color: var(--soft); }
.card .app { margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(29, 36, 51, .08); }
.card .app b { color: var(--ink); }
.stores { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.stores a { background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 12px; font-weight: 700; text-decoration: none; font-size: 15px; }
.hint { text-align: center; color: var(--soft); font-size: 14px; margin: 10px 0 0; }
.promo { max-width: 760px; margin: 26px auto 0; background: linear-gradient(160deg, #4670f0, var(--deep)); color: #fff; border-radius: 22px; padding: 22px; display: flex; gap: 18px; align-items: center; }
.promo img { width: 84px; height: 84px; border-radius: 20px; flex: none; }
.promo h2 { margin: 0 0 4px; font-size: 22px; }
.promo p { margin: 0; opacity: .92; }
.promo .stores a { background: #fff; color: var(--deep); }
article { max-width: 760px; margin: 0 auto; padding: 10px 18px 30px; line-height: 1.65; font-size: 17px; }
article h2 { font-size: 22px; margin: 28px 0 6px; }
footer { text-align: center; padding: 26px 16px 34px; color: var(--soft); font-size: 14px; }
footer a { color: inherit; }
.langs { margin-top: 10px; line-height: 2; }
.langs a { margin: 0 6px; }
@media (max-width: 560px) { .promo { flex-direction: column; text-align: center; } }
