:root {
  color-scheme: light;
  --bg: #f6f3ee;
  --surface: #fffaf3;
  --surface-strong: #ffffff;
  --ink: #1d2329;
  --muted: #68717c;
  --line: #ded7cb;
  --accent: #087c68;
  --accent-dark: #045747;
  --coral: #d65b43;
  --gold: #d7a338;
  --blue: #315f9c;
  --shadow: 0 28px 80px rgba(31, 33, 36, 0.16);
  --soft-shadow: 0 14px 34px rgba(31, 33, 36, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 13% 18%, rgba(8, 124, 104, 0.18), transparent 26%),
    radial-gradient(circle at 86% 78%, rgba(214, 91, 67, 0.18), transparent 28%),
    linear-gradient(135deg, rgba(49, 95, 156, 0.08), transparent 42%),
    var(--bg);
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

.workspace,
.key-panel {
  width: min(1180px, 100%);
  background: rgba(255, 253, 249, 0.86);
  border: 1px solid rgba(222, 215, 203, 0.95);
  border-radius: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.workspace {
  position: relative;
  min-height: min(720px, calc(100vh - 64px));
  display: grid;
  grid-template-rows: auto auto auto auto;
  align-content: start;
  gap: 20px;
  padding: 28px;
  overflow: visible;
  animation: rise-in 520ms ease both;
}

.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.points-widget {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 6px 10px;
  min-width: 148px;
  padding: 10px 12px;
  border: 1px solid rgba(8, 124, 104, 0.16);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 28px rgba(31, 33, 36, 0.1);
  backdrop-filter: blur(14px);
}

.points-widget span {
  font-size: 0.76rem;
  font-weight: 720;
  text-transform: uppercase;
}

.points-widget strong {
  color: var(--accent);
  font-size: 1rem;
  line-height: 1;
  text-align: right;
  white-space: nowrap;
}

.points-widget a {
  grid-column: 1 / -1;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 760;
  text-align: right;
  text-decoration: none;
}

.points-widget a:hover {
  color: var(--accent-dark);
}

.my-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  box-shadow: var(--soft-shadow);
  font-weight: 760;
  text-decoration: none;
}

.my-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(8, 124, 104, 0.18);
}

.workspace.no-result {
  width: min(1180px, 100%);
  align-content: start;
  place-items: center;
}

.workspace.no-result .control-panel {
  width: min(860px, 100%);
  margin-top: clamp(36px, 12vh, 108px);
}

.workspace:not(.no-result) .brand-block {
  display: none;
}

.key-screen {
  width: min(560px, 100%);
}

.key-panel {
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 34px;
  padding: 42px;
  animation: rise-in 520ms ease both;
}

.control-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 0;
  background: transparent;
  transition:
    width 420ms ease,
    transform 420ms ease;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2.5rem, 7vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: 0;
  text-wrap: balance;
}

.subtitle {
  max-width: 28ch;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.prompt-form,
.key-form {
  display: grid;
  gap: 12px;
}

.prompt-form {
  gap: 0;
  padding: 24px 28px 14px;
  border: 1px solid rgba(190, 185, 176, 0.9);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 22px 60px rgba(31, 33, 36, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 260ms ease;
}

.prompt-form:focus-within {
  border-color: rgba(8, 124, 104, 0.58);
  box-shadow:
    0 26px 70px rgba(31, 33, 36, 0.16),
    0 0 0 4px rgba(8, 124, 104, 0.1);
}

.key-form label {
  font-size: 0.9rem;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  color: var(--ink);
  line-height: 1.5;
  outline: none;
}

input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 15px;
  background: var(--surface-strong);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

textarea {
  min-height: 72px;
  padding: 0;
  border: 0;
  resize: none;
  color: var(--ink);
  background: transparent;
  font-size: 1.12rem;
  line-height: 1.55;
}

input {
  min-height: 48px;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 110, 97, 0.16);
  transform: translateY(-1px);
}

.composer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 12px;
}

.composer-options,
.composer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.composer-options {
  flex-wrap: wrap;
}

#char-count {
  color: var(--muted);
  font-size: 0.86rem;
  white-space: nowrap;
}

.cost-pill {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--accent);
  background: rgba(8, 124, 104, 0.09);
  font-size: 0.9rem;
  font-weight: 760;
  white-space: nowrap;
}

.option-menu {
  position: relative;
}

.option-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  color: #66717b;
  background: rgba(8, 124, 104, 0.09);
  font-size: 0.94rem;
  font-weight: 760;
  list-style: none;
  cursor: pointer;
  transition:
    background 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.option-menu summary::-webkit-details-marker {
  display: none;
}

.option-menu summary::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: 4px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 180ms ease;
}

.option-menu[open] summary {
  background: rgba(8, 124, 104, 0.14);
  box-shadow: 0 8px 20px rgba(8, 124, 104, 0.12);
}

.option-menu[open] summary::after {
  transform: translateY(2px) rotate(225deg);
}

.option-menu summary:hover {
  background: rgba(8, 124, 104, 0.14);
}

.option-menu strong {
  color: var(--accent);
  font-size: 1rem;
}

.option-popover {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  z-index: 20;
  width: 190px;
  padding: 14px 10px 10px;
  border: 1px solid rgba(216, 216, 216, 0.88);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    0 22px 54px rgba(31, 33, 36, 0.18),
    0 2px 8px rgba(31, 33, 36, 0.08);
  animation: menu-pop 140ms ease both;
}

.option-popover p {
  margin: 0 12px 8px;
  color: #8a9098;
  font-size: 0.92rem;
  font-weight: 680;
}

.option-popover button {
  position: relative;
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 40px 0 14px;
  border-radius: 12px;
  color: var(--ink);
  background: transparent;
  box-shadow: none;
  font-size: 1rem;
  font-weight: 520;
  text-align: left;
}

.option-popover button:hover {
  color: var(--ink);
  background: rgba(8, 124, 104, 0.08);
  box-shadow: none;
  transform: none;
}

.option-popover button[aria-checked="true"]::after {
  content: "✓";
  position: absolute;
  right: 14px;
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 760;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 22px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  font-weight: 760;
  cursor: pointer;
  box-shadow: var(--soft-shadow);
  transition:
    background 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease,
    opacity 180ms ease;
}

.secondary-button {
  color: var(--accent);
  background: #e0efeb;
  box-shadow: none;
}

.send-button {
  width: 54px;
  min-width: 54px;
  min-height: 54px;
  padding: 0;
  border-radius: 50%;
  font-size: 1.8rem;
  line-height: 1;
  background: #9c9da1;
}

.send-button:hover {
  background: var(--accent);
}

.secondary-button:hover {
  color: #ffffff;
  background: var(--accent-dark);
}

button:disabled {
  cursor: progress;
  opacity: 0.72;
}

button:hover {
  box-shadow: 0 18px 36px rgba(8, 124, 104, 0.18);
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

.result-panel {
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  width: 100%;
  min-height: 0;
  background:
    linear-gradient(145deg, rgba(8, 124, 104, 0.1), transparent 34%),
    linear-gradient(315deg, rgba(49, 95, 156, 0.12), transparent 36%),
    var(--surface);
  border: 1px solid rgba(222, 215, 203, 0.78);
  border-radius: 16px;
  overflow: hidden;
  animation: panel-enter 420ms ease both;
}

.image-stage {
  position: relative;
  min-height: min(520px, calc(100vh - 260px));
  display: grid;
  place-items: center;
  padding: 36px;
}

#result-image {
  width: auto;
  max-width: min(100%, 920px);
  max-height: calc(100vh - 310px);
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(32, 36, 42, 0.22);
  background: #e7e1d5;
  animation: image-reveal 560ms ease both;
}

.loading-state,
.error-state {
  width: min(420px, 100%);
  min-height: 260px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  color: var(--ink);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(255, 250, 243, 0.58)),
    rgba(255, 255, 255, 0.62);
  box-shadow: var(--soft-shadow);
}

.loading-state p,
.error-state p,
.error-state span {
  margin: 0;
}

.loading-state p,
.error-state span {
  font-weight: 700;
}

.error-state {
  text-align: center;
  padding: 30px;
}

.error-state p {
  color: var(--muted);
  line-height: 1.5;
}

.loader-core {
  position: relative;
  width: 116px;
  height: 116px;
  display: grid;
  place-items: center;
}

.loader-core::before,
.loader-core::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 2px solid transparent;
  border-top-color: var(--accent);
  border-right-color: rgba(49, 95, 156, 0.72);
  border-radius: 50%;
  animation: spin 1.4s linear infinite;
}

.loader-core::after {
  inset: 22px;
  border-top-color: var(--coral);
  border-right-color: rgba(215, 163, 56, 0.74);
  animation-duration: 1.9s;
  animation-direction: reverse;
}

.loader-core span {
  position: absolute;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.1s ease-in-out infinite;
}

.loader-core span:nth-child(2) {
  transform: translate(34px, 20px);
  background: var(--coral);
  animation-delay: 160ms;
}

.loader-core span:nth-child(3) {
  transform: translate(-28px, 30px);
  background: var(--gold);
  animation-delay: 320ms;
}

.result-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
  background: rgba(255, 253, 250, 0.72);
}

#result-title {
  color: var(--ink);
  font-weight: 700;
}

.my-gallery,
.sample-gallery {
  width: 100%;
  margin-top: 8px;
  padding: 24px 0 8px;
}

.gallery-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto 18px;
}

.gallery-heading .eyebrow {
  margin-bottom: 6px;
}

.gallery-heading h2 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: 0;
}

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

.my-image-grid figure {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 14px 36px rgba(31, 33, 36, 0.12);
}

.my-image-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition:
    filter 260ms ease,
    transform 260ms ease;
}

.my-image-grid figure:hover img {
  filter: saturate(1.06) contrast(1.03);
  transform: scale(1.035);
}

.has-more-overlay {
  cursor: pointer;
}

.has-more-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(29, 35, 41, 0.58), rgba(29, 35, 41, 0.18) 54%, transparent),
    linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.2));
  opacity: 0.9;
  pointer-events: none;
}

.more-overlay {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 2;
  width: min(74%, 132px);
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 16px;
  color: #ffffff;
  pointer-events: none;
}

.more-overlay span:not(.more-overlay-shimmer) {
  font-size: 0.96rem;
  font-weight: 840;
}

.more-overlay strong {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.78rem;
  font-weight: 760;
}

.more-overlay-shimmer {
  width: 34px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow:
    0 8px 0 rgba(255, 255, 255, 0.48),
    0 16px 0 rgba(255, 255, 255, 0.24);
  animation: more-pulse 1.6s ease-in-out infinite;
}

.has-more-overlay:hover .more-overlay-shimmer,
.has-more-overlay:focus-visible .more-overlay-shimmer {
  animation-duration: 900ms;
}

.has-more-overlay:focus-visible {
  outline: 3px solid rgba(8, 124, 104, 0.34);
  outline-offset: 3px;
}

.has-more-overlay:hover img,
.has-more-overlay:focus-visible img {
  filter: saturate(1.02) contrast(1.02) brightness(0.84);
  transform: scale(1.045);
}

@keyframes more-pulse {
  0%,
  100% {
    opacity: 0.5;
    transform: translateX(0);
  }
  50% {
    opacity: 1;
    transform: translateX(8px);
  }
}

.waterfall-grid {
  column-count: 4;
  column-gap: 14px;
}

.waterfall-grid figure {
  position: relative;
  display: inline-block;
  width: 100%;
  margin: 0 0 14px;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 14px 36px rgba(31, 33, 36, 0.12);
  break-inside: avoid;
  transform: translateZ(0);
}

.waterfall-grid figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 58%, rgba(0, 0, 0, 0.14));
  opacity: 0;
  transition: opacity 220ms ease;
}

.waterfall-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition:
    filter 260ms ease,
    transform 260ms ease;
}

.waterfall-grid .is-tall img {
  aspect-ratio: 0.72;
}

.waterfall-grid .is-wide img {
  aspect-ratio: 1.48;
}

.waterfall-grid figure:hover::after {
  opacity: 1;
}

.waterfall-grid figure:hover img {
  filter: saturate(1.06) contrast(1.03);
  transform: scale(1.035);
}

.photos-page {
  width: min(1180px, calc(100% - 64px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 46px 0 64px;
}

.photos-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.photos-header h1 {
  font-size: clamp(2.8rem, 8vw, 6rem);
}

.key-manager {
  margin-bottom: 24px;
  border: 1px solid rgba(222, 215, 203, 0.95);
  border-radius: 12px;
  background: rgba(255, 253, 249, 0.78);
  box-shadow: var(--soft-shadow);
  overflow: hidden;
}

.key-manager summary {
  position: relative;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px;
  color: var(--ink);
  list-style: none;
  cursor: pointer;
}

.key-manager summary::-webkit-details-marker {
  display: none;
}

.key-manager summary::after {
  content: "";
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 180ms ease;
}

.key-manager[open] summary::after {
  transform: translateY(2px) rotate(225deg);
}

.key-manager summary span {
  font-size: 1rem;
  font-weight: 800;
}

.key-manager summary strong {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: right;
}

.key-manager-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 0 18px 18px;
  border-top: 1px solid rgba(222, 215, 203, 0.72);
}

.key-helper {
  grid-column: 1 / -1;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.key-actions {
  display: flex;
  gap: 8px;
}

.page-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--accent);
  background: rgba(8, 124, 104, 0.09);
  font-weight: 760;
  text-decoration: none;
}

.page-link:hover {
  color: var(--accent-dark);
  background: rgba(8, 124, 104, 0.14);
}

.photos-empty {
  display: grid;
  place-items: center;
  min-height: 280px;
  border: 1px solid rgba(222, 215, 203, 0.95);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255, 253, 249, 0.86);
  box-shadow: var(--shadow);
}

.photos-empty p {
  margin: 0;
  font-weight: 760;
}

.photos-waterfall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}

.photos-waterfall figure {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 14px 36px rgba(31, 33, 36, 0.12);
}

.photos-waterfall img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition:
    filter 260ms ease,
    transform 260ms ease;
}

.photos-waterfall figure:hover img {
  filter: saturate(1.06) contrast(1.03);
  transform: scale(1.035);
}

.is-hidden {
  display: none !important;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes panel-enter {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes image-reveal {
  from {
    opacity: 0;
    filter: blur(12px);
    transform: scale(0.985);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
  }
}

@keyframes menu-pop {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.42;
    scale: 0.78;
  }
  50% {
    opacity: 1;
    scale: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 860px) {
  .app-shell {
    padding: 18px;
    place-items: stretch;
  }

  .workspace,
  .key-panel {
    min-height: calc(100vh - 36px);
  }

  .workspace {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .workspace.no-result .control-panel {
    margin-top: 34px;
  }

  .points-widget {
    min-width: 148px;
  }

  .app-topbar {
    align-items: flex-start;
  }

  .key-panel {
    padding: 26px;
  }

  .control-panel {
    gap: 18px;
  }

  h1 {
    font-size: clamp(3.3rem, 18vw, 5rem);
  }

  .subtitle {
    max-width: none;
  }

  .image-stage {
    min-height: 330px;
    padding: 18px;
  }

  #result-image {
    max-height: calc(100vh - 330px);
  }

  .result-meta {
    padding: 14px 18px;
    flex-direction: column;
    gap: 4px;
  }

  .prompt-form {
    padding: 20px 20px 12px;
    border-radius: 26px;
  }

  .composer-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .composer-actions {
    justify-content: space-between;
    width: 100%;
  }

  .waterfall-grid {
    column-count: 2;
    column-gap: 10px;
  }

  .photos-page {
    width: min(100% - 36px, 1180px);
    padding-top: 28px;
  }

  .photos-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .key-manager-form {
    grid-template-columns: 1fr;
  }

  .key-manager summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px;
  }

  .key-manager summary strong {
    margin-left: 0;
    text-align: left;
  }

  .key-manager summary::after {
    position: absolute;
    right: 18px;
    margin-top: 7px;
  }

  .key-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .photos-waterfall {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 10px;
  }

  .photos-waterfall figure {
    border-radius: 12px;
  }

  .my-image-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .my-image-grid figure {
    border-radius: 12px;
  }

  .waterfall-grid figure {
    margin-bottom: 10px;
    border-radius: 12px;
  }
}

@media (min-width: 1180px) {
  .waterfall-grid {
    column-count: 5;
  }
}

@media (max-width: 520px) {
  .photos-waterfall {
    grid-template-columns: 1fr;
  }
}
