:root {
  --bce-green: #c9a45f;
  --bce-green-dark: #8f6b2f;
  --bce-pink: #8f4d5f;
  --bce-ink: #231f20;
  --bce-text: #4f4742;
  --bce-muted: #8b8178;
  --bce-line: #e5d9cc;
  --bce-wash: #f8f3eb;
  --bce-paper: #fffdf8;
  --bce-charcoal: #181719;
  --bce-champagne: #ead8b7;
  --bce-shadow: 0 14px 36px rgba(31, 25, 21, 0.14);
}

* { box-sizing: border-box; }

html { font-size: 62.5%; }

body {
  margin: 0;
  color: var(--bce-text);
  background:
    linear-gradient(135deg, rgba(24, 23, 25, 0.06), transparent 36%),
    linear-gradient(90deg, rgba(201, 164, 95, 0.12), transparent 32%, rgba(143, 77, 95, 0.09)),
    #f5efe7;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, system-ui, sans-serif;
  letter-spacing: 0;
}

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

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

.bce-shell {
  width: 100%;
  min-height: calc(100vh - 117px);
  margin: 0 auto;
  padding: 12px 0 calc(82px + env(safe-area-inset-bottom));
  background: transparent;
  box-shadow: none;
}

.bce-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 52px;
  padding: env(safe-area-inset-top) 14px 0;
  border-bottom: 1px solid var(--bce-line);
  background: rgba(255, 253, 248, 0.94);
  backdrop-filter: blur(16px);
}

.bce-header a:first-child {
  color: var(--bce-green-dark);
  font-size: 1.5rem;
  font-weight: 900;
}

.bce-member-phone .bce-header {
  display: none;
}

.bce-header a:last-child {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--bce-line);
  border-radius: 16px;
  color: var(--bce-green-dark);
  font-size: 1.15rem;
  font-weight: 900;
}

.bce-card,
.bce-chat {
  margin: 0 10px 12px;
  padding: 16px;
  border: 1px solid var(--bce-line);
  border-radius: 8px;
  background: var(--bce-paper);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.03);
}

.bce-card h1,
.bce-chat h1 {
  margin: 0 0 14px;
  color: var(--bce-ink);
  font-size: 2.2rem;
  line-height: 1.25;
}

.bce-card h2 {
  margin: 22px 0 10px;
  color: var(--bce-ink);
  font-size: 1.55rem;
}

.bce-mypage {
  padding: 14px;
}

.bce-mypage-hero {
  margin: -2px 0 14px;
  padding: 14px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--bce-charcoal), var(--bce-green-dark));
}

.bce-mypage-hero small {
  display: block;
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.1rem;
  font-weight: 900;
}

.bce-mypage-hero h1 {
  margin: 0 0 6px;
  color: #fff;
  font-size: 2.4rem;
}

.bce-mypage-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.25rem;
  line-height: 1.65;
}

.bce-form {
  display: grid;
  gap: 12px;
}

.bce-form label,
.bce-card label {
  display: grid;
  gap: 6px;
  color: var(--bce-ink);
  font-size: 1.2rem;
  font-weight: 900;
}

.bce-form input,
.bce-form textarea,
.bce-card input,
.bce-card textarea,
.bce-card select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--bce-line);
  border-radius: 8px;
  color: var(--bce-ink);
  background: rgba(255, 253, 248, 0.92);
  font-size: 1.4rem;
}

.bce-form textarea,
.bce-card textarea {
  min-height: 92px;
  resize: vertical;
}

.bce-check {
  display: flex !important;
  grid-template-columns: auto 1fr;
  flex-direction: row;
  gap: 8px !important;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
  background: var(--bce-wash);
}

.bce-check input {
  width: 18px;
  min-height: 18px;
}

.bce-primary,
.bce-secondary,
.bce-chat-form button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--bce-charcoal), var(--bce-green-dark));
  font-size: 1.45rem;
  font-weight: 900;
  cursor: pointer;
}

.bce-secondary {
  color: var(--bce-charcoal);
  border: 1px solid var(--bce-line);
  background: linear-gradient(180deg, #fffdf8, var(--bce-champagne));
}

.bce-secondary.danger {
  color: #b32d2e;
}

.bce-actions,
.bce-grid {
  display: grid;
  gap: 10px;
}

.bce-next-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.bce-action-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 70px;
  padding: 12px;
  border: 1px solid var(--bce-line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fffdf8, var(--bce-wash));
}

.bce-action-card.is-primary {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--bce-pink), var(--bce-green-dark));
}

.bce-action-card svg {
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
}

.bce-action-card span {
  display: grid;
  gap: 3px;
}

.bce-action-card strong {
  font-size: 1.5rem;
  line-height: 1.2;
}

.bce-action-card small {
  color: currentColor;
  opacity: 0.74;
  font-size: 1.05rem;
  font-weight: 800;
}

.bce-status-card,
.bce-referral-box,
.bce-message-preview {
  margin: 10px 0;
  padding: 12px;
  border: 1px solid var(--bce-line);
  border-radius: 8px;
  background: #fffaf0;
}

.bce-status-card small,
.bce-simple-tile small {
  display: block;
  margin-bottom: 5px;
  color: var(--bce-muted);
  font-size: 1.1rem;
  font-weight: 900;
}

.bce-status-card strong {
  color: var(--bce-ink);
  font-size: 1.4rem;
  line-height: 1.55;
}

.bce-simple-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 10px 0;
}

.bce-simple-tile {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--bce-line);
  border-radius: 8px;
  background: var(--bce-wash);
}

.bce-simple-tile strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--bce-green-dark);
  font-size: 1.7rem;
  line-height: 1.25;
}

.bce-copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  margin-top: 8px;
  padding: 0 11px;
  border: 1px solid rgba(143, 107, 47, 0.42);
  border-radius: 14px;
  color: var(--bce-green-dark);
  background: #fffdf8;
  font-size: 1.1rem;
  font-weight: 900;
  cursor: pointer;
}

.bce-referral-box p {
  margin: 0 0 10px;
  color: var(--bce-text);
  font-size: 1.25rem;
  line-height: 1.65;
}

.bce-message-preview {
  color: var(--bce-text);
  font-size: 1.3rem;
  line-height: 1.7;
}

.bce-member-details {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--bce-line);
  border-radius: 8px;
  background: var(--bce-wash);
}

.bce-member-details summary {
  color: var(--bce-ink);
  font-size: 1.3rem;
  font-weight: 900;
  cursor: pointer;
}

.bce-member-details .bce-def {
  margin-top: 12px;
}

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

.bce-tile {
  display: grid;
  gap: 6px;
  min-height: 92px;
  padding: 12px;
  border: 1px solid var(--bce-line);
  border-radius: 8px;
  background: var(--bce-wash);
}

.bce-tile-main {
  grid-column: 1 / -1;
  background: linear-gradient(180deg, #fffdf8, var(--bce-wash));
}

.bce-tile strong {
  color: var(--bce-ink);
  font-size: 1.6rem;
}

.bce-tile span,
.bce-tile small,
.bce-muted,
.bce-sub,
.bce-def dd {
  color: var(--bce-muted);
  font-size: 1.25rem;
  line-height: 1.6;
}

.bce-tile small {
  display: block;
}

.bce-copy-field {
  margin-top: 0;
}

.bce-sub {
  margin: 14px 0 0;
  text-align: center;
}

.bce-notice {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--bce-green-dark);
  background: var(--bce-wash);
  font-size: 1.25rem;
  font-weight: 800;
}

.bce-center {
  text-align: center;
}

.bce-kv {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 8px;
  background: var(--bce-wash);
}

.bce-kv span {
  color: var(--bce-muted);
  font-size: 1.2rem;
  font-weight: 800;
}

.bce-kv strong {
  color: var(--bce-green-dark);
  font-size: 1.9rem;
}

.bce-def {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 8px 12px;
  margin: 0;
}

.bce-def dt {
  color: var(--bce-ink);
  font-size: 1.2rem;
  font-weight: 900;
}

.bce-def dd {
  margin: 0;
}

.bce-table-wrap {
  overflow-x: auto;
}

.bce-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 1.2rem;
}

.bce-table th,
.bce-table td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--bce-line);
  text-align: left;
}

.bce-reservation-cards {
  display: grid;
  gap: 9px;
}

.bce-reservation-card {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--bce-line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fffdf8, var(--bce-wash));
}

.bce-reservation-card small {
  justify-self: start;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--bce-green-dark);
  background: #fff3d6;
  font-size: 1.05rem;
  font-weight: 900;
}

.bce-reservation-card strong {
  color: var(--bce-ink);
  font-size: 1.55rem;
}

.bce-reservation-card span,
.bce-reservation-card p {
  margin: 0;
  color: var(--bce-muted);
  font-size: 1.22rem;
  line-height: 1.55;
}

.bce-chat {
  min-height: calc(100vh - 158px);
  padding-bottom: 102px;
}

.bce-chat-log {
  display: grid;
  gap: 10px;
}

.bce-bubble {
  max-width: 84%;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--bce-wash);
}

.bce-bubble.mine {
  justify-self: end;
  color: #fff;
  background: linear-gradient(135deg, var(--bce-charcoal), var(--bce-green-dark));
}

.bce-bubble.staff {
  justify-self: start;
}

.bce-bubble p {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.55;
}

.bce-bubble img {
  display: block;
  width: min(180px, 100%);
  margin-top: 8px;
  border-radius: 8px;
}

.bce-bubble time {
  display: block;
  margin-top: 5px;
  opacity: 0.72;
  font-size: 1rem;
  text-align: right;
}

.bce-chat-form {
  position: fixed;
  right: max(calc((100vw - 430px) / 2), 0px);
  bottom: calc(65px + env(safe-area-inset-bottom));
  left: max(calc((100vw - 430px) / 2), 0px);
  display: grid;
  grid-template-columns: 52px 1fr 64px;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border-top: 1px solid var(--bce-line);
  background: rgba(255, 253, 248, 0.96);
  backdrop-filter: blur(16px);
}

.bce-chat-form textarea {
  width: 100%;
  min-height: 44px;
  max-height: 120px;
  padding: 10px;
  border: 1px solid var(--bce-line);
  border-radius: 8px;
  resize: none;
  font-size: 1.35rem;
}

.bce-chat-form button {
  min-height: 44px;
  padding: 0 10px;
  font-size: 1.25rem;
}

.bce-file {
  display: grid;
  place-items: center;
  min-height: 44px;
  border: 1px solid var(--bce-line);
  border-radius: 8px;
  color: var(--bce-charcoal);
  background: linear-gradient(180deg, #fffdf8, var(--bce-wash));
  font-size: 1.1rem;
  font-weight: 900;
}

.bce-file input {
  display: none;
}

@media (max-width: 360px) {
  .bce-grid,
  .bce-next-actions,
  .bce-simple-grid {
    grid-template-columns: 1fr;
  }
}
