:root {
  --bg: #eef3ef;
  --card: #fffdf9;
  --card-solid: #ffffff;
  --text: #1c2a22;
  --muted: #5f6f66;
  --line: #d5e0d7;
  --primary: #1f6f5b;
  --primary-hover: #175647;
  --accent: #c45b6a;
  --warn: #c2410c;
  --warn-bg: #fff7ed;
  --ok: #2a7a2a;
  --shadow: 0 10px 30px rgba(28, 42, 34, 0.08);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "IBM Plex Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  color: var(--text);
  background:
    radial-gradient(ellipse 900px 480px at 12% -10%, rgba(196, 91, 106, 0.16), transparent 55%),
    radial-gradient(ellipse 800px 520px at 100% 0%, rgba(31, 111, 91, 0.14), transparent 50%),
    linear-gradient(165deg, #f7f1ea 0%, #e8f0e9 42%, #dfeae3 100%);
  line-height: 1.5;
  min-height: 100vh;
  padding-bottom: 28px;
}
.top, .who, .banner, main {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}
.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-top: 14px;
  margin-bottom: 8px;
}
.topActions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.brandBlock { min-width: 0; }
.brandHomeLink {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 8px;
  row-gap: 2px;
  color: inherit;
  text-decoration: none;
}
.brandName {
  font-family: "Zen Maru Gothic", "IBM Plex Sans JP", sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  white-space: nowrap;
}
.brandSub {
  font-family: "Zen Maru Gothic", "IBM Plex Sans JP", sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.pageTitle {
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
}
button, input, textarea, select, .ghostBtn {
  font: inherit;
  font-size: 16px;
}
button, .ghostBtn {
  border: 0;
  border-radius: 12px;
  background: var(--primary);
  color: white;
  padding: 11px 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  cursor: pointer;
}
button:hover, .ghostBtn:hover { background: var(--primary-hover); }
button.ghost, .ghostBtn {
  background: var(--card-solid);
  color: var(--primary);
  border: 1px solid var(--line);
  box-shadow: none;
}
button.ghost:hover, .ghostBtn:hover {
  background: #f4f8f5;
  color: var(--primary-hover);
}
.who {
  margin: 0 auto 8px;
  color: var(--muted);
  font-size: 13px;
}
.banner {
  margin: 0 auto 12px;
  background: var(--warn-bg);
  color: var(--warn);
  border: 1px solid #fdba74;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
}
.card, form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  margin: 0 auto 12px;
  max-width: 720px;
  box-shadow: var(--shadow);
}
.card h2, form h2 {
  margin: 0 0 12px;
  font-family: "Zen Maru Gothic", "IBM Plex Sans JP", sans-serif;
  font-size: 18px;
  font-weight: 700;
}
.sectionLabel {
  margin: 18px 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.muted { color: var(--muted); font-size: 13px; }
label { display: block; margin: 10px 0; font-weight: 500; }
input, textarea, select {
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}
textarea { min-height: 120px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row button { flex: 1; }
ul { list-style: none; padding: 0; margin: 0; }
a { color: var(--primary); }

.menuNav {
  display: grid;
  gap: 12px;
}
.menuBtn {
  display: grid;
  gap: 6px;
  padding: 18px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #fbfaf6 100%);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
}
.menuBtn:active { transform: translateY(1px); }
.menuTitle {
  font-family: "Zen Maru Gothic", "IBM Plex Sans JP", sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}

.filterRow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.filterChip {
  border: 1px solid var(--line);
  background: white;
  color: var(--text);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 14px;
  box-shadow: none;
}
.filterChip.isOn {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.orderList { display: grid; gap: 10px; }
.cardHead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.cardHead h2 { margin: 0; }
.checkLabel {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 10px 0;
  font-weight: 500;
}
.lineEdit {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  background: white;
}
.mailListHead {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 0 4px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.mailRow {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  text-decoration: none;
  color: inherit;
  margin-bottom: 8px;
}
.mailRow.unread .mailSubject { color: var(--primary); font-weight: 700; }
.mailRowMain { min-width: 0; }
.mailPeer { color: var(--muted); font-size: 13px; margin-top: 4px; word-break: break-all; }
.mailWhen { color: var(--muted); font-size: 12px; white-space: nowrap; }
.menuWrap { position: relative; }
.moreMenu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 180px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 20;
  display: grid;
  gap: 4px;
}
.moreMenu button {
  justify-content: flex-start;
  background: transparent;
  color: var(--text);
  box-shadow: none;
  border-radius: 8px;
}
.moreMenu button:hover { background: #f4f8f5; }
form h3 {
  margin: 18px 0 8px;
  font-size: 15px;
  color: var(--primary);
}
a.orderLink {
  display: block;
  color: inherit;
  text-decoration: none;
}
a.orderLink:active { transform: translateY(1px); }
.openHint {
  margin-top: 10px;
  font-weight: 600;
  color: var(--primary);
}
.detailList { margin: 0; }
.detailRow {
  display: grid;
  grid-template-columns: 6.5em 1fr;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.detailRow dt {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.detailRow dd { margin: 0; word-break: break-word; }
.lineList { display: grid; gap: 10px; }
.lineItem {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: white;
}
.mailFrame {
  width: 100%;
  min-height: 280px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}
.mailText {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  font: inherit;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}
.orderTop {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 8px;
}
.orderName {
  font-family: "Zen Maru Gothic", "IBM Plex Sans JP", sans-serif;
  font-size: 17px;
  font-weight: 700;
  margin: 0;
}
.orderMeta {
  display: grid;
  gap: 4px;
  font-size: 14px;
}
.orderAmount {
  margin-top: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}
.statusPill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.status-new { background: #e8f5ef; color: var(--primary); }
.status-in_progress { background: #fff4e5; color: #9a5b00; }
.status-shipped { background: #eef0f2; color: #4b5563; }
.status-canceled { background: #fde8ea; color: var(--accent); }
.status-other { background: #eef0f2; color: var(--muted); }

.mailList, .docList { display: grid; gap: 10px; }
.mailCard, .docCard {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  padding: 14px;
}
.mailSubject, .docTitle {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
}
.unread .mailSubject { color: var(--primary); }

.emptyNote {
  padding: 18px 12px;
  text-align: center;
  color: var(--muted);
  background: #f7faf8;
  border-radius: 12px;
  border: 1px dashed var(--line);
}

.calHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.calHead h2 { margin: 0; font-size: 18px; }
.calDow, .calWeek {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.calDow {
  margin-bottom: 6px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.calDay {
  min-height: 54px;
  padding: 6px 4px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: white;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  box-shadow: none;
}
.calDay.isOut { opacity: 0.35; }
.calNum { font-size: 13px; font-weight: 700; }
.calBadge {
  font-size: 11px;
  background: #dceee8;
  color: var(--primary);
  border-radius: 999px;
  padding: 1px 6px;
  font-weight: 700;
}
