:root {
  --paper: #f2ecde;
  --paper-2: #fbf8ef;
  --ink: #171310;
  --sub: #6b6258;
  --red: #b83d2f;
  --red-dark: #8f2a20;
  --gold: #c7a861;
  --line: #d8cdae;
  --white: #fffdf8;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  letter-spacing: 0;
}

img {
  display: block;
  max-width: 100%;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  padding: 12px clamp(18px, 4vw, 56px);
  background: rgba(242, 236, 222, 0.92);
  border-bottom: 1px solid rgba(199, 168, 97, 0.38);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.brand-name {
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}

.header-home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  color: var(--red-dark);
  background: rgba(255, 252, 246, 0.74);
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.header-home-link:hover {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(520px, 1.12fr);
  gap: clamp(30px, 5vw, 78px);
  align-items: center;
  min-height: 640px;
  padding: clamp(44px, 7vw, 88px) clamp(18px, 6vw, 86px);
}

.hero-copy {
  position: relative;
  padding-left: clamp(0px, 3vw, 54px);
}

.hero-copy::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 1px;
  height: 70%;
  background: var(--gold);
}

.kicker {
  margin: 0 0 16px;
  color: var(--red);
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

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

h1 {
  margin-bottom: 22px;
  font-size: clamp(34px, 3.2vw, 46px);
  line-height: 1.15;
  word-break: keep-all;
}

h1 span {
  display: block;
}

.hero-copy p:not(.kicker) {
  max-width: 540px;
  color: var(--sub);
  font-size: 18px;
  line-height: 1.8;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
  font-weight: 700;
  cursor: pointer;
}

.button.primary {
  color: #fff;
  background: var(--red);
}

.button.primary:hover {
  background: var(--red-dark);
}

.button.line {
  color: var(--red-dark);
  background: transparent;
  border-color: var(--gold);
}

.hero-photo {
  margin: 0;
  overflow: visible;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: 0 22px 50px rgba(55, 44, 31, 0.16);
  background: var(--white);
}

.hero-photo img {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  border-radius: 8px;
}

.order,
.customer {
  padding: clamp(54px, 8vw, 90px) clamp(18px, 6vw, 86px);
}

.details {
  padding: clamp(34px, 5vw, 58px) clamp(18px, 6vw, 86px);
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--gold);
}

.section-title h2 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 48px);
}

.top-return {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin-bottom: 16px;
  padding: 0 14px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  color: var(--red-dark);
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.order {
  background: var(--paper-2);
}

.purchase-guide {
  margin-bottom: 26px;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--red);
  border-radius: 8px;
  background: var(--white);
}

.purchase-guide h2 {
  margin-bottom: 12px;
  font-size: clamp(28px, 4vw, 44px);
}

.purchase-guide p {
  margin: 0;
  color: var(--sub);
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 700;
  line-height: 1.7;
}

.purchase-customer-panel {
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 26px;
}

.customer {
  background: var(--paper-2);
  padding-top: clamp(34px, 5vw, 58px);
  padding-bottom: clamp(34px, 5vw, 58px);
}

.customer-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
  gap: 18px;
}

.customer-card {
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.customer-card h3 {
  margin: 0;
  font-size: 22px;
}

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

.customer-form[hidden] {
  display: none;
}

.customer-form .full-row,
.customer-form .form-title,
.customer-form button {
  grid-column: 1 / -1;
}

.customer-form .form-title {
  margin-bottom: 2px;
}

.field-help {
  color: var(--red-dark);
  font-size: 12px;
  line-height: 1.5;
}

.phone-inputs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.phone-inputs span {
  color: var(--sub);
  font-weight: 700;
}

.login-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, auto);
  gap: 12px;
  align-items: end;
}

.customer-status,
.registration-result,
.order-result {
  min-height: 1.5em;
  margin: 14px 0 0;
  color: var(--red-dark);
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.registration-result,
.order-result {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: 8px;
  background: var(--white);
  line-height: 1.7;
}

.order-result {
  color: var(--ink);
}

.invoice-download-button {
  width: min(100%, 360px);
  margin: 12px 0 4px;
  color: #fff;
  background: var(--red);
}

.invoice-download-button:hover {
  background: var(--red-dark);
}

.registration-result[hidden],
.order-result[hidden] {
  display: none;
}

.price-note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: 8px;
  background: var(--white);
  color: var(--sub);
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 14px;
  line-height: 1.65;
}

.price-note strong {
  color: var(--red-dark);
}

.shipping-note {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--sub);
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 14px;
  line-height: 1.65;
}

.shipping-note strong {
  color: var(--red-dark);
}

.shipping-note ul {
  margin: 0;
  padding-left: 1.2em;
}

.order-guide {
  margin: -8px 0 18px;
  color: var(--sub);
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.75;
}

.order-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.7fr);
  gap: 24px;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 14px;
  color: var(--sub);
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.product-select {
  display: grid;
  gap: 14px;
}

.product-groups {
  display: grid;
  gap: 18px;
}

.product-group {
  padding: 16px;
  border: 1px solid rgba(216, 205, 174, 0.78);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.54);
}

.product-group h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--ink);
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 17px;
}

.product-group h3::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--red);
}

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

.choice {
  position: relative;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  grid-template-areas:
    "image name"
    "image price"
    "image spec";
  column-gap: 14px;
  row-gap: 6px;
  align-items: center;
  min-height: 146px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
}

.choice input {
  position: absolute;
  opacity: 0;
}

.choice:has(input:checked) {
  border-color: var(--red);
  box-shadow: inset 0 0 0 1px var(--red);
}

.choice img {
  grid-area: image;
  width: 82px;
  height: 82px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
}

.choice span {
  grid-area: name;
  font-weight: 700;
}

.choice strong {
  grid-area: price;
  color: var(--red-dark);
  font-size: 28px;
}

.choice small {
  grid-area: spec;
  color: var(--sub);
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.55;
}

.order-fields {
  display: grid;
  gap: 14px;
  align-self: start;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

label {
  display: grid;
  gap: 8px;
  color: var(--sub);
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}

input,
select {
  height: 46px;
  padding: 0 12px;
}

input:invalid {
  border-color: rgba(184, 61, 47, 0.7);
}

textarea {
  padding: 12px;
  resize: vertical;
}

.small-note {
  margin: 0;
  color: var(--sub);
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 12px;
  text-align: center;
}

.details {
  background: var(--paper);
}

.details .section-title {
  margin-bottom: 18px;
}

.details .section-title h2 {
  font-size: clamp(24px, 3vw, 36px);
}

.point-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.point-grid article,
.scene-grid article {
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--white);
}

.point-grid article {
  padding: 16px;
}

.point-grid span {
  display: block;
  margin-bottom: 8px;
  color: var(--red);
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.point-grid h3,
.scene-grid h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.point-grid p,
.scene-grid p {
  margin: 0;
  color: var(--sub);
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 14px;
  line-height: 1.75;
}

.scene-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.scene-grid article {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: stretch;
  overflow: hidden;
}

.scene-grid img {
  width: 100%;
  height: 100%;
  min-height: 150px;
  object-fit: cover;
  object-position: center;
  background: var(--white);
}

.scene-grid div {
  padding: 16px;
}

.scene-grid .kicker {
  margin-bottom: 8px;
}

.admin {
  padding: clamp(34px, 5vw, 58px) clamp(18px, 6vw, 86px);
  background: var(--paper-2);
}

.admin-login {
  min-height: calc(100vh - 72px);
  display: grid;
  place-items: center;
  padding: clamp(30px, 6vw, 72px) clamp(18px, 6vw, 86px);
  background: var(--paper-2);
}

.admin-login[hidden],
.admin[hidden] {
  display: none;
}

.admin-login-card {
  width: min(100%, 440px);
  display: grid;
  gap: 18px;
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 18px 42px rgba(55, 44, 31, 0.12);
}

.admin-login-card h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 44px);
}

.admin-hero {
  display: grid;
  gap: 12px;
  margin-bottom: 38px;
}

.admin-hero h1 {
  margin-bottom: 0;
  font-size: clamp(42px, 5vw, 68px);
}

.admin-hero p:not(.kicker) {
  margin-bottom: 10px;
  color: var(--sub);
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 16px;
}

.admin-hero .button {
  justify-self: start;
}

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

.admin-section {
  margin-bottom: 42px;
}

.admin-title-row {
  align-items: center;
}

.csv-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
}

.csv-controls label {
  min-width: 140px;
  gap: 6px;
}

.csv-controls input {
  height: 44px;
  font-size: 13px;
}

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

.admin-stats article {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.admin-stats span {
  display: block;
  margin-bottom: 8px;
  color: var(--sub);
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.admin-stats strong {
  color: var(--red-dark);
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 28px;
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.admin-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 13px;
}

.admin-table th,
.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(216, 205, 174, 0.68);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--red-dark);
  background: rgba(242, 236, 222, 0.62);
  white-space: nowrap;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.admin-note {
  color: var(--sub);
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 13px;
  line-height: 1.75;
}

.analytics-stats {
  margin-bottom: 18px;
}

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

.analytics-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.analytics-card h3 {
  margin-bottom: 16px;
  font-size: 20px;
}

.bar-list {
  display: grid;
  gap: 10px;
}

.bar-list.compact {
  max-height: 330px;
  overflow-y: auto;
  padding-right: 4px;
}

.bar-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 42px;
  gap: 10px;
  align-items: center;
  color: var(--sub);
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 13px;
}

.bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(216, 205, 174, 0.48);
}

.bar-track i {
  display: block;
  width: var(--bar-width);
  height: 100%;
  border-radius: inherit;
  background: var(--red);
}

.bar-row strong {
  color: var(--red-dark);
  text-align: right;
}

.ranking-list {
  display: grid;
  gap: 10px;
}

.ranking-list p {
  margin: 0;
  color: var(--sub);
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 13px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(216, 205, 174, 0.58);
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
}

.ranking-row:last-child {
  border-bottom: 0;
}

.ranking-row span {
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
}

.ranking-row strong {
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
}

.ranking-row em {
  color: var(--red-dark);
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 1040px) {
  .hero,
  .order-panel,
  .customer-panel {
    grid-template-columns: 1fr;
  }

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

  .point-grid,
  .scene-grid,
  .admin-stats,
  .analytics-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .site-header {
    min-height: 64px;
  }

  .brand-logo {
    width: 40px;
    height: 40px;
  }

  .brand-name {
    font-size: 13px;
  }

  .header-home-link {
    min-height: 36px;
    padding: 0 12px;
    font-size: 11px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 34px;
  }

  .hero-copy {
    padding-left: 0;
  }

  .hero-copy::before {
    display: none;
  }

  h1 {
    font-size: 34px;
  }

  .button {
    width: 100%;
  }

  .hero-photo img {
    height: auto;
  }

  .section-title {
    display: block;
  }

  .price-note {
    display: block;
  }

  .price-note strong {
    display: block;
    margin-bottom: 4px;
  }

  .customer-form,
  .login-row {
    grid-template-columns: 1fr;
  }

  .choice-grid {
    grid-template-columns: 1fr;
  }

  .product-group {
    padding: 12px;
  }

  .scene-grid article {
    grid-template-columns: 118px minmax(0, 1fr);
  }

  .scene-grid img {
    min-height: 122px;
  }

  .scene-grid div {
    padding: 12px;
  }

  .scene-grid h3 {
    font-size: 15px;
  }

  .scene-grid p {
    font-size: 12px;
  }

  .scene-grid .kicker {
    margin-bottom: 6px;
    font-size: 11px;
  }

  .choice {
    grid-template-columns: 72px minmax(0, 1fr);
    min-height: 134px;
    padding: 14px;
  }

  .choice img {
    width: 72px;
    height: 72px;
  }

  .choice strong {
    font-size: 24px;
  }

  .choice small {
    font-size: 10px;
  }
}
