:root { font-family: "Yu Gothic UI", "Meiryo", sans-serif; color: #222a30; background: #f8f9fa; font-size: 15px; letter-spacing: 0; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.masthead { display: flex; align-items: center; gap: 18px; padding: 16px 28px; min-height: 68px; border-bottom: 1px solid #d8dde1; background: #fff; flex-wrap: wrap; }
.masthead strong { font-size: 20px; }
.environment { font-size: 12px; color: #704a05; background: #fff0c2; padding: 4px 8px; border-radius: 3px; }
.masthead nav { margin-left: auto; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
#identity { color: #59646c; overflow-wrap: anywhere; }
main { margin: 0 auto; max-width: 1360px; padding: 28px; }
h1 { font-size: 24px; margin: 0 0 16px; }
h2 { font-size: 20px; margin: 0 0 20px; }
p { line-height: 1.7; }
a { color: #166350; text-underline-offset: 3px; }
button, input, select { font: inherit; }
button { min-height: 40px; padding: 8px 16px; border: 1px solid #b8c1c8; border-radius: 4px; background: #fff; color: #253038; cursor: pointer; line-height: 1.4; }
button:hover { background: #eef2f3; }
button.primary { color: #fff; background: #17654f; border-color: #17654f; }
button.primary:hover { background: #104d3d; }
button:disabled { opacity: .55; cursor: wait; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #167aab; outline-offset: 3px; }
label { display: flex; flex-direction: column; gap: 7px; font-weight: 600; margin: 0 0 18px; min-width: 0; }
input:not([type="checkbox"]), select { background: #fff; color: #222a30; width: 100%; min-width: 0; border: 1px solid #a8b4bd; border-radius: 4px; padding: 10px 12px; min-height: 44px; }
input[type="checkbox"] { width: 18px; height: 18px; flex: 0 0 18px; accent-color: #17654f; }
.notice { background: #f0f2f3; border: 1px solid #d8dde1; padding: 10px 14px; font-size: 14px; }
.login-layout { max-width: 440px; margin-top: 44px; }
.login-layout h1 { margin-bottom: 22px; }
.login-layout .notice { margin-bottom: 28px; }
.login-layout #password-step { border: 0; padding: 0; margin: 0; }
.login-layout #change-login { margin-top: 12px; }
.full { width: 100%; }
[role="status"]:empty { display: none; }
[role="status"] { padding: 12px 14px; background: #edf6f1; color: #17533b; overflow-wrap: anywhere; }
[role="status"].error { color: #9a2525; background: #fff0f0; }
.heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.heading h1 { margin-bottom: 0; }
.eyebrow { font-size: 13px; color: #68717a; margin: 0 0 6px; }
.toolbar { display: flex; align-items: flex-end; gap: 18px; margin: 24px 0 16px; }
.toolbar label { margin: 0; width: 360px; max-width: 100%; }
#count { margin: 0 auto 12px 0; white-space: nowrap; }
.table-wrap { border: 1px solid #d7dee2; border-radius: 4px; background: #fff; overflow: auto; }
table { border-collapse: collapse; width: 100%; table-layout: fixed; text-align: left; }
th { background: #edf0f2; font-size: 13px; color: #505d66; }
th, td { padding: 14px 16px; border-bottom: 1px solid #e0e5e8; vertical-align: middle; overflow-wrap: anywhere; }
th:nth-child(1) { width: 25%; } th:nth-child(2) { width: 14%; } th:nth-child(3) { width: 33%; } th:nth-child(4) { width: 14%; } th:nth-child(5) { width: 14%; }
tr:last-child td { border-bottom: 0; }
td small { display: block; color: #65717a; margin-top: 5px; }
.badge { display: inline-block; font-size: 13px; padding: 3px 8px; border-radius: 3px; background: #edf1f3; color: #3e515d; }
.badge.active { color: #166045; background: #e8f5ec; }
.badge.inactive { color: #862b2b; background: #fbeaea; }
dialog { width: min(600px, calc(100% - 32px)); max-height: calc(100dvh - 40px); overflow-y: auto; padding: 28px; border: 1px solid #c9d1d6; border-radius: 6px; }
dialog::backdrop { background: rgb(22 30 34 / 40%); }
.fields { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
fieldset { border: 1px solid #d2dae0; padding: 12px; margin: 0 0 18px; min-width: 0; }
legend { font-weight: 600; padding: 0 4px; }
.store-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-height: 220px; overflow-y: auto; }
.check { display: flex; flex-direction: row; align-items: center; font-weight: 400; margin: 0; gap: 10px; overflow-wrap: anywhere; }
.actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; flex-wrap: wrap; }
.hint { font-size: 12px; color: #626d76; font-weight: 400; }
.account-layout { max-width: 720px; }
.intake-fields { border: 0; padding: 0; }
.intake-table th:nth-child(1) { width: 16%; }
.intake-table th:nth-child(2) { width: 15%; }
.intake-table th:nth-child(3) { width: 25%; }
.intake-table th:nth-child(4) { width: 16%; }
.intake-table th:nth-child(5) { width: 13%; }
.intake-table th:nth-child(6) { width: 15%; }
#mail-status th:first-child { width: 8rem; }
.history-expanded > td { padding: 12px; background: #f6f8f9; }
.history-expanded[hidden] { display: none; }
.history-expanded table { width: 100%; table-layout: fixed; }
.history-expanded td { overflow-wrap: anywhere; }
#mail-status td small { display: block; margin: 4px 0; }
#mail-status details { margin-top: 8px; overflow-wrap: anywhere; }
#mail-status th:nth-child(2) { width: 5rem; }
#mail-status th:nth-child(3) { width: auto; }
#mail-status td { vertical-align: top; }
#mail-state { background: #f0f2f3; color: #3d4850; }
#mail-state.error { background: #fff0f0; color: #9a2525; }
#operations-details { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 16px; }
#operations-details dt, #operations-details dd { margin: 0; }
#addresses { width: 100%; resize: vertical; min-height: 168px; padding: 12px; font: inherit; line-height: 1.7; border: 1px solid #a8b4bd; border-radius: 4px; }
#addresses:focus-visible { outline: 3px solid #167aab; outline-offset: 3px; }
.recipient-list { padding-left: 22px; overflow-wrap: anywhere; line-height: 1.8; }
#versions details { border-bottom: 1px solid #d8dde1; padding: 14px 0; }
#versions summary { cursor: pointer; overflow-wrap: anywhere; line-height: 1.7; }
dl { margin: 20px 0; }
dt { color: #626d76; font-size: 13px; margin-top: 16px; }
dd { margin: 4px 0 0; overflow-wrap: anywhere; line-height: 1.6; }
.password-section { border-top: 1px solid #d2d9de; margin-top: 30px; padding-top: 24px; }
.password-section form { max-width: 440px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.history-meta { display: flex; justify-content: space-between; gap: 16px; margin: 22px 0 12px; color: #59646c; font-size: 13px; }
.history-table th:nth-child(1) { width: 15%; }
.history-table th:nth-child(2) { width: 15%; }
.history-table th:nth-child(3) { width: 22%; }
.history-table th:nth-child(4) { width: 20%; }
.history-table th:nth-child(5) { width: 28%; }
.history-table td { vertical-align: top; }
.history-change { margin: 8px 0; font-weight: 600; color: #8e3429; }
.history-table summary { cursor: pointer; color: #166350; padding: 8px 0; }
.history-table summary:focus-visible { outline: 3px solid #167aab; outline-offset: 2px; }
.history-table dl { margin: 0 0 8px; font-size: 13px; }
.failure-item { border-top: 1px solid #d2d9de; padding: 20px 0; }
.failure-item h2 { margin: 0 0 8px; font-size: 18px; }
.failure-item summary { cursor: pointer; padding: 8px 0; }
.failure-item summary:focus-visible { outline: 3px solid #167aab; outline-offset: 2px; }
.failure-item dl { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 8px 16px; }
.failure-item dt, .failure-item dd { margin: 0; }
.failure-diagnostic { overflow-wrap: anywhere; font-size: 13px; line-height: 1.7; }
@media (max-width: 680px) {
  main { padding: 22px 16px; }
  .masthead { padding: 14px 16px; gap: 12px; }
  .masthead nav { width: 100%; margin: 0; justify-content: space-between; }
  .masthead #identity { width: 100%; }
  .login-layout { margin-top: 20px; }
  .heading { align-items: flex-start; flex-wrap: wrap; }
  .heading button { margin: 4px 0 0; }
  .toolbar { flex-wrap: wrap; gap: 12px; }
  .toolbar label { width: 100%; }
  #count { margin-bottom: 10px; }
  table, tbody, tr, td { display: block; width: 100%; }
  thead { display: none; }
  tr { border-bottom: 1px solid #d7dee2; padding: 12px 14px; }
  tr:last-child { border: 0; }
  td { border: 0; padding: 7px 0; display: grid; grid-template-columns: 108px minmax(0,1fr); gap: 12px; }
  td::before { content: attr(data-label); color: #626d76; font-size: 13px; padding-top: 3px; }
  td button { justify-self: start; }
  .history-expanded { padding: 0; }
  .history-expanded > td { display: block; padding: 10px; }
  .history-expanded > td::before { content: none; }
  #mail-status table { display: table; }
  #mail-status thead { display: table-header-group; }
  #mail-status tbody { display: table-row-group; }
  #mail-status tr { display: table-row; padding: 0; }
  #mail-status td { display: table-cell; width: auto; }
  #mail-status th, #mail-status td { padding: 10px 8px; border-bottom: 1px solid #e0e5e8; }
  #mail-status th:first-child { width: 7rem; }
  #mail-status td::before { content: none; }
  .fields { grid-template-columns: 1fr; }
  dialog { padding: 22px 18px; }
  .store-options { grid-template-columns: 1fr; }
}
