* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans",
        "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
    background: ghostwhite;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 8vh;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.input-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    max-width: auto;
    width: 1fr;
}
.output-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    max-width: auto;
    width: 2fr;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 10px;
    font-size: 28px;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

.input-group {
    margin-bottom: 16px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 600;
    font-size: 14px;
}

input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s;
    font-family: inherit;
}

input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.toggle-container {
    margin-bottom: 30px;
}
.action-toggle {
    margin-bottom: 30px;
}

.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 8px;
}

.action-btn {
    padding: 12px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    text-align: center;
}

.action-btn:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.action-btn.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #10b981;
    color: white;
}

.url-output {
    display: none;
    margin-bottom: 24px;
    padding: 16px;
    background: #f8f9ff;
    border-radius: 10px;
    border: 2px solid #667eea;
}

.url-output.show {
    display: block;
}

.url-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 600;
}

.url-display {
    background: white;
    padding: 12px;
    border-radius: 6px;
    word-break: break-all;
    font-size: 13px;
    color: #667eea;
    margin-bottom: 12px;
}

.copy-btn {
    width: 100%;
    padding: 10px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.copy-btn:hover {
    background: #5568d3;
}

.copy-btn.copied {
    background: #10b981;
}

.toggle-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-top: 8px;
}

.toggle-btn {
    padding: 8px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.toggle-btn:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.toggle-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
}

.company-icon {
    font-size: 28px;
}

.check-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.check-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.check-btn:active {
    transform: translateY(0);
}

.check-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

.error-message {
    color: #e53e3e;
    font-size: 13px;
    margin-top: 8px;
    display: none;
}

.error-message.show {
    display: block;
}

/* 保存済み追跡番号 */
.saved-section {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.saved-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9ff;
    border-bottom: 2px solid #e0e0e0;
}

.saved-title {
    font-size: 14px;
    font-weight: 700;
    color: #555;
}

.saved-count {
    font-size: 12px;
    font-weight: 600;
    color: #667eea;
    background: white;
    border: 1px solid #667eea;
    border-radius: 20px;
    padding: 2px 10px;
}

.saved-list {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.saved-empty {
    text-align: center;
    color: #aaa;
    font-size: 13px;
    padding: 16px;
}

.saved-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: white;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.saved-item:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.saved-item-text {
    flex: 1;
    font-size: 13px;
    color: #333;
    word-break: break-all;
    line-height: 1.4;
}

.saved-item-carrier {
    font-weight: 700;
    color: #667eea;
}

.saved-item-delete {
    padding: 4px 8px;
    background: none;
    border: 1.5px solid #e0e0e0;
    border-radius: 6px;
    color: #aaa;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.saved-item-delete:hover {
    border-color: #e53e3e;
    color: #e53e3e;
    background: #fff5f5;
}

@media (max-width: 480px) {
    .input-container {
        padding: 30px 20px;
    }
    .output-container {
        padding: 30px 20px;
    }

    h1 {
        font-size: 24px;
    }
}
