:root {
  color-scheme: light;
  --bg: #f6f4ee;
  --paper: #fffdf8;
  --ink: #26231f;
  --muted: #6a6258;
  --line: #ded6c8;
  --accent: #236b63;
  --accent-2: #9a4d2f;
  --accent-3: #345995;
  --soft: #e9f1ed;
  --danger: #a13d3d;
  --shadow: 0 18px 45px rgba(45, 39, 31, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

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

button {
  border: 0;
}

.app {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 12px clamp(16px, 4vw, 40px);
  background: rgba(255, 253, 248, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

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

.mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--accent);
  color: white;
  border-radius: 8px;
  font-weight: 800;
}

.brand strong {
  display: block;
  font-size: 15px;
}

.brand span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav button,
.ghost,
.primary,
.danger,
.mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.nav button,
.ghost,
.mini {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.nav button.active,
.primary {
  background: var(--accent);
  color: white;
}

.danger {
  background: var(--danger);
  color: white;
}

.mini {
  min-height: 32px;
  padding: 6px 9px;
  font-size: 13px;
}

button:active {
  transform: translateY(1px);
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(20px, 4vw, 42px);
  align-items: center;
  min-height: calc(100vh - 128px);
  padding: 26px 0 34px;
}

.hero h1 {
  max-width: 760px;
  margin: 0 0 16px;
  font-size: clamp(40px, 7vw, 88px);
  line-height: 0.94;
  letter-spacing: 0;
}

.hero p {
  max-width: 650px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

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

.photo-wall {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-self: stretch;
  min-height: 420px;
}

.photo-tile {
  position: relative;
  overflow: hidden;
  min-height: 170px;
  border-radius: 8px;
  background: var(--line);
  box-shadow: var(--shadow);
}

.photo-tile.large {
  grid-row: span 2;
}

.photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-tile span {
  position: absolute;
  left: 12px;
  bottom: 12px;
  max-width: calc(100% - 24px);
  padding: 6px 8px;
  background: rgba(255, 253, 248, 0.9);
  border-radius: 7px;
  font-size: 13px;
}

.grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.panel,
.card,
.editor,
.login-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(45, 39, 31, 0.07);
}

.panel {
  position: sticky;
  top: 84px;
  padding: 14px;
}

.panel h2,
.content h2,
.editor h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

.member-list {
  display: grid;
  gap: 8px;
}

.member-button {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}

.member-button.active {
  border-color: var(--accent);
  background: var(--soft);
}

.member-button small {
  color: var(--muted);
}

.notice {
  padding: 10px 12px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.content {
  display: grid;
  gap: 16px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 0 8px;
}

.page-head h1 {
  margin: 0;
  font-size: clamp(32px, 6vw, 58px);
  line-height: 1;
}

.page-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

.card {
  overflow: hidden;
}

.card-media {
  aspect-ratio: 16 / 9;
  background: #ddd;
}

.card-media img,
.video-frame iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  object-fit: cover;
}

.card-body {
  padding: 14px;
}

.card h3 {
  margin: 0 0 7px;
  font-size: 18px;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef0ec;
  color: #4e514d;
  font-size: 12px;
}

.block {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.block:first-child {
  border-top: 0;
}

.block h4 {
  margin: 0 0 5px;
}

.block p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.block-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.editor {
  padding: 16px;
}

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

.field {
  display: grid;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  color: var(--muted);
  font-size: 13px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 10px;
  color: var(--ink);
}

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

.help {
  margin-top: 14px;
  padding: 12px;
  border-radius: 8px;
  background: var(--soft);
  color: #21423d;
  line-height: 1.45;
  font-size: 14px;
}

.help ol {
  margin: 8px 0 0 20px;
  padding: 0;
}

.login-screen {
  min-height: calc(100vh - 65px);
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.login-box {
  width: min(680px, 100%);
  padding: 22px;
}

.login-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.empty {
  padding: 24px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.55);
}

@media (max-width: 860px) {
  .hero,
  .grid,
  .editor-grid,
  .cards {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .photo-wall {
    min-height: 320px;
  }

  .panel {
    position: static;
  }
}

@media (max-width: 560px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    justify-content: flex-start;
  }

  .login-options {
    grid-template-columns: 1fr;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .block {
    grid-template-columns: 1fr;
  }

  .block-actions {
    justify-content: flex-start;
  }
}
