:root {
  color-scheme: light;
  --bg: #fff8dc;
  --surface: #ffffff;
  --surface-soft: #fff0a8;
  --ink: #392a18;
  --muted: #786852;
  --line: #edc95d;
  --accent: #ffd43b;
  --accent-soft: #fff4a8;
  --accent-dark: #8a5a00;
  --mint: #5fc5a6;
  --mint-soft: #e2fbef;
  --coral: #ff826d;
  --coral-soft: #fff0e9;
  --sky: #8bd3f7;
  --sky-soft: #eaf7ff;
  --shadow: 0 18px 0 rgba(255, 212, 59, 0.22), 0 18px 40px rgba(137, 91, 12, 0.13);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 14px 14px, rgba(255, 212, 59, 0.26) 0 4px, transparent 5px),
    linear-gradient(180deg, #fff0a8 0, rgba(255, 248, 220, 0) 380px),
    var(--bg);
  background-size: 34px 34px, auto, auto;
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
  padding: 10px clamp(18px, 4vw, 56px);
  background: rgba(255, 252, 232, 0.92);
  border-bottom: 3px solid #ffd43b;
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
}

.brand-mark,
.brand-character {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
}

.brand-character {
  display: block;
  flex: 0 0 auto;
  padding: 3px;
  background: #fff8c7;
  border: 2px solid #f4b400;
  border-radius: 50%;
  box-shadow: 0 5px 0 #f1b600, 0 12px 22px rgba(178, 117, 0, 0.14);
}

.brand-mark {
  background: var(--accent);
  color: #5c3a00;
  border: 1px solid #e7b226;
  border-radius: 50%;
  box-shadow: inset 0 -3px 0 rgba(141, 91, 0, 0.08), 0 8px 18px rgba(201, 146, 31, 0.18);
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand span {
  min-width: 0;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.nav-links {
  display: flex;
  flex: 1;
  justify-content: flex-end;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.nav-links a {
  padding: 8px 12px;
  border: 2px solid transparent;
  border-radius: 999px;
}

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

.login-button,
.primary-action,
.secondary-action {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.login-button:hover,
.primary-action:hover,
.secondary-action:hover,
.detail-link:hover,
.back-link:hover {
  transform: translateY(-2px);
}

.login-button {
  padding: 0 16px;
  background: var(--surface);
  border: 2px solid var(--line);
  color: var(--ink);
  box-shadow: 0 5px 0 #f4ca52, 0 12px 24px rgba(137, 91, 12, 0.12);
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
}

.primary-action {
  background: #ffcf24;
  color: #3a2b17;
  border: 2px solid #8f6100;
  box-shadow: 0 6px 0 #d99d00, 0 14px 24px rgba(137, 91, 12, 0.15);
}

.secondary-action {
  background: var(--surface);
  color: var(--ink);
  border: 2px solid var(--line);
  box-shadow: 0 5px 0 #f4ca52, 0 12px 22px rgba(137, 91, 12, 0.11);
}

main {
  overflow: hidden;
}

.hero {
  display: block;
  min-height: min(760px, calc(100vh - 68px));
  padding: clamp(42px, 7vw, 82px) clamp(18px, 6vw, 88px) 64px;
}

.hero-copy {
  max-width: 1180px;
  margin: 0 auto;
}

.hero-top-photo {
  display: block;
  width: 100%;
  height: clamp(220px, 28vw, 360px);
  margin-bottom: clamp(24px, 4vw, 36px);
  object-fit: cover;
  object-position: center 52%;
  border: 4px solid #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 800px;
  margin-bottom: 22px;
  color: #382817;
  font-size: clamp(36px, 5.6vw, 66px);
  line-height: 1.12;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(26px, 3.4vw, 42px);
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

.hero-copy p:not(.eyebrow) {
  max-width: 760px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  background: #fff;
  border: 2px solid #ffd43b;
  border-radius: 999px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
}

section {
  padding: 68px clamp(18px, 6vw, 88px);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-heading h2::after {
  content: "";
  display: block;
  width: 54px;
  height: 8px;
  margin-top: 10px;
  background: linear-gradient(90deg, #ffd43b, #ff826d, #5fc5a6);
  border-radius: 999px;
}

.section-copy {
  max-width: 360px;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.search-band,
.review-section,
.request-section {
  background: rgba(255, 254, 246, 0.94);
  border-top: 3px solid #ffe071;
}

.filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr)) minmax(240px, 1.5fr);
  gap: 12px;
  margin-bottom: 22px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  background: #fffefa;
  border: 2px solid #f1d37a;
  border-radius: 8px;
  color: var(--ink);
}

input:focus,
select:focus,
textarea:focus {
  border-color: #f4b400;
  outline: 3px solid rgba(255, 212, 59, 0.35);
}

textarea {
  resize: vertical;
}

.filter-checkbox {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: flex-start;
  width: fit-content;
  min-height: 42px;
  padding: 8px 14px;
  background: #fffefa;
  border: 2px solid #f1d37a;
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
}

.filter-checkbox input {
  width: auto;
  min-height: auto;
  margin-right: 8px;
  accent-color: var(--mint);
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.shop-card,
.empty-result,
.review-form,
.request-form,
.policy-grid article,
.admin-columns article,
.pending-item,
.admin-item {
  background: var(--surface);
  border: 2px solid #f1d37a;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.shop-card {
  display: grid;
  gap: 0;
  overflow: hidden;
  padding: 0;
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.empty-result {
  grid-column: 1 / -1;
  padding: 28px;
  text-align: center;
}

.empty-result h3 {
  margin-bottom: 8px;
  font-size: 22px;
}

.empty-result p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

.shop-card:hover {
  transform: translateY(-4px);
}

.shop-card-photo {
  height: 150px;
  margin: -20px -20px 4px;
  width: calc(100% + 40px);
  object-fit: cover;
  background: var(--surface-soft);
}

.shop-card-main {
  display: grid;
  gap: 14px;
  width: 100%;
  padding: 20px;
  background: transparent;
  border: 0;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.shop-card-main:hover {
  background: #fff9cf;
}

.shop-card-main:focus-visible,
.login-button:focus-visible,
.primary-action:focus-visible,
.secondary-action:focus-visible {
  outline: 3px solid rgba(255, 130, 109, 0.55);
  outline-offset: 2px;
}

.shop-card h3 {
  margin: 0;
  font-size: 19px;
}

.card-meta,
.status-row,
.score-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  background: var(--accent-soft);
  border: 2px solid #f2cf61;
  border-radius: 999px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
}

.pill.mint {
  background: var(--mint-soft);
  color: #247256;
  border-color: #95e0c3;
}

.pill.coral {
  background: var(--coral-soft);
  color: #a43b2e;
  border-color: #ffc4b8;
}

.shop-card p,
.policy-grid p,
.admin-item p,
.pending-item p {
  color: var(--muted);
  line-height: 1.7;
}

.detail-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
}

.score-badge {
  min-width: 110px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.score-bars {
  display: grid;
  gap: 12px;
}

.score-bar {
  display: grid;
  grid-template-columns: 120px 1fr 36px;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.bar {
  height: 9px;
  overflow: hidden;
  background: #fff1bf;
  border-radius: 999px;
}

.bar span {
  display: block;
  height: 100%;
  background: var(--mint);
}

.open-label {
  margin-left: auto;
  color: #8a5a00;
  font-weight: 800;
}

.review-snippets h4 {
  margin: 0 0 10px;
  font-size: 15px;
}

.mini-distribution {
  display: grid;
  gap: 10px;
}

.mini-distribution h4 {
  margin: 0;
  font-size: 15px;
}

.detail-link,
.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 40px;
  padding: 0 14px;
  background: #ffcf24;
  border: 2px solid #8f6100;
  border-radius: 999px;
  color: #3a2b17;
  font-weight: 800;
  box-shadow: 0 5px 0 #d99d00;
}

.back-link {
  background: #fff;
  border: 2px solid var(--line);
  color: var(--ink);
}

.shop-page {
  overflow: visible;
}

.shop-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 460px);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  padding-top: 56px;
  padding-bottom: 42px;
}

.shop-hero-copy {
  display: grid;
  gap: 18px;
}

.shop-hero h1 {
  margin-bottom: 0;
}

.shop-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.shop-hero-photo {
  width: 100%;
  height: min(420px, 46vw);
  min-height: 280px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.detail-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-top: 32px;
  background: var(--surface);
  border-top: 3px solid #ffe071;
}

.detail-panel,
.review-card {
  padding: 20px;
  background: var(--surface);
  border: 2px solid #f1d37a;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.detail-panel h2 {
  margin-bottom: 18px;
  font-size: 21px;
}

.reviews-section,
.shop-memo-section,
.bottom-nav-section {
  background: var(--surface);
  border-top: 3px solid #ffe071;
}

.review-list {
  display: grid;
  gap: 14px;
}

.compact-review-form {
  max-width: 980px;
}

.bottom-nav-section {
  padding-top: 34px;
  padding-bottom: 54px;
}

.review-card h3 {
  margin-top: 12px;
}

.review-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.8;
}

.review-form,
.request-form {
  display: grid;
  gap: 16px;
  max-width: 920px;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(255, 244, 168, 0.38), rgba(255, 255, 255, 0) 220px),
    #fff;
}

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

.rating-control {
  gap: 12px;
  padding: 16px;
  background: #fffdf0;
  border: 2px solid #f1d37a;
  border-radius: 8px;
  box-shadow: inset 0 0 0 4px rgba(255, 244, 168, 0.3);
}

.rating-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
}

.rating-head strong {
  font-size: 16px;
  line-height: 1.4;
}

.rating-value {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  color: var(--accent-dark);
}

.rating-control output {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 36px;
  background: #ffd43b;
  border: 2px solid #8f6100;
  border-radius: 8px;
  color: #3a2b17;
  font-size: 20px;
  font-weight: 900;
}

.rating-value small {
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 900;
}

.rating-scale {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
}

.rating-scale span:nth-child(2) {
  text-align: center;
}

.rating-scale span:last-child {
  text-align: right;
}

.rating-control > small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.rating-control input[type="range"] {
  --range-progress: 75%;
  width: 100%;
  height: 18px;
  padding: 0;
  background: linear-gradient(to right, var(--mint) 0 var(--range-progress), #fff1bf var(--range-progress) 100%);
  border: 0;
  border-radius: 999px;
  appearance: none;
}

.rating-control input[type="range"]::-webkit-slider-runnable-track {
  height: 18px;
  background: transparent;
  border-radius: 999px;
}

.rating-control input[type="range"]::-webkit-slider-thumb {
  width: 28px;
  height: 28px;
  margin-top: -5px;
  background: #fff;
  border: 4px solid #ffcf24;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(102, 72, 31, 0.15);
  appearance: none;
}

.rating-control input[type="range"]::-moz-range-track {
  height: 18px;
  background: transparent;
  border-radius: 999px;
}

.rating-control input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  background: #fff;
  border: 4px solid #ffcf24;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(102, 72, 31, 0.15);
}

fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
  padding: 16px;
  border: 2px solid #f1d37a;
  background: #fffdf0;
  border-radius: 8px;
}

legend {
  padding: 0 8px;
  color: var(--muted);
  font-weight: 800;
}

fieldset label,
.checkbox-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

fieldset input,
.checkbox-line input {
  width: auto;
  min-height: auto;
}

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

.policy-grid article,
.admin-columns article,
.pending-item,
.admin-item {
  padding: 18px;
}

.admin-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pending-list,
#adminReviews,
#adminShops {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.admin-page .site-header {
  position: static;
}

.admin-note {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.8;
}

.notice {
  max-width: 920px;
  margin-top: 12px;
  padding: 14px 16px;
  background: #e7f6ef;
  border: 2px solid #b8e3d0;
  border-radius: 8px;
  color: #247256;
  font-weight: 700;
}

dialog {
  width: min(420px, calc(100vw - 32px));
  border: 2px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(44, 37, 32, 0.35);
}

.login-form {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 16px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  background: #fff6d8;
  border: 2px solid var(--line);
  border-radius: 999px;
}

.auth-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.auth-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

#authLogin:checked ~ .auth-tabs label[for="authLogin"],
#authRegister:checked ~ .auth-tabs label[for="authRegister"] {
  background: #ffd43b;
  color: var(--ink);
  box-shadow: 0 4px 0 #d99d00;
}

.auth-panel {
  display: none;
  gap: 14px;
}

#authLogin:checked ~ #loginPanel,
#authRegister:checked ~ #registerPanel {
  display: grid;
}

.auth-panel.has-error::before {
  content: "メール、8文字以上のパスワード、同意チェックを確認してください。";
  padding: 10px 12px;
  background: var(--coral-soft);
  border: 1px solid #f3c0b8;
  border-radius: 8px;
  color: #a43b2e;
  font-size: 13px;
  font-weight: 700;
}

.dialog-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 22px;
}

@media (max-width: 980px) {
  .site-header {
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px;
    overflow: hidden;
  }

  .site-header .nav-links {
    display: none !important;
    visibility: hidden;
    width: 0;
    height: 0;
    overflow: hidden;
  }

  .filters,
  .shop-grid,
  .score-grid,
  .policy-grid,
  .admin-columns,
  .shop-hero,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: grid;
    align-items: start;
    gap: 8px;
  }

  .section-copy {
    max-width: none;
  }

  .hero {
    min-height: auto;
  }

  .shop-hero-photo {
    height: 320px;
    min-height: 0;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding: 10px 14px;
  }

  .brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .brand strong {
    white-space: nowrap;
  }

  .brand small {
    display: none;
  }

  .login-button {
    margin-left: auto;
    min-height: 38px;
    padding: 0 14px;
  }

  h1 {
    font-size: 38px;
  }

  section,
  .hero {
    padding-left: 14px;
    padding-right: 14px;
  }

  .detail-header,
  .score-bar {
    grid-template-columns: 1fr;
  }

  .shop-hero-photo {
    height: 260px;
  }

  .shop-card-photo {
    height: 132px;
  }
}
