:root  {
  color-scheme: dark;
  font-family: Arial, 'Microsoft YaHei', sans-serif;
  background: #0b0a08;
  color: #eee3d0;
}

*  {
  box-sizing: border-box;
}

body  {
  margin: 0;
}

main  {
  max-width: 1360px;
  margin: auto;
  padding: 28px;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 8px;
}

h1 {
  margin: 0 0 12px;
  color: #f2ce88;
  font-size: 26px;
}

p  {
  line-height: 1.8;
  color: #c2b7a2;
}

form  {
  display: grid;
  grid-template-columns: 120px minmax(160px, 1fr) minmax(150px, .9fr) minmax(200px, 1fr) auto;
  gap: 16px;
  align-items: end;
  padding: 20px;
  border: 1px solid #715431;
  border-radius: 12px;
  background: #19140e;
}

label  {
  display: grid;
  gap: 10px;
}

input, select, button  {
  font: inherit;
  min-width: 0;
  min-height: 44px;
  padding: 10px;
  border: 1px solid #8d6b38;
  border-radius: 7px;
  background: #0d0b08;
  color: #eee3d0;
}

button  {
  background: #e5bb71;
  color: #211607;
  font-weight: bold;
  cursor: pointer;
}

button:disabled {
  opacity: .5;
  cursor: default;
}

button.ghost {
  background: transparent;
  color: #dfcba6;
}

input:focus-visible, select:focus-visible, button:focus-visible  {
  outline: 2px solid #ffe4ad;
  outline-offset: 3px;
}

.hint {
  grid-column: 1 / -1;
  font-size: 13px;
  color: #bbaa8a;
}

.login-form {
  grid-template-columns: minmax(220px, 360px) auto;
  max-width: 560px;
}

#admin-status  {
  min-height: 29px;
}



@media (max-width: 760px)  {
  main  {
    padding: 18px 12px;
  }

  form  {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .hint  {
    grid-row: auto;
  }

  

}

[hidden] { display: none !important; }
#profile-preview { padding: 22px; border: 1px solid #715431; border-radius: 12px; }
h2 { margin-top: 0; font-size: 20px; color: #f2ce88; }
.profile-card { display: flex; gap: 20px; align-items: center; }
.profile-card img { width: 100px; height: 100px; object-fit: cover; border-radius: 8px; }
.profile-card strong { font-size: 24px; overflow-wrap: anywhere; }
#image-placeholder { display: grid; place-items: center; width: 100px; height: 100px; padding: 10px; border: 1px dashed #715431; color: #bbaa8a; }

.lottery-config {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid #715431;
  border-radius: 12px;
  background: #19140e;
  overflow-x: hidden;
}

.lottery-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) minmax(0, 220px);
  gap: 16px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #3d2f1c;
}

.lottery-thumb {
  width: 96px;
  height: 64px;
  flex-shrink: 0;
  background-image: url("/assets/lottery-prizes-hd.png");
  background-size: 300% auto;
  background-repeat: no-repeat;
  border-radius: 8px;
  border: 1px solid #715431;
}

.lottery-thumb.car { background-position: 0 12.766%; }
.lottery-thumb.phone { background-position: 50% 12.766%; }
.lottery-thumb.laptop { background-position: 100% 12.766%; }
.lottery-thumb.digital { background-position: 0 87.234%; }
.lottery-thumb.travel { background-position: 50% 87.234%; }
.lottery-thumb.cash { background-position: 100% 87.234%; }

.lottery-name {
  color: #eee3d0;
  font-weight: bold;
  overflow-wrap: anywhere;
}

.lottery-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.lottery-input {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.lottery-input input {
  flex: 1;
  width: 100%;
  min-width: 0;
}

.lottery-unit {
  color: #dfcba6;
}

.lottery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.lottery-actions button {
  min-width: 0;
}

#lottery-total,
#lottery-status {
  margin: 12px 0 0;
}

@media (max-width: 760px) {
  .lottery-row {
    grid-template-columns: 1fr;
  }

  .lottery-actions {
    flex-direction: column;
  }

  .lottery-actions button {
    width: 100%;
  }
}
