/* Quiet consumer chrome. Loud voice stays on CTAs and jokes only. */
:root {
  --shell-ink: #111111;
  --shell-paper: #FFFFFF;
  --shell-ground: #F1F1EF;
  --shell-red: #E0312B;
  --shell-mute: #666666;
  --shell-bar-h: 64px;
}
.darnit-shell-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: max(12px, env(safe-area-inset-top)) 16px 12px;
  background: var(--shell-paper);
  border-bottom: 3px solid var(--shell-ink);
  position: sticky;
  top: 0;
  z-index: 40;
}
.darnit-shell-logo {
  font-family: Archivo, sans-serif;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--shell-ink);
  line-height: 1;
}
.darnit-shell-logo i,
.darnit-shell-logo span.dot {
  font-style: normal;
  color: var(--shell-red);
}
.darnit-shell-acts {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  min-height: 40px;
}
.darnit-shell-home {
  width: 40px;
  height: 40px;
  border: 3px solid var(--shell-ink);
  border-radius: 10px;
  background: var(--shell-paper);
  color: var(--shell-ink);
  display: grid;
  place-items: center;
  text-decoration: none;
  box-shadow: 3px 3px 0 var(--shell-ink);
}
.darnit-shell-home:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--shell-ink);
}
/* Account menu mounts here — never a second floating Home pill */
.darnit-shell-acts #darnitAcct {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  z-index: 5;
}
.darnit-shell-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: end;
  gap: 0;
  padding: 6px max(8px, calc((100% - 560px) / 2)) calc(6px + env(safe-area-inset-bottom));
  background: var(--shell-paper);
  border-top: 3px solid var(--shell-ink);
  font-family: Archivo, sans-serif;
}
.darnit-shell-bar a,
.darnit-shell-bar button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--shell-ink);
  text-decoration: none;
  font: 800 11px/1 Archivo, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 4px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.darnit-shell-bar .ph { font-size: 20px; }
.darnit-shell-bar .fab {
  width: 48px;
  height: 48px;
  margin-top: -18px;
  border: 3px solid var(--shell-ink);
  border-radius: 999px;
  background: var(--shell-red);
  color: #fff;
  font-size: 26px;
  font-weight: 900;
  box-shadow: 4px 4px 0 var(--shell-ink);
  display: grid;
  place-items: center;
  line-height: 1;
}
.darnit-shell-bar .fab:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--shell-ink);
}
.darnit-shell-bar a.on { color: var(--shell-red); }
body.has-darnit-shell {
  padding-bottom: calc(var(--shell-bar-h) + env(safe-area-inset-bottom));
}
/* Hide legacy floating Home / per-page brand bars when shell is present */
body.has-darnit-shell #homeBtn { display: none !important; }
body.has-darnit-shell > header.topbar { display: none !important; }

/* End screen */
.darnit-end {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(17, 17, 17, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
}
.darnit-end[hidden] { display: none; }
.darnit-end-card {
  width: min(440px, 100%);
  background: var(--shell-paper);
  color: var(--shell-ink);
  border: 3px solid var(--shell-ink);
  border-radius: 16px;
  box-shadow: 6px 6px 0 var(--shell-ink);
  padding: 20px 16px 16px;
  font-family: Archivo, sans-serif;
}
.darnit-end-card h2 {
  font-family: "Libre Caslon Condensed", serif;
  font-weight: 500;
  font-size: 28px;
  line-height: 1.05;
  margin: 0 0 8px;
}
.darnit-end-card .sub {
  color: var(--shell-mute);
  font-size: 15px;
  margin: 0 0 16px;
  line-height: 1.45;
}
.darnit-end-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.darnit-end-actions .btn {
  appearance: none;
  display: block;
  width: 100%;
  border: 3px solid var(--shell-ink);
  border-radius: 12px;
  background: var(--shell-paper);
  color: var(--shell-ink);
  font: 900 16px/1 Archivo, sans-serif;
  padding: 14px 16px;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--shell-ink);
  text-align: center;
  text-decoration: none;
}
.darnit-end-actions .btn.red {
  background: var(--shell-red);
  color: #fff;
}
.darnit-end-actions .btn:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 var(--shell-ink);
}
.darnit-end-actions .btn[disabled],
.darnit-end-actions .btn.is-wait {
  opacity: 0.85;
  cursor: default;
}
.darnit-end-x {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
  color: var(--shell-ink);
}
.darnit-end-card { position: relative; }

/* Skeletons */
.darnit-skel {
  background: linear-gradient(90deg, #e8e8e6 0%, #f5f5f3 50%, #e8e8e6 100%);
  background-size: 200% 100%;
  animation: darnit-skel 1.1s ease-in-out infinite;
  border-radius: 8px;
}
.darnit-skel-line { height: 14px; margin: 0 0 10px; }
.darnit-skel-line.lg { height: 28px; width: 70%; }
.darnit-skel-block { height: 180px; margin: 0 0 12px; }
@keyframes darnit-skel {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .darnit-skel { animation: none; }
  .darnit-shell-home:active,
  .darnit-shell-bar .fab:active,
  .darnit-end-actions .btn:active { transform: none; }
}
@media (min-width: 800px) {
  .darnit-end { align-items: center; }
}
