:root {
  --bg: #0f1117;
  --card: #1a1d2e;
  --accent: #f5c842;
  --accent2: #4ecdc4;
  --text: #e8e8f0;
  --muted: #7a7a9a;
  --border: #2a2d45;
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: system-ui, sans-serif; }
.app-header { display: flex; justify-content: space-between; align-items: center; padding: 16px; border-bottom: 1px solid var(--border); }
.logo { font-size: 1rem; font-weight: 700; color: var(--accent); }
.lang-btn { background: var(--card); border: 1px solid var(--border); padding: 4px 12px; border-radius: 20px; cursor: pointer; font-size: 0.8rem; color: var(--text); }
.screen { display: none; padding: 20px; }
.screen.active { display: block; }
.greeting { margin-bottom: 24px; }
.greeting h2 { font-size: 1.4rem; font-weight: 900; }
.greeting p { color: var(--muted); font-size: 0.85rem; margin-top: 4px; }
.tools-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tool-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 16px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; transition: border-color 0.2s; }
.tool-card:hover { border-color: var(--accent); }
.tool-icon { font-size: 2rem; }
.tool-name { font-size: 0.8rem; font-weight: 700; text-align: center; }
.back-btn { background: var(--card); border: 1px solid var(--border); padding: 6px 14px; border-radius: 8px; cursor: pointer; margin-bottom: 16px; font-size: 0.8rem; color: var(--muted); display: inline-block; }
.screen h2 { font-size: 1.2rem; margin-bottom: 8px; }
.muted { color: var(--muted); font-size: 0.85rem; }

.app-ver {
  font-size: 0.6rem;
  color: var(--muted);
  font-weight: 400;
  vertical-align: middle;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.help-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: system-ui, sans-serif;
}
.help-btn:hover { border-color: var(--accent); color: var(--accent); }

.screen-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.screen-topbar .back-btn {
  margin-bottom: 0;
}

.header-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  vertical-align: middle;
  margin-right: 4px;
}

.app-footer {
  text-align: center;
  padding: 16px;
  font-size: 0.72rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  margin-top: 20px;
}
.app-footer a {
  color: var(--accent);
  text-decoration: none;
}
.app-footer a:hover { text-decoration: underline; }

#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body {
  display: flex;
  flex-direction: column;
}

#app {
  display: flex;
  flex-direction: column;
}

/* ── DESKTOP LAYOUT ── */
@media (min-width: 768px) {
  body {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #080a10;
  }

  nav, .app-header {
    width: 640px;
  }

  #app {
    width: 640px;
    min-height: 100vh;
    background: var(--bg);
    box-shadow: 0 0 60px rgba(0,0,0,0.6);
    position: relative;
  }

  footer {
    width: 640px;
  }
}