:root {
  --std-kv-navy: #071a33;
  --std-kv-blue: #0284c7;
  --std-kv-cyan: #22d3ee;
  --std-kv-teal: #14b8a6;
  --std-kv-text: #0f172a;
  --std-kv-muted: #64748b;
  --std-kv-border: #dbeaf4;
  --std-kv-soft: #eef8ff;
  --std-kv-bg: #f6fbff;
  --std-kv-white: #fff;
  --std-kv-error: #dc2626;
  --std-kv-success: #059669;
  --std-kv-warning: #d97706;
  --std-kv-radius: 22px;
  --std-kv-shadow: 0 24px 70px rgba(8, 47, 73, .11);
}

.std-kv-app,
.std-kv-gate {
  width: min(1240px, calc(100% - 32px));
  margin: clamp(24px, 4vw, 56px) auto;
  color: var(--std-kv-text);
  font-family: inherit;
}

.std-kv-gate {
  min-height: 62vh;
  display: grid;
  place-items: center;
}

.std-kv-gate-card {
  width: min(720px, 100%);
  padding: clamp(28px, 5vw, 54px);
  text-align: center;
  background:
    radial-gradient(circle at 85% 5%, rgba(34, 211, 238, .28), transparent 35%),
    linear-gradient(145deg, #fff, #f0faff);
  border: 1px solid rgba(219, 234, 244, .95);
  border-radius: 34px;
  box-shadow: var(--std-kv-shadow);
}

.std-kv-gate-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin: 18px auto;
  border-radius: 24px;
  color: #fff;
  font-size: 36px;
  background: linear-gradient(135deg, var(--std-kv-cyan), var(--std-kv-teal), #2563eb);
  box-shadow: 0 18px 36px rgba(20, 184, 166, .25);
}

.std-kv-gate h1,
.std-kv-hero h1,
.std-kv-panel h2 {
  color: var(--std-kv-navy);
  letter-spacing: -.035em;
}

.std-kv-gate h1 {
  margin: 0 0 12px;
  font-size: clamp(38px, 7vw, 62px);
  line-height: 1;
}

.std-kv-gate-card > p {
  max-width: 580px;
  margin: 0 auto 26px;
  color: var(--std-kv-muted);
  font-size: 17px;
  line-height: 1.7;
}

.std-kv-kicker {
  display: inline-flex;
  color: var(--std-kv-teal);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.std-kv-gate-form {
  max-width: 560px;
  margin: 24px auto 0;
  text-align: left;
}

.std-kv-gate-form label,
.std-kv-field label {
  display: block;
  margin-bottom: 7px;
  color: #18324f;
  font-size: 14px;
  font-weight: 760;
}

.std-kv-field label span {
  color: var(--std-kv-error);
}

.std-kv-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.std-kv-code-row input,
.std-kv-code-row button,
.std-kv-primary,
.std-kv-secondary,
.std-kv-add-course,
.std-kv-logout {
  min-height: 48px;
  border-radius: 14px;
}

.std-kv-code-row button,
.std-kv-primary,
.std-kv-add-course {
  border: 0;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, var(--std-kv-cyan), var(--std-kv-teal), #2563eb);
  box-shadow: 0 12px 28px rgba(20, 184, 166, .23);
}

.std-kv-code-row button {
  padding: 0 20px;
}

.std-kv-account-link {
  margin-top: 18px !important;
  font-size: 14px !important;
}

.std-kv-account-link a {
  color: var(--std-kv-blue);
  font-weight: 750;
}

.std-kv-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 24px;
  padding: clamp(24px, 4vw, 42px);
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(circle at 88% 5%, rgba(34, 211, 238, .32), transparent 32%),
    linear-gradient(145deg, #fff, #eef9ff);
  border: 1px solid var(--std-kv-border);
  border-radius: 30px;
  box-shadow: var(--std-kv-shadow);
}

.std-kv-hero h1 {
  margin: 8px 0 10px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.03;
}

.std-kv-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--std-kv-muted);
  font-size: 17px;
  line-height: 1.65;
}

.std-kv-logout {
  padding: 0 16px;
  border: 1px solid var(--std-kv-border);
  color: #31506f;
  font-weight: 750;
  background: rgba(255, 255, 255, .78);
  cursor: pointer;
}

.std-kv-form {
  display: grid;
  gap: 22px;
}

.std-kv-panel {
  padding: clamp(22px, 4vw, 36px);
  background: #fff;
  border: 1px solid var(--std-kv-border);
  border-radius: 28px;
  box-shadow: 0 14px 44px rgba(8, 47, 73, .07);
}

.std-kv-panel-head,
.std-kv-panel-title {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.std-kv-panel-head {
  margin-bottom: 26px;
}

.std-kv-panel-head.is-between {
  justify-content: space-between;
}

.std-kv-panel-head h2 {
  margin: 4px 0 5px;
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.1;
}

.std-kv-panel-head p {
  margin: 0;
  color: var(--std-kv-muted);
}

.std-kv-step {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  font-weight: 850;
  background: linear-gradient(135deg, var(--std-kv-cyan), var(--std-kv-teal));
}

.std-kv-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 17px;
}

.std-kv-grid.is-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.std-kv-grid.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.std-kv-grid.is-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.std-kv-field.is-span-2 { grid-column: span 2; }

.std-kv-field input,
.std-kv-field select,
.std-kv-field textarea,
.std-kv-date-box textarea,
.std-kv-gate-form input {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  color: var(--std-kv-text);
  background: #fff;
  border: 1px solid #cdddea;
  border-radius: 13px;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, .025);
  font: inherit;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.std-kv-field textarea,
.std-kv-date-box textarea {
  min-height: 84px;
  resize: vertical;
  line-height: 1.55;
}

.std-kv-field input:focus,
.std-kv-field select:focus,
.std-kv-field textarea:focus,
.std-kv-date-box textarea:focus,
.std-kv-gate-form input:focus {
  border-color: var(--std-kv-blue);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, .12);
}

.std-kv-field input[readonly] {
  background: #f4f8fb;
  color: #47617b;
}

.std-kv-field .is-invalid,
.std-kv-date-box .is-invalid {
  border-color: var(--std-kv-error) !important;
  background: #fff7f7;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .09) !important;
}

.std-kv-suffix-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
}

.std-kv-suffix-input input {
  border-radius: 13px 0 0 13px;
}

.std-kv-suffix-input span {
  min-height: 48px;
  display: grid;
  place-items: center;
  color: #42617e;
  font-weight: 800;
  background: #edf7fc;
  border: 1px solid #cdddea;
  border-left: 0;
  border-radius: 0 13px 13px 0;
}

.std-kv-date-box {
  margin: 8px 0 20px;
  padding: 18px;
  background: linear-gradient(145deg, #f7fcff, #edf8ff);
  border: 1px solid var(--std-kv-border);
  border-radius: 18px;
}

.std-kv-date-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.std-kv-date-box-head strong,
.std-kv-date-box-head span {
  display: block;
}

.std-kv-date-box-head span,
.std-kv-date-count {
  color: var(--std-kv-muted);
  font-size: 13px;
}

.std-kv-date-count {
  margin-top: 7px;
  font-weight: 700;
}

.std-kv-primary,
.std-kv-secondary,
.std-kv-add-course {
  padding: 0 18px;
}

.std-kv-secondary,
.std-kv-logout {
  border: 1px solid #cbddea;
  color: #17456b;
  font-weight: 800;
  background: #fff;
  cursor: pointer;
}

.std-kv-primary:disabled {
  cursor: not-allowed;
  filter: grayscale(.55);
  opacity: .55;
  box-shadow: none;
}

.std-kv-courses {
  display: grid;
  gap: 18px;
}

.std-kv-course {
  overflow: hidden;
  background: #fbfdff;
  border: 1px solid #cfe3ef;
  border-radius: 22px;
}

.std-kv-course-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #edf9ff, #f6fffe);
  border-bottom: 1px solid #d8eaf3;
}

.std-kv-course-head span,
.std-kv-course-head strong {
  display: block;
}

.std-kv-course-head span {
  color: var(--std-kv-teal);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.std-kv-course-head strong {
  margin-top: 2px;
  color: var(--std-kv-navy);
  font-size: 16px;
}

.std-kv-course-actions {
  display: flex;
  gap: 8px;
}

.std-kv-course-actions button {
  padding: 8px 11px;
  color: #31506f;
  font-size: 12px;
  font-weight: 800;
  background: rgba(255, 255, 255, .85);
  border: 1px solid #cbddea;
  border-radius: 10px;
  cursor: pointer;
}

.std-kv-course-actions button.is-danger {
  color: #b42318;
}

.std-kv-course > .std-kv-grid,
.std-kv-course > .std-kv-field {
  margin-left: 18px;
  margin-right: 18px;
}

.std-kv-course > .std-kv-grid:first-of-type {
  margin-top: 20px;
}

.std-kv-details {
  margin-top: 20px;
  border-top: 1px solid #dbeaf4;
}

.std-kv-details summary {
  padding: 15px 18px;
  color: #17456b;
  font-weight: 800;
  cursor: pointer;
  background: #f3f9fd;
}

.std-kv-details-body {
  padding: 20px 18px 6px;
}

.std-kv-preview-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.std-kv-preview-item {
  padding: 18px;
  background: #f8fcff;
  border: 1px solid var(--std-kv-border);
  border-radius: 17px;
}

.std-kv-preview-item h3 {
  margin: 0 0 12px;
  color: var(--std-kv-navy);
  font-size: 18px;
}

.std-kv-preview-item p {
  margin: 12px 0 0;
  color: var(--std-kv-muted);
  font-size: 13px;
}

.std-kv-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.std-kv-preview-meta span {
  padding: 6px 9px;
  color: #24516f;
  font-size: 12px;
  font-weight: 750;
  background: #e7f5fb;
  border-radius: 999px;
}

.std-kv-submit-bar {
  position: sticky;
  bottom: 14px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  color: #fff;
  background: rgba(7, 26, 51, .95);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(7, 26, 51, .28);
  backdrop-filter: blur(18px);
}

.std-kv-submit-bar strong,
.std-kv-submit-bar span {
  display: block;
}

.std-kv-submit-bar span {
  margin-top: 3px;
  color: #bcd0df;
  font-size: 13px;
}

.std-kv-submit-actions {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
}

.std-kv-alert {
  margin: 0 0 22px;
  padding: 16px 18px;
  text-align: left;
  border-radius: 16px;
  border: 1px solid;
}

.std-kv-alert strong,
.std-kv-alert span {
  display: block;
}

.std-kv-alert span {
  margin-top: 4px;
}

.std-kv-alert.is-success {
  color: #065f46;
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.std-kv-alert.is-error {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fecaca;
}

.std-kv-alert.is-warning {
  color: #92400e;
  background: #fffbeb;
  border-color: #fde68a;
}

.std-kv-alert ul {
  margin: 10px 0 0 20px;
}

.std-kv-created-list {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.std-kv-created-list > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 11px;
  background: rgba(255, 255, 255, .58);
  border-radius: 10px;
}

.std-kv-created-list a {
  font-weight: 800;
}

@media (max-width: 1000px) {
  .std-kv-grid.is-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .std-kv-grid.is-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .std-kv-field.is-span-2 { grid-column: span 1; }
  .std-kv-preview-list { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .std-kv-app,
  .std-kv-gate { width: min(100% - 20px, 1240px); }
  .std-kv-hero,
  .std-kv-panel-head.is-between,
  .std-kv-submit-bar,
  .std-kv-date-box-head { flex-direction: column; align-items: stretch; }
  .std-kv-grid.is-2,
  .std-kv-grid.is-3,
  .std-kv-grid.is-4 { grid-template-columns: 1fr; }
  .std-kv-code-row { grid-template-columns: 1fr; }
  .std-kv-code-row button { min-height: 52px; }
  .std-kv-course-head { align-items: flex-start; flex-direction: column; }
  .std-kv-course-actions { width: 100%; }
  .std-kv-course-actions button { flex: 1; }
  .std-kv-submit-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  .std-kv-submit-actions button { width: 100%; }
  .std-kv-submit-bar { position: static; }
  .std-kv-logout { width: 100%; }
  .std-kv-created-list > div { flex-direction: column; }
}

/* =========================================================
   Kursvorlagen, Hinweise und Dialoge · v1.1
   ========================================================= */

.std-kv-app [hidden] {
  display: none !important;
}

.std-kv-panel-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.std-kv-manage-templates {
  min-height: 48px;
}

.std-kv-inline-action {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  margin-top: 8px;
  padding: 0;
  color: #0f6b88;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.std-kv-inline-action::before {
  content: "+";
  width: 20px;
  height: 20px;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--std-kv-cyan), var(--std-kv-teal));
  border-radius: 7px;
}

.std-kv-inline-action:hover,
.std-kv-inline-action:focus-visible {
  color: var(--std-kv-navy);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.std-kv-notice-stack {
  position: fixed;
  z-index: 100020;
  top: max(20px, env(safe-area-inset-top));
  right: max(20px, env(safe-area-inset-right));
  width: min(390px, calc(100vw - 32px));
  display: grid;
  gap: 10px;
  pointer-events: none;
}

.admin-bar .std-kv-notice-stack {
  top: 52px;
}

.std-kv-toast {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 10px;
  padding: 13px 12px;
  color: #17324d;
  background: rgba(255, 255, 255, .98);
  border: 1px solid #cfe3ef;
  border-left: 4px solid var(--std-kv-blue);
  border-radius: 16px;
  box-shadow: 0 20px 55px rgba(7, 26, 51, .18);
  pointer-events: auto;
  animation: std-kv-toast-in .22s ease both;
}

.std-kv-toast.is-success { border-left-color: var(--std-kv-success); }
.std-kv-toast.is-warning { border-left-color: var(--std-kv-warning); }
.std-kv-toast.is-error { border-left-color: var(--std-kv-error); }

.std-kv-toast.is-leaving {
  animation: std-kv-toast-out .18s ease both;
}

.std-kv-toast-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  background: var(--std-kv-blue);
  border-radius: 10px;
}

.std-kv-toast.is-success .std-kv-toast-icon { background: var(--std-kv-success); }
.std-kv-toast.is-warning .std-kv-toast-icon { background: var(--std-kv-warning); }
.std-kv-toast.is-error .std-kv-toast-icon { background: var(--std-kv-error); }

.std-kv-toast-text {
  font-size: 14px;
  font-weight: 740;
  line-height: 1.42;
}

.std-kv-toast-close {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #60758b;
  font-size: 22px;
  line-height: 1;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.std-kv-toast-close:hover,
.std-kv-toast-close:focus-visible {
  color: var(--std-kv-navy);
  background: #edf6fb;
}

@keyframes std-kv-toast-in {
  from { opacity: 0; transform: translate3d(18px, -8px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes std-kv-toast-out {
  to { opacity: 0; transform: translate3d(20px, 0, 0); }
}

body.std-kv-modal-open {
  overflow: hidden;
}

.std-kv-modal-layer {
  position: fixed;
  z-index: 100010;
  inset: 0;
  display: grid;
  place-items: center;
  padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  overflow-y: auto;
  background: rgba(3, 18, 36, .68);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity .16s ease;
}

.std-kv-modal-layer.is-open {
  opacity: 1;
}

.std-kv-modal {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  padding: clamp(24px, 4vw, 34px);
  background:
    radial-gradient(circle at 90% 0, rgba(34, 211, 238, .18), transparent 32%),
    #fff;
  border: 1px solid rgba(219, 234, 244, .96);
  border-radius: 26px;
  box-shadow: 0 34px 90px rgba(3, 18, 36, .34);
  transform: translateY(12px) scale(.985);
  transition: transform .16s ease;
}

.std-kv-modal-layer.is-open .std-kv-modal {
  transform: translateY(0) scale(1);
}

.std-kv-modal-wide {
  width: min(720px, 100%);
}

.std-kv-modal h2 {
  margin: 6px 40px 10px 0;
  color: var(--std-kv-navy);
  font-size: clamp(25px, 4vw, 34px);
  line-height: 1.12;
  letter-spacing: -.03em;
}

.std-kv-modal > p {
  margin: 0 0 22px;
  color: var(--std-kv-muted);
  line-height: 1.6;
}

.std-kv-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #50677e;
  font-size: 28px;
  line-height: 1;
  background: rgba(238, 248, 255, .92);
  border: 1px solid #d6e7f1;
  border-radius: 12px;
  cursor: pointer;
}

.std-kv-modal-close:hover,
.std-kv-modal-close:focus-visible {
  color: var(--std-kv-navy);
  background: #fff;
}

.std-kv-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.std-kv-modal-actions button {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 14px;
}

.std-kv-danger-button {
  color: #fff;
  font: inherit;
  font-weight: 850;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  border: 0;
  box-shadow: 0 12px 26px rgba(185, 28, 28, .22);
  cursor: pointer;
}

.std-kv-danger-button.is-neutral {
  background: linear-gradient(135deg, var(--std-kv-cyan), var(--std-kv-teal), #2563eb);
  box-shadow: 0 12px 28px rgba(20, 184, 166, .23);
}

.std-kv-template-category-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding: 13px 15px;
  background: #eff9fe;
  border: 1px solid #d3eaf5;
  border-radius: 14px;
}

.std-kv-template-category-box span {
  color: var(--std-kv-muted);
  font-size: 13px;
  font-weight: 700;
}

.std-kv-template-category-box strong {
  color: var(--std-kv-navy);
}

.std-kv-template-list {
  display: grid;
  gap: 10px;
}

.std-kv-template-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 15px;
  background: #f7fbfe;
  border: 1px solid #d6e8f2;
  border-radius: 15px;
}

.std-kv-template-list-item strong,
.std-kv-template-list-item span {
  display: block;
}

.std-kv-template-list-item strong {
  color: var(--std-kv-navy);
}

.std-kv-template-list-item span {
  margin-top: 3px;
  color: var(--std-kv-muted);
  font-size: 12px;
}

.std-kv-template-delete {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 13px;
  color: #b42318;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  background: #fff;
  border: 1px solid #fecaca;
  border-radius: 11px;
  cursor: pointer;
}

.std-kv-template-empty {
  padding: 22px;
  text-align: center;
  background: #f7fbfe;
  border: 1px dashed #bdd9e7;
  border-radius: 16px;
}

.std-kv-template-empty strong,
.std-kv-template-empty span {
  display: block;
}

.std-kv-template-empty strong {
  color: var(--std-kv-navy);
}

.std-kv-template-empty span {
  max-width: 500px;
  margin: 6px auto 0;
  color: var(--std-kv-muted);
  font-size: 13px;
  line-height: 1.55;
}

@media (max-width: 1000px) and (min-width: 721px) {
  .std-kv-course-setup .std-kv-field.is-span-2 {
    grid-column: span 2;
  }
}

@media (max-width: 720px) {
  .std-kv-panel-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .std-kv-panel-actions button {
    width: 100%;
  }

  .std-kv-notice-stack,
  .admin-bar .std-kv-notice-stack {
    top: auto;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 10px;
    width: auto;
  }

  .std-kv-toast {
    grid-template-columns: 30px minmax(0, 1fr) 28px;
    padding: 12px 10px;
  }

  .std-kv-modal-layer {
    place-items: end center;
    padding: 12px 10px max(10px, env(safe-area-inset-bottom));
  }

  .std-kv-modal {
    width: 100%;
    max-height: calc(100vh - 22px);
    max-height: calc(100dvh - 22px);
    padding: 24px 18px 18px;
    border-radius: 24px 24px 18px 18px;
    transform: translateY(30px);
  }

  .std-kv-modal-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .std-kv-modal-actions button {
    width: 100%;
  }

  .std-kv-template-list-item {
    align-items: stretch;
    flex-direction: column;
  }

  .std-kv-template-delete {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .std-kv-toast,
  .std-kv-toast.is-leaving,
  .std-kv-modal-layer,
  .std-kv-modal {
    animation: none !important;
    transition: none !important;
  }
}

.std-kv-modal-layer[data-std-confirm-dialog] {
  z-index: 100030;
}
