:root {
  color-scheme: light;
  font: 100%/1.65 -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  color: #203d32;
  background: #f2f6f2;
  --forest: #19573e;
  --ink-muted: #4c6458;
  --border: #d8e5dc;
  --pale-green: #edf5ee;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, p, ol { margin: 0; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
a { color: var(--forest); text-underline-offset: 0.22em; }
:focus-visible { outline: 3px solid #9a651c; outline-offset: 3px; }

.guest-page {
  width: min(calc(100% - 32px), 36rem);
  margin-inline: auto;
  padding-block: max(22px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-bottom));
}

.guest-header { margin-bottom: 20px; }
.guest-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--forest);
  font-size: 0.83rem;
  font-weight: 750;
  text-decoration: none;
}
.guest-brand:hover { text-decoration: underline; }
.guest-brand-mark {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 13px;
  border: 2px solid currentColor;
  border-radius: 4px;
}
.guest-brand-mark::after {
  position: absolute;
  bottom: -4px;
  left: 2px;
  width: 5px;
  height: 5px;
  border-width: 0 0 2px 2px;
  border-style: solid;
  background: #f2f6f2;
  transform: skewY(-35deg);
  content: "";
}
.guest-header h1 { margin-block: 6px; font-size: clamp(1.6rem, 6vw, 2.25rem); line-height: 1.3; }
.guest-header > p { color: var(--ink-muted); font-size: 0.9rem; }

.guest-card {
  padding: clamp(12px, 4vw, 24px);
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 32px #234d3c0b;
}
.guest-progress { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; }
.guest-progress span { color: var(--ink-muted); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.guest-progress progress {
  flex: 1;
  width: 100%;
  height: 6px;
  overflow: hidden;
  appearance: none;
  border: 0;
  border-radius: 9999px;
  background: var(--pale-green);
}
.guest-progress progress::-webkit-progress-bar { background: var(--pale-green); }
.guest-progress progress::-webkit-progress-value { background: #34835d; }
.guest-progress progress::-moz-progress-bar { background: #34835d; }

.guest-history { display: grid; gap: 12px; margin-bottom: 16px; padding: 0; list-style-type: none; }
.guest-exchange { display: grid; gap: 6px; min-width: 0; }
.guest-question, .guest-answer, .guest-past-question {
  width: fit-content;
  max-width: min(95%, 30rem);
  padding: 9px 13px;
  border-radius: 13px;
  overflow-wrap: anywhere;
}
.guest-question, .guest-past-question {
  border-bottom-left-radius: 3px;
  background: var(--pale-green);
}
.guest-question { margin-bottom: 13px; font-size: 1.02rem; font-weight: 750; }
.guest-past-question { color: var(--ink-muted); font-size: 0.86rem; }
.guest-answer {
  justify-self: end;
  border-bottom-right-radius: 3px;
  background: var(--forest);
  color: #fff;
  font-size: 0.9rem;
  white-space: pre-wrap;
}
.guest-step { scroll-margin-block: 14px; }
.guest-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.guest-choices label {
  display: flex;
  gap: 6px;
  align-items: center;
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid #bfd2c5;
  border-radius: 8px;
  color: var(--forest);
  background: #fff;
  font-size: 0.89rem;
  cursor: pointer;
}
.guest-choices label:hover, .guest-choices label:has(input:checked) { background: var(--pale-green); border-color: #398965; }
.guest-choices input, .guest-consent input { flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--forest); }
.guest-field { display: grid; gap: 4px; color: var(--ink-muted); font-size: 0.9rem; font-weight: 700; }
.guest-field small { font-weight: 400; }
.guest-field :is(textarea, input) {
  display: block;
  min-height: 45px;
  width: 100%;
  padding: 9px 11px;
  border: 1px solid #aabcaf;
  border-radius: 8px;
  background: #fff;
  color: #203d32;
  font-size: 1rem;
  font-weight: 400;
}
.guest-field textarea { resize: vertical; }
.guest-help {
  margin-block: 7px;
  color: var(--ink-muted);
  font-size: 0.83rem;
}
.guest-consent {
  display: flex;
  align-items: start;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 0.84rem;
  cursor: pointer;
}
.guest-consent input { margin-top: 0.22em; }
.guest-privacy { display: inline-block; margin-block: 7px; font-size: 0.83rem; }
#guest-challenge { max-width: 100%; }
#guest-challenge:not(:empty) { margin-top: 5px; }

.guest-actions { display: grid; gap: 7px; margin-top: 14px; }
.guest-primary, .guest-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 750;
}
.guest-primary { width: 100%; background: var(--forest); color: #fff; }
.guest-primary:hover { background: #124731; }
.guest-secondary { justify-self: center; background: #fff; color: var(--forest); font-size: 0.84rem; }
.guest-secondary:hover { background: var(--pale-green); }
button:disabled { opacity: 0.55; cursor: default; }
.guest-notice { margin-block: 9px 3px; color: #8a3d25; font-size: 0.88rem; }

.guest-completed { display: grid; gap: 12px; }
.guest-completed h2 { font-size: 1.22rem; }
.guest-completed > p { font-size: 0.9rem; }
.guest-receipt { padding: 10px 13px; border-radius: 8px; background: var(--pale-green); }
.guest-receipt span, .guest-receipt strong { display: block; }
.guest-receipt strong { color: var(--forest); overflow-wrap: anywhere; font-size: 1.04rem; }
.guest-copy { border-color: var(--border); }
.guest-copy-status { margin: 0; color: var(--ink-muted); font-size: 0.83rem; }
.guest-copy-status:not(:empty) { margin-top: 5px; }
.guest-line { width: fit-content; padding-inline: 17px; text-decoration: none; }
.guest-completed > .guest-help { margin: 0; font-size: 0.83rem; }
.guest-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 14px;
  color: var(--ink-muted);
  font-size: 0.78rem;
}
