/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

:root {
  color-scheme: light;
  --bg: #f7f7f5;
  --card: #ffffff;
  --text: #1f2933;
  --muted: #65707f;
  --accent: #2563eb;
  --border: #e5e7eb;
  --shadow: 0 20px 50px rgba(31, 41, 51, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "DotGothic16", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", sans-serif;
  background: url("/assets/background-34228ae1.webp") center/cover no-repeat fixed;
  color: var(--text);
  min-height: 100vh;
}

.site-header {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.site-header__logo {
  text-decoration: none;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
  font-size: 22px;
}

.site-header__account {
  font-size: 14px;
}

.site-header__link {
  text-decoration: none;
  color: var(--accent);
  font-weight: 600;
  font-size: 16px;
}

.account-menu {
  position: relative;
}

.account-menu summary {
  list-style: none;
  cursor: pointer;
}

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

.account-menu__panel {
  position: absolute;
  right: 0;
  top: 32px;
  min-width: 160px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 8px;
  display: grid;
  gap: 6px;
  z-index: 20;
}

.account-menu__item {
  display: block;
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 8px;
}

.account-menu__item:hover {
  background: #f1f5f9;
}

.account-menu__button {
  width: 100%;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
}

main.page {
  min-height: calc(100vh - 64px);
  display: grid;
  place-items: center;
  padding: 24px;
}

main.page.page--top {
  place-items: start center;
}

.flash {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  display: grid;
  gap: 8px;
}

.flash__message {
  padding: 10px 14px;
  border-radius: 8px;
  background: #fee2e2;
  color: #7f1d1d;
  border: 1px solid #fecaca;
  box-shadow: var(--shadow);
  font-size: 14px;
}

.flash__message--notice {
  background: #dcfce7;
  color: #14532d;
  border-color: #bbf7d0;
}

.auth,
.home {
  display: grid;
  place-items: center;
  width: 100%;
  gap: 24px;
}

.home--top {
  place-items: start center;
  padding-top: 24px;
}

.auth__card,
.home__card {
  width: min(420px, 100%);
  background: var(--card);
  padding: 32px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.home--wide .home__card {
  width: min(980px, 100%);
}

.home__eyebrow {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  background: rgba(255, 255, 255, 0.9);
  padding: 8px 14px;
  border-radius: 999px;
  width: fit-content;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.auth__title,
.home__title {
  margin: 0 0 8px;
  font-size: 18px;
}

.home--wide .home__title {
  background: #fff;
  padding: 6px 12px;
  border-radius: 12px;
  width: fit-content;
}

.auth__subtitle,
.home__text {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
}

.auth__text {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.auth__text--alert {
  color: #b91c1c;
}

.auth__text--notice {
  color: #16a34a;
}

.auth__errors {
  background: #fee2e2;
  color: #7f1d1d;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
}

.auth__note {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.auth__link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.auth__form {
  display: grid;
  gap: 16px;
}

.auth__actions {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.auth__button--fit {
  justify-self: start;
  width: fit-content;
}

.home__actions {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.home__card > .button {
  margin-top: 12px;
}

.hero {
  display: grid;
  gap: 24px;
  align-items: center;
}

.hero__eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.hero__title {
  margin: 0 0 16px;
  font-size: 28px;
  line-height: 1.3;
}

.hero__text {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 15px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero__visual {
  display: grid;
  place-items: center;
}

.hero__card {
  width: min(260px, 100%);
  background: linear-gradient(140deg, #eff6ff 0%, #ffffff 60%);
  border: 1px solid #dbeafe;
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.hero__card-title {
  margin: 0 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.12em;
}

.hero__card-text {
  margin: 0 0 16px;
  font-weight: 600;
}

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

.hero__chips span {
  background: #e2e8f0;
  color: #1e293b;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
}

.section__title {
  margin: 0 0 8px;
  font-size: 20px;
}

.search__form {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 12px 0 16px;
}

.filter__form {
  display: grid;
  gap: 14px;
  margin: 0;
}

.filter-field {
  display: grid;
  gap: 6px;
}

.filter-toolbar {
  margin: 0 0 12px;
}

.filter-toolbar .button--ghost {
  background: #e0f2fe;
  border: 1px solid #7dd3fc;
  color: #0c4a6e;
}

.filter-toolbar .button--ghost.button--danger {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.sort-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
}

.sort-row__label {
  font-size: 12px;
  color: var(--muted);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.chip--active {
  background: #dbeafe;
  border-color: #60a5fa;
  color: #1d4ed8;
}

.chip--danger {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.chip--inline {
  margin-left: 8px;
  font-size: 11px;
  padding: 4px 8px;
}

.filter-chips .chip--active {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.chip__close {
  margin-left: 6px;
  text-decoration: none;
  color: var(--text);
}

.color-swatch--chip {
  width: 16px;
  height: 16px;
  border-width: 1px;
  vertical-align: middle;
  margin-left: 6px;
  display: inline-block;
  flex: 0 0 auto;
}

.filter-overlay {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 30;
}

.filter-overlay.is-open {
  display: block;
}

.filter-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
}

.filter-overlay__panel {
  position: relative;
  z-index: 1;
  width: min(520px, 92vw);
  margin: 10vh auto 0;
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: grid;
  gap: 16px;
}

.filter-overlay__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.filter-overlay__close {
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
}

.color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.color-swatch__input {
  display: none;
}

.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--swatch-color, #e2e8f0);
  border: 2px solid #cbd5f5;
  cursor: pointer;
  position: relative;
  display: inline-block;
}

.color-swatch[data-color]::after,
.color-swatch[data-color]::before {
  opacity: 0;
  pointer-events: auto;
  position: absolute;
  transition: opacity 0.15s ease;
}

.color-swatch[data-color]::after {
  content: attr(data-color);
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: #ffffff;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 8px;
  white-space: nowrap;
  z-index: 2;
}

.color-swatch[data-color]::before {
  content: "";
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px 6px 0 6px;
  border-style: solid;
  border-color: #0f172a transparent transparent transparent;
  z-index: 2;
}

.color-swatch[data-color]:hover::after,
.color-swatch[data-color]:hover::before {
  opacity: 1;
}

.color-swatch--none {
  background: #ffffff;
}

.color-swatch--none::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 18%;
  right: 18%;
  height: 2px;
  background: #94a3b8;
  transform: translateY(-50%) rotate(-45deg);
}

.color-swatch__input:checked + .color-swatch {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
}
.search__form .field__input {
  flex: 1;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-group {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.chip-group__label {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.chip {
  text-decoration: none;
  font-size: 12px;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 999px;
  background: #f8fafc;
}

.chip--static {
  cursor: default;
}

.search__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 1fr);
  overflow-x: auto;
  gap: 12px;
  padding-bottom: 8px;
  scroll-behavior: smooth;
}

.scroll-wrap {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
}

.scroll-button {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow);
}

.scroll-button:hover {
  color: var(--accent);
}

.setup-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  background: #ffffff;
  display: grid;
  gap: 8px;
  min-height: 120px;
}

.setup-card__title {
  margin: 0;
  font-weight: 600;
}

.setup-card__meta {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.setup-card__link {
  text-decoration: none;
  color: var(--accent);
  font-size: 13px;
}

.category-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.category-card {
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  color: var(--text);
  background: #f8fafc;
  font-weight: 600;
}

.admin-grid {
  display: grid;
  gap: 16px;
}

.admin-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  background: #ffffff;
}

.admin-card .auth__form {
  gap: 10px;
}

.admin-selector {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-inline {
  margin-top: 8px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.admin-link {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.admin-button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  line-height: 1;
}

.favorite-remove {
  color: #b91c1c;
}

.review-section {
  margin-top: 24px;
}

.review-summary {
  margin: 6px 0 12px;
  font-size: 13px;
  color: var(--muted);
}

.review-summary__star {
  color: #f59e0b;
}

.review-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.review-filter__label {
  font-size: 12px;
  color: var(--muted);
}

.review-list {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.review-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: #f8fafc;
}

.review-item__user {
  margin: 0 0 6px;
  font-weight: 600;
  font-size: 13px;
}

.review-item__date {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--muted);
}

.review-item__rating {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--muted);
}

.review-item__stars {
  color: #f59e0b;
  letter-spacing: 1px;
  font-size: 13px;
}

.rating-input {
  display: inline-flex;
  gap: 4px;
  direction: rtl;
}

.rating-input input {
  display: none;
}

.rating-input label {
  cursor: pointer;
  color: #cbd5f5;
  font-size: 18px;
  line-height: 1;
}

.rating-input input:checked ~ label,
.rating-input label:hover,
.rating-input label:hover ~ label {
  color: #f59e0b;
}

.review-item__body {
  margin: 0;
  font-size: 13px;
  color: var(--text);
}

.review-like {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.review-like__button {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
}

.review-like__button img {
  width: 16px;
  height: 16px;
  display: block;
}

.review-like__count {
  font-size: 12px;
  color: var(--muted);
}

.review-form {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  background: #ffffff;
}

.review-status {
  margin: 12px 0 8px;
  font-size: 12px;
  color: var(--muted);
}

.favorite-actions {
  margin-top: 16px;
}

.favorite-inline {
  margin-top: 6px;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 24px;
  font-size: 13px;
}

.compare-table th,
.compare-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}

.compare-table th {
  color: var(--muted);
  font-weight: 600;
}

div.pagination {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

div.pagination ul {
  list-style: none;
  display: flex;
  gap: 6px;
  padding: 0;
  margin: 0;
}

div.pagination li {
  display: inline-flex;
}

div.pagination a,
div.pagination span {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  font-size: 13px;
}

div.pagination .gap,
div.pagination .disabled {
  color: var(--muted);
  border-color: transparent;
}

div.pagination .current {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.footer {
  display: flex;
  gap: 16px;
  justify-content: center;
  font-size: 13px;
}

.site-footer {
  display: flex;
  gap: 16px;
  justify-content: center;
  padding: 16px 24px 32px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(6px);
}

@media (max-width: 600px) {
  .site-footer {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
}

.footer__link {
  text-decoration: none;
  color: var(--muted);
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

.field {
  display: grid;
  gap: 6px;
}

.field__label {
  font-size: 13px;
  color: var(--muted);
}

.field__input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
}

.field__input:focus {
  outline: 2px solid rgba(37, 99, 235, 0.2);
  border-color: var(--accent);
}

.button {
  border: none;
  cursor: pointer;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.button--primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
}

.button--ghost {
  background: #f1f5f9;
  color: var(--text);
  border: 1px solid var(--border);
}

.button--danger {
  background: #ef4444;
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(239, 68, 68, 0.2);
}

.dialog[hidden] {
  display: none;
}

.dialog {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 20;
}

.dialog__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
}

.dialog__panel {
  position: relative;
  background: #ffffff;
  padding: 24px;
  border-radius: 16px;
  width: min(360px, 90vw);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  z-index: 1;
}

.dialog__title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
}

.dialog__message {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--muted);
}

.dialog__actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

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

.list {
  width: min(640px, 100%);
  display: grid;
  gap: 12px;
}

.list__item {
  padding: 16px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
}

.list__title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
}

.list__title--row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.list__item--row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.list__content {
  display: grid;
  gap: 4px;
}

.favorite-heart {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  color: #64748b;
  font-size: 16px;
  line-height: 1;
}

.favorite-heart img {
  width: 16px;
  height: 16px;
  display: block;
}

.favorite-heart--active {
  color: #ef4444;
}

.list__link {
  color: var(--text);
  text-decoration: none;
}

.list__link:hover {
  color: var(--accent);
}

.list__meta {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.form-row {
  display: grid;
  gap: 8px;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 14px;
  overflow: visible;
}

.spec-table th,
.spec-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  overflow: visible;
}

.spec-table th {
  width: 40%;
  color: var(--muted);
  font-weight: 600;
}

.select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  background: #ffffff;
}
