:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  margin-bottom: 20px;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.site-header h1 {
  margin: 0;
  font-size: 1.35rem;
}

.subtitle {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.badge {
  display: inline-block;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

kbd {
  display: inline-block;
  padding: 2px 7px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82em;
  font-weight: 700;
  color: #1e293b;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-bottom-width: 2px;
  border-radius: 6px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.drop-zone {
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 56px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: #f8fafc;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--primary);
  background: #eff6ff;
}

.shortcut-hero {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.drop-title {
  margin: 0;
  font-weight: 700;
  font-size: 1.08rem;
}

.drop-sub {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.hidden {
  display: none !important;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.tool-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.tool-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.btn-group {
  display: inline-flex;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 10px;
  gap: 3px;
}

.btn-toggle {
  border: none;
  background: transparent;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.btn-toggle.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.slider-group input[type="range"] {
  width: 130px;
  accent-color: var(--primary);
}

.canvas-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #0f172a;
  border-radius: 10px;
  padding: 12px;
  overflow: hidden;
  touch-action: none;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}

.canvas-wrapper.dragover {
  border-color: var(--primary);
}

canvas {
  max-width: 100%;
  max-height: 62vh;
  height: auto;
  display: block;
  cursor: crosshair;
  border-radius: 4px;
}

.hint {
  text-align: center;
  color: var(--muted);
  font-size: 0.84rem;
  margin: 10px 0 14px;
}

.action-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

.action-left,
.action-right {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 15px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn-outline {
  background: #fff;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover:not(:disabled) {
  background: #eff6ff;
}

.btn-secondary {
  background: #f1f5f9;
  color: var(--text);
}

.btn-secondary:hover:not(:disabled) {
  background: #e2e8f0;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.info-card h2 {
  margin: 0 0 6px;
  font-size: 0.98rem;
}

.info-card p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.pro-cta {
  margin-top: 20px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #ffffff;
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.pro-cta h2 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.pro-cta p {
  margin: 0;
  font-size: 0.86rem;
  color: #cbd5e1;
}

.pro-cta code {
  background: rgba(255, 255, 255, 0.14);
  padding: 1px 5px;
  border-radius: 4px;
  color: #fff;
}

.btn-pro-cta {
  display: inline-block;
  background: #fc4d50;
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 11px 20px;
  border-radius: 10px;
  white-space: nowrap;
}

.btn-pro-cta:hover {
  background: #e03a3d;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 24px;
  background: #111827;
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.22);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1000;
}

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

.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  padding: 24px 0;
}
