/* Swell — styled after iPhone OS 3 to iOS 6: glossy bars, pinstripes, grouped tables. */

:root {
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --pinstripe-a: #c5ccd4;
  --pinstripe-b: #cbd2d8;
  --label: #000;
  --value: #385487;
  --group-text: #4c566c;
  --separator: #e0e0e0;
  --group-border: #acafb5;
  --select-top: #058cf5;
  --select-bottom: #015fe6;
  --r0: #8a909a;
  --r1: #c8302a;
  --r2: #ea7f17;
  --r3: #e3b40f;
  --r4: #43a524;
  --r5: #7e3fc8;
  --good: #3c9a2f;
  --okay: #8a9d1f;
  --meh: #d38b1a;
  --bad: #c8322b;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: var(--font);
  font-size: 17px;
  color: var(--label);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  overflow: hidden;
  /* Dark "linen" around the phone-sized app on wide screens. */
  background-color: #2c3036;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .08) 0 1px, transparent 1px 3px);
}

button, input, select {
  font-family: inherit;
}

button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  cursor: pointer;
}

svg.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.noscript { color: #fff; padding: 40px 20px; text-align: center; }

#app {
  position: fixed;
  inset: 0;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 30px rgba(0, 0, 0, .6);
}

.tabviews {
  position: relative;
  flex: 1;
  overflow: hidden;
}

.stack {
  position: absolute;
  inset: 0;
  overflow: hidden;
  visibility: hidden;
}

.stack.active { visibility: visible; }

/* ---------- Screens & push navigation ---------- */

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background-color: var(--pinstripe-a);
  background-image: linear-gradient(90deg, transparent 5px, var(--pinstripe-b) 5px);
  background-size: 7px 100%;
  transition: transform .35s cubic-bezier(.3, .1, .3, 1);
  will-change: transform;
}

.screen.off-right { transform: translateX(100%); }
.screen.off-left { transform: translateX(-100%); }

.content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: 24px;
}

/* ---------- Navigation bar ---------- */

.navbar {
  position: relative;
  flex: none;
  height: calc(44px + var(--safe-top));
  padding: var(--safe-top) 5px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(#b0bccd, #889bb3 50%, #8195af 50%, #6d84a2);
  border-bottom: 1px solid #2d3642;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 1px 3px rgba(0, 0, 0, .25);
  z-index: 2;
}

.navbar h1 {
  position: absolute;
  left: 50%;
  bottom: 0;
  height: 44px;
  line-height: 44px;
  transform: translateX(-50%);
  max-width: calc(100% - 170px);
  margin: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #fff;
  font-size: 20px;
  font-weight: bold;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, .5);
  pointer-events: none;
}

.navbar h1.logo {
  font-family: "Snell Roundhand", "Brush Script MT", "Savoye LET", cursive;
  font-size: 30px;
  font-weight: bold;
  letter-spacing: .5px;
}

.nav-left, .nav-right {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 60px;
  z-index: 1;
}

.nav-right { justify-content: flex-end; }

.bar-btn {
  position: relative;
  height: 30px;
  min-width: 34px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #375073;
  border-radius: 5px;
  background: linear-gradient(#90a4c1, #5f7ea9 50%, #4b6c9a 50%, #4d6f9e);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 1px 0 rgba(255, 255, 255, .3);
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, .5);
  white-space: nowrap;
}

.bar-btn:active,
.bar-btn.back:active::before {
  background: linear-gradient(#6d83a4, #3f5f8d 50%, #2f5285 50%, #345789);
}

.bar-btn.done {
  border-color: #1f3d85;
  background: linear-gradient(#7fa6eb, #4a82e4 50%, #2e6ade 50%, #2c6cdf);
}

.bar-btn.done:active { background: linear-gradient(#5b86d4, #2d64c6 50%, #1a4fbd 50%, #1d52c0); }

.bar-btn svg {
  width: 18px;
  height: 18px;
  fill: #fff;
  filter: drop-shadow(0 -1px 0 rgba(0, 0, 0, .45));
}

.bar-btn:disabled { opacity: .55; }

/* Back button: a rounded body plus a rotated square for the point. */
.bar-btn.back {
  margin-left: 10px;
  padding-left: 6px;
  border-left: none;
  border-radius: 0 5px 5px 0;
  max-width: 110px;
}

.bar-btn.back span {
  position: relative;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-btn.back::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 3.5px;
  width: 21px;
  height: 21px;
  transform: rotate(45deg);
  border-left: 1px solid #375073;
  border-bottom: 1px solid #375073;
  border-radius: 0 0 0 3px;
  background: linear-gradient(135deg, #90a4c1, #5f7ea9 50%, #4b6c9a 50%, #4d6f9e);
  box-shadow: -1px 1px 0 rgba(255, 255, 255, .15);
}

/* ---------- Tab bar ---------- */

.tabbar {
  flex: none;
  display: flex;
  justify-content: space-around;
  height: calc(49px + var(--safe-bottom));
  padding: 2px 4px var(--safe-bottom);
  background: linear-gradient(#434343, #1b1b1b 50%, #000 50%, #000);
  border-top: 1px solid #000;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15);
}

.tab {
  flex: 1;
  max-width: 120px;
  margin: 0 2px;
  height: 45px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 3px;
  border: none;
  border-radius: 3px;
  background: none;
  color: #9a9a9a;
  font-size: 10px;
  font-weight: bold;
}

.tab.on {
  background: rgba(255, 255, 255, .14);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, .5);
  color: #fff;
}

.tab i {
  display: block;
  width: 30px;
  height: 30px;
  margin-bottom: 1px;
  background: linear-gradient(#a2a2a2, #6c6c6c);
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.tab.on i {
  background: linear-gradient(#d6f1ff, #51c3ff 45%, #1f9dff 55%, #2b8fff);
  filter: drop-shadow(0 0 3px rgba(80, 180, 255, .6));
}

.tab.beaches i {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath d='M2 22c2.5 0 4-2 5.5-5C10 11 13 7 18.5 7c4.5 0 7.5 3 8.5 6.5-1.5-1.3-3.4-1.8-5-1.3 1.8 1.2 2.5 3.2 2 5.3-.8-1.6-2.6-2.7-4.6-2.7-3 0-4.6 2.6-6 5.6C12 23.6 10 26 6 26H2z'/%3E%3Cpath d='M15 26c2.6 0 4.4-1.4 6-3 1.6 1.6 3.4 3 6 3v2H15z'/%3E%3C/svg%3E");
}

.tab.settings i {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Ccircle cx='15' cy='15' r='11.2' fill='none' stroke='%23000' stroke-width='3.6' stroke-dasharray='4.4 4.4'/%3E%3Ccircle cx='15' cy='15' r='7.6' fill='none' stroke='%23000' stroke-width='5'/%3E%3C/svg%3E");
}

/* ---------- Grouped tables ---------- */

.group-header {
  margin: 18px 20px 7px;
  font-size: 17px;
  font-weight: bold;
  color: var(--group-text);
  text-shadow: 0 1px 0 #fff;
}

.group-footer {
  margin: 7px 20px 0;
  font-size: 14px;
  line-height: 1.35;
  color: var(--group-text);
  text-align: center;
  text-shadow: 0 1px 0 #fff;
}

.group {
  margin: 10px 9px 0;
  background: #fff;
  border: 1px solid var(--group-border);
  border-radius: 9px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8);
  overflow: hidden;
}

.group-header + .group { margin-top: 0; }

.cell {
  position: relative;
  min-height: 44px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--separator);
  font-size: 17px;
  font-weight: bold;
}

.cell:first-child { border-top: none; }

.cell .label { flex: none; }

.cell .value {
  flex: 1;
  min-width: 0;
  text-align: right;
  font-weight: normal;
  color: var(--value);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell.link { cursor: pointer; }

.cell.link:active {
  background: linear-gradient(var(--select-top), var(--select-bottom));
  color: #fff;
}

.cell.link:active .value,
.cell.link:active .cell-sub { color: #fff; }

.cell.link:active .chev { border-color: #fff; }

.cell.center {
  justify-content: center;
  color: var(--value);
}

.cell.action { color: var(--value); }

.cell-text {
  flex: 1;
  min-width: 0;
  padding: 8px 0;
}

.cell-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.cell-sub {
  margin-top: 2px;
  font-size: 13px;
  font-weight: normal;
  color: #7a7a7a;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.chev {
  flex: none;
  width: 9px;
  height: 9px;
  margin: 0 4px 0 2px;
  border-top: 3px solid #7f7f7f;
  border-right: 3px solid #7f7f7f;
  transform: rotate(45deg);
}

.cell input[type="text"],
.cell input[type="search"] {
  flex: 1;
  min-width: 0;
  height: 43px;
  border: none;
  outline: none;
  background: transparent;
  font-size: 17px;
  color: var(--value);
  -webkit-user-select: text;
  user-select: text;
}

.cell input::placeholder { color: #b3b3b3; }

.cell.padded { padding: 10px; }

.cell.message {
  font-weight: normal;
  font-size: 15px;
  color: #555;
  justify-content: center;
  text-align: center;
  padding: 14px;
}

/* ---------- Badges, stars, arrows ---------- */

.badge {
  flex: none;
  width: 52px;
  height: 46px;
  margin: 6px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, .3);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, .55), rgba(255, 255, 255, .18) 50%, rgba(255, 255, 255, 0) 50%),
    var(--c, var(--r0));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 1px 2px rgba(0, 0, 0, .25);
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, .4);
  line-height: 1;
}

.badge b { font-size: 17px; }
.badge small { font-size: 10px; margin-top: 2px; }

.badge.small {
  width: 58px;
  height: 26px;
  margin: 0;
  border-radius: 6px;
  flex-direction: row;
  font-size: 14px;
  font-weight: bold;
}

.r0 { --c: var(--r0); }
.r1 { --c: var(--r1); }
.r2 { --c: var(--r2); }
.r3 { --c: var(--r3); }
.r4 { --c: var(--r4); }
.r5 { --c: var(--r5); }

.stars {
  flex: none;
  font-size: 15px;
  letter-spacing: -1px;
  color: #c9c9c9;
  font-weight: normal;
  text-shadow: 0 1px 0 #fff;
}

.stars .on {
  color: #f6a20b;
  text-shadow: 0 1px 0 #fff, 0 0 1px #b56f00;
}

.stars.big { font-size: 24px; letter-spacing: 1px; }

.arrow {
  width: 18px;
  height: 18px;
  flex: none;
  vertical-align: middle;
}

.q-glassy, .q-offshore { --q: var(--good); }
.q-cross-off { --q: var(--okay); }
.q-cross { --q: var(--meh); }
.q-cross-on, .q-onshore { --q: var(--bad); }
.arrow path { fill: var(--q, #555); }
.wind-text { color: var(--q, #555); font-weight: bold; }

/* ---------- "Now" panel ---------- */

.now {
  padding: 14px 14px 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  align-items: center;
}

.now .size {
  font-size: 40px;
  font-weight: bold;
  letter-spacing: -1px;
  color: #1d2b44;
  text-shadow: 0 1px 0 #fff;
}

.now .rating-label {
  font-size: 15px;
  font-weight: bold;
  color: var(--group-text);
  text-align: right;
}

.now .facts {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 14px;
  font-weight: normal;
  color: #444;
}

.now .facts span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.banner {
  margin: 10px 9px 0;
  padding: 8px 12px;
  border: 1px solid #c9a227;
  border-radius: 8px;
  background: linear-gradient(#fff8c4, #f7e57d);
  font-size: 13px;
  color: #5c4a00;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .6);
}

/* ---------- Segmented control ---------- */

.seg {
  display: flex;
  margin: 10px 9px 0;
  border: 1px solid #7c7f86;
  border-radius: 7px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .7);
}

.cell .seg { flex: 1; margin: 0; }

.seg button {
  flex: 1;
  min-width: 0;
  height: 30px;
  padding: 0 4px;
  border: none;
  border-left: 1px solid #a3a6ad;
  background: linear-gradient(#fdfdfd, #e9e9e9 50%, #dedede 50%, #e4e4e4);
  color: #4d4d4d;
  font-size: 13px;
  font-weight: bold;
  text-shadow: 0 1px 0 #fff;
  line-height: 1.1;
}

.seg button:first-child { border-left: none; }

.seg button.on {
  background: linear-gradient(#5a96ea, #2b6ad8 50%, #1c5bcd 50%, #2463d3);
  border-left-color: #1c4aa0;
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, .4);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .35);
}

.seg button.on + button { border-left-color: #1c4aa0; }

.seg.days button {
  height: 44px;
  font-size: 11px;
}

.seg.days button b {
  display: block;
  font-size: 16px;
}

/* ---------- Switch ---------- */

.switch {
  flex: none;
  position: relative;
  width: 79px;
  height: 27px;
  padding: 0;
  border: 1px solid #8c8c8c;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .3);
}

.switch .track {
  position: absolute;
  top: 0;
  left: -52px;
  width: 130px;
  height: 100%;
  display: flex;
  align-items: center;
  transition: left .2s ease;
}

.switch[aria-checked="true"] .track { left: 0; }

.switch .on-part,
.switch .off-part {
  width: 52px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, .25);
}

.switch .on-part {
  padding-left: 6px;
  background: linear-gradient(#0b62d6, #3b92f5);
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, .35);
}

.switch .off-part {
  padding-right: 6px;
  background: linear-gradient(#e6e6e6, #fdfdfd);
  color: #818181;
}

.switch .knob {
  flex: none;
  width: 27px;
  height: 27px;
  margin: 0 -1px;
  border: 1px solid #9a9a9a;
  border-radius: 50%;
  background: linear-gradient(#cfcfcf, #fbfbfb);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
  z-index: 1;
}

/* ---------- Slider ---------- */

.slider-row {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: bold;
  color: #777;
}

input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 9px;
  border: 1px solid #6c6c6c;
  border-radius: 5px;
  background:
    linear-gradient(90deg, transparent var(--pct, 50%), #fff var(--pct, 50%)),
    linear-gradient(#2f6fd6, #5fa1f3);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .35);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border: 1px solid #8a8a8a;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #fff, #dcdcdc 60%, #b9b9b9);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}

input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border: 1px solid #8a8a8a;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #fff, #dcdcdc 60%, #b9b9b9);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}

/* ---------- Big buttons ---------- */

.big-btn {
  display: block;
  width: calc(100% - 18px);
  height: 44px;
  margin: 20px 9px 0;
  border: 1px solid #6e1414;
  border-radius: 9px;
  background: linear-gradient(#e47b80, #d1363c 50%, #c11f25 50%, #c5272d);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 1px 0 rgba(255, 255, 255, .6);
  color: #fff;
  font-size: 19px;
  font-weight: bold;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, .45);
}

.big-btn:active { background: linear-gradient(#c45c61, #a91f24 50%, #981218 50%, #9c1a1f); }

.big-btn.grey {
  border-color: #7c7f86;
  background: linear-gradient(#fdfdfd, #e9e9e9 50%, #dedede 50%, #e4e4e4);
  color: #374a6e;
  text-shadow: 0 1px 0 #fff;
}

/* ---------- Charts ---------- */

.chart {
  display: block;
  width: 100%;
  height: auto;
}

.chart text {
  font-family: var(--font);
  font-size: 11px;
  font-weight: bold;
  fill: #5a6276;
}

.chart .val { fill: #1d2b44; font-size: 12px; }
.chart .bar { stroke: rgba(0, 0, 0, .3); stroke-width: 1; cursor: pointer; }
.chart .bar-sel { fill: none; stroke: #1c5bcd; stroke-width: 2; }
.chart .grid { stroke: #e3e5e9; stroke-width: 1; }
.chart .tide-line { fill: none; stroke: #2f6fc0; stroke-width: 2; }
.chart .now-line { stroke: #d9342b; stroke-width: 1.5; }
.chart .turn { fill: #fff; stroke: #2f6fc0; stroke-width: 2; }
.chart .turn-label { fill: #2f4f7f; font-size: 10px; }

.tide-list {
  display: flex;
  justify-content: space-around;
  padding: 8px 6px 10px;
  border-top: 1px solid var(--separator);
  font-size: 13px;
  font-weight: normal;
  color: #444;
  text-align: center;
}

.tide-list b { display: block; font-size: 12px; color: var(--group-text); text-transform: uppercase; }

/* ---------- Hourly rows ---------- */

.hour {
  display: grid;
  grid-template-columns: 44px 58px 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px 8px;
  padding: 7px 10px;
  border-top: 1px solid var(--separator);
}

.hour:first-child { border-top: none; }

.hour.now-row { background: linear-gradient(#eef4fd, #e1ebfa); }

.hour .t { font-size: 15px; font-weight: bold; }
.hour .wind {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 14px;
  justify-self: end;
}

.hour .detail {
  grid-column: 2 / -1;
  font-size: 12px;
  font-weight: normal;
  color: #777;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Spinner ---------- */

.spinner {
  flex: none;
  width: 20px;
  height: 20px;
  animation: spin 1s steps(12) infinite;
}

.spinner rect { fill: #6d6d6d; }

.badge .spinner rect { fill: #fff; }

@keyframes spin { to { transform: rotate(360deg); } }

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 60px 20px;
  color: var(--group-text);
  font-size: 15px;
  font-weight: bold;
  text-shadow: 0 1px 0 #fff;
}

.loading .spinner { width: 30px; height: 30px; }

/* ---------- Modal sheet ---------- */

.modal {
  position: absolute;
  inset: 0;
  z-index: 20;
  transition: transform .4s cubic-bezier(.3, .1, .3, 1);
}

.modal.down { transform: translateY(100%); }

/* ---------- Editor: map and dial ---------- */

.map {
  height: 230px;
  border-top: 1px solid var(--separator);
  background: #dfe3e8;
  z-index: 0;
}

.map .leaflet-control-attribution { font-size: 9px; }

.search-results .cell { font-size: 15px; }

.dial-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 10px 12px;
}

.dial {
  width: 210px;
  height: 210px;
  touch-action: none;
  cursor: grab;
}

.dial text {
  font-family: var(--font);
  font-weight: bold;
  font-size: 15px;
  fill: #4c566c;
}

.dial .tick { stroke: #8e95a1; stroke-width: 1.5; }
.dial .sea { fill: rgba(47, 111, 192, .14); }

.dial-readout {
  margin-top: 8px;
  font-size: 22px;
  font-weight: bold;
  color: #1d2b44;
}

.dial-readout small {
  font-size: 14px;
  color: #777;
  font-weight: normal;
}

/* ---------- Alert view ---------- */

.alert-overlay {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(rgba(0, 0, 0, .2), rgba(0, 0, 0, .6));
  animation: fade .2s ease-out;
}

.alert {
  position: relative;
  width: 284px;
  padding: 18px 12px 10px;
  border: 2px solid #e0e5ee;
  border-radius: 10px;
  background: linear-gradient(rgba(36, 58, 107, .92), rgba(9, 22, 58, .92));
  box-shadow: 0 4px 14px rgba(0, 0, 0, .65), inset 0 0 0 1px rgba(0, 0, 0, .4);
  color: #fff;
  text-align: center;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, .6);
  overflow: hidden;
  animation: pop .3s ease-out;
}

/* The curved gloss across the top of the alert. */
.alert::before {
  content: "";
  position: absolute;
  left: -50%;
  top: -60px;
  width: 200%;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(rgba(255, 255, 255, .28), rgba(255, 255, 255, .08));
  pointer-events: none;
}

.alert h2 { margin: 0 0 8px; font-size: 18px; }
.alert p { margin: 0 0 14px; font-size: 15px; line-height: 1.35; }

.alert .buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.alert .buttons button {
  flex: 1 1 40%;
  height: 43px;
  border: 1px solid rgba(0, 0, 0, .6);
  border-radius: 5px;
  background: linear-gradient(rgba(255, 255, 255, .38), rgba(255, 255, 255, .12) 50%, rgba(255, 255, 255, .02) 50%, rgba(255, 255, 255, .1));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 1px 0 rgba(255, 255, 255, .15);
  color: #fff;
  font-size: 17px;
  font-weight: bold;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, .6);
}

.alert .buttons.stacked button { flex-basis: 100%; }

.alert .buttons button.cancel {
  background: linear-gradient(rgba(255, 255, 255, .2), rgba(255, 255, 255, .05) 50%, rgba(0, 0, 0, .1) 50%, rgba(0, 0, 0, .05));
}

.alert .buttons button.destructive {
  background: linear-gradient(#e6767b, #c9262c 50%, #b5161c 50%, #bb1f25);
}

.alert .buttons button:active { background: rgba(255, 255, 255, .45); }

@keyframes pop {
  0% { transform: scale(.7); opacity: 0; }
  60% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); }
}

@keyframes fade { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .screen, .modal, .switch .track { transition: none; }
  .alert, .alert-overlay { animation: none; }
}
