:root {
  font-family: "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #171718;
  background: #f7f7f8;
  --blue: #002fa7;
  --rule: #d7d8dd;
  --muted: #575962;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main {
  max-width: 720px;
  min-height: 100vh;
  margin-inline: auto;
  padding: 2rem clamp(1rem, 5vw, 2.75rem);
  background: #fff;
  border-inline: 1px solid var(--rule);
}
.masthead, .section-heading, .actions, .row {
  display: flex;
  align-items: center;
  gap: .75rem;
  justify-content: space-between;
}
.masthead { border-top: 6px solid var(--blue); padding: 1.25rem 0; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.8rem, 6vw, 3rem); letter-spacing: -.045em; }
h2 { font-size: 1.3rem; overflow-wrap: anywhere; }
label { display: block; font-weight: 650; margin-bottom: .45rem; }
input, button { font: inherit; min-height: 44px; border-radius: 0; }
input:not([type="checkbox"]) {
  width: 100%;
  padding: .65rem .8rem;
  border: 1px solid #828592;
  color: inherit;
  background: #fff;
}
button { padding: .55rem .8rem; cursor: pointer; font-weight: 650; }
button:disabled { opacity: .55; cursor: wait; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.primary { border: 1px solid var(--blue); background: var(--blue); color: #fff; }
.secondary { border: 1px solid var(--rule); background: #fff; color: var(--blue); }
.text-button { border: 0; background: transparent; color: var(--blue); padding-inline: 0; }
section { margin-top: 1.8rem; }
.section-heading { padding: .55rem 0; }
.section-heading button, .row > button.secondary { flex-shrink: 0; }
.actions { justify-content: flex-start; flex-wrap: wrap; margin: .45rem 0 1rem; }
.rows { border-top: 1px solid var(--rule); margin: .5rem 0 0; padding: 0; list-style: none; }
.row { border-bottom: 1px solid var(--rule); padding: .45rem 0; }
.row > span { overflow-wrap: anywhere; }
.row-link { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-width: 0; text-align: left; }
.row-link > span { overflow-wrap: anywhere; }
.row-detail { color: var(--muted); text-align: right; font-weight: 400; }
.empty { padding: 1rem 0; color: var(--muted); line-height: 1.6; }
#notice, #dialog-error { margin-top: 1rem; line-height: 1.55; }
#dialog-error:empty { display: none; }
dialog {
  max-width: 32rem;
  width: calc(100% - 2rem);
  max-height: 90dvh;
  padding: 1rem;
  background: white;
  color: #171718;
  border: 1px solid var(--rule);
  border-top: 5px solid var(--blue);
}
dialog::backdrop { background: rgb(18 21 32 / 44%); }
.dialog-heading { margin-bottom: .65rem; }
.dialog-note { color: var(--muted); line-height: 1.55; margin: .5rem 0 .85rem; }
.draft-row { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.draft-row input { flex: 1; min-width: 0; }
.photo-preview { display: block; max-width: 100%; max-height: 180px; margin: .6rem 0; }

.login { max-width: 32rem; }
.login form { margin-top: 1.3rem; }
.login input { margin-bottom: 1rem; }
.login button { width: 100%; }
.login-error { color: #a12620; margin-top: .75rem; line-height: 1.5; }
