.app-shell {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: #f9f2e9;
}

.app-wrap {
  width: min(calc(100% - 2rem), 58rem);
  margin-inline: auto;
}

.app-header { color: #fff8f0; background: var(--night); }
.app-header :focus-visible, .app-hero :focus-visible { outline-color: var(--accent); }

.app-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding-block: .7rem;
}

.app-top .brand { min-width: 0; }
.app-top .brand strong { overflow-wrap: anywhere; }
.app-top .language { flex: 0 0 auto; }

.app-nav-band {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.app-nav {
  display: flex;
  gap: clamp(1.25rem, 6vw, 2.5rem);
}

.app-nav a {
  display: flex;
  align-items: center;
  min-height: 3rem;
  border-bottom: 3px solid transparent;
  padding-block: .3rem;
  color: var(--muted);
  text-decoration: none;
  font-weight: 650;
}

.app-nav a:hover, .app-nav [aria-current] {
  border-color: var(--spice);
  color: var(--spice);
}

.app-main { padding-block: 1.25rem 3rem; }
.app-main :is(h2, h3) { overflow-wrap: anywhere; }
.app-main h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); }
.app-main h3 { font-size: 1.15rem; }

.app-hero {
  display: grid;
  align-items: end;
  min-height: clamp(15rem, 40vw, 21rem);
  border-radius: 1.25rem;
  color: white;
  background: linear-gradient(0deg, rgb(26 18 14 / .97), rgb(26 18 14 / .55) 57%, rgb(26 18 14 / .18)),
    url("./salem-worship.jpg") center 44% / cover;
}

.app-hero-content, .app-edition { padding: clamp(1.25rem, 4vw, 2.5rem); }
.app-hero h1, .app-edition h1 { font-size: clamp(2rem, 5.7vw, 3.7rem); }
.app-hero p { max-width: 35rem; margin-top: .6rem; color: #fff4e9; }

.app-surface {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--paper);
}

.app-feature {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(1.1rem, 3.25vw, 1.75rem);
  margin-top: .9rem;
  border-color: #dec2a6;
  background: #fff6eb;
}

.app-label {
  color: var(--spice);
  font-size: .875rem;
  font-weight: 700;
  margin-bottom: .35rem;
}

.app-feature time, .app-edition-date { display: block; margin-top: .4rem; color: var(--muted); }

.app-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  min-height: 3rem;
  padding: .55rem 1rem;
  border-radius: .6rem;
  background: var(--night);
  color: white;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
}

.app-action:hover { background: #4b2c20; }

.app-section { margin-top: clamp(1.65rem, 4vw, 2.5rem); }
.app-section > p { margin-top: .5rem; color: var(--muted); }
.app-clean-list { list-style: none; margin: 0; padding: 0; }

.app-service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  margin-top: .8rem;
}

.app-service {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1rem;
  text-decoration: none;
}

.app-service:hover { border-color: #a3623c; background: #fff7ec; }

.app-service time {
  color: var(--spice);
  font-size: 1.25rem;
  font-weight: 750;
}

.app-service h3 { margin: .3rem 0 .45rem; }
.app-service-link { margin-top: auto; padding-top: .6rem; }

.app-inline-link, .app-service-link, .app-footer a {
  color: var(--spice);
  font-weight: 650;
  text-decoration: none;
}

.app-inline-link { display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; }
.app-inline-link:hover, .app-service:hover .app-service-link, .app-footer a:hover {
  text-decoration: underline;
  text-underline-offset: .2em;
}

.app-links { display: flex; flex-wrap: wrap; gap: 0 1.5rem; margin-top: .6rem; }

.app-edition-date { font-weight: 650; }
.app-edition > p:last-child { margin-top: .6rem; }

.app-offline {
  margin-top: 1rem;
  padding: .65rem .85rem;
  border-inline-start: 3px solid #a3623c;
  background: #fff6eb;
  color: var(--muted);
  font-size: .9rem;
}

.app-install { padding: clamp(1rem, 2.5vw, 1.5rem); }
.app-install button { margin-top: .8rem; border: 0; font: inherit; font-weight: 700; cursor: pointer; }

.app-footer { margin-top: auto; border-top: 1px solid var(--line); background: var(--paper); }
.app-footer .app-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 1rem; }
.app-footer a { display: inline-flex; align-items: center; min-height: 3rem; }
.app-footer p { padding-block: .5rem; color: var(--muted); font-size: .875rem; }

html:lang(ko) .app-main { word-break: keep-all; overflow-wrap: anywhere; }

@media (max-width: 32rem) {
  .app-feature { flex-direction: column; align-items: stretch; }
  .app-service-grid { grid-template-columns: minmax(0, 1fr); }
  .app-service-link { padding-top: .1rem; }
}

@media (max-width: 22rem) {
  .app-top .brand-symbol { display: none; }
  .app-top .brand-secondary { display: none; }
  .app-nav { gap: .85rem; }
}

.app-identity {
  display: flex;
  align-items: center;
  gap: .6rem;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.app-identity img { flex: 0 0 auto; border-radius: .5rem; }
.app-identity strong { overflow-wrap: anywhere; }
.app-standalone .app-wrap { max-width: 42rem; }
.app-standalone .app-top { padding-top: max(.7rem, env(safe-area-inset-top, 0px)); }
.app-standalone .app-main { padding-bottom: 2rem; }
.app-dashboard-heading h1 { font-size: clamp(1.85rem, 5vw, 2.55rem); }
.app-dashboard-heading p { margin-top: .4rem; color: var(--muted); }
.app-standalone .app-feature { margin-top: 1.15rem; border-color: #b97751; }

.app-standalone .app-nav-band {
  position: sticky;
  z-index: 2;
  bottom: 0;
  margin-top: auto;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  border-top: 1px solid var(--line);
  border-bottom: 0;
  box-shadow: 0 -.25rem .75rem rgb(30 24 22 / .08);
}

.app-standalone .app-nav { gap: .4rem; }

.app-standalone .app-nav a {
  flex: 1 1 0;
  justify-content: center;
  border-top: 3px solid transparent;
  border-bottom: 0;
  text-align: center;
}

.app-standalone .app-nav :is(a:hover, [aria-current]) {
  border-top-color: var(--spice);
  background: #fff6eb;
}

.app-standalone :is([id], a, button) {
  scroll-margin-bottom: calc(4rem + env(safe-area-inset-bottom, 0px));
}

@media (display-mode: standalone) {
  .app-standalone .app-install { display: none; }
}

.app-team-list { display: grid; gap: .55rem; margin-top: .65rem; }
.app-team-list li { display: flex; flex-wrap: wrap; gap: .25rem 1rem; padding: .7rem .85rem; }
.app-team-list span { color: var(--muted); }

.app-bulletin-dates { margin-block: .85rem 1rem; padding: .35rem .85rem; }
.app-bulletin-dates summary { min-height: 2.75rem; padding-block: .6rem; cursor: pointer; font-weight: 700; }
.app-bulletin-dates ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.5rem), 1fr)); gap: .35rem; padding: 0 0 .65rem; }
.app-bulletin-dates a { display: block; padding: .5rem .65rem; border-radius: .4rem; color: var(--spice); }
.app-bulletin-dates a[aria-current] { background: #fff1e1; font-weight: 700; }
