/* The front page: the picture of an arena with the bar and the invitation on it, the rooms, the
   maps; the new room's window and the map deletion's. */

.page { max-width: 1440px; margin: 0 auto; padding-bottom: 72px; }

/* ---------- the picture on top ---------- */
.hero { position: relative; margin: 20px 20px 0; height: clamp(520px, 66vh, 600px); border-radius: 32px; overflow: hidden; background: #c9d2df; }
.hero-pic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-fade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 255, 255, 0) 40%, rgba(240, 243, 248, .55) 100%); }
.hero-bar { position: absolute; top: 20px; left: 20px; right: 20px; }
.hero-card {
  position: absolute;
  left: 28px;
  bottom: 28px;
  width: min(680px, calc(100% - 56px));
  padding: 34px 36px 32px;
  border-radius: 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.hero-card h1 { font-size: 50px; text-wrap: balance; }
.hero-card p { margin: 0; max-width: 520px; font-size: 17px; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.hero-acts { display: flex; align-items: center; gap: 18px; margin-top: 4px; }
.hero-acts > span { font-size: 15px; color: var(--ink-2); }
.narrow-only { display: none; }

/* ---------- sections ---------- */
.sect { padding: 56px 40px 0; display: flex; flex-direction: column; gap: 18px; scroll-margin-top: 16px; }
.sect-head { display: flex; align-items: center; gap: 14px; min-height: 46px; }
.sect-head .h2 { flex: none; }
.sect-head .count { font: 13px/1 var(--f-mono); color: oklch(0.5 0.015 265); white-space: nowrap; padding-top: 6px; }
.sect-head .grow { flex: 1; }
.sect-head > .seg { margin-left: 8px; flex: none; }
.sect-head > .seg button { height: 34px; padding: 0 14px; }
.new-map { height: 42px; padding: 0 18px; font-size: 14px; }
.code { display: flex; gap: 6px; }
.code .field { width: 168px; height: 42px; text-transform: uppercase; letter-spacing: .14em; padding: 0 16px; }
.code .field::placeholder { text-transform: none; letter-spacing: 0; font-family: var(--f-text); font-size: 14px; }
.code .btn { width: 42px; height: 42px; }

/* ---------- rooms ---------- */
.rooms { display: flex; flex-direction: column; gap: 10px; }
.room { display: flex; align-items: center; gap: 20px; padding: 10px 12px 10px 10px; border-radius: 22px; background: var(--card); border: 1px solid var(--card-edge); box-shadow: var(--shadow-1); }
.room .thumb { width: 104px; height: 64px; border-radius: 14px; flex: none; background: #c9d2df center / cover no-repeat; }
.room .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.room .title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.room .title b { font-weight: 700; font-size: 17px; line-height: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.room .title .tag { flex: none; }
.room .what { font-size: 14px; line-height: 1.35; color: oklch(0.48 0.02 265); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room .chip { flex: none; width: 136px; }
.room .count { flex: none; width: 126px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.room .count b { font: 600 13px/1 var(--f-mono); }
.room .go { flex: none; width: 118px; height: 44px; }
.room .row2 { display: contents; }
.room .what-off { display: none; }
.rooms .empty { display: flex; align-items: center; gap: 16px; padding: 20px 22px; border-radius: 22px; border: 1.5px dashed var(--line); color: var(--ink-3); font-size: 15px; }
.rooms .empty .grow { flex: 1; }

/* ---------- maps ---------- */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.map { position: relative; height: 380px; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow-2); background: #c9d2df; isolation: isolate; }
.map > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.map:hover > img { transform: scale(1.03); }
.map .chip { position: absolute; left: 14px; top: 14px; }
.map .panel {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  padding: 18px 18px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .7);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, .9);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.map .head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.map h3 { font: 700 21px/1.2 var(--f-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.map .head .tag { flex: none; }
.map p { margin: 0; font-size: 14px; line-height: 1.4; color: oklch(0.42 0.02 265); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.map .acts { margin-top: 6px; display: flex; flex-direction: column; gap: 6px; }
.map .acts .btn { height: 44px; }
.map .acts .play { box-shadow: inset 0 0 0 1px rgba(30, 36, 60, .1); }
.map .own { display: flex; gap: 6px; }
.map .own .btn:first-child { flex: 1; }
.map .own .drop { width: 44px; padding: 0; color: oklch(0.55 0.2 25); }
.map .own .drop:hover { background: var(--danger-soft); }
.grid .empty { grid-column: 1 / -1; padding: 28px; border-radius: 26px; border: 1.5px dashed var(--line); color: var(--ink-3); text-align: center; }

/* ---------- the new room ---------- */
.create { display: flex; flex-direction: column; min-height: 0; max-height: calc(100vh - 34px); }
#create { width: min(1080px, calc(100vw - 32px)); }
.create .cols { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 30px; }
.col-map { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.col-set { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.picks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-height: 454px; overflow-y: auto; padding: 4px; margin: -4px; scrollbar-width: thin; }
.picks button {
  position: relative;
  height: 122px;
  padding: 0;
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  background: #c9d2df;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 6px 16px rgba(30, 36, 60, .1);
  transition: box-shadow .15s, transform .15s;
}
.picks i.shot { position: absolute; inset: 0; background: #c9d2df center / cover no-repeat; }
.picks button::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(10, 12, 20, .6)); }
.picks button span { position: absolute; z-index: 1; left: 12px; right: 12px; bottom: 10px; color: #fff; font: 700 14px/1.2 var(--f-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picks button .ok { position: absolute; z-index: 1; right: 10px; top: 10px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: none; place-items: center; }
.picks button.on { box-shadow: inset 0 0 0 3px var(--accent), 0 0 0 1px var(--accent-edge), 0 8px 24px oklch(0.85 0.21 128 / .45); }
.picks button.on .ok { display: grid; }
.picks button:hover:not(.on) { transform: translateY(-2px); }
.picks .none { grid-column: 1 / -1; padding: 24px 12px; text-align: center; color: var(--ink-3); font-size: 14px; border-radius: 18px; border: 1.5px dashed var(--line); }
.col-set .about { display: flex; gap: 6px; padding: 12px 14px; border-radius: 14px; background: rgba(30, 36, 60, .045); font-size: 13px; line-height: 1.45; color: oklch(0.36 0.02 265); min-height: 64px; }
.col-set .about b { font-weight: 700; color: var(--ink); }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
/* the labels over a row's fields stand level, whatever is beside them (a switch, a number) */
.col-set .stack > .kicker, .col-set .label { min-height: 20px; display: flex; align-items: center; }
.pair.wide-left { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.pair .seg button { padding: 0 8px; }
.lock-switch { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; line-height: 1; color: var(--ink-2); cursor: pointer; }
.num { font: 700 16px/1 var(--f-display); }
.bots-ctl { height: 46px; display: flex; align-items: center; }
.bots-ctl .step { display: none; }
.opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.note.small { font-size: 12px; color: var(--muted); }
.create .mfoot .bad-note { flex: none; max-width: 340px; }
.create .mfoot .bad-note:not(:empty) + .cancel { margin-left: 0; }
.create .mfoot .bad-note:not(:empty) ~ * { flex: none; }

/* ---------- deleting a map ---------- */
#drop { overflow: hidden; }
.drop-pic { position: relative; height: 190px; background: oklch(0.62 0.07 140) center / cover no-repeat; }
.drop-pic .chip { position: absolute; left: 14px; top: 14px; height: 28px; }
.drop-in { padding: 24px 26px 26px; display: flex; flex-direction: column; gap: 8px; }
.drop-in h3 { font: 800 24px/1.2 var(--f-display); }
.drop-in .what { margin: 0; font-size: 16px; font-weight: 600; color: var(--ink-2); overflow-wrap: anywhere; }
.drop-in .acts { display: flex; gap: 8px; margin-top: 16px; }
.drop-in .acts .btn { flex: 1; height: 48px; }

/* ---------- smaller screens ---------- */
@media (max-width: 1180px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .create .cols { grid-template-columns: 320px minmax(0, 1fr); }
  .picks button { height: 100px; }
  .room .count { width: auto; }
}
@media (max-width: 1000px) {
  .create .cols { grid-template-columns: minmax(0, 1fr); }
  .picks { grid-template-columns: repeat(3, minmax(0, 1fr)); max-height: 260px; }
  .room { flex-wrap: wrap; gap: 12px 16px; }
  .room .info { flex: 1 1 calc(100% - 140px); }
  .room .row2 { display: flex; align-items: center; gap: 12px; flex: 1 1 100%; padding-left: 2px; }
  .room .row2 .grow { flex: 1; }
  .room .chip, .room .count { width: auto; }
}
@media (max-width: 900px) {
  .hero-bar { top: 10px; left: 10px; right: 10px; }
  .sect { padding: 44px 24px 0; }
  .hero-card h1 { font-size: 40px; }
}
@media (max-width: 640px) {
  .page { padding-bottom: 40px; }
  .hero { margin: 10px 10px 0; height: 560px; border-radius: 36px; }
  .hero-pic { object-position: 60% 50%; }
  .hero-fade { background: linear-gradient(180deg, rgba(255, 255, 255, 0) 35%, rgba(240, 243, 248, .6) 100%); }
  .hero-card { left: 10px; right: 10px; bottom: 10px; width: auto; padding: 22px 20px 20px; border-radius: 26px; gap: 12px; background: rgba(255, 255, 255, .72); }
  .hero-card .kicker { font-size: 10.5px; color: var(--ink-3); }
  .hero-card h1 { font-size: 30px; line-height: 1.06; }
  .hero-card p { font-size: 14.5px; }
  .hero-acts .btn { width: 100%; height: 52px; font-size: 16px; }
  .wide-only { display: none; }
  .narrow-only { display: inline; }
  .sect { padding: 32px 20px 0; gap: 12px; }
  #maps { padding-top: 36px; }
  .sect .h2 { font-size: 22px; }
  .sect-head { min-height: 40px; gap: 10px; flex-wrap: wrap; }
  .sect-head .count { font-size: 12px; padding-top: 3px; }
  #maps .sect-head > .seg { order: 5; flex: 1 1 100%; margin: 0 -20px; padding: 4px; border-radius: 999px; overflow-x: auto; scrollbar-width: none; width: calc(100% + 40px); max-width: none; background: transparent; }
  #maps .sect-head > .seg::-webkit-scrollbar { display: none; }
  .new-map { height: 40px; padding: 0 14px; font-size: 13px; }
  .code .field { width: 128px; height: 40px; font-size: 13px; padding: 0 14px; }
  .code .btn { width: 40px; height: 40px; }
  .room { padding: 10px; gap: 12px; border-radius: 22px; background: rgba(255, 255, 255, .75); }
  .room .thumb { width: 76px; height: 56px; border-radius: 13px; }
  .room .info { gap: 4px; flex-basis: calc(100% - 88px); }
  .room .title b { font-size: 15px; }
  .room .title .tag.off { display: none; }
  .room .what-off { display: inline; }
  .room .what { white-space: normal; font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .room .row2 { gap: 10px; padding: 0; }
  .room .chip { height: 30px; padding: 0 11px; font-size: 12px; gap: 7px; }
  .room .chip i { box-shadow: none; }
  .room .count .seats { display: none; }
  .room .count b { font-size: 12.5px; }
  .room .go { width: auto; height: 40px; padding: 0 20px; font-size: 14px; }
  .grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .map { height: 350px; border-radius: 24px; }
  .map .chip { left: 12px; top: 12px; height: 28px; padding: 0 11px; }
  .map .panel { left: 8px; right: 8px; bottom: 8px; padding: 16px 16px 14px; border-radius: 18px; gap: 6px; background: rgba(255, 255, 255, .74); }
  .map h3 { font-size: 18px; white-space: normal; }
  .map .head .tag { font-size: 11.5px; }
  .map p { font-size: 13px; }
  .map .acts .btn { font-size: 14px; }

  /* the new room as a sheet from below */
  #create { width: 100vw; }
  .create { max-height: calc(100vh - 54px); }
  .create .cols { gap: 18px; }
  .col-map .label .seg { display: none; }
  .picks { display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; max-height: none; margin: 0 -20px; padding: 4px 20px; scrollbar-width: none; }
  .picks::-webkit-scrollbar { display: none; }
  .picks button { flex: none; width: 112px; height: auto; overflow: visible; background: none; box-shadow: none; display: flex; flex-direction: column; gap: 6px; }
  .picks button::after { display: none; }
  .picks i.shot { position: static; display: block; width: 112px; height: 72px; border-radius: 14px; flex: none; transition: box-shadow .15s; }
  .picks button span { position: static; color: var(--ink); font: 600 12.5px/1.2 var(--f-text); text-align: center; }
  .picks button .ok { display: none !important; }
  .picks button.on { box-shadow: none; }
  .picks button.on i.shot { box-shadow: 0 0 0 3px var(--accent), 0 6px 16px oklch(0.85 0.21 128 / .45); }
  .picks button:hover:not(.on) { transform: none; }
  #c-map-about { display: none; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .tiles button { height: 40px; border-radius: 13px; font-size: 13.5px; }
  .col-set .about { display: none; }
  .pair, .pair.wide-left { grid-template-columns: minmax(0, 1fr); }
  .bots-ctl .range { display: none; }
  .bots-ctl .step { display: inline-flex; }
  .bots-ctl { height: auto; }
  #c-bots-v { display: none; }
  .opts { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .opt { height: auto; min-height: 52px; padding: 8px 0; border-radius: 0; background: none; box-shadow: none; border-top: 1px solid rgba(30, 36, 60, .07); }
  .opt b { font-size: 15px; font-weight: 600; }
  .opt .switch { width: 48px; height: 30px; }
  .opt .switch::before { width: 24px; height: 24px; }
  .note.small { display: none; }
  .create .mfoot .cancel { display: none; }
  .create .mfoot .bad-note { max-width: none; justify-content: center; }
  .drop-in { padding: 22px 20px calc(22px + env(safe-area-inset-bottom)); }
}
