:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  background: #eef4ff;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at top, #dce9ff, #f6f8fc 55%); }
.shell { width: min(1800px, calc(100% - 48px)); margin: 20px auto; padding: 28px 32px; background: white; border-radius: 20px; box-shadow: 0 20px 60px rgba(28, 60, 120, .12); }
header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.mark { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; color: white; background: #2f68e8; font-size: 26px; font-weight: 800; }
h1, h2, p { margin: 0; }
header p { margin-top: 4px; color: #667085; }
.security-note { padding: 14px 16px; margin-bottom: 24px; color: #17458f; background: #edf5ff; border: 1px solid #c7ddff; border-radius: 10px; }
form { display: grid; gap: 14px; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
label { display: grid; gap: 7px; color: #344054; font-size: 14px; font-weight: 650; }
label small { color: #667085; font-size: 12px; font-weight: 450; line-height: 1.4; }
input, select, textarea { width: 100%; padding: 12px 13px; color: #172033; background: white; border: 1px solid #cbd5e1; border-radius: 9px; font: inherit; }
textarea { min-height: 150px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
input:focus, select:focus, textarea:focus { outline: 3px solid #dbe8ff; border-color: #2f68e8; }
button { padding: 13px 18px; color: white; background: #2f68e8; border: 0; border-radius: 9px; font: inherit; font-weight: 750; cursor: pointer; }
button:hover { background: #2458cb; }
button.secondary { color: #2f68e8; background: white; border: 1px solid #2f68e8; }
.dropzone { display: grid; justify-items: center; gap: 6px; padding: 20px; color: #475467; background: #f4f8ff; border: 2px dashed #9dbfff; border-radius: 12px; cursor: pointer; transition: .18s ease; }
.dropzone:hover, .dropzone.dragging { color: #17458f; background: #e7f0ff; border-color: #2f68e8; transform: translateY(-1px); }
.dropzone.has-file { color: #17653a; background: #f0fff6; border-color: #62bf86; }
.dropzone .upload-icon { display: grid; place-items: center; width: 44px; height: 44px; color: white; background: #2f68e8; border-radius: 50%; font-size: 27px; font-weight: 800; }
#result { margin-top: 24px; padding: 22px; border: 1px solid #9ed5b5; border-radius: 12px; background: #f0fff6; }
#result h2 { margin-bottom: 16px; color: #17653a; }
.key-panel { display: grid; gap: 10px; padding: 16px; margin-bottom: 18px; color: #7a3e00; background: #fff6e8; border: 1px solid #f4c477; border-radius: 10px; }
.key-panel code { font-size: 20px; font-weight: 800; letter-spacing: .06em; }
dl { display: grid; grid-template-columns: 120px 1fr; gap: 8px 14px; }
dt { color: #667085; } dd { margin: 0; overflow-wrap: anywhere; }
.error { margin-top: 18px; padding: 14px; color: #9b1c1c; background: #fff0f0; border: 1px solid #ffc4c4; border-radius: 10px; }
[hidden] { display: none !important; }
@media (min-width: 1400px) {
  #license-fields .grid.two { grid-template-columns: 1fr 1.35fr 1fr 1fr .65fr; align-items: start; }
}
@media (min-width: 1400px) and (min-height: 900px) {
  .shell { margin: 14px auto; padding: 20px 32px; }
  header { margin-bottom: 16px; }
  .security-note { padding: 11px 16px; margin-bottom: 16px; }
  form { gap: 10px; }
  label { gap: 5px; }
  input, select, textarea { padding: 9px 12px; }
  textarea { min-height: 100px; height: 100px; }
  .dropzone { gap: 3px; padding: 6px 20px; }
  .dropzone .upload-icon { width: 36px; height: 36px; font-size: 22px; }
  button { padding: 10px 18px; }
  #result { margin-top: 12px; padding: 12px 22px; }
  #result h2 { margin-bottom: 8px; font-size: 22px; }
  .key-panel {
    grid-template-columns: max-content minmax(320px, 1fr) 180px;
    align-items: center;
    gap: 14px;
    padding: 8px 14px;
    margin-bottom: 8px;
  }
  .key-panel code { font-size: 18px; }
  dl { margin: 8px 0; gap: 3px 14px; }
}
@media (min-width: 768px) and (max-width: 1399px) {
  .shell { width: min(1120px, calc(100% - 40px)); margin: 20px auto; padding: 28px; }
  .grid.two, #license-fields .grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #license-fields .grid.two label:last-child { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
  .shell { width: calc(100% - 20px); padding: 18px 16px; margin: 10px auto; border-radius: 14px; }
  header { align-items: flex-start; gap: 12px; margin-bottom: 18px; }
  .mark { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 11px; font-size: 22px; }
  h1 { font-size: clamp(22px, 7vw, 30px); line-height: 1.1; }
  header p { font-size: 13px; line-height: 1.4; }
  .security-note { padding: 12px; margin-bottom: 18px; font-size: 13px; line-height: 1.45; }
  .grid.two, #license-fields .grid.two { grid-template-columns: 1fr; }
  form { gap: 12px; }
  input, select, textarea, button { min-height: 46px; font-size: 16px; }
  textarea { min-height: 170px; }
  .dropzone { padding: 24px 14px; text-align: center; }
  .dropzone strong, .dropzone span { overflow-wrap: anywhere; }
  #result { padding: 16px; }
  .key-panel code { font-size: 15px; letter-spacing: .03em; overflow-wrap: anywhere; }
  dl { grid-template-columns: 1fr; gap: 4px; }
  dd { margin-bottom: 8px; }
}
@media (max-width: 380px) {
  .shell { width: 100%; min-height: 100vh; margin: 0; border-radius: 0; }
  header p { display: none; }
}
