/* style.css - Modern responsive gallery with glassmorphism and dark theme */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Sora:wght@600;700;800&display=swap');

:root {
  --tone-bg: #0d1215;
  --tone-bg-soft: #131b20;
  --tone-surface: rgba(255, 255, 255, 0.07);
  --tone-border: rgba(255, 255, 255, 0.14);
  --tone-text: #e8eff3;
  --tone-muted: #9fb1bc;
  --tone-accent: #1ec48f;
  --tone-accent-strong: #15a777;
}

/* Reset and base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  font-family: 'Manrope', 'Segoe UI', sans-serif;
  background: #0a0a0a;
  color: #e0e0e0;
  line-height: 1.5;
}

h1,
h2,
h3 {
  font-family: 'Sora', 'Segoe UI', sans-serif;
}
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.header h1 {
  font-size: 1.8rem;
  color: #fff;
}
.header a {
  color: #90caf9;
  text-decoration: none;
  font-weight: 500;
}

.header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.header a:hover {
  text-decoration: underline;
}

.search-form {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.search-input {
  width: 100%;
  min-width: 220px;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(0, 0, 0, 0.2);
  color: #e0e0e0;
}
.search-btn {
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  background: #90caf9;
  color: #0a0a0a;
  border: none;
  cursor: pointer;
  font-weight: 600;
}
.search-btn:hover {
  background: #64b5f6;
}

.filter-panel {
  margin: 1rem 2rem 0;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255,255,255,0.08);
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.9rem;
}

.field-block {
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 0.65rem;
}

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

.field-block p,
.field-block label {
  font-size: 0.9rem;
}

.field-block p {
  margin-bottom: 0.45rem;
  color: #d8e7ff;
  font-weight: 600;
}

.field-block label {
  display: block;
  margin-bottom: 0.35rem;
}

.check-option {
  display: flex;
  align-items: center;
  gap: 0.52rem;
  padding: 0.42rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.check-option:hover {
  border-color: rgba(30, 196, 143, 0.55);
  background: rgba(30, 196, 143, 0.09);
}

.inline-check-option {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
}

.filter-check {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(0, 0, 0, 0.35);
  margin: 0;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease, background-color 0.2s ease;
}

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

.filter-check:checked {
  background: var(--tone-accent);
  border-color: var(--tone-accent);
  box-shadow: inset 0 0 0 3px #0d1215;
}

.filter-check:focus-visible {
  outline: 2px solid rgba(30, 196, 143, 0.72);
  outline-offset: 1px;
}

.field-block input[type="text"],
.field-block select {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.2);
  color: #e0e0e0;
}

.field-block select {
  appearance: none;
  -webkit-appearance: none;
}

.select-shell {
  position: relative;
  margin-top: 0.35rem;
}

.select-shell::after {
  content: '';
  pointer-events: none;
  position: absolute;
  right: 0.85rem;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(219, 236, 245, 0.9);
  border-bottom: 2px solid rgba(219, 236, 245, 0.9);
  transform: translateY(-65%) rotate(45deg);
}

.filter-select {
  margin-top: 0;
  padding: 0.62rem 2.25rem 0.62rem 0.7rem;
  border-radius: 10px;
  border: 1px solid rgba(165, 213, 231, 0.32);
  background: linear-gradient(180deg, rgba(25, 34, 40, 0.96), rgba(15, 21, 25, 0.96));
  color: #ebf5fb;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.field-block select:focus,
.field-block input[type="text"]:focus {
  outline: none;
  border-color: rgba(30, 196, 143, 0.8);
  box-shadow: 0 0 0 2px rgba(30, 196, 143, 0.2);
}

.filter-select:hover {
  border-color: rgba(30, 196, 143, 0.65);
  background: linear-gradient(180deg, rgba(30, 40, 47, 0.96), rgba(18, 24, 30, 0.96));
}

.filter-select option {
  color: #0f1b23;
  background-color: #f4f8fb;
}

.field-block input[type="checkbox"] {
  margin-right: 0.3rem;
}

.filter-actions {
  margin-top: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.reset-link {
  color: #d7e7fa;
  text-decoration: none;
}

.reset-link:hover {
  text-decoration: underline;
}

/* Gallery */
.gallery {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  padding: 1rem 2rem;
}
.card {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}
.card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.card-copy-btn {
  position: absolute;
  right: 0.55rem;
  bottom: 0.55rem;
  backdrop-filter: blur(4px);
}

.card-copy-row {
  position: absolute;
  right: 0.45rem;
  bottom: 0.45rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

/* Footer pagination */
.footer {
  padding: 1rem 2rem;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(8px);
  text-align: center;
}
.pagination a {
  color: #90caf9;
  text-decoration: none;
  font-weight: 500;
}
.pagination a:hover {
  text-decoration: underline;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
}

.page-number,
.page-nav,
.page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 0.6rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(0,0,0,0.18);
}

.page-number.active {
  background: #90caf9;
  color: #091018;
  border-color: transparent;
  font-weight: 700;
}

.page-ellipsis {
  color: rgba(255,255,255,0.7);
}

/* Settings page */
.settings-form {
  max-width: 400px;
  margin: 2rem auto;
  background: rgba(255,255,255,0.07);
  padding: 2rem;
  border-radius: 12px;
  backdrop-filter: blur(12px);
}
.settings-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}
.settings-form input[type="text"] {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  background: rgba(0,0,0,0.2);
  color: #e0e0e0;
}
.settings-form button {
  margin-top: 1rem;
  width: 100%;
  padding: 0.6rem;
  background: #90caf9;
  border: none;
  border-radius: 6px;
  color: #0a0a0a;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.settings-form button:hover {
  background: #64b5f6;
}

.inline-form {
  margin-top: 0.8rem;
}

.secondary-btn {
  width: 100%;
  padding: 0.55rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.25);
  background: transparent;
  color: #e0e0e0;
  cursor: pointer;
}

.secondary-btn:hover {
  background: rgba(255,255,255,0.08);
}

.status-message {
  max-width: 900px;
  margin: 1rem auto;
  padding: 0.8rem 1rem;
  border-radius: 8px;
}

.status-success {
  color: #7be495;
  background: rgba(42, 82, 56, 0.35);
}

.status-error {
  color: #ffb3b3;
  background: rgba(104, 35, 35, 0.4);
}

.status-info {
  color: #dce9f7;
  background: rgba(34, 51, 73, 0.45);
}

.content-panel {
  max-width: 1100px;
  margin: 1rem auto;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.content-panel h2 {
  margin-bottom: 0.8rem;
}

.kv-list {
  display: grid;
  gap: 0.6rem;
}

.pill {
  display: inline-block;
  margin: 0 0.35rem 0.35rem 0;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.2);
  font-size: 0.85rem;
}

.detail-tags-card .tag-pill {
  color: #fef4e6;
  border: 1px solid rgba(255, 166, 102, 0.48);
  background: linear-gradient(160deg, rgba(255, 137, 67, 0.36), rgba(120, 52, 255, 0.28));
  transition: transform 0.16s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

a.tag-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 190, 120, 0.82);
  box-shadow: 0 3px 10px rgba(255, 131, 52, 0.22);
  text-decoration: none;
}

.muted-text {
  color: rgba(255, 255, 255, 0.65);
}

.inline-query {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.inline-query input[type="text"] {
  min-width: 260px;
  flex: 1;
  padding: 0.45rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.2);
  color: #e0e0e0;
}

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

.collection-table {
  width: 100%;
  border-collapse: collapse;
}

.collection-table th,
.collection-table td {
  text-align: left;
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.collection-table a {
  color: #90caf9;
  text-decoration: none;
}

.collection-table a:hover {
  text-decoration: underline;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.compact-btn {
  width: auto;
  margin-top: 0;
}

.detail-container {
  max-width: 1100px;
  margin: 1.2rem auto;
  background: rgba(255, 255, 255, 0.07);
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-image-wrap {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #060b10;
  cursor: zoom-in;
}

.detail-image-wrap.image-ready {
  background: #000;
}

.detail-image {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.detail-image-wrap:fullscreen {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 0;
  background: #000;
  cursor: zoom-out;
}

.detail-image-wrap:fullscreen .detail-image {
  width: auto;
  max-width: 100vw;
  max-height: 100vh;
  object-fit: contain;
  border-radius: 0;
  box-shadow: none;
}

.image-fullscreen-hint {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(4, 10, 14, 0.62);
  color: #ebf5ff;
  font-size: 0.78rem;
  padding: 0.24rem 0.58rem;
  cursor: pointer;
  backdrop-filter: blur(4px);
  z-index: 3;
}

.image-fullscreen-hint:hover {
  background: rgba(12, 22, 29, 0.76);
}

.image-loader {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.8rem 0.9rem;
  background: linear-gradient(to top, rgba(2, 5, 8, 0.88), rgba(2, 5, 8, 0.18));
  z-index: 2;
  transition: opacity 0.2s ease;
}

.image-loader.is-done {
  opacity: 0;
}

.image-loader-text {
  margin: 0;
  font-size: 0.82rem;
  color: #dce9f8;
}

.image-loader-track {
  margin-top: 0.4rem;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

.image-loader-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4fd7a5, #44a8ff);
  transition: width 0.15s linear;
}

.detail-image-wrap:fullscreen .image-loader {
  inset: auto 1rem 1rem 1rem;
  border-radius: 10px;
}

.detail-headline {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.detail-actions .secondary-btn {
  width: auto;
  margin-top: 0;
}

.detail-meta-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.55rem;
}

.detail-meta-grid a {
  color: #90caf9;
  text-decoration: none;
}

.detail-meta-grid a:hover {
  text-decoration: underline;
}

.detail-extra-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
}

.detail-card {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.75rem;
}

.detail-card h3 {
  margin-bottom: 0.6rem;
}

.uploader-avatar {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  object-fit: cover;
}

.color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.swatch {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  display: inline-block;
}

.footer-actions {
  margin-top: 1rem;
}

.quick-links-panel h3 {
  margin-bottom: 0.65rem;
}

.quick-links-row {
  margin-bottom: 0.55rem;
}

.tiny-btn {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.26);
  color: #e0e0e0;
  padding: 0.2rem 0.45rem;
  cursor: pointer;
  font-size: 0.78rem;
}

.tiny-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.color-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-right: 0.4rem;
  margin-bottom: 0.45rem;
}

.color-code {
  font-size: 0.82rem;
  color: #dce7f5;
}

.exif-list {
  margin-bottom: 0.65rem;
}

body.modal-open {
  overflow: hidden;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
}

.modal-overlay[hidden] {
  display: none !important;
}

.modal-card {
  width: min(560px, 100%);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #111826;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  padding: 1rem;
}

.modal-card h3 {
  margin-bottom: 0.55rem;
}

.modal-body p {
  margin-bottom: 0.5rem;
}

.modal-body code {
  display: inline-block;
  padding: 0.15rem 0.35rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
}

.modal-steps {
  margin: 0.5rem 0 0.8rem 1.2rem;
}

.modal-steps li {
  margin-bottom: 0.35rem;
}

.modal-actions {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

/* Home redesign */
.home-body {
  background:
    radial-gradient(1200px 640px at -10% -10%, rgba(16, 169, 125, 0.22), transparent 60%),
    radial-gradient(900px 540px at 110% 10%, rgba(43, 129, 245, 0.14), transparent 60%),
    var(--tone-bg);
  color: var(--tone-text);
}

.home-header {
  position: sticky;
  top: 0;
  z-index: 30;
  margin: 0.9rem 1.6rem 0;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--tone-border);
  background: rgba(9, 14, 18, 0.72);
  backdrop-filter: blur(12px);
}

.home-brand {
  font-family: 'Sora', 'Segoe UI', sans-serif;
  letter-spacing: 0.6px;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
}

.home-nav {
  display: flex;
  flex-wrap: wrap;
  /*gap: 0.45rem;*/
}

.home-nav a {
  text-decoration: none;
  color: var(--tone-text);
  font-size: 0.92rem;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.home-nav a:hover {
  border-color: var(--tone-border);
  background: rgba(255, 255, 255, 0.08);
}

.home-main {
  padding-bottom: 1rem;
}

.page-main {
  margin: 1rem 1.6rem 0;
}

.page-intro h1 {
  margin-bottom: 0.35rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.page-intro p {
  color: var(--tone-muted);
}

.home-hero {
  position: relative;
  overflow: hidden;
  min-height: 500px;
  margin: 1rem 1.6rem 0;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(135deg, rgba(14, 25, 33, 0.9), rgba(11, 17, 23, 0.95)),
    linear-gradient(160deg, #1d2d35, #0f1519 70%);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(700px 300px at 50% 20%, rgba(32, 246, 176, 0.22), transparent 60%),
    linear-gradient(to bottom, rgba(9, 13, 16, 0.2), rgba(6, 9, 12, 0.88));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 1.5rem 1.3rem;
  text-align: center;
}

.hero-eyebrow {
  color: #d8fff2;
  letter-spacing: 0.18em;
  font-size: 0.76rem;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.hero-content h1 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.1;
  margin-bottom: 0.9rem;
  color: #ffffff;
}

.hero-subtitle {
  color: #d3e1ea;
  margin-bottom: 1.2rem;
}

.hero-search-form {
  display: flex;
  gap: 0.6rem;
  max-width: 760px;
  margin: 0 auto;
  padding: 0.7rem;
  border-radius: 14px;
  background: rgba(4, 7, 10, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-search-input {
  flex: 1;
  border: none;
  border-radius: 10px;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.95);
  color: #0a1215;
  font-size: 1rem;
}

.hero-search-input:focus {
  outline: 2px solid rgba(30, 196, 143, 0.42);
  outline-offset: 0;
}

.hero-search-btn {
  border: none;
  border-radius: 10px;
  background: var(--tone-accent);
  color: #04130d;
  font-weight: 800;
  padding: 0.8rem 1.25rem;
  cursor: pointer;
}

.hero-search-btn:hover {
  background: var(--tone-accent-strong);
  color: #f4fffb;
}

.hero-chip-row {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.hero-chip {
  text-decoration: none;
  color: #dce8ef;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font-size: 0.86rem;
  background: rgba(0, 0, 0, 0.35);
}

.hero-chip:hover,
.hero-chip.active {
  background: rgba(30, 196, 143, 0.2);
  border-color: rgba(30, 196, 143, 0.78);
}

.advanced-filters {
  margin-top: 1.1rem;
  text-align: left;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(7, 11, 14, 0.72);
  padding: 0.68rem;
}

.advanced-filters > summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  padding: 0.7rem 2.2rem 0.72rem 0.9rem;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  position: relative;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.advanced-filters > summary::-webkit-details-marker {
  display: none;
}

.advanced-filters > summary::after {
  content: '';
  position: absolute;
  right: 0.9rem;
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(228, 243, 255, 0.95);
  border-bottom: 2px solid rgba(228, 243, 255, 0.95);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.advanced-filters[open] > summary::after {
  transform: rotate(225deg);
}

.advanced-filters > summary:hover {
  border-color: rgba(30, 196, 143, 0.78);
  box-shadow: 0 0 0 3px rgba(30, 196, 143, 0.14);
}

.advanced-filters.has-active > summary {
  border-color: rgba(30, 196, 143, 0.76);
  background: linear-gradient(180deg, rgba(30, 196, 143, 0.27), rgba(30, 196, 143, 0.14));
}

.advanced-filters.is-idle > summary {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.summary-title {
  color: #f4fbff;
  font-size: 0.97rem;
}

.summary-meta {
  font-size: 0.82rem;
  color: #d1e4ef;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding-right: 0.35rem;
}

.advanced-filters .filter-grid {
  margin-top: 0.62rem;
}

.advanced-filters .field-block {
  background: rgba(0, 0, 0, 0.33);
}

.advanced-filters .filter-actions {
  justify-content: flex-start;
}

.home-results {
  margin: 1rem 1.6rem 0;
}

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

.results-toolbar h2 {
  margin-bottom: 0.15rem;
}

.results-toolbar p {
  color: var(--tone-muted);
  font-size: 0.9rem;
}

.photo-grid {
  grid-auto-flow: dense;
  gap: 0.9rem;
  padding: 0;
}

.photo-card {
  min-height: 190px;
}

.photo-card.is-tall {
  grid-row: span 2;
}

.photo-card.is-wide {
  grid-column: span 2;
}

.photo-card img {
  width: 100%;
  height: 100%;
  min-height: 190px;
  object-fit: cover;
}

.photo-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem;
  background: linear-gradient(to top, rgba(2, 5, 7, 0.88), rgba(2, 5, 7, 0.06));
}

.photo-meta span {
  font-size: 0.83rem;
  color: #dce8ef;
}

.home-pagination {
  margin: 1rem 1.6rem 0;
  justify-content: center;
}

.home-footer {
  margin-top: 1rem;
  background: transparent;
  color: #94a5af;
}

/* Responsive tweaks */
@media (max-width: 600px) {
  .header {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  .header h1 {
    font-size: 1.4rem;
  }
  .header nav {
    gap: 0.45rem 0.75rem;
  }
  .search-form {
    width: 100%;
  }
  .search-input {
    flex: 1;
    min-width: 0;
  }
  .filter-panel {
    margin: 0.8rem 1rem 0;
  }
  .filter-actions {
    flex-wrap: wrap;
  }
  .inline-query input[type="text"] {
    min-width: 0;
    width: 100%;
  }
  .detail-meta-grid {
    grid-template-columns: 1fr;
  }
  .detail-extra-grid {
    grid-template-columns: 1fr;
  }
  .modal-actions {
    justify-content: flex-start;
  }
  .home-header,
  .home-hero,
  .home-results,
  .home-pagination,
  .page-main {
    margin-left: 1rem;
    margin-right: 1rem;
  }
  .home-hero {
    min-height: 460px;
  }
  .hero-content {
    padding-top: 2rem;
  }
  .hero-search-form {
    flex-direction: column;
  }
  .hero-search-btn {
    width: 100%;
  }
  .results-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .photo-card.is-wide {
    grid-column: auto;
  }
  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    padding: 1rem;
  }
}
