* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background-color: #f0f2f5; color: #1c1e21; min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 20px 10px; }
.container { width: 100%; max-width: 820px; flex: 1; }
.card { background: #ffffff; border-radius: 10px; padding: 24px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08); margin-bottom: 20px; }
h1, h2 { font-size: 1.5rem; margin-bottom: 16px; color: #0d1117; text-align: center; }
.drop-zone { border: 2px dashed #007bff; border-radius: 8px; padding: 40px 15px; text-align: center; background: #f8fbff; cursor: pointer; transition: background 0.2s, border-color 0.2s; }
.drop-zone:hover, .drop-zone.dragover { background: #eaf3ff; border-color: #0056b3; }
.drop-label { font-size: 1rem; color: #495057; pointer-events: none; }
.file-input-hidden, .is-hidden { display: none !important; }
.editor-wrap { display: flex; flex-direction: column; gap: 16px; align-items: center; }
.meta-info { font-size: 0.95rem; font-weight: 600; color: #495057; align-self: flex-start; }
.canvas-container { max-width: 100%; overflow: hidden; display: flex; justify-content: center; background: #e9ecef; border-radius: 6px; padding: 4px; touch-action: none; }
#cropCanvas { display: block; max-width: 100%; height: auto; cursor: crosshair; }
.scaling-title { font-weight: 600; font-size: 0.95rem; align-self: flex-start; color: #333333; margin-top: 8px; }
.scaling-options { display: flex; flex-wrap: wrap; gap: 10px 16px; width: 100%; justify-content: flex-start; }
.radio-label { font-size: 0.9rem; color: #333333; display: inline-flex; align-items: center; gap: 5px; cursor: pointer; white-space: nowrap; }
.actions { display: flex; gap: 12px; width: 100%; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
.btn { background: #007bff; color: #ffffff; border: none; border-radius: 6px; padding: 10px 22px; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: background 0.2s; text-decoration: none; display: inline-block; text-align: center; }
.btn:hover { background: #0056b3; }
.btn-secondary { background: #6c757d; }
.btn-secondary:hover { background: #545b62; }
.result-card { text-align: center; }
.sub-text { font-size: 0.9rem; color: #6c757d; margin-bottom: 16px; }
.field-label { font-size: 0.95rem; font-weight: 600; color: #333333; margin-bottom: 8px; text-align: left; }
.copy-input-row { display: flex; gap: 8px; margin-bottom: 20px; width: 100%; }
.text-input { flex: 1; padding: 10px 12px; border: 1px solid #ced4da; border-radius: 6px; font-size: 0.95rem; color: #212529; background: #f8f9fa; }
.text-input:focus { outline: none; border-color: #007bff; }
.qr-block { margin-top: 20px; display: flex; flex-direction: column; align-items: center; }
.qr-display { max-width: 280px; width: 100%; height: auto; border: 1px solid #dee2e6; border-radius: 6px; padding: 8px; background: #ffffff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05); }
.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; text-align: center; font-weight: 600; }
.alert-fail { background: #dc3545; color: #ffeb3b; border: 1px solid #bd2130; }
.popup { position: fixed; z-index: 9999; padding: 10px 14px; border-radius: 6px; font-size: 0.88rem; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25); pointer-events: auto; max-width: 260px; word-break: break-word; }
.popup-ok { background: #ffeb3b; color: #000000; border: 1px solid #fbc02d; font-weight: 600; }
.popup-fail { background: #dc3545; color: #ffeb3b; border: 1px solid #bd2130; }
.popup-copy-btn { margin-top: 8px; background: #ffeb3b; color: #000000; border: none; padding: 4px 8px; border-radius: 4px; font-size: 0.8rem; font-weight: bold; cursor: pointer; display: block; width: 100%; }
.code-copy-wrapper { display: flex; flex-direction: column; gap: 8px; margin-top: 15px; }
.command-box { background: #212529; color: #f8f9fa; padding: 12px; border-radius: 6px; font-family: monospace; font-size: 0.9rem; text-align: left; white-space: pre-wrap; word-break: break-all; }
.btn-copy { align-self: flex-start; background: #28a745; color: #ffffff; border: none; padding: 6px 12px; border-radius: 4px; cursor: pointer; font-size: 0.85rem; font-weight: 600; }
.recent-card { margin-top: 20px; }
.recent-grid { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; }
.recent-thumb-link { display: inline-block; width: 70px; height: 70px; border: 1px solid #dee2e6; border-radius: 6px; overflow: hidden; background: #f8f9fa; flex: 0 0 70px; }
.recent-thumb-link:hover { border-color: #007bff; }
.recent-thumb { width: 70px; height: 70px; object-fit: cover; display: block; }
.footer-version { text-align: center; font-size: 0.85rem; color: #6c757d; margin-top: 20px; width: 100%; }
@media (max-width: 600px) { .card { padding: 16px; } .copy-input-row { flex-direction: column; } .btn { width: 100%; } .actions { flex-direction: column; } .recent-thumb-link { width: 60px; height: 60px; flex: 0 0 60px; } .recent-thumb { width: 60px; height: 60px; } }