
:root {
  --bg: #fff;
  --text: #111;
  --muted: #777;
  --line: #e9e9e9;
  --soft: #f6f6f6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input, textarea, select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  opacity: .5;
  cursor: wait;
}

a {
  color: inherit;
  text-decoration: none;
}

.header {
  height: 60px;
  padding: 0 max(20px, calc((100vw - 1040px)/2));
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
}

.brand {
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -.5px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-link {
  color: #666;
  font-size: 13px;
}

.header-link:hover {
  color: #111;
}

.layout {
  width: min(100% - 40px, 680px);
  margin: 0 auto;
  padding: 35px 0 80px;
}

.heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 27px;
}

h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -1px;
  line-height: 1.3;
}

.subtitle {
  color: var(--muted);
  margin: 7px 0 0;
  font-size: 13px;
}

.button {
  border: 1px solid #111;
  background: #111;
  color: white;
  border-radius: 30px;
  padding: 9px 16px;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.button.secondary {
  background: white;
  color: #111;
  border-color: var(--line);
}

.button:hover {
  opacity: .8;
}

.composer {
  display: none;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 13px;
  margin-bottom: 28px;
}

.composer.open {
  display: block;
}

.form-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.form-heading h2 {
  font-size: 16px;
  margin: 0;
}

.field {
  margin-bottom: 15px;
}

.field label {
  display: block;
  font-size: 12px;
  font-weight: 650;
  margin-bottom: 7px;
}

.field input,
.field textarea,
.field select {
  display: block;
  width: 100%;
  border: 1px solid #dedede;
  border-radius: 9px;
  padding: 11px 12px;
  color: var(--text);
  background: white;
  outline: none;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: #888;
}

.field textarea {
  min-height: 130px;
  resize: vertical;
}

.field textarea::placeholder,
.field input::placeholder {
  color: #999;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 19px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.toolbar strong {
  font-size: 13px;
}

.toolbar select {
  max-width: 155px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: white;
  padding: 7px 10px;
  font-size: 12px;
}

.update {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  outline: none;
}

.update h2 {
  font-size: 18px;
  letter-spacing: -.4px;
  margin: 12px 0 7px;
  overflow-wrap: anywhere;
}

.update:hover h2,
.update:focus-visible h2 {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.update:focus-visible {
  outline: 2px solid #999;
  outline-offset: 5px;
}

.update-meta {
  color: var(--muted);
  font-size: 12px;
}

.update-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  background: #f2f2f2;
  color: #444;
}

.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status.released {
  color: #23734a;
  background: #edf7f0;
}

.status.active {
  color: #555;
  background: #f0f0f0;
}

.status.beta {
  color: #7650a1;
  background: #f4effa;
}

.status.in-progress {
  color: #966419;
  background: #faf3e7;
}

.status.planned {
  color: #777;
  background: #f1f1f1;
}

.version {
  color: var(--muted);
  font-size: 12px;
  font-weight: 450;
  margin-left: 7px;
}

.update-body {
  font-size: 13px;
  line-height: 1.85;
  color: #424242;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.update-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  gap: 12px;
}

.update-author {
  font-size: 11px;
  color: var(--muted);
}

.update-actions {
  display: flex;
  gap: 7px;
}

.update-actions,
.update-actions button {
  cursor: pointer;
}

.text-button {
  border: 0;
  background: transparent;
  color: #666;
  font-size: 12px;
  padding: 5px;
}

.text-button:hover {
  color: #111;
}

.text-button.delete:hover {
  color: #bd3030;
}

.empty {
  text-align: center;
  padding: 65px 15px;
}

.empty h2 {
  margin: 0 0 6px;
  font-size: 16px;
}

.empty p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.message {
  padding: 22px 0;
  color: var(--muted);
  font-size: 13px;
}

.error {
  color: #b42318;
}

.toast {
  display: none;
  position: fixed;
  z-index: 30;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 30px);
  background: #111;
  color: white;
  padding: 10px 16px;
  border-radius: 25px;
  font-size: 12px;
}


.update-detail {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(0,0,0,.38);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.update-detail.open {
  display: flex;
  animation: detailFade .2s ease;
}

.update-detail-panel {
  width: min(100%, 680px);
  max-height: min(85vh, 850px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  animation: detailSlide .22s ease;
}

.update-detail-header {
  height: 60px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  z-index: 2;
}

.update-detail-close {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 24px;
  padding: 8px 14px;
  color: #111;
  font-size: 12px;
}

.update-detail-close:hover {
  background: var(--soft);
}

.update-detail-content {
  padding: 30px;
}

.update-detail-content h1 {
  margin: 18px 0 10px;
  font-size: 32px;
  letter-spacing: -1px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.update-detail-version {
  color: var(--muted);
  font-size: 14px;
  margin-left: 8px;
  font-weight: 400;
}

.update-detail-description {
  margin-top: 28px;
  color: #333;
  font-size: 15px;
  line-height: 1.95;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.update-detail-author {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

@keyframes detailFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes detailSlide {
  from {
    opacity: 0;
    transform: translateY(12px) scale(.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media(max-width:600px) {
  .header {
    padding: 0 16px;
  }

  .header-right {
    gap: 13px;
  }

  .layout {
    width: calc(100% - 32px);
    padding-top: 25px;
  }

  h1 {
    font-size: 25px;
  }

  .heading {
    align-items: center;
  }

  .composer {
    padding: 15px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .update h2 {
    font-size: 17px;
  }

  .update-detail {
    padding: 10px;
  }

  .update-detail-panel {
    max-height: 90vh;
    border-radius: 13px;
  }

  .update-detail-header {
    padding: 0 16px;
  }

  .update-detail-content {
    padding: 22px 18px;
  }

  .update-detail-content h1 {
    font-size: 27px;
  }
}

@media(prefers-reduced-motion:reduce) {
  .update-detail.open,
  .update-detail-panel {
    animation: none;
  }
}