.smg-app,
.smg-app * {
  box-sizing: border-box;
}

.smg-app {
  --smg-bg: #d4d0c8;
  --smg-panel: #ece9d8;
  --smg-border: #777;
  --smg-text: #111;
  --smg-muted: #333;
  --smg-input: #fff;
  --smg-accent: #0a64ad;
  --smg-danger: #b3261e;
  width: min(100%, 520px);
  margin: 14px auto;
  padding: 10px;
  border: 1px solid var(--smg-border);
  border-radius: 4px;
  background: var(--smg-bg);
  color: var(--smg-text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.25;
}

.smg-theme-dark_gray {
  --smg-bg: #555;
  --smg-panel: #666;
  --smg-border: #2e2e2e;
  --smg-text: #fff;
  --smg-muted: #f0f0f0;
  --smg-input: #f7f7f7;
  --smg-accent: #d6e8ff;
}

.smg-theme-black_gray {
  --smg-bg: #151515;
  --smg-panel: #2b2b2b;
  --smg-border: #666;
  --smg-text: #f4f4f4;
  --smg-muted: #d8d8d8;
  --smg-input: #f7f7f7;
  --smg-accent: #d1d1d1;
}

.smg-header {
  margin: 0 0 8px;
  padding: 6px 8px;
  border: 1px solid var(--smg-border);
  border-radius: 3px;
  background: var(--smg-panel);
}

.smg-header h2,
.smg-card h2 {
  margin: 0 0 4px;
  color: var(--smg-text);
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: 0;
}

.smg-header p,
.smg-card p {
  margin: 0 0 8px;
  color: var(--smg-muted);
}

.smg-card {
  padding: 10px;
  border: 1px solid var(--smg-border);
  border-radius: 4px;
  background: var(--smg-panel);
}

.smg-card label {
  display: block;
  margin: 7px 0 3px;
  color: var(--smg-text);
  font-size: 13px;
  font-weight: 700;
}

.smg-card input[type="text"],
.smg-card input[type="password"],
.smg-card input[type="url"],
.smg-card select,
.smg-card textarea {
  width: 100%;
  min-height: 32px;
  padding: 6px 7px;
  border: 1px solid #666;
  border-radius: 3px;
  background: var(--smg-input);
  color: #111;
  font: inherit;
}

.smg-card textarea {
  min-height: 96px;
  resize: vertical;
}

.smg-card input:focus,
.smg-card select:focus,
.smg-card textarea:focus {
  border-color: var(--smg-accent);
  outline: 2px solid rgba(10, 100, 173, 0.22);
}

.smg-two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.smg-check {
  display: grid !important;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 6px;
  align-items: start;
  margin: 8px 0 0 !important;
  color: var(--smg-text) !important;
  font-weight: 600 !important;
}

.smg-check input {
  width: 15px;
  height: 15px;
  margin: 1px 0 0;
}

.smg-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid #555;
  border-radius: 3px;
  background: #e5e5e5;
  color: #111;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.1;
}

.smg-button:hover,
.smg-button:focus {
  background: #fff;
  color: #111;
}

.smg-button-danger {
  border-color: var(--smg-danger);
  background: var(--smg-danger);
  color: #fff;
}

.smg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.smg-alert {
  padding: 7px 8px;
  margin-bottom: 8px;
  border: 1px solid var(--smg-border);
  border-radius: 3px;
  background: #fff8cf;
  color: #111;
}

.smg-alert-error {
  border-color: var(--smg-danger);
  background: #ffe5e5;
  color: #111;
}

.smg-muted {
  color: var(--smg-muted);
}

.smg-message {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 9px;
  margin: 6px 0 8px;
  border: 1px solid var(--smg-border);
  border-radius: 3px;
  background: var(--smg-input);
  color: #111;
  font-size: 14px;
  line-height: 1.35;
}

.smg-countdown {
  min-height: 22px;
  margin-top: 7px;
  color: var(--smg-text);
  font-size: 14px;
  font-weight: 800;
}

.smg-share {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  text-decoration: none;
  font: 800 18px/1 Arial, Helvetica, sans-serif;
}

.smg-share:hover,
.smg-share:focus {
  color: #fff;
  filter: brightness(1.1);
}

.smg-share-facebook {
  background: #1877f2;
}

.smg-share-x {
  background: #000;
}

.smg-share-reddit {
  background: #ff4500;
}

.smg-share-email {
  background: #666;
}

@media (max-width: 560px) {
  .smg-two {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .smg-app {
    width: 100%;
  }
}
