:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background: #f4f7f6;
  color: #17211f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

.shell {
  align-items: center;
  display: flex;
  min-height: 100vh;
  padding: 32px;
}

.panel {
  background: #ffffff;
  border: 1px solid #d9e2de;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(22, 38, 34, 0.12);
  margin: 0 auto;
  max-width: 720px;
  padding: 40px;
  width: 100%;
}

.eyebrow {
  color: #0f766e;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 12px;
  text-transform: uppercase;
}

h1 {
  font-size: 42px;
  line-height: 1.1;
  margin: 0;
}

.summary {
  color: #50615d;
  font-size: 17px;
  line-height: 1.6;
  margin: 14px 0 30px;
}

.form label,
.result span {
  color: #344540;
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
}

.row,
.copy-row,
.code-row {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr auto;
}

.code-row {
  align-items: center;
  grid-template-columns: auto 1fr;
  margin-top: 6px;
}

.code-row span {
  background: #eef5f2;
  border: 1px solid #bccbc6;
  border-radius: 6px;
  color: #50615d;
  min-height: 48px;
  padding: 13px 14px;
  white-space: nowrap;
}

input {
  border: 1px solid #bccbc6;
  border-radius: 6px;
  color: #17211f;
  font: inherit;
  min-height: 48px;
  min-width: 0;
  padding: 0 14px;
  width: 100%;
}

input:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
  outline: none;
}

button {
  background: #153b34;
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  min-height: 48px;
  padding: 0 22px;
}

button:hover {
  background: #0f2f29;
}

button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.message {
  color: #9f3a22;
  min-height: 22px;
}

.result {
  border-top: 1px solid #e3ebe8;
  margin-top: 28px;
  padding-top: 24px;
}

.history {
  border-top: 1px solid #e3ebe8;
  margin-top: 28px;
  padding-top: 24px;
}

.history-heading {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.history h2 {
  font-size: 20px;
  margin: 0;
}

.secondary {
  background: #e8f1ee;
  color: #153b34;
  min-height: 38px;
  padding: 0 16px;
}

.secondary:hover {
  background: #d8e7e2;
}

.history-list {
  display: grid;
  gap: 10px;
}

.history-item {
  border: 1px solid #dfe8e5;
  border-radius: 6px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) 220px;
  padding: 14px;
}

.history-main {
  min-width: 0;
}

.history-meta {
  align-items: end;
  display: grid;
  gap: 8px;
  justify-items: end;
}

.badge {
  background: #e8f1ee;
  border-radius: 999px;
  color: #153b34;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 9px;
}

.short-link {
  color: #0f766e;
  display: block;
  font-weight: 700;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.short-link:hover {
  text-decoration: underline;
}

.long-link,
.empty,
.note {
  color: #50615d;
  margin: 6px 0 0;
  overflow-wrap: anywhere;
}

.note {
  color: #17211f;
  font-weight: 700;
}

time {
  color: #6a7b76;
  font-size: 13px;
  white-space: nowrap;
}

.history-actions {
  display: grid;
  gap: 8px;
  width: 100%;
}

.small-button {
  background: #e8f1ee;
  color: #153b34;
  font-size: 13px;
  min-height: 34px;
  padding: 0 12px;
  width: 100%;
}

.small-button:hover {
  background: #d8e7e2;
}

.danger {
  background: #f7e6e2;
  color: #9f3a22;
}

.danger:hover {
  background: #efd2ca;
}

@media (max-width: 640px) {
  .shell {
    padding: 18px;
  }

  .panel {
    padding: 28px 20px;
  }

  h1 {
    font-size: 32px;
  }

  .row,
  .copy-row,
  .code-row,
  .history-item {
    grid-template-columns: 1fr;
  }

  .code-row span {
    white-space: normal;
  }

  time {
    white-space: normal;
  }

  .history-meta {
    justify-items: start;
  }
}
