﻿:root {
  color-scheme: light;
  --bg: #ffffff;
  --text: #111111;
  --muted: #737373;
  --line: #e7e7e7;
  --soft: #f6f6f6;
  --chip: #f2f2f2;
  --chip-active: #111111;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, "Helvetica Neue", "Yu Gothic", "YuGothic", "Hiragino Sans",
    Meiryo, sans-serif;
}

button,
input {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto minmax(180px, 520px) auto;
  gap: 24px;
  align-items: center;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 69% 25%, #ffffff 0 10%, transparent 11%),
    linear-gradient(135deg, #111111 0%, #353535 54%, #e8437c 100%);
}

.search input {
  width: 100%;
  height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--text);
  outline: none;
}

.search input:focus {
  border-color: #111111;
  background: #ffffff;
}
.account-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.account-button {
  height: 32px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: #171717;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  white-space: nowrap;
}

.account-button.accent {
  border-color: #111111;
  background: #111111;
  color: #ffffff;
}

.account-button:disabled {
  cursor: default;
  opacity: 0.72;
}

main {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 12px 12px 48px;
}

.view-tabs {
  display: flex;
  gap: 6px;
  padding: 2px 0 14px;
}

.view-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  background: #f4f4f4;
  color: #252525;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.view-tab.active {
  background: #111111;
  color: #ffffff;
}

.ratio-icon {
  display: inline-block;
  border: 2px solid currentColor;
  border-radius: 3px;
  opacity: 0.86;
}

.ratio-icon-square {
  width: 15px;
  height: 15px;
}

.ratio-icon-landscape {
  width: 20px;
  height: 12px;
}

.ratio-icon-portrait {
  width: 12px;
  height: 20px;
}

.filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0 16px;
  scrollbar-width: none;
}

.filters::-webkit-scrollbar {
  display: none;
}

.tag-button {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--chip);
  color: #242424;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.tag-button.active {
  background: var(--chip-active);
  color: #ffffff;
}

.favorite-filter {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: #fff3f7;
  color: #d91f62;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.favorite-filter.active {
  background: #e8437c;
  color: #ffffff;
}

.result-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px 10px;
  color: var(--muted);
  font-size: 13px;
}

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

.grid[data-ratio="16:9"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid[data-ratio="9:16"] {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.card {
  position: relative;
  display: block;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.thumb {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 0;
  background:
    radial-gradient(circle at var(--x) var(--y), rgba(255,255,255,.72), transparent 22%),
    linear-gradient(135deg, var(--c1), var(--c2));
  background-position: center;
  background-size: cover;
}

.grid[data-ratio="16:9"] .thumb {
  aspect-ratio: 16 / 9;
}

.grid[data-ratio="9:16"] .thumb {
  aspect-ratio: 9 / 16;
}


.thumb::after {
  content: "AI";
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #111111;
  font-size: 11px;
  font-weight: 800;
}

.favorite-mark {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  color: #ffffff;
  font-size: 15px;
  line-height: 1;
}

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 7px;
  padding: 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.05) 68%);
  color: #ffffff;
  opacity: 0;
  transition: opacity 140ms ease;
  pointer-events: none;
}

.card:hover .overlay,
.card:focus-visible .overlay {
  opacity: 1;
}

.caption {
  margin: 0;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  color: inherit;
  font-size: 12px;
  line-height: 1.35;
  opacity: 0.86;
}

.tag::before {
  content: "#";
}

.empty {
  padding: 64px 0;
  color: var(--muted);
  text-align: center;
}

.dialog {
  width: min(540px, calc(100vw - 22px));
  padding: 0;
  border: 0;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.dialog::backdrop {
  background: rgba(0, 0, 0, 0.46);
}

.close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #111111;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.dialog-image-wrap {
  position: relative;
}

.dialog-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  background:
    radial-gradient(circle at var(--x) var(--y), rgba(255,255,255,.7), transparent 23%),
    linear-gradient(135deg, var(--c1), var(--c2));
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  background-color: #f4f4f4;
}



.dialog-body {
  padding: 16px 16px 18px;
}

.dialog-caption {
  margin: 0 0 11px;
  font-size: 16px;
  font-weight: 750;
}

.dialog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-bottom: 13px;
}

.detail-tag {
  color: #343434;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
}

.dialog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  margin: 2px 0 18px;
  color: #555555;
}

.download-note {
  margin: -5px 0 13px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0;
}

.meta-icon {
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

.meta-item.muted {
  color: var(--muted);
}

.meta-item.muted .meta-icon {
  background: #d8d8d8;
  color: #777777;
}

.dialog-actions {
  display: block;
}

.primary-action {
  height: 44px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.favorite-action {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #e8437c;
  font-size: 25px;
  line-height: 1;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.favorite-action.active {
  border-color: rgba(232, 67, 124, 0.22);
  background: #fff0f5;
  color: #e21d63;
}

.primary-action {
  width: 100%;
  border: 0;
  background: #111111;
  color: #ffffff;
  letter-spacing: 0;
}

.primary-action:disabled {
  background: #eeeeee;
  color: #9a9a9a;
  cursor: default;
}

@media (max-width: 920px) {
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .topbar {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px;
  }

  main {
    padding: 10px 0 36px;
  }

  .filters,
  .view-tabs,
  .result-meta {
    padding-left: 10px;
    padding-right: 10px;
  }
  .account-actions {
    justify-content: flex-start;
    padding-right: 2px;
  }

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

  .grid[data-ratio="16:9"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid[data-ratio="9:16"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .overlay {
    padding: 7px;
  }

  .caption {
    font-size: 11px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .tag {
    font-size: 10px;
  }

  .dialog {
    width: 100vw;
    max-width: 100vw;
    margin: auto 0 0;
    border-radius: 12px 12px 0 0;
  }

  .dialog-image {
    aspect-ratio: 4 / 3;
  }

}



.plan-dialog {
  width: min(620px, calc(100vw - 24px));
  padding: 0;
  border: 0;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.plan-dialog::backdrop {
  background: rgba(0, 0, 0, 0.46);
}

.plan-panel {
  padding: 24px;
  background: #ffffff;
}

.plan-header {
  margin-bottom: 18px;
}

.plan-kicker {
  margin: 0 0 8px;
  color: #e8437c;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
}

.plan-header h2 {
  margin: 0 0 8px;
  font-size: 26px;
  line-height: 1.18;
  letter-spacing: 0;
}

.plan-header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.plan-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.8fr);
  gap: 18px;
  align-items: start;
  padding: 18px;
  border: 1px solid #dcdcdc;
  border-radius: 8px;
  background: #fafafa;
}

.plan-name {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 850;
}

.plan-price {
  margin: 0 0 6px;
  color: #222222;
  font-size: 14px;
  font-weight: 750;
}

.plan-price span {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0;
}

.plan-subtext {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.plan-features {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #222222;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
}

.plan-features li::before {
  content: "✓";
  margin-right: 7px;
  font-weight: 900;
}

.plan-primary {
  grid-column: 1 / -1;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: #111111;
  color: #ffffff;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.plan-primary:disabled {
  background: #eeeeee;
  color: #777777;
  cursor: default;
}

.plan-notes {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.plan-notes p {
  margin: 0;
}

@media (max-width: 640px) {
  .plan-dialog {
    width: 100vw;
    max-width: 100vw;
    margin: auto 0 0;
    border-radius: 12px 12px 0 0;
  }

  .plan-panel {
    padding: 20px 16px 18px;
  }

  .plan-header h2 {
    font-size: 22px;
  }

  .plan-card {
    grid-template-columns: 1fr;
  }
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  justify-content: center;
  padding: 34px 12px 6px;
  color: var(--muted);
  font-size: 12px;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover {
  color: #111111;
}

.legal-topbar {
  grid-template-columns: auto;
}

.legal-page {
  width: min(780px, 100%);
  padding: 42px 20px 72px;
}

.legal-page h1 {
  margin: 0 0 12px;
  font-size: 34px;
  line-height: 1.2;
}

.legal-lead {
  margin: 0 0 34px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.legal-page section {
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.legal-page h2 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
}

.legal-page p,
.legal-page li {
  color: #333333;
  font-size: 14px;
  line-height: 1.85;
}

.legal-page p {
  margin: 0;
}

.legal-page ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 1.2em;
}





