:root {
  --bg-top: #fff2df;
  --bg-bottom: #ffc5d4;
  --panel: rgba(255, 252, 247, 0.8);
  --panel-border: rgba(255, 255, 255, 0.75);
  --text: #57352e;
  --muted: #8f6c63;
  --accent: #ff6f91;
  --accent-strong: #f04770;
  --accent-soft: #ffe3ea;
  --mint: #9ad9c7;
  --gold: #f8c15c;
  --shadow: 0 20px 50px rgba(124, 69, 77, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.7), transparent 35%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  color: var(--text);
  font-family: "Zen Maru Gothic", sans-serif;
}

body {
  user-select: none;
}

.title-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #26181b;
  color: #fff8ef;
  transition: opacity 0.75s ease, visibility 0.75s ease;
}

.title-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.title-bg,
.title-vignette {
  position: absolute;
  inset: 0;
}

.title-bg {
  background:
    linear-gradient(180deg, rgba(35, 18, 25, 0.25), rgba(35, 18, 25, 0.45)),
    url("assets/title/title_background.png") center/cover no-repeat,
    radial-gradient(circle at 50% 28%, #ffe2bd 0%, #b76471 42%, #31191f 100%);
  opacity: 0;
  transform: scale(1.04);
}

.title-screen.is-ready .title-bg {
  animation: titleBgFade 1.4s ease forwards;
}

.title-vignette {
  background:
    radial-gradient(circle at 50% 35%, transparent 0 34%, rgba(22, 10, 14, 0.4) 76%, rgba(10, 5, 7, 0.72) 100%),
    linear-gradient(180deg, rgba(255, 216, 170, 0.12), rgba(40, 17, 25, 0.54));
}

.title-content {
  position: relative;
  z-index: 1;
  width: min(780px, 86vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 54px;
  opacity: 0;
  transform: translateY(18px);
}

.title-screen.is-ready .title-content {
  animation: titleContentIn 1s ease 0.55s forwards;
}

.title-logo-wrap {
  position: relative;
  width: min(1320px, 96vw);
  min-height: 450px;
  display: grid;
  place-items: center;
}

.title-logo {
  position: relative;
  z-index: 2;
  max-width: 100%;
  max-height: 540px;
  object-fit: contain;
  filter: drop-shadow(0 18px 28px rgba(34, 11, 18, 0.45));
  transform-origin: center;
}

.title-screen.is-ready .title-logo {
  animation: titleLogoIn 1.1s cubic-bezier(0.18, 0.9, 0.22, 1.1) 0.72s both;
}

.title-logo.is-missing {
  display: none;
}

.title-logo-fallback {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: none;
  place-items: center;
  color: #fff6df;
  font-size: 84px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-shadow:
    0 5px 0 rgba(141, 62, 76, 0.45),
    0 20px 34px rgba(26, 6, 12, 0.5);
}

.title-copy {
  color: rgba(255, 250, 239, 0.92);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-shadow: 0 8px 20px rgba(28, 8, 14, 0.48);
}

.title-actions {
  display: flex;
  gap: 18px;
  justify-content: center;
}

.title-btn {
  min-width: 190px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  padding: 16px 34px;
  background: linear-gradient(180deg, rgba(255, 250, 239, 0.96), rgba(255, 205, 181, 0.95));
  color: #6d332f;
  box-shadow: 0 16px 28px rgba(39, 12, 20, 0.32);
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
}

.title-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 20px 34px rgba(39, 12, 20, 0.42);
  filter: brightness(1.05);
}

.title-btn-secondary {
  background: linear-gradient(180deg, rgba(236, 252, 255, 0.96), rgba(156, 221, 226, 0.95));
  color: #2a646d;
}

.title-btn:disabled {
  opacity: 0.46;
  cursor: default;
  filter: grayscale(0.25);
}

@keyframes titleBgFade {
  from {
    opacity: 0;
    transform: scale(1.07);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes titleContentIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes titleLogoIn {
  0% {
    opacity: 0;
    transform: translateY(-18px) scale(0.94);
  }

  62% {
    opacity: 1;
    transform: translateY(0) scale(1.035);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.ending-thanks-screen {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: block;
  overflow: hidden;
  background: #10090d;
  color: #fff8ec;
  cursor: pointer;
  opacity: 1;
  visibility: visible;
}

.ending-thanks-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.ending-thanks-cg {
  position: absolute;
  inset: 0;
  background: center/cover no-repeat;
  opacity: 0;
  transform: scale(1.025);
  animation: endingCgReveal 1.4s ease forwards;
}

.ending-thanks-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(16, 9, 13, 0.08), rgba(16, 9, 13, 0.24) 64%, rgba(16, 9, 13, 0.58)),
    radial-gradient(circle at 82% 80%, rgba(255, 247, 224, 0.24), transparent 0 28%);
  pointer-events: none;
}

.ending-thanks-logo {
  position: absolute;
  right: 44px;
  bottom: 42px;
  z-index: 2;
  max-width: min(460px, 38vw);
  max-height: 190px;
  object-fit: contain;
  opacity: 0;
  transform: translateY(18px) scale(0.96);
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.42));
  animation: endingThanksLogoIn 0.9s cubic-bezier(0.18, 0.9, 0.22, 1.1) 1.05s forwards;
}

.ending-thanks-logo.is-missing {
  display: none;
}

.ending-thanks-note {
  position: absolute;
  right: 54px;
  bottom: 19px;
  z-index: 2;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(255, 248, 236, 0.78);
  text-shadow: 0 8px 18px rgba(0, 0, 0, 0.5);
  animation: endingNoteBlink 1.3s ease-in-out infinite;
}

@keyframes endingCgReveal {
  from {
    opacity: 0;
    transform: scale(1.045);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes endingThanksLogoIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
    filter: blur(4px) drop-shadow(0 18px 30px rgba(0, 0, 0, 0.42));
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0) drop-shadow(0 18px 30px rgba(0, 0, 0, 0.42));
  }
}

@keyframes endingNoteBlink {
  0%,
  100% {
    opacity: 0.42;
  }

  50% {
    opacity: 1;
  }
}

.screen-fade-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  background: #050308;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.42s ease, visibility 0.42s ease;
}

.screen-fade-overlay.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#viewport {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
}

#game {
  position: relative;
  width: 1280px;
  height: 720px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(18px);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

h1,
h2,
p {
  margin: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  margin-bottom: 10px;
  gap: 12px;
  flex: 0 0 auto;
}

.brand h1 {
  font-size: 28px;
  line-height: 1;
}

.sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.stats {
  display: grid;
  grid-template-columns: minmax(100px, 1.2fr) repeat(4, minmax(92px, 1fr)) minmax(132px, 0.92fr);
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.stat-card {
  min-width: 0;
  padding: 9px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.stat-card .label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
}

.stat-card strong {
  font-size: 18px;
  white-space: nowrap;
}

.speed-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.speed-controls {
  display: flex;
  gap: 3px;
}

.speed-btn {
  border: 1px solid rgba(240, 71, 112, 0.14);
  background: rgba(255, 255, 255, 0.74);
  color: var(--muted);
  border-radius: 999px;
  padding: 5px 7px;
  font: inherit;
  font-size: 8.5px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
  white-space: nowrap;
}

.speed-btn.active {
  background: linear-gradient(180deg, #fff1f5, #ffdfe8);
  color: var(--accent-strong);
  border-color: rgba(240, 71, 112, 0.28);
}

.system-btn {
  flex: 1;
  border: 1px solid rgba(84, 121, 216, 0.16);
  background: rgba(255, 255, 255, 0.74);
  color: var(--muted);
  border-radius: 999px;
  padding: 5px 8px;
  font: inherit;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
  white-space: nowrap;
}

.system-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.main-layout {
  display: grid;
  grid-template-columns: 1.72fr 0.88fr;
  gap: 10px;
  flex: 1 1 auto;
  min-height: 0;
}

.floor-wrap {
  display: flex;
  flex-direction: column;
  padding: 12px;
  min-height: 0;
}

.floor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.floor-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.floor-header h2,
.sidebar-card h2 {
  font-size: 19px;
}

.recipe-open-btn,
.recipe-close-btn {
  border: none;
  border-radius: 999px;
  padding: 8px 12px;
  background: linear-gradient(180deg, #ff95b1, #f04770);
  color: white;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.recipe-book-open-btn {
  background: linear-gradient(180deg, #f7b267, #f08a24);
}

.maid-list-open-btn {
  background: linear-gradient(180deg, #8eb8ff, #5479d8);
}

.inventory-open-btn {
  background: linear-gradient(180deg, #88c6a5, #3f9b6a);
}

.facility-open-btn {
  background: linear-gradient(180deg, #f4cc73, #cb8b2f);
}

.promotion-open-btn {
  background: linear-gradient(180deg, #82d7de, #2c9eaa);
}

.adv-open-btn {
  background: linear-gradient(180deg, #9f90ff, #6656d8);
}

.system-action-btn {
  background: linear-gradient(180deg, #7fc2ff, #3778c8);
}

.system-action-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.floor {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  border-radius: 20px;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 247, 239, 0.08), rgba(255, 247, 239, 0.08)),
    url("assets/backgrounds/cafe_day.png") center/cover no-repeat;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.floor::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(21, 30, 63, 0.12), rgba(31, 19, 52, 0.18)),
    url("assets/backgrounds/cafe_night.png") center/cover no-repeat;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.floor.is-night::before {
  opacity: 1;
}

.floor::after {
  content: "";
  position: absolute;
  inset: 54% 0 0;
  z-index: 0;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 247, 240, 0.12) 0 80px,
      rgba(255, 220, 199, 0.16) 80px 160px
    );
  box-shadow: inset 0 20px 50px rgba(145, 95, 85, 0.06);
  transition: filter 0.5s ease, opacity 0.5s ease;
}

.floor.is-night::after {
  filter: saturate(0.85) brightness(0.78);
  opacity: 0.92;
}

.zone {
  position: absolute;
  z-index: 1;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.45);
  box-shadow: 0 12px 24px rgba(150, 113, 95, 0.1);
}

.zone-title {
  position: absolute;
  top: 10px;
  left: 12px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.kitchen {
  display: none;
}

.kitchen-pass {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 100%;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 247, 240, 0.82);
}

.dish {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  overflow: hidden;
}

.dish img {
  width: 86%;
  height: 86%;
  object-fit: contain;
}

.dish-text {
  display: grid;
  gap: 8px;
}

.dish-text span {
  color: var(--muted);
}

.entrance {
  top: 14px;
  right: 14px;
  width: 112px;
  height: 138px;
  display: grid;
  place-items: center;
  grid-template-rows: 1fr auto;
  padding-bottom: 10px;
}

.entrance,
.waiting-line-indicator {
  display: none;
}

.waiting-line-indicator {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  font-size: 9px;
  font-weight: 700;
  color: var(--muted);
}

.tables {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.table {
  position: absolute;
  width: 128px;
  height: 128px;
  overflow: visible;
}

.table-top {
  position: absolute;
  inset: 20px;
  border-radius: 0;
  background: url("assets/props/table_round.png") center/contain no-repeat;
  box-shadow: none;
  z-index: 2;
}

.table-label {
  display: none;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  z-index: 5;
}

.table-status {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 124px;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  font-size: 10px;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(96, 58, 63, 0.1);
  z-index: 5;
}

.customer,
.meal,
.meal-stack,
.dirty-dish {
  position: absolute;
  transform: none;
}

.meal-stack {
  top: 42px;
  width: auto;
  height: auto;
  z-index: 5;
}

.customer {
  top: -48px;
  width: max-content;
  height: max-content;
  display: block;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  z-index: 1;
}

.customer img {
  display: block;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
}

.meal {
  position: absolute;
  transform: translate(-50%, -50%);
  width: auto;
  height: auto;
  z-index: 1;
}

.meal-left {
  top: 16px;
  left: 10px;
  z-index: 2;
}

.meal-center {
  top: 10px;
  left: 32px;
  z-index: 1;
}

.meal-triple-center {
  top: 6px;
  left: 32px;
  z-index: 1;
}

.meal-pair-left {
  top: 10px;
  left: 10px;
  z-index: 2;
}

.meal-pair-right {
  top: 10px;
  left: 54px;
  z-index: 2;
}

.meal-right {
  top: 16px;
  left: 54px;
  z-index: 2;
}

.meal img {
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
}

.dirty-dish {
  top: 48px;
  width: auto;
  height: auto;
  opacity: 0.8;
  z-index: 5;
}

.dirty-dish img {
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
}

.maids-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.maid {
  position: absolute;
  left: 110px;
  top: 470px;
  width: max-content;
  transition: left 0.8s ease, top 0.8s ease;
}

.maid-bubble {
  margin: 0 auto 6px;
  width: max-content;
  max-width: 132px;
  padding: 5px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(100, 61, 73, 0.16);
  font-size: 9px;
  font-weight: 700;
  box-shadow: 0 12px 22px rgba(100, 61, 73, 0.14);
}

.maid-sprite {
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: 0;
  display: block;
  background: transparent;
  box-shadow: none;
  position: relative;
  overflow: visible;
}

.maid-sprite img {
  display: block;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
}

.maid-name {
  margin-top: 4px;
  text-align: center;
  font-weight: 700;
  font-size: 10px;
  text-shadow: 0 2px 8px rgba(255, 255, 255, 0.75);
}

.sidebar {
  display: grid;
  gap: 8px;
  grid-template-rows: minmax(0, 176px) minmax(0, 1fr);
  min-height: 0;
}

.sidebar-card {
  padding: 10px 12px;
  overflow: hidden;
  min-height: 0;
}

.cycle-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 5px;
}

.cycle-list li {
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  border: 1px solid transparent;
  transition: 0.25s ease;
  font-size: 10px;
}

.cycle-list li.active {
  background: linear-gradient(180deg, #fff5f8, #ffe3ea);
  color: var(--accent-strong);
  border-color: rgba(240, 71, 112, 0.16);
  transform: translateX(4px);
}

.log-panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.recipe-note {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
}

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

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

.maid-option {
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(84, 121, 216, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(243, 246, 255, 0.78));
  color: var(--text);
  cursor: pointer;
  display: grid;
  gap: 4px;
  place-items: center;
  box-shadow: 0 10px 24px rgba(96, 113, 166, 0.08);
  width: 64px;
  flex: 0 0 64px;
}

.maid-option.active {
  background: linear-gradient(180deg, #f3f7ff, #dde7ff);
  border-color: rgba(84, 121, 216, 0.32);
  transform: translateY(-1px);
}

.maid-option-portrait {
  width: 46px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,234,241,0.9));
  overflow: hidden;
}

.maid-option-portrait img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.maid-option-mini-name {
  font-size: 9px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.selected-maid {
  min-height: 26px;
  padding: 6px 8px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.8), rgba(252,236,242,0.8));
  color: var(--muted);
  font-size: 9px;
  line-height: 1.2;
  border: 1px solid rgba(255,255,255,0.85);
}

.ingredient-chip {
  padding: 9px 10px;
  border-radius: 14px;
  border: 1px solid rgba(240, 71, 112, 0.12);
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,240,244,0.82));
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ingredient-chip-main {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex: 1 1 auto;
}

.ingredient-chip-main span {
  min-width: 4em;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

.ingredient-chip-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  object-fit: contain;
  padding: 3px;
  border-radius: 10px;
  background: rgba(255,255,255,0.9);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.9);
}

.ingredient-chip.active {
  background: linear-gradient(180deg, #fff1f5, #ffdfe8);
  color: var(--accent-strong);
  border-color: rgba(240, 71, 112, 0.3);
  box-shadow: 0 10px 22px rgba(240, 71, 112, 0.12);
}

.ingredient-chip:disabled {
  opacity: 0.45;
  cursor: default;
}

.selected-ingredients {
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.82), rgba(255,244,247,0.78));
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  border: 1px solid rgba(255,255,255,0.88);
}

.ingredient-count {
  color: var(--accent-strong);
  font-size: 9px;
  flex: 0 0 auto;
}

.selected-ingredient-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.95);
  box-shadow: 0 8px 16px rgba(150, 113, 95, 0.08);
}

.selected-ingredient-tag span {
  min-width: 4em;
  white-space: nowrap;
  word-break: keep-all;
}

.selected-ingredient-tag img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.selected-ingredient-empty {
  color: var(--muted);
}

.develop-btn {
  border: none;
  border-radius: 12px;
  padding: 8px 10px;
  background: linear-gradient(180deg, #ff8fab, #f04770);
  color: white;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.recipe-result {
  min-height: 52px;
  padding: 10px 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.84), rgba(255,242,246,0.8));
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  border: 1px solid rgba(255,255,255,0.9);
}

#recipe-book-list {
  display: grid;
  gap: 5px;
  overflow: auto;
  min-height: 0;
  flex: 1 1 auto;
  padding-right: 4px;
}

.inventory-modal {
  width: 960px;
  max-width: calc(100% - 40px);
  max-height: calc(100% - 48px);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,245,248,0.92));
}

.inventory-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  overflow: hidden;
  min-height: 0;
}

.inventory-delivery-status {
  padding: 10px 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(247,241,248,0.88));
  border: 1px solid rgba(255,255,255,0.92);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.inventory-delivery-status.is-ordered {
  color: var(--text);
  background: linear-gradient(180deg, rgba(235,255,242,0.96), rgba(220,244,231,0.9));
}

.maid-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  overflow: hidden;
  min-height: 0;
}

.facility-list {
  display: grid;
  gap: 8px;
  overflow: auto;
  min-height: 0;
}

.inventory-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  align-items: start;
  padding: 8px 10px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(248,239,242,0.78));
  font-size: 10px;
  box-shadow: 0 10px 22px rgba(139, 100, 111, 0.08);
}

.inventory-item-main {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.inventory-item-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  object-fit: contain;
  padding: 4px;
  border-radius: 10px;
  background: rgba(255,255,255,0.95);
}

.inventory-item-locked {
  opacity: 0.72;
  background: rgba(239, 232, 236, 0.78);
}

.inventory-meta {
  color: var(--muted);
  font-size: 9px;
}

.inventory-item-order {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.inventory-order-qty {
  font-size: 10px;
  font-weight: 700;
  color: var(--text);
}

.inventory-stepper {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.inventory-step-btn {
  border: none;
  border-radius: 999px;
  padding: 5px 8px;
  background: linear-gradient(180deg, #d7d0dc, #aa9daf);
  color: white;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.inventory-buy-btn {
  border: none;
  border-radius: 999px;
  padding: 6px 10px;
  background: linear-gradient(180deg, #88c6a5, #3f9b6a);
  color: white;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.inventory-buy-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.inventory-step-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.inventory-cart {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(255,237,242,0.86));
  border: 1px solid rgba(255,255,255,0.92);
}

.inventory-cart-summary {
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.inventory-cart-actions {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}

.inventory-cart-btn {
  border: none;
  border-radius: 999px;
  padding: 7px 12px;
  background: linear-gradient(180deg, #ff8fab, #f04770);
  color: white;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.inventory-cart-btn.secondary {
  background: linear-gradient(180deg, #c7bfd2, #8b7b9a);
}

.inventory-cart-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.recipe-book-item {
  padding: 10px 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(250,240,243,0.84));
  display: grid;
  gap: 8px;
  font-size: 9px;
  line-height: 1.4;
  box-shadow: 0 12px 24px rgba(146, 106, 118, 0.08);
  border: 1px solid rgba(255,255,255,0.9);
}

.recipe-book-hero {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.recipe-book-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.recipe-book-summary {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.recipe-book-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.recipe-book-icon {
  width: 62px;
  height: 62px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,232,238,0.92));
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
}

.recipe-book-icon img {
  width: 82%;
  height: 82%;
  object-fit: contain;
}

.recipe-book-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
}

.recipe-book-genre {
  color: var(--muted);
  font-size: 9px;
}

.recipe-book-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.recipe-book-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  color: #81656e;
  border: 1px solid rgba(255,230,237,0.95);
}

.recipe-book-section {
  display: grid;
  gap: 6px;
}

.recipe-book-section-title {
  font-size: 9px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.recipe-book-ingredient-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.recipe-ingredient-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(255,233,240,0.95);
  color: #7d626b;
}

.recipe-ingredient-tag img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.recipe-publish-btn {
  border: none;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 9px;
  font-weight: 700;
  color: white;
  cursor: pointer;
}

.recipe-publish-btn.is-published {
  background: linear-gradient(180deg, #88c6a5, #3f9b6a);
}

.recipe-publish-btn.is-hidden {
  background: linear-gradient(180deg, #c7bfd2, #8b7b9a);
}

.recipe-book-meta,
.recipe-book-ingredients {
  color: var(--muted);
}

.maid-list-item {
  padding: 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(247,240,252,0.82));
  display: grid;
  gap: 10px;
  box-shadow: 0 12px 24px rgba(108, 94, 141, 0.08);
  min-width: 0;
}

.facility-item {
  padding: 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(252,244,235,0.84));
  display: grid;
  gap: 8px;
  box-shadow: 0 12px 24px rgba(160, 121, 70, 0.08);
}

.facility-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.facility-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.facility-level {
  color: var(--muted);
  font-size: 9px;
}

.facility-cost-chip {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.95);
  color: #b27421;
  font-size: 9px;
  font-weight: 700;
}

.facility-meta {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.facility-upgrade-btn {
  justify-self: start;
  border: none;
  border-radius: 999px;
  padding: 6px 10px;
  background: linear-gradient(180deg, #f4cc73, #cb8b2f);
  color: white;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.facility-upgrade-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.maid-list-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.maid-list-hero {
  display: flex;
  align-items: center;
  gap: 10px;
}

.maid-list-portrait {
  width: 64px;
  height: 84px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,233,241,0.92));
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
}

.maid-list-portrait img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.maid-list-title-block {
  display: grid;
  gap: 4px;
}

.maid-list-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.maid-list-flavor {
  color: #866a73;
  font-size: 9px;
  line-height: 1.45;
  max-width: 220px;
}

.maid-list-stats {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
}

.maid-list-stats div {
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(255,255,255,0.76);
}

.recipe-modal-backdrop {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at top, rgba(255, 174, 198, 0.18), transparent 36%),
    rgba(66, 34, 42, 0.42);
  backdrop-filter: blur(8px);
  z-index: 50;
}

.recipe-modal-backdrop.hidden {
  display: none;
}

.recipe-modal {
  width: 920px;
  max-width: calc(100% - 28px);
  max-height: calc(100% - 32px);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,245,248,0.92));
}

.recipe-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.recipe-book-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.recipe-workspace {
  display: grid;
  grid-template-columns: 0.94fr 1.06fr;
  gap: 16px;
  min-height: 0;
  flex: 1 1 auto;
}

.recipe-preview,
.recipe-controls {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255,255,255,0.56);
  border: 1px solid rgba(255,255,255,0.88);
}

.recipe-result-visual {
  flex: 1 1 auto;
  min-height: 300px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top, rgba(255,255,255,0.98), rgba(255,232,238,0.82)),
    linear-gradient(180deg, rgba(255,255,255,0.85), rgba(255,235,241,0.75));
  border: 1px solid rgba(255,255,255,0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  line-height: 1.5;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

.recipe-result-visual img {
  width: auto;
  height: auto;
  max-width: min(100%, 360px);
  max-height: min(100%, 300px);
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 16px 28px rgba(171, 99, 119, 0.18));
}

.recipe-result {
  min-height: 44px;
  line-height: 1.6;
}

.recipe-book-modal {
  width: 860px;
  max-width: calc(100% - 40px);
  max-height: calc(100% - 48px);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,245,248,0.92));
}

.promotion-status {
  padding: 10px 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(245, 252, 252, 0.95), rgba(232, 247, 249, 0.88));
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.promotion-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  overflow: auto;
  padding-right: 4px;
}

.promotion-item {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(94, 179, 190, 0.18);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(239,250,251,0.92));
  box-shadow: 0 10px 22px rgba(69, 138, 146, 0.08);
}

.promotion-item-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.promotion-item-title {
  font-size: 14px;
  font-weight: 700;
}

.promotion-item-cost {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(56, 157, 170, 0.12);
  color: #2b7b84;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.promotion-item-meta,
.promotion-item-effect {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

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

.promotion-tag {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 233, 194, 0.7);
  color: #8c5c07;
  font-size: 10px;
  font-weight: 700;
}

.promotion-apply-btn {
  border: none;
  border-radius: 999px;
  padding: 9px 12px;
  background: linear-gradient(180deg, #82d7de, #2c9eaa);
  color: white;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.promotion-apply-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.daily-report-modal {
  width: 620px;
  max-width: calc(100% - 40px);
  max-height: calc(100% - 48px);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,244,247,0.92));
}

.adv-modal {
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  max-width: calc(100% - 20px);
  max-height: calc(100% - 20px);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.97), rgba(245,240,255,0.92));
}

.adv-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  min-height: 0;
  flex: 1 1 auto;
}

.adv-scene-list {
  display: none;
}

.adv-modal.is-debug .adv-layout {
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 12px;
}

.adv-modal.is-debug .adv-scene-list {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding: 8px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.88), rgba(241,237,255,0.78));
  border: 1px solid rgba(132, 114, 228, 0.16);
}

.adv-scene-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(132, 114, 228, 0.16);
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(241,237,255,0.86));
  cursor: pointer;
  text-align: left;
  color: var(--text);
  box-shadow: 0 10px 22px rgba(109, 92, 183, 0.08);
}

.adv-scene-item.active {
  border-color: rgba(102, 86, 216, 0.34);
  background: linear-gradient(180deg, rgba(245,242,255,0.98), rgba(229,223,255,0.92));
  transform: translateY(-1px);
}

.adv-scene-item-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
}

.adv-scene-item-summary {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.adv-scene-badge {
  padding: 3px 7px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff0a8, #f8c15c);
  color: #7b4c00;
  font-size: 9px;
  font-weight: 700;
  flex: 0 0 auto;
}

.adv-stage {
  position: relative;
  min-height: 0;
  flex: 1 1 auto;
  border-radius: 24px;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.24s ease;
  background: #2b2032;
}

.adv-stage.has-event-cg {
  background: #fffaf2;
}

.adv-stage.is-cg-prelude {
  background: #fffaf2;
}

.adv-stage.is-black-transition {
  background: #000;
}

.adv-stage-shell {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.adv-close-floating {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 4;
}

.adv-stage.is-faded {
  opacity: 0;
}

.adv-background,
.adv-stage-overlay,
.adv-event-cg-layer,
.adv-portrait-layer,
.adv-ui-layer {
  position: absolute;
  inset: 0;
}

.adv-background {
  background:
    linear-gradient(180deg, rgba(22, 18, 28, 0.04), rgba(22, 18, 28, 0.18)),
    url("assets/backgrounds/cafe_day.png") center/cover no-repeat;
  transform: scale(1.02);
}

.adv-stage.has-event-cg .adv-background {
  opacity: 0;
}

.adv-stage.is-cg-prelude .adv-background {
  opacity: 0;
}

.adv-stage-overlay {
  background:
    linear-gradient(180deg, rgba(12, 10, 16, 0.08) 0%, rgba(12, 10, 16, 0.02) 38%, rgba(12, 10, 16, 0.28) 72%, rgba(12, 10, 16, 0.44) 100%);
  z-index: 1;
}

.adv-event-cg-layer {
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease;
  z-index: 2;
}

.adv-event-cg-layer.is-visible {
  opacity: 1;
}

.adv-event-cg {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  /* イベントCGの中央がテキストウィンドウを除いた見える範囲の中央に来るように調整します。 */
  object-position: center calc(50% - 90px);
}

.adv-portrait-layer {
  /* ここで ADV 立ち絵レイヤー全体の表示位置を設定します。 */
  display: block;
  padding: 24px 0 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 3;
}

.adv-stage.has-event-cg .adv-portrait-layer {
  opacity: 0;
}

.adv-stage.is-cg-prelude .adv-portrait-layer {
  opacity: 0;
}

.adv-portrait-slot {
  position: absolute;
  bottom: 0;
  width: 36%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transform: translateX(-50%);
  transition: opacity 0.25s ease, filter 0.25s ease;
}

.adv-portrait-slot.is-visible {
  opacity: 1;
  transform: translateX(-50%);
}

.adv-portrait-slot.is-dim {
  filter: brightness(0.72) saturate(0.9);
}

.adv-portrait-slot-left,
.adv-portrait-slot-right {
  /* ここで左右の立ち絵スロットの表示位置を設定します。 */
  justify-content: center;
  z-index: 1;
}

.adv-portrait-slot-left {
  /* ここで左立ち絵スロットの基本位置を設定します。 */
  left: 38%;
}

.adv-portrait-slot-center {
  /* ここで中央の立ち絵スロットを画面中央に固定します。 */
  left: 50%;
  z-index: 2;
}

.adv-portrait-slot-right {
  /* ここで右立ち絵スロットの基本位置を設定します。 */
  left: 62%;
}

.adv-portrait-layer.layout-triple .adv-portrait-slot-left {
  /* ここで 3 人表示時の左立ち絵を中央寄りに配置します。 */
  left: 20%;
}

.adv-portrait-layer.layout-triple .adv-portrait-slot-right {
  /* ここで 3 人表示時の右立ち絵を中央寄りに配置します。 */
  left: 80%;
}

.adv-portrait-layer.layout-single .adv-portrait-slot-left,
.adv-portrait-layer.layout-single .adv-portrait-slot-right {
  /* ここで 1 人表示時に左右スロットを隠します。 */
  display: none;
}

.adv-portrait-layer.layout-double .adv-portrait-slot-center {
  /* ここで 2 人表示時に中央スロットを隠します。 */
  display: none;
}

.adv-portrait {
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: center bottom;
  transform-origin: center bottom;
  filter: drop-shadow(0 22px 36px rgba(25, 18, 38, 0.36));
}

.adv-portrait:not([src]),
.adv-portrait[src=""] {
  opacity: 0;
}

.adv-ui-layer {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  z-index: 4;
}

.adv-scene-title {
  display: none;
}

.adv-textbox {
  display: grid;
  gap: 8px;
  padding: 16px 18px 14px 32px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(246,241,255,0.92));
  border: 1px solid rgba(255,255,255,0.96);
  box-shadow: 0 18px 36px rgba(25, 18, 38, 0.18);
  min-height: 176px;
  margin-top: auto;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.adv-stage.is-cg-intro .adv-textbox {
  opacity: 0;
  transform: translateY(18px);
}

.adv-stage.is-cg-prelude .adv-textbox {
  opacity: 0;
  transform: translateY(18px);
}

.adv-textbox.is-hidden-by-line {
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
}

.adv-speaker {
  height: 28px;
  color: #7f51d8;
  font-size: 22px;
  line-height: 28px;
  font-weight: 700;
  overflow: hidden;
}

.adv-text {
  min-height: 84px;
  color: var(--text);
  font-size: 22px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.adv-choices {
  display: grid;
  gap: 8px;
}

.adv-choice-btn {
  border: 1px solid rgba(127, 81, 216, 0.2);
  border-radius: 16px;
  padding: 13px 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(239,233,255,0.9));
  color: var(--text);
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(97, 76, 145, 0.08);
}

.adv-choice-btn:hover {
  transform: translateY(-1px);
}

.adv-continue {
  justify-self: end;
  min-width: 28px;
  color: #7f51d8;
  font-size: 28px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
}

.adv-continue.is-visible {
  opacity: 1;
  animation: adv-blink 1s ease-in-out infinite;
}

.adv-actions {
  display: none;
}

.adv-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.adv-skip-btn {
  background: linear-gradient(180deg, #f1b8b8, #d86f7a);
}

.adv-auto-btn {
  background: linear-gradient(180deg, #b7d9f8, #6aa6de);
}

.adv-auto-btn.is-active {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.55) inset;
  filter: saturate(1.15) brightness(1.04);
}

.adv-next-btn {
  display: none;
}

@keyframes adv-blink {
  0%, 100% {
    opacity: 0.2;
  }
  50% {
    opacity: 1;
  }
}

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

.daily-report-card {
  padding: 10px 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,238,243,0.84));
  display: grid;
  gap: 4px;
  box-shadow: 0 10px 22px rgba(148, 106, 118, 0.08);
}

.daily-report-label {
  font-size: 9px;
  color: var(--muted);
}

.daily-report-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.daily-report-section {
  display: grid;
  gap: 6px;
  min-height: 0;
}

.daily-report-ranking {
  display: grid;
  gap: 6px;
}

.delivery-report-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.delivery-report-animation {
  display: grid;
  place-items: center;
  width: 176px;
  height: 128px;
  margin: 0 auto;
  padding: 2px 0 8px;
  overflow: hidden;
}

.delivery-report-modal.is-opening .delivery-box-lid {
  animation: delivery-box-open 0.8s ease forwards;
}

.delivery-report-modal.is-opening .delivery-box-item-a {
  animation: delivery-item-pop-a 1s ease 0.18s forwards;
}

.delivery-report-modal.is-opening .delivery-box-item-b {
  animation: delivery-item-pop-b 1.05s ease 0.24s forwards;
}

.delivery-report-modal.is-opening .delivery-box-item-c {
  animation: delivery-item-pop-c 1s ease 0.3s forwards;
}

.delivery-box {
  position: relative;
  width: 132px;
  height: 98px;
}

.delivery-box-lid {
  position: absolute;
  left: 14px;
  top: 18px;
  width: 104px;
  height: 26px;
  border-radius: 12px 12px 8px 8px;
  background: linear-gradient(180deg, #d8b07a, #bc8654);
  box-shadow: 0 8px 14px rgba(120, 78, 42, 0.18);
  transform-origin: 18px 90%;
}

.delivery-box-base {
  position: absolute;
  left: 18px;
  bottom: 6px;
  width: 96px;
  height: 50px;
  border-radius: 10px;
  background: linear-gradient(180deg, #d6a26d, #b37747);
  box-shadow: 0 16px 24px rgba(101, 62, 33, 0.18);
}

.delivery-box-inner {
  position: absolute;
  left: 26px;
  bottom: 28px;
  width: 80px;
  height: 48px;
}

.delivery-box-item {
  position: absolute;
  bottom: 0;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(8px) scale(0.75);
  box-shadow: 0 8px 14px rgba(104, 74, 132, 0.14);
  background: rgba(255,255,255,0.96);
  display: grid;
  place-items: center;
}

.delivery-box-item-a {
  left: 0;
}

.delivery-box-item-b {
  left: 27px;
}

.delivery-box-item-c {
  right: 0;
}

.delivery-box-item img {
  width: 72%;
  height: 72%;
  object-fit: contain;
}

.delivery-report-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(238,248,242,0.88));
  box-shadow: 0 10px 22px rgba(113, 145, 122, 0.08);
}

.delivery-report-item-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,0.96);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
}

.delivery-report-item-icon img {
  width: 72%;
  height: 72%;
  object-fit: contain;
}

.delivery-report-item-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
}

.delivery-report-item-meta {
  font-size: 10px;
  color: var(--muted);
}

.system-notice-modal {
  width: min(620px, 88vw);
  padding: 28px 32px 30px;
  display: grid;
  gap: 16px;
  text-align: center;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 223, 151, 0.45), transparent 0 34%),
    linear-gradient(180deg, rgba(255, 253, 247, 0.98), rgba(255, 237, 226, 0.98));
}

.system-notice-kicker {
  justify-self: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 111, 145, 0.14);
  color: #d94f70;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.system-notice-modal h2 {
  margin: 0;
  color: #5d332f;
  font-size: 28px;
  line-height: 1.25;
}

.system-notice-body {
  color: #74564f;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.75;
  white-space: pre-line;
  text-align: left;
}

.system-notice-ok-btn {
  justify-self: center;
  min-width: 180px;
  border: none;
  border-radius: 999px;
  padding: 14px 34px;
  background: linear-gradient(180deg, #ff8aa5, #e75478);
  color: white;
  box-shadow: 0 12px 24px rgba(209, 69, 101, 0.28);
  font: inherit;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}

.system-notice-ok-btn:hover {
  filter: brightness(1.05);
}

@keyframes delivery-box-open {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(-28deg) translate(-6px, -4px);
  }
}

@keyframes delivery-item-pop-a {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.75);
  }
  35% {
    opacity: 1;
    transform: translate(-7px, -30px) scale(1.02);
  }
  70% {
    opacity: 1;
    transform: translate(-12px, -42px) scale(0.98);
  }
  100% {
    opacity: 0;
    transform: translate(-14px, -54px) scale(0.92);
  }
}

@keyframes delivery-item-pop-b {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.75);
  }
  35% {
    opacity: 1;
    transform: translate(0, -34px) scale(1.03);
  }
  70% {
    opacity: 1;
    transform: translate(0, -48px) scale(0.98);
  }
  100% {
    opacity: 0;
    transform: translate(0, -62px) scale(0.92);
  }
}

@keyframes delivery-item-pop-c {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.75);
  }
  35% {
    opacity: 1;
    transform: translate(7px, -29px) scale(1.02);
  }
  70% {
    opacity: 1;
    transform: translate(12px, -41px) scale(0.98);
  }
  100% {
    opacity: 0;
    transform: translate(14px, -53px) scale(0.92);
  }
}

.daily-report-rank-item,
.daily-report-summary {
  padding: 10px 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,240,244,0.86));
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.daily-report-rank-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.daily-report-rank-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255,255,255,0.95);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.daily-report-rank-icon img {
  width: 76%;
  height: 76%;
  object-fit: contain;
}

.daily-report-rank-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
}

.daily-report-skip-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-end;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
}

.daily-report-skip-toggle input {
  margin: 0;
}

/* 管理UIの文字サイズ調整 */
.recipe-modal,
.recipe-book-modal,
.inventory-modal,
.daily-report-modal {
  font-size: 14px;
}

.recipe-note,
.recipe-result,
.ingredient-chip,
.selected-ingredients,
.inventory-delivery-status,
.inventory-item,
.inventory-cart-summary,
.recipe-book-item,
.recipe-book-chip,
.promotion-status,
.promotion-item-meta,
.promotion-item-effect,
.promotion-tag,
.daily-report-rank-item,
.daily-report-summary,
.delivery-report-item,
.maid-list-stats,
.facility-meta {
  font-size: 13px;
}

.inventory-meta,
.inventory-step-btn,
.inventory-order-qty,
.maid-option-mini-name,
.selected-maid,
.ingredient-count,
.recipe-book-genre,
.recipe-book-section-title,
.recipe-publish-btn,
.facility-level,
.facility-cost-chip,
.promotion-item-cost,
.maid-list-flavor,
.daily-report-label,
.daily-report-skip-toggle,
.delivery-report-item-meta {
  font-size: 12px;
}

.develop-btn,
.inventory-buy-btn,
.inventory-cart-btn,
.facility-upgrade-btn,
.promotion-apply-btn {
  font-size: 14px;
}

.recipe-book-title,
.maid-list-title,
.facility-title,
.delivery-report-item-title,
.daily-report-rank-title {
  font-size: 15px;
}

.promotion-item-title {
  font-size: 17px;
}

.daily-report-value {
  font-size: 22px;
}

#log {
  margin-top: 8px;
  display: grid;
  gap: 5px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.log-entry {
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.62);
  font-size: 9px;
  line-height: 1.3;
}

.log-entry strong {
  color: var(--accent-strong);
}
