* { box-sizing: border-box; }
body {
  margin: 0; background: #f1f5f9; font-family: system-ui, sans-serif; color: #1f2937;
  display: flex; justify-content: center; padding: 16px;
}
.pl {
  width: 100%; max-width: 400px; background: #fff; border: 1px solid #eef2f4;
  border-radius: 18px; padding: 16px 16px 20px; box-shadow: 0 8px 26px rgba(0,0,0,.06);
}
.topbar { display: flex; justify-content: space-between; align-items: center; }
.logo { font-weight: 800; font-size: 20px; letter-spacing: .5px; }
.modes { display: flex; gap: 6px; }
.mode {
  border: 1.5px solid #d8dee4; background: #fff; color: #475569; border-radius: 999px;
  padding: 6px 12px; font-size: 13px; cursor: pointer;
}
.mode.active { background: #58b4c4; border-color: #58b4c4; color: #fff; }

.goal { text-align: center; color: #6b7280; font-size: 13px; margin-top: 12px; }
.goal b { display: block; font-size: 38px; color: #1f2937; line-height: 1.15; }
.difficulty { text-align: center; margin-top: 6px; }
.difficulty span { display: inline-block; padding: 2px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.difficulty .facil { background: #dcfce7; color: #166534; }
.difficulty .mitja { background: #fef3c7; color: #92400e; }
.difficulty .dificil { background: #fee2e2; color: #991b1b; }
.disp { text-align: center; font-size: 26px; letter-spacing: 2px; margin: 12px 0 4px; min-height: 34px; }
.cursor { color: #58b4c4; }
.result { text-align: center; min-height: 24px; font-size: 18px; font-weight: 600; color: #94a3b8; }
.result.hit { color: #16a34a; }
.flash { text-align: center; min-height: 22px; font-size: 14px; font-weight: 600; }
.flash.found { color: #16a34a; }
.flash.tutti { color: #eab308; }
.flash.dup { color: #d97706; }
.flash.error { color: #dc2626; }

.hive { display: flex; flex-direction: column; align-items: center; margin: 6px 0 16px; }
.hrow { display: flex; gap: 8px; }
.hrow + .hrow { margin-top: -14px; }
.hex {
  width: 72px; height: 83px; background: #58b4c4; color: #fff; font-size: 28px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; cursor: pointer; border: none;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}
.hex.center { background: #ec5a52; }
.hex:active { filter: brightness(.92); }

.ops { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 6px 0 12px; }
.op { padding: 11px 0; border: 1.5px solid #e2e8f0; border-radius: 999px; background: #fff; color: #334155; font-size: 19px; cursor: pointer; }
.actions { display: flex; align-items: center; justify-content: center; gap: 14px; }
.pill { padding: 11px 22px; border: 1.5px solid #d8dee4; border-radius: 999px; background: #fff; color: #374151; font-size: 14px; cursor: pointer; }
.round { width: 44px; height: 44px; border: 1.5px solid #d8dee4; border-radius: 999px; background: #fff; color: #58b4c4; font-size: 18px; cursor: pointer; }
.send { border-color: #58b4c4; color: #0e7490; font-weight: 700; }

.foot { text-align: center; margin-top: 16px; }
.found { background: none; border: none; color: #374151; font-size: 14px; cursor: pointer; }
.meta { color: #6b7280; font-size: 13px; margin-top: 6px; }
.rankbtn { background: none; border: none; color: #1f2937; font-weight: 600; cursor: pointer; font-size: 13px; }
.star { color: #eab308; }
.star.done { color: #eab308; font-weight: 700; }

.panel { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: flex; align-items: center; justify-content: center; padding: 20px; }
.panel-card { background: #fff; border-radius: 14px; padding: 18px 20px; max-width: 360px; width: 100%; max-height: 70vh; overflow: auto; }
.panel-card h3 { margin: 0 0 10px; }
.panel-card ul { margin: 0; padding-left: 18px; }
.panel-card li { margin: 4px 0; }
.hidden { display: none; }
