:root {
  --bg: #0f1224;
  --panel: #1a1f3a;
  --panel-2: #232a4d;
  --text: #e8eaf6;
  --muted: #9aa0c0;
  --accent: #7c5cff;
  --accent-2: #3ecf8e;
  --line: #2c3560;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: radial-gradient(1200px 600px at 50% -10%, #1b2140, var(--bg));
  color: var(--text);
  min-height: 100vh;
}

header {
  padding: 28px 24px 8px;
  text-align: center;
}
header h1 { margin: 0; font-size: 26px; letter-spacing: 0.5px; }
header p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

.layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 20px;
  padding: 20px 24px 40px;
  max-width: 1180px;
  margin: 0 auto;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
}

h2 {
  margin: 0 0 14px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}

label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin: 12px 0 4px;
}

input, select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font-size: 14px;
}

button {
  width: 100%;
  margin-top: 18px;
  padding: 13px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #5a3fe0);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
button:hover { filter: brightness(1.08); }

.results { display: none; }
.results.visible { display: block; }

.wheel-wrap {
  display: flex;
  justify-content: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}
svg text { font-family: "Segoe UI", system-ui, sans-serif; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }
td.pos { font-variant-numeric: tabular-nums; }
.retro { color: #ff8a8a; font-weight: 600; margin-left: 6px; }

.aspect-line { display: flex; gap: 8px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.aspect-line .b { font-weight: 600; }
.aspect-line .meaning { color: var(--muted); font-size: 12px; }

.interp-block { margin: 14px 0; }
.interp-block h3 { margin: 0 0 6px; font-size: 14px; color: var(--accent-2); }
.interp-block p { margin: 0; font-size: 13.5px; line-height: 1.55; color: #cfd3ea; }

.highlight-row { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.highlight-row .n { font-weight: 600; min-width: 90px; }
.highlight-row .m { color: var(--muted); }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

.place-search { position: relative; }
.place-list {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 10;
  margin: 4px 0 0; padding: 4px 0; list-style: none;
  background: #232a4d; border: 1px solid #3a4470; border-radius: 6px;
  max-height: 260px; overflow-y: auto;
}
.place-list[hidden] { display: none; }
.place-list li { padding: 8px 12px; cursor: pointer; }
.place-list li:hover { background: #2d3662; }
.hint { font-size: 13px; color: #8a90b8; margin: 4px 0 0; }

[hidden] { display: none !important; }
.row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.ghost { background: transparent; border: 1px solid #3a4470; }
.error { color: #ff8a8a; font-size: 13px; margin: 8px 0 0; }
.auth-card { max-width: 420px; margin: 0 auto 20px; }
.account-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; margin: 0 0 20px; font-size: 14px; }
.account-bar .plan { color: #8a90b8; }
.saved-list { list-style: none; padding: 0; margin: 8px 0 0; }
.saved-list li { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid #3a4470; }
button.link { background: none; border: none; color: #8ab4ff; padding: 4px 0; cursor: pointer; text-align: left; }
button.link.danger { color: #ff8a8a; }
.editing { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-top: 10px; padding: 8px 10px; border: 1px solid #c9a86a; border-radius: 10px; font-size: 13px; color: #cfd3ea; }

.credit { text-align: center; font-size: 12px; color: #8a90b8; padding: 16px; }
.credit a { color: #8a90b8; }

.plan { color: #8a90b8; font-size: 13px; }

.wheel { max-width: 560px; margin: 0 auto; }
.wheel svg { width: 100%; height: auto; display: block; }
.downloads { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.btn { display: inline-block; padding: 10px 16px; border-radius: 10px; background: linear-gradient(135deg, #8b6cf6, #6d4de0); color: #fff; text-decoration: none; font-size: 14px; font-weight: 600; }
.btn.ghost { background: transparent; border: 1px solid #3a4470; }
.btn[hidden] { display: none; }
.report-section { margin-top: 26px; }
.report-section > h2 { color: #c9a86a; }
.report-intro { font-size: 13.5px; line-height: 1.55; color: #cfd3ea; margin: 6px 0 10px; }
.report-block { padding: 10px 0; border-bottom: 1px solid var(--line); }
.report-block h3 { margin: 0 0 6px; font-size: 14px; color: var(--accent-2); }
.report-block p { margin: 0 0 6px; font-size: 13.5px; line-height: 1.6; color: #cfd3ea; }
.btn.google { display: block; text-align: center; margin-top: 12px; background: #ffffff; color: #1f1f1f; }
