* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: #172e4b; background: #f0f4f9; font: 16px/1.5 system-ui, sans-serif; }
header { display: flex; gap: 14px; align-items: center; background: #142846; color: white; padding: 18px max(18px, calc((100% - 1104px)/2)); }
header small { display: block; color: #d5e5fa; }
.brand { display: block; width: 44px; height: 44px; border-radius: 12px; }
main { max-width: 1140px; margin: auto; padding: 12px 18px 40px; }
#signin { max-width: 440px; margin-inline: auto; }
#workspace { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
#sidebar { display: grid; gap: 4px; margin-top: 12px; padding: 8px; background: white; border: 1px solid #dce6f2; border-radius: 16px; }
#sidebar a { padding: 10px 12px; border-radius: 8px; color: #243c5b; text-decoration: none; font-weight: 600; }
#sidebar a:hover, #sidebar a[aria-current] { color: #174b90; background: #e3efff; }
.profile-info { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; }
.profile-info dd, .stat-grid dd { margin: 0; overflow-wrap: anywhere; }
#profile-edit, #password-edit { margin: 0 0 12px; }
#profile-edit summary, #password-edit summary { color: #1759b8; cursor: pointer; font-weight: 600; }
#profile-form, #password-form { max-width: 480px; margin: 12px 0; }
#profile-status:empty, #password-status:empty { display: none; }
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stat-grid div { background: #eef4fc; border-radius: 12px; padding: 12px; }
.stat-grid dd { color: #174b90; font-size: 30px; font-weight: 700; }
.record-list { list-style: none; padding: 0; }
.record-list li { border-bottom: 1px solid #dce6f2; padding: 8px 0; overflow-wrap: anywhere; }
.record-list small { display: block; margin-top: 4px; }
#order-feedback p { white-space: pre-wrap; }
section { background: white; border: 1px solid #dce6f2; border-radius: 16px; margin: 12px 0; padding: 18px; }
h1, h2 { line-height: 1.2; margin: 0 0 10px; }
h1 { font-size: 26px; } h2 { font-size: 19px; }
p { margin: 8px 0 12px; overflow-wrap: anywhere; }
label { display: grid; gap: 5px; margin-bottom: 13px; }
input, select, button { font: inherit; min-height: 44px; border-radius: 9px; }
input, select { padding: 8px; width: 100%; border: 1px solid #879bb6; color: inherit; background: white; }
button { background: #1759b8; color: white; padding: 8px 15px; border: 1px solid transparent; cursor: pointer; }
button.secondary { background: white; color: #174b90; border-color: #9eb7da; }
button:disabled { opacity: .55; cursor: default; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.actions h1, .actions h2 { margin: 0 auto 0 0; }
a { color: #1759b8; overflow-wrap: anywhere; }
ul { padding-left: 22px; }
li { margin: 9px 0; }
#notice:empty, #push-status:empty { display: none; }
#notice, #push-status { color: #164e80; }
textarea { font: inherit; color: inherit; border: 1px solid #879bb6; border-radius: 9px; padding: 8px; resize: vertical; }
#chat-messages { list-style: none; max-height: 360px; overflow: auto; padding: 0 4px; }
#chat-messages li { padding: 8px 12px; background: #f0f4f9; border-radius: 9px; overflow-wrap: anywhere; }
#chat-messages li.mine { background: #e3efff; }
.record-list li.day-heading, #chat-messages li.day-heading {
  margin: 14px 0 6px; padding: 5px 8px; border: 0; border-radius: 6px;
  background: #eaf1fa; color: #314a68; font-size: 14px; font-weight: 700;
}
#chat-messages p { white-space: pre-wrap; margin: 4px 0; }
#chat-messages a { display: block; }
@media (max-width: 680px) {
  #workspace { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  #sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #sidebar a { padding: 9px 8px; font-size: 14px; }
}
