:root {
  --ground: #1B2A3A;
  --text: #F2EDE4;
  --accent: #B08D57;
  --card-bg: #24354A;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: Georgia, 'Times New Roman', serif;
  min-height: 100vh;
}

header {
  position: sticky;
  top: 0;
  background: var(--ground);
  padding: 20px 16px 0 16px;
  border-bottom: 1px solid rgba(242, 237, 228, 0.15);
  z-index: 5;
}

h1 {
  font-size: 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 16px 0;
  font-weight: 400;
  opacity: 0.85;
}

nav {
  display: flex;
  gap: 4px;
}

.tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--text);
  opacity: 0.55;
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 0.1em;
  padding: 12px 0;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.tab.active {
  opacity: 1;
  border-bottom: 2px solid var(--accent);
}

.panel {
  display: none;
  padding: 16px;
  max-width: 640px;
  margin: 0 auto;
}

.panel.active { display: block; }

.card {
  background: var(--card-bg);
  border-radius: 6px;
  padding: 18px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card .imam {
  font-weight: 700;
  letter-spacing: 0.05em;
}

.card .meta {
  font-size: 13px;
  opacity: 0.7;
}

.card button.review {
  align-self: flex-start;
  margin-top: 8px;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 8px 16px;
  font-family: inherit;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.empty {
  opacity: 0.6;
  padding: 32px 0;
  text-align: center;
}

.post-view {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 10;
  display: flex;
  flex-direction: column;
}

.post-view.hidden { display: none; }

#close-post {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 32px;
  cursor: pointer;
  z-index: 2;
}

.viewer {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.viewer img {
  max-width: 92vw;
  max-height: 78vh;
  object-fit: contain;
}

.viewer-count {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  opacity: 0.7;
}

.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text);
  font-size: 40px;
  padding: 8px 16px;
  cursor: pointer;
}

.nav-arrow.left { left: 0; }
.nav-arrow.right { right: 0; }

.post-actions {
  display: flex;
  gap: 12px;
  padding: 16px;
}

.post-actions a,
.post-actions button {
  flex: 1;
  text-align: center;
  background: var(--accent);
  color: #1B2A3A;
  border: none;
  padding: 14px 0;
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-decoration: none;
  cursor: pointer;
}
