:root {
  --navy: #192e6e;
  --gold: #ffbd59;
  --danger: #b42318;
  --grey: #5c6370;
  --border: #d5dbe3;
  --bg: #f4f6f9;
  --white: #fff;
  --font: "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--navy);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
}

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0);
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.top__kicker { margin: 0; font-size: 12px; color: var(--grey); letter-spacing: .08em; }
.top h1 { margin: 0; font-size: 22px; }
.top__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn--gold { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.btn--sm { padding: 6px 12px; font-size: 13px; }

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login__card {
  width: min(420px, 100%);
  padding: 32px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(25, 46, 110, .08);
}
.login__kicker { margin: 0 0 8px; font-size: 12px; color: var(--grey); letter-spacing: .08em; }
.login__card h1 { margin: 0 0 24px; font-size: 22px; }

.photos {
  margin: 0 0 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.photos legend { font-size: 13px; font-weight: 700; padding: 0 6px; }
.photos__list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 12px; }
.photos__item {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 12px;
  align-items: center;
}
.photos__item img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  background: #eef3ff;
}
.photos__item input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}
.photos__add { display: grid; gap: 6px; font-size: 13px; font-weight: 700; }
.photos__hint { margin: 8px 0 0; font-size: 13px; color: var(--grey); }

.layout {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  min-height: calc(100vh - 84px);
}

.list-pane {
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.search { display: block; padding: 12px; }
.search input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0 0 24px;
  overflow: auto;
  flex: 1;
}
.list__item {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 12px 16px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.list__item time { font-size: 12px; color: var(--grey); }
.list__item.is-current { background: #eef3ff; box-shadow: inset 3px 0 0 var(--navy); }
.list__item.is-private { color: var(--grey); }
.list__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.list__badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 1px 8px;
  border-radius: 999px;
  background: #eceff4;
  color: var(--grey);
}

.editor, .empty { padding: 28px 32px 48px; }
.empty { color: var(--grey); }

.row { display: flex; gap: 16px; flex-wrap: wrap; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field--grow { flex: 1; min-width: 180px; }
.field span { font-size: 13px; font-weight: 700; }
.field small { font-weight: 400; color: var(--grey); }
.field__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.field__head-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.field input, .field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  background: var(--white);
}
.field textarea { resize: vertical; }
.field textarea[readonly] {
  background: #eef3ff;
  color: var(--navy);
  cursor: default;
  resize: none;
}

.more { margin: 0 0 16px; }
.more summary { cursor: pointer; font-size: 13px; color: var(--grey); }
.more .field { margin: 12px 0 0; }

.actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  margin: 0 0 20px;
}
.actions__row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.live-url {
  max-width: 100%;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  word-break: break-all;
  text-underline-offset: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--navy);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn--primary { background: var(--navy); color: var(--white); border-color: var(--navy); }
.btn--danger { background: var(--white); color: var(--danger); border-color: var(--danger); }
.btn--ghost { background: transparent; }
.btn:disabled { opacity: .6; cursor: default; }
.btn.is-busy { cursor: wait; }

.status { min-height: 1.5em; margin: 0 0 16px; text-align: right; }
.status--ok { color: #0f7b3a; }
.status--err { color: var(--danger); }

@media (max-width: 800px) {
  .top { flex-direction: column; align-items: flex-start; }
  .layout { grid-template-columns: 1fr; }
  .list-pane { max-height: 40vh; border-right: 0; border-bottom: 1px solid var(--border); }
  .photos__item { grid-template-columns: 1fr; }
}
