:root {
  --bg: #fbf7ef;
  --surface: #fffdf8;
  --surface-2: #f4efe4;
  --surface-3: #edf2e8;
  --ink: #22322c;
  --muted: #6f786c;
  --line: rgba(45, 68, 52, 0.1);
  --green: #254936;
  --green-2: #355d45;
  --sage: #86a06f;
  --sand: #eadcb8;
  --gold: #e1bf73;
  --alert: #c95546;
  --alert-dark: #a3362a;
  --shadow-soft: 0 10px 24px rgba(41, 50, 36, 0.08);
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "Plus Jakarta Sans", sans-serif;
  color: var(--ink);
  background: #fff;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  background:
    radial-gradient(circle at top right, rgba(225, 191, 115, 0.14), transparent 24%),
    linear-gradient(180deg, var(--bg), #f8f3e8 100%);
  padding: 16px 16px 96px;
  position: relative;
  overflow: hidden;
}

.app-topbar,
.notify-panel,
.weather-panel,
.views,
.bottom-nav {
  position: relative;
  z-index: 1;
}

.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-stamp,
.chat-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fffdf7;
  font-weight: 800;
}

.brand-stamp {
  background: linear-gradient(135deg, var(--green), var(--green-2));
  box-shadow: 0 10px 24px rgba(37, 73, 54, 0.18);
}

.brand-lockup p,
.brand-lockup span,
.eyebrow,
.panel-label,
.market-top span,
.market-top strong,
.section-line p {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 800;
}

.brand-lockup span {
  display: block;
  margin-top: 4px;
  font-size: 0.62rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.topbar-actions {
  display: flex;
  gap: 10px;
}

.topbar-button,
.hero-weather,
.play-toggle,
.ghost-action,
.chip,
.nav-item,
.sheet-options button,
.sheet-confirm,
.glance-card,
.feed-row,
.sos-pulse,
.sos-screen-button {
  border: 0;
}

.topbar-button {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.86);
  color: var(--green);
  box-shadow: var(--shadow-soft);
}

.topbar-button svg,
.sos-pulse svg,
.play-toggle svg,
.nav-item svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.notify-panel,
.weather-panel,
.hero-card,
.sos-banner,
.glance-card,
.list-card,
.radio-strip,
.roots-hero,
.sos-screen-card {
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.notify-panel,
.weather-panel {
  background: rgba(255, 253, 248, 0.96);
  border-radius: 22px;
  padding: 14px;
  margin-bottom: 12px;
}

.notify-panel article + article {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.notify-panel strong,
.weather-panel strong {
  display: block;
}

.notify-panel span,
.weather-panel span,
.hero-card p,
.sos-banner p,
.glance-card span,
.feed-row span,
.radio-strip p,
.market-item p,
.chat-item p,
.roots-hero p,
.sos-screen-card p {
  color: var(--muted);
  line-height: 1.55;
}

.weather-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 12px;
}

.weather-panel-head strong {
  font-family: "Fraunces", serif;
  font-size: 2rem;
  line-height: 1;
}

.weather-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.weather-panel-grid div {
  display: grid;
  gap: 4px;
}

.views {
  min-height: calc(100vh - 144px);
}

.view {
  display: none;
  animation: fadeIn 180ms ease;
}

.view.is-active {
  display: grid;
  gap: 14px;
}

.hero-card {
  background: linear-gradient(180deg, rgba(255, 252, 245, 0.94), rgba(250, 244, 233, 0.96));
  border-radius: 30px;
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: start;
}

.eyebrow,
.panel-label {
  color: var(--sage);
}

.hero-card h1,
.sos-banner h2,
.section-line h2,
.radio-strip h2,
.screen-head h1,
.roots-hero h2,
.market-item h3,
.feed-row strong,
.chat-item strong {
  margin: 0;
  font-family: "Fraunces", serif;
}

.hero-card h1,
.screen-head h1 {
  margin-top: 8px;
  font-size: 2.25rem;
  line-height: 0.95;
}

.hero-card p {
  margin: 12px 0 0;
  max-width: 24ch;
}

.hero-weather {
  width: 88px;
  height: 88px;
  border-radius: 26px;
  background: linear-gradient(180deg, #f0d48d, var(--gold));
  color: var(--green);
  box-shadow: 0 14px 28px rgba(194, 155, 66, 0.18);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  transform: rotate(7deg);
}

.hero-weather span {
  font-family: "Fraunces", serif;
  font-size: 2rem;
  line-height: 1;
}

.hero-weather small {
  font-size: 0.72rem;
  font-weight: 700;
}

.sos-banner {
  background:
    radial-gradient(circle at 80% 18%, rgba(255, 255, 255, 0.18), transparent 16%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0, rgba(255, 255, 255, 0.05) 10px, transparent 10px, transparent 20px),
    linear-gradient(135deg, var(--alert) 0%, var(--alert-dark) 100%);
  color: #fff7f0;
  border-radius: 30px;
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
}

.sos-banner .eyebrow,
.sos-banner p {
  color: rgba(255, 247, 240, 0.88);
}

.sos-banner h2 {
  margin: 6px 0 8px;
  font-size: 1.9rem;
}

.sos-pulse {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  color: #fff6ef;
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.38), transparent 18%),
    linear-gradient(180deg, #d45a4b 0%, #972a22 100%);
  box-shadow:
    inset 0 6px 14px rgba(255, 255, 255, 0.18),
    0 0 0 8px rgba(255, 246, 239, 0.12);
}

.glance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.glance-card {
  text-align: left;
  border-radius: 26px;
  padding: 18px;
  background: rgba(255, 253, 248, 0.88);
}

.glance-card h3 {
  margin: 10px 0 8px;
  font-family: "Fraunces", serif;
  font-size: 1.4rem;
  line-height: 1.05;
}

.market-glance {
  background: linear-gradient(180deg, #f3f7ee 0%, #eef3e8 100%);
}

.roots-glance {
  background:
    radial-gradient(circle at 78% 76%, rgba(225, 191, 115, 0.2), transparent 18%),
    linear-gradient(180deg, #fffaf2 0%, #f7f0e6 100%);
}

.card-stack,
.market-list,
.chat-list,
.roots-list,
.sos-tips {
  display: grid;
  gap: 12px;
}

.list-card,
.radio-strip,
.roots-hero,
.sos-screen-card {
  background: rgba(255, 253, 248, 0.92);
  border-radius: 28px;
  padding: 18px;
}

.section-line {
  margin-bottom: 8px;
}

.section-line h2,
.radio-strip h2,
.roots-hero h2 {
  margin-top: 6px;
  font-size: 1.55rem;
  line-height: 1;
}

.feed-row,
.market-item,
.chat-item {
  width: 100%;
  text-align: left;
  background: transparent;
  padding: 14px 0;
}

.feed-row + .feed-row,
.market-item + .market-item,
.chat-item + .chat-item {
  border-top: 1px solid var(--line);
}

.feed-row strong,
.market-item h3 {
  display: block;
  font-size: 1.15rem;
  line-height: 1.16;
  margin-bottom: 6px;
}

.feed-row.is-static {
  cursor: default;
}

.radio-strip {
  background: linear-gradient(135deg, var(--green) 0%, #335f47 100%);
  color: #f8f2e6;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
}

.radio-strip .eyebrow,
.radio-strip p {
  color: rgba(248, 242, 230, 0.78);
}

.play-toggle {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  background: linear-gradient(180deg, #f6dda9 0%, var(--gold) 100%);
  color: var(--green);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.14);
  display: grid;
  place-items: center;
}

.play-toggle .icon-pause {
  display: none;
}

.play-toggle.is-playing .icon-play {
  display: none;
}

.play-toggle.is-playing .icon-pause {
  display: block;
}

.screen-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding-top: 6px;
}

.ghost-action {
  border-radius: 999px;
  padding: 12px 16px;
  background: rgba(255, 253, 248, 0.9);
  color: var(--green);
  box-shadow: var(--shadow-soft);
  font-weight: 800;
}

.chips-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.chip {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 253, 248, 0.92);
  color: var(--green);
  box-shadow: var(--shadow-soft);
  font-weight: 700;
}

.chip.is-active {
  background: var(--green);
  color: #fffdf7;
}

.market-item:first-child {
  padding-top: 0;
}

.market-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--sage);
  margin-bottom: 8px;
}

.sos-head {
  margin-bottom: 4px;
}

.sos-screen-card {
  text-align: center;
  padding: 26px 18px;
}

.sos-screen-button {
  width: 180px;
  height: 180px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  gap: 6px;
  color: #fff7f0;
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.34), transparent 18%),
    linear-gradient(180deg, #d45a4b 0%, #972a22 100%);
  box-shadow:
    inset 0 10px 18px rgba(255, 255, 255, 0.14),
    0 0 0 12px rgba(201, 85, 70, 0.12);
}

.sos-screen-button span {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.8rem;
  font-weight: 800;
}

.sos-screen-button strong {
  font-family: "Fraunces", serif;
  font-size: 2.6rem;
  line-height: 1;
}

.chat-item,
.roots-hero {
  display: grid;
  gap: 12px;
}

.chat-item {
  grid-template-columns: 42px 1fr;
  align-items: start;
}

.chat-avatar {
  background: linear-gradient(135deg, #2b5640, #4a735d);
}

.chat-village {
  background: linear-gradient(135deg, #b88b56, #8f6840);
}

.chat-private {
  background: linear-gradient(135deg, #8fa67f, #6f8b60);
}

.chat-item strong {
  font-size: 1.16rem;
  line-height: 1.1;
}

.chat-item.is-live strong::after {
  content: " na żywo";
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--alert);
  margin-left: 8px;
}

.roots-photos {
  height: 148px;
  position: relative;
  margin-bottom: 6px;
}

.roots-photo {
  position: absolute;
  border-radius: 22px;
  border: 1px solid rgba(45, 68, 52, 0.08);
  box-shadow: var(--shadow-soft);
}

.roots-photo-back {
  inset: 18px 72px 0 0;
  transform: rotate(-8deg);
  background: linear-gradient(135deg, #99784f, #cfb18b);
}

.roots-photo-front {
  inset: 0 24px 22px 88px;
  transform: rotate(7deg);
  background: linear-gradient(135deg, #694e35, #b88a58);
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100%, 430px);
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(248, 243, 232, 0), rgba(248, 243, 232, 0.95) 24%, rgba(248, 243, 232, 0.98) 100%);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.nav-item {
  min-height: 62px;
  border-radius: 22px;
  background: rgba(37, 73, 54, 0.94);
  color: rgba(248, 242, 230, 0.72);
  display: grid;
  place-items: center;
  gap: 4px;
  box-shadow: 0 14px 22px rgba(33, 50, 39, 0.14);
}

.nav-item span {
  font-size: 0.68rem;
  font-weight: 700;
}

.nav-item.is-active {
  color: #fffdf7;
  background: linear-gradient(180deg, var(--green), #31563f);
}

.nav-item-sos {
  margin-top: -18px;
  min-height: 78px;
  background: linear-gradient(180deg, var(--alert), var(--alert-dark));
  color: #fff8f2;
}

.sos-sheet[hidden],
.notify-panel[hidden],
.weather-panel[hidden] {
  display: none;
}

.sos-sheet {
  position: fixed;
  inset: 0;
  z-index: 10;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(27, 24, 20, 0.34);
  backdrop-filter: blur(4px);
}

.sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fffdf8;
  border-radius: 28px 28px 0 0;
  padding: 12px 16px 24px;
  box-shadow: 0 -18px 40px rgba(30, 30, 24, 0.14);
}

.sheet-handle {
  width: 44px;
  height: 5px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: rgba(34, 50, 44, 0.14);
}

.sheet-panel h2 {
  margin: 8px 0 16px;
  font-family: "Fraunces", serif;
  font-size: 1.8rem;
}

.sheet-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.sheet-options button,
.sheet-confirm {
  border-radius: 18px;
  padding: 16px 14px;
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 800;
}

.sheet-confirm {
  width: 100%;
  margin-top: 14px;
  background: var(--green);
  color: #fffdf7;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 420px) {
  .app-shell {
    width: 100%;
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero-card,
  .sos-banner,
  .radio-strip {
    grid-template-columns: 1fr;
  }

  .glance-grid,
  .sheet-options,
  .weather-panel-grid {
    grid-template-columns: 1fr;
  }

  .hero-weather {
    justify-self: end;
  }
}
