:root {
  --bg: #fff6ef;
  --bg-soft: #f4f8ff;
  --paper: rgba(255, 255, 255, 0.82);
  --paper-strong: #ffffff;
  --ink: #16130f;
  --muted: #6e6458;
  --line: rgba(22, 19, 15, 0.11);
  --accent: #c8553d;
  --accent-soft: #ffe2d8;
  --accent-blue: #4f6dff;
  --accent-teal: #2a9d8f;
  --accent-gold: #f4b942;
  --shadow: 0 24px 64px rgba(54, 38, 22, 0.12);
  --notes-bg: #f2ede3;
  --notes-card: rgba(255, 250, 242, 0.8);
  --notes-line: rgba(31, 21, 15, 0.08);
  --note-own: linear-gradient(135deg, #d7b28a, #c48755);
  --note-other: #f6eee3;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

:root {
  --app-height: 100dvh;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button:disabled {
  opacity: 0.62;
  cursor: not-allowed;
  transform: none;
}

.blog-page,
.post-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(79, 109, 255, 0.16), transparent 24%),
    radial-gradient(circle at top left, rgba(244, 185, 66, 0.2), transparent 26%),
    radial-gradient(circle at 20% 55%, rgba(42, 157, 143, 0.12), transparent 28%),
    linear-gradient(180deg, var(--bg) 0%, #fff0e6 100%);
}

.notes-page,
.gallery-page {
  --paper: rgba(17, 23, 34, 0.78);
  --paper-strong: rgba(22, 29, 43, 0.96);
  --ink: #edf2ff;
  --muted: #9faecc;
  --line: rgba(147, 166, 208, 0.16);
  --accent: #8fb5ff;
  --accent-soft: rgba(61, 91, 158, 0.26);
  --shadow: 0 26px 60px rgba(2, 6, 23, 0.45);
  --notes-line: rgba(147, 166, 208, 0.16);
  --note-own: linear-gradient(135deg, #3d5d9e, #5978bb);
  --note-other: rgba(27, 36, 53, 0.96);
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(78, 107, 173, 0.28), transparent 24%),
    radial-gradient(circle at top left, rgba(59, 133, 128, 0.18), transparent 28%),
    radial-gradient(circle at bottom left, rgba(110, 98, 183, 0.2), transparent 24%),
    linear-gradient(180deg, #0c1119 0%, #131b28 48%, #0b1018 100%);
}

.notes-page {
  --paper: rgba(23, 31, 45, 0.78);
  --paper-strong: rgba(29, 39, 56, 0.95);
  --line: rgba(163, 181, 219, 0.18);
  --shadow: 0 24px 52px rgba(8, 13, 24, 0.36);
  min-height: var(--app-height);
  background:
    radial-gradient(circle at top right, rgba(103, 132, 201, 0.3), transparent 24%),
    radial-gradient(circle at top left, rgba(77, 153, 145, 0.18), transparent 28%),
    radial-gradient(circle at bottom left, rgba(126, 113, 196, 0.18), transparent 24%),
    linear-gradient(180deg, #161f2e 0%, #1b2637 48%, #131c29 100%);
}

.page-shell,
.notes-shell,
.gallery-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.page-shell {
  padding: 1.2rem 0 4rem;
}

.narrow-shell {
  width: min(820px, calc(100% - 2rem));
}

.site-nav,
.notes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-nav {
  margin-bottom: 2rem;
  padding: 0.75rem 0;
}

.brand-mark,
.mini-back {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mini-nav {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.mini-nav a,
.mini-back,
.back-link {
  color: var(--muted);
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.8fr);
  gap: 1.4rem;
  align-items: stretch;
  margin-bottom: 1.5rem;
}

.hero-copy-block,
.hero-note,
.search-strip,
.feature-panel,
.micro-column,
.post-card,
.post-article,
.notes-bar,
.notes-card,
.pin-card,
.settings-card,
.gallery-empty-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.hero-copy-block {
  padding: 2rem;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.84), rgba(255, 247, 238, 0.94)),
    radial-gradient(circle at top right, rgba(244, 185, 66, 0.14), transparent 28%);
}

.hero-note,
.feature-panel,
.micro-column,
.search-strip {
  padding: 1.4rem;
}

.hero-note {
  align-self: end;
  background:
    linear-gradient(160deg, rgba(255, 252, 246, 0.92), rgba(236, 247, 255, 0.9)),
    radial-gradient(circle at top right, rgba(79, 109, 255, 0.14), transparent 30%);
}

.eyebrow,
.feature-label,
.hero-note-label,
.panel-label,
.search-label {
  margin: 0 0 0.85rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.home-hero h1,
.section-heading h2,
.featured-story h2,
.post-card h3,
.post-article h1,
.notes-header h1,
.notes-card-head h2,
.pin-card h2,
.settings-card h2,
.gallery-empty-card h2 {
  margin: 0;
  font-family: "Playfair Display", serif;
  line-height: 1.02;
}

.home-hero h1 {
  font-size: clamp(2.8rem, 6vw, 5.4rem);
  max-width: 10ch;
}

.hero-copy,
.hero-note p,
.search-meta,
.section-heading p,
.post-excerpt,
.featured-story p,
.notes-copy,
.notes-tip p,
.notes-subtle,
.empty-chat p,
.pin-copy,
.article-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.hero-copy {
  max-width: 58ch;
  margin-top: 1rem;
  font-size: 1.03rem;
}

.search-strip {
  margin-bottom: 1.5rem;
}

.search-form {
  display: grid;
  gap: 0.7rem;
}

.search-input-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.8rem;
}

.search-input-wrap input,
.composer input,
.pin-form input {
  width: 100%;
  padding: 1rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 18px;
  outline: none;
  background: var(--paper-strong);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.search-input-wrap input:focus,
.composer input:focus,
.pin-form input:focus {
  border-color: rgba(133, 80, 47, 0.3);
  box-shadow: 0 0 0 4px rgba(133, 80, 47, 0.11);
  transform: translateY(-1px);
}

.search-button,
.send-button,
.upload-button,
.pin-form button {
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.search-button {
  width: 58px;
  height: 60px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff9f2;
  background: linear-gradient(135deg, #2539a8, #d65f47);
  box-shadow: 0 14px 24px rgba(37, 57, 168, 0.18);
}

.search-button:hover,
.send-button:hover,
.upload-button:hover,
.pin-form button:hover {
  transform: translateY(-2px);
}

.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.feature-panel {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 249, 242, 0.95)),
    radial-gradient(circle at bottom left, rgba(42, 157, 143, 0.14), transparent 28%);
}

.micro-column {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(242, 248, 255, 0.95)),
    radial-gradient(circle at top right, rgba(79, 109, 255, 0.14), transparent 30%);
}

.featured-story-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.85fr);
  gap: 1.2rem;
  align-items: center;
}

.featured-copy {
  display: grid;
  gap: 0.2rem;
}

.featured-media {
  min-height: 300px;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(135deg, #dce7ff, #ffe2d8);
  box-shadow: 0 24px 44px rgba(51, 50, 77, 0.14);
}

.featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-story h2 {
  margin-bottom: 0.9rem;
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.post-meta {
  margin: 0 0 0.85rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.read-link {
  display: inline-flex;
  align-items: center;
  margin-top: 1rem;
  color: var(--ink);
  font-weight: 700;
}

.read-link.subtle {
  color: var(--accent);
  margin-top: 1.2rem;
}

.author-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.author-pills span {
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.author-pills span:nth-child(2) {
  background: #dce7ff;
  color: #2948bb;
}

.author-pills span:nth-child(3) {
  background: #dff6ef;
  color: #1d7a6d;
}

.author-pills span:nth-child(4) {
  background: #fff0c9;
  color: #9a6710;
}

.posts-section {
  margin-top: 1rem;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.section-heading.compact {
  margin-bottom: 1rem;
}

.section-heading h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.post-card-link {
  display: block;
}

.post-card {
  height: 100%;
  padding: 0;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 70px rgba(42, 28, 17, 0.14);
}

.post-card h3 {
  font-size: 1.65rem;
  margin-bottom: 0.75rem;
}

.post-card-image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #dce7ff, #ffe2d8);
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.post-card:hover .post-card-image img {
  transform: scale(1.04);
}

.post-card-content {
  padding: 1.4rem;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 220px;
  text-align: center;
}

.post-detail {
  padding-bottom: 2rem;
}

.post-article {
  padding: 2.2rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 248, 241, 0.94)),
    radial-gradient(circle at top right, rgba(79, 109, 255, 0.12), transparent 25%);
}

.post-article h1 {
  font-size: clamp(2.5rem, 6vw, 4.6rem);
  margin-bottom: 1rem;
}

.article-body p + p {
  margin-top: 1rem;
}

.article-hero-image {
  margin: -0.5rem -0.5rem 1.5rem;
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 16 / 8.5;
  background: linear-gradient(135deg, #dce7ff, #ffe1cc);
}

.article-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.loading-card {
  text-align: center;
}

.related-section {
  margin-top: 1.25rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.notes-shell {
  min-height: calc(var(--app-height) - 1.9rem);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  padding: 0.95rem 0 1.8rem;
}

.gallery-shell {
  padding: 1.25rem 0 3rem;
}

.notes-shell.locked {
  opacity: 0.28;
  pointer-events: none;
  user-select: none;
  transform: scale(0.99);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.notes-header {
  align-items: center;
  margin-bottom: 0.8rem;
  padding: 0.1rem 0.15rem 0.85rem;
  border-bottom: 1px solid rgba(147, 166, 208, 0.12);
}

.notes-header h1 {
  font-size: clamp(1.95rem, 4.8vw, 3.2rem);
  letter-spacing: -0.04em;
}

.notes-copy {
  max-width: 52ch;
  margin-top: 0.45rem;
  font-size: 0.96rem;
  line-height: 1.6;
}

.notes-status-stack {
  display: grid;
  gap: 0.55rem;
  justify-items: end;
}

.presence-chip {
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--notes-line);
  border-radius: 999px;
  background: var(--paper-strong);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
}

.india-time-chip {
  padding: 0.6rem 0.85rem;
  border: 1px solid rgba(147, 166, 208, 0.12);
  border-radius: 999px;
  background: rgba(18, 26, 39, 0.78);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.notes-panel {
  display: grid;
  gap: 0.75rem;
}

.notes-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
  gap: 0.85rem;
  margin-bottom: 0.85rem;
  padding: 0.95rem;
}

.notes-tip {
  display: grid;
  align-content: center;
}

.notes-tip p {
  font-size: 0.94rem;
  line-height: 1.55;
}

.identity-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.identity-option {
  position: relative;
  cursor: pointer;
}

.identity-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.identity-option span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  padding: 0.72rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-strong);
  color: var(--muted);
  font-size: 0.92rem;
  transition: all 0.2s ease;
}

.identity-option input:checked + span {
  background: var(--accent-soft);
  border-color: rgba(143, 181, 255, 0.3);
  color: var(--accent);
}

.utility-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.utility-button,
.modal-close-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-strong);
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.utility-button:hover,
.modal-close-button:hover {
  transform: translateY(-1px);
  border-color: rgba(143, 181, 255, 0.35);
}

.utility-button {
  padding: 0.72rem 0.95rem;
  font-size: 0.88rem;
  font-weight: 700;
}

.utility-button.primary {
  background: linear-gradient(135deg, #4469b9, #6989cf);
  color: #f6f9ff;
  border-color: transparent;
}

.notes-card {
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0.85rem;
}

.notes-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.15rem 0.15rem 0.8rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid rgba(147, 166, 208, 0.12);
}

.notes-card-head h2 {
  font-size: clamp(1.4rem, 3.2vw, 2rem);
}

.notes-subtle {
  max-width: 26ch;
  font-size: 0.92rem;
  text-align: right;
}

.messages {
  flex: 1;
  min-height: 0;
  height: auto;
  overflow-y: auto;
  padding: 0.25rem 0.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.messages::-webkit-scrollbar {
  width: 8px;
}

.messages::-webkit-scrollbar-thumb {
  background: rgba(123, 151, 205, 0.3);
  border-radius: 999px;
}

.message {
  display: flex;
  width: 100%;
}

.message.own {
  justify-content: flex-end;
}

.message.other {
  justify-content: flex-start;
}

.message-bubble {
  max-width: min(74%, 460px);
  padding: 0.72rem 0.88rem;
  border: 1px solid var(--notes-line);
  border-radius: 24px;
  animation: riseIn 0.25s ease;
  box-shadow: 0 10px 24px rgba(5, 10, 18, 0.18);
}

.message.own .message-bubble {
  background: var(--note-own);
  color: #fffaf6;
  border-bottom-right-radius: 10px;
}

.message.other .message-bubble {
  background: var(--note-other);
  color: var(--ink);
  border-bottom-left-radius: 10px;
}

.message-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.28rem;
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 1;
}

.message-sender {
  font-weight: 700;
}

.message-time {
  opacity: 0.72;
  font-variant-numeric: tabular-nums;
}

.message-bubble p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.5;
  word-break: break-word;
}

.attachment-preview,
.file-link {
  display: inline-flex;
  margin-top: 0.55rem;
}

.attachment-preview img {
  max-height: 200px;
  border-radius: 18px;
  object-fit: cover;
}

.attachment-preview video {
  max-width: min(100%, 320px);
  max-height: 220px;
  border-radius: 18px;
  background: #0d1320;
}

.file-link {
  color: inherit;
  font-weight: 700;
}

.empty-chat {
  display: grid;
  place-items: center;
  height: 100%;
  min-height: 220px;
  text-align: center;
}

.composer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.75rem;
  padding-top: 0.85rem;
  padding-bottom: max(env(safe-area-inset-bottom), 0px);
  border-top: 1px solid rgba(147, 166, 208, 0.12);
  background:
    linear-gradient(180deg, rgba(11, 16, 24, 0) 0%, rgba(11, 16, 24, 0.78) 22%, rgba(11, 16, 24, 1) 100%);
}

.composer input {
  min-width: 0;
  height: 54px;
  padding: 0 1.1rem;
  border-radius: 999px;
  background: var(--paper-strong);
  border: 1px solid rgba(147, 166, 208, 0.12);
  color: #f3f7ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.composer input::placeholder,
.pin-form input::placeholder {
  color: var(--muted);
}

.upload-button {
  width: 50px;
  height: 50px;
  border-radius: 999px;
  color: var(--accent);
  background: rgba(46, 62, 102, 0.9);
}

.send-button,
.pin-form button {
  padding: 0.95rem 1.2rem;
  border-radius: 18px;
  color: #f4f8ff;
  font-weight: 700;
  background: linear-gradient(135deg, #243a6a, #5071bb);
  box-shadow: 0 14px 28px rgba(17, 33, 67, 0.28);
}

.send-button {
  width: 50px;
  height: 50px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  background: linear-gradient(135deg, #5b7fd7, #88a6eb);
  box-shadow: 0 12px 22px rgba(72, 112, 217, 0.24);
}

.pin-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(5, 10, 18, 0.55);
  backdrop-filter: blur(10px);
  z-index: 20;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.settings-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(5, 10, 18, 0.55);
  backdrop-filter: blur(12px);
  z-index: 25;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.pin-modal.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.settings-modal.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.pin-card {
  width: min(420px, 100%);
  padding: 2rem;
}

.settings-card {
  width: min(520px, 100%);
  padding: 1.5rem;
}

.pin-card h2 {
  font-size: clamp(2rem, 5vw, 3rem);
}

.settings-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.modal-close-button {
  width: 42px;
  height: 42px;
  font-size: 1.5rem;
  line-height: 1;
}

.settings-copy {
  margin: 1rem 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.settings-status {
  min-height: 1.3rem;
  margin: 1rem 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.pin-form {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.2rem;
}

.pin-form input {
  text-align: center;
  letter-spacing: 0.22em;
}

.pin-error {
  min-height: 1.2rem;
  margin: 0.8rem 0 0;
  color: #ff897d;
  font-weight: 700;
}

.gallery-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.gallery-header h1 {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  line-height: 1.02;
}

.gallery-copy {
  max-width: 58ch;
  margin: 0.95rem 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.gallery-meta {
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-strong);
  color: var(--accent);
  font-weight: 700;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.gallery-card,
.gallery-empty-card {
  overflow: hidden;
}

.gallery-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 42px rgba(5, 10, 18, 0.3);
}

.gallery-card-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(91, 117, 182, 0.5), rgba(42, 57, 86, 0.9));
}

.gallery-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-card-image video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0d1320;
}

.gallery-card-body {
  padding: 1rem;
}

.gallery-card-meta,
.gallery-card-link,
.gallery-empty-card p,
.gallery-file-name {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.gallery-file-card {
  display: grid;
  align-content: start;
}

.gallery-file-icon {
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 1rem;
  border-bottom: 1px solid rgba(147, 166, 208, 0.12);
  background: linear-gradient(135deg, rgba(91, 117, 182, 0.35), rgba(31, 45, 72, 0.85));
  color: #f3f7ff;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.gallery-file-name {
  margin-top: 0.45rem;
  word-break: break-word;
}

.gallery-card-link {
  margin-top: 0.55rem;
  color: var(--accent);
  font-weight: 700;
}

.gallery-empty-card {
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: 1.5rem;
  text-align: center;
}

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

@media (max-width: 920px) {
  .home-hero,
  .home-layout,
  .notes-bar,
  .featured-story-grid {
    grid-template-columns: 1fr;
  }

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

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

  .site-nav,
  .notes-header,
  .section-heading,
  .notes-card-head,
  .gallery-header {
    display: grid;
    gap: 0.8rem;
  }

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

@media (max-width: 640px) {
  .page-shell,
  .notes-shell,
  .gallery-shell,
  .narrow-shell {
    width: min(100% - 1rem, 100%);
  }

  .page-shell,
  .notes-shell,
  .gallery-shell {
    padding-top: 0.8rem;
  }

  .notes-shell {
    min-height: calc(var(--app-height) - 1rem);
  }

  .home-hero h1,
  .post-article h1,
  .notes-header h1 {
    max-width: none;
    font-size: 2.2rem;
  }

  .hero-copy-block,
  .hero-note,
  .search-strip,
  .feature-panel,
  .micro-column,
  .post-card,
  .post-article,
  .notes-bar,
  .notes-card,
  .pin-card,
  .settings-card,
  .gallery-card,
  .gallery-empty-card {
    border-radius: 22px;
  }

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

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

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

  .search-input-wrap {
    grid-template-columns: 1fr;
  }

  .search-button,
  .upload-button,
  .send-button {
    width: 100%;
  }

  .composer {
    grid-template-columns: auto 1fr auto;
  }

  .upload-button,
  .send-button {
    width: 44px;
    height: 44px;
  }

  .message-bubble {
    max-width: 92%;
  }

  .mini-nav {
    gap: 0.75rem;
  }

  .notes-status-stack {
    justify-items: start;
  }

  .settings-actions,
  .utility-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .notes-subtle {
    text-align: left;
  }
}
