*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Hiragino Sans', 'Yu Gothic UI', sans-serif;
  background: #faf6f0;
  color: #3d2c1e;
  line-height: 1.6;
  position: relative;
}

.decorations {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.deco {
  position: absolute;
  border-radius: 16px;
  object-fit: cover;
  opacity: 0.22;
  box-shadow: 0 4px 20px rgba(139, 90, 43, 0.08);
}

.deco-1 {
  top: 6%;
  left: 12%;
  width: min(350px, 56vw);
  transform: rotate(-14deg);
}

.deco-2 {
  top: 2%;
  right: 10%;
  width: min(300px, 50vw);
  transform: rotate(11deg);
}

.deco-3 {
  top: 48%;
  left: 10%;
  width: min(270px, 50vw);
  transform: rotate(-8deg);
  opacity: 0.16;
}

.deco-4 {
  bottom: 2%;
  right: 10%;
  width: min(300px, 50vw);
  transform: rotate(15deg);
}

.deco-5 {
  bottom: 6%;
  left: 12%;
  width: min(290px, 52vw);
  transform: rotate(-6deg);
  opacity: 0.18;
}

.deco-6 {
  top: 36%;
  right: 12%;
  width: min(240px, 44vw);
  transform: rotate(18deg);
  opacity: 0.14;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  position: relative;
  z-index: 1;
}

.header {
  text-align: center;
  margin-bottom: 24px;
}

.logo {
  display: block;
  width: min(420px, 92vw);
  height: auto;
  margin: 0 auto 12px;
  border-radius: 12px;
  object-fit: cover;
}

.header h1 {
  margin: 0;
  font-size: 1.8rem;
  color: #8b5a2b;
}

.subtitle {
  margin: 8px 0 0;
  color: #7a6656;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.tab {
  flex: 1;
  padding: 12px;
  border: 1px solid #d4b896;
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
}

.tab.active {
  background: #8b5a2b;
  color: #fff;
  border-color: #8b5a2b;
}

.panel.hidden {
  display: none;
}

.info-card {
  background: #fff;
  border: 1px solid #e8d5bc;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.info-card dl {
  margin: 0;
  display: grid;
  gap: 8px;
}

.info-card dt {
  font-weight: bold;
  color: #8b5a2b;
}

.info-card dd {
  margin: 0 0 8px;
}

.form-card {
  background: #fff;
  border: 1px solid #e8d5bc;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.form-card h2 {
  margin-top: 0;
  font-size: 1.1rem;
  color: #8b5a2b;
}

label {
  display: block;
  margin-bottom: 14px;
  font-size: 0.95rem;
}

input[type='text'],
input[type='tel'],
input[type='password'],
input[type='number'] {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid #d4b896;
  border-radius: 8px;
  font-size: 1rem;
}

.bread-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid #f0e6d8;
  flex-wrap: wrap;
}

.bread-item .qty-input {
  align-self: center;
}

#bread-list .bread-item {
  flex-direction: column;
  align-items: stretch;
}

#bread-list .bread-item .qty-input {
  align-self: flex-end;
}

.bread-photo {
  width: min(288px, 85vw);
  height: min(288px, 85vw);
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0;
  border: 1px solid #e8d5bc;
}

.bread-photo-empty {
  background: #f5efe6;
  width: min(288px, 85vw);
  height: min(288px, 85vw);
  border-radius: 12px;
  border: 1px solid #e8d5bc;
  flex-shrink: 0;
}

.bread-info {
  flex: 1;
  min-width: 0;
}

.bread-image-field {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.bread-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e8d5bc;
}

.bread-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5efe6;
  color: #7a6656;
  font-size: 0.75rem;
}

.bread-image-label {
  cursor: pointer;
}

.hidden-input {
  display: none;
}

.bread-item:last-child {
  border-bottom: none;
}

.bread-name {
  font-weight: bold;
}

.bread-desc {
  font-size: 0.85rem;
  color: #7a6656;
}

.stock-label {
  font-size: 0.85rem;
  color: #8b5a2b;
  margin-top: 4px;
}

.sold-out-text {
  color: #b33;
  font-weight: bold;
}

.bread-item.sold-out {
  opacity: 0.6;
}

.bread-item.sold-out .qty-input {
  background: #f5f5f5;
}

.qty-input {
  width: 80px !important;
  text-align: center;
}

.btn {
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid #d4b896;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 0.95rem;
}

.btn.primary {
  background: #8b5a2b;
  color: #fff;
  border-color: #8b5a2b;
}

.btn.danger {
  background: #fff;
  color: #b33;
  border-color: #e8a0a0;
  margin-left: 8px;
}

.booking-control {
  margin-bottom: 20px;
}

.booking-control .btn {
  margin-top: 8px;
}

.booking-control .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.message-card {
  background: #fff8ee;
  border: 1px solid #e8d5bc;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.hint {
  font-size: 0.85rem;
  color: #7a6656;
}

.error {
  color: #b33;
  font-size: 0.9rem;
}

.message {
  margin-top: 12px;
  font-size: 0.9rem;
}

.message.ok {
  color: #2a7a3a;
}

.hidden {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}

.modal-content {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  max-width: 420px;
  width: 100%;
}

.reservation-id {
  background: #faf6f0;
  padding: 12px;
  border-radius: 8px;
  word-break: break-all;
}

.footer {
  text-align: center;
  padding: 16px;
  font-size: 0.85rem;
}

.footer a {
  color: #8b5a2b;
}

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.admin-toolbar .info-card {
  flex: 1;
  margin-bottom: 0;
}

.admin-grid {
  display: grid;
  gap: 20px;
  margin-bottom: 20px;
}

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

.publish-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: bold;
  color: #8b5a2b;
  margin-bottom: 10px;
  cursor: pointer;
}

.publish-label input {
  width: auto;
  margin: 0;
}

.menu-row-published {
  border-left: 3px solid #8b5a2b;
  padding-left: 10px;
}

.menu-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 10px;
  align-items: start;
  border-left: 3px solid transparent;
  padding-left: 10px;
}

.menu-fields {
  flex: 1;
}

.stock-label-inline {
  display: block;
  margin-top: 8px;
  font-size: 0.9rem;
}

.stock-label-inline input {
  width: 100px;
  margin-top: 4px;
}

.stock-status {
  display: block;
  font-size: 0.8rem;
  color: #7a6656;
  margin-top: 4px;
}

.menu-row input {
  width: 100%;
}

.sold-out-chip {
  background: #fff0f0;
  border-color: #e8a0a0;
  color: #b33;
}

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

.reservations-header h2 {
  margin: 0;
}

.summary-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.summary-chip {
  background: #faf6f0;
  border: 1px solid #e8d5bc;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.9rem;
}

.summary-total {
  margin: 0 0 16px;
  font-size: 1rem;
}

.summary-total strong {
  color: #8b5a2b;
  font-size: 1.15rem;
}

.bread-price-input {
  max-width: 140px;
}

.reservation-no {
  width: 2.5rem;
  text-align: center;
  color: #8b5a2b;
  font-weight: 700;
}

.delivered-cell {
  width: 3.5rem;
  text-align: center;
}

.delivered-checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #8b5a2b;
}

.amount-cell {
  white-space: nowrap;
  font-weight: 700;
}

.reservation-delivered {
  background: #f3f8f3;
}

.reservation-delivered td {
  color: #5a6b5a;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  border-bottom: 1px solid #f0e6d8;
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

th {
  color: #8b5a2b;
}

.tag-manual {
  display: inline-block;
  font-size: 0.75rem;
  background: #eee;
  padding: 2px 6px;
  border-radius: 4px;
}

.loading {
  color: #7a6656;
}

@media (max-width: 520px) {
  .deco {
    opacity: 0.12;
  }

  .deco-3,
  .deco-6 {
    display: none;
  }
}
