/* The board-game look from ciena-explorer, in surf colours: sticker cards with ink
   outlines over a sunny sky, floating round the diorama. Colours are explicit; the map
   is a daylight scene in either OS theme. */
:root {
  --ink: #1d2a44;
  --paper: #fffaf0;
  --sky-1: #8fd8f0;
  --sky-2: #fff1d6;
  --muted: #5b6b80;
  --coral: #ff6b4a;
  --teal: #2bb3b1;
  --pink: #ff4f8b;
  --sun: #ffb238;
  --display: 'Lilita One', 'Arial Rounded MT Bold', 'Trebuchet MS', system-ui, sans-serif;
  --body: 'Nunito', ui-rounded, 'Segoe UI', system-ui, sans-serif;
  --line: 2.5px solid var(--ink);
  --rule: 2px solid var(--ink);
  --lift: 0 4px 0 var(--ink);
  --lift-s: 0 2px 0 var(--ink);
  --radius: 16px;
  color-scheme: light;
}

[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: radial-gradient(ellipse at 50% 35%, var(--sky-2), var(--sky-1) 75%);
  color: var(--ink);
  font: 500 14px/1.4 var(--body);
  overflow: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }

#app { position: relative; height: 100%; overflow: hidden; }
#view { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#view.hovering { cursor: pointer; }
.labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

/* ------------------------------------------------ labels on the map */
.lbl { position: absolute; left: 0; top: 0; white-space: nowrap; will-change: transform; }
.lbl.area {
  font: 400 17px/1 var(--display);
  letter-spacing: 0.03em;
  color: var(--paper);
  -webkit-text-stroke: 4px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 3px 0 var(--ink);
}
.lbl.area.big { font-size: 24px; }
.lbl.area.small { font-size: 12.5px; -webkit-text-stroke: 3px var(--ink); text-shadow: 0 2px 0 var(--ink); }
.lbl.area.sea { color: #c8f3f5; font-size: 22px; letter-spacing: 0.3em; }
.lbl.tag {
  font: 800 11px/1 var(--body);
  background: var(--paper);
  border: var(--rule);
  border-left: 7px solid var(--c);
  border-radius: 6px;
  padding: 3px 6px;
  box-shadow: var(--lift-s);
}
.lbl.tag.act { pointer-events: auto; cursor: pointer; }
.lbl.tag.act:hover { transform-origin: center; filter: brightness(1.06); box-shadow: 0 3px 0 var(--ink); }
.lbl.tip {
  display: grid; gap: 1px;
  background: var(--paper); border: var(--line); border-radius: 10px;
  padding: 6px 10px; box-shadow: var(--lift);
  border-top: 6px solid var(--c);
}
.lbl.tip b { font: 400 15px/1.1 var(--display); letter-spacing: 0.01em; }
.lbl.tip span { font-size: 12px; color: var(--muted); font-weight: 800; }

/* ------------------------------------------------ HUD pieces */
.title, .panel, .card {
  position: absolute;
  background: var(--paper);
  border: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--lift);
}
.title {
  top: calc(16px + env(safe-area-inset-top, 0px)); left: 16px;
  padding: 8px 16px 10px;
  transform: rotate(-1.5deg);
}
.title h1 {
  margin: 0;
  font: 400 32px/1 var(--display);
  letter-spacing: 0.02em;
  color: var(--coral);
  -webkit-text-stroke: 1.5px var(--ink);
  paint-order: stroke fill;
}
.title p { margin: 3px 0 0; font-weight: 800; font-size: 13px; color: var(--muted); }

.panel {
  top: calc(96px + env(safe-area-inset-top, 0px)); left: 16px;
  width: 280px;
  padding: 12px;
  display: grid; gap: 10px;
  max-height: calc(100% - 150px);
  overflow: auto;
}
.panel h2 { margin: 0 2px; font: 400 13px/1 var(--display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.search {
  display: flex; align-items: center; gap: 8px;
  border: var(--rule); border-radius: 12px; background: #fff; padding: 0 10px;
  box-shadow: inset 0 2px 0 rgb(29 42 68 / 0.08);
}
.search svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: none; padding: 9px 0;
  font: 700 14px/1.2 var(--body); color: var(--ink);
}
.search input::placeholder { color: var(--muted); font-weight: 600; }
.search:focus-within { outline: 3px solid var(--pink); outline-offset: 1px; }
.search kbd { font: 800 11px/1 var(--body); color: var(--muted); border: 1.5px solid #c9cfd8; border-radius: 5px; padding: 2px 6px; }
.search:focus-within kbd { display: none; }
.row .sub mark { background: #ffe066; color: inherit; border-radius: 3px; padding: 0 1px; }
.panel-foot { margin: 8px 2px 0; font-size: 11px; font-weight: 700; color: var(--muted); }
.panel-foot a { color: inherit; }
.panel.collapsed > .panel-foot { display: none; }
.rows-empty { padding: 10px 4px; font-weight: 700; color: var(--muted); }
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); border: var(--rule); border-radius: 12px; overflow: hidden; }
.tabs button { padding: 7px 4px; border: 0; background: var(--paper); text-align: center; }
.tabs button + button { border-left: var(--rule); }
.tabs b { font: 400 16px/1.1 var(--display); letter-spacing: 0.02em; }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.tabs.dim button[aria-selected="true"] { background: var(--paper); color: var(--ink); }

.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.row {
  width: 100%;
  display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 10px;
  text-align: left; padding: 7px 10px 7px 7px;
  background: var(--paper); border: var(--rule); border-radius: 12px;
  box-shadow: 0 3px 0 var(--ink);
  transition: transform .12s;
}
.row:hover, .row.on { transform: translateY(-2px) rotate(-.6deg); background: #fff3dc; }
.row:active { transform: translateY(2px); box-shadow: var(--lift-s); }
.row .ico {
  width: 38px; height: 38px; border-radius: 50%;
  border: var(--rule); background: var(--c) center / cover no-repeat;
  display: grid; place-items: center; overflow: hidden;
  font: 400 15px/1 var(--display); color: var(--paper);
  -webkit-text-stroke: 1px var(--ink); paint-order: stroke fill;
}
.row .ico img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.row b { display: block; font: 400 15px/1.15 var(--display); letter-spacing: 0.01em; }
.row span.sub { display: block; font-size: 11.5px; font-weight: 800; color: var(--muted); }
.row .star { color: #e0a800; }
.row.activity { border-left: 8px solid var(--c); }
.rows-h { margin: 6px 2px 0; font: 400 13px/1 var(--display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.card-links .also-h { flex-basis: 100%; margin: 6px 0 0; font-weight: 800; font-size: 12.5px; color: var(--muted); }

.panel-toggle { display: none; }

/* ------------------------------------------------ the sticker card */
.card {
  right: 16px; top: calc(16px + env(safe-area-inset-top, 0px));
  width: min(340px, calc(100% - 32px));
  padding: 14px 16px 14px;
  transform: rotate(1deg);
  max-height: calc(100% - 100px);
  overflow: auto;
  border-top: 10px solid var(--c, var(--ink));
  animation: pop .22s cubic-bezier(.3,1.6,.5,1);
}
@keyframes pop { from { transform: scale(.85) rotate(-4deg); opacity: 0; } }
.x {
  position: absolute; right: 8px; top: 6px;
  border: 0; background: none; font-size: 26px; line-height: 1; padding: 2px 6px;
}
.card-head { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; padding-right: 22px; }
.card-logo {
  width: 64px; height: 64px; object-fit: contain; border-radius: 50%;
  border: var(--rule); background: #fff; box-shadow: var(--lift-s); padding: 4px;
}
.card-k {
  display: inline-block;
  font: 400 11px/1 var(--display); letter-spacing: 0.12em; text-transform: uppercase;
  padding: 4px 8px 3px; border-radius: 6px; border: var(--rule);
  background: var(--c, var(--sun)); color: var(--ink);
}
.card-t { margin: 6px 0 0; font: 400 24px/1.05 var(--display); letter-spacing: 0.01em; }
.card-tagline { margin: 3px 0 0; font-weight: 800; color: var(--muted); font-size: 13px; }
.card-tagline:empty { display: none; }
.card-blurb { margin: 10px 0 8px; font-size: 14px; line-height: 1.5; }
.card-facts { margin: 0 0 8px; padding: 0; list-style: none; display: grid; gap: 4px; }
.card-facts:empty { display: none; }
.card-facts li { font-weight: 700; font-size: 13px; padding-left: 20px; position: relative; }
.card-facts li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--sun)); border: 2px solid var(--ink); }
.card-note { margin: 0 0 8px; padding: 6px 9px; border: 2px dashed var(--coral); border-radius: 10px; font-weight: 800; font-size: 12.5px; }
.card-note:empty, .card-book:empty { display: none; }
.card-book { margin: 0 0 8px; font-weight: 800; font-size: 13px; }
.card-links { display: flex; gap: 7px; flex-wrap: wrap; }
.card-links a {
  display: inline-flex; align-items: center; gap: 6px;
  font: 400 13px/1 var(--display); letter-spacing: 0.02em;
  text-decoration: none; color: var(--ink);
  padding: 7px 10px; border-radius: 10px; border: var(--rule);
  background: var(--paper); box-shadow: var(--lift-s);
}
.card-links a:active { transform: translateY(2px); box-shadow: none; }
.card-links a svg { width: 16px; height: 16px; }
.card-links a.web { background: #c8f3f5; }
.card-links a.ig { background: #ffd6e7; }
.card-links a.wa { background: #c9f7d4; }
.card-links a.map { background: #fff1c2; }
.card-links a.mail { background: #e6e0ff; }

/* ------------------------------------------------ zoom + hint */
.zoom { position: absolute; right: 16px; bottom: 54px; display: grid; gap: 6px; }
.zoom button {
  width: 40px; height: 40px; border-radius: 12px; border: var(--line);
  background: var(--paper); font: 400 20px/1 var(--display); box-shadow: var(--lift-s);
}
.hint {
  position: absolute; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  margin: 0; padding: 5px 12px; border-radius: 999px;
  background: rgb(29 42 68 / 0.82); color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap;
}

/* ------------------------------------------------ phones: the panel is a bottom sheet */
@media (max-width: 760px) {
  .title { left: 10px; top: calc(10px + env(safe-area-inset-top, 0px)); padding: 6px 12px 8px; }
  .title h1 { font-size: 24px; }
  .title p { font-size: 11px; }
  .hint { display: none; }
  .panel {
    top: auto; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    width: auto; max-height: 46%;
    padding: 10px;
  }
  .panel.collapsed { max-height: none; }
  .panel.collapsed > :not(.tabs):not(.search) { display: none; }
  .search kbd { display: none; }
  .panel-toggle {
    display: block; width: 100%;
    position: sticky; bottom: 0; z-index: 1;
    border: var(--rule); border-radius: 10px;
    background: var(--ink); color: var(--paper); padding: 9px 12px; font: 400 15px/1 var(--display); letter-spacing: 0.03em;
    box-shadow: var(--lift-s);
  }
  .card {
    left: 8px; right: 8px; width: auto; top: auto;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px)); max-height: 62%;
    transform: none; z-index: 5;
  }
  .zoom { right: 10px; top: calc(80px + env(safe-area-inset-top, 0px)); bottom: auto; }
  .zoom button { width: 34px; height: 34px; font-size: 17px; }
  .lbl.area.big { font-size: 17px; }
  .lbl.area { font-size: 13px; -webkit-text-stroke: 3px var(--ink); }
}

@media (prefers-reduced-motion: reduce) {
  .card, .row { animation: none; transition: none; }
}

/* the map in the sign-up and account pages' frame, for placing a hotel's pin */
body.placing .panel, body.placing .card, body.placing .title, body.placing #tips .tip, body.placing p.hint { display: none !important; }
body.placing #view { cursor: crosshair; }

/* placing a hotel: the banner saying what to do, and the hotel being placed */
.place-banner { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 5; max-width: calc(100% - 24px); padding: 10px 16px; border: 2.5px solid var(--ink); border-radius: 14px; background: #fffaf0; color: var(--ink); font: 800 15px/1.3 var(--body, system-ui); text-align: center; box-shadow: 0 4px 0 var(--ink); pointer-events: none; }
.place-banner.ok { background: #d8f3f2; }
.place-banner.warn { background: #ffe1a8; }
.lbl.you { margin-top: -72px; padding: 6px 12px; border: 2.5px solid #1d2a44; border-radius: 999px; background: #ff6b4a; color: #fff; font: 400 17px/1 'Lilita One', system-ui; letter-spacing: 0.02em; box-shadow: 0 3px 0 #1d2a44; z-index: 3; }
.lbl.you.drop { animation: you-drop 0.6s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes you-drop { from { margin-top: -122px; opacity: 0; } to { margin-top: -72px; opacity: 1; } }
.lbl.you-ring { width: 70px; height: 70px; pointer-events: none; }
/* the pulse is on an inner circle: scaling the label itself would also scale its position */
.lbl.you-ring::after { content: ''; position: absolute; inset: 0; border: 3px solid #ff6b4a; border-radius: 50%; animation: you-ring 1.6s ease-out infinite; }
@keyframes you-ring { from { transform: scale(0.4); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }
