/* Wallace HQ — modern brand system */
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Instrument+Sans:wght@500;600;700&display=swap");

:root {
  /* Brand */
  --brand: #4f46e5;
  --brand-hover: #4338ca;
  --brand-soft: #eef2ff;
  --brand-glow: rgba(79, 70, 229, 0.22);
  --brand-2: #0ea5e9;
  --brand-3: #14b8a6;

  /* Neutrals */
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --paper: #f1f5f9;
  --paper-2: #e2e8f0;
  --card: #ffffff;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;

  /* Feedback */
  --danger-bg: #fef2f2;
  --danger-ink: #991b1b;
  --danger-line: #fecaca;
  --success-bg: #ecfdf5;
  --success-ink: #065f46;
  --success-line: #a7f3d0;

  /* Chrome */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 10px 24px -8px rgba(15, 23, 42, 0.1);
  --shadow-lg: 0 20px 40px -16px rgba(15, 23, 42, 0.18);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Instrument Sans", "DM Sans", system-ui, sans-serif;
  --max: 1100px;
  --header-h: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.6;
  background:
    radial-gradient(900px 420px at 0% -10%, rgba(79, 70, 229, 0.09), transparent 55%),
    radial-gradient(700px 360px at 100% 0%, rgba(14, 165, 233, 0.08), transparent 50%),
    var(--paper);
}

a {
  color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--brand-hover);
}

img {
  max-width: 100%;
}

/* ——— Header / brand ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 11px;
  background: linear-gradient(145deg, #6366f1 0%, #4f46e5 55%, #4338ca 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: 0 6px 16px var(--brand-glow);
  letter-spacing: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text small {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-pill);
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-links a:hover {
  background: var(--paper);
  color: var(--ink);
}

.nav-links a.active {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}

.nav-links a.btn-nav {
  background: var(--brand);
  color: #fff;
  margin-left: 0.25rem;
  box-shadow: 0 4px 12px var(--brand-glow);
}

.nav-links a.btn-nav:hover {
  background: var(--brand-hover);
  color: #fff;
}

/* ——— Layout ——— */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.page-hero {
  margin-bottom: 1.75rem;
}

.page-hero p {
  color: var(--ink-soft);
  max-width: 40rem;
  margin: 0;
  font-size: 1.05rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 0.65rem;
  background: var(--brand-soft);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-pill);
}

h1,
h2,
h3 {
  font-family: var(--display);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
  color: var(--ink);
}

h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.45rem, 2.8vw, 1.9rem);
  font-weight: 700;
}

h3 {
  font-weight: 600;
}

.lead {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 36rem;
  margin: 0 0 1.5rem;
  line-height: 1.65;
}

/* ——— Hero ——— */
.hero {
  display: grid;
  gap: 1.75rem;
  padding: 2rem 0 0.5rem;
}

@media (min-width: 860px) {
  .hero {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    padding: 3rem 0 1.5rem;
    gap: 2.5rem;
  }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

.hero-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.hero-card > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.stat {
  background: var(--paper);
  border-radius: var(--radius-sm);
  padding: 0.9rem 0.55rem;
  text-align: center;
  border: 1px solid transparent;
}

.stat strong {
  display: block;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: -0.02em;
}

.stat span {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.72rem 1.3rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(180deg, #6366f1 0%, var(--brand) 100%);
  color: #fff;
  box-shadow: 0 6px 16px var(--brand-glow);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #5558e6 0%, var(--brand-hover) 100%);
  color: #fff;
}

.btn-secondary {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  color: var(--ink);
  border-color: var(--brand);
  background: var(--brand-soft);
}

/* ——— Sections / cards ——— */
.section {
  margin-top: 3.25rem;
}

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

.section-head p {
  margin: 0;
  color: var(--muted);
  max-width: 28rem;
  font-size: 0.98rem;
}

.card-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 700px) {
  .card-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .card-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: #c7d2fe;
}

.feature-card .icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  background: var(--brand-soft);
  border: 1px solid #e0e7ff;
}

.feature-card.sage .icon {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.feature-card.play .icon {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.feature-card h3 {
  font-size: 1.15rem;
  margin: 0;
}

.feature-card p {
  margin: 0;
  color: var(--ink-soft);
  flex: 1;
  font-size: 0.95rem;
}

.feature-card a.more {
  font-weight: 600;
  text-decoration: none;
  color: var(--brand);
  font-size: 0.92rem;
}

.feature-card a.more:hover {
  color: var(--brand-hover);
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.4rem;
}

.panel-narrow {
  max-width: 720px;
}

/* ——— Forms ——— */
.form-stack {
  display: grid;
  gap: 1rem;
}

.form-row {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .form-row.two {
    grid-template-columns: 1fr 1fr;
  }
}

label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-soft);
}

input,
textarea,
select {
  font: inherit;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.72rem 0.9rem;
  background: #fff;
  color: var(--ink);
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:hover,
textarea:hover {
  border-color: #94a3b8;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input[type="file"] {
  font: inherit;
  padding: 0.5rem 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

input[type="file"]:hover,
input[type="file"]:focus {
  border: none;
  box-shadow: none;
}

.alert {
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.93rem;
}

.alert-error {
  background: var(--danger-bg);
  color: var(--danger-ink);
  border: 1px solid var(--danger-line);
}

.alert-success {
  background: var(--success-bg);
  color: var(--success-ink);
  border: 1px solid var(--success-line);
}

.note {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.75rem;
}

.muted-note {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 400;
}

/* ——— Auth ——— */
.login-wrap {
  max-width: 420px;
  margin: 1.5rem auto 0;
}

.login-wrap.wide {
  max-width: 480px;
}

.login-wrap .page-hero {
  text-align: center;
}

.login-wrap .page-hero p {
  margin-left: auto;
  margin-right: auto;
}

/* ——— Family Connect feed ——— */
.composer {
  margin-bottom: 1.25rem;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 0.25rem 0.75rem 0.25rem 0.25rem;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.user-chip .avatar {
  width: 1.6rem;
  height: 1.6rem;
  font-size: 0.75rem;
}

.post-list {
  display: grid;
  gap: 1rem;
}

.post-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.post-meta strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.post-meta time {
  font-size: 0.78rem;
  color: var(--muted);
}

.avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: linear-gradient(145deg, #818cf8, #4f46e5);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-family: var(--display);
  font-size: 0.95rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px var(--brand-glow);
}

.post-body {
  margin: 0;
  white-space: pre-wrap;
  color: var(--ink);
  line-height: 1.6;
  font-size: 0.98rem;
}

.post-photo {
  margin: 0.85rem 0 0.35rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0f172a;
}

.post-photo img {
  display: block;
  width: 100%;
  max-height: 480px;
  object-fit: contain;
  background: #0f172a;
}

.empty-state {
  text-align: center;
  padding: 2.75rem 1.25rem;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.65);
}

.react-summary {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.85rem;
}

.react-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 0.2rem 0.6rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.react-bar {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.2rem;
  margin: 0.65rem 0 0;
  padding: 0.65rem 0 0;
  border-top: 1px solid var(--line);
  width: 100%;
}

.react-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid transparent;
  background: transparent;
  border-radius: var(--radius-pill);
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
  transition: background 0.12s ease, transform 0.12s ease, border-color 0.12s ease;
}

.react-btn:hover {
  background: var(--brand-soft);
  transform: scale(1.08);
}

.react-btn.active {
  background: var(--brand-soft);
  border-color: #c7d2fe;
}

.comment .react-bar {
  margin-top: 0.35rem;
  padding-top: 0.25rem;
  border-top: none;
}

.comments-block {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

.comments-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 0.7rem;
  color: var(--muted);
  font-family: var(--font);
}

.comment-list {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 0.9rem;
}

.comment {
  background: var(--paper);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  border: 1px solid transparent;
}

.comment-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem;
  margin-bottom: 0.2rem;
}

.comment-head strong {
  font-size: 0.9rem;
}

.comment-head time {
  font-size: 0.75rem;
  color: var(--muted);
}

.comment p {
  margin: 0 0 0.25rem;
  white-space: pre-wrap;
  font-size: 0.93rem;
}

.comment-form textarea {
  min-height: 64px;
}

.comment-form .btn {
  justify-self: start;
}

/* ——— Games ——— */
.game-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 700px) {
  .game-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.game-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.game-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.game-banner {
  height: 128px;
  display: grid;
  place-items: center;
  font-size: 2.5rem;
  color: #fff;
  position: relative;
}

.game-banner.snake {
  background: linear-gradient(135deg, #059669, #10b981);
}
.game-banner.memory {
  background: linear-gradient(135deg, #4f46e5, #818cf8);
}
.game-banner.breakout {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
}
.game-banner.wordle {
  background: linear-gradient(135deg, #0f766e, #2dd4bf);
}

.game-card .body {
  padding: 1.2rem 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}

.game-card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.game-card p {
  margin: 0;
  color: var(--ink-soft);
  flex: 1;
  font-size: 0.95rem;
}

.game-shell {
  max-width: 640px;
  margin: 0 auto;
}

.game-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.score-pill {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 0.4rem 0.95rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
}

.canvas-wrap {
  background: #0f172a;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: center;
  border: 1px solid #1e293b;
}

canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

.game-help {
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.memory-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
}

.memory-card {
  aspect-ratio: 1;
  border: none;
  border-radius: 12px;
  background: linear-gradient(145deg, #4f46e5, #312e81);
  color: transparent;
  font-size: 1.8rem;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.memory-card.flipped,
.memory-card.matched {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.memory-card.matched {
  opacity: 0.7;
}

.memory-card:active {
  transform: scale(0.96);
}

.wordle-grid {
  display: grid;
  gap: 0.4rem;
  justify-content: center;
  margin: 1rem 0;
}

.wordle-row {
  display: grid;
  grid-template-columns: repeat(5, 3rem);
  gap: 0.4rem;
}

.wordle-cell {
  width: 3rem;
  height: 3rem;
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.25rem;
  text-transform: uppercase;
  background: #fff;
}

.wordle-cell.correct {
  background: #059669;
  border-color: #059669;
  color: #fff;
}
.wordle-cell.present {
  background: #d97706;
  border-color: #d97706;
  color: #fff;
}
.wordle-cell.absent {
  background: #64748b;
  border-color: #64748b;
  color: #fff;
}

.wordle-keys {
  display: grid;
  gap: 0.35rem;
  max-width: 480px;
  margin: 0 auto;
}

.wordle-keys .row {
  display: flex;
  justify-content: center;
  gap: 0.3rem;
}

.wordle-keys button {
  min-width: 2rem;
  height: 2.7rem;
  border: none;
  border-radius: 8px;
  background: var(--paper-2);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0 0.45rem;
}

.wordle-keys button.wide {
  min-width: 3.5rem;
  font-size: 0.75rem;
}

.wordle-keys button.correct {
  background: #059669;
  color: #fff;
}
.wordle-keys button.present {
  background: #d97706;
  color: #fff;
}
.wordle-keys button.absent {
  background: #64748b;
  color: #fff;
}

/* ——— Footer ——— */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 1rem;
  padding: 2rem 1.25rem 2.75rem;
  color: var(--muted);
  text-align: center;
  font-size: 0.88rem;
  background: rgba(255, 255, 255, 0.4);
}

.site-footer strong {
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
}

.site-footer p {
  margin: 0;
}

/* ——— Family Files shared drive ——— */
.files-breadcrumb {
  margin-top: 1rem;
  font-size: 0.92rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.15rem;
  align-items: center;
}

.files-breadcrumb a {
  text-decoration: none;
  font-weight: 600;
  color: var(--brand);
}

.files-breadcrumb a:hover {
  text-decoration: underline;
}

.files-actions-grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 800px) {
  .files-actions-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.files-panel-title {
  font-size: 1rem;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.files-browser {
  padding: 0;
  overflow: hidden;
}

.files-browser .files-panel-title {
  padding: 1.15rem 1.35rem 0;
}

.files-table-wrap {
  overflow-x: auto;
}

.files-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}

.files-table th {
  text-align: left;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.files-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.files-table tr:last-child td {
  border-bottom: none;
}

.files-table tbody tr:hover {
  background: #f8fafc;
}

.files-icon {
  width: 2.2rem;
  text-align: center;
  font-size: 1.1rem;
}

.files-name a {
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
}

.files-name a:hover {
  color: var(--brand);
}

.files-meta {
  color: var(--muted);
  white-space: nowrap;
  font-size: 0.86rem;
}

.files-actions {
  text-align: right;
  white-space: nowrap;
}

.files-actions .btn-link,
.files-actions a.btn-link {
  display: inline;
  margin-left: 0.65rem;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--brand);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}

.files-actions .btn-link.danger,
.files-actions button.danger {
  color: #dc2626;
}

.inline-form {
  display: inline;
  margin: 0;
}

.files-browser .empty-state {
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

/* ——— Responsive nav ——— */
@media (max-width: 720px) {

  .site-header {
    height: auto;
    min-height: var(--header-h);
  }

  .nav-inner {
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1rem;
    gap: 0.6rem;
  }

  .nav-links {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.15rem;
    -webkit-overflow-scrolling: touch;
  }

  .nav-links a {
    white-space: nowrap;
    font-size: 0.85rem;
    padding: 0.4rem 0.65rem;
  }

  .nav-links a.btn-nav {
    margin-left: 0;
  }
}
