@import url('https://fonts.googleapis.com/css2?family=Zen+Maru+Gothic:wght@500;700;900&family=Zen+Kaku+Gothic+New:wght@400;500;700&family=Bebas+Neue&display=swap');

:root {
  --paper: #f6ecdb;
  --paper-2: #efe2cb;
  --card: #fffaf1;
  --text: #2b2017;
  --muted: #8a7a64;

  --line: #e6d8be;

  --red: #c8102e;
  --red-deep: #9c0c24;
  --green: #2f7d3b;
  --green-deep: #1f5a29;
  --gold: #e3a72f;

  /* ページャーバッジ（明色テーマ） */
  --pager-bg: rgba(255, 250, 241, 0.92);
  --pager-fg: #2b2017;
  --pager-border: rgba(200, 16, 46, 0.42);
  --pager-shadow: 0 6px 18px rgba(60, 38, 12, 0.18);

  --shadow: 0 14px 30px rgba(60, 38, 12, .14);
  --shadow-sm: 0 4px 12px rgba(60, 38, 12, .10);

  --font-jp: "Zen Kaku Gothic New", system-ui, "Noto Sans KR", "Noto Sans JP", sans-serif;
  --font-display: "Zen Maru Gothic", "Zen Kaku Gothic New", sans-serif;
  --font-latin: "Bebas Neue", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-jp);
  color: var(--text);
  background-color: var(--paper);
  /* subtle pizzeria tablecloth check + warm vignette */
  background-image:
    radial-gradient(1200px 600px at 50% -10%, rgba(255, 255, 255, .55), transparent 60%),
    linear-gradient(45deg, rgba(200, 16, 46, .04) 25%, transparent 25%, transparent 75%, rgba(200, 16, 46, .04) 75%),
    linear-gradient(45deg, rgba(200, 16, 46, .04) 25%, transparent 25%, transparent 75%, rgba(200, 16, 46, .04) 75%);
  background-size: auto, 44px 44px, 44px 44px;
  background-position: center, 0 0, 22px 22px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ===== Header / Footer ===== */
.site-header {
  position: relative;
  background:
    linear-gradient(180deg, #e2253c 0%, var(--red) 55%, var(--red-deep) 100%);
  box-shadow: 0 6px 18px rgba(120, 10, 26, .28);
}

/* tricolore strip under the header */
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 5px;
  background: linear-gradient(90deg,
      var(--green) 0 33.33%,
      #fff 33.33% 66.66%,
      var(--red) 66.66% 100%);
}

.site-footer {
  background: linear-gradient(180deg, var(--green) 0%, var(--green-deep) 100%);
  box-shadow: 0 -4px 16px rgba(20, 60, 25, .2);
}

.header-inner,
.footer-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
}

.footer-inner small {
  line-height: 1.7;
  text-align: center;
  opacity: .92;
  letter-spacing: .01em;
}

.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .25));
  transition: transform .18s ease;
}

.logo:hover {
  transform: scale(1.04) rotate(-1deg);
}

.logo img {
  height: 56px;
  width: auto;
  display: block;
}

/* ===== Layout ===== */
.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 30px 16px 44px;
  flex: 1;
  width: 100%;
}

.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 26px 24px 24px;
  overflow: hidden;
}

/* warm paper top accent + a tomato-red ribbon edge */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: linear-gradient(90deg, var(--red) 0%, #e2253c 50%, var(--red) 100%);
}

.title {
  margin: 6px 0 8px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 28px;
  letter-spacing: .01em;
  color: var(--red-deep);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .6);
}

.desc {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.8;
  font-size: 14.5px;
}

/* ===== Fieldset ===== */
.fieldset {
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 18px 16px 16px;
  margin: 0 0 18px;
  background:
    linear-gradient(180deg, #fffdf8 0%, #fdf6e9 100%);
  box-shadow: var(--shadow-sm);
}

.fieldset>legend {
  padding: 5px 14px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 15px;
  color: #fff;
  background: var(--green);
  border-radius: 999px;
  letter-spacing: .04em;
  box-shadow: 0 3px 8px rgba(31, 90, 41, .3);
}

/* ===== Pizza Grid ===== */
.pizza-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 720px) {
  .pizza-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.pizza-item {
  position: relative;
  display: grid;
  grid-template-columns: 20px 88px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.pizza-item input[type="radio"] {
  transform: translateY(-1px);
  accent-color: var(--red);
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* AVAILABLE item: highlight as today's pick */
.pizza-item.available {
  border-color: var(--green);
  background:
    linear-gradient(180deg, #fffdf6 0%, #f4fbef 100%);
  box-shadow: 0 8px 22px rgba(47, 125, 59, .16);
  cursor: pointer;
}

.pizza-item.available:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(47, 125, 59, .22);
}

.pizza-item.available:has(input:checked) {
  border-color: var(--green-deep);
  box-shadow: 0 0 0 3px rgba(47, 125, 59, .18), 0 10px 24px rgba(47, 125, 59, .2);
}

.pizza-img {
  width: 88px;
  height: 70px;
  border: 2px solid #fff;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(60, 38, 12, .16);
}

.pizza-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* meta */
.pizza-meta {
  display: grid;
  gap: 6px;
}

.pizza-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 15.5px;
  line-height: 1.35;
  letter-spacing: .01em;
  color: var(--text);
}

.pizza-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

/* badges */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-latin);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .08em;
  padding: 3px 12px;
  border-radius: 999px;
  width: fit-content;
  border: 1.5px solid var(--line);
  background: #fff;
}

.badge-ok {
  border-color: var(--green);
  color: var(--green);
}

.badge-sold {
  border-color: var(--red);
  color: #fff;
  background: var(--red);
  box-shadow: 0 2px 6px rgba(200, 16, 46, .3);
}

/* qty */
.qty {
  display: grid;
  gap: 6px;
  justify-items: end;
}

.qty-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .05em;
}

.qty select,
.qty input[type="number"] {
  width: 120px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--text);
  font-family: var(--font-jp);
  font-size: 14px;
  font-weight: 700;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.qty input[type="number"]:focus,
.field select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(47, 125, 59, .15);
}

/* soldout */
.soldout {
  opacity: 1;
  background: #f7f1e6;
  border-color: var(--line);
}

.soldout .pizza-name,
.soldout .pizza-note {
  color: #b3a690;
}

.soldout .pizza-img {
  filter: grayscale(.85) brightness(1.02);
}

.soldout .pizza-img img {
  opacity: .8;
}

/* スマホ幅：4カラム1行だと最小幅がビューポートを超えて枚数欄が見切れるため、
   枚数欄を2段目へ落として横はみ出しを解消する */
@media (max-width: 520px) {
  .fieldset {
    min-width: 0; /* UA既定の min-inline-size: min-content を解除 */
  }

  .pizza-item {
    grid-template-columns: 20px 88px minmax(0, 1fr);
  }

  .pizza-meta {
    min-width: 0;
  }

  .pizza-item .qty {
    grid-column: 1 / -1;
    grid-template-columns: auto auto;
    align-items: center;
    justify-content: end;
    gap: 8px;
  }

  .qty select,
  .qty input[type="number"] {
    width: 96px;
  }
}

/* address field */
.field {
  display: grid;
  gap: 9px;
}

.field-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
}

.field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--text);
  font-family: var(--font-jp);
  font-size: 15px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

/* actions */
.actions {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

/* buttons */
.btn {
  appearance: none;
  border: none;
  background: linear-gradient(180deg, #e2253c 0%, var(--red) 55%, var(--red-deep) 100%);
  color: #fff;
  padding: 16px 18px;
  border-radius: 14px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 17px;
  letter-spacing: .06em;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(200, 16, 46, .32);
  transition: transform .14s ease, box-shadow .14s ease, filter .14s ease;
}

.btn:hover {
  filter: brightness(1.05);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(200, 16, 46, .4);
}

.btn:active {
  transform: translateY(1px);
  box-shadow: 0 4px 10px rgba(200, 16, 46, .3);
}

.btn:disabled {
  background: #e9e0cf;
  color: #b3a690;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
  filter: none;
}

.btn.secondary {
  background: #fff;
  color: var(--green-deep);
  border: 2px solid var(--green);
  box-shadow: 0 6px 14px rgba(47, 125, 59, .2);
}

.btn.secondary:hover {
  background: #f4fbef;
  filter: none;
}

/* lock message */
.lock {
  margin: 0;
  color: var(--red-deep);
  font-size: 13.5px;
  font-weight: 700;
  text-align: center;
  display: none;
  padding: 10px 12px;
  background: #fdeaec;
  border: 1.5px solid #f3c2c8;
  border-radius: 10px;
}

.lock.is-visible {
  display: block;
}

/* summary */
.summary {
  margin-top: 4px;
}

.summary-box {
  border: 1.5px solid var(--line);
  border-left: 6px solid var(--green);
  border-radius: 14px;
  padding: 18px 18px;
  background: linear-gradient(180deg, #fffdf8 0%, #f4fbef 100%);
  color: var(--text);
  line-height: 2;
  font-size: 15px;
  box-shadow: var(--shadow-sm);
}

.summary-box strong {
  color: var(--green-deep);
}

/* ===== Order hero (mascot + speech bubble) ===== */
.order-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.order-hero__text {
  flex: 1;
  min-width: 260px;
}

.mascot-img {
  width: 160px;
  height: auto;
  display: block;
  border-radius: 14px;
}

/* speech bubble base look */
.speech {
  width: 260px;
  background: #fff;
  border: 2.5px solid var(--green);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}

.speech__title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 900;
  color: var(--red);
  font-size: 15px;
  line-height: 1.4;
}

.speech__body {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.7;
}

/* =========================================================
   LAYOUT: ORDER PAGE (pizza_ad.html)
   character on the right, bubble absolutely placed to its left
   ========================================================= */
.order-page .order-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.order-page .order-hero__text {
  flex: 1;
  min-width: 260px;
}

.order-page .order-hero__mascot {
  position: relative;
  width: 260px;
  flex: 0 0 260px;
  display: block;
}

.order-page .mascot-img {
  width: 160px;
  height: auto;
  display: block;
  margin-left: auto;
  margin-right: 0;
}

.order-page .speech {
  position: absolute;
  top: 10px;
  right: 170px;
  width: 260px;
  margin: 0;
}

.order-page .speech::after {
  content: "";
  position: absolute;
  right: -14px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 14px solid var(--green);
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
}

.order-page .speech::before {
  content: "";
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 11px solid #fff;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  z-index: 1;
}

@media (max-width: 720px) {
  .order-page .order-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .order-page .order-hero__mascot {
    width: 100%;
    flex: none;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .order-page .mascot-img {
    margin: 0 auto;
  }

  .order-page .speech {
    position: static;
    width: auto;
    margin-top: 12px;
  }

  .order-page .speech::after,
  .order-page .speech::before {
    display: none;
  }
}

/* =========================================================
   LAYOUT: THANKS PAGE (thanks.html)
   bubble (left) + character (right), tail points to character
   ========================================================= */
.thanks-page .order-hero {
  align-items: flex-start;
  gap: 18px;
}

.thanks-page .order-hero__mascot {
  position: static;
  width: auto;
  flex: 0 0 auto;
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 14px;
}

.thanks-page .order-hero__mascot .speech {
  position: relative;
  width: 280px;
  max-width: 44vw;
  margin: 0;
  top: auto;
  right: auto;
  left: auto;
}

.thanks-page .order-hero__mascot .mascot-img {
  width: 150px;
  height: auto;
  margin: 0;
  flex: 0 0 auto;
}

.thanks-page .order-hero__mascot .speech::after {
  content: "";
  position: absolute;
  right: -14px;
  left: auto;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 14px solid var(--green);
  border-right: none;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
}

.thanks-page .order-hero__mascot .speech::before {
  content: "";
  position: absolute;
  right: -10px;
  left: auto;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 11px solid #fff;
  border-right: none;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  z-index: 1;
}

@media (max-width: 720px) {
  .thanks-page .order-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .thanks-page .order-hero__mascot {
    justify-content: center;
    flex-direction: column;
    align-items: center;
  }

  .thanks-page .order-hero__mascot .speech {
    width: 100%;
    max-width: 100%;
  }

  .thanks-page .order-hero__mascot .speech::before,
  .thanks-page .order-hero__mascot .speech::after {
    display: none;
  }
}
