/* ============ NOTICE BAR ============ */
.notice-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(253, 203, 110, 0.08);
  border: 1px solid rgba(253, 203, 110, 0.15);
  color: var(--warning);
  font-size: 13px;
  margin-bottom: 20px;
}

.notice-bar.inline {
  margin-bottom: 12px;
}

.notice-bar .notice-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}


/* ============ CARD ============ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  transition: border-color var(--transition);
}

.card:hover {
  border-color: var(--border-hover);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.title-icon {
  width: 18px;
  height: 18px;
  color: var(--accent-light);
}


/* ============ PROMPT ============ */
.prompt-card-inner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.prompt-card-inner:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.prompt-input {
  width: 100%;
  min-height: 100px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  font-family: inherit;
  outline: none;
}
.prompt-input::placeholder {
  color: var(--text-muted);
}
.char-counter {
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  margin-top: 8px;
  text-align: right;
}


/* ============ UPLOAD ============ */
.upload-area {
  margin-top: 12px;
}

.upload-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
}

.upload-box:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.upload-box.dragover {
  border-color: var(--accent);
  background: rgba(108, 92, 231, 0.08);
  transform: scale(1.01);
}

.upload-icon {
  width: 32px;
  height: 32px;
  color: var(--text-muted);
}

.upload-text {
  font-size: 13px;
  color: var(--text-secondary);
}

.upload-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.upload-counter {
  font-size: 12px;
  color: var(--accent-light);
  font-weight: 600;
}

.thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.thumb-item {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  animation: img-fade-in 0.3s ease-out;
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  transition: background var(--transition);
}

.thumb-remove:hover {
  background: var(--danger);
}

.thumb-item.dragging {
  opacity: 0.4;
  border: 1px dashed var(--accent-light);
}

.thumb-item.drag-over {
  border: 2px solid var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}


/* ============ KEY SECTION ============ */
.key-status {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 600;
}

.key-status.unconfigured {
  background: rgba(225, 112, 85, 0.1);
  color: var(--danger);
}

.key-status.configured {
  background: rgba(0, 184, 148, 0.1);
  color: var(--success);
}

.key-input-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.key-input-wrapper {
  position: relative;
  flex: 1;
}

.key-input {
  width: 100%;
  padding: 12px 44px 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 14px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  transition: all var(--transition);
}

.key-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.btn-icon {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: all var(--transition);
}

.btn-icon:hover {
  color: var(--text-secondary);
  background: rgba(0,0,0,0.05);
}

.key-actions {
  display: flex;
  gap: 8px;
}

.usage-result {
  margin-top: 8px;
  font-size: 13px;
}

.usage-result .balance-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(0, 184, 148, 0.06);
  border: 1px solid rgba(0, 184, 148, 0.12);
  animation: img-fade-in 0.3s ease-out;
}

.usage-result .balance-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.usage-result .balance-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.usage-result .balance-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--success);
}

.usage-result .balance-value.warning {
  color: var(--warning);
}

.usage-result .balance-value.danger {
  color: var(--danger);
}


/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  font-family: inherit;
}

.btn:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
  color: #ffffff;
  box-shadow: 0 0 16px var(--accent-glow);
}

.btn-secondary {
  background: rgba(108, 92, 231, 0.1);
  color: var(--accent-light);
  border-color: rgba(108, 92, 231, 0.2);
}

.btn-secondary:hover {
  background: rgba(108, 92, 231, 0.2);
  border-color: rgba(108, 92, 231, 0.3);
  color: var(--accent-light);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
}

.btn-danger-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
  background: rgba(225, 112, 85, 0.08);
  color: var(--danger);
  border: 1px solid rgba(225, 112, 85, 0.15);
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  transition: all var(--transition);
}

.btn-danger-sm:hover {
  background: rgba(225, 112, 85, 0.15);
}

.pill-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
  user-select: none;
}
.pill:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.pill-primary {
  background: #eef2ff;
  color: #4f46e5;
  border-color: rgba(99, 102, 241, 0.15);
}
.pill-primary:hover {
  background: #e0e7ff;
}
.pill-success {
  background: #f0fdf4;
  color: #15803d;
  border-color: rgba(16, 185, 129, 0.15);
}
.pill-success:hover {
  background: #dcfce7;
}
.pill-warning {
  background: #fff7ed;
  color: #c2410c;
  border-color: rgba(245, 158, 11, 0.15);
}
.pill-warning:hover {
  background: #ffedd5;
}
.pill-ghost {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px dashed var(--border);
}
.pill-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pill-dropdown {
  position: relative;
}
.picker-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 170px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  padding: 6px;
  animation: chip-pop 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.picker-item {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.picker-item:hover {
  background: var(--bg-input);
}
.picker-item.active {
  background: var(--accent-glow);
  color: var(--accent);
  font-weight: 600;
}
.picker-item.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.picker-check {
  width: 14px;
  height: 14px;
  opacity: 0;
}
.picker-item.active .picker-check {
  opacity: 1;
}

.prompt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.prompt-chip {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  animation: chip-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.prompt-chip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.prompt-chip-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  line-height: 1;
  transition: background var(--transition);
}
.prompt-chip-remove:hover {
  background: var(--danger);
}

/* ============ CONTROL PANEL ============ */
.control-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.control-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.count-selector {
  display: flex;
  gap: 6px;
}

.count-btn {
  width: 40px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.count-btn:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

.count-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.ratio-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ratio-btn {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.ratio-btn:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

.ratio-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 0 10px var(--accent-glow);
}

.ratio-btn.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  border-color: var(--border);
  color: var(--text-muted);
}

.ratio-btn.disabled:hover {
  border-color: var(--border);
  color: var(--text-muted);
}

.model-select {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23606080' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.model-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.size-buttons {
  display: flex;
  gap: 6px;
}

.size-btn {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.size-btn:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

.size-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.pill-quality {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.pill-quality-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-right: 2px;
}
.qbtn {
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}
.qbtn:hover {
  background: var(--bg-input);
  color: var(--text-primary);
}
.qbtn.active {
  background: var(--accent-glow);
  color: var(--accent);
  border-color: var(--accent);
}


/* ============ GENERATE BAR ============ */
.generate-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.status-area {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.status-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: rot 0.8s linear infinite;
  flex-shrink: 0;
}

.status-spinner.visible {
  display: block;
}

.status-text {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.progress-bar {
  width: 120px;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-left: 8px;
  flex-shrink: 0;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #8B5CF6);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.btn-generate {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 28px;
  border-radius: var(--radius-md);
  border: none;
  background: linear-gradient(135deg, var(--accent), #8B5CF6);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  font-family: inherit;
  letter-spacing: 0.3px;
  position: relative;
  overflow: hidden;
}
.btn-generate:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow), 0 0 40px var(--accent-glow);
}
.btn-generate:active {
  transform: translateY(0) scale(0.97);
}
.btn-generate:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.generate-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-cancel {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--danger);
  background: transparent;
  color: var(--danger);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  font-family: inherit;
}

.btn-cancel:hover {
  background: rgba(225, 112, 85, 0.1);
  box-shadow: 0 0 20px rgba(225, 112, 85, 0.15);
}

.btn-cancel:active {
  transform: translateY(0);
}


/* ============ LIGHTBOX ============ */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.lightbox.open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
}

.lb-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lb-close {
  position: absolute;
  top: -44px;
  right: -8px;
  background: rgba(0,0,0,0.1);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #ffffff;
  transition: all var(--transition);
  z-index: 2;
}

.lb-close:hover {
  background: rgba(0,0,0,0.2);
  transform: scale(1.1);
}

.lb-image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.lb-image-wrap img {
  max-width: 90vw;
  max-height: 75vh;
  border-radius: var(--radius-md);
  object-fit: contain;
  user-select: none;
}

.lb-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
}

.lb-caption {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
}

.lb-actions {
  display: flex;
  gap: 6px;
}

.lb-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.1);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.lb-btn:hover {
  background: rgba(0,0,0,0.2);
  transform: scale(1.1);
}


/* ============ TOAST ============ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: #ffffff;
  animation: toast-in 0.3s ease-out, toast-out 0.3s ease-in 2.7s;
  animation-fill-mode: forwards;
  box-shadow: var(--shadow-lg);
}

.toast.success {
  background: var(--success);
}

.toast.error {
  background: var(--danger);
}

.toast.info {
  background: var(--info);
  color: var(--text-inverse);
}


/* ============ ANIMATIONS ============ */
@keyframes rot {
  to { transform: rotate(360deg); }
}

@keyframes img-fade-in {
  from { opacity: 0; transform: scale(0.95); filter: blur(4px); }
  to   { opacity: 1; transform: scale(1);    filter: blur(0);   }
}

@keyframes card-pop {
  0%   { opacity: 0; transform: translateY(12px) scale(0.97); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes breathe {
  0%, 100% { box-shadow: 0 0 8px var(--accent-glow); }
  50%      { box-shadow: 0 0 24px var(--accent-glow); }
}

@keyframes skeleton-loading {
  0%   { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}

.skeleton-box {
  background: linear-gradient(90deg, var(--bg-input) 25%, rgba(0,0,0,0.05) 50%, var(--bg-input) 75%);
  background-size: 400px 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(-10px) scale(0.95); }
}


/* ============ ANNOUNCEMENT MODAL ============ */
.announcement-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fade-in 0.2s ease-out;
  padding: 16px;
}

.announcement-modal.hidden {
  display: none;
}

.announcement-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 92%;
  max-width: 860px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  animation: card-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.announcement-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 28px 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  flex-shrink: 0;
}

.announcement-header svg {
  flex-shrink: 0;
  color: var(--accent);
}

.announcement-body {
  padding: 20px 28px;
  overflow-y: auto;
  line-height: 1.7;
  color: var(--text-primary);
  font-size: 15px;
  min-height: 0;
}

.announcement-body h1,
.announcement-body h2,
.announcement-body h3 {
  margin: 16px 0 8px;
  font-weight: 600;
  color: var(--text-primary);
}

.announcement-body p {
  margin: 10px 0;
}

.announcement-body a {
  color: var(--accent);
  text-decoration: underline;
}

.announcement-body ul,
.announcement-body ol {
  margin: 10px 0;
  padding-left: 20px;
}

.announcement-body blockquote {
  margin: 10px 0;
  padding: 10px 14px;
  border-left: 3px solid var(--accent);
  background: var(--bg-secondary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.announcement-body code {
  background: var(--bg-secondary);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
}

.announcement-body pre {
  background: var(--bg-secondary);
  padding: 12px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-size: 13px;
}

.announcement-body pre code {
  background: transparent;
  padding: 0;
}

/* Inline tables inside announcement body */
.announcement-body table {
  width: 100% !important;
  max-width: 100% !important;
  border-collapse: collapse;
  font-size: 14px;
}

.announcement-body td,
.announcement-body th {
  padding: 10px 12px;
  vertical-align: top;
}

.announcement-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

/* Force any inline max-width containers to fill modal */
.announcement-body > div,
.announcement-body > table,
.announcement-body > center {
  max-width: 100% !important;
}

.announcement-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 28px 24px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.announcement-actions .btn {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
}

.announcement-actions .btn-secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text-secondary);
}

.announcement-actions .btn-secondary:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.announcement-actions .btn-primary {
  background: var(--accent);
  color: #fff;
}

.announcement-actions .btn-primary:hover {
  filter: brightness(1.05);
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Mobile announcement modal */
@media (max-width: 640px) {
  .announcement-modal {
    padding: 8px;
    align-items: flex-end;
  }
  .announcement-box {
    width: 100%;
    max-height: 88vh;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
  }
  .announcement-header {
    padding: 16px 16px 0;
    font-size: 17px;
  }
  .announcement-body {
    padding: 12px 16px;
    font-size: 14px;
  }
  .announcement-actions {
    padding: 12px 16px 16px;
    gap: 8px;
  }
  .announcement-actions .btn {
    flex: 1;
    justify-content: center;
    padding: 10px 12px;
    font-size: 14px;
  }
}

/* ============ FOCUS ============ */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button:focus:not(:focus-visible) {
  outline: none;
}
