:root {
  color-scheme: light;
  --bg: #ffffff;
  --panel: #ffffff;
  --ink: #1a1a1a;
  --muted: #666666;
  --line: #eeeeee;
  --line-strong: #e8e8ed;
  --brand: #2240c4;
  --brand-strong: #1a32a0;
  --brand-soft: rgba(34, 64, 196, 0.10);
  --brand-soft-bg: rgba(34, 64, 196, 0.05);
  --danger: #e55036;
  --danger-soft: #fff2f0;
  --success: #16a57a;
  --success-soft: #e8f5e9;
  --warning-soft: #fff8ea;
  --warning-line: rgba(34, 64, 196, 0.22);
  --shadow: 0 18px 48px rgba(34, 64, 196, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #ffffff;
}

body {
  min-height: 100%;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(160deg, #ffffff 0%, #f5f5ff 100%);
}

button,
textarea {
  font: inherit;
}

a {
  color: var(--brand-strong);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.delete-tool {
  min-height: calc(100vh - 80px);
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
  padding: 18px 24px;
  border: 1px solid rgba(238, 238, 238, 0.8);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  color: var(--ink);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.25;
}

.brand span {
  overflow-wrap: anywhere;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: contain;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 1.5px solid var(--line);
  border-radius: 24px;
  background: transparent;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.language-switch:hover {
  border-color: var(--brand);
  background: var(--brand-soft-bg);
}

.language-button {
  min-width: 54px;
  min-height: 34px;
  border: 0;
  border-radius: 18px;
  color: rgba(26, 26, 26, 0.5);
  background: transparent;
  cursor: pointer;
  font-weight: 600;
}

.language-button[aria-pressed="true"] {
  color: var(--ink);
  background: var(--brand-soft);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.panel,
.summary {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel {
  padding: 32px;
}

.summary {
  padding: 24px;
}

.panel-heading {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: 32px;
  line-height: 1.15;
}

h2 {
  margin-bottom: 18px;
  font-size: 18px;
  line-height: 1.25;
}

.lead {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 0;
  margin: 28px 0;
  list-style: none;
}

.steps li {
  height: 4px;
  border-radius: 999px;
  background: var(--line);
}

.steps li.is-active,
.steps li.is-complete {
  background: var(--brand);
}

.form-section {
  min-height: 184px;
}

.field-label {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 700;
}

textarea {
  display: block;
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 14px 16px;
  color: var(--ink);
  background: #fafafb;
  line-height: 1.5;
  outline: none;
}

textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.hint {
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--warning-line);
  border-radius: 8px;
  color: var(--brand-strong);
  background: var(--warning-soft);
  line-height: 1.5;
}

.message-box {
  position: relative;
}

.message-box textarea {
  padding-right: 104px;
}

.message-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  gap: 6px;
}

.icon-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--panel);
  cursor: pointer;
}

.icon-button:hover,
.icon-button[aria-expanded="true"] {
  color: var(--ink);
  border-color: var(--line-strong);
}

.icon-button[aria-expanded="true"] {
  background: var(--brand-soft-bg);
}

.icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wallet-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin-top: 12px;
  font-weight: 700;
  color: var(--brand);
}

.qr-popover {
  width: 204px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
}

.qr-popover[hidden] {
  display: none;
}

.qr-code {
  display: grid;
  width: 180px;
  max-width: 100%;
  aspect-ratio: 1;
  place-items: center;
  background: #ffffff;
}

.qr-code svg {
  display: block;
  width: 100%;
  height: 100%;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  color: var(--muted);
  line-height: 1.5;
}

.check-row input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--brand);
}

.turnstile-row {
  display: flex;
  min-height: 72px;
  margin-top: 16px;
  overflow-x: auto;
}

.alert {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 8px;
  line-height: 1.5;
}

.alert.is-error {
  border: 1px solid #f2b8b5;
  color: var(--danger);
  background: var(--danger-soft);
}

.alert.is-success {
  border: 1px solid #9ed8b5;
  color: var(--success);
  background: var(--success-soft);
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.primary-button,
.secondary-button {
  min-height: 48px;
  border-radius: 8px;
  padding: 0 22px;
  font-weight: 700;
  cursor: pointer;
}

.primary-button {
  border: 1px solid var(--brand);
  color: #ffffff;
  background: var(--brand);
  box-shadow: 0 4px 15px rgba(34, 64, 196, 0.20);
}

.primary-button:hover {
  background: var(--brand-strong);
  box-shadow: 0 6px 20px rgba(34, 64, 196, 0.30);
}

.primary-button.is-danger {
  border-color: var(--danger);
  background: var(--danger);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.secondary-button {
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: var(--panel);
}

.secondary-button:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-soft-bg);
}

.summary dl {
  display: grid;
  gap: 18px;
  margin: 0;
}

.summary div {
  min-width: 0;
}

.summary dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.summary dd {
  margin: 0;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

@media (max-width: 860px) {
  .shell {
    width: min(100% - 24px, 640px);
    padding: 20px 0;
  }

  .delete-tool {
    min-height: calc(100vh - 40px);
  }

  .masthead {
    margin-bottom: 18px;
    padding: 16px;
  }

  .brand {
    font-size: 20px;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .panel,
  .summary {
    padding: 22px;
  }

  h1 {
    font-size: 27px;
  }

  .form-section {
    min-height: 160px;
  }

  .qr-popover {
    width: min(204px, 100%);
  }

  .actions {
    flex-direction: column-reverse;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }
}
