/* =========================================
   UI Modernization Styles (Toast, Modals, Buttons)
   ========================================= */

/* Edit Mode Indicator */
.stage.is-edit-mode .viewer {
  outline: 4px dashed var(--accent);
  outline-offset: 4px;
}

.stage.is-edit-mode [contenteditable="true"]:focus {
  outline: 2px dashed var(--accent);
  background-color: transparent;
}

.edit-block-wrapper {
  position: relative;
}

.edit-block-controls {
  position: absolute;
  top: -0.5rem;
  right: -2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 10;
}

.edit-block-wrapper:hover .edit-block-controls {
  opacity: 1;
}

.edit-block-btn {
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
  transition: background 0.2s, transform 0.2s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

button.edit-block-btn:hover {
  transform: scale(1.1);
  border-color: transparent !important;
}

.edit-block-del-btn {
  background: #ff4d4f;
}

.edit-box-color-btn {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  opacity: 0;
  z-index: 10;
  /* Override global button hover just in case */
  background: rgba(0, 0, 0, 0.05) !important;
}

html[data-theme="dark"] .edit-box-color-btn {
  background: rgba(255, 255, 255, 0.1) !important;
}

.slide-col-box:hover .edit-box-color-btn {
  opacity: 1;
}

.edit-box-color-btn:hover {
  background: rgba(0, 0, 0, 0.1) !important;
}

html[data-theme="dark"] .edit-box-color-btn:hover {
  background: rgba(255, 255, 255, 0.2) !important;
}

.color-picker-popup {
  position: absolute;
  top: 24px;
  right: -10px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 100;
  width: max-content;
  animation: popup-fade-in 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes popup-fade-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.color-picker-presets {
  display: flex;
  gap: 6px;
}

.color-picker-swatch {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: transform 0.15s;
  background-color: var(--swatch-color);
}

.color-picker-swatch:hover {
  transform: scale(1.2);
}

.color-picker-swatch.clear-swatch {
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.color-picker-swatch.clear-swatch::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -20%;
  width: 140%;
  height: 2px;
  background: #ff4d4f;
  transform: rotate(-45deg);
}


button.edit-block-del-btn:hover {
  background: #cf1322 !important;
}

.edit-block-add-btn {
  background: var(--accent);
  color: var(--bg);
}
button.edit-block-add-btn:hover {
  filter: brightness(0.85);
}

.edit-block-sub-btn {
  background: #faad14;
}
button.edit-block-sub-btn:hover {
  background: #d48806 !important;
}

.edit-block-ordered-btn {
  background: #597ef7;
  font-size: 0.7rem;
  font-weight: 700;
}
button.edit-block-ordered-btn:hover {
  background: #2f54eb !important;
}

/* Glassmorphism Edit Panel */
.edit-controls {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid rgba(0, 0, 0, 0.15);
  padding: 1rem 1.5rem 1.25rem 1.5rem;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  color: #1a1a1a;
  min-width: 280px;
}

html[data-theme="dark"] .edit-controls {
  background: rgba(30, 30, 30, 0.85);
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  color: #fff;
}

.edit-controls.is-dragging {
  opacity: 0.9;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  cursor: move;
}

body.is-dragging-global * {
  cursor: move !important;
}

.edit-toolbar-header {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}
.edit-badge {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.25rem;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: capitalize;
  color: inherit;
  opacity: 0.8;
}
html[data-theme="dark"] .edit-badge {
  /* No special dark theme override needed if using opacity */
}

.edit-divider {
  border: 0;
  height: 1px;
  background: rgba(0, 0, 0, 0.1);
  margin: 0.25rem 0;
}
html[data-theme="dark"] .edit-divider {
  background: rgba(255, 255, 255, 0.1);
}

.edit-toolbar-section {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.edit-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.edit-toolbar-actions {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.edit-toolbar-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.input-group {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-left: auto;
}
html[data-theme="dark"] .input-group {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}
.input-group input {
  width: 2.5rem;
  border: none;
  background: transparent;
  color: inherit;
  text-align: center;
  font-size: 0.85rem;
  padding: 0.4rem 0.2rem;
  outline: none;
}
.input-group .btn-icon-text {
  border: none;
  border-radius: 0;
  border-left: 1px solid rgba(0, 0, 0, 0.1);
  background: transparent;
}
html[data-theme="dark"] .input-group .btn-icon-text {
  border-left-color: rgba(255, 255, 255, 0.2);
}

.flex-1 {
  flex: 1;
  min-width: 0;
  padding: 0.4rem;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.5);
  color: inherit;
}
html[data-theme="dark"] .flex-1 {
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.2);
}

.drag-handle {
  width: 100%;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: move;
  color: rgba(0, 0, 0, 0.8);
  margin-top: -0.5rem;
  margin-bottom: -0.25rem;
  transition: color 0.2s;
}
html[data-theme="dark"] .drag-handle {
  color: rgba(255, 255, 255, 0.8);
}

.drag-handle:active,
.is-dragging .drag-handle {
  cursor: move;
  color: #000;
}
.drag-handle:hover {
  color: #000;
}
html[data-theme="dark"] .drag-handle:hover,
html[data-theme="dark"] .drag-handle:active,
html[data-theme="dark"] .is-dragging .drag-handle {
  color: #fff;
}
/* Icon Buttons */
.btn-icon-text, .btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: rgba(0, 0, 0, 0.05);
  color: var(--text);
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
html[data-theme="dark"] .btn-icon-text, 
html[data-theme="dark"] .btn-icon {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn-icon {
  padding: 0.4rem;
}
.btn-icon-text:hover, .btn-icon:hover {
  background: rgba(0, 0, 0, 0.1);
  border-color: rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}
html[data-theme="dark"] .btn-icon-text:hover, 
html[data-theme="dark"] .btn-icon:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}
.btn-danger {
  background: rgba(220, 38, 38, 0.1) !important;
  color: #dc2626 !important;
  border-color: rgba(220, 38, 38, 0.2) !important;
}
.btn-danger:hover {
  background: rgba(220, 38, 38, 0.2) !important;
}
html[data-theme="dark"] .btn-danger {
  background: rgba(220, 38, 38, 0.2) !important;
  color: #fca5a5 !important;
  border-color: rgba(220, 38, 38, 0.4) !important;
}
html[data-theme="dark"] .btn-danger:hover {
  background: rgba(220, 38, 38, 0.4) !important;
}

/* Toast Container */
.toast-container {
  position: fixed;
  top: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 10500;
  pointer-events: none;
}

.toast {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-left: 4px solid var(--accent);
  color: #1a1a1a;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease;
  pointer-events: auto;
}

html[data-theme="dark"] .toast {
  background: rgba(30, 30, 30, 0.85);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast-error {
  border-left-color: #ef4444;
}
.toast-error .toast-icon {
  color: #ef4444;
}

.toast-success {
  border-left-color: #10b981;
}
.toast-success .toast-icon {
  color: #10b981;
}

/* Custom Confirm Modal */
.custom-modal {
  border: none;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  color: #1a1a1a;
  padding: 1.5rem;
  max-width: 400px;
  width: 90%;
  text-align: center;
  margin: auto;
  top: 0; right: 0; bottom: 0; left: 0;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease;
}
html[data-theme="dark"] .custom-modal {
  background: rgba(30, 30, 30, 0.85);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  color: #fff;
}

.custom-modal[open] {
  transform: translateY(0);
  opacity: 1;
}

.custom-modal::backdrop {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.custom-modal .dialog-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.custom-modal button {
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.custom-modal .btn-cancel {
  background: rgba(0, 0, 0, 0.05);
  color: #666;
}
.custom-modal .btn-cancel:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #333;
}
html[data-theme="dark"] .custom-modal .btn-cancel {
  background: rgba(255, 255, 255, 0.1);
  color: #ccc;
}
html[data-theme="dark"] .custom-modal .btn-cancel:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.custom-modal .btn-danger {
  background: #ef4444 !important;
  color: #fff !important;
}
.custom-modal .btn-danger:hover {
  background: #dc2626 !important;
}

.custom-modal .btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.custom-modal .btn-primary:hover {
  filter: brightness(0.9);
}

/* =========================================
   Clear Local DB — Danger menu link
   ========================================= */
.menu-section-bottom {
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border, rgba(0,0,0,0.08));
}

.menu-link-danger {
  color: #ef4444 !important;
  opacity: 0.85;
}
.menu-link-danger:hover {
  opacity: 1;
  background: rgba(239, 68, 68, 0.08) !important;
}

/* =========================================
   Advanced Mode (details/summary) in Edit Panel
   ========================================= */
.edit-advanced-section {
  border-top: 1px solid var(--border, rgba(0,0,0,0.1));
  margin-top: 4px;
  padding-top: 4px;
}

.edit-advanced-summary {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 2px;
  user-select: none;
  list-style: none;
  outline: none;
}
.edit-advanced-summary::-webkit-details-marker { display: none; }

.edit-advanced-summary svg {
  flex-shrink: 0;
  transition: transform 0.2s;
}
.edit-advanced-section[open] .edit-advanced-summary svg {
  transform: rotate(90deg);
}

.edit-advanced-body {
  padding-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* =========================================
   JSON Editor Dialog
   ========================================= */
.json-editor-dialog {
  width: min(720px, 92vw);
  max-height: 90vh;
}

/* display は開いているときだけ指定する（閉じた dialog の display:none を潰さない） */
.json-editor-dialog[open] {
  display: flex;
  flex-direction: column;
}

.json-editor-hint {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
  line-height: 1.5;
}

#customConfirmMessage {
  margin-bottom: 1.5rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.json-editor-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow: hidden;
  border: 1px solid var(--border, #ddd);
  border-radius: 6px;
}

.json-editor-textarea {
  flex: 1;
  width: 100%;
  min-height: 320px;
  max-height: 55vh;
  resize: vertical;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  padding: 0.75rem 1rem;
  border: none;
  outline: none;
  background: var(--bg);
  color: var(--fg);
  tab-size: 2;
  white-space: pre;
  overflow-wrap: normal;
  overflow-x: auto;
}

.json-editor-textarea:focus {
  box-shadow: inset 0 0 0 2px var(--accent);
  border-radius: 5px;
}

.json-editor-error {
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 6px;
  color: #ef4444;
  font-size: 0.8rem;
  font-family: "SFMono-Regular", Consolas, monospace;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Disabled save button */
.json-editor-dialog .btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: none;
}

/* =========================================
   JSON Schema Reference (collapsible)
   ========================================= */
.json-schema-ref {
  margin-top: 0.5rem;
  border: 1px solid var(--border, rgba(0,0,0,0.12));
  border-radius: 6px;
  overflow: hidden;
}

.json-schema-summary {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0.4rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  list-style: none;
  outline: none;
  background: var(--bg);
}
.json-schema-summary::-webkit-details-marker { display: none; }
.json-schema-summary svg {
  flex-shrink: 0;
  transition: transform 0.2s;
}
.json-schema-ref[open] .json-schema-summary svg {
  transform: rotate(90deg);
}
.json-schema-summary:hover {
  color: var(--fg);
}

.json-schema-body {
  padding: 0.5rem 0.6rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  border-top: 1px solid var(--border, rgba(0,0,0,0.1));
  background: var(--bg);
  max-height: 240px;
  overflow-y: auto;
}

.json-schema-type {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.json-schema-type-header {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.json-schema-code {
  margin: 0;
  padding: 0.4rem 0.6rem;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.75rem;
  line-height: 1.7;
  background: var(--code-bg, rgba(0,0,0,0.04));
  border-radius: 4px;
  white-space: pre;
  overflow-x: auto;
}
html[data-theme="dark"] .json-schema-code {
  background: rgba(255,255,255,0.05);
}

/* Syntax colors */
.json-schema-code .kw  { color: #7c6af7; font-weight: 600; } /* キー名 */
.json-schema-code .kv  { color: #e06c75; font-weight: 700; } /* 固定値 (enum) */
.json-schema-code .sv  { color: #61afef; }                   /* 文字列値 (自由入力) */
.json-schema-code .nv  { color: #d19a66; }                   /* 数値 */
.json-schema-code .cm  { color: var(--muted); font-style: italic; }  /* コメント */

.json-schema-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 0.35rem 0.5rem;
  background: rgba(124, 106, 247, 0.08);
  border: 1px solid rgba(124, 106, 247, 0.2);
  border-radius: 4px;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.5;
}
.json-schema-note-icon {
  font-size: 0.85rem;
  color: #7c6af7;
  flex-shrink: 0;
  margin-top: 1px;
}
.json-schema-note b {
  color: var(--fg);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
}

/* =========================================
   New Deck Creation Dialog & Form
   ========================================= */
.new-deck-dialog {
  width: min(480px, 94vw);
}

.new-deck-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-bottom: 0.5rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-field label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--fg);
}

.form-hint {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--muted);
}

.form-field input[type="text"] {
  padding: 0.5rem 0.75rem;
  border: 1.5px solid var(--border, rgba(0,0,0,0.15));
  border-radius: 6px;
  font-size: 0.92rem;
  background: var(--bg);
  color: var(--fg);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-field input[type="text"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 106, 247, 0.15);
}

html[data-theme="dark"] .form-field input[type="text"] {
  border-color: rgba(255,255,255,0.2);
}

html[data-theme="dark"] .form-field input[type="text"]:focus {
  border-color: var(--accent);
}

.form-error {
  font-size: 0.8rem;
  color: #ef4444;
  margin: 0;
  padding: 0.3rem 0.5rem;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: 4px;
}

/* Deck List Items */
.deck-item {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 2px;
}

.deck-item .deck-option {
  flex: 1;
  padding-right: 32px;
}

.deck-delete-btn {
  position: absolute;
  right: 4px;
  background: transparent;
  border: none;
  color: #ff4d4f;
  padding: 4px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.deck-item:hover .deck-delete-btn {
  opacity: 0.7;
}

.deck-delete-btn:hover {
  opacity: 1 !important;
  transform: scale(1.1);
}

.local-deck-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0.5rem 0 0;
  border-top: 1px solid var(--border, rgba(0,0,0,0.1));
  margin-top: 0.25rem;
}

/* CSS Customization Section */
.new-deck-css-section {
  border: 1px solid var(--border, rgba(0,0,0,0.12));
  border-radius: 8px;
  overflow: hidden;
}

.new-deck-css-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.55rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  list-style: none;
  outline: none;
  background: var(--bg);
  transition: color 0.15s, background 0.15s;
}
.new-deck-css-summary::-webkit-details-marker { display: none; }

.new-deck-css-summary:hover {
  color: var(--fg);
  background: rgba(0,0,0,0.03);
}
html[data-theme="dark"] .new-deck-css-summary:hover {
  background: rgba(255,255,255,0.04);
}

.new-deck-css-summary svg {
  flex-shrink: 0;
  transition: transform 0.2s;
}
.new-deck-css-section[open] .new-deck-css-summary svg {
  transform: rotate(90deg);
}

.new-deck-css-body {
  padding: 0.6rem 0.75rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  border-top: 1px solid var(--border, rgba(0,0,0,0.1));
  background: var(--bg);
}

.new-deck-css-textarea {
  width: 100%;
  min-height: 160px;
  resize: vertical;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.8rem;
  line-height: 1.6;
  padding: 0.6rem 0.75rem;
  border: 1.5px solid var(--border, rgba(0,0,0,0.15));
  border-radius: 6px;
  outline: none;
  background: var(--bg);
  color: var(--fg);
  tab-size: 2;
  white-space: pre;
  overflow-wrap: normal;
  overflow-x: auto;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.new-deck-css-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 106, 247, 0.15);
}

html[data-theme="dark"] .new-deck-css-textarea {
  border-color: rgba(255,255,255,0.2);
}

html[data-theme="dark"] .new-deck-css-textarea:focus {
  border-color: var(--accent);
}
