/* HOLLYHOP - uvodni stranka s menu */

/* ---------- horni lista ---------- */

.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: max(12px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 12px max(20px, env(safe-area-inset-left));
  background: rgba(18, 19, 22, .92);
  border-bottom: 2px solid var(--line);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.me {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 14px 0 16px;
  border: 2px solid var(--line);
  background: var(--panel);
  cursor: pointer;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  transition: border-color .15s;
}
.me:hover { border-color: var(--orange); }
.me .avatar { --size: 32px; border-width: 2px; }
.me-label { font-family: var(--font-head); font-weight: 700; font-size: 16px; letter-spacing: .08em; text-transform: uppercase; max-width: 34vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- uvod ---------- */

.page { width: min(100%, 1180px); margin: 0 auto; padding: 8px 20px 48px; }

.hero { padding: 36px 0 12px; }
.hero-kicker { margin: 0; color: var(--orange); font-size: 15px; letter-spacing: .2em; animation: rise .4s both; }
.hero h1 {
  margin: 2px 0 26px;
  font-size: clamp(36px, 7vw, 68px);
  line-height: 1;
  color: var(--text);
  animation: rise .45s .05s both;
}
.hero h1 .accent { color: var(--orange); }

.tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; animation: rise .45s .1s both; }

.search {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 280px;
  max-width: 420px;
  height: 48px;
  padding: 0 12px 0 14px;
  border: 2px solid var(--line);
  background: var(--well);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  transition: border-color .15s;
}
.search:focus-within { border-color: var(--orange); }
.search label { color: var(--muted); font-size: 13px; letter-spacing: .14em; }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 16px; }
.search input::placeholder { color: #5f636b; }
.search kbd { font-family: var(--font-head); font-weight: 700; font-size: 13px; color: var(--muted); border: 1px solid var(--line); padding: 0 7px; }

/* prepinace sekci jako rada tlacitek na panelu */
.switches {
  display: flex;
  border: 2px solid var(--line);
  background: var(--well);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 100%;
}
.switches::-webkit-scrollbar { display: none; }
.switches button {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-left: 2px solid var(--line);
  background: none;
  color: var(--muted);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.switches button:first-child { border-left: 0; }
.switches button:hover { color: var(--text); }
.switches button[aria-pressed="true"], .switches button[aria-selected="true"] { background: var(--orange); color: #1a1206; }

/* ---------- dlazdice ---------- */

.section-title {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 26px 0 0;
  font-family: var(--font-stencil);
  font-weight: 400;
  font-size: 26px;
  color: var(--orange);
  text-transform: uppercase;
  animation: rise .35s both;
  animation-delay: var(--d, 0s);
}
.section-title::after { content: ""; flex: 1; height: 2px; background: var(--line); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: var(--gap); margin-top: 6px; }

.tile {
  --bd: var(--line);
  --fill: var(--panel);
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto 1fr;
  gap: 4px 14px;
  min-height: 136px;
  padding: 16px 18px 18px;
  text-decoration: none;
  animation: tile-in .4s ease both;
  animation-delay: var(--d, 0s);
  transition: transform .15s ease;
}
.tile:hover, .tile:focus-visible { --bd: var(--orange); transform: translateY(-2px); outline: none; }
.tile:active { transform: translateY(1px); }
@keyframes tile-in { from { opacity: 0; transform: translateY(14px); } }

.tile-strip {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.tile-strip .code { color: var(--steel); }
.tile-strip .tag { margin-left: auto; padding: 1px 8px; background: var(--orange); color: #1a1206; font-weight: 700; }
.tile-strip .tag.lock { background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); }

.tile-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  font-size: 26px;
  background: var(--well);
  border: 2px solid var(--line);
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
  transition: border-color .15s;
}
.tile:hover .tile-icon { border-color: var(--orange); }
.tile h3 { margin: 0; font-family: var(--font-head); font-weight: 700; font-size: 22px; line-height: 1.1; letter-spacing: .03em; text-transform: uppercase; color: var(--text); }
.tile p { margin: 4px 0 0; color: var(--muted); font-size: 15px; line-height: 1.4; }

/* LED: po nacteni postupne naskoci oranzove, pri najeti zelena - "START" */
.tile .led { --c: #2b2e33; }
.tile.booted .led { --c: var(--orange); box-shadow: 0 0 8px var(--orange); }
.tile:hover .led, .tile:focus-visible .led { --c: var(--green); box-shadow: 0 0 10px var(--green); }
.tile.locked .led { --c: var(--red-deep); box-shadow: none; }
.tile.locked .tile-icon { filter: grayscale(1); opacity: .6; }

.empty { text-align: center; color: var(--muted); padding: 40px 0; letter-spacing: .14em; }

.foot { width: min(100%, 1180px); margin: 0 auto; padding: 16px 20px 32px; color: #5f636b; font-size: 13px; letter-spacing: .14em; border-top: 2px solid var(--line); }

/* ---------- panel prihlaseni / profilu ---------- */

.drawer-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(6, 6, 8, .7); animation: fade .15s; }
.drawer {
  --fill: var(--panel);
  --cut: 18px;
  position: fixed;
  z-index: 41;
  top: 12px;
  right: 12px;
  bottom: 12px;
  width: min(400px, calc(100% - 24px));
  padding: 20px 22px 24px;
  overflow-y: auto;
  animation: slide-in .28s cubic-bezier(.2,.9,.3,1);
}
.drawer[hidden], .drawer-backdrop[hidden], #auth[hidden], #profile[hidden] { display: none; }
.drawer.closing { animation: slide-out .2s ease forwards; }
@keyframes slide-in { from { transform: translateX(calc(100% + 24px)); } }
@keyframes slide-out { to { transform: translateX(calc(100% + 24px)); } }

.drawer-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 2px solid var(--line); }
.drawer-top h2 { margin: 0; font-size: 28px; color: var(--orange); }

.tabs { margin-bottom: 18px; }
.tabs button { flex: 1; }
.pane[hidden] { display: none; }
.pane { animation: rise .25s ease; }

.pick { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.pick-avatar { --size: 84px; cursor: pointer; border-style: dashed; }
.pick-avatar.has { border-style: solid; }
.pick-avatar:hover { filter: brightness(1.08); }
.pick-title { margin: 0; font-size: 18px; }
.muted { color: var(--muted); margin: 2px 0 0; font-size: 14px; }
.link { border: 0; background: none; padding: 0; margin-top: 4px; color: var(--orange); font-family: var(--font-head); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }

.pf-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.pf-avatar { --size: 96px; cursor: pointer; }
.pf-avatar:hover { filter: brightness(1.08); }
.pf-name { margin: 0; font-size: 24px; }
.pf-photo { display: flex; gap: 10px; margin-bottom: 20px; }
.pf-photo .btn { flex: 1; font-size: 15px; min-height: 42px; }
.pf-pass { margin: 2px 0 16px; }
.pf-pass summary { cursor: pointer; color: var(--orange); font-size: 15px; letter-spacing: .1em; padding: 4px 0 12px; }
.logout { margin-top: 22px; }

@media (max-width: 560px) {
  .bar { padding-left: 14px; padding-right: 14px; }
  .brand img.word { display: none; }
  .brand img.box { width: 40px; height: 40px; }
  .page { padding: 4px 16px 40px; }
  .hero { padding-top: 22px; }
  .tools { flex-direction: column; }
  .search { max-width: none; flex: none; }
  .tile { min-height: 0; padding: 12px 14px 14px; }
  .tile-icon { width: 46px; height: 46px; font-size: 22px; }
  .tile h3 { font-size: 20px; }
  .tile p { font-size: 14px; }
  .drawer { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 90dvh; animation-name: sheet-in; }
  .drawer.closing { animation-name: sheet-out; }
}
@keyframes sheet-in { from { transform: translateY(105%); } }
@keyframes sheet-out { to { transform: translateY(105%); } }
