:root {
  --bg: #ffffff;
  --card: #ffffff;
  --muted: #335b6c;
  --text: #0b2a3a;
  --accent: #006aa7; /* blu FIAB */
  --accent2: #fcde4c; /* giallo FIAB */
  --surface: rgba(255, 255, 255, 0.88);
  --surface2: rgba(255, 255, 255, 0.76);
  --danger: #c73737;
  --shadow: 0 14px 36px rgba(10, 38, 55, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:
    radial-gradient(1200px 820px at -10% -10%, rgba(252, 222, 76, 0.95), transparent 55%),
    radial-gradient(1100px 760px at 120% 0%, rgba(0, 106, 167, 0.52), transparent 60%),
    radial-gradient(900px 650px at 40% 110%, rgba(252, 222, 76, 0.45), transparent 62%),
    linear-gradient(180deg, rgba(0, 106, 167, 0.06), rgba(252, 222, 76, 0.08));
  color: var(--text);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.92em;
  color: #0b2a3a;
}

.hidden {
  display: none !important;
}

#app {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: relative;
  padding: 18px 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.topbar__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.topbar__logo {
  width: 76px;
  height: 76px;
  border-radius: 22px;
  border: 1px solid rgba(11, 42, 58, 0.12);
  background: rgba(252, 222, 76, 0.6);
  box-shadow: 0 16px 34px rgba(10, 38, 55, 0.16);
}

.topbar__brandText {
  display: flex;
  flex-direction: column;
}

.topbar__title {
  font-weight: 800;
  letter-spacing: 0.2px;
  font-size: 22px;
}

.topbar__subtitle {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.topbar__actions {
  position: absolute;
  right: 16px;
  top: 18px;
  display: flex;
  gap: 10px;
}

.iconbtn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(11, 42, 58, 0.14);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 10px 26px rgba(10, 38, 55, 0.12);
  cursor: pointer;
  font-size: 18px;
}

.installbtn {
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(11, 42, 58, 0.14);
  background: rgba(252, 222, 76, 0.72);
  color: #053a58;
  box-shadow: 0 10px 26px rgba(10, 38, 55, 0.12);
  cursor: pointer;
  font-weight: 900;
  font-size: 12.5px;
  white-space: nowrap;
}

.installbtn:active {
  transform: translateY(1px);
}

.main {
  flex: 1;
  padding: 10px 16px 92px;
}

.view {
  display: none;
}

.view--active {
  display: block;
}

.hero {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.45));
  border: 1px solid rgba(11, 42, 58, 0.12);
  border-radius: var(--radius);
  padding: 14px 14px;
  box-shadow: var(--shadow);
}

.grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.homebottom {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.homecard {
  text-decoration: none;
  border: 1px solid rgba(11, 42, 58, 0.12);
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--radius);
  padding: 12px 12px;
  color: var(--text);
  box-shadow: var(--shadow);
  display: grid;
  gap: 6px;
}

.homecard__icon {
  font-size: 20px;
}

.homecard__title {
  font-weight: 950;
  font-size: 14px;
}

.homecard__text {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.homecard__actions {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.homecard--social {
  cursor: default;
}

.homecard--social a.btn {
  text-align: center;
}

.homefootnote {
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}

.chips {
  margin: 10px 0 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.chip {
  border: 1px solid rgba(11, 42, 58, 0.14);
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 850;
  font-size: 12px;
  text-decoration: none;
}

.chip--maps {
  padding: 10px 14px;
  font-size: 15px;
  transform: scale(1.08);
  transform-origin: left center;
}

.chip--active {
  border-color: rgba(0, 106, 167, 0.32);
  background: rgba(252, 222, 76, 0.62);
  color: #053a58;
}

.chip--accent {
  border-color: rgba(0, 106, 167, 0.32);
  background: rgba(0, 106, 167, 0.10);
  color: #053a58;
}

.chip--ghost {
  background: transparent;
}

.chip--priority {
  border-color: rgba(0, 106, 167, 0.26);
  box-shadow: 0 8px 18px rgba(0, 106, 167, 0.10);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 900;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(11, 42, 58, 0.14);
  background: rgba(255, 255, 255, 0.8);
  color: var(--muted);
}

.pill--public {
  border-color: rgba(0, 106, 167, 0.25);
  color: rgba(0, 106, 167, 0.95);
}

.pill--mine {
  border-color: rgba(252, 222, 76, 0.6);
  color: #7a5b00;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 14px;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 24, 34, 0.35);
  backdrop-filter: blur(10px);
}

.modal__panel {
  position: relative;
  width: min(560px, 100%);
  border-radius: 22px;
  border: 1px solid rgba(11, 42, 58, 0.14);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 60px rgba(10, 38, 55, 0.22);
  padding: 14px;
}

.modal__panel--map {
  width: min(880px, 100%);
}

.mapwrap {
  margin-top: 10px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(11, 42, 58, 0.14);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 18px 44px rgba(10, 38, 55, 0.12);
}

.map {
  width: 100%;
  height: min(62vh, 520px);
}

.modal__title {
  font-weight: 950;
  letter-spacing: 0.2px;
  font-size: 15px;
}

.modal__text {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.3;
}

.modal__actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.searchrow {
  margin: 10px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid rgba(11, 42, 58, 0.14);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 34px rgba(10, 38, 55, 0.10);
}

.searchrow__icon {
  width: 28px;
  height: 28px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(252, 222, 76, 0.55);
  border: 1px solid rgba(0, 106, 167, 0.16);
  flex: 0 0 auto;
}

.searchrow__input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
}

.searchrow__clear {
  width: 34px;
  height: 34px;
  border-radius: 14px;
  border: 1px solid rgba(11, 42, 58, 0.14);
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  font-weight: 900;
}

.cta {
  margin-top: 12px;
  border-radius: 22px;
  padding: 14px 14px;
  border: 1px solid rgba(0, 106, 167, 0.22);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.62));
  box-shadow: 0 18px 44px rgba(10, 38, 55, 0.18);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cta__left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.cta__badge {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: rgba(252, 222, 76, 0.95);
  display: grid;
  place-items: center;
  font-size: 18px;
  box-shadow: 0 10px 26px rgba(10, 38, 55, 0.18);
  flex: 0 0 auto;
}

.cta__text {
  min-width: 0;
}

.cta__title {
  font-weight: 950;
  letter-spacing: 0.2px;
  font-size: 15px;
  line-height: 1.2;
}

.cta__subtitle {
  margin-top: 4px;
  font-size: 12.5px;
  opacity: 0.9;
  line-height: 1.25;
}

.cta__btn {
  flex: 0 0 auto;
  text-decoration: none;
  border-radius: 16px;
  padding: 10px 12px;
  font-weight: 900;
  font-size: 13px;
  color: var(--accent);
  background: rgba(252, 222, 76, 0.98);
  border: 1px solid rgba(0, 106, 167, 0.22);
  box-shadow: 0 12px 30px rgba(10, 38, 55, 0.18);
}

.cta__btn:active {
  transform: translateY(1px);
}

.cta__btn:hover {
  filter: brightness(0.98);
}

.cardbtn {
  text-align: left;
  border: 1px solid rgba(11, 42, 58, 0.12);
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--radius);
  padding: 12px 12px;
  cursor: pointer;
  color: var(--text);
  box-shadow: var(--shadow);
}

.cardbtn:active {
  transform: translateY(1px);
}

.cardbtn,
.item,
.hero,
.panel,
.form,
.btn,
.iconbtn,
.tab {
  transition: transform 120ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.cardbtn:hover,
.item:hover {
  box-shadow: 0 18px 44px rgba(10, 38, 55, 0.14);
}

.cardbtn__icon {
  font-size: 22px;
  margin-bottom: 6px;
}

.cardbtn__title {
  font-weight: 800;
  font-size: 14px;
}

.cardbtn__text {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.sectionhead {
  margin: 10px 2px 10px;
}

.sectionhead__title {
  font-weight: 900;
  font-size: 16px;
}

.sectionhead__title--fountains {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
}

.sectionhead__icon {
  font-size: 22px;
  line-height: 1;
}

.sectionhead__subtitle {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.3;
  margin-top: 4px;
}

.list {
  display: grid;
  gap: 10px;
}

.item {
  border: 1px solid rgba(11, 42, 58, 0.12);
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--radius);
  padding: 12px 12px;
  box-shadow: var(--shadow);
}

.item__title {
  font-weight: 900;
  font-size: 14px;
}

.item__meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.item__actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid rgba(11, 42, 58, 0.14);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 750;
  font-size: 13px;
}

.btn--ghost {
  background: transparent;
}

.btn--danger {
  border-color: rgba(199, 55, 55, 0.35);
  background: rgba(199, 55, 55, 0.10);
  color: #8a0f0f;
}

.btn--primary {
  border-color: rgba(0, 106, 167, 0.35);
  background: rgba(0, 106, 167, 0.12);
  color: #053a58;
}

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 10px 12px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  border-top: 1px solid rgba(11, 42, 58, 0.08);
}

.tab {
  border: 1px solid rgba(11, 42, 58, 0.10);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  padding: 10px 8px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.tab--active {
  border-color: rgba(0, 106, 167, 0.35);
  background: rgba(252, 222, 76, 0.65);
}

.tab:active {
  transform: translateY(1px);
}

.tab__icon {
  font-size: 16px;
}

.tab__label {
  font-size: 11px;
  color: var(--muted);
}

.tab--active .tab__label {
  color: var(--text);
}

.empty {
  margin-top: 14px;
  border: 1px dashed rgba(11, 42, 58, 0.22);
  border-radius: var(--radius);
  padding: 14px;
  color: var(--muted);
}

.empty__title {
  font-weight: 900;
  color: var(--text);
}

.empty__hint {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.3;
}

.form {
  border: 1px solid rgba(11, 42, 58, 0.12);
  background: rgba(255, 255, 255, 0.82);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow);
  margin-bottom: 10px;
}

.row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 10px;
}

.row:first-child {
  margin-top: 0;
}

.row--end {
  grid-template-columns: 1fr 1fr;
}

.field__label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.input,
.textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(11, 42, 58, 0.14);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  padding: 10px 12px;
  outline: none;
}

.textarea {
  resize: vertical;
  min-height: 140px;
}

.panel {
  border: 1px solid rgba(11, 42, 58, 0.12);
  background: rgba(255, 255, 255, 0.82);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow);
  margin-bottom: 10px;
}

.panel__title {
  font-weight: 900;
  font-size: 13px;
}

.panel__hint {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.filebtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(11, 42, 58, 0.14);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font-weight: 750;
  font-size: 13px;
  cursor: pointer;
  gap: 8px;
}

.filebtn input {
  display: none;
}

@media (min-width: 620px) {
  .main {
    max-width: 860px;
    margin: 0 auto;
  }
  .grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .homebottom {
    grid-template-columns: 1fr 1fr;
  }
  .row {
    grid-template-columns: 1fr 1fr;
  }
  .row--end {
    grid-template-columns: auto auto;
    justify-content: end;
  }
}

@media (max-width: 410px) {
  .cta {
    flex-direction: column;
    align-items: stretch;
  }
  .cta__btn {
    text-align: center;
  }
}
