:root {
  color-scheme: light;
  --ink: #192e29;
  --muted: #536861;
  --green: #215b49;
  --deep: #14362d;
  --paper: #f3f6f2;
  --wash: #e8f1e8;
  --line: #d9e3da;
  --amber: #765318;
  font: 16px/1.6 "Hiragino Sans", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.34; }
a { color: var(--green); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #47896d; outline-offset: 3px; }
.shell { width: min(1136px, calc(100% - 64px)); margin-inline: auto; }
.top { background: #fff; border-bottom: 1px solid var(--line); }
.top .shell, footer .shell {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
}
.top .shell { min-height: 74px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  display: grid; place-items: center; width: 39px; height: 39px;
  border-radius: 10px; background: var(--wash); color: var(--deep);
  font: 700 21px Georgia, serif;
}
.brand strong { display: block; font-size: 15px; }
.brand small { display: block; color: var(--muted); font-size: 11px; }
nav { display: flex; flex-wrap: wrap; gap: 5px; }
nav button, .demo-role-link {
  border: 0; border-radius: 7px; background: transparent; color: var(--muted);
  padding: 9px 13px; font-size: 13px; font-weight: 700;
}
nav button[aria-pressed="true"] { background: var(--wash); color: var(--deep); }
.demo-role-link { color: var(--green); border: 1px solid var(--line); text-decoration: none; }
.demo-role-link:hover { background: var(--wash); }
main { padding-block: 30px 44px; }
.banner {
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
  border-radius: 18px; background: var(--deep); color: #fff; padding: 28px 32px;
  margin-bottom: 22px;
}
.banner h1 { font-size: clamp(26px, 4vw, 39px); letter-spacing: .01em; }
.banner p { margin-top: 8px; color: #d8ebde; font-size: 14px; }
.login-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 12px; }
.login-actions span { color: #d8ebde; font-size: 13px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 319px); gap: 18px; align-items: start; }
.stack { display: grid; gap: 18px; min-width: 0; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: 14px; padding: 22px; background: #fff; }
.panel h2 { font-size: 19px; }
.panel-desc { color: var(--muted); margin-block: 5px 12px; font-size: 13px; }
.product {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 13px 0; border-top: 1px solid var(--line);
}
.product:last-child { padding-bottom: 0; }
.product h3 { font-size: 15px; overflow-wrap: anywhere; }
.product p { color: var(--muted); font-size: 12px; margin-top: 3px; }
.quantity { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.quantity input { width: 62px; text-align: center; }
input, select, textarea {
  min-height: 39px; max-width: 100%; width: 100%; padding: 7px 9px;
  color: var(--ink); border: 1px solid #c6d4c9; border-radius: 7px; background: #fff;
  font-size: 16px;
}
textarea { resize: vertical; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 12px; margin-top: 14px; }
.field { min-width: 0; display: grid; align-content: start; gap: 5px; font-weight: 700; font-size: 13px; }
.field :is(input, select, textarea) { font-weight: 400; }
.wide { grid-column: 1 / -1; }
.primary, .secondary {
  min-height: 42px; border-radius: 8px; padding: 8px 13px; font-size: 14px;
  font-weight: 700; border: 1px solid transparent;
}
.primary { color: #fff; background: var(--green); }
.primary:hover { background: var(--deep); }
.secondary { color: var(--green); background: #fff; border-color: #becfc3; }
.secondary:hover { background: var(--wash); }
.secondary.danger { color: #8c2f20; }
.primary.danger { background: #8c2f20; }
.primary.danger:hover { background: #712417; }
.summary { position: sticky; top: 15px; }
.summary .primary { width: 100%; margin-top: 14px; }
.note { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.summary .note { margin-top: 12px; }
.items { list-style: none; margin: 8px 0 0; padding: 0; }
.items li { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.items strong { white-space: nowrap; }
.items small { display: block; color: var(--muted); font-size: 12px; }
.price-breakdown { padding: 10px 12px; border-radius: 8px; background: var(--wash); }
.price-breakdown dl { margin: 0 0 5px; }
.notice { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 16px; padding: 11px 16px; border-radius: 9px; background: var(--wash); }
.notice p { font-size: 14px; font-weight: 700; }
.notice button { min-height: 36px; }
.badge {
  display: inline-block; flex-shrink: 0; border-radius: 20px; padding: 3px 9px;
  color: var(--amber); background: #fff1d5; font-size: 12px; font-weight: 700; white-space: nowrap;
}
.badge.replied { color: var(--deep); background: var(--wash); }
.badge.awaiting-confirmation { color: #214f68; background: #e5f1f9; }
.badge.cancelled { color: #62504b; background: #f1eae7; }
.order-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.order-heading h2, .order-button strong { overflow-wrap: anywhere; }
.rows { display: grid; gap: 8px; margin-top: 12px; }
.order-button {
  width: 100%; text-align: left; display: grid; gap: 5px; border: 1px solid var(--line);
  background: #fff; border-radius: 8px; padding: 10px 11px; color: var(--ink);
}
.order-button[aria-pressed="true"] { background: var(--wash); border-color: #9ebba7; }
.order-button > span:first-child { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
dl { display: grid; grid-template-columns: minmax(72px, auto) minmax(0, 1fr); gap: 6px 12px; margin-block: 14px; font-size: 13px; }
dt { color: var(--muted); }
dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.manage-layout { display: grid; grid-template-columns: minmax(210px, 280px) minmax(0, 1fr); align-items: start; gap: 18px; }
.reply { margin-top: 17px; padding-top: 16px; border-top: 1px solid var(--line); }
.reply h3 { font-size: 16px; }
.actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
footer { border-top: 1px solid var(--line); padding: 16px 0; }
footer p { font-size: 12px; color: var(--muted); }
footer button { border: 0; padding: 7px 0; color: var(--green); background: none; text-decoration: underline; font-size: 12px; white-space: nowrap; }
dialog { border: 1px solid var(--line); border-radius: 13px; padding: 23px; width: min(500px, calc(100% - 30px)); max-height: 88dvh; color: var(--ink); }
dialog::backdrop { background: #0c241ecc; }
dialog h2 { font-size: 21px; margin-bottom: 8px; }
dialog p { color: var(--muted); font-size: 13px; }
#formal-detail .reply { margin-top: 12px; padding-top: 0; border-top: 0; }
#formal-detail details, .request-revisions { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
#formal-detail summary, .request-revisions summary { color: var(--green); font-size: 13px; font-weight: 700; cursor: pointer; }
.request-revisions { margin-top: 14px; }
.request-revisions section { margin-top: 12px; }
.request-revisions > section + section { padding-top: 12px; border-top: 1px solid var(--line); }
.dialog-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
dialog .field, .demo-email-preview, .form-error:not(:empty) { margin-top: 12px; }
.demo-email-preview { display: grid; gap: 4px; padding: 10px 12px; border-radius: 8px; background: var(--wash); }
.demo-email-preview output { color: var(--deep); font-size: 21px; letter-spacing: .12em; font-weight: 700; }
dialog .form-error { color: #8c2f20; }
.terms-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.terms-layout fieldset { min-width: 0; }
.terms-layout legend { padding-inline: 5px; font-weight: 700; }
@media (max-width: 760px) {
  .shell { width: calc(100% - 28px); }
  .top .shell { align-items: flex-start; flex-direction: column; gap: 7px; padding-block: 10px; }
  nav button, .demo-role-link { padding-inline: 10px; }
  main { padding-block: 16px 28px; }
  .banner { flex-direction: column; align-items: flex-start; gap: 13px; padding: 21px 17px; border-radius: 12px; margin-bottom: 15px; }
  .layout, .manage-layout, .terms-layout { grid-template-columns: minmax(0, 1fr); gap: 13px; }
  .stack { gap: 13px; }
  .panel { padding: 15px; border-radius: 11px; }
  .summary { position: static; }
}
@media (max-width: 410px) {
  .fields { grid-template-columns: minmax(0, 1fr); }
  .request-actions { display: grid; justify-content: stretch; }
}
